@finos/legend-cube-builder 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/docs/adding-an-operation.md +22 -12
- package/docs/demo/DEMO-FAST-NOTES.md +67 -0
- package/docs/demo/README.md +102 -0
- package/docs/demo/specs/duckdb-sales-pivot.cube.json +110 -0
- package/docs/demo/specs/trades-desks-1-joined.cube.json +123 -0
- package/docs/demo/specs/trades-desks-2-grouped.cube.json +140 -0
- package/docs/demo/specs/trades-desks-3-ranked.cube.json +158 -0
- package/docs/demo/specs/trades-desks-4-extended.cube.json +208 -0
- package/docs/demo/specs/trades-desks-5-final.cube.json +248 -0
- package/docs/hosting.md +50 -3
- package/docs/testing.md +32 -0
- package/lib/__lib__/LegendCubeCommand.d.ts +2 -0
- package/lib/__lib__/LegendCubeCommand.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeCommand.js +7 -0
- package/lib/__lib__/LegendCubeCommand.js.map +1 -1
- package/lib/__lib__/LegendCubeFunctionLabels.d.ts +29 -0
- package/lib/__lib__/LegendCubeFunctionLabels.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeFunctionLabels.js +31 -0
- package/lib/__lib__/LegendCubeFunctionLabels.js.map +1 -0
- package/lib/__lib__/LegendCubeHelpText.d.ts +5 -1
- package/lib/__lib__/LegendCubeHelpText.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeHelpText.js +14 -2
- package/lib/__lib__/LegendCubeHelpText.js.map +1 -1
- package/lib/__lib__/LegendCubeLabels.d.ts +100 -8
- package/lib/__lib__/LegendCubeLabels.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeLabels.js +129 -14
- package/lib/__lib__/LegendCubeLabels.js.map +1 -1
- package/lib/__lib__/LegendCubeProjectSourceLabels.d.ts +26 -0
- package/lib/__lib__/LegendCubeProjectSourceLabels.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeProjectSourceLabels.js +26 -0
- package/lib/__lib__/LegendCubeProjectSourceLabels.js.map +1 -0
- package/lib/__lib__/LegendCubeServiceLabels.d.ts +27 -0
- package/lib/__lib__/LegendCubeServiceLabels.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeServiceLabels.js +32 -0
- package/lib/__lib__/LegendCubeServiceLabels.js.map +1 -0
- package/lib/__lib__/LegendCubeTesting.d.ts +7 -0
- package/lib/__lib__/LegendCubeTesting.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeTesting.js +7 -0
- package/lib/__lib__/LegendCubeTesting.js.map +1 -1
- package/lib/__test-utils__/CubeEngineTestSupport.d.ts +1 -1
- package/lib/__test-utils__/CubeEngineTestSupport.d.ts.map +1 -1
- package/lib/__test-utils__/CubeEngineTestSupport.js +2 -2
- package/lib/__test-utils__/CubeEngineTestSupport.js.map +1 -1
- package/lib/__test-utils__/CubeExpressionTestUtils.d.ts +8 -1
- package/lib/__test-utils__/CubeExpressionTestUtils.d.ts.map +1 -1
- package/lib/__test-utils__/CubeExpressionTestUtils.js +20 -3
- package/lib/__test-utils__/CubeExpressionTestUtils.js.map +1 -1
- package/lib/__test-utils__/CubeFunctionTestOutline.d.ts +26 -0
- package/lib/__test-utils__/CubeFunctionTestOutline.d.ts.map +1 -0
- package/lib/__test-utils__/CubeFunctionTestOutline.js +56 -0
- package/lib/__test-utils__/CubeFunctionTestOutline.js.map +1 -0
- package/lib/__test-utils__/CubeLambdaCorpus.d.ts +36 -0
- package/lib/__test-utils__/CubeLambdaCorpus.d.ts.map +1 -0
- package/lib/__test-utils__/CubeLambdaCorpus.js +83 -0
- package/lib/__test-utils__/CubeLambdaCorpus.js.map +1 -0
- package/lib/__test-utils__/CubePageTestUtils.d.ts +6 -0
- package/lib/__test-utils__/CubePageTestUtils.d.ts.map +1 -1
- package/lib/__test-utils__/CubePageTestUtils.js +21 -0
- package/lib/__test-utils__/CubePageTestUtils.js.map +1 -1
- package/lib/__test-utils__/CubeTestApplication.d.ts +9 -0
- package/lib/__test-utils__/CubeTestApplication.d.ts.map +1 -1
- package/lib/__test-utils__/CubeTestApplication.js +16 -0
- package/lib/__test-utils__/CubeTestApplication.js.map +1 -1
- package/lib/__test-utils__/FakeCubeEngine.d.ts +5 -0
- package/lib/__test-utils__/FakeCubeEngine.d.ts.map +1 -1
- package/lib/__test-utils__/FakeCubeEngine.js +17 -0
- package/lib/__test-utils__/FakeCubeEngine.js.map +1 -1
- package/lib/__test-utils__/FakeCubeIngestCatalog.d.ts +7 -1
- package/lib/__test-utils__/FakeCubeIngestCatalog.d.ts.map +1 -1
- package/lib/__test-utils__/FakeCubeIngestCatalog.js +16 -0
- package/lib/__test-utils__/FakeCubeIngestCatalog.js.map +1 -1
- package/lib/__test-utils__/FakeCubeServiceCatalog.d.ts +26 -0
- package/lib/__test-utils__/FakeCubeServiceCatalog.d.ts.map +1 -0
- package/lib/__test-utils__/FakeCubeServiceCatalog.js +40 -0
- package/lib/__test-utils__/FakeCubeServiceCatalog.js.map +1 -0
- package/lib/components/CubeAddItems.d.ts.map +1 -1
- package/lib/components/CubeAddItems.js +9 -6
- package/lib/components/CubeAddItems.js.map +1 -1
- package/lib/components/CubeDialogTheme.d.ts +25 -0
- package/lib/components/CubeDialogTheme.d.ts.map +1 -0
- package/lib/components/CubeDialogTheme.js +25 -0
- package/lib/components/CubeDialogTheme.js.map +1 -0
- package/lib/components/CubeEditor.d.ts +12 -1
- package/lib/components/CubeEditor.d.ts.map +1 -1
- package/lib/components/CubeEditor.js +16 -14
- package/lib/components/CubeEditor.js.map +1 -1
- package/lib/components/CubeFileMenu.d.ts +28 -0
- package/lib/components/CubeFileMenu.d.ts.map +1 -0
- package/lib/components/CubeFileMenu.js +77 -0
- package/lib/components/CubeFileMenu.js.map +1 -0
- package/lib/components/CubeLambdaImportBanner.d.ts +26 -0
- package/lib/components/CubeLambdaImportBanner.d.ts.map +1 -0
- package/lib/components/CubeLambdaImportBanner.js +47 -0
- package/lib/components/CubeLambdaImportBanner.js.map +1 -0
- package/lib/components/CubeNodeIcon.d.ts.map +1 -1
- package/lib/components/CubeNodeIcon.js +5 -1
- package/lib/components/CubeNodeIcon.js.map +1 -1
- package/lib/components/CubeSchemaColumnsTable.d.ts.map +1 -1
- package/lib/components/CubeSchemaColumnsTable.js +2 -2
- package/lib/components/CubeSchemaColumnsTable.js.map +1 -1
- package/lib/components/canvas/CubeCanvas.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvas.js +38 -5
- package/lib/components/canvas/CubeCanvas.js.map +1 -1
- package/lib/components/canvas/CubeCanvasContextMenu.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvasContextMenu.js +2 -1
- package/lib/components/canvas/CubeCanvasContextMenu.js.map +1 -1
- package/lib/components/canvas/CubeCanvasElements.d.ts +18 -1
- package/lib/components/canvas/CubeCanvasElements.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvasElements.js +58 -3
- package/lib/components/canvas/CubeCanvasElements.js.map +1 -1
- package/lib/components/canvas/CubeCanvasLayout.js +1 -1
- package/lib/components/canvas/CubeCanvasNode.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvasNode.js +8 -4
- package/lib/components/canvas/CubeCanvasNode.js.map +1 -1
- package/lib/components/dev-settings/CubeDevSettings.d.ts +35 -0
- package/lib/components/dev-settings/CubeDevSettings.d.ts.map +1 -0
- package/lib/components/dev-settings/CubeDevSettings.js +50 -0
- package/lib/components/dev-settings/CubeDevSettings.js.map +1 -0
- package/lib/components/editors/CubeColumnChecklist.d.ts.map +1 -1
- package/lib/components/editors/CubeColumnChecklist.js +2 -2
- package/lib/components/editors/CubeColumnChecklist.js.map +1 -1
- package/lib/components/editors/CubeColumnPicker.d.ts.map +1 -1
- package/lib/components/editors/CubeColumnPicker.js +3 -3
- package/lib/components/editors/CubeColumnPicker.js.map +1 -1
- package/lib/components/editors/CubeConcatEditor.js +2 -2
- package/lib/components/editors/CubeConcatEditor.js.map +1 -1
- package/lib/components/editors/CubeExpressionFilterEditor.d.ts +25 -0
- package/lib/components/editors/CubeExpressionFilterEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeExpressionFilterEditor.js +83 -0
- package/lib/components/editors/CubeExpressionFilterEditor.js.map +1 -0
- package/lib/components/editors/CubeExtendEditor.d.ts +2 -0
- package/lib/components/editors/CubeExtendEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeExtendEditor.js +3 -3
- package/lib/components/editors/CubeExtendEditor.js.map +1 -1
- package/lib/components/editors/CubeFilterEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeFilterEditor.js +13 -2
- package/lib/components/editors/CubeFilterEditor.js.map +1 -1
- package/lib/components/editors/CubeFunctionSourceEditor.d.ts +25 -0
- package/lib/components/editors/CubeFunctionSourceEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeFunctionSourceEditor.js +55 -0
- package/lib/components/editors/CubeFunctionSourceEditor.js.map +1 -0
- package/lib/components/editors/CubeJoinEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeJoinEditor.js +16 -4
- package/lib/components/editors/CubeJoinEditor.js.map +1 -1
- package/lib/components/editors/CubeNodeEditorPanel.d.ts.map +1 -1
- package/lib/components/editors/CubeNodeEditorPanel.js +18 -8
- package/lib/components/editors/CubeNodeEditorPanel.js.map +1 -1
- package/lib/components/editors/CubeNodeEditorPopper.d.ts +5 -1
- package/lib/components/editors/CubeNodeEditorPopper.d.ts.map +1 -1
- package/lib/components/editors/CubeNodeEditorPopper.js +10 -2
- package/lib/components/editors/CubeNodeEditorPopper.js.map +1 -1
- package/lib/components/editors/CubeNodeEditorRegistry.d.ts.map +1 -1
- package/lib/components/editors/CubeNodeEditorRegistry.js +9 -1
- package/lib/components/editors/CubeNodeEditorRegistry.js.map +1 -1
- package/lib/components/editors/CubePivotEditor.d.ts +26 -0
- package/lib/components/editors/CubePivotEditor.d.ts.map +1 -0
- package/lib/components/editors/CubePivotEditor.js +93 -0
- package/lib/components/editors/CubePivotEditor.js.map +1 -0
- package/lib/components/editors/CubeRestrictEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeRestrictEditor.js +2 -2
- package/lib/components/editors/CubeRestrictEditor.js.map +1 -1
- package/lib/components/editors/CubeServiceSourceEditor.d.ts +25 -0
- package/lib/components/editors/CubeServiceSourceEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeServiceSourceEditor.js +41 -0
- package/lib/components/editors/CubeServiceSourceEditor.js.map +1 -0
- package/lib/components/grid/CubeColumnFormatDialog.d.ts +28 -0
- package/lib/components/grid/CubeColumnFormatDialog.d.ts.map +1 -0
- package/lib/components/grid/CubeColumnFormatDialog.js +94 -0
- package/lib/components/grid/CubeColumnFormatDialog.js.map +1 -0
- package/lib/components/grid/CubeDrilldownBar.d.ts +37 -0
- package/lib/components/grid/CubeDrilldownBar.d.ts.map +1 -0
- package/lib/components/grid/CubeDrilldownBar.js +77 -0
- package/lib/components/grid/CubeDrilldownBar.js.map +1 -0
- package/lib/components/grid/CubeGridRegion.d.ts.map +1 -1
- package/lib/components/grid/CubeGridRegion.js +40 -26
- package/lib/components/grid/CubeGridRegion.js.map +1 -1
- package/lib/components/grid/CubeGridValues.d.ts +31 -1
- package/lib/components/grid/CubeGridValues.d.ts.map +1 -1
- package/lib/components/grid/CubeGridValues.js +108 -1
- package/lib/components/grid/CubeGridValues.js.map +1 -1
- package/lib/components/grid/CubeResultGrid.d.ts +68 -5
- package/lib/components/grid/CubeResultGrid.d.ts.map +1 -1
- package/lib/components/grid/CubeResultGrid.js +308 -35
- package/lib/components/grid/CubeResultGrid.js.map +1 -1
- package/lib/components/grid/CubeRunStatsPanel.d.ts +28 -0
- package/lib/components/grid/CubeRunStatsPanel.d.ts.map +1 -0
- package/lib/components/grid/CubeRunStatsPanel.js +61 -0
- package/lib/components/grid/CubeRunStatsPanel.js.map +1 -0
- package/lib/components/grid/CubeServerSideGrid.d.ts +36 -0
- package/lib/components/grid/CubeServerSideGrid.d.ts.map +1 -0
- package/lib/components/grid/CubeServerSideGrid.js +114 -0
- package/lib/components/grid/CubeServerSideGrid.js.map +1 -0
- package/lib/components/grid/CubeSqlDialog.d.ts +24 -0
- package/lib/components/grid/CubeSqlDialog.d.ts.map +1 -0
- package/lib/components/grid/CubeSqlDialog.js +39 -0
- package/lib/components/grid/CubeSqlDialog.js.map +1 -0
- package/lib/components/grid/CubeSqlFormat.d.ts +20 -0
- package/lib/components/grid/CubeSqlFormat.d.ts.map +1 -0
- package/lib/components/grid/CubeSqlFormat.js +32 -0
- package/lib/components/grid/CubeSqlFormat.js.map +1 -0
- package/lib/components/palette/CubePalette.d.ts.map +1 -1
- package/lib/components/palette/CubePalette.js +32 -13
- package/lib/components/palette/CubePalette.js.map +1 -1
- package/lib/components/show-pure/CubeShowPureDialog.d.ts +4 -1
- package/lib/components/show-pure/CubeShowPureDialog.d.ts.map +1 -1
- package/lib/components/show-pure/CubeShowPureDialog.js +8 -4
- package/lib/components/show-pure/CubeShowPureDialog.js.map +1 -1
- package/lib/components/source-picker/CubeDataProductTab.d.ts.map +1 -1
- package/lib/components/source-picker/CubeDataProductTab.js +37 -16
- package/lib/components/source-picker/CubeDataProductTab.js.map +1 -1
- package/lib/components/source-picker/CubeDirectConnectionTab.d.ts.map +1 -1
- package/lib/components/source-picker/CubeDirectConnectionTab.js +6 -4
- package/lib/components/source-picker/CubeDirectConnectionTab.js.map +1 -1
- package/lib/components/source-picker/CubeFunctionSteps.d.ts +36 -0
- package/lib/components/source-picker/CubeFunctionSteps.d.ts.map +1 -0
- package/lib/components/source-picker/CubeFunctionSteps.js +76 -0
- package/lib/components/source-picker/CubeFunctionSteps.js.map +1 -0
- package/lib/components/source-picker/CubeIngestTab.d.ts.map +1 -1
- package/lib/components/source-picker/CubeIngestTab.js +39 -16
- package/lib/components/source-picker/CubeIngestTab.js.map +1 -1
- package/lib/components/source-picker/CubeInlineModelTab.d.ts +3 -2
- package/lib/components/source-picker/CubeInlineModelTab.d.ts.map +1 -1
- package/lib/components/source-picker/CubeInlineModelTab.js +23 -13
- package/lib/components/source-picker/CubeInlineModelTab.js.map +1 -1
- package/lib/components/source-picker/CubePickerListItem.d.ts +47 -0
- package/lib/components/source-picker/CubePickerListItem.d.ts.map +1 -0
- package/lib/components/source-picker/CubePickerListItem.js +62 -0
- package/lib/components/source-picker/CubePickerListItem.js.map +1 -0
- package/lib/components/source-picker/CubeProjectTab.d.ts +4 -3
- package/lib/components/source-picker/CubeProjectTab.d.ts.map +1 -1
- package/lib/components/source-picker/CubeProjectTab.js +7 -4
- package/lib/components/source-picker/CubeProjectTab.js.map +1 -1
- package/lib/components/source-picker/CubeServiceTab.d.ts +27 -0
- package/lib/components/source-picker/CubeServiceTab.d.ts.map +1 -0
- package/lib/components/source-picker/CubeServiceTab.js +36 -0
- package/lib/components/source-picker/CubeServiceTab.js.map +1 -0
- package/lib/components/source-picker/CubeSourcePicker.d.ts.map +1 -1
- package/lib/components/source-picker/CubeSourcePicker.js +16 -3
- package/lib/components/source-picker/CubeSourcePicker.js.map +1 -1
- package/lib/components/source-picker/CubeTablePreview.d.ts +29 -0
- package/lib/components/source-picker/CubeTablePreview.d.ts.map +1 -0
- package/lib/components/source-picker/CubeTablePreview.js +10 -0
- package/lib/components/source-picker/CubeTablePreview.js.map +1 -0
- package/lib/components/spec-transfer/CubeImportPureDialog.d.ts +27 -0
- package/lib/components/spec-transfer/CubeImportPureDialog.d.ts.map +1 -0
- package/lib/components/spec-transfer/CubeImportPureDialog.js +38 -0
- package/lib/components/spec-transfer/CubeImportPureDialog.js.map +1 -0
- package/lib/components/spec-transfer/CubeSpecTransferDialog.d.ts.map +1 -1
- package/lib/components/spec-transfer/CubeSpecTransferDialog.js +9 -3
- package/lib/components/spec-transfer/CubeSpecTransferDialog.js.map +1 -1
- package/lib/graph-manager/CubeDataProductCatalog.d.ts +10 -0
- package/lib/graph-manager/CubeDataProductCatalog.d.ts.map +1 -1
- package/lib/graph-manager/CubeDataProductCatalog.js.map +1 -1
- package/lib/graph-manager/CubeEngine.d.ts +46 -1
- package/lib/graph-manager/CubeEngine.d.ts.map +1 -1
- package/lib/graph-manager/CubeEngine.js.map +1 -1
- package/lib/graph-manager/CubeEngineClientSettings.d.ts +43 -0
- package/lib/graph-manager/CubeEngineClientSettings.d.ts.map +1 -0
- package/lib/graph-manager/CubeEngineClientSettings.js +51 -0
- package/lib/graph-manager/CubeEngineClientSettings.js.map +1 -0
- package/lib/graph-manager/CubeIngest.d.ts +5 -0
- package/lib/graph-manager/CubeIngest.d.ts.map +1 -1
- package/lib/graph-manager/CubeIngest.js +10 -0
- package/lib/graph-manager/CubeIngest.js.map +1 -1
- package/lib/graph-manager/CubeIngestCatalog.d.ts +26 -0
- package/lib/graph-manager/CubeIngestCatalog.d.ts.map +1 -1
- package/lib/graph-manager/CubeIngestCatalog.js +6 -0
- package/lib/graph-manager/CubeIngestCatalog.js.map +1 -1
- package/lib/graph-manager/CubeLakehouseRuntime.d.ts +29 -0
- package/lib/graph-manager/CubeLakehouseRuntime.d.ts.map +1 -0
- package/lib/graph-manager/CubeLakehouseRuntime.js +40 -0
- package/lib/graph-manager/CubeLakehouseRuntime.js.map +1 -0
- package/lib/graph-manager/CubeProjectCatalog.d.ts +3 -3
- package/lib/graph-manager/CubeService.d.ts +20 -0
- package/lib/graph-manager/CubeService.d.ts.map +1 -0
- package/lib/graph-manager/CubeService.js +22 -0
- package/lib/graph-manager/CubeService.js.map +1 -0
- package/lib/graph-manager/CubeServiceCatalog.d.ts +31 -0
- package/lib/graph-manager/CubeServiceCatalog.d.ts.map +1 -0
- package/lib/graph-manager/CubeServiceCatalog.js +17 -0
- package/lib/graph-manager/CubeServiceCatalog.js.map +1 -0
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.d.ts +52 -5
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.js +63 -5
- package/lib/graph-manager/protocol/pure/CubeEngineBuilder.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.d.ts +9 -6
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.js +12 -8
- package/lib/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeFunctionOutlineBuilder.d.ts +30 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeFunctionOutlineBuilder.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeFunctionOutlineBuilder.js +229 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeFunctionOutlineBuilder.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestDefinition.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestDefinition.js +18 -9
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestDefinition.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestModel.d.ts +4 -9
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestModel.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestModel.js +2 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeIngestModel.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaReader.d.ts +34 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaReader.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaReader.js +332 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaReader.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.js +49 -10
- package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.d.ts +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.js +3 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.d.ts +2 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.js +2 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.d.ts +18 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.js +74 -6
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeProjectCatalog.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeProjectCatalog.js +7 -4
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeProjectCatalog.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeServiceCatalog.d.ts +31 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeServiceCatalog.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeServiceCatalog.js +69 -0
- package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeServiceCatalog.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.js +6 -2
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +12 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -1
- package/lib/index.js.map +1 -1
- package/lib/stores/CubeAddPlacement.d.ts +10 -3
- package/lib/stores/CubeAddPlacement.d.ts.map +1 -1
- package/lib/stores/CubeAddPlacement.js +16 -5
- package/lib/stores/CubeAddPlacement.js.map +1 -1
- package/lib/stores/CubeDevSettingsState.d.ts +47 -0
- package/lib/stores/CubeDevSettingsState.d.ts.map +1 -0
- package/lib/stores/CubeDevSettingsState.js +99 -0
- package/lib/stores/CubeDevSettingsState.js.map +1 -0
- package/lib/stores/CubeEditorState.d.ts +173 -43
- package/lib/stores/CubeEditorState.d.ts.map +1 -1
- package/lib/stores/CubeEditorState.js +498 -113
- package/lib/stores/CubeEditorState.js.map +1 -1
- package/lib/stores/CubeEngineChecks.d.ts +59 -0
- package/lib/stores/CubeEngineChecks.d.ts.map +1 -0
- package/lib/stores/CubeEngineChecks.js +100 -0
- package/lib/stores/CubeEngineChecks.js.map +1 -0
- package/lib/stores/CubeExamples.d.ts.map +1 -1
- package/lib/stores/CubeExamples.js +39 -2
- package/lib/stores/CubeExamples.js.map +1 -1
- package/lib/stores/CubeExamplesState.d.ts +1 -1
- package/lib/stores/CubeExamplesState.d.ts.map +1 -1
- package/lib/stores/CubeExamplesState.js +2 -2
- package/lib/stores/CubeExamplesState.js.map +1 -1
- package/lib/stores/CubeExecutionState.d.ts.map +1 -1
- package/lib/stores/CubeExecutionState.js +24 -33
- package/lib/stores/CubeExecutionState.js.map +1 -1
- package/lib/stores/CubeExportState.d.ts +41 -0
- package/lib/stores/CubeExportState.d.ts.map +1 -0
- package/lib/stores/CubeExportState.js +134 -0
- package/lib/stores/CubeExportState.js.map +1 -0
- package/lib/stores/CubeExpressionFilterCheck.d.ts +51 -0
- package/lib/stores/CubeExpressionFilterCheck.d.ts.map +1 -0
- package/lib/stores/CubeExpressionFilterCheck.js +134 -0
- package/lib/stores/CubeExpressionFilterCheck.js.map +1 -0
- package/lib/stores/CubeExtendTyping.d.ts +6 -14
- package/lib/stores/CubeExtendTyping.d.ts.map +1 -1
- package/lib/stores/CubeExtendTyping.js +6 -33
- package/lib/stores/CubeExtendTyping.js.map +1 -1
- package/lib/stores/CubeFunctionRecheck.d.ts +30 -0
- package/lib/stores/CubeFunctionRecheck.d.ts.map +1 -0
- package/lib/stores/CubeFunctionRecheck.js +67 -0
- package/lib/stores/CubeFunctionRecheck.js.map +1 -0
- package/lib/stores/CubeGridFetcher.d.ts +75 -0
- package/lib/stores/CubeGridFetcher.d.ts.map +1 -0
- package/lib/stores/CubeGridFetcher.js +197 -0
- package/lib/stores/CubeGridFetcher.js.map +1 -0
- package/lib/stores/CubeGridQuickActions.d.ts +18 -6
- package/lib/stores/CubeGridQuickActions.d.ts.map +1 -1
- package/lib/stores/CubeGridQuickActions.js +32 -12
- package/lib/stores/CubeGridQuickActions.js.map +1 -1
- package/lib/stores/CubeGridState.d.ts +136 -0
- package/lib/stores/CubeGridState.d.ts.map +1 -0
- package/lib/stores/CubeGridState.js +317 -0
- package/lib/stores/CubeGridState.js.map +1 -0
- package/lib/stores/CubeHost.d.ts +42 -0
- package/lib/stores/CubeHost.d.ts.map +1 -1
- package/lib/stores/CubeHost.js +4 -0
- package/lib/stores/CubeHost.js.map +1 -1
- package/lib/stores/CubeLambdaImportState.d.ts +118 -0
- package/lib/stores/CubeLambdaImportState.d.ts.map +1 -0
- package/lib/stores/CubeLambdaImportState.js +302 -0
- package/lib/stores/CubeLambdaImportState.js.map +1 -0
- package/lib/stores/CubeLambdaSources.d.ts +45 -0
- package/lib/stores/CubeLambdaSources.d.ts.map +1 -0
- package/lib/stores/CubeLambdaSources.js +261 -0
- package/lib/stores/CubeLambdaSources.js.map +1 -0
- package/lib/stores/CubeQueryRun.d.ts +59 -0
- package/lib/stores/CubeQueryRun.d.ts.map +1 -0
- package/lib/stores/CubeQueryRun.js +101 -0
- package/lib/stores/CubeQueryRun.js.map +1 -0
- package/lib/stores/CubeRunStatsState.d.ts +61 -0
- package/lib/stores/CubeRunStatsState.d.ts.map +1 -0
- package/lib/stores/CubeRunStatsState.js +54 -0
- package/lib/stores/CubeRunStatsState.js.map +1 -0
- package/lib/stores/CubeRunningStepLambda.d.ts +25 -0
- package/lib/stores/CubeRunningStepLambda.d.ts.map +1 -0
- package/lib/stores/CubeRunningStepLambda.js +45 -0
- package/lib/stores/CubeRunningStepLambda.js.map +1 -0
- package/lib/stores/CubeServiceRecheck.d.ts +29 -0
- package/lib/stores/CubeServiceRecheck.d.ts.map +1 -0
- package/lib/stores/CubeServiceRecheck.js +33 -0
- package/lib/stores/CubeServiceRecheck.js.map +1 -0
- package/lib/stores/CubeShowPureState.d.ts +14 -1
- package/lib/stores/CubeShowPureState.d.ts.map +1 -1
- package/lib/stores/CubeShowPureState.js +41 -11
- package/lib/stores/CubeShowPureState.js.map +1 -1
- package/lib/stores/CubeSourcePickerState.d.ts +20 -4
- package/lib/stores/CubeSourcePickerState.d.ts.map +1 -1
- package/lib/stores/CubeSourcePickerState.js +75 -14
- package/lib/stores/CubeSourcePickerState.js.map +1 -1
- package/lib/stores/LocalModelCatalog.d.ts.map +1 -1
- package/lib/stores/LocalModelCatalog.js +3 -1
- package/lib/stores/LocalModelCatalog.js.map +1 -1
- package/lib/stores/editors/CubeExpressionFilterDraft.d.ts +91 -0
- package/lib/stores/editors/CubeExpressionFilterDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeExpressionFilterDraft.js +254 -0
- package/lib/stores/editors/CubeExpressionFilterDraft.js.map +1 -0
- package/lib/stores/editors/CubeFunctionDraft.d.ts +34 -0
- package/lib/stores/editors/CubeFunctionDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeFunctionDraft.js +69 -0
- package/lib/stores/editors/CubeFunctionDraft.js.map +1 -0
- package/lib/stores/editors/CubeNodeDraftRegistry.d.ts +4 -2
- package/lib/stores/editors/CubeNodeDraftRegistry.d.ts.map +1 -1
- package/lib/stores/editors/CubeNodeDraftRegistry.js +20 -3
- package/lib/stores/editors/CubeNodeDraftRegistry.js.map +1 -1
- package/lib/stores/editors/CubePivotDraft.d.ts +93 -0
- package/lib/stores/editors/CubePivotDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubePivotDraft.js +267 -0
- package/lib/stores/editors/CubePivotDraft.js.map +1 -0
- package/lib/stores/fixtures/CubeSalesDuckDbModel.d.ts +26 -0
- package/lib/stores/fixtures/CubeSalesDuckDbModel.d.ts.map +1 -0
- package/lib/stores/fixtures/CubeSalesDuckDbModel.js +46 -0
- package/lib/stores/fixtures/CubeSalesDuckDbModel.js.map +1 -0
- package/lib/stores/fixtures/CubeTradesModel.d.ts +4 -0
- package/lib/stores/fixtures/CubeTradesModel.d.ts.map +1 -1
- package/lib/stores/fixtures/CubeTradesModel.js +31 -1
- package/lib/stores/fixtures/CubeTradesModel.js.map +1 -1
- package/lib/stores/source-picker/CubeDataProductTabState.d.ts +34 -5
- package/lib/stores/source-picker/CubeDataProductTabState.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeDataProductTabState.js +111 -26
- package/lib/stores/source-picker/CubeDataProductTabState.js.map +1 -1
- package/lib/stores/source-picker/CubeDirectConnectionTabState.d.ts +25 -2
- package/lib/stores/source-picker/CubeDirectConnectionTabState.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeDirectConnectionTabState.js +183 -31
- package/lib/stores/source-picker/CubeDirectConnectionTabState.js.map +1 -1
- package/lib/stores/source-picker/CubeIngestTabState.d.ts +22 -9
- package/lib/stores/source-picker/CubeIngestTabState.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeIngestTabState.js +84 -29
- package/lib/stores/source-picker/CubeIngestTabState.js.map +1 -1
- package/lib/stores/source-picker/CubeInlineModelTabState.d.ts +100 -4
- package/lib/stores/source-picker/CubeInlineModelTabState.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeInlineModelTabState.js +415 -28
- package/lib/stores/source-picker/CubeInlineModelTabState.js.map +1 -1
- package/lib/stores/source-picker/CubeProjectTabState.d.ts +18 -3
- package/lib/stores/source-picker/CubeProjectTabState.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeProjectTabState.js +26 -1
- package/lib/stores/source-picker/CubeProjectTabState.js.map +1 -1
- package/lib/stores/source-picker/CubeServiceTabState.d.ts +74 -0
- package/lib/stores/source-picker/CubeServiceTabState.d.ts.map +1 -0
- package/lib/stores/source-picker/CubeServiceTabState.js +216 -0
- package/lib/stores/source-picker/CubeServiceTabState.js.map +1 -0
- package/lib/stores/source-picker/CubeSourcePickerTab.d.ts +15 -3
- package/lib/stores/source-picker/CubeSourcePickerTab.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeSourcePickerTab.js +21 -0
- package/lib/stores/source-picker/CubeSourcePickerTab.js.map +1 -1
- package/package.json +10 -9
- package/src/__lib__/LegendCubeCommand.ts +7 -0
- package/src/__lib__/LegendCubeFunctionLabels.ts +41 -0
- package/src/__lib__/LegendCubeHelpText.ts +23 -1
- package/src/__lib__/LegendCubeLabels.ts +170 -13
- package/src/__lib__/LegendCubeProjectSourceLabels.ts +26 -0
- package/src/__lib__/LegendCubeServiceLabels.ts +41 -0
- package/src/__lib__/LegendCubeTesting.ts +7 -0
- package/src/__test-utils__/CubeEngineTestSupport.ts +2 -1
- package/src/__test-utils__/CubeExpressionTestUtils.ts +29 -2
- package/src/__test-utils__/CubeFunctionTestOutline.ts +78 -0
- package/src/__test-utils__/CubeLambdaCorpus.ts +137 -0
- package/src/__test-utils__/CubePageTestUtils.tsx +34 -0
- package/src/__test-utils__/CubeTestApplication.ts +25 -0
- package/src/__test-utils__/FakeCubeEngine.ts +27 -0
- package/src/__test-utils__/FakeCubeIngestCatalog.ts +18 -0
- package/src/__test-utils__/FakeCubeServiceCatalog.ts +57 -0
- package/src/components/CubeAddItems.tsx +13 -6
- package/src/components/CubeDialogTheme.ts +25 -0
- package/src/components/CubeEditor.tsx +155 -129
- package/src/components/CubeFileMenu.tsx +127 -0
- package/src/components/CubeLambdaImportBanner.tsx +97 -0
- package/src/components/CubeNodeIcon.tsx +7 -0
- package/src/components/CubeSchemaColumnsTable.tsx +7 -2
- package/src/components/canvas/CubeCanvas.tsx +52 -13
- package/src/components/canvas/CubeCanvasContextMenu.tsx +33 -2
- package/src/components/canvas/CubeCanvasElements.ts +76 -3
- package/src/components/canvas/CubeCanvasLayout.ts +1 -1
- package/src/components/canvas/CubeCanvasNode.tsx +30 -3
- package/src/components/dev-settings/CubeDevSettings.tsx +154 -0
- package/src/components/editors/CubeColumnChecklist.tsx +8 -2
- package/src/components/editors/CubeColumnPicker.tsx +6 -3
- package/src/components/editors/CubeConcatEditor.tsx +2 -2
- package/src/components/editors/CubeExpressionFilterEditor.tsx +193 -0
- package/src/components/editors/CubeExtendEditor.tsx +3 -3
- package/src/components/editors/CubeFilterEditor.tsx +13 -1
- package/src/components/editors/CubeFunctionSourceEditor.tsx +140 -0
- package/src/components/editors/CubeJoinEditor.tsx +23 -4
- package/src/components/editors/CubeNodeEditorPanel.tsx +22 -10
- package/src/components/editors/CubeNodeEditorPopper.tsx +9 -1
- package/src/components/editors/CubeNodeEditorRegistry.ts +12 -0
- package/src/components/editors/CubePivotEditor.tsx +277 -0
- package/src/components/editors/CubeRestrictEditor.tsx +8 -2
- package/src/components/editors/CubeServiceSourceEditor.tsx +77 -0
- package/src/components/grid/CubeColumnFormatDialog.tsx +289 -0
- package/src/components/grid/CubeDrilldownBar.tsx +219 -0
- package/src/components/grid/CubeGridRegion.tsx +170 -54
- package/src/components/grid/CubeGridValues.ts +146 -1
- package/src/components/grid/CubeResultGrid.tsx +443 -41
- package/src/components/grid/CubeRunStatsPanel.tsx +156 -0
- package/src/components/grid/CubeServerSideGrid.tsx +200 -0
- package/src/components/grid/CubeSqlDialog.tsx +90 -0
- package/src/components/grid/CubeSqlFormat.ts +37 -0
- package/src/components/palette/CubePalette.tsx +45 -12
- package/src/components/show-pure/CubeShowPureDialog.tsx +19 -5
- package/src/components/source-picker/CubeDataProductTab.tsx +169 -75
- package/src/components/source-picker/CubeDirectConnectionTab.tsx +42 -30
- package/src/components/source-picker/CubeFunctionSteps.tsx +244 -0
- package/src/components/source-picker/CubeIngestTab.tsx +159 -79
- package/src/components/source-picker/CubeInlineModelTab.tsx +110 -81
- package/src/components/source-picker/CubePickerListItem.tsx +118 -0
- package/src/components/source-picker/CubeProjectTab.tsx +6 -3
- package/src/components/source-picker/CubeServiceTab.tsx +151 -0
- package/src/components/source-picker/CubeSourcePicker.tsx +54 -18
- package/src/components/source-picker/CubeTablePreview.tsx +49 -0
- package/src/components/spec-transfer/CubeImportPureDialog.tsx +122 -0
- package/src/components/spec-transfer/CubeSpecTransferDialog.tsx +21 -8
- package/src/graph-manager/CubeDataProductCatalog.ts +11 -0
- package/src/graph-manager/CubeEngine.ts +51 -1
- package/src/graph-manager/CubeEngineClientSettings.ts +64 -0
- package/src/graph-manager/CubeIngest.ts +15 -0
- package/src/graph-manager/CubeIngestCatalog.ts +33 -0
- package/src/graph-manager/CubeLakehouseRuntime.ts +43 -0
- package/src/graph-manager/CubeProjectCatalog.ts +3 -3
- package/src/graph-manager/CubeService.ts +29 -0
- package/src/graph-manager/CubeServiceCatalog.ts +35 -0
- package/src/graph-manager/protocol/pure/CubeEngineBuilder.ts +115 -5
- package/src/graph-manager/protocol/pure/v1/V1_CubeDataProductModel.ts +13 -7
- package/src/graph-manager/protocol/pure/v1/V1_CubeFunctionOutlineBuilder.ts +312 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeIngestDefinition.ts +35 -9
- package/src/graph-manager/protocol/pure/v1/V1_CubeIngestModel.ts +6 -15
- package/src/graph-manager/protocol/pure/v1/V1_CubeLambdaReader.ts +471 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.ts +70 -15
- package/src/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.ts +3 -1
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeConnectionExplorer.ts +7 -1
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.ts +122 -7
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeProjectCatalog.ts +9 -4
- package/src/graph-manager/protocol/pure/v1/V1_LegendCubeServiceCatalog.ts +92 -0
- package/src/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.ts +6 -1
- package/src/index.ts +32 -2
- package/src/stores/CubeAddPlacement.ts +25 -5
- package/src/stores/CubeDevSettingsState.ts +117 -0
- package/src/stores/CubeEditorState.ts +687 -197
- package/src/stores/CubeEngineChecks.ts +240 -0
- package/src/stores/CubeExamples.ts +70 -1
- package/src/stores/CubeExamplesState.ts +4 -2
- package/src/stores/CubeExecutionState.ts +26 -57
- package/src/stores/CubeExportState.ts +196 -0
- package/src/stores/CubeExpressionFilterCheck.ts +218 -0
- package/src/stores/CubeExtendTyping.ts +6 -46
- package/src/stores/CubeFunctionRecheck.ts +97 -0
- package/src/stores/CubeGridFetcher.ts +302 -0
- package/src/stores/CubeGridQuickActions.ts +33 -11
- package/src/stores/CubeGridState.ts +450 -0
- package/src/stores/CubeHost.ts +48 -0
- package/src/stores/CubeLambdaImportState.ts +434 -0
- package/src/stores/CubeLambdaSources.ts +390 -0
- package/src/stores/CubeQueryRun.ts +169 -0
- package/src/stores/CubeRunStatsState.ts +91 -0
- package/src/stores/CubeRunningStepLambda.ts +62 -0
- package/src/stores/CubeServiceRecheck.ts +53 -0
- package/src/stores/CubeShowPureState.ts +51 -12
- package/src/stores/CubeSourcePickerState.ts +89 -13
- package/src/stores/LocalModelCatalog.ts +6 -1
- package/src/stores/editors/CubeExpressionFilterDraft.ts +385 -0
- package/src/stores/editors/CubeFunctionDraft.ts +92 -0
- package/src/stores/editors/CubeNodeDraftRegistry.ts +27 -2
- package/src/stores/editors/CubePivotDraft.ts +355 -0
- package/src/stores/fixtures/CubeSalesDuckDbModel.ts +54 -0
- package/src/stores/fixtures/CubeTradesModel.ts +36 -1
- package/src/stores/source-picker/CubeDataProductTabState.ts +162 -35
- package/src/stores/source-picker/CubeDirectConnectionTabState.ts +246 -47
- package/src/stores/source-picker/CubeIngestTabState.ts +112 -38
- package/src/stores/source-picker/CubeInlineModelTabState.ts +514 -34
- package/src/stores/source-picker/CubeProjectTabState.ts +35 -3
- package/src/stores/source-picker/CubeServiceTabState.ts +288 -0
- package/src/stores/source-picker/CubeSourcePickerTab.ts +31 -2
- package/tsconfig.json +50 -0
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
* How a group row shows each column of the run that isn't a level (PLAN
|
|
19
|
+
* §11.10): a function its type offers, or nothing; the default (a number's
|
|
20
|
+
* Sum, nothing for any other column) is marked
|
|
21
|
+
*/
|
|
22
|
+
export declare const CubeDrilldownSettingsDialog: ((props: {
|
|
23
|
+
editorState: CubeEditorState;
|
|
24
|
+
}) => import("react/jsx-runtime").JSX.Element | null) & {
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* The drill-down above the grid in server-side mode (PLAN §11.10): its
|
|
29
|
+
* levels, outermost first, each removable; what it can't use, and why; the
|
|
30
|
+
* group rows' settings; and Clear. Shown while the cube has a drill-down.
|
|
31
|
+
*/
|
|
32
|
+
export declare const CubeDrilldownBar: ((props: {
|
|
33
|
+
editorState: CubeEditorState;
|
|
34
|
+
}) => import("react/jsx-runtime").JSX.Element | null) & {
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=CubeDrilldownBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeDrilldownBar.d.ts","sourceRoot":"","sources":["../../../src/components/grid/CubeDrilldownBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAqBH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvE;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,WAC9B;IAAE,WAAW,EAAE,eAAe,CAAA;CAAE;;CAuFzC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,WACnB;IAAE,WAAW,EAAE,eAAe,CAAA;CAAE;;CA4EzC,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
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 { Dialog, Modal, ModalBody, ModalFooter, ModalFooterButton, ModalHeader, TimesIcon, } from '@finos/legend-art';
|
|
18
|
+
import { foldColumnName, getAggregationDisplayName, getDefaultDrilldownAggregation, getDrilldownAggregations, } from '@finos/legend-cube';
|
|
19
|
+
import { observer } from 'mobx-react-lite';
|
|
20
|
+
import { READ_ONLY_CUBE_TITLE } from '../../__lib__/LegendCubeLabels.js';
|
|
21
|
+
import { LEGEND_CUBE_TEST_ID } from '../../__lib__/LegendCubeTesting.js';
|
|
22
|
+
import { CubeButton } from '../CubeButton.js';
|
|
23
|
+
/** The value of the setting that leaves a column empty on group rows */
|
|
24
|
+
const NO_AGGREGATION = '';
|
|
25
|
+
/**
|
|
26
|
+
* How a group row shows each column of the run that isn't a level (PLAN
|
|
27
|
+
* §11.10): a function its type offers, or nothing; the default (a number's
|
|
28
|
+
* Sum, nothing for any other column) is marked
|
|
29
|
+
*/
|
|
30
|
+
export const CubeDrilldownSettingsDialog = observer((props) => {
|
|
31
|
+
const { editorState } = props;
|
|
32
|
+
const { grid } = editorState;
|
|
33
|
+
const { result } = editorState.execution;
|
|
34
|
+
const drilldown = grid.drilldown;
|
|
35
|
+
const darkMode = !editorState.host.applicationStore.layoutService
|
|
36
|
+
.TEMPORARY__isLightColorThemeEnabled;
|
|
37
|
+
if (!result || !drilldown) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
const levels = new Set(drilldown.columns.map(foldColumnName));
|
|
41
|
+
const label = (fn, isDefault) => `${fn === null ? 'Nothing' : getAggregationDisplayName(fn)}${isDefault ? ' (default)' : ''}`;
|
|
42
|
+
return (_jsx(Dialog, { open: grid.isSettingsShown, onClose: () => grid.closeSettings(), children: _jsxs(Modal, { darkMode: darkMode, className: "w-[520px] max-w-full", children: [_jsx(ModalHeader, { children: _jsx("div", { className: "modal__title", children: "Group rows" }) }), _jsxs(ModalBody, { children: [_jsx("p", { className: "mb-2 text-base text-[var(--color-text-secondary)]", children: `What each group row shows in the columns the results don't drill down by.` }), _jsx("div", { className: "grid max-h-[50vh] grid-cols-[1fr_auto] items-center gap-x-3 gap-y-1 overflow-auto", "data-testid": LEGEND_CUBE_TEST_ID.DRILLDOWN_SETTINGS, children: result.schema.columns
|
|
43
|
+
.filter(({ name }) => !levels.has(foldColumnName(name)))
|
|
44
|
+
.map(({ name, type }) => {
|
|
45
|
+
const fallback = getDefaultDrilldownAggregation(type);
|
|
46
|
+
const current = drilldown.aggregationOf(name);
|
|
47
|
+
return [
|
|
48
|
+
_jsx("label", { htmlFor: `cube-drilldown-${name}`, className: "truncate text-base", title: `${name} (${type.displayName})`, children: name }, `${name}:label`),
|
|
49
|
+
_jsxs("select", { id: `cube-drilldown-${name}`, "aria-label": `Group rows' ${name}`, className: "h-6 rounded-sm border border-[var(--color-border-default)] bg-[var(--color-bg-input)] px-1 text-base text-[var(--color-text-primary)]", value: current ?? NO_AGGREGATION, disabled: editorState.readOnly, title: editorState.readOnly ? READ_ONLY_CUBE_TITLE : undefined, onChange: (event) => grid.setAggregation(name, event.target.value === NO_AGGREGATION
|
|
50
|
+
? null
|
|
51
|
+
: event.target.value), children: [_jsx("option", { value: NO_AGGREGATION, children: label(null, fallback === null) }), getDrilldownAggregations(type).map((fn) => (_jsx("option", { value: fn, children: label(fn, fallback === fn) }, fn)))] }, `${name}:select`),
|
|
52
|
+
];
|
|
53
|
+
}) })] }), _jsx(ModalFooter, { children: _jsx(ModalFooterButton, { darkMode: darkMode, formatText: false, type: "secondary", text: "Close", onClick: () => grid.closeSettings() }) })] }) }));
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* The drill-down above the grid in server-side mode (PLAN §11.10): its
|
|
57
|
+
* levels, outermost first, each removable; what it can't use, and why; the
|
|
58
|
+
* group rows' settings; and Clear. Shown while the cube has a drill-down.
|
|
59
|
+
*/
|
|
60
|
+
export const CubeDrilldownBar = observer((props) => {
|
|
61
|
+
const { editorState } = props;
|
|
62
|
+
const { grid } = editorState;
|
|
63
|
+
const saved = editorState.document.meta.drilldown;
|
|
64
|
+
const drilldown = grid.drilldown;
|
|
65
|
+
if (!saved ||
|
|
66
|
+
!drilldown ||
|
|
67
|
+
(!saved.columns.length && !drilldown.problems.length)) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
const { readOnly } = editorState;
|
|
71
|
+
return (_jsxs("div", { className: "flex min-h-8 shrink-0 flex-wrap items-center gap-2 border-b border-[var(--color-border-default)] px-2 py-1 text-base", "data-testid": LEGEND_CUBE_TEST_ID.DRILLDOWN_BAR, children: [_jsx("span", { className: "text-[var(--color-text-secondary)]", children: "Drill down by" }), drilldown.columns.map((column, index) => (_jsxs("span", { className: "flex items-center gap-1", children: [index > 0 && (_jsx("span", { className: "text-[var(--color-text-muted)]", children: "\u203A" })), _jsxs("span", { className: "flex items-center gap-1 rounded-sm border border-[var(--color-border-default)] bg-[var(--color-bg-elevated)] px-1", children: [column, _jsx("button", { type: "button", className: "text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] disabled:opacity-50", "aria-label": `Stop drilling down by ${column}`, title: readOnly
|
|
72
|
+
? READ_ONLY_CUBE_TITLE
|
|
73
|
+
: `Stop drilling down by ${column}`, disabled: readOnly, onClick: () => grid.removeLevel(saved.columns.findIndex((level) => foldColumnName(level) === foldColumnName(column))), children: _jsx(TimesIcon, {}) })] })] }, column))), drilldown.problems.length > 0 && (_jsx("span", { className: "text-[var(--color-status-warn)]", role: "status", title: drilldown.problems.join('\n'), children: drilldown.problems.length === 1
|
|
74
|
+
? drilldown.problems[0]
|
|
75
|
+
: `${drilldown.problems.length} drill-down settings can't be used here.` })), _jsx("span", { className: "flex-1" }), _jsx(CubeButton, { onClick: () => grid.openSettings(), children: "Group rows\u2026" }), _jsx(CubeButton, { disabled: readOnly, title: readOnly ? READ_ONLY_CUBE_TITLE : 'Stop drilling down', onClick: () => grid.clearDrilldown(), children: "Clear" }), _jsx(CubeDrilldownSettingsDialog, { editorState: editorState })] }));
|
|
76
|
+
});
|
|
77
|
+
//# sourceMappingURL=CubeDrilldownBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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AAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,YAEnC,SAAS,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;oBAC9B,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;oBACvB,CAAC,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,MAAM,0CAA0C,GACrE,CACR,EACD,eAAM,SAAS,EAAC,QAAQ,GAAG,EAC3B,KAAC,UAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,iCAA0B,EACxE,KAAC,UAAU,IACT,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,oBAAoB,EAC7D,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,sBAGzB,EACb,KAAC,2BAA2B,IAAC,WAAW,EAAE,WAAW,GAAI,IACrD,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeGridRegion.d.ts","sourceRoot":"","sources":["../../../src/components/grid/CubeGridRegion.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"CubeGridRegion.d.ts","sourceRoot":"","sources":["../../../src/components/grid/CubeGridRegion.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAqBH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAuVvE,uFAAuF;AACvF,eAAO,MAAM,cAAc,WACjB;IAAE,WAAW,EAAE,eAAe,CAAA;CAAE;;CAgDzC,CAAC"}
|
|
@@ -19,11 +19,18 @@ import { observer } from 'mobx-react-lite';
|
|
|
19
19
|
import { useState } from 'react';
|
|
20
20
|
import { EXECUTE_SHORTCUT_LABEL } from '../../__lib__/LegendCubeCommand.js';
|
|
21
21
|
import { getCubeWarehouseErrorHint } from '../../__lib__/LegendCubeDataProductLabels.js';
|
|
22
|
-
import { CUBE_PENDING_LABEL, formatDisabledReasons, getRowLimitError, getTruncationMessage, ROW_LIMIT_WARNING_THRESHOLD, } from '../../__lib__/LegendCubeLabels.js';
|
|
22
|
+
import { CUBE_PENDING_LABEL, formatDisabledReasons, getLevelTruncationMessage, getRowLimitError, getTruncationMessage, ROW_LIMIT_WARNING_THRESHOLD, } from '../../__lib__/LegendCubeLabels.js';
|
|
23
23
|
import { LEGEND_CUBE_TEST_ID } from '../../__lib__/LegendCubeTesting.js';
|
|
24
24
|
import { CubeDataProductRunErrorKind, } from '../../stores/CubeDataProductRuntimeState.js';
|
|
25
25
|
import { CubeButton } from '../CubeButton.js';
|
|
26
|
+
import { CubeGridMode } from '../../stores/CubeGridState.js';
|
|
27
|
+
import { parseWholeNumberText } from '../../stores/editors/CubeIntegerText.js';
|
|
26
28
|
import { CubeResultGrid } from './CubeResultGrid.js';
|
|
29
|
+
import { CubeColumnFormatDialog } from './CubeColumnFormatDialog.js';
|
|
30
|
+
import { CubeDrilldownBar } from './CubeDrilldownBar.js';
|
|
31
|
+
import { CubeSqlDialog } from './CubeSqlDialog.js';
|
|
32
|
+
import { CubeRunStatsPanel } from './CubeRunStatsPanel.js';
|
|
33
|
+
import { CubeServerSideGrid } from './CubeServerSideGrid.js';
|
|
27
34
|
import { formatDuration } from './CubeGridValues.js';
|
|
28
35
|
/** The first line of an error is shown, at most this long; the rest is under Details */
|
|
29
36
|
const MAX_ERROR_LINE_LENGTH = 500;
|
|
@@ -32,10 +39,11 @@ const CubeRowLimitInput = observer((props) => {
|
|
|
32
39
|
const [draft, setDraft] = useState(String(editorState.rowLimit));
|
|
33
40
|
const [error, setError] = useState();
|
|
34
41
|
const commit = () => {
|
|
35
|
-
const
|
|
42
|
+
const value = parseWholeNumberText(draft);
|
|
43
|
+
const problem = getRowLimitError(value);
|
|
36
44
|
setError(problem);
|
|
37
|
-
if (!problem) {
|
|
38
|
-
editorState.setRowLimit(
|
|
45
|
+
if (!problem && value !== undefined) {
|
|
46
|
+
editorState.setRowLimit(value);
|
|
39
47
|
}
|
|
40
48
|
};
|
|
41
49
|
return (_jsxs("div", { className: "flex items-center gap-1", children: [_jsxs("label", { className: "flex items-center gap-1 text-base", children: ["Rows", _jsx("input", { className: "h-6 w-20 rounded-sm border border-[var(--color-border-default)] bg-[var(--color-bg-input)] px-1 text-right text-base text-[var(--color-text-primary)]", "aria-label": "Row limit", "aria-invalid": error !== undefined, value: draft, onChange: (event) => setDraft(event.target.value), onBlur: commit, onKeyDown: (event) => {
|
|
@@ -45,8 +53,16 @@ const CubeRowLimitInput = observer((props) => {
|
|
|
45
53
|
} })] }), error !== undefined && (_jsx("span", { className: "text-sm text-[var(--color-status-error)]", role: "alert", children: error })), error === undefined &&
|
|
46
54
|
editorState.rowLimit > ROW_LIMIT_WARNING_THRESHOLD && (_jsx("span", { className: "text-sm text-[var(--color-status-warn)]", children: "A large row limit can slow the page down." }))] }));
|
|
47
55
|
});
|
|
56
|
+
/** Server-side or local: how the grid shows the run (spec §12.1, PLAN §11.10) */
|
|
57
|
+
const CubeGridModeToggle = observer((props) => {
|
|
58
|
+
const { grid } = props.editorState;
|
|
59
|
+
const option = (mode, label, title) => (_jsx("button", { type: "button", className: `h-6 px-2 text-base ${grid.mode === mode
|
|
60
|
+
? 'bg-[var(--color-bg-selected)] font-medium text-[var(--color-text-primary)]'
|
|
61
|
+
: 'text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-hover)]'}`, "aria-pressed": grid.mode === mode, title: title, onClick: () => grid.setMode(mode), children: label }));
|
|
62
|
+
return (_jsxs("div", { className: "flex overflow-hidden rounded-sm border border-[var(--color-border-default)]", role: "group", "aria-label": "Grid mode", children: [option(CubeGridMode.SERVER_SIDE, 'Server-side', 'Each sort and drill-down level runs on the engine, over every row of the query'), option(CubeGridMode.LOCAL, 'Local', "The run's rows, grouped, pivoted and filtered in the browser")] }));
|
|
63
|
+
});
|
|
48
64
|
const CubeGridToolbar = observer((props) => {
|
|
49
|
-
const { editorState,
|
|
65
|
+
const { editorState, onShowSql, showRuns, onToggleRuns } = props;
|
|
50
66
|
const { execution } = editorState;
|
|
51
67
|
const { result } = execution;
|
|
52
68
|
const disabledReasons = execution.disabledReasons;
|
|
@@ -54,22 +70,8 @@ const CubeGridToolbar = observer((props) => {
|
|
|
54
70
|
? `${formatDisabledReasons(disabledReasons)}\n(${EXECUTE_SHORTCUT_LABEL})`
|
|
55
71
|
: `Run the query up to the selected node (${EXECUTE_SHORTCUT_LABEL})`,
|
|
56
72
|
// the node editor's edits apply first, so they run (spec §17.5)
|
|
57
|
-
onClick: () => editorState.executeEdited(), children: "Execute" })), _jsx(CubeRowLimitInput, { editorState: editorState }), execution.isRunning && (_jsx("span", { className: "text-base text-[var(--color-text-secondary)]", children: CUBE_PENDING_LABEL.EXECUTING_QUERY })), execution.isStale && (_jsx("span", { className: "rounded-sm bg-[var(--color-status-warn-bg)] px-1 text-base text-[var(--color-status-warn)]", title: "The query, the warehouse or the row limit changed since this run", children: "Stale: execute again to refresh" })), result && !execution.isRunning && (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-base text-[var(--color-text-secondary)]", children: `${result.rows.length.toLocaleString('en-US')} row${result.rows.length === 1 ? '' : 's'} in ${formatDuration(result.durationMs)}` }), result.limited && (_jsx("span", { className: "text-base text-[var(--color-status-warn)]", children: getTruncationMessage(result.rowLimit) })),
|
|
58
|
-
});
|
|
59
|
-
/** The SQL the run's database ran, with Copy */
|
|
60
|
-
const CubeSqlPanel = observer((props) => {
|
|
61
|
-
const { editorState } = props;
|
|
62
|
-
const { applicationStore } = editorState.host;
|
|
63
|
-
const sql = editorState.execution.result?.sql ?? [];
|
|
64
|
-
if (!sql.length) {
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
const copySql = () => {
|
|
68
|
-
applicationStore.clipboardService
|
|
69
|
-
.copyTextToClipboard(sql.join('\n\n'))
|
|
70
|
-
.catch(applicationStore.alertUnhandledError);
|
|
71
|
-
};
|
|
72
|
-
return (_jsxs("div", { className: "flex max-h-40 shrink-0 gap-2 overflow-auto border-b border-[var(--color-border-default)] p-2", "data-testid": LEGEND_CUBE_TEST_ID.SQL_PANEL, children: [_jsx("div", { className: "min-w-0 flex-1", children: sql.map((statement, index) => (_jsx("pre", { className: "whitespace-pre-wrap font-mono text-sm", children: statement }, index))) }), _jsx(CubeButton, { onClick: copySql, children: "Copy SQL" })] }));
|
|
73
|
+
onClick: () => editorState.executeEdited(), children: "Execute" })), _jsx(CubeRowLimitInput, { editorState: editorState }), _jsx(CubeGridModeToggle, { editorState: editorState }), execution.isRunning && (_jsx("span", { className: "text-base text-[var(--color-text-secondary)]", children: CUBE_PENDING_LABEL.EXECUTING_QUERY })), execution.isStale && (_jsx("span", { className: "rounded-sm bg-[var(--color-status-warn-bg)] px-1 text-base text-[var(--color-status-warn)]", title: "The query, the warehouse or the row limit changed since this run", children: "Stale: execute again to refresh" })), result && !execution.isRunning && (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-base text-[var(--color-text-secondary)]", children: `${result.rows.length.toLocaleString('en-US')} row${result.rows.length === 1 ? '' : 's'} in ${formatDuration(result.durationMs)}` }), result.limited && (_jsx("span", { className: "text-base text-[var(--color-status-warn)]", children: getTruncationMessage(result.rowLimit) })), editorState.grid.isServerSide &&
|
|
74
|
+
editorState.grid.hasLimitedLevel && (_jsx("span", { className: "text-base text-[var(--color-status-warn)]", children: getLevelTruncationMessage(result.rowLimit) })), editorState.export.isExporting && (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-base text-[var(--color-text-secondary)]", children: CUBE_PENDING_LABEL.EXPORTING_CSV }), _jsx(CubeButton, { title: "Stop the export", onClick: () => editorState.export.stop(), children: "Stop export" })] })), editorState.grid.isServerSide && editorState.grid.fetching > 0 && (_jsx("span", { className: "text-base text-[var(--color-text-secondary)]", children: CUBE_PENDING_LABEL.FETCHING_ROWS })), result.sql.length > 0 && (_jsx(CubeButton, { "aria-haspopup": "dialog", onClick: onShowSql, children: "Show SQL" }))] })), _jsx("span", { className: "flex-1" }), _jsx(CubeButton, { "aria-expanded": showRuns, title: "The latest runs, fetches and exports, with their SQL", onClick: onToggleRuns, children: `Runs (${editorState.runStats.entries.length})` })] }));
|
|
73
75
|
});
|
|
74
76
|
/**
|
|
75
77
|
* On a data product cube, what to do about a run refused for its warehouse,
|
|
@@ -84,22 +86,34 @@ const CubeDataProductRunErrorHelp = observer((props) => {
|
|
|
84
86
|
return links.length ? (_jsx("div", { className: "mt-1 flex flex-wrap gap-x-3", children: links.map((link) => (_jsx("a", { className: "text-[var(--color-accent)] underline", href: link.url, target: "_blank", rel: "noopener noreferrer", children: link.label }, link.key))) })) : null;
|
|
85
87
|
});
|
|
86
88
|
const CubeExecutionError = observer((props) => {
|
|
87
|
-
const error = props
|
|
88
|
-
if (!error) {
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
89
|
+
const { error } = props;
|
|
91
90
|
const isCut = error.firstLine.length > MAX_ERROR_LINE_LENGTH;
|
|
92
91
|
const firstLine = isCut
|
|
93
92
|
? `${error.firstLine.slice(0, MAX_ERROR_LINE_LENGTH)}…`
|
|
94
93
|
: error.firstLine;
|
|
95
94
|
return (_jsxs("div", { className: "m-2 rounded-sm border border-[var(--color-status-error)] bg-[var(--color-status-error-bg)] p-2 text-base", "data-testid": LEGEND_CUBE_TEST_ID.EXECUTION_ERROR, role: "alert", children: [_jsx("div", { className: "font-medium text-[var(--color-status-error)]", title: isCut ? error.firstLine : undefined, children: firstLine }), (isCut || error.detail !== error.firstLine) && (_jsxs("details", { className: "mt-1", children: [_jsx("summary", { className: "cursor-pointer text-[var(--color-text-secondary)]", children: "Details" }), _jsx("pre", { className: "mt-1 max-h-60 overflow-auto whitespace-pre-wrap text-sm", children: error.detail })] })), _jsx(CubeDataProductRunErrorHelp, { runtime: props.editorState.dataProductRuntime })] }));
|
|
96
95
|
});
|
|
96
|
+
/**
|
|
97
|
+
* The run's rows as the grid's mode shows them: in server-side mode built
|
|
98
|
+
* anew for each run and each drill-down, with a fetch's error above it
|
|
99
|
+
*/
|
|
100
|
+
const CubeRunGrid = observer((props) => {
|
|
101
|
+
const { editorState, result, darkMode } = props;
|
|
102
|
+
const { grid } = editorState;
|
|
103
|
+
const exportError = editorState.export.error && (_jsx(CubeExecutionError, { editorState: editorState, error: editorState.export.error }));
|
|
104
|
+
if (!grid.isServerSide) {
|
|
105
|
+
return (_jsxs("div", { className: "flex h-full flex-col", children: [exportError, _jsx("div", { className: "min-h-0 flex-1", children: _jsx(CubeResultGrid, { editorState: editorState, result: result, presentation: editorState.document.meta.presentation, darkMode: darkMode }, result.id) })] }));
|
|
106
|
+
}
|
|
107
|
+
const drilldown = editorState.document.meta.drilldown;
|
|
108
|
+
return (_jsxs("div", { className: "flex h-full flex-col", children: [_jsx(CubeDrilldownBar, { editorState: editorState }), exportError, grid.fetchError && (_jsx(CubeExecutionError, { editorState: editorState, error: grid.fetchError })), _jsx("div", { className: "min-h-0 flex-1", children: _jsx(CubeServerSideGrid, { editorState: editorState, result: result, levels: grid.drilldown?.columns ?? [], presentation: editorState.document.meta.presentation, darkMode: darkMode }, `${result.id}:${JSON.stringify(drilldown ?? null)}`) })] }));
|
|
109
|
+
});
|
|
97
110
|
/** The results: Execute, the row limit and the run's stats above the grid (PLAN §9) */
|
|
98
111
|
export const CubeGridRegion = observer((props) => {
|
|
99
112
|
const { editorState } = props;
|
|
100
113
|
const { execution, host } = editorState;
|
|
101
114
|
const [showSql, setShowSql] = useState(false);
|
|
115
|
+
const [showRuns, setShowRuns] = useState(false);
|
|
102
116
|
const darkMode = !host.applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled;
|
|
103
|
-
return (_jsxs("div", { className: "flex h-full flex-col bg-[var(--color-bg-panel)]", "data-testid": LEGEND_CUBE_TEST_ID.GRID_REGION, children: [_jsx(PanelLoadingIndicator, { isLoading: execution.isRunning }), _jsx(CubeGridToolbar, { editorState: editorState,
|
|
117
|
+
return (_jsxs("div", { className: "flex h-full flex-col bg-[var(--color-bg-panel)]", "data-testid": LEGEND_CUBE_TEST_ID.GRID_REGION, children: [_jsx(PanelLoadingIndicator, { isLoading: execution.isRunning }), _jsx(CubeGridToolbar, { editorState: editorState, onShowSql: () => setShowSql(true), showRuns: showRuns, onToggleRuns: () => setShowRuns(!showRuns) }), showRuns && _jsx(CubeRunStatsPanel, { editorState: editorState }), _jsx(CubeColumnFormatDialog, { editorState: editorState }), showSql && !execution.isRunning && (_jsx(CubeSqlDialog, { editorState: editorState, onClose: () => setShowSql(false) })), _jsx("div", { className: "min-h-0 flex-1", children: execution.error ? (_jsx(CubeExecutionError, { editorState: editorState, error: execution.error })) : execution.result ? (_jsx(CubeRunGrid, { editorState: editorState, result: execution.result, darkMode: darkMode })) : (_jsx("div", { className: "flex h-full items-center justify-center text-base text-[var(--color-text-secondary)]", children: "Execute the query to see its rows." })) })] }));
|
|
104
118
|
});
|
|
105
119
|
//# sourceMappingURL=CubeGridRegion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeGridRegion.js","sourceRoot":"","sources":["../../../src/components/grid/CubeGridRegion.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EACL,2BAA2B,GAE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,EAAE,WAAW,GAAI,EACnD,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,IAAI,CAClC,KAAC,aAAa,IACZ,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAChC,CACH,EACD,cAAK,SAAS,EAAC,gBAAgB,YAC5B,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CACjB,KAAC,kBAAkB,IACjB,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,SAAS,CAAC,KAAK,GACtB,CACH,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CACrB,KAAC,WAAW,IACV,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,SAAS,CAAC,MAAM,EACxB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,sFAAsF,mDAE/F,CACP,GACG,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { TypeFamily } from '@finos/legend-cube';
|
|
16
|
+
import { type ColumnFormat, type CubeType, TypeFamily } from '@finos/legend-cube';
|
|
17
17
|
import type { CubeResultValue } from '../../graph-manager/CubeEngine.js';
|
|
18
18
|
export declare const isNumericFamily: (family: TypeFamily) => boolean;
|
|
19
19
|
/** Compares two numbers written as text, digit for digit: `'9' < '10'`, `'9007199254740993' > '9007199254740992'` */
|
|
@@ -38,4 +38,34 @@ export declare const groupThousands: (text: string) => string;
|
|
|
38
38
|
* value itself is unchanged, so copying a cell copies its exact value.
|
|
39
39
|
*/
|
|
40
40
|
export declare const formatCellValue: (value: Exclude<CubeResultValue, null>, family: TypeFamily) => string;
|
|
41
|
+
/**
|
|
42
|
+
* The digits after the point a decimal column keeps, e.g. 4 for
|
|
43
|
+
* `Numeric(14,4)`; none for another type, whose group rows round to
|
|
44
|
+
* `CUBE_GRID_FLOAT_DECIMAL_PLACES` (an Average of integers keeps 2 places)
|
|
45
|
+
*/
|
|
46
|
+
export declare const getTypeScale: (type: CubeType) => number | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* How a group row shows a number it aggregates (the review of the demo,
|
|
49
|
+
* 2026-10-13): its thousands grouped, an integer's too, since a sum or a
|
|
50
|
+
* count is a quantity, not an id; a fraction rounded to the column's scale,
|
|
51
|
+
* or to `CUBE_GRID_FLOAT_DECIMAL_PLACES` places for a column without one,
|
|
52
|
+
* so an Average doesn't show every digit. A value that isn't a number, or a
|
|
53
|
+
* column that isn't numeric, shows as it is. Copying keeps the exact value.
|
|
54
|
+
*/
|
|
55
|
+
export declare const formatGroupRowValue: (value: Exclude<CubeResultValue, null>, family: TypeFamily, scale?: number | undefined) => string;
|
|
56
|
+
/** The ISO 4217 codes the browser formats (PLAN §11.10: codes, not symbols, §21) */
|
|
57
|
+
export declare const getCubeCurrencyCodes: () => readonly string[];
|
|
58
|
+
/** Why a format can't be used, if it can't: a style or a currency this browser doesn't know */
|
|
59
|
+
export declare const getColumnFormatProblem: (format: ColumnFormat) => string | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* A number formatted as the column's format says (spec §13.1, PLAN §11.10),
|
|
62
|
+
* from its exact text, so no digit is lost (`Intl.NumberFormat` reads a
|
|
63
|
+
* decimal string exactly); `undefined` for a value that isn't a number or a
|
|
64
|
+
* format that can't be used (`getColumnFormatProblem`), which shows as if
|
|
65
|
+
* none were set
|
|
66
|
+
*/
|
|
67
|
+
export declare const formatColumnValue: (value: Exclude<CubeResultValue, null>, format: ColumnFormat) => {
|
|
68
|
+
readonly text: string;
|
|
69
|
+
readonly negative: boolean;
|
|
70
|
+
} | undefined;
|
|
41
71
|
//# sourceMappingURL=CubeGridValues.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeGridValues.d.ts","sourceRoot":"","sources":["../../../src/components/grid/CubeGridValues.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"CubeGridValues.d.ts","sourceRoot":"","sources":["../../../src/components/grid/CubeGridValues.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,QAAQ,EAGb,UAAU,EACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAazE,eAAO,MAAM,eAAe,GAAI,QAAQ,UAAU,KAAG,OACvB,CAAC;AA6C/B,qHAAqH;AACrH,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,KAAG,MAY/D,CAAC;AAEF,6GAA6G;AAC7G,eAAO,MAAM,iBAAiB,GAC5B,MAAM,eAAe,GAAG,SAAS,EACjC,OAAO,eAAe,GAAG,SAAS,KACjC,MAuBF,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,KAAG,MAGT,CAAC;AAE5C,yDAAyD;AACzD,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAIhD;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,KAAG,MAO7C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,EACrC,QAAQ,UAAU,KACjB,MAwBF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,MAAM,QAAQ,KAAG,MAAM,GAAG,SAKxC,CAAC;AAEhB;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAC9B,OAAO,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,EACrC,QAAQ,UAAU,EAClB,QAAQ,MAAM,GAAG,SAAS,KACzB,MAoBF,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,oBAAoB,QAAO,SAAS,MAAM,EAOtD,CAAC;AAEF,+FAA+F;AAC/F,eAAO,MAAM,sBAAsB,GACjC,QAAQ,YAAY,KACnB,MAAM,GAAG,SAWX,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,OAAO,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,EACrC,QAAQ,YAAY,KACnB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,GAAG,SAsD1D,CAAC"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { TypeFamily } from '@finos/legend-cube';
|
|
16
|
+
import { ColumnFormatStyle, isColumnFormatStyle, PrimitiveType, TypeFamily, } from '@finos/legend-cube';
|
|
17
17
|
// How the grid shows and sorts values (PLAN §9, Settled before M1.8).
|
|
18
18
|
// Integer and Decimal values arrive as their exact text and are never turned
|
|
19
19
|
// into JS numbers, which would lose digits.
|
|
@@ -136,4 +136,111 @@ export const formatCellValue = (value, family) => {
|
|
|
136
136
|
return text;
|
|
137
137
|
}
|
|
138
138
|
};
|
|
139
|
+
/**
|
|
140
|
+
* The digits after the point a decimal column keeps, e.g. 4 for
|
|
141
|
+
* `Numeric(14,4)`; none for another type, whose group rows round to
|
|
142
|
+
* `CUBE_GRID_FLOAT_DECIMAL_PLACES` (an Average of integers keeps 2 places)
|
|
143
|
+
*/
|
|
144
|
+
export const getTypeScale = (type) => type instanceof PrimitiveType &&
|
|
145
|
+
type.family === TypeFamily.DECIMAL &&
|
|
146
|
+
type.params.length >= 2
|
|
147
|
+
? type.params[1]
|
|
148
|
+
: undefined;
|
|
149
|
+
/**
|
|
150
|
+
* How a group row shows a number it aggregates (the review of the demo,
|
|
151
|
+
* 2026-10-13): its thousands grouped, an integer's too, since a sum or a
|
|
152
|
+
* count is a quantity, not an id; a fraction rounded to the column's scale,
|
|
153
|
+
* or to `CUBE_GRID_FLOAT_DECIMAL_PLACES` places for a column without one,
|
|
154
|
+
* so an Average doesn't show every digit. A value that isn't a number, or a
|
|
155
|
+
* column that isn't numeric, shows as it is. Copying keeps the exact value.
|
|
156
|
+
*/
|
|
157
|
+
export const formatGroupRowValue = (value, family, scale) => {
|
|
158
|
+
const text = String(value);
|
|
159
|
+
if (!isNumericFamily(family) || typeof value === 'boolean') {
|
|
160
|
+
return text;
|
|
161
|
+
}
|
|
162
|
+
const parts = PLAIN_NUMBER_TEXT.exec(text.trim())?.groups;
|
|
163
|
+
if (!parts) {
|
|
164
|
+
return text;
|
|
165
|
+
}
|
|
166
|
+
const places = scale ?? CUBE_GRID_FLOAT_DECIMAL_PLACES;
|
|
167
|
+
// the fraction's digits, the point left out
|
|
168
|
+
const fraction = (parts.fraction ?? '').slice(1);
|
|
169
|
+
if (fraction.length <= places) {
|
|
170
|
+
return groupThousands(text.trim());
|
|
171
|
+
}
|
|
172
|
+
const rounded = Number(text).toFixed(places);
|
|
173
|
+
// a value that rounds to zero shows no sign
|
|
174
|
+
return groupThousands(Number(rounded) === 0 ? rounded.replace(/^-/u, '') : rounded);
|
|
175
|
+
};
|
|
176
|
+
/** The ISO 4217 codes the browser formats (PLAN §11.10: codes, not symbols, §21) */
|
|
177
|
+
export const getCubeCurrencyCodes = () => {
|
|
178
|
+
const supportedValuesOf = Intl.supportedValuesOf;
|
|
179
|
+
return supportedValuesOf?.('currency') ?? ['EUR', 'GBP', 'JPY', 'USD'];
|
|
180
|
+
};
|
|
181
|
+
/** Why a format can't be used, if it can't: a style or a currency this browser doesn't know */
|
|
182
|
+
export const getColumnFormatProblem = (format) => {
|
|
183
|
+
if (!isColumnFormatStyle(format.style)) {
|
|
184
|
+
return `The format "${format.style}" is unknown, so the column shows its values as they are.`;
|
|
185
|
+
}
|
|
186
|
+
if (format.style === ColumnFormatStyle.CURRENCY &&
|
|
187
|
+
!getCubeCurrencyCodes().includes(format.currency ?? '')) {
|
|
188
|
+
return `The currency "${format.currency ?? ''}" is unknown, so the column shows its values as they are.`;
|
|
189
|
+
}
|
|
190
|
+
return undefined;
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* A number formatted as the column's format says (spec §13.1, PLAN §11.10),
|
|
194
|
+
* from its exact text, so no digit is lost (`Intl.NumberFormat` reads a
|
|
195
|
+
* decimal string exactly); `undefined` for a value that isn't a number or a
|
|
196
|
+
* format that can't be used (`getColumnFormatProblem`), which shows as if
|
|
197
|
+
* none were set
|
|
198
|
+
*/
|
|
199
|
+
export const formatColumnValue = (value, format) => {
|
|
200
|
+
const text = String(value).trim();
|
|
201
|
+
const parsed = typeof value === 'boolean' ? undefined : parseNumberText(text);
|
|
202
|
+
if (!parsed || getColumnFormatProblem(format) !== undefined) {
|
|
203
|
+
return undefined;
|
|
204
|
+
}
|
|
205
|
+
// with no places set, the value's own: '20.20' keeps its zero (a
|
|
206
|
+
// currency at least its usual cents), as the grid shows it unformatted
|
|
207
|
+
const ownPlaces = Math.min(20, /e/iu.test(text)
|
|
208
|
+
? Math.max(0, parsed.digits.length - parsed.point)
|
|
209
|
+
: (text.split('.')[1]?.length ?? 0));
|
|
210
|
+
const places = format.decimalPlaces;
|
|
211
|
+
const formatter = new Intl.NumberFormat('en-US', {
|
|
212
|
+
style: format.style === ColumnFormatStyle.CURRENCY
|
|
213
|
+
? 'currency'
|
|
214
|
+
: format.style === ColumnFormatStyle.PERCENT
|
|
215
|
+
? 'percent'
|
|
216
|
+
: 'decimal',
|
|
217
|
+
...(format.style === ColumnFormatStyle.CURRENCY
|
|
218
|
+
? { currency: format.currency }
|
|
219
|
+
: {}),
|
|
220
|
+
useGrouping: format.grouping,
|
|
221
|
+
// a negative that rounds to zero shows as zero, with no sign
|
|
222
|
+
signDisplay: 'negative',
|
|
223
|
+
...(places !== undefined
|
|
224
|
+
? { minimumFractionDigits: places, maximumFractionDigits: places }
|
|
225
|
+
: format.style === ColumnFormatStyle.PERCENT
|
|
226
|
+
? { minimumFractionDigits: 0, maximumFractionDigits: 20 }
|
|
227
|
+
: {
|
|
228
|
+
minimumFractionDigits: Math.max(ownPlaces, format.style === ColumnFormatStyle.CURRENCY
|
|
229
|
+
? (new Intl.NumberFormat('en-US', {
|
|
230
|
+
style: 'currency',
|
|
231
|
+
currency: format.currency,
|
|
232
|
+
}).resolvedOptions().minimumFractionDigits ?? 0)
|
|
233
|
+
: 0),
|
|
234
|
+
maximumFractionDigits: 20,
|
|
235
|
+
}),
|
|
236
|
+
});
|
|
237
|
+
// a decimal string keeps every digit, where a JS number would round
|
|
238
|
+
const shown = (number) => formatter.format(number);
|
|
239
|
+
const signed = shown(text);
|
|
240
|
+
// negative as shown: one that rounds to zero isn't
|
|
241
|
+
const negative = parsed.negative && signed.includes('-');
|
|
242
|
+
return format.parenthesesIfNegative && negative
|
|
243
|
+
? { text: `(${shown(text.replace(/^-/u, ''))})`, negative }
|
|
244
|
+
: { text: signed, negative };
|
|
245
|
+
};
|
|
139
246
|
//# sourceMappingURL=CubeGridValues.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeGridValues.js","sourceRoot":"","sources":["../../../src/components/grid/CubeGridValues.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"CubeGridValues.js","sourceRoot":"","sources":["../../../src/components/grid/CubeGridValues.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,iBAAiB,EAEjB,mBAAmB,EACnB,aAAa,EACb,UAAU,GACX,MAAM,oBAAoB,CAAC;AAG5B,sEAAsE;AACtE,6EAA6E;AAC7E,4CAA4C;AAE5C,MAAM,gBAAgB,GAA4B,IAAI,GAAG,CAAC;IACxD,UAAU,CAAC,OAAO;IAClB,UAAU,CAAC,KAAK;IAChB,UAAU,CAAC,OAAO;I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AM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3B,mDAAmD;IACnD,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IACzD,OAAO,MAAM,CAAC,qBAAqB,IAAI,QAAQ;QAC7C,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE;QAC3D,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AACjC,CAAC,CAAC"}
|
|
@@ -13,17 +13,79 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { type
|
|
16
|
+
import { type CheckedDrilldown, type ColumnFormat, type Presentation, type TypeFamily } from '@finos/legend-cube';
|
|
17
|
+
import { type DataGridCellRendererParams, type DataGridColumn, type DataGridColumnDefinition, type DataGridDefaultMenuItem, type DataGridGetContextMenuItemsParams, type DataGridIAggFuncParams, type DataGridMenuItemDef } from '@finos/legend-lego/data-grid';
|
|
17
18
|
import type { CubeResultValue } from '../../graph-manager/CubeEngine.js';
|
|
18
19
|
import type { CubeEditorState } from '../../stores/CubeEditorState.js';
|
|
19
20
|
import type { CubeExecutionResult } from '../../stores/CubeExecutionState.js';
|
|
21
|
+
import { type CubeGridRowData } from '../../stores/CubeGridState.js';
|
|
20
22
|
type CubeRow = readonly CubeResultValue[];
|
|
23
|
+
/** A row of either mode: a run's row in local mode, a level's row in server-side mode */
|
|
24
|
+
export type CubeAnyRow = CubeRow | CubeGridRowData;
|
|
21
25
|
/**
|
|
22
|
-
* The grid's context menu (spec §12.4): on a cell,
|
|
23
|
-
*
|
|
24
|
-
*
|
|
26
|
+
* The grid's context menu (spec §12.4, PLAN §11.10), curated: on a cell,
|
|
27
|
+
* 'Drilldown by' its column and the quick actions, then a separator; then,
|
|
28
|
+
* anywhere, sizing and resetting the columns, copying, and Cube's Export. Not
|
|
29
|
+
* ag-grid's cut, paste or client export, which would export the fetched rows
|
|
30
|
+
* only. Read when the menu opens, so it reflects the cube and the run as they
|
|
31
|
+
* are then.
|
|
25
32
|
*/
|
|
26
|
-
export declare const getCubeGridContextMenuItems: (editorState: CubeEditorState, params: DataGridGetContextMenuItemsParams<
|
|
33
|
+
export declare const getCubeGridContextMenuItems: <Row extends CubeAnyRow>(editorState: CubeEditorState, params: DataGridGetContextMenuItemsParams<Row>) => (DataGridDefaultMenuItem | DataGridMenuItemDef<Row>)[];
|
|
34
|
+
/**
|
|
35
|
+
* A cell: its value as the column's family shows it (`formatCellValue`), with
|
|
36
|
+
* the exact value on hover when the two differ; nothing for a group row's
|
|
37
|
+
* column with no aggregation (`undefined`)
|
|
38
|
+
*/
|
|
39
|
+
export declare const CubeCell: React.FC<DataGridCellRendererParams<CubeAnyRow, CubeResultValue | undefined> & {
|
|
40
|
+
family: TypeFamily;
|
|
41
|
+
/** The column's format (PLAN §11.10), on a number column that has one */
|
|
42
|
+
format?: ColumnFormat | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* A group row shows a count in this column, which is never formatted (a
|
|
45
|
+
* count is not money, spec §13.1), but where the column is the group's key
|
|
46
|
+
*/
|
|
47
|
+
countOnGroupRows?: boolean | undefined;
|
|
48
|
+
/** The column's name and the drill-down's levels, to tell a group row's key */
|
|
49
|
+
columnName?: string | undefined;
|
|
50
|
+
levels?: readonly string[] | undefined;
|
|
51
|
+
/** The digits after the point the column's type keeps, e.g. 4 for `Numeric(14,4)`; none for a type without */
|
|
52
|
+
scale?: number | undefined;
|
|
53
|
+
}>;
|
|
54
|
+
/**
|
|
55
|
+
* The grid's Excel styles: a number column's cells are numbers in the
|
|
56
|
+
* workbook, where ag-grid would write the exact text it holds as text
|
|
57
|
+
*/
|
|
58
|
+
export declare const CUBE_EXCEL_STYLES: {
|
|
59
|
+
id: string;
|
|
60
|
+
dataType: "Number";
|
|
61
|
+
}[];
|
|
62
|
+
/**
|
|
63
|
+
* The grid's columns: the run's, from Cube's own schema of the node that ran,
|
|
64
|
+
* by position, so any column name works, with the type in the header's
|
|
65
|
+
* tooltip; numbers right-aligned and sorted exactly as the engine wrote them
|
|
66
|
+
*/
|
|
67
|
+
export declare const buildCubeColumnDefs: <Row extends CubeAnyRow>(result: CubeExecutionResult, valueAt: (row: Row | undefined, position: number) => CubeResultValue | undefined, presentation?: Presentation, drilldown?: CheckedDrilldown | undefined) => DataGridColumnDefinition<Row, CubeResultValue | undefined>[];
|
|
68
|
+
/**
|
|
69
|
+
* Keeps a column's width when the user resizes it, by dragging or from the
|
|
70
|
+
* menu (PLAN §11.10): the cube saves it, with no undo step
|
|
71
|
+
*/
|
|
72
|
+
export declare const keepCubeColumnWidths: (editorState: CubeEditorState, result: CubeExecutionResult, event: {
|
|
73
|
+
readonly finished: boolean;
|
|
74
|
+
readonly source: string;
|
|
75
|
+
readonly columns?: readonly DataGridColumn[] | null | undefined;
|
|
76
|
+
}) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Local mode's totals over a group's values, read as JS numbers: the engine
|
|
79
|
+
* writes integers and decimals as exact text, which ag-grid's own would join
|
|
80
|
+
* as text; a total past a double's precision is rounded, as local mode works
|
|
81
|
+
* on the fetched rows in the browser
|
|
82
|
+
*/
|
|
83
|
+
export declare const LOCAL_AGGREGATIONS: {
|
|
84
|
+
sum: (params: DataGridIAggFuncParams) => number;
|
|
85
|
+
avg: (params: DataGridIAggFuncParams) => number | null;
|
|
86
|
+
min: (params: DataGridIAggFuncParams) => number | null;
|
|
87
|
+
max: (params: DataGridIAggFuncParams) => number | null;
|
|
88
|
+
};
|
|
27
89
|
/**
|
|
28
90
|
* The rows of a run (PLAN §9): columns from Cube's own schema of the capture
|
|
29
91
|
* node, by position, so any column name works. Numbers are right-aligned and
|
|
@@ -33,6 +95,7 @@ export declare const getCubeGridContextMenuItems: (editorState: CubeEditorState,
|
|
|
33
95
|
export declare const CubeResultGrid: import("react").MemoExoticComponent<(props: {
|
|
34
96
|
editorState: CubeEditorState;
|
|
35
97
|
result: CubeExecutionResult;
|
|
98
|
+
presentation: Presentation;
|
|
36
99
|
darkMode: boolean;
|
|
37
100
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
38
101
|
export {};
|