@finos/legend-cube-builder 0.0.4 → 0.0.6
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 +24 -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 +83 -5
- 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 +16 -2
- package/lib/__lib__/LegendCubeHelpText.js.map +1 -1
- package/lib/__lib__/LegendCubeLabels.d.ts +130 -9
- package/lib/__lib__/LegendCubeLabels.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeLabels.js +169 -17
- package/lib/__lib__/LegendCubeLabels.js.map +1 -1
- package/lib/__lib__/LegendCubeNavigation.d.ts +23 -0
- package/lib/__lib__/LegendCubeNavigation.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeNavigation.js +33 -0
- package/lib/__lib__/LegendCubeNavigation.js.map +1 -0
- 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 +10 -1
- package/lib/__lib__/LegendCubeTesting.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeTesting.js +9 -0
- package/lib/__lib__/LegendCubeTesting.js.map +1 -1
- package/lib/__lib__/LegendCubeTour.d.ts +62 -0
- package/lib/__lib__/LegendCubeTour.d.ts.map +1 -0
- package/lib/__lib__/LegendCubeTour.js +149 -0
- package/lib/__lib__/LegendCubeTour.js.map +1 -0
- 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__/CubeExampleTestUtils.d.ts +34 -0
- package/lib/__test-utils__/CubeExampleTestUtils.d.ts.map +1 -0
- package/lib/__test-utils__/CubeExampleTestUtils.js +72 -0
- package/lib/__test-utils__/CubeExampleTestUtils.js.map +1 -0
- 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__/CubeVariantTestUtils.d.ts +16 -0
- package/lib/__test-utils__/CubeVariantTestUtils.d.ts.map +1 -0
- package/lib/__test-utils__/CubeVariantTestUtils.js +66 -0
- package/lib/__test-utils__/CubeVariantTestUtils.js.map +1 -0
- 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 +11 -7
- 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 +22 -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 +78 -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 +6 -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 +40 -6
- 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 +11 -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 +54 -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 +6 -4
- 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/CubeExplodeEditor.d.ts +26 -0
- package/lib/components/editors/CubeExplodeEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeExplodeEditor.js +61 -0
- package/lib/components/editors/CubeExplodeEditor.js.map +1 -0
- 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 +86 -0
- package/lib/components/editors/CubeExpressionFilterEditor.js.map +1 -0
- package/lib/components/editors/CubeExtendEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeExtendEditor.js +13 -12
- 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/CubeJsonFieldsTree.d.ts +46 -0
- package/lib/components/editors/CubeJsonFieldsTree.d.ts.map +1 -0
- package/lib/components/editors/CubeJsonFieldsTree.js +93 -0
- package/lib/components/editors/CubeJsonFieldsTree.js.map +1 -0
- 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 +11 -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 +43 -28
- package/lib/components/grid/CubeGridRegion.js.map +1 -1
- package/lib/components/grid/CubeGridValues.d.ts +36 -4
- package/lib/components/grid/CubeGridValues.d.ts.map +1 -1
- package/lib/components/grid/CubeGridValues.js +116 -4
- package/lib/components/grid/CubeGridValues.js.map +1 -1
- package/lib/components/grid/CubeJsonExplorerDialog.d.ts +27 -0
- package/lib/components/grid/CubeJsonExplorerDialog.d.ts.map +1 -0
- package/lib/components/grid/CubeJsonExplorerDialog.js +102 -0
- package/lib/components/grid/CubeJsonExplorerDialog.js.map +1 -0
- package/lib/components/grid/CubeJsonViewerDialog.d.ts +27 -0
- package/lib/components/grid/CubeJsonViewerDialog.d.ts.map +1 -0
- package/lib/components/grid/CubeJsonViewerDialog.js +68 -0
- package/lib/components/grid/CubeJsonViewerDialog.js.map +1 -0
- package/lib/components/grid/CubeResultGrid.d.ts +81 -6
- package/lib/components/grid/CubeResultGrid.d.ts.map +1 -1
- package/lib/components/grid/CubeResultGrid.js +400 -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 +116 -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 +36 -14
- 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 +2 -2
- package/lib/components/source-picker/CubeIngestTab.d.ts.map +1 -1
- package/lib/components/source-picker/CubeIngestTab.js +49 -20
- 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/components/tour/CubeTour.d.ts +36 -0
- package/lib/components/tour/CubeTour.d.ts.map +1 -0
- package/lib/components/tour/CubeTour.js +183 -0
- package/lib/components/tour/CubeTour.js.map +1 -0
- 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 +13 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +11 -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 +189 -43
- package/lib/stores/CubeEditorState.d.ts.map +1 -1
- package/lib/stores/CubeEditorState.js +532 -117
- 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 +136 -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 +6 -3
- 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 +25 -6
- package/lib/stores/CubeGridQuickActions.d.ts.map +1 -1
- package/lib/stores/CubeGridQuickActions.js +52 -23
- 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/CubePureText.d.ts +20 -0
- package/lib/stores/CubePureText.d.ts.map +1 -0
- package/lib/stores/CubePureText.js +24 -0
- package/lib/stores/CubePureText.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/CubeTourState.d.ts +49 -0
- package/lib/stores/CubeTourState.d.ts.map +1 -0
- package/lib/stores/CubeTourState.js +92 -0
- package/lib/stores/CubeTourState.js.map +1 -0
- package/lib/stores/LegendCubeHost.d.ts +88 -0
- package/lib/stores/LegendCubeHost.d.ts.map +1 -0
- package/lib/stores/LegendCubeHost.js +149 -0
- package/lib/stores/LegendCubeHost.js.map +1 -0
- 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/CubeExplodeDraft.d.ts +87 -0
- package/lib/stores/editors/CubeExplodeDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeExplodeDraft.js +221 -0
- package/lib/stores/editors/CubeExplodeDraft.js.map +1 -0
- package/lib/stores/editors/CubeExpressionFilterDraft.d.ts +94 -0
- package/lib/stores/editors/CubeExpressionFilterDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeExpressionFilterDraft.js +258 -0
- package/lib/stores/editors/CubeExpressionFilterDraft.js.map +1 -0
- package/lib/stores/editors/CubeExtendDraft.d.ts +9 -0
- package/lib/stores/editors/CubeExtendDraft.d.ts.map +1 -1
- package/lib/stores/editors/CubeExtendDraft.js +26 -0
- package/lib/stores/editors/CubeExtendDraft.js.map +1 -1
- 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 +25 -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 +27 -0
- package/lib/stores/fixtures/CubeSalesDuckDbModel.d.ts.map +1 -0
- package/lib/stores/fixtures/CubeSalesDuckDbModel.js +52 -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 +62 -15
- package/lib/stores/source-picker/CubeIngestTabState.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeIngestTabState.js +212 -60
- 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/lib/stores/variant/CubeJson.d.ts +48 -0
- package/lib/stores/variant/CubeJson.d.ts.map +1 -0
- package/lib/stores/variant/CubeJson.js +207 -0
- package/lib/stores/variant/CubeJson.js.map +1 -0
- package/lib/stores/variant/CubeJsonExplorerState.d.ts +88 -0
- package/lib/stores/variant/CubeJsonExplorerState.d.ts.map +1 -0
- package/lib/stores/variant/CubeJsonExplorerState.js +297 -0
- package/lib/stores/variant/CubeJsonExplorerState.js.map +1 -0
- package/lib/stores/variant/CubeJsonFieldsState.d.ts +83 -0
- package/lib/stores/variant/CubeJsonFieldsState.d.ts.map +1 -0
- package/lib/stores/variant/CubeJsonFieldsState.js +207 -0
- package/lib/stores/variant/CubeJsonFieldsState.js.map +1 -0
- package/lib/stores/variant/CubeJsonOffers.d.ts +76 -0
- package/lib/stores/variant/CubeJsonOffers.d.ts.map +1 -0
- package/lib/stores/variant/CubeJsonOffers.js +250 -0
- package/lib/stores/variant/CubeJsonOffers.js.map +1 -0
- package/lib/stores/variant/CubeJsonParse.d.ts +28 -0
- package/lib/stores/variant/CubeJsonParse.d.ts.map +1 -0
- package/lib/stores/variant/CubeJsonParse.js +53 -0
- package/lib/stores/variant/CubeJsonParse.js.map +1 -0
- package/lib/stores/variant/CubeJsonSampling.d.ts +41 -0
- package/lib/stores/variant/CubeJsonSampling.d.ts.map +1 -0
- package/lib/stores/variant/CubeJsonSampling.js +59 -0
- package/lib/stores/variant/CubeJsonSampling.js.map +1 -0
- package/lib/stores/variant/CubeJsonShape.d.ts +87 -0
- package/lib/stores/variant/CubeJsonShape.d.ts.map +1 -0
- package/lib/stores/variant/CubeJsonShape.js +209 -0
- package/lib/stores/variant/CubeJsonShape.js.map +1 -0
- package/lib/stores/variant/CubeJsonViewerState.d.ts +33 -0
- package/lib/stores/variant/CubeJsonViewerState.d.ts.map +1 -0
- package/lib/stores/variant/CubeJsonViewerState.js +53 -0
- package/lib/stores/variant/CubeJsonViewerState.js.map +1 -0
- package/package.json +10 -9
- package/src/__lib__/LegendCubeCommand.ts +7 -0
- package/src/__lib__/LegendCubeFunctionLabels.ts +41 -0
- package/src/__lib__/LegendCubeHelpText.ts +27 -1
- package/src/__lib__/LegendCubeLabels.ts +225 -16
- package/src/__lib__/LegendCubeNavigation.ts +48 -0
- package/src/__lib__/LegendCubeProjectSourceLabels.ts +26 -0
- package/src/__lib__/LegendCubeServiceLabels.ts +41 -0
- package/src/__lib__/LegendCubeTesting.ts +9 -0
- package/src/__lib__/LegendCubeTour.ts +173 -0
- package/src/__test-utils__/CubeEngineTestSupport.ts +2 -1
- package/src/__test-utils__/CubeExampleTestUtils.ts +119 -0
- 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__/CubeVariantTestUtils.ts +103 -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 +15 -6
- package/src/components/CubeDialogTheme.ts +25 -0
- package/src/components/CubeEditor.tsx +170 -129
- package/src/components/CubeFileMenu.tsx +129 -0
- package/src/components/CubeLambdaImportBanner.tsx +97 -0
- package/src/components/CubeNodeIcon.tsx +9 -0
- package/src/components/CubeSchemaColumnsTable.tsx +7 -2
- package/src/components/canvas/CubeCanvas.tsx +65 -10
- 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 +37 -3
- package/src/components/dev-settings/CubeDevSettings.tsx +169 -0
- package/src/components/editors/CubeColumnChecklist.tsx +8 -2
- package/src/components/editors/CubeColumnPicker.tsx +9 -3
- package/src/components/editors/CubeConcatEditor.tsx +2 -2
- package/src/components/editors/CubeExplodeEditor.tsx +207 -0
- package/src/components/editors/CubeExpressionFilterEditor.tsx +210 -0
- package/src/components/editors/CubeExtendEditor.tsx +34 -21
- 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/CubeJsonFieldsTree.tsx +316 -0
- package/src/components/editors/CubeNodeEditorPanel.tsx +22 -10
- package/src/components/editors/CubeNodeEditorPopper.tsx +9 -1
- package/src/components/editors/CubeNodeEditorRegistry.ts +15 -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 +190 -56
- package/src/components/grid/CubeGridValues.ts +154 -4
- package/src/components/grid/CubeJsonExplorerDialog.tsx +304 -0
- package/src/components/grid/CubeJsonViewerDialog.tsx +190 -0
- package/src/components/grid/CubeResultGrid.tsx +586 -42
- package/src/components/grid/CubeRunStatsPanel.tsx +156 -0
- package/src/components/grid/CubeServerSideGrid.tsx +213 -0
- package/src/components/grid/CubeSqlDialog.tsx +90 -0
- package/src/components/grid/CubeSqlFormat.ts +37 -0
- package/src/components/palette/CubePalette.tsx +54 -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 +195 -83
- 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/components/tour/CubeTour.tsx +317 -0
- 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 +39 -2
- package/src/stores/CubeAddPlacement.ts +25 -5
- package/src/stores/CubeDevSettingsState.ts +117 -0
- package/src/stores/CubeEditorState.ts +722 -201
- package/src/stores/CubeEngineChecks.ts +240 -0
- package/src/stores/CubeExamples.ts +188 -1
- package/src/stores/CubeExamplesState.ts +13 -3
- 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 +56 -23
- 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/CubePureText.ts +28 -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/CubeTourState.ts +116 -0
- package/src/stores/LegendCubeHost.ts +243 -0
- package/src/stores/LocalModelCatalog.ts +6 -1
- package/src/stores/editors/CubeExplodeDraft.ts +272 -0
- package/src/stores/editors/CubeExpressionFilterDraft.ts +389 -0
- package/src/stores/editors/CubeExtendDraft.ts +29 -0
- package/src/stores/editors/CubeFunctionDraft.ts +92 -0
- package/src/stores/editors/CubeNodeDraftRegistry.ts +34 -2
- package/src/stores/editors/CubePivotDraft.ts +355 -0
- package/src/stores/fixtures/CubeSalesDuckDbModel.ts +60 -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 +331 -106
- 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/src/stores/variant/CubeJson.ts +229 -0
- package/src/stores/variant/CubeJsonExplorerState.ts +378 -0
- package/src/stores/variant/CubeJsonFieldsState.ts +252 -0
- package/src/stores/variant/CubeJsonOffers.ts +359 -0
- package/src/stores/variant/CubeJsonParse.ts +75 -0
- package/src/stores/variant/CubeJsonSampling.ts +90 -0
- package/src/stores/variant/CubeJsonShape.ts +279 -0
- package/src/stores/variant/CubeJsonViewerState.ts +59 -0
- package/tsconfig.json +72 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubePivotEditor.js","sourceRoot":"","sources":["../../../src/components/editors/CubePivotEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,cAAc,GAGf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC5B,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OA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,IAAI,IAAX,IAAI,CAAa,CAC3B,CAAC,GACC,IACD,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeRestrictEditor.d.ts","sourceRoot":"","sources":["../../../src/components/editors/CubeRestrictEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"CubeRestrictEditor.d.ts","sourceRoot":"","sources":["../../../src/components/editors/CubeRestrictEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAYH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAIvE;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,WAAoB,mBAAmB;;CAwEpE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { guaranteeType } from '@finos/legend-shared';
|
|
3
3
|
import { observer } from 'mobx-react-lite';
|
|
4
|
-
import { getColumnTypeLabel } from '../../__lib__/LegendCubeLabels.js';
|
|
4
|
+
import { getColumnTypeLabel, getExactColumnTypeLabel, } from '../../__lib__/LegendCubeLabels.js';
|
|
5
5
|
import { CubeRestrictDraft } from '../../stores/editors/CubeRestrictDraft.js';
|
|
6
6
|
import { CubeButton } from '../CubeButton.js';
|
|
7
7
|
import { CubeColumnTypeIcon } from './CubeColumnPicker.js';
|
|
@@ -18,6 +18,6 @@ export const CubeRestrictEditor = observer((props) => {
|
|
|
18
18
|
const [schema] = props.inputSchemas;
|
|
19
19
|
// each once, though a saved restrict may repeat one (validation reports it)
|
|
20
20
|
const missing = Array.from(new Set(draft.columns.filter((name) => !schema.lookup(name))));
|
|
21
|
-
return (_jsxs("div", { className: "flex flex-col gap-2 text-base", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { children: KEEP }), _jsx("span", { className: "flex-1" }), _jsx(CubeButton, { title: "Keep every column of the input", disabled: readOnly, onClick: () => draft.selectAll(schema), children: "All" }), _jsx(CubeButton, { title: "Untick every column", disabled: readOnly, onClick: () => draft.clear(), children: "None" })] }), _jsxs("ul", { "aria-label": KEEP, className: "rounded-sm border border-[var(--color-border-subtle)]", children: [schema.columns.map((column) => (_jsx("li", { children: _jsxs("label", { className: "flex items-center gap-2 px-1 py-0.5", children: [_jsx("input", { type: "checkbox", checked: draft.columns.includes(column.name), disabled: readOnly, onChange: () => draft.toggleColumn(column.name, schema) }), _jsx(CubeColumnTypeIcon, { type: column.type, className: "text-[var(--color-text-secondary)]" }), _jsx("span", { className: "min-w-0 truncate", children: column.name }), _jsx("span", { className: "shrink-0 text-sm text-[var(--color-text-muted)]", children: getColumnTypeLabel(column) })] }) }, column.name))), missing.map((name) => (_jsx("li", { children: _jsxs("label", { className: "flex items-center gap-2 px-1 py-0.5 text-[var(--color-status-error)]", children: [_jsx("input", { type: "checkbox", checked: true, disabled: readOnly, onChange: () => draft.toggleColumn(name, schema) }), _jsx("span", { className: "min-w-0 truncate", children: name || '(blank)' }), _jsx("span", { className: "shrink-0 text-sm", children: "(not in the input)" })] }) }, `missing:${name}`)))] })] }));
|
|
21
|
+
return (_jsxs("div", { className: "flex flex-col gap-2 text-base", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { children: KEEP }), _jsx("span", { className: "flex-1" }), _jsx(CubeButton, { title: "Keep every column of the input", disabled: readOnly, onClick: () => draft.selectAll(schema), children: "All" }), _jsx(CubeButton, { title: "Untick every column", disabled: readOnly, onClick: () => draft.clear(), children: "None" })] }), _jsxs("ul", { "aria-label": KEEP, className: "rounded-sm border border-[var(--color-border-subtle)]", children: [schema.columns.map((column) => (_jsx("li", { children: _jsxs("label", { className: "flex items-center gap-2 px-1 py-0.5", children: [_jsx("input", { type: "checkbox", checked: draft.columns.includes(column.name), disabled: readOnly, onChange: () => draft.toggleColumn(column.name, schema) }), _jsx(CubeColumnTypeIcon, { type: column.type, className: "text-[var(--color-text-secondary)]" }), _jsx("span", { className: "min-w-0 truncate", children: column.name }), _jsx("span", { className: "shrink-0 text-sm text-[var(--color-text-muted)]", title: getExactColumnTypeLabel(column), children: getColumnTypeLabel(column) })] }) }, column.name))), missing.map((name) => (_jsx("li", { children: _jsxs("label", { className: "flex items-center gap-2 px-1 py-0.5 text-[var(--color-status-error)]", children: [_jsx("input", { type: "checkbox", checked: true, disabled: readOnly, onChange: () => draft.toggleColumn(name, schema) }), _jsx("span", { className: "min-w-0 truncate", children: name || '(blank)' }), _jsx("span", { className: "shrink-0 text-sm", children: "(not in the input)" })] }) }, `missing:${name}`)))] })] }));
|
|
22
22
|
});
|
|
23
23
|
//# sourceMappingURL=CubeRestrictEditor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeRestrictEditor.js","sourceRoot":"","sources":["../../../src/components/editors/CubeRestrictEditor.tsx"],"names":[],"mappings":";AAiBA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,
|
|
1
|
+
{"version":3,"file":"CubeRestrictEditor.js","sourceRoot":"","sources":["../../../src/components/editors/CubeRestrictEditor.tsx"],"names":[],"mappings":";AAiBA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG3D,MAAM,IAAI,GAAG,iBAAiB,CAAC;AAE/B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA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,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GACvD,EACF,KAAC,kBAAkB,IACjB,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,SAAS,EAAC,oCAAoC,GAC9C,EACF,eAAM,SAAS,EAAC,kBAAkB,YAAE,MAAM,CAAC,IAAI,GAAQ,EACvD,eACE,SAAS,EAAC,iDAAiD,EAC3D,KAAK,EAAE,uBAAuB,CAAC,MAAM,CAAC,YAErC,kBAAkB,CAAC,MAAM,CAAC,GACtB,IACD,IAnBD,MAAM,CAAC,IAAI,CAoBf,CACN,CAAC,EACD,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACrB,uBACE,iBAAO,SAAS,EAAC,sEAAsE,aACrF,gBACE,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,IAAI,EACb,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,GAChD,EACF,eAAM,SAAS,EAAC,kBAAkB,YAAE,IAAI,IAAI,SAAS,GAAQ,EAC7D,eAAM,SAAS,EAAC,kBAAkB,mCAA0B,IACtD,IAVD,WAAW,IAAI,EAAE,CAWrB,CACN,CAAC,IACC,IACD,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { CubeNodeEditorProps } from './CubeNodeEditorRegistry.js';
|
|
17
|
+
/**
|
|
18
|
+
* A service (PLAN §6.4), in progress: which service it is, its columns once
|
|
19
|
+
* Cube can read services, else why it can't, and Refresh, which types it
|
|
20
|
+
* again
|
|
21
|
+
*/
|
|
22
|
+
export declare const CubeServiceSourceEditor: ((props: CubeNodeEditorProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=CubeServiceSourceEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeServiceSourceEditor.d.ts","sourceRoot":"","sources":["../../../src/components/editors/CubeServiceSourceEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAUH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,WAC1B,mBAAmB;;CA4C5B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 { ServiceSource } from '@finos/legend-cube';
|
|
18
|
+
import { PanelLoadingIndicator } from '@finos/legend-art';
|
|
19
|
+
import { guaranteeType } from '@finos/legend-shared';
|
|
20
|
+
import { flowResult } from 'mobx';
|
|
21
|
+
import { observer } from 'mobx-react-lite';
|
|
22
|
+
import { CUBE_PENDING_LABEL } from '../../__lib__/LegendCubeLabels.js';
|
|
23
|
+
import { CubeButton } from '../CubeButton.js';
|
|
24
|
+
import { CubeSchemaColumnsTable } from '../CubeSchemaColumnsTable.js';
|
|
25
|
+
/**
|
|
26
|
+
* A service (PLAN §6.4), in progress: which service it is, its columns once
|
|
27
|
+
* Cube can read services, else why it can't, and Refresh, which types it
|
|
28
|
+
* again
|
|
29
|
+
*/
|
|
30
|
+
export const CubeServiceSourceEditor = observer((props) => {
|
|
31
|
+
const { editorState } = props;
|
|
32
|
+
const source = guaranteeType(props.draft.original, ServiceSource);
|
|
33
|
+
const { resolution } = source;
|
|
34
|
+
const refreshing = editorState.isPendingSource(source);
|
|
35
|
+
return (_jsxs("div", { className: "relative flex flex-col gap-2", children: [_jsxs("dl", { className: "grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1 text-base", children: [_jsx("dt", { className: "text-[var(--color-text-secondary)]", children: "Service" }), _jsx("dd", { className: "min-w-0 break-all", children: source.service }), _jsx("dt", { className: "text-[var(--color-text-secondary)]", children: "Pattern" }), _jsx("dd", { className: "min-w-0 break-all", children: source.pattern })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(CubeButton, { title: "Read the service's columns again", disabled: refreshing, onClick: () => {
|
|
36
|
+
flowResult(editorState.refreshSource(source.id)).catch(editorState.host.applicationStore.alertUnhandledError);
|
|
37
|
+
}, children: "Refresh" }), refreshing && (_jsx("span", { className: "text-base text-[var(--color-text-secondary)]", children: CUBE_PENDING_LABEL.REFRESHING_SOURCE }))] }), _jsx(PanelLoadingIndicator, { isLoading: refreshing }), resolution.kind === 'resolved' ? (_jsx(CubeSchemaColumnsTable, { schema: resolution.schema })) : (_jsx("div", { className: "whitespace-pre-wrap text-base text-[var(--color-text-secondary)]", children: resolution.kind === 'failed'
|
|
38
|
+
? resolution.message
|
|
39
|
+
: 'The service has not been typed yet.' }))] }));
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=CubeServiceSourceEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeServiceSourceEditor.js","sourceRoot":"","sources":["../../../src/components/editors/CubeServiceSourceEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAGtE;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,QAAQ,CAC7C,CAAC,KAA0B,EAAE,EAAE;IAC7B,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC9B,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAClE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IAC9B,MAAM,UAAU,GAAG,WAAW,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IACvD,OAAO,CACL,eAAK,SAAS,EAAC,8BAA8B,aAC3C,cAAI,SAAS,EAAC,4DAA4D,aACxE,aAAI,SAAS,EAAC,oCAAoC,wBAAa,EAC/D,aAAI,SAAS,EAAC,mBAAmB,YAAE,MAAM,CAAC,OAAO,GAAM,EACvD,aAAI,SAAS,EAAC,oCAAoC,wBAAa,EAC/D,aAAI,SAAS,EAAC,mBAAmB,YAAE,MAAM,CAAC,OAAO,GAAM,IACpD,EACL,eAAK,SAAS,EAAC,yBAAyB,aACtC,KAAC,UAAU,IACT,KAAK,EAAC,kCAAkC,EACxC,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,GAAG,EAAE;4BACZ,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CACpD,WAAW,CAAC,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CACtD,CAAC;wBACJ,CAAC,wBAGU,EACZ,UAAU,IAAI,CACb,eAAM,SAAS,EAAC,8CAA8C,YAC3D,kBAAkB,CAAC,iBAAiB,GAChC,CACR,IACG,EACN,KAAC,qBAAqB,IAAC,SAAS,EAAE,UAAU,GAAI,EAC/C,UAAU,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,CAChC,KAAC,sBAAsB,IAAC,MAAM,EAAE,UAAU,CAAC,MAAM,GAAI,CACtD,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,kEAAkE,YAC9E,UAAU,CAAC,IAAI,KAAK,QAAQ;oBAC3B,CAAC,CAAC,UAAU,CAAC,OAAO;oBACpB,CAAC,CAAC,qCAAqC,GACrC,CACP,IACG,CACP,CAAC;AACJ,CAAC,CACF,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
|
+
* Formats a number column (spec §13.1, PLAN §11.10): a number, a currency by
|
|
19
|
+
* its ISO 4217 code, or a percent; its decimal places, thousands separators,
|
|
20
|
+
* and negatives in red or in parentheses; for the column, or every number
|
|
21
|
+
* column. An undo step that leaves the rows current.
|
|
22
|
+
*/
|
|
23
|
+
export declare const CubeColumnFormatDialog: ((props: {
|
|
24
|
+
editorState: CubeEditorState;
|
|
25
|
+
}) => import("react/jsx-runtime").JSX.Element) & {
|
|
26
|
+
displayName: string;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=CubeColumnFormatDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeColumnFormatDialog.d.ts","sourceRoot":"","sources":["../../../src/components/grid/CubeColumnFormatDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAmBH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAoOvE;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,WACzB;IAAE,WAAW,EAAE,eAAe,CAAA;CAAE;;CAoBzC,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
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, } from '@finos/legend-art';
|
|
18
|
+
import { ColumnFormatStyle, foldColumnName, getColumnFormat, } from '@finos/legend-cube';
|
|
19
|
+
import { observer } from 'mobx-react-lite';
|
|
20
|
+
import { useState } from 'react';
|
|
21
|
+
import { LEGEND_CUBE_TEST_ID } from '../../__lib__/LegendCubeTesting.js';
|
|
22
|
+
import { formatColumnValue, getColumnFormatProblem, getCubeCurrencyCodes, } from './CubeGridValues.js';
|
|
23
|
+
import { CUBE_PRIMARY_BUTTON_DARK_MODE } from '../CubeDialogTheme.js';
|
|
24
|
+
const STYLE_LABELS = {
|
|
25
|
+
[ColumnFormatStyle.NUMBER]: 'Number',
|
|
26
|
+
[ColumnFormatStyle.CURRENCY]: 'Currency',
|
|
27
|
+
[ColumnFormatStyle.PERCENT]: 'Percent',
|
|
28
|
+
};
|
|
29
|
+
/** The values the preview formats: a negative and a fraction */
|
|
30
|
+
const PREVIEW_VALUES = ['-1234567.891', '0.25'];
|
|
31
|
+
const DEFAULT_FORMAT = {
|
|
32
|
+
style: ColumnFormatStyle.NUMBER,
|
|
33
|
+
grouping: true,
|
|
34
|
+
redIfNegative: false,
|
|
35
|
+
parenthesesIfNegative: false,
|
|
36
|
+
};
|
|
37
|
+
const inputClass = 'h-6 rounded-sm border border-[var(--color-border-default)] bg-[var(--color-bg-input)] px-1 text-base text-[var(--color-text-primary)]';
|
|
38
|
+
/** The dialog's form, for the column whose format it edits */
|
|
39
|
+
const CubeColumnFormatForm = observer((props) => {
|
|
40
|
+
const { editorState, column } = props;
|
|
41
|
+
const { grid } = editorState;
|
|
42
|
+
const hints = editorState.document.meta.presentation.columnHints ?? [];
|
|
43
|
+
const current = getColumnFormat(hints, column);
|
|
44
|
+
const ownFormat = hints.some((hint) => hint.column !== undefined &&
|
|
45
|
+
foldColumnName(hint.column) === foldColumnName(column));
|
|
46
|
+
// the column shows the format of every number column (review of M7)
|
|
47
|
+
const sharedFormat = !ownFormat && hints.some((hint) => hint.column === undefined);
|
|
48
|
+
const [format, setFormat] = useState(current ?? DEFAULT_FORMAT);
|
|
49
|
+
const [places, setPlaces] = useState(current?.decimalPlaces === undefined ? '' : String(current.decimalPlaces));
|
|
50
|
+
const [applyToAll, setApplyToAll] = useState(false);
|
|
51
|
+
const darkMode = !editorState.host.applicationStore.layoutService
|
|
52
|
+
.TEMPORARY__isLightColorThemeEnabled;
|
|
53
|
+
const placesError = places.trim() === '' || /^(?:1?\d|20)$/u.test(places.trim())
|
|
54
|
+
? undefined
|
|
55
|
+
: 'Decimal places are a whole number from 0 to 20, or blank for all.';
|
|
56
|
+
const edited = {
|
|
57
|
+
...format,
|
|
58
|
+
...(format.style === ColumnFormatStyle.CURRENCY
|
|
59
|
+
? { currency: format.currency ?? 'USD' }
|
|
60
|
+
: { currency: undefined }),
|
|
61
|
+
decimalPlaces: places.trim() === '' || placesError ? undefined : Number(places),
|
|
62
|
+
};
|
|
63
|
+
const problem = getColumnFormatProblem(edited);
|
|
64
|
+
const flag = (key, label) => (_jsxs("label", { className: "flex items-center gap-2 text-base", children: [_jsx("input", { type: "checkbox", checked: format[key], onChange: (event) => setFormat({ ...format, [key]: event.target.checked }) }), label] }));
|
|
65
|
+
const close = () => grid.closeFormat();
|
|
66
|
+
return (_jsxs(Modal, { darkMode: darkMode, className: "w-[460px] max-w-full", children: [_jsx(ModalHeader, { children: _jsx("div", { className: "modal__title", children: `Format ${column}` }) }), _jsx(ModalBody, { children: _jsxs("div", { className: "flex flex-col gap-2", "data-testid": LEGEND_CUBE_TEST_ID.COLUMN_FORMAT, children: [_jsxs("label", { className: "flex items-center justify-between gap-2 text-base", children: ["Style", _jsx("select", { className: inputClass, "aria-label": "Style", value: format.style, onChange: (event) => setFormat({ ...format, style: event.target.value }), children: Object.values(ColumnFormatStyle).map((style) => (_jsx("option", { value: style, children: STYLE_LABELS[style] }, style))) })] }), format.style === ColumnFormatStyle.CURRENCY && (_jsxs("label", { className: "flex items-center justify-between gap-2 text-base", children: ["Currency", _jsx("select", { className: inputClass, "aria-label": "Currency", value: edited.currency, onChange: (event) => setFormat({ ...format, currency: event.target.value }), children: getCubeCurrencyCodes().map((code) => (_jsx("option", { value: code, children: code }, code))) })] })), _jsxs("label", { className: "flex items-center justify-between gap-2 text-base", children: ["Decimal places", _jsx("input", { className: `${inputClass} w-20 text-right`, "aria-label": "Decimal places", "aria-invalid": placesError !== undefined, placeholder: "All", value: places, onChange: (event) => setPlaces(event.target.value) })] }), placesError && (_jsx("div", { className: "text-sm text-[var(--color-status-error)]", role: "alert", children: placesError })), flag('grouping', 'Thousands separators'), flag('redIfNegative', 'Red if negative'), flag('parenthesesIfNegative', 'Parentheses if negative'), _jsxs("label", { className: "flex items-center gap-2 text-base", children: [_jsx("input", { type: "checkbox", checked: applyToAll, onChange: (event) => setApplyToAll(event.target.checked) }), "Apply to every number column"] }), _jsxs("div", { className: "text-base", "aria-label": "Preview", children: [_jsxs("span", { className: "text-[var(--color-text-secondary)]", children: ["Preview:", ' '] }), problem ??
|
|
67
|
+
PREVIEW_VALUES.map((value) => {
|
|
68
|
+
const shown = formatColumnValue(value, edited);
|
|
69
|
+
return (_jsx("span", { className: edited.redIfNegative && shown?.negative
|
|
70
|
+
? 'mr-3 text-[var(--color-status-error)]'
|
|
71
|
+
: 'mr-3', children: shown?.text ?? value }, value));
|
|
72
|
+
})] })] }) }), _jsxs(ModalFooter, { children: [ownFormat && (_jsx(ModalFooterButton, { darkMode: darkMode, formatText: false, type: "secondary", text: "Remove Format", onClick: () => {
|
|
73
|
+
grid.setColumnFormat(column, undefined);
|
|
74
|
+
close();
|
|
75
|
+
} })), sharedFormat && (_jsx(ModalFooterButton, { darkMode: darkMode, formatText: false, type: "secondary", text: "Remove Format of Every Number Column", onClick: () => {
|
|
76
|
+
grid.setColumnFormat(undefined, undefined);
|
|
77
|
+
close();
|
|
78
|
+
} })), _jsx(ModalFooterButton, { darkMode: CUBE_PRIMARY_BUTTON_DARK_MODE, formatText: false, text: "Apply", disabled: placesError !== undefined || problem !== undefined, onClick: () => {
|
|
79
|
+
grid.setColumnFormat(applyToAll ? undefined : column, edited);
|
|
80
|
+
close();
|
|
81
|
+
} }), _jsx(ModalFooterButton, { darkMode: darkMode, formatText: false, type: "secondary", text: "Cancel", onClick: close })] })] }));
|
|
82
|
+
});
|
|
83
|
+
/**
|
|
84
|
+
* Formats a number column (spec §13.1, PLAN §11.10): a number, a currency by
|
|
85
|
+
* its ISO 4217 code, or a percent; its decimal places, thousands separators,
|
|
86
|
+
* and negatives in red or in parentheses; for the column, or every number
|
|
87
|
+
* column. An undo step that leaves the rows current.
|
|
88
|
+
*/
|
|
89
|
+
export const CubeColumnFormatDialog = observer((props) => {
|
|
90
|
+
const { editorState } = props;
|
|
91
|
+
const column = editorState.grid.formatColumn;
|
|
92
|
+
return (_jsx(Dialog, { open: column !== undefined, onClose: () => editorState.grid.closeFormat(), children: column !== undefined ? (_jsx(CubeColumnFormatForm, { editorState: editorState, column: column }, column)) : (_jsx("div", {})) }));
|
|
93
|
+
});
|
|
94
|
+
//# sourceMappingURL=CubeColumnFormatDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeColumnFormatDialog.js","sourceRoot":"","sources":["../../../src/components/grid/CubeColumnFormatDialog.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,MAAM,EACN,KAAK,EACL,SAAS,EACT,WAAW,EACX,iBAAiB,E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eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;4BAC9D,KAAK,EAAE,CAAC;wBACV,CAAC,GACD,EACF,KAAC,iBAAiB,IAChB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,KAAK,EACjB,IAAI,EAAC,WAAW,EAChB,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,KAAK,GACd,IACU,IACR,CACT,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAC5C,CAAC,KAAuC,EAAE,EAAE;IAC1C,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC9B,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC;IAC7C,OAAO,CACL,KAAC,MAAM,IACL,IAAI,EAAE,MAAM,KAAK,SAAS,EAC1B,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,YAE5C,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,CACtB,KAAC,oBAAoB,IAEnB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,IAFT,MAAM,CAGX,CACH,CAAC,CAAC,CAAC,CACF,eAAO,CACR,GACM,CACV,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -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
|
+
{"version":3,"file":"CubeDrilldownBar.js","sourceRoot":"","sources":["../../../src/components/grid/CubeDrilldownBar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,MAAM,EACN,KAAK,EACL,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,SAAS,GACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,cAAc,EACd,yBAAyB,EACzB,8BAA8B,EAC9B,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,wEAAwE;AACxE,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B;;;;GAI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AC;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;AAyBH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAqWvE,uFAAuF;AACvF,eAAO,MAAM,cAAc,WACjB;IAAE,WAAW,EAAE,eAAe,CAAA;CAAE;;CAgDzC,CAAC"}
|
|
@@ -19,11 +19,19 @@ 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
|
+
import { CUBE_TOUR_ANCHOR, cubeTourAnchor, } from '../../__lib__/LegendCubeTour.js';
|
|
24
25
|
import { CubeDataProductRunErrorKind, } from '../../stores/CubeDataProductRuntimeState.js';
|
|
25
26
|
import { CubeButton } from '../CubeButton.js';
|
|
27
|
+
import { CubeGridMode } from '../../stores/CubeGridState.js';
|
|
28
|
+
import { parseWholeNumberText } from '../../stores/editors/CubeIntegerText.js';
|
|
26
29
|
import { CubeResultGrid } from './CubeResultGrid.js';
|
|
30
|
+
import { CubeColumnFormatDialog } from './CubeColumnFormatDialog.js';
|
|
31
|
+
import { CubeDrilldownBar } from './CubeDrilldownBar.js';
|
|
32
|
+
import { CubeSqlDialog } from './CubeSqlDialog.js';
|
|
33
|
+
import { CubeRunStatsPanel } from './CubeRunStatsPanel.js';
|
|
34
|
+
import { CubeServerSideGrid } from './CubeServerSideGrid.js';
|
|
27
35
|
import { formatDuration } from './CubeGridValues.js';
|
|
28
36
|
/** The first line of an error is shown, at most this long; the rest is under Details */
|
|
29
37
|
const MAX_ERROR_LINE_LENGTH = 500;
|
|
@@ -32,44 +40,39 @@ const CubeRowLimitInput = observer((props) => {
|
|
|
32
40
|
const [draft, setDraft] = useState(String(editorState.rowLimit));
|
|
33
41
|
const [error, setError] = useState();
|
|
34
42
|
const commit = () => {
|
|
35
|
-
const
|
|
43
|
+
const value = parseWholeNumberText(draft);
|
|
44
|
+
const problem = getRowLimitError(value);
|
|
36
45
|
setError(problem);
|
|
37
|
-
if (!problem) {
|
|
38
|
-
editorState.setRowLimit(
|
|
46
|
+
if (!problem && value !== undefined) {
|
|
47
|
+
editorState.setRowLimit(value);
|
|
39
48
|
}
|
|
40
49
|
};
|
|
41
|
-
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) => {
|
|
50
|
+
return (_jsxs("div", { className: "flex items-center gap-1", ...cubeTourAnchor(CUBE_TOUR_ANCHOR.EXECUTE), 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) => {
|
|
42
51
|
if (event.key === 'Enter') {
|
|
43
52
|
commit();
|
|
44
53
|
}
|
|
45
54
|
} })] }), error !== undefined && (_jsx("span", { className: "text-sm text-[var(--color-status-error)]", role: "alert", children: error })), error === undefined &&
|
|
46
55
|
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
56
|
});
|
|
57
|
+
/** Server-side or local: how the grid shows the run (spec §12.1, PLAN §11.10) */
|
|
58
|
+
const CubeGridModeToggle = observer((props) => {
|
|
59
|
+
const { grid } = props.editorState;
|
|
60
|
+
const option = (mode, label, title) => (_jsx("button", { type: "button", className: `h-6 px-2 text-base ${grid.mode === mode
|
|
61
|
+
? 'bg-[var(--color-bg-selected)] font-medium text-[var(--color-text-primary)]'
|
|
62
|
+
: 'text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-hover)]'}`, "aria-pressed": grid.mode === mode, title: title, onClick: () => grid.setMode(mode), children: label }));
|
|
63
|
+
return (_jsxs("div", { className: "flex overflow-hidden rounded-sm border border-[var(--color-border-default)]", role: "group", "aria-label": "Grid mode", ...cubeTourAnchor(CUBE_TOUR_ANCHOR.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")] }));
|
|
64
|
+
});
|
|
48
65
|
const CubeGridToolbar = observer((props) => {
|
|
49
|
-
const { editorState,
|
|
66
|
+
const { editorState, onShowSql, showRuns, onToggleRuns } = props;
|
|
50
67
|
const { execution } = editorState;
|
|
51
68
|
const { result } = execution;
|
|
52
69
|
const disabledReasons = execution.disabledReasons;
|
|
53
|
-
return (_jsxs("div", { className: "flex h-8 shrink-0 items-center gap-3 border-b border-[var(--color-border-default)] bg-[var(--color-bg-panel-header)] px-2", "data-testid": LEGEND_CUBE_TEST_ID.GRID_TOOLBAR, children: [execution.isRunning ? (_jsx(CubeButton, { title: "Stop the run", onClick: () => execution.stop(), children: "Stop" })) : (_jsx(CubeButton, { primary: true, disabled: !execution.canExecute, title: disabledReasons.length
|
|
70
|
+
return (_jsxs("div", { className: "flex h-8 shrink-0 items-center gap-3 border-b border-[var(--color-border-default)] bg-[var(--color-bg-panel-header)] px-2", "data-testid": LEGEND_CUBE_TEST_ID.GRID_TOOLBAR, children: [execution.isRunning ? (_jsx(CubeButton, { title: "Stop the run", ...cubeTourAnchor(CUBE_TOUR_ANCHOR.EXECUTE), onClick: () => execution.stop(), children: "Stop" })) : (_jsx(CubeButton, { primary: true, ...cubeTourAnchor(CUBE_TOUR_ANCHOR.EXECUTE), disabled: !execution.canExecute, title: disabledReasons.length
|
|
54
71
|
? `${formatDisabledReasons(disabledReasons)}\n(${EXECUTE_SHORTCUT_LABEL})`
|
|
55
72
|
: `Run the query up to the selected node (${EXECUTE_SHORTCUT_LABEL})`,
|
|
56
73
|
// 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" })] }));
|
|
74
|
+
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 &&
|
|
75
|
+
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", ...cubeTourAnchor(CUBE_TOUR_ANCHOR.SHOW_SQL), onClick: onShowSql, children: "Show SQL" }))] })), _jsx("span", { className: "flex-1" }), _jsx(CubeButton, { "aria-expanded": showRuns, ...cubeTourAnchor(CUBE_TOUR_ANCHOR.RUNS), title: "The latest runs, fetches and exports, with their SQL", onClick: onToggleRuns, children: `Runs (${editorState.runStats.entries.length})` })] }));
|
|
73
76
|
});
|
|
74
77
|
/**
|
|
75
78
|
* On a data product cube, what to do about a run refused for its warehouse,
|
|
@@ -84,22 +87,34 @@ const CubeDataProductRunErrorHelp = observer((props) => {
|
|
|
84
87
|
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
88
|
});
|
|
86
89
|
const CubeExecutionError = observer((props) => {
|
|
87
|
-
const error = props
|
|
88
|
-
if (!error) {
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
90
|
+
const { error } = props;
|
|
91
91
|
const isCut = error.firstLine.length > MAX_ERROR_LINE_LENGTH;
|
|
92
92
|
const firstLine = isCut
|
|
93
93
|
? `${error.firstLine.slice(0, MAX_ERROR_LINE_LENGTH)}…`
|
|
94
94
|
: error.firstLine;
|
|
95
95
|
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
96
|
});
|
|
97
|
+
/**
|
|
98
|
+
* The run's rows as the grid's mode shows them: in server-side mode built
|
|
99
|
+
* anew for each run and each drill-down, with a fetch's error above it
|
|
100
|
+
*/
|
|
101
|
+
const CubeRunGrid = observer((props) => {
|
|
102
|
+
const { editorState, result, darkMode } = props;
|
|
103
|
+
const { grid } = editorState;
|
|
104
|
+
const exportError = editorState.export.error && (_jsx(CubeExecutionError, { editorState: editorState, error: editorState.export.error }));
|
|
105
|
+
if (!grid.isServerSide) {
|
|
106
|
+
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) })] }));
|
|
107
|
+
}
|
|
108
|
+
const drilldown = editorState.document.meta.drilldown;
|
|
109
|
+
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)}`) })] }));
|
|
110
|
+
});
|
|
97
111
|
/** The results: Execute, the row limit and the run's stats above the grid (PLAN §9) */
|
|
98
112
|
export const CubeGridRegion = observer((props) => {
|
|
99
113
|
const { editorState } = props;
|
|
100
114
|
const { execution, host } = editorState;
|
|
101
115
|
const [showSql, setShowSql] = useState(false);
|
|
116
|
+
const [showRuns, setShowRuns] = useState(false);
|
|
102
117
|
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,
|
|
118
|
+
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
119
|
});
|
|
105
120
|
//# sourceMappingURL=CubeGridRegion.js.map
|