@finos/legend-cube-builder 0.0.5 → 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/docs/adding-an-operation.md +4 -2
- package/docs/demo/README.md +1 -1
- package/docs/hosting.md +40 -9
- package/lib/__lib__/LegendCubeHelpText.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeHelpText.js +3 -1
- package/lib/__lib__/LegendCubeHelpText.js.map +1 -1
- package/lib/__lib__/LegendCubeLabels.d.ts +34 -5
- package/lib/__lib__/LegendCubeLabels.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeLabels.js +45 -8
- 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__/LegendCubeTesting.d.ts +3 -1
- package/lib/__lib__/LegendCubeTesting.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeTesting.js +2 -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__/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__/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/components/CubeAddItems.d.ts.map +1 -1
- package/lib/components/CubeAddItems.js +2 -1
- package/lib/components/CubeAddItems.js.map +1 -1
- package/lib/components/CubeEditor.d.ts.map +1 -1
- package/lib/components/CubeEditor.js +11 -5
- package/lib/components/CubeEditor.js.map +1 -1
- package/lib/components/CubeFileMenu.d.ts.map +1 -1
- package/lib/components/CubeFileMenu.js +2 -1
- package/lib/components/CubeFileMenu.js.map +1 -1
- package/lib/components/CubeNodeIcon.d.ts.map +1 -1
- package/lib/components/CubeNodeIcon.js +2 -1
- package/lib/components/CubeNodeIcon.js.map +1 -1
- package/lib/components/canvas/CubeCanvas.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvas.js +3 -2
- package/lib/components/canvas/CubeCanvas.js.map +1 -1
- package/lib/components/canvas/CubeCanvasNode.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvasNode.js +4 -1
- package/lib/components/canvas/CubeCanvasNode.js.map +1 -1
- package/lib/components/dev-settings/CubeDevSettings.d.ts +2 -2
- package/lib/components/dev-settings/CubeDevSettings.d.ts.map +1 -1
- package/lib/components/dev-settings/CubeDevSettings.js +12 -8
- package/lib/components/dev-settings/CubeDevSettings.js.map +1 -1
- package/lib/components/editors/CubeColumnPicker.d.ts.map +1 -1
- package/lib/components/editors/CubeColumnPicker.js +3 -1
- package/lib/components/editors/CubeColumnPicker.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.map +1 -1
- package/lib/components/editors/CubeExpressionFilterEditor.js +8 -5
- package/lib/components/editors/CubeExpressionFilterEditor.js.map +1 -1
- package/lib/components/editors/CubeExtendEditor.d.ts +0 -2
- package/lib/components/editors/CubeExtendEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeExtendEditor.js +12 -11
- package/lib/components/editors/CubeExtendEditor.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/CubeNodeEditorRegistry.d.ts.map +1 -1
- package/lib/components/editors/CubeNodeEditorRegistry.js +3 -1
- package/lib/components/editors/CubeNodeEditorRegistry.js.map +1 -1
- package/lib/components/grid/CubeGridRegion.d.ts.map +1 -1
- package/lib/components/grid/CubeGridRegion.js +5 -4
- package/lib/components/grid/CubeGridRegion.js.map +1 -1
- package/lib/components/grid/CubeGridValues.d.ts +5 -3
- package/lib/components/grid/CubeGridValues.d.ts.map +1 -1
- package/lib/components/grid/CubeGridValues.js +8 -3
- 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 +15 -3
- package/lib/components/grid/CubeResultGrid.d.ts.map +1 -1
- package/lib/components/grid/CubeResultGrid.js +95 -3
- package/lib/components/grid/CubeResultGrid.js.map +1 -1
- package/lib/components/grid/CubeServerSideGrid.d.ts.map +1 -1
- package/lib/components/grid/CubeServerSideGrid.js +4 -2
- package/lib/components/grid/CubeServerSideGrid.js.map +1 -1
- package/lib/components/palette/CubePalette.d.ts.map +1 -1
- package/lib/components/palette/CubePalette.js +4 -1
- package/lib/components/palette/CubePalette.js.map +1 -1
- 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 +19 -13
- package/lib/components/source-picker/CubeIngestTab.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/index.css +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/stores/CubeEditorState.d.ts +17 -1
- package/lib/stores/CubeEditorState.d.ts.map +1 -1
- package/lib/stores/CubeEditorState.js +35 -5
- package/lib/stores/CubeEditorState.js.map +1 -1
- package/lib/stores/CubeExamples.d.ts.map +1 -1
- package/lib/stores/CubeExamples.js +101 -4
- package/lib/stores/CubeExamples.js.map +1 -1
- package/lib/stores/CubeExamplesState.d.ts.map +1 -1
- package/lib/stores/CubeExamplesState.js +4 -1
- package/lib/stores/CubeExamplesState.js.map +1 -1
- package/lib/stores/CubeGridQuickActions.d.ts +7 -0
- package/lib/stores/CubeGridQuickActions.d.ts.map +1 -1
- package/lib/stores/CubeGridQuickActions.js +20 -11
- package/lib/stores/CubeGridQuickActions.js.map +1 -1
- 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/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/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 +3 -0
- package/lib/stores/editors/CubeExpressionFilterDraft.d.ts.map +1 -1
- package/lib/stores/editors/CubeExpressionFilterDraft.js +4 -0
- package/lib/stores/editors/CubeExpressionFilterDraft.js.map +1 -1
- 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/CubeNodeDraftRegistry.d.ts.map +1 -1
- package/lib/stores/editors/CubeNodeDraftRegistry.js +6 -1
- package/lib/stores/editors/CubeNodeDraftRegistry.js.map +1 -1
- package/lib/stores/fixtures/CubeSalesDuckDbModel.d.ts +1 -0
- package/lib/stores/fixtures/CubeSalesDuckDbModel.d.ts.map +1 -1
- package/lib/stores/fixtures/CubeSalesDuckDbModel.js +8 -2
- package/lib/stores/fixtures/CubeSalesDuckDbModel.js.map +1 -1
- package/lib/stores/source-picker/CubeIngestTabState.d.ts +48 -14
- package/lib/stores/source-picker/CubeIngestTabState.d.ts.map +1 -1
- package/lib/stores/source-picker/CubeIngestTabState.js +159 -62
- package/lib/stores/source-picker/CubeIngestTabState.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 +2 -2
- package/src/__lib__/LegendCubeHelpText.ts +4 -0
- package/src/__lib__/LegendCubeLabels.ts +60 -8
- package/src/__lib__/LegendCubeNavigation.ts +48 -0
- package/src/__lib__/LegendCubeTesting.ts +2 -0
- package/src/__lib__/LegendCubeTour.ts +173 -0
- package/src/__test-utils__/CubeExampleTestUtils.ts +119 -0
- package/src/__test-utils__/CubeVariantTestUtils.ts +103 -0
- package/src/components/CubeAddItems.tsx +2 -0
- package/src/components/CubeEditor.tsx +15 -0
- package/src/components/CubeFileMenu.tsx +2 -0
- package/src/components/CubeNodeIcon.tsx +2 -0
- package/src/components/canvas/CubeCanvas.tsx +17 -1
- package/src/components/canvas/CubeCanvasNode.tsx +7 -0
- package/src/components/dev-settings/CubeDevSettings.tsx +17 -2
- package/src/components/editors/CubeColumnPicker.tsx +3 -0
- package/src/components/editors/CubeExplodeEditor.tsx +207 -0
- package/src/components/editors/CubeExpressionFilterEditor.tsx +25 -8
- package/src/components/editors/CubeExtendEditor.tsx +32 -19
- package/src/components/editors/CubeJsonFieldsTree.tsx +316 -0
- package/src/components/editors/CubeNodeEditorRegistry.ts +3 -0
- package/src/components/grid/CubeGridRegion.tsx +21 -3
- package/src/components/grid/CubeGridValues.ts +8 -3
- package/src/components/grid/CubeJsonExplorerDialog.tsx +304 -0
- package/src/components/grid/CubeJsonViewerDialog.tsx +190 -0
- package/src/components/grid/CubeResultGrid.tsx +144 -2
- package/src/components/grid/CubeServerSideGrid.tsx +13 -0
- package/src/components/palette/CubePalette.tsx +9 -0
- package/src/components/source-picker/CubeIngestTab.tsx +62 -30
- package/src/components/tour/CubeTour.tsx +317 -0
- package/src/index.ts +7 -0
- package/src/stores/CubeEditorState.ts +36 -5
- package/src/stores/CubeExamples.ts +120 -2
- package/src/stores/CubeExamplesState.ts +9 -1
- package/src/stores/CubeGridQuickActions.ts +23 -12
- package/src/stores/CubePureText.ts +28 -0
- package/src/stores/CubeTourState.ts +116 -0
- package/src/stores/LegendCubeHost.ts +243 -0
- package/src/stores/editors/CubeExplodeDraft.ts +272 -0
- package/src/stores/editors/CubeExpressionFilterDraft.ts +4 -0
- package/src/stores/editors/CubeExtendDraft.ts +29 -0
- package/src/stores/editors/CubeNodeDraftRegistry.ts +7 -0
- package/src/stores/fixtures/CubeSalesDuckDbModel.ts +8 -2
- package/src/stores/source-picker/CubeIngestTabState.ts +253 -102
- 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 +22 -1
|
@@ -0,0 +1,149 @@
|
|
|
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 { EXECUTE_SHORTCUT_LABEL, REDO_SHORTCUT_LABEL, UNDO_SHORTCUT_LABEL, } from './LegendCubeCommand.js';
|
|
17
|
+
// The editor's guided tour (PLAN §11.21): its steps, in order, each pointing
|
|
18
|
+
// at the controls marked with its anchor. A control joins a step by carrying
|
|
19
|
+
// `cubeTourAnchor(...)`; a step whose controls aren't on the page (the graph
|
|
20
|
+
// hidden, no run yet, a host without examples) is skipped. A new step adds
|
|
21
|
+
// its anchor here, its text below, and the anchor on its controls.
|
|
22
|
+
/** The attribute that marks a control as a tour step's */
|
|
23
|
+
export const CUBE_TOUR_ANCHOR_ATTRIBUTE = 'data-cube-tour';
|
|
24
|
+
export var CUBE_TOUR_ANCHOR;
|
|
25
|
+
(function (CUBE_TOUR_ANCHOR) {
|
|
26
|
+
CUBE_TOUR_ANCHOR["SOURCES"] = "sources";
|
|
27
|
+
CUBE_TOUR_ANCHOR["STEPS"] = "steps";
|
|
28
|
+
CUBE_TOUR_ANCHOR["CANVAS"] = "canvas";
|
|
29
|
+
CUBE_TOUR_ANCHOR["RUNNING_STEP"] = "running-step";
|
|
30
|
+
CUBE_TOUR_ANCHOR["EXECUTE"] = "execute";
|
|
31
|
+
CUBE_TOUR_ANCHOR["GRID_MODE"] = "grid-mode";
|
|
32
|
+
CUBE_TOUR_ANCHOR["RESULTS"] = "results";
|
|
33
|
+
CUBE_TOUR_ANCHOR["SHOW_SQL"] = "show-sql";
|
|
34
|
+
CUBE_TOUR_ANCHOR["RUNS"] = "runs";
|
|
35
|
+
CUBE_TOUR_ANCHOR["CUBE_MENU"] = "cube-menu";
|
|
36
|
+
CUBE_TOUR_ANCHOR["ADD_ITEMS"] = "add-items";
|
|
37
|
+
CUBE_TOUR_ANCHOR["EXAMPLES"] = "examples";
|
|
38
|
+
CUBE_TOUR_ANCHOR["VIEW"] = "view";
|
|
39
|
+
CUBE_TOUR_ANCHOR["PAGE_MENU"] = "page-menu";
|
|
40
|
+
})(CUBE_TOUR_ANCHOR || (CUBE_TOUR_ANCHOR = {}));
|
|
41
|
+
/** The props that mark a control as a tour step's */
|
|
42
|
+
export const cubeTourAnchor = (anchor) => ({
|
|
43
|
+
[CUBE_TOUR_ANCHOR_ATTRIBUTE]: anchor,
|
|
44
|
+
});
|
|
45
|
+
/** The example the tour opens on an empty cube, where examples are offered */
|
|
46
|
+
export const CUBE_TOUR_EXAMPLE_ID = 'northwind-top-customers';
|
|
47
|
+
export const CUBE_EDITOR_TOUR = Object.freeze([
|
|
48
|
+
{
|
|
49
|
+
title: 'Welcome to Legend Cube',
|
|
50
|
+
text: 'A cube is a query built as a chain of steps: a source of rows, then steps that sort, group, filter or join them. This tour shows where everything is: Next (or the → key) moves on, and Esc ends it.',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
anchor: CUBE_TOUR_ANCHOR.SOURCES,
|
|
54
|
+
placement: 'right',
|
|
55
|
+
title: 'Sources',
|
|
56
|
+
text: 'Where the rows come from: a database table, a function, a data product or a service. Click one, or drop it on the canvas.',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
anchor: CUBE_TOUR_ANCHOR.STEPS,
|
|
60
|
+
placement: 'right',
|
|
61
|
+
title: 'Steps',
|
|
62
|
+
text: 'Each step works on the rows of the step before it. Click one to add it after the selected step, or drop it on the canvas. A greyed-out step says why when you hover over it.',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
anchor: CUBE_TOUR_ANCHOR.CANVAS,
|
|
66
|
+
placement: 'bottom',
|
|
67
|
+
title: 'The graph',
|
|
68
|
+
text: 'Your query, from left to right. Click a step to edit it: its editor opens beside it, with a ? that says what the step does.',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
anchor: CUBE_TOUR_ANCHOR.RUNNING_STEP,
|
|
72
|
+
placement: 'bottom',
|
|
73
|
+
title: 'The step that runs',
|
|
74
|
+
text: 'Execute runs the query up to the step marked Runs. To run up to another step, open its editor and click Run this step.',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
anchor: CUBE_TOUR_ANCHOR.EXECUTE,
|
|
78
|
+
placement: 'top',
|
|
79
|
+
title: 'Execute',
|
|
80
|
+
text: `Runs the query and shows its rows below (${EXECUTE_SHORTCUT_LABEL}). Rows caps how many rows come back.`,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
anchor: CUBE_TOUR_ANCHOR.GRID_MODE,
|
|
84
|
+
placement: 'top',
|
|
85
|
+
title: 'Server-side or Local',
|
|
86
|
+
text: 'Server-side: each sort and drill-down in the grid runs on the engine, over every row of the query. Local: the grid groups, pivots and filters the rows already fetched, in your browser.',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
anchor: CUBE_TOUR_ANCHOR.RESULTS,
|
|
90
|
+
placement: 'top',
|
|
91
|
+
title: 'The results',
|
|
92
|
+
text: 'The rows of the last run. Right-click a cell to sort, group or filter by its column as a new step, drill down, format a number column, or export the rows.',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
anchor: CUBE_TOUR_ANCHOR.SHOW_SQL,
|
|
96
|
+
placement: 'top',
|
|
97
|
+
title: 'Show SQL',
|
|
98
|
+
text: 'The SQL the last run sent to the database.',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
anchor: CUBE_TOUR_ANCHOR.RUNS,
|
|
102
|
+
placement: 'top',
|
|
103
|
+
title: 'Runs',
|
|
104
|
+
text: 'The latest runs, fetches and exports, each with its SQL and how long it took.',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
anchor: CUBE_TOUR_ANCHOR.CUBE_MENU,
|
|
108
|
+
placement: 'bottom',
|
|
109
|
+
title: 'The Cube menu',
|
|
110
|
+
text: 'Start a new cube, import or export one, or read a Pure query in as steps with Import Pure.',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
anchor: CUBE_TOUR_ANCHOR.ADD_ITEMS,
|
|
114
|
+
placement: 'bottom',
|
|
115
|
+
title: 'Add Items',
|
|
116
|
+
text: "The palette's sources and steps, as a menu.",
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
anchor: CUBE_TOUR_ANCHOR.EXAMPLES,
|
|
120
|
+
placement: 'bottom',
|
|
121
|
+
title: 'Examples',
|
|
122
|
+
text: 'Ready-made cubes on sample data, to try things out.',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
anchor: CUBE_TOUR_ANCHOR.VIEW,
|
|
126
|
+
placement: 'bottom',
|
|
127
|
+
title: 'Undo, Show Pure, Hide graph',
|
|
128
|
+
text: `Undo (${UNDO_SHORTCUT_LABEL}) and Redo (${REDO_SHORTCUT_LABEL}) every change. Show Pure shows the Pure query Execute runs. Hide graph leaves more room for the results.`,
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
anchor: CUBE_TOUR_ANCHOR.PAGE_MENU,
|
|
132
|
+
placement: 'right',
|
|
133
|
+
title: "That's the tour",
|
|
134
|
+
text: 'Take it again from this menu whenever you like.',
|
|
135
|
+
},
|
|
136
|
+
]);
|
|
137
|
+
export const CUBE_TOUR_LABEL = {
|
|
138
|
+
START: 'Take the tour',
|
|
139
|
+
/** The empty canvas's offer */
|
|
140
|
+
OFFER: 'New to Legend Cube?',
|
|
141
|
+
NEXT: 'Next',
|
|
142
|
+
BACK: 'Back',
|
|
143
|
+
DONE: 'Done',
|
|
144
|
+
END: 'End the tour',
|
|
145
|
+
progress: (step, steps) => `${step} of ${steps}`,
|
|
146
|
+
/** Added to the first step when the tour opened its example */
|
|
147
|
+
EXAMPLE_OPENED: 'The tour opened the example "Top customers by orders" to show you around; Undo puts the empty cube back.',
|
|
148
|
+
};
|
|
149
|
+
//# sourceMappingURL=LegendCubeTour.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendCubeTour.js","sourceRoot":"","sources":["../../src/__lib__/LegendCubeTour.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAEhC,6EAA6E;AAC7E,6EAA6E;AAC7E,6EAA6E;AAC7E,2EAA2E;AAC3E,mEAAmE;AAEnE,0DAA0D;AAC1D,MAAM,CAAC,MAAM,0BAA0B,GAAG,gBAAgB,CAAC;AAE3D,MAAM,CAAN,IAAY,gBAeX;AAfD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,qCAAiB,CAAA;IACjB,iDAA6B,CAAA;IAC7B,uCAAmB,CAAA;IACnB,2CAAuB,CAAA;IACvB,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,iCAAa,CAAA;IACb,2CAAuB,CAAA;IACvB,2CAAuB,CAAA;IACvB,yCAAqB,CAAA;IACrB,iCAAa,CAAA;IACb,2CAAuB,CAAA;AACzB,CAAC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,OAAO,KAAK,EAAE;IACxE,+DAA+D;IAC/D,cAAc,EACZ,0GAA0G;CAC7G,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 ModelContext, Query } from '@finos/legend-cube';
|
|
17
|
+
import type { CubeEngine } from '../graph-manager/CubeEngine.js';
|
|
18
|
+
import type { CubeExample } from '../stores/CubeExamples.js';
|
|
19
|
+
/**
|
|
20
|
+
* The query with each Extend typed by the engine, in node order, as the
|
|
21
|
+
* editor types them in the background
|
|
22
|
+
*/
|
|
23
|
+
export declare const TEST__typeExtendsOnEngine: (engine: CubeEngine, model: ModelContext, input: Query) => Promise<Query>;
|
|
24
|
+
/**
|
|
25
|
+
* An example's cube as opening it types it, on the engine: its tables, then
|
|
26
|
+
* each Extend, in node order, as the editor types it in the background (an
|
|
27
|
+
* Extend parsing JSON, PLAN §11.20)
|
|
28
|
+
*/
|
|
29
|
+
export declare const TEST__openExampleOnEngine: (engine: CubeEngine, example: CubeExample) => Promise<{
|
|
30
|
+
model: ModelContext;
|
|
31
|
+
runtime: string;
|
|
32
|
+
query: Query;
|
|
33
|
+
}>;
|
|
34
|
+
//# sourceMappingURL=CubeExampleTestUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeExampleTestUtils.d.ts","sourceRoot":"","sources":["../../src/__test-utils__/CubeExampleTestUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAIL,KAAK,YAAY,EACjB,KAAK,EAGN,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAKjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,yBAAyB,GACpC,QAAQ,UAAU,EAClB,OAAO,YAAY,EACnB,OAAO,KAAK,KACX,OAAO,CAAC,KAAK,CA6Bf,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GACpC,QAAQ,UAAU,EAClB,SAAS,WAAW,KACnB,OAAO,CAAC;IAAE,KAAK,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAuChE,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
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 { buildSchemasAndValidity, createNodeRegistry, Extend, Query, RelationalTableSource, Schema, } from '@finos/legend-cube';
|
|
17
|
+
import { buildCubeExtendTypingLambdas, readCubeExtendTyping, } from '../stores/CubeExtendTyping.js';
|
|
18
|
+
/**
|
|
19
|
+
* The query with each Extend typed by the engine, in node order, as the
|
|
20
|
+
* editor types them in the background
|
|
21
|
+
*/
|
|
22
|
+
export const TEST__typeExtendsOnEngine = async (engine, model, input) => {
|
|
23
|
+
const registry = createNodeRegistry();
|
|
24
|
+
let query = input;
|
|
25
|
+
for (const node of query.nodes) {
|
|
26
|
+
if (node instanceof Extend) {
|
|
27
|
+
const columns = node.columns.map(({ name, lambda }) => ({
|
|
28
|
+
name,
|
|
29
|
+
lambda: lambda,
|
|
30
|
+
}));
|
|
31
|
+
const [inputId] = query.getInputIds(node.id);
|
|
32
|
+
const answers = await engine.typeLambdas(model, buildCubeExtendTypingLambdas(query, node, columns, registry, false));
|
|
33
|
+
const { typing } = readCubeExtendTyping(answers, node, buildSchemasAndValidity(query, registry.queryRules).schemas.get(inputId ?? ''), columns, undefined);
|
|
34
|
+
query = query.replace(new Extend(node.id, node.columns, typing, node.rest));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return query;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* An example's cube as opening it types it, on the engine: its tables, then
|
|
41
|
+
* each Extend, in node order, as the editor types it in the background (an
|
|
42
|
+
* Extend parsing JSON, PLAN §11.20)
|
|
43
|
+
*/
|
|
44
|
+
export const TEST__openExampleOnEngine = async (engine, example) => {
|
|
45
|
+
const document = example.createDocument();
|
|
46
|
+
const model = document.context?.model;
|
|
47
|
+
const runtime = document.context?.runtime;
|
|
48
|
+
if (!model || !runtime) {
|
|
49
|
+
throw new Error(`Example ${example.id} has no model or runtime`);
|
|
50
|
+
}
|
|
51
|
+
const sources = document.query.nodes.filter((node) => node instanceof RelationalTableSource);
|
|
52
|
+
const typed = await engine.resolveSchemas(model, new Map(sources.map((source) => [
|
|
53
|
+
source.id,
|
|
54
|
+
[source.database, source.schema, source.table],
|
|
55
|
+
])));
|
|
56
|
+
const query = new Query(document.query.nodes.map((node) => {
|
|
57
|
+
if (!(node instanceof RelationalTableSource)) {
|
|
58
|
+
return node;
|
|
59
|
+
}
|
|
60
|
+
const schema = typed.get(node.id);
|
|
61
|
+
if (!(schema instanceof Schema)) {
|
|
62
|
+
throw schema ?? new Error(`No schema for ${node.id}`);
|
|
63
|
+
}
|
|
64
|
+
return node.withResolution({ kind: 'resolved', schema });
|
|
65
|
+
}), document.query.connections, document.query.selected);
|
|
66
|
+
return {
|
|
67
|
+
model,
|
|
68
|
+
runtime,
|
|
69
|
+
query: await TEST__typeExtendsOnEngine(engine, model, query),
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=CubeExampleTestUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeExampleTestUtils.js","sourceRoot":"","sources":["../../src/__test-utils__/CubeExampleTestUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,MAAM,EAEN,KAAK,EACL,qBAAqB,EACrB,MAAM,GACP,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,GACrB,MAAM,+BAA+B,CAAC;AAGvC;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,EAC5C,MAAkB,EAClB,KAAmB,EACnB,KAAY,EACI,EAAE;IAClB,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;IACtC,IAAI,KAAK,GAAG,KAAK,CAAC;IAClB,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QAC/B,IAAI,IAAI,YAAY,MAAM,EAAE,CAAC;YAC3B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;gBACtD,IAAI;gBACJ,MAAM,EAAE,MAAoC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AAY,qBAAqB,CACxC,CAAC;IACF,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,cAAc,CACvC,KAAK,EACL,IAAI,GAAG,CACL,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;QACtB,MAAM,CAAC,EAAE;QACT,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAU;KACxD,CAAC,CACH,CACF,CAAC;IACF,MAAM,KAAK,GAAG,IAAI,KAAK,CACrB,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAChC,IAAI,CAAC,CAAC,IAAI,YAAY,qBAAqB,CAAC,EAAE,CAAC;YAC7C,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAClC,IAAI,CAAC,CAAC,MAAM,YAAY,MAAM,CAAC,EAAE,CAAC;YAChC,MAAM,MAAM,IAAI,IAAI,KAAK,CAAC,iBAAiB,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QACxD,CAAC;QACD,OAAO,IAAI,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC;IAC3D,CAAC,CAAC,EACF,QAAQ,CAAC,KAAK,CAAC,WAAW,EAC1B,QAAQ,CAAC,KAAK,CAAC,QAAQ,CACxB,CAAC;IACF,OAAO;QACL,KAAK;QACL,OAAO;QACP,KAAK,EAAE,MAAM,yBAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC;KAC7D,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SchemaColumn } from '@finos/legend-cube';
|
|
2
|
+
import type { CubeResult } from '../graph-manager/CubeEngine.js';
|
|
3
|
+
import { CubeEditorState } from '../stores/CubeEditorState.js';
|
|
4
|
+
import { type FakeCubeEngine } from './FakeCubeEngine.js';
|
|
5
|
+
export declare const TEST__PAYLOAD: SchemaColumn;
|
|
6
|
+
/** ORDERS' columns in these tests: an id, PAYLOAD, and a number */
|
|
7
|
+
export declare const TEST__PAYLOAD_COLUMNS: SchemaColumn[];
|
|
8
|
+
export declare const TEST__PAYLOAD_DOCUMENTS: string[];
|
|
9
|
+
/** The engine's answer to a read of PAYLOAD: these documents, one per row */
|
|
10
|
+
export declare const TEST__payloadSample: (documents?: readonly string[]) => CubeResult;
|
|
11
|
+
/** The table alone, run once on a database of this type; later runs read the sample */
|
|
12
|
+
export declare const TEST__setUpPayloadRun: (databaseType?: string, sample?: CubeResult) => Promise<{
|
|
13
|
+
state: CubeEditorState;
|
|
14
|
+
fake: FakeCubeEngine;
|
|
15
|
+
}>;
|
|
16
|
+
//# sourceMappingURL=CubeVariantTestUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeVariantTestUtils.d.ts","sourceRoot":"","sources":["../../src/__test-utils__/CubeVariantTestUtils.ts"],"names":[],"mappings":"AAgBA,OAAO,EAIL,YAAY,EACb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAO/D,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAM7B,eAAO,MAAM,aAAa,cAIzB,CAAC;AAEF,mEAAmE;AACnE,eAAO,MAAM,qBAAqB,gBASjC,CAAC;AAEF,eAAO,MAAM,uBAAuB,UAGnC,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,GAC9B,YAAW,SAAS,MAAM,EAA4B,KACrD,UAKD,CAAC;AAEH,uFAAuF;AACvF,eAAO,MAAM,qBAAqB,GAChC,qBAAuB,EACvB,SAAQ,UAAkC,KACzC,OAAO,CAAC;IAAE,KAAK,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,cAAc,CAAA;CAAE,CAyB1D,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
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 { expect } from '@jest/globals';
|
|
17
|
+
import { CubeDocument, PrimitiveType, Query, SchemaColumn, } from '@finos/legend-cube';
|
|
18
|
+
import { flowResult } from 'mobx';
|
|
19
|
+
import { CubeEditorState } from '../stores/CubeEditorState.js';
|
|
20
|
+
import { CUBE_NORTHWIND_MODEL } from '../stores/fixtures/CubeNorthwindModel.js';
|
|
21
|
+
import { TEST__createCubeHost } from './CubeTestApplication.js';
|
|
22
|
+
import { NORTHWIND_RUNTIME, northwindTable, } from './CubeNorthwindTestQueries.js';
|
|
23
|
+
import { createFakeNorthwindOutline, } from './FakeCubeEngine.js';
|
|
24
|
+
// A cube whose rows hold a Variant column, PAYLOAD, for Explore JSON's tests
|
|
25
|
+
// (PLAN §11.20): Northwind's ORDERS as a table of a model whose runtime runs on
|
|
26
|
+
// the database type given
|
|
27
|
+
export const TEST__PAYLOAD = new SchemaColumn('PAYLOAD', PrimitiveType.get('Variant'), true);
|
|
28
|
+
/** ORDERS' columns in these tests: an id, PAYLOAD, and a number */
|
|
29
|
+
export const TEST__PAYLOAD_COLUMNS = [
|
|
30
|
+
new SchemaColumn('ORDER_ID', PrimitiveType.get('meta::pure::precisePrimitives::Int'), false),
|
|
31
|
+
TEST__PAYLOAD,
|
|
32
|
+
// a name an offer would take, in another case
|
|
33
|
+
new SchemaColumn('PAYLOAD_TAGS_COUNT', PrimitiveType.get('Integer'), true),
|
|
34
|
+
];
|
|
35
|
+
export const TEST__PAYLOAD_DOCUMENTS = [
|
|
36
|
+
'{"user":{"name":"ann","tier":"gold"},"tags":["a","b"]}',
|
|
37
|
+
'{"user":{"name":"bob"},"tags":[]}',
|
|
38
|
+
];
|
|
39
|
+
/** The engine's answer to a read of PAYLOAD: these documents, one per row */
|
|
40
|
+
export const TEST__payloadSample = (documents = TEST__PAYLOAD_DOCUMENTS) => ({
|
|
41
|
+
columns: ['PAYLOAD'],
|
|
42
|
+
rows: documents.map((document) => [document]),
|
|
43
|
+
sql: [],
|
|
44
|
+
durationMs: 1,
|
|
45
|
+
});
|
|
46
|
+
/** The table alone, run once on a database of this type; later runs read the sample */
|
|
47
|
+
export const TEST__setUpPayloadRun = async (databaseType = 'DuckDB', sample = TEST__payloadSample()) => {
|
|
48
|
+
const { host, fake } = TEST__createCubeHost({
|
|
49
|
+
result: {
|
|
50
|
+
columns: TEST__PAYLOAD_COLUMNS.map((column) => column.name),
|
|
51
|
+
rows: [['1', TEST__PAYLOAD_DOCUMENTS[0] ?? null, '2']],
|
|
52
|
+
sql: [],
|
|
53
|
+
durationMs: 1,
|
|
54
|
+
},
|
|
55
|
+
outline: createFakeNorthwindOutline(databaseType),
|
|
56
|
+
});
|
|
57
|
+
const state = new CubeEditorState(host, new CubeDocument({
|
|
58
|
+
context: { model: CUBE_NORTHWIND_MODEL, runtime: NORTHWIND_RUNTIME },
|
|
59
|
+
query: new Query([northwindTable('relational101', 'ORDERS', TEST__PAYLOAD_COLUMNS)], [], 'relational101'),
|
|
60
|
+
}));
|
|
61
|
+
await flowResult(state.execution.execute());
|
|
62
|
+
expect(state.execution.result).toBeDefined();
|
|
63
|
+
fake.execute.mockResolvedValue(sample);
|
|
64
|
+
return { state, fake };
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=CubeVariantTestUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeVariantTestUtils.js","sourceRoot":"","sources":["../../src/__test-utils__/CubeVariantTestUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,KAAK,EACL,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EACL,iBAAiB,EACjB,cAAc,GACf,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,0BAA0B,GAE3B,MAAM,qBAAqB,CAAC;AAE7B,6EAA6E;AAC7E,gFAAgF;AAChF,0BAA0B;AAE1B,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,YAAY,CAC3C,SAAS,EACT,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,EAC5B,IAAI,CACL,CAAC;AAEF,mEAAmE;AACnE,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,IAAI,YAAY,CACd,UAAU,EACV,aAAa,CAAC,GAAG,CAAC,oCAAoC,CAAC,EACvD,KAAK,CACN;IACD,aAAa;IACb,8CAA8C;IAC9C,IAAI,YAAY,CAAC,oBAAoB,EAAE,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC;CAC3E,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,wDAAwD;IACxD,mCA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K,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IAC7C,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACzB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeAddItems.d.ts","sourceRoot":"","sources":["../../src/components/CubeAddItems.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"CubeAddItems.d.ts","sourceRoot":"","sources":["../../src/components/CubeAddItems.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA0BH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AA8CpE,sEAAsE;AACtE,eAAO,MAAM,gBAAgB,WACnB;IAAE,WAAW,EAAE,eAAe,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE;;CA0BtE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,WACnB;IAAE,WAAW,EAAE,eAAe,CAAA;CAAE;;CAgEzC,CAAC"}
|
|
@@ -17,6 +17,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
17
17
|
import { CaretDownIcon, clsx, DropdownMenu, DropdownMenuItem, MenuContentDivider, MenuContentItem, MenuContentItemIcon, MenuContentItemLabel, useDropdownMenu, } from '@finos/legend-art';
|
|
18
18
|
import { observer } from 'mobx-react-lite';
|
|
19
19
|
import { getCubeNodeBadge, OTHER_SOURCE_KIND_TITLE, READ_ONLY_CUBE_TITLE, } from '../__lib__/LegendCubeLabels.js';
|
|
20
|
+
import { CUBE_TOUR_ANCHOR, cubeTourAnchor } from '../__lib__/LegendCubeTour.js';
|
|
20
21
|
import { addCubeNode, canAddCubeNode, getCubeAddDatabaseProblem, } from '../stores/CubeAddPlacement.js';
|
|
21
22
|
import { CubeNodeIcon } from './CubeNodeIcon.js';
|
|
22
23
|
/**
|
|
@@ -73,7 +74,7 @@ export const CubeAddItemsMenu = observer((props) => {
|
|
|
73
74
|
}, children: [_jsx(CubeNodeIcon, { icon: item.definition.icon }), _jsx("span", { children: item.label })] }, item.definition.type));
|
|
74
75
|
return (_jsxs(_Fragment, { children: [_jsxs("button", { type: "button", className: "flex h-6 shrink-0 items-center gap-1 rounded-sm border border-[var(--color-border-default)] bg-[var(--color-bg-elevated)] px-2 text-base text-[var(--color-text-primary)] enabled:cursor-pointer enabled:hover:bg-[var(--color-bg-hover)] disabled:cursor-not-allowed disabled:text-[var(--color-text-disabled)]", disabled: readOnly, title: readOnly
|
|
75
76
|
? READ_ONLY_CUBE_TITLE
|
|
76
|
-
: 'Add a source, or a step after the selected node', "aria-haspopup": "menu", "aria-expanded": isOpen, onClick: openMenu, children: ["Add Items", _jsx(CaretDownIcon, { "aria-hidden": true })] }), _jsxs(DropdownMenu, { ...menuProps, menuProps: {
|
|
77
|
+
: 'Add a source, or a step after the selected node', ...cubeTourAnchor(CUBE_TOUR_ANCHOR.ADD_ITEMS), "aria-haspopup": "menu", "aria-expanded": isOpen, onClick: openMenu, children: ["Add Items", _jsx(CaretDownIcon, { "aria-hidden": true })] }), _jsxs(DropdownMenu, { ...menuProps, menuProps: {
|
|
77
78
|
elevation: 7,
|
|
78
79
|
slotProps: {
|
|
79
80
|
root: { slotProps: { backdrop: { invisible: true } } },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeAddItems.js","sourceRoot":"","sources":["../../src/components/CubeAddItems.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,aAAa,EACb,IAAI,EACJ,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EA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,"file":"CubeEditor.d.ts","sourceRoot":"","sources":["../../src/components/CubeEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAUH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAgBvD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,KAAK,QAAQ,EAA2B,MAAM,uBAAuB,CAAC;AAiC/E,oEAAoE;AACpE,MAAM,MAAM,iBAAiB,GAAG,CAC9B,WAAW,EAAE,eAAe,KACzB,KAAK,CAAC,SAAS,CAAC;AA+IrB;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,WACb;IACN,IAAI,EAAE,QAAQ,CAAC;IACf,gDAAgD;IAChD,eAAe,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IAC3C,kFAAkF;IAClF,aAAa,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;IAC5C;;;OAGG;IACH,aAAa,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC9C,kFAAkF;IAClF,aAAa,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;CAC/C;;CA8DF,CAAC"}
|
|
@@ -22,6 +22,7 @@ import { useEffect, useState } from 'react';
|
|
|
22
22
|
import { REDO_SHORTCUT_LABEL, UNDO_SHORTCUT_LABEL, } from '../__lib__/LegendCubeCommand.js';
|
|
23
23
|
import { CUBE_PENDING_LABEL, formatDisabledReasons, READ_ONLY_CUBE_TITLE, UNSAVED_CUBE_NAME, } from '../__lib__/LegendCubeLabels.js';
|
|
24
24
|
import { LEGEND_CUBE_TEST_ID } from '../__lib__/LegendCubeTesting.js';
|
|
25
|
+
import { CUBE_TOUR_ANCHOR, cubeTourAnchor } from '../__lib__/LegendCubeTour.js';
|
|
25
26
|
import { CubeEditorState } from '../stores/CubeEditorState.js';
|
|
26
27
|
import { CubeEntrySourceState, } from '../stores/CubeEntrySource.js';
|
|
27
28
|
import { isCubeSampleDataOffered } from '../stores/CubeHost.js';
|
|
@@ -34,11 +35,14 @@ import { CubeGridRegion } from './grid/CubeGridRegion.js';
|
|
|
34
35
|
import { CubePalette } from './palette/CubePalette.js';
|
|
35
36
|
import { CubeDevSettingsDialog } from './dev-settings/CubeDevSettings.js';
|
|
36
37
|
import { CubeShowPureDialog } from './show-pure/CubeShowPureDialog.js';
|
|
38
|
+
import { CubeJsonViewerDialog } from './grid/CubeJsonViewerDialog.js';
|
|
39
|
+
import { CubeJsonExplorerDialog } from './grid/CubeJsonExplorerDialog.js';
|
|
37
40
|
import { CubeExamplesDialog } from './examples/CubeExamplesDialog.js';
|
|
38
41
|
import { CubeFileMenu } from './CubeFileMenu.js';
|
|
39
42
|
import { CubeSourcePicker } from './source-picker/CubeSourcePicker.js';
|
|
40
43
|
import { CubeSpecTransferDialog } from './spec-transfer/CubeSpecTransferDialog.js';
|
|
41
44
|
import { CubeImportPureDialog } from './spec-transfer/CubeImportPureDialog.js';
|
|
45
|
+
import { CubeTour } from './tour/CubeTour.js';
|
|
42
46
|
/** The graph never takes more of the window's height than this, so the results stay in view (spec §17.3) */
|
|
43
47
|
const MAX_GRAPH_SHARE_OF_WINDOW = 0.6;
|
|
44
48
|
/** The tallest the graph region may be, following the window's height */
|
|
@@ -60,9 +64,9 @@ const CubeGraphHeader = observer((props) => {
|
|
|
60
64
|
const { editorState, headerActions } = props;
|
|
61
65
|
const { readOnly } = editorState;
|
|
62
66
|
const { showGraph } = editorState.document.meta.presentation;
|
|
63
|
-
return (_jsxs("div", { className: "flex shrink-0 flex-col bg-[var(--color-bg-panel)]", "data-testid": LEGEND_CUBE_TEST_ID.GRAPH_REGION, children: [_jsxs("div", { className: "flex min-h-8 shrink-0 flex-wrap items-center gap-2 border-b border-[var(--color-border-default)] bg-[var(--color-bg-panel-header)] px-2 py-1", children: [_jsx("span", { className: "min-w-24 flex-1 truncate text-lg font-medium", children: editorState.document.name ?? UNSAVED_CUBE_NAME }), editorState.isResolvingSources && (_jsx("span", { className: "shrink-0 text-base text-[var(--color-text-secondary)]", children: CUBE_PENDING_LABEL.RESOLVING_SOURCE })), editorState.isCheckingExpressions && (_jsx("span", { className: "shrink-0 text-base text-[var(--color-text-secondary)]", children: CUBE_PENDING_LABEL.CHECKING_EXPRESSIONS })), _jsx(CubeFileMenu, { editorState: editorState }), _jsx(CubeAddItemsMenu, { editorState: editorState }), isCubeSampleDataOffered(editorState.host) && (_jsx(CubeButton, { title: "Open an example cube, or start one on sample data", onClick: () => editorState.examples.open(), children: "Examples" })), _jsx(CubeButton, { title: readOnly
|
|
67
|
+
return (_jsxs("div", { className: "flex shrink-0 flex-col bg-[var(--color-bg-panel)]", "data-testid": LEGEND_CUBE_TEST_ID.GRAPH_REGION, children: [_jsxs("div", { className: "flex min-h-8 shrink-0 flex-wrap items-center gap-2 border-b border-[var(--color-border-default)] bg-[var(--color-bg-panel-header)] px-2 py-1", children: [_jsx("span", { className: "min-w-24 flex-1 truncate text-lg font-medium", children: editorState.document.name ?? UNSAVED_CUBE_NAME }), editorState.isResolvingSources && (_jsx("span", { className: "shrink-0 text-base text-[var(--color-text-secondary)]", children: CUBE_PENDING_LABEL.RESOLVING_SOURCE })), editorState.isCheckingExpressions && (_jsx("span", { className: "shrink-0 text-base text-[var(--color-text-secondary)]", children: CUBE_PENDING_LABEL.CHECKING_EXPRESSIONS })), _jsx(CubeFileMenu, { editorState: editorState }), _jsx(CubeAddItemsMenu, { editorState: editorState }), isCubeSampleDataOffered(editorState.host) && (_jsx(CubeButton, { title: "Open an example cube, or start one on sample data", ...cubeTourAnchor(CUBE_TOUR_ANCHOR.EXAMPLES), onClick: () => editorState.examples.open(), children: "Examples" })), _jsx(CubeButton, { ...cubeTourAnchor(CUBE_TOUR_ANCHOR.VIEW), title: readOnly
|
|
64
68
|
? READ_ONLY_CUBE_TITLE
|
|
65
|
-
: `Undo the last change (${UNDO_SHORTCUT_LABEL})`, disabled: !editorState.canUndo && !editorState.hasEditsToApply, onClick: () => editorState.undoEdited(), children: "Undo" }), _jsx(CubeButton, { title: `Redo the last change undone (${REDO_SHORTCUT_LABEL})`, disabled: !editorState.canRedo, onClick: () => editorState.redoEdited(), children: "Redo" }), _jsx(CubeButton, { title: editorState.execution.canExecute
|
|
69
|
+
: `Undo the last change (${UNDO_SHORTCUT_LABEL})`, disabled: !editorState.canUndo && !editorState.hasEditsToApply, onClick: () => editorState.undoEdited(), children: "Undo" }), _jsx(CubeButton, { ...cubeTourAnchor(CUBE_TOUR_ANCHOR.VIEW), title: `Redo the last change undone (${REDO_SHORTCUT_LABEL})`, disabled: !editorState.canRedo, onClick: () => editorState.redoEdited(), children: "Redo" }), _jsx(CubeButton, { ...cubeTourAnchor(CUBE_TOUR_ANCHOR.VIEW), title: editorState.execution.canExecute
|
|
66
70
|
? 'Show the Pure query that Execute runs'
|
|
67
71
|
: formatDisabledReasons(editorState.execution.disabledReasons), disabled: !editorState.execution.canExecute, onClick: () => {
|
|
68
72
|
// what it shows includes the node editor's edits, as Execute runs them
|
|
@@ -70,14 +74,14 @@ const CubeGraphHeader = observer((props) => {
|
|
|
70
74
|
return;
|
|
71
75
|
}
|
|
72
76
|
flowResult(editorState.showPure.open()).catch(editorState.host.applicationStore.alertUnhandledError);
|
|
73
|
-
}, children: "Show Pure" }), _jsx(CubeButton, { title: showGraph
|
|
77
|
+
}, children: "Show Pure" }), _jsx(CubeButton, { ...cubeTourAnchor(CUBE_TOUR_ANCHOR.VIEW), title: showGraph
|
|
74
78
|
? 'Hide the graph, leaving more room for the results'
|
|
75
79
|
: 'Show the graph', onClick: () => {
|
|
76
80
|
// the floating editor goes with the graph, applying its edits
|
|
77
81
|
if (!showGraph || editorState.nodeEditor.finish()) {
|
|
78
82
|
editorState.setShowGraph(!showGraph);
|
|
79
83
|
}
|
|
80
|
-
}, children: showGraph ? 'Hide graph' : 'Show graph' }), headerActions?.(editorState)] }), _jsx(PanelLoadingIndicator, { isLoading: editorState.isResolvingSources || editorState.isCheckingExpressions }), readOnly && (_jsxs("div", { className: "shrink-0 border-b border-[var(--color-border-default)] bg-[var(--color-status-warn-bg)] px-2 py-1 text-base text-[var(--color-status-warn)]", role: "status", children: [READ_ONLY_CUBE_TITLE, ". You can view and run it."] })), editorState.nodeEditor.notice && (_jsxs("div", { className: "flex shrink-0 items-center gap-2 border-b border-[var(--color-border-default)] bg-[var(--color-status-warn-bg)] px-2 py-1 text-base text-[var(--color-status-warn)]", role: "status", "data-testid": LEGEND_CUBE_TEST_ID.EDITOR_NOTICE, children: [_jsx("span", { className: "min-w-0 flex-1", children: editorState.nodeEditor.notice }), _jsx(CubeButton, { onClick: () => editorState.nodeEditor.dismissNotice(), children: "Dismiss" })] })), _jsx(CubeSourcePicker, { editorState: editorState }), _jsx(CubeExamplesDialog, { editorState: editorState }), _jsx(CubeSpecTransferDialog, { editorState: editorState }), _jsx(CubeImportPureDialog, { editorState: editorState }), _jsx(CubeShowPureDialog, { editorState: editorState }), _jsx(CubeDevSettingsDialog, { editorState: editorState })] }));
|
|
84
|
+
}, children: showGraph ? 'Hide graph' : 'Show graph' }), headerActions?.(editorState)] }), _jsx(PanelLoadingIndicator, { isLoading: editorState.isResolvingSources || editorState.isCheckingExpressions }), readOnly && (_jsxs("div", { className: "shrink-0 border-b border-[var(--color-border-default)] bg-[var(--color-status-warn-bg)] px-2 py-1 text-base text-[var(--color-status-warn)]", role: "status", children: [READ_ONLY_CUBE_TITLE, ". You can view and run it."] })), editorState.nodeEditor.notice && (_jsxs("div", { className: "flex shrink-0 items-center gap-2 border-b border-[var(--color-border-default)] bg-[var(--color-status-warn-bg)] px-2 py-1 text-base text-[var(--color-status-warn)]", role: "status", "data-testid": LEGEND_CUBE_TEST_ID.EDITOR_NOTICE, children: [_jsx("span", { className: "min-w-0 flex-1", children: editorState.nodeEditor.notice }), _jsx(CubeButton, { onClick: () => editorState.nodeEditor.dismissNotice(), children: "Dismiss" })] })), _jsx(CubeSourcePicker, { editorState: editorState }), _jsx(CubeExamplesDialog, { editorState: editorState }), _jsx(CubeSpecTransferDialog, { editorState: editorState }), _jsx(CubeImportPureDialog, { editorState: editorState }), _jsx(CubeShowPureDialog, { editorState: editorState }), _jsx(CubeJsonViewerDialog, { editorState: editorState }), _jsx(CubeJsonExplorerDialog, { editorState: editorState }), _jsx(CubeDevSettingsDialog, { editorState: editorState })] }));
|
|
81
85
|
});
|
|
82
86
|
/**
|
|
83
87
|
* The Legend Cube page: the query above, its results below, both always
|
|
@@ -107,6 +111,8 @@ export const CubeEditor = observer((props) => {
|
|
|
107
111
|
// hiding the graph collapses its panel: the header and the results stay
|
|
108
112
|
// where they are, so the grid keeps its state
|
|
109
113
|
const graphPanel = getCollapsiblePanelGroupProps(!showGraph);
|
|
110
|
-
|
|
114
|
+
// the page, whose controls the tour points at
|
|
115
|
+
const [page, setPage] = useState(null);
|
|
116
|
+
return (_jsxs("div", { ref: setPage, className: "legend-cube flex bg-[var(--color-bg-app)] text-[var(--color-text-primary)]", "data-testid": LEGEND_CUBE_TEST_ID.EDITOR, children: [_jsx(CubePalette, { editorState: editorState }), _jsxs("div", { className: "flex h-full min-w-0 flex-1 flex-col", children: [_jsx(CubeGraphHeader, { editorState: editorState, headerActions: props.headerActions }), _jsx(CubeEntrySourceBanner, { entry: entry }), _jsx(CubeLambdaImportBanner, { lambdaImport: editorState.lambdaImport }), _jsxs(ResizablePanelGroup, { orientation: "horizontal", children: [_jsx(ResizablePanel, { ...graphPanel.collapsiblePanel, minSize: showGraph ? 96 : 0, maxSize: maxGraphHeight, children: showGraph && _jsx(CubeCanvas, { editorState: editorState }) }), _jsx(ResizablePanelSplitter, { className: showGraph ? '' : 'hidden' }), _jsx(ResizablePanel, { ...graphPanel.remainingPanel, minSize: 96, children: _jsx(CubeGridRegion, { editorState: editorState }) })] })] }), _jsx(CubeTour, { editorState: editorState, root: page })] }));
|
|
111
117
|
});
|
|
112
118
|
//# sourceMappingURL=CubeEditor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeEditor.js","sourceRoot":"","sources":["../../src/components/CubeEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAEL,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAiB,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,0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.ts","sourceRoot":"","sources":["../../src/components/CubeFileMenu.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"CubeFileMenu.d.ts","sourceRoot":"","sources":["../../src/components/CubeFileMenu.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAYH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AASpE;;;;;GAKG;AACH,eAAO,MAAM,YAAY,WACf;IAAE,WAAW,EAAE,eAAe,CAAA;CAAE;;CAsFzC,CAAC"}
|
|
@@ -17,6 +17,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
17
17
|
import { CaretDownIcon, clsx, DropdownMenu, DropdownMenuItem, useDropdownMenu, } from '@finos/legend-art';
|
|
18
18
|
import { observer } from 'mobx-react-lite';
|
|
19
19
|
import { READ_ONLY_CUBE_TITLE } from '../__lib__/LegendCubeLabels.js';
|
|
20
|
+
import { CUBE_TOUR_ANCHOR, cubeTourAnchor } from '../__lib__/LegendCubeTour.js';
|
|
20
21
|
/**
|
|
21
22
|
* 'Cube ▾' in the graph's header (the review of the demo, 2026-10-13): what
|
|
22
23
|
* acts on the cube as a whole, New, Import, Import Pure and Export, under one button, so
|
|
@@ -61,7 +62,7 @@ export const CubeFileMenu = observer((props) => {
|
|
|
61
62
|
},
|
|
62
63
|
},
|
|
63
64
|
];
|
|
64
|
-
return (_jsxs(_Fragment, { children: [_jsxs("button", { type: "button", className: "flex h-6 shrink-0 items-center gap-1 rounded-sm border border-[var(--color-border-default)] bg-[var(--color-bg-elevated)] px-2 text-base text-[var(--color-text-primary)] enabled:cursor-pointer enabled:hover:bg-[var(--color-bg-hover)]", title: "New, Import, Import Pure and Export", "aria-haspopup": "menu", "aria-expanded": isOpen, onClick: openMenu, children: ["Cube", _jsx(CaretDownIcon, { "aria-hidden": true })] }), _jsx(DropdownMenu, { ...menuProps, menuProps: {
|
|
65
|
+
return (_jsxs(_Fragment, { children: [_jsxs("button", { type: "button", className: "flex h-6 shrink-0 items-center gap-1 rounded-sm border border-[var(--color-border-default)] bg-[var(--color-bg-elevated)] px-2 text-base text-[var(--color-text-primary)] enabled:cursor-pointer enabled:hover:bg-[var(--color-bg-hover)]", title: "New, Import, Import Pure and Export", ...cubeTourAnchor(CUBE_TOUR_ANCHOR.CUBE_MENU), "aria-haspopup": "menu", "aria-expanded": isOpen, onClick: openMenu, children: ["Cube", _jsx(CaretDownIcon, { "aria-hidden": true })] }), _jsx(DropdownMenu, { ...menuProps, menuProps: {
|
|
65
66
|
elevation: 7,
|
|
66
67
|
slotProps: {
|
|
67
68
|
root: { slotProps: { backdrop: { invisible: true } } },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeFileMenu.js","sourceRoot":"","sources":["../../src/components/CubeFileMenu.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,aAAa,EACb,IAAI,EACJ,YAAY,EACZ,gBAAgB,EAChB,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"CubeFileMenu.js","sourceRoot":"","sources":["../../src/components/CubeFileMenu.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,aAAa,EACb,IAAI,EACJ,YAAY,EACZ,gBAAgB,EAChB,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAUhF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YA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AAC,gBAAgB,CAAC,SAAS,CAAC,mBAChC,MAAM,mBACL,MAAM,EACrB,OAAO,EAAE,QAAQ,qBAGjB,KAAC,aAAa,mBAAc,IAAI,GAAI,IAC7B,EACT,KAAC,YAAY,OACP,SAAS,EACb,SAAS,EAAE;oBACT,SAAS,EAAE,CAAC;oBACZ,SAAS,EAAE;wBACT,IAAI,EAAE,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE;wBACtD,IAAI,EAAE,EAAE,sBAAsB,EAAE,IAAI,EAAE;qBACvC;iBACF,YAEA,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,KAAC,gBAAgB,IAEf,SAAS,EAAE,IAAI,CACb,gBAAgB,EAChB,IAAI,CAAC,QAAQ,IAAI,gCAAgC,CAClD,mBAEc,IAAI,CAAC,QAAQ,EAC5B,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,GAAG,EAAE;wBACZ,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;4BACnB,SAAS,EAAE,CAAC;4BACZ,IAAI,CAAC,GAAG,EAAE,CAAC;wBACb,CAAC;oBACH,CAAC,YAEA,IAAI,CAAC,KAAK,IAfN,IAAI,CAAC,KAAK,CAgBE,CACpB,CAAC,GACW,IACd,CACJ,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeNodeIcon.d.ts","sourceRoot":"","sources":["../../src/components/CubeNodeIcon.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"CubeNodeIcon.d.ts","sourceRoot":"","sources":["../../src/components/CubeNodeIcon.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAuDH,2FAA2F;AAC3F,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAG,OACd,CAAC;AAElC,oFAAoF;AACpF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAClC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAQA,CAAC"}
|
|
@@ -14,7 +14,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { AlignBottomIcon, AlignMiddleIcon, AlignTopIcon, ArrowsJoinIcon, CalculatorIcon, CodeIcon, CompareIcon, CompressIcon, DataCubeIcon, DatabaseImportIcon, clsx, FilterIcon, FunctionIcon, LayerGroupIcon, PackageIcon, PencilIcon, QuestionSquareIcon, RobotIcon, SigmaIcon, SortIcon, TableIcon, } from '@finos/legend-art';
|
|
17
|
+
import { AlignBottomIcon, AlignMiddleIcon, AlignTopIcon, ArrowsJoinIcon, ArrowsSplitIcon, CalculatorIcon, CodeIcon, CompareIcon, CompressIcon, DataCubeIcon, DatabaseImportIcon, clsx, FilterIcon, FunctionIcon, LayerGroupIcon, PackageIcon, PencilIcon, QuestionSquareIcon, RobotIcon, SigmaIcon, SortIcon, TableIcon, } from '@finos/legend-art';
|
|
18
18
|
/** The icon of each icon name a node definition gives (`NodeDefinition.icon`) */
|
|
19
19
|
const NODE_ICONS = {
|
|
20
20
|
table: TableIcon,
|
|
@@ -28,6 +28,7 @@ const NODE_ICONS = {
|
|
|
28
28
|
concat: LayerGroupIcon,
|
|
29
29
|
difference: CompareIcon,
|
|
30
30
|
extend: CalculatorIcon,
|
|
31
|
+
explode: ArrowsSplitIcon,
|
|
31
32
|
limit: AlignTopIcon,
|
|
32
33
|
drop: AlignBottomIcon,
|
|
33
34
|
slice: AlignMiddleIcon,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeNodeIcon.js","sourceRoot":"","sources":["../../src/components/CubeNodeIcon.tsx"],"names":[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ACpB,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,QAAQ;CACf,CAAC;AAEF,2FAA2F;AAC3F,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAY,EAAW,EAAE,CACvD,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AAElC,oFAAoF;AACpF,MAAM,CAAC,MAAM,YAAY,GAGpB,CAAC,KAAK,EAAE,EAAE;IACb,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAClC,wEAAwE;IACxE,MAAM,IAAI,GACR,IAAI,KAAK,SAAS,IAAI,eAAe,CAAC,IAAI,CAAC;QACzC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC;QAC1C,CAAC,CAAC,kBAAkB,CAAC;IACzB,OAAO,KAAC,IAAI,IAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,GAAI,CAAC;AAC9C,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeCanvas.d.ts","sourceRoot":"","sources":["../../../src/components/canvas/CubeCanvas.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAEL,KAAK,UAAU,IAAI,cAAc,EAEjC,KAAK,IAAI,EAOV,MAAM,eAAe,CAAC;AAGvB,OAAO,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"CubeCanvas.d.ts","sourceRoot":"","sources":["../../../src/components/canvas/CubeCanvas.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAEL,KAAK,UAAU,IAAI,cAAc,EAEjC,KAAK,IAAI,EAOV,MAAM,eAAe,CAAC;AAGvB,OAAO,8BAA8B,CAAC;AAWtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAgCvE;;;GAGG;AACH,eAAO,MAAM,2BAA2B,GACtC,OAAO,KAAK,EACZ,YAAY,cAAc,GAAG,IAAI,KAChC,OAOA,CAAC;AAuKJ;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,WACb;IAAE,WAAW,EAAE,eAAe,CAAA;CAAE;;CAqFzC,CAAC"}
|