@finos/legend-application-repl 0.0.28 → 0.0.29
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/grammar/datacube_filter__lexer.g4 +40 -0
- package/grammar/datacube_filter__parser.g4 +14 -0
- package/grammar/generateGrammar.js +43 -0
- package/grammar/parser/generated/datacube_filter__lexer.interp +59 -0
- package/grammar/parser/generated/datacube_filter__lexer.tokens +14 -0
- package/grammar/parser/generated/datacube_filter__lexer.ts +142 -0
- package/grammar/parser/generated/datacube_filter__parser.interp +38 -0
- package/grammar/parser/generated/datacube_filter__parser.tokens +14 -0
- package/grammar/parser/generated/datacube_filter__parser.ts +514 -0
- package/grammar/parser/parser.ts +55 -0
- package/lib/components/Core_LegendREPLApplicationPlugin.d.ts.map +1 -1
- package/lib/components/Core_LegendREPLApplicationPlugin.js +0 -7
- package/lib/components/Core_LegendREPLApplicationPlugin.js.map +1 -1
- package/lib/components/LegendREPLApplication.d.ts +0 -1
- package/lib/components/LegendREPLApplication.d.ts.map +1 -1
- package/lib/components/LegendREPLFrameworkProvider.d.ts +0 -1
- package/lib/components/LegendREPLFrameworkProvider.d.ts.map +1 -1
- package/lib/components/REPLStoreProvider.d.ts +1 -1
- package/lib/components/REPLStoreProvider.d.ts.map +1 -1
- package/lib/components/REPLStoreProvider.js +1 -1
- package/lib/components/REPLStoreProvider.js.map +1 -1
- package/lib/components/dataCube/DataCube.d.ts.map +1 -1
- package/lib/components/dataCube/DataCube.js +15 -4
- package/lib/components/dataCube/DataCube.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditor.d.ts +2 -4
- package/lib/components/dataCube/editor/DataCubeEditor.d.ts.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditor.js +109 -32
- package/lib/components/dataCube/editor/DataCubeEditor.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorCodePanel.d.ts +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorCodePanel.d.ts.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorCodePanel.js +178 -104
- package/lib/components/dataCube/editor/DataCubeEditorCodePanel.js.map +1 -1
- package/lib/components/dataCube/editor/{DataCubeEditorSortPanel.d.ts → DataCubeEditorColumnPropertiesPanel.d.ts} +2 -5
- package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.js +27 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.js.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.d.ts +19 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.js +27 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.js.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnsSelector.d.ts +22 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnsSelector.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnsSelector.js +230 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnsSelector.js.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.d.ts +19 -0
- package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.js +27 -0
- package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.js.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.d.ts +19 -0
- package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.js +27 -0
- package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.js.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.d.ts +19 -0
- package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.js +27 -0
- package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.js.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorHPivotsPanel.d.ts +19 -0
- package/lib/components/dataCube/editor/DataCubeEditorHPivotsPanel.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorHPivotsPanel.js +27 -0
- package/lib/components/dataCube/editor/DataCubeEditorHPivotsPanel.js.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.d.ts +19 -0
- package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.js +26 -0
- package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.js.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorVPivotsPanel.d.ts +19 -0
- package/lib/components/dataCube/editor/DataCubeEditorVPivotsPanel.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorVPivotsPanel.js +27 -0
- package/lib/components/dataCube/editor/DataCubeEditorVPivotsPanel.js.map +1 -0
- package/lib/components/dataCube/grid/DataCubeGrid.d.ts +1 -4
- package/lib/components/dataCube/grid/DataCubeGrid.d.ts.map +1 -1
- package/lib/components/dataCube/grid/DataCubeGrid.js +75 -30
- package/lib/components/dataCube/grid/DataCubeGrid.js.map +1 -1
- package/lib/grammar/generated/datacube_filter__lexer.d.ts +31 -0
- package/lib/grammar/generated/datacube_filter__lexer.js +118 -0
- package/lib/grammar/generated/datacube_filter__parser.d.ts +91 -0
- package/lib/grammar/generated/datacube_filter__parser.js +485 -0
- package/lib/grammar/parser.d.ts +16 -0
- package/lib/grammar/parser.js +39 -0
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +9 -6
- package/lib/server/REPLServerClient.d.ts +2 -3
- package/lib/server/REPLServerClient.d.ts.map +1 -1
- package/lib/server/models/DataCubeEngineModels.d.ts +8 -1
- package/lib/server/models/DataCubeEngineModels.d.ts.map +1 -1
- package/lib/server/models/DataCubeEngineModels.js +13 -0
- package/lib/server/models/DataCubeEngineModels.js.map +1 -1
- package/lib/stores/dataCube/DataCubeDefaultConfig.d.ts +17 -0
- package/lib/stores/dataCube/DataCubeDefaultConfig.d.ts.map +1 -0
- package/lib/stores/dataCube/DataCubeDefaultConfig.js +17 -0
- package/lib/stores/dataCube/DataCubeDefaultConfig.js.map +1 -0
- package/lib/stores/dataCube/DataCubeState.d.ts +6 -6
- package/lib/stores/dataCube/DataCubeState.d.ts.map +1 -1
- package/lib/stores/dataCube/DataCubeState.js +18 -14
- package/lib/stores/dataCube/DataCubeState.js.map +1 -1
- package/lib/stores/dataCube/{DataCubeStore.d.ts → REPLStore.d.ts} +1 -1
- package/lib/stores/dataCube/REPLStore.d.ts.map +1 -0
- package/lib/stores/dataCube/{DataCubeStore.js → REPLStore.js} +1 -1
- package/lib/stores/dataCube/REPLStore.js.map +1 -0
- package/lib/stores/dataCube/core/DataCubeCoreState.d.ts +29 -0
- package/lib/stores/dataCube/core/DataCubeCoreState.d.ts.map +1 -0
- package/lib/stores/dataCube/core/DataCubeCoreState.js +46 -0
- package/lib/stores/dataCube/core/DataCubeCoreState.js.map +1 -0
- package/lib/stores/dataCube/core/DataCubeEngine.d.ts +2 -3
- package/lib/stores/dataCube/core/DataCubeEngine.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeEngine.js +2 -3
- package/lib/stores/dataCube/core/DataCubeEngine.js.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQueryBuilder.d.ts +27 -3
- package/lib/stores/dataCube/core/DataCubeQueryBuilder.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQueryBuilder.js +210 -278
- package/lib/stores/dataCube/core/DataCubeQueryBuilder.js.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQueryEngine.d.ts +72 -0
- package/lib/stores/dataCube/core/DataCubeQueryEngine.d.ts.map +1 -0
- package/lib/stores/dataCube/core/DataCubeQueryEngine.js +67 -0
- package/lib/stores/dataCube/core/DataCubeQueryEngine.js.map +1 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshot.d.ts +73 -38
- package/lib/stores/dataCube/core/DataCubeQuerySnapshot.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshot.js +101 -40
- package/lib/stores/dataCube/core/DataCubeQuerySnapshot.js.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.d.ts +32 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.d.ts.map +1 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.js +232 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.js.map +1 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.d.ts +8 -2
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.js +20 -5
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.js.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.d.ts +8 -3
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js +8 -4
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js.map +1 -1
- package/lib/stores/dataCube/editor/{DataCubeEditorCodeState.d.ts → DataCubeEditorCodePanelState.d.ts} +6 -5
- package/lib/stores/dataCube/editor/DataCubeEditorCodePanelState.d.ts.map +1 -0
- package/lib/stores/dataCube/editor/{DataCubeEditorCodeState.js → DataCubeEditorCodePanelState.js} +7 -7
- package/lib/stores/dataCube/editor/DataCubeEditorCodePanelState.js.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorColumnsSelectorState.d.ts +30 -0
- package/lib/stores/dataCube/editor/DataCubeEditorColumnsSelectorState.d.ts.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorColumnsSelectorState.js +51 -0
- package/lib/stores/dataCube/editor/DataCubeEditorColumnsSelectorState.js.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorGeneralPropertiesPanelState.d.ts +29 -0
- package/lib/stores/dataCube/editor/DataCubeEditorGeneralPropertiesPanelState.d.ts.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorGeneralPropertiesPanelState.js +63 -0
- package/lib/stores/dataCube/editor/DataCubeEditorGeneralPropertiesPanelState.js.map +1 -0
- package/lib/stores/dataCube/editor/{DataCubeEditorQuerySnapshotBuilder.d.ts → DataCubeEditorPanelState.d.ts} +2 -2
- package/lib/stores/dataCube/editor/DataCubeEditorPanelState.d.ts.map +1 -0
- package/lib/stores/dataCube/editor/{DataCubeEditorQuerySnapshotBuilder.js → DataCubeEditorPanelState.js} +1 -1
- package/lib/stores/dataCube/editor/DataCubeEditorPanelState.js.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorSortsPanelState.d.ts +34 -0
- package/lib/stores/dataCube/editor/DataCubeEditorSortsPanelState.d.ts.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorSortsPanelState.js +67 -0
- package/lib/stores/dataCube/editor/DataCubeEditorSortsPanelState.js.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts +10 -7
- package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts.map +1 -1
- package/lib/stores/dataCube/editor/DataCubeEditorState.js +25 -17
- package/lib/stores/dataCube/editor/DataCubeEditorState.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.d.ts +13 -7
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js +87 -86
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridQueryBuilder.d.ts +20 -0
- package/lib/stores/dataCube/grid/DataCubeGridQueryBuilder.d.ts.map +1 -0
- package/lib/stores/dataCube/grid/DataCubeGridQueryBuilder.js +103 -0
- package/lib/stores/dataCube/grid/DataCubeGridQueryBuilder.js.map +1 -0
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.d.ts +7 -1
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.js +121 -214
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.d.ts +25 -0
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.d.ts.map +1 -0
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.js +83 -0
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.js.map +1 -0
- package/lib/stores/dataCube/grid/DataCubeGridState.d.ts +6 -5
- package/lib/stores/dataCube/grid/DataCubeGridState.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridState.js +32 -10
- package/lib/stores/dataCube/grid/DataCubeGridState.js.map +1 -1
- package/package.json +15 -12
- package/src/components/Core_LegendREPLApplicationPlugin.tsx +0 -7
- package/src/components/REPLStoreProvider.tsx +1 -1
- package/src/components/dataCube/DataCube.tsx +51 -29
- package/src/components/dataCube/editor/DataCubeEditor.tsx +204 -95
- package/src/components/dataCube/editor/DataCubeEditorCodePanel.tsx +186 -190
- package/src/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.tsx +42 -0
- package/src/components/dataCube/editor/DataCubeEditorColumnsPanel.tsx +41 -0
- package/src/components/dataCube/editor/DataCubeEditorColumnsSelector.tsx +408 -0
- package/src/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.tsx +41 -0
- package/src/components/dataCube/editor/DataCubeEditorFilterPanel.tsx +41 -0
- package/src/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.tsx +48 -0
- package/src/components/dataCube/editor/DataCubeEditorHPivotsPanel.tsx +41 -0
- package/src/components/dataCube/editor/DataCubeEditorSortsPanel.tsx +41 -0
- package/src/components/dataCube/editor/DataCubeEditorVPivotsPanel.tsx +41 -0
- package/src/components/dataCube/grid/DataCubeGrid.tsx +134 -43
- package/src/server/REPLServerClient.ts +2 -2
- package/src/server/models/DataCubeEngineModels.ts +23 -1
- package/{lib/grid.css → src/stores/dataCube/DataCubeDefaultConfig.ts} +2 -2
- package/src/stores/dataCube/DataCubeState.ts +26 -20
- package/src/stores/dataCube/core/DataCubeCoreState.ts +57 -0
- package/src/stores/dataCube/core/DataCubeEngine.ts +6 -4
- package/src/stores/dataCube/core/DataCubeQueryBuilder.ts +349 -353
- package/src/stores/dataCube/core/DataCubeQueryEngine.ts +90 -0
- package/src/stores/dataCube/core/DataCubeQuerySnapshot.ts +168 -156
- package/src/stores/dataCube/core/DataCubeQuerySnapshotBuilder.ts +398 -0
- package/src/stores/dataCube/core/DataCubeQuerySnapshotManager.ts +37 -5
- package/src/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.ts +13 -5
- package/src/stores/dataCube/editor/{DataCubeEditorCodeState.ts → DataCubeEditorCodePanelState.ts} +6 -6
- package/src/stores/dataCube/editor/DataCubeEditorColumnsSelectorState.ts +61 -0
- package/src/stores/dataCube/editor/DataCubeEditorGeneralPropertiesPanelState.ts +80 -0
- package/src/stores/dataCube/editor/{DataCubeEditorQuerySnapshotBuilder.ts → DataCubeEditorPanelState.ts} +1 -1
- package/src/stores/dataCube/editor/DataCubeEditorSortsPanelState.ts +116 -0
- package/src/stores/dataCube/editor/DataCubeEditorState.ts +29 -20
- package/src/stores/dataCube/grid/DataCubeGridClientEngine.ts +96 -128
- package/src/stores/dataCube/grid/DataCubeGridQueryBuilder.ts +154 -0
- package/src/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.tsx +191 -0
- package/src/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.ts +127 -0
- package/src/stores/dataCube/grid/DataCubeGridState.ts +41 -14
- package/tsconfig.json +23 -9
- package/lib/components/dataCube/editor/DataCubeEditorSortPanel.d.ts.map +0 -1
- package/lib/components/dataCube/editor/DataCubeEditorSortPanel.js +0 -61
- package/lib/components/dataCube/editor/DataCubeEditorSortPanel.js.map +0 -1
- package/lib/grid.css.map +0 -1
- package/lib/repl.css +0 -17
- package/lib/repl.css.map +0 -1
- package/lib/stores/dataCube/DataCubeMetaModelConst.d.ts +0 -63
- package/lib/stores/dataCube/DataCubeMetaModelConst.d.ts.map +0 -1
- package/lib/stores/dataCube/DataCubeMetaModelConst.js +0 -72
- package/lib/stores/dataCube/DataCubeMetaModelConst.js.map +0 -1
- package/lib/stores/dataCube/DataCubeStore.d.ts.map +0 -1
- package/lib/stores/dataCube/DataCubeStore.js.map +0 -1
- package/lib/stores/dataCube/core/DataCubeQueryAnalyzer.d.ts +0 -37
- package/lib/stores/dataCube/core/DataCubeQueryAnalyzer.d.ts.map +0 -1
- package/lib/stores/dataCube/core/DataCubeQueryAnalyzer.js +0 -269
- package/lib/stores/dataCube/core/DataCubeQueryAnalyzer.js.map +0 -1
- package/lib/stores/dataCube/editor/DataCubeEditorCodeState.d.ts.map +0 -1
- package/lib/stores/dataCube/editor/DataCubeEditorCodeState.js.map +0 -1
- package/lib/stores/dataCube/editor/DataCubeEditorQuerySnapshotBuilder.d.ts.map +0 -1
- package/lib/stores/dataCube/editor/DataCubeEditorQuerySnapshotBuilder.js.map +0 -1
- package/lib/stores/dataCube/editor/DataCubeEditorSortState.d.ts +0 -46
- package/lib/stores/dataCube/editor/DataCubeEditorSortState.d.ts.map +0 -1
- package/lib/stores/dataCube/editor/DataCubeEditorSortState.js +0 -133
- package/lib/stores/dataCube/editor/DataCubeEditorSortState.js.map +0 -1
- package/src/components/dataCube/editor/DataCubeEditorSortPanel.tsx +0 -274
- package/src/stores/dataCube/DataCubeMetaModelConst.ts +0 -76
- package/src/stores/dataCube/core/DataCubeQueryAnalyzer.ts +0 -424
- package/src/stores/dataCube/editor/DataCubeEditorSortState.ts +0 -198
- package/src/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.ts +0 -281
- /package/src/stores/dataCube/{DataCubeStore.ts → REPLStore.ts} +0 -0
|
@@ -15,213 +15,209 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { observer } from 'mobx-react-lite';
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { useRef, useEffect, useState, useMemo } from 'react';
|
|
21
|
-
import {
|
|
22
|
-
getBaseCodeEditorOptions,
|
|
23
|
-
getCodeEditorValue,
|
|
24
|
-
normalizeLineEnding,
|
|
25
|
-
clearMarkers,
|
|
26
|
-
setErrorMarkers,
|
|
27
|
-
CODE_EDITOR_LANGUAGE,
|
|
28
|
-
CODE_EDITOR_THEME,
|
|
29
|
-
disposeCodeEditor,
|
|
30
|
-
} from '@finos/legend-lego/code-editor';
|
|
31
|
-
import { debounce } from '@finos/legend-shared';
|
|
32
|
-
import { DEFAULT_TAB_SIZE } from '@finos/legend-application';
|
|
18
|
+
import { DataCubeIcon } from '@finos/legend-art';
|
|
19
|
+
import { useEffect } from 'react';
|
|
33
20
|
import { useREPLStore } from '../../REPLStoreProvider.js';
|
|
34
|
-
import {
|
|
35
|
-
editor as monacoEditorAPI,
|
|
36
|
-
type IDisposable,
|
|
37
|
-
languages as monacoLanguagesAPI,
|
|
38
|
-
} from 'monaco-editor';
|
|
39
21
|
|
|
40
|
-
const DataCubeCodeEditor = observer(() => {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
>(undefined);
|
|
22
|
+
// const DataCubeCodeEditor = observer(() => {
|
|
23
|
+
// const replStore = useREPLStore();
|
|
24
|
+
// const applicationStore = replStore.applicationStore;
|
|
25
|
+
// const dataCubeState = replStore.dataCubeState;
|
|
26
|
+
// const queryEditorState = dataCubeState.editor.codePanel.queryEditorState;
|
|
27
|
+
// const onDidChangeModelContentEventDisposer = useRef<IDisposable | undefined>(
|
|
28
|
+
// undefined,
|
|
29
|
+
// );
|
|
30
|
+
// const value = normalizeLineEnding(queryEditorState.query);
|
|
31
|
+
// const parserError = queryEditorState.parserError;
|
|
32
|
+
// const [editor, setEditor] = useState<
|
|
33
|
+
// monacoEditorAPI.IStandaloneCodeEditor | undefined
|
|
34
|
+
// >();
|
|
35
|
+
// const textInputRef = useRef<HTMLDivElement>(null);
|
|
36
|
+
// const autoCompleteSuggestionProviderDisposer = useRef<
|
|
37
|
+
// IDisposable | undefined
|
|
38
|
+
// >(undefined);
|
|
58
39
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
40
|
+
// const debouncedParseQuery = useMemo(
|
|
41
|
+
// () =>
|
|
42
|
+
// debounce((): void => {
|
|
43
|
+
// flowResult(dataCubeState.editor.codePanel.parseQuery()).catch(
|
|
44
|
+
// replStore.applicationStore.logUnhandledError,
|
|
45
|
+
// );
|
|
46
|
+
// }, 1000),
|
|
47
|
+
// [dataCubeState, replStore.applicationStore.logUnhandledError],
|
|
48
|
+
// );
|
|
68
49
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
50
|
+
// if (editor) {
|
|
51
|
+
// onDidChangeModelContentEventDisposer.current?.dispose();
|
|
52
|
+
// onDidChangeModelContentEventDisposer.current =
|
|
53
|
+
// editor.onDidChangeModelContent(() => {
|
|
54
|
+
// const currentVal = getCodeEditorValue(editor);
|
|
55
|
+
// if (currentVal !== value) {
|
|
56
|
+
// queryEditorState.setQuery(currentVal);
|
|
57
|
+
// debouncedParseQuery.cancel();
|
|
58
|
+
// debouncedParseQuery();
|
|
59
|
+
// }
|
|
60
|
+
// });
|
|
80
61
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
62
|
+
// // Set the text value
|
|
63
|
+
// const currentValue = getCodeEditorValue(editor);
|
|
64
|
+
// const editorModel = editor.getModel();
|
|
84
65
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
66
|
+
// if (currentValue !== value) {
|
|
67
|
+
// editor.setValue(value);
|
|
68
|
+
// }
|
|
88
69
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
70
|
+
// // auto complete suggestions
|
|
71
|
+
// autoCompleteSuggestionProviderDisposer.current?.dispose();
|
|
72
|
+
// autoCompleteSuggestionProviderDisposer.current =
|
|
73
|
+
// monacoLanguagesAPI.registerCompletionItemProvider(
|
|
74
|
+
// CODE_EDITOR_LANGUAGE.PURE,
|
|
75
|
+
// {
|
|
76
|
+
// triggerCharacters: ['>', '.', '$', '~'],
|
|
77
|
+
// provideCompletionItems: async (model, position, context) => {
|
|
78
|
+
// // TODO: @akphi - do this later when we support typeahead for extended columns, etc.
|
|
79
|
+
// // const suggestions: monacoLanguagesAPI.CompletionItem[] =
|
|
80
|
+
// // await dataCubeState.getTypeaheadResults(position, model);
|
|
81
|
+
// const suggestions: monacoLanguagesAPI.CompletionItem[] = [];
|
|
82
|
+
// return { suggestions };
|
|
83
|
+
// },
|
|
84
|
+
// },
|
|
85
|
+
// );
|
|
105
86
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
87
|
+
// // Set the errors
|
|
88
|
+
// if (editorModel) {
|
|
89
|
+
// editorModel.updateOptions({ tabSize: DEFAULT_TAB_SIZE });
|
|
90
|
+
// const error = parserError;
|
|
91
|
+
// if (error?.sourceInformation) {
|
|
92
|
+
// setErrorMarkers(editorModel, [
|
|
93
|
+
// {
|
|
94
|
+
// message: error.message,
|
|
95
|
+
// startLineNumber: error.sourceInformation.startLine,
|
|
96
|
+
// startColumn: error.sourceInformation.startColumn,
|
|
97
|
+
// endLineNumber: error.sourceInformation.endLine,
|
|
98
|
+
// endColumn: error.sourceInformation.endColumn,
|
|
99
|
+
// },
|
|
100
|
+
// ]);
|
|
101
|
+
// } else {
|
|
102
|
+
// clearMarkers();
|
|
103
|
+
// }
|
|
104
|
+
// }
|
|
105
|
+
// }
|
|
125
106
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
107
|
+
// useEffect(() => {
|
|
108
|
+
// if (!editor && textInputRef.current) {
|
|
109
|
+
// const element = textInputRef.current;
|
|
110
|
+
// const _editor = monacoEditorAPI.create(element, {
|
|
111
|
+
// ...getBaseCodeEditorOptions(),
|
|
112
|
+
// language: CODE_EDITOR_LANGUAGE.PURE,
|
|
113
|
+
// theme: applicationStore.layoutService
|
|
114
|
+
// .TEMPORARY__isLightColorThemeEnabled
|
|
115
|
+
// ? CODE_EDITOR_THEME.BUILT_IN__VSCODE_LIGHT
|
|
116
|
+
// : CODE_EDITOR_THEME.DEFAULT_DARK,
|
|
117
|
+
// });
|
|
118
|
+
// setEditor(_editor);
|
|
119
|
+
// }
|
|
120
|
+
// }, [
|
|
121
|
+
// applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled,
|
|
122
|
+
// editor,
|
|
123
|
+
// ]);
|
|
143
124
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
125
|
+
// // dispose editor
|
|
126
|
+
// useEffect(
|
|
127
|
+
// () => (): void => {
|
|
128
|
+
// if (editor) {
|
|
129
|
+
// disposeCodeEditor(editor);
|
|
149
130
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
131
|
+
// onDidChangeModelContentEventDisposer.current?.dispose();
|
|
132
|
+
// }
|
|
133
|
+
// },
|
|
134
|
+
// [editor],
|
|
135
|
+
// );
|
|
155
136
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
});
|
|
137
|
+
// return (
|
|
138
|
+
// <div className={clsx('repl__query__content__editor__content')}>
|
|
139
|
+
// <div className="code-editor__body" ref={textInputRef} />
|
|
140
|
+
// </div>
|
|
141
|
+
// );
|
|
142
|
+
// });
|
|
143
|
+
|
|
144
|
+
export const DataCubeEditorCodePanel = observer(() => {
|
|
145
|
+
const replStore = useREPLStore();
|
|
146
|
+
const panel = replStore.dataCubeState.editor.sortsPanel;
|
|
147
|
+
// const executeLambda = (): void => {
|
|
148
|
+
// // TODO: @akphi
|
|
149
|
+
// // flowResult(dataCubeState.executeLambda()).catch(
|
|
150
|
+
// // editorStore.applicationStore.logUnhandledError,
|
|
151
|
+
// // );
|
|
152
|
+
// };
|
|
162
153
|
|
|
163
|
-
|
|
164
|
-
const executeLambda = (): void => {
|
|
165
|
-
// TODO: @akphi
|
|
166
|
-
// flowResult(dataCubeState.executeLambda()).catch(
|
|
167
|
-
// editorStore.applicationStore.alertUnhandledError,
|
|
168
|
-
// );
|
|
169
|
-
};
|
|
154
|
+
useEffect(() => {}, [panel]); // TODO: @akphi - remove this dummy useEffect
|
|
170
155
|
|
|
171
156
|
return (
|
|
172
|
-
<div className="
|
|
173
|
-
<div className="
|
|
174
|
-
<div className="
|
|
175
|
-
<
|
|
176
|
-
<div className="repl__query__label">Curent Query</div>
|
|
177
|
-
<div className="repl__query__execute-btn btn__dropdown-combo btn__dropdown-combo--primary">
|
|
178
|
-
<button
|
|
179
|
-
className="btn__dropdown-combo__label"
|
|
180
|
-
onClick={executeLambda}
|
|
181
|
-
tabIndex={-1}
|
|
182
|
-
>
|
|
183
|
-
<PlayIcon className="btn__dropdown-combo__label__icon" />
|
|
184
|
-
<div className="btn__dropdown-combo__label__title">
|
|
185
|
-
Run Query
|
|
186
|
-
</div>
|
|
187
|
-
</button>
|
|
188
|
-
</div>
|
|
189
|
-
</div>
|
|
190
|
-
<div className="repl__query__content">
|
|
191
|
-
<DataCubeCodeEditor />
|
|
192
|
-
</div>
|
|
157
|
+
<div className="data-cube-column-selector h-full w-full p-2">
|
|
158
|
+
<div className="flex h-6">
|
|
159
|
+
<div className="flex h-6 items-center text-xl font-medium">
|
|
160
|
+
<DataCubeIcon.Code />
|
|
193
161
|
</div>
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
<div className="repl__query">
|
|
197
|
-
<div className="repl__query__editor">
|
|
198
|
-
<div className="repl__query__header">
|
|
199
|
-
<div className="repl__query__label__sub__query">
|
|
200
|
-
Current Row Group Sub Query
|
|
201
|
-
</div>
|
|
202
|
-
<div className="repl__query__label__sub__query__read--only">
|
|
203
|
-
Read Only
|
|
204
|
-
</div>
|
|
205
|
-
</div>
|
|
206
|
-
<div className="repl__query__content">
|
|
207
|
-
<CodeEditor
|
|
208
|
-
lightTheme={
|
|
209
|
-
isLightTheme
|
|
210
|
-
? CODE_EDITOR_THEME.BUILT_IN__VSCODE_HC_LIGHT
|
|
211
|
-
: CODE_EDITOR_THEME.BUILT_IN__VSCODE_HC_BLACK
|
|
212
|
-
}
|
|
213
|
-
language={CODE_EDITOR_LANGUAGE.PURE}
|
|
214
|
-
isReadOnly={true}
|
|
215
|
-
inputValue={
|
|
216
|
-
dataCubeState.editor.codeEditorState.currentSubQuery
|
|
217
|
-
}
|
|
218
|
-
hideActionBar={true}
|
|
219
|
-
hidePadding={true}
|
|
220
|
-
/>
|
|
221
|
-
</div>
|
|
222
|
-
</div>
|
|
162
|
+
<div className="ml-1 flex h-6 items-center text-xl font-medium">
|
|
163
|
+
Code
|
|
223
164
|
</div>
|
|
224
|
-
|
|
165
|
+
</div>
|
|
166
|
+
<div className="flex h-[calc(100%_-_24px)] w-full"></div>
|
|
225
167
|
</div>
|
|
168
|
+
// <div className="repl__content__query">
|
|
169
|
+
// <div className="repl__query">
|
|
170
|
+
// <div className="repl__query__editor">
|
|
171
|
+
// <div className="repl__query__header">
|
|
172
|
+
// <div className="repl__query__label">Curent Query</div>
|
|
173
|
+
// <div className="repl__query__execute-btn btn__dropdown-combo btn__dropdown-combo--primary">
|
|
174
|
+
// <button
|
|
175
|
+
// className="btn__dropdown-combo__label"
|
|
176
|
+
// onClick={executeLambda}
|
|
177
|
+
// tabIndex={-1}
|
|
178
|
+
// >
|
|
179
|
+
// <PlayIcon className="btn__dropdown-combo__label__icon" />
|
|
180
|
+
// <div className="btn__dropdown-combo__label__title">
|
|
181
|
+
// Run Query
|
|
182
|
+
// </div>
|
|
183
|
+
// </button>
|
|
184
|
+
// </div>
|
|
185
|
+
// </div>
|
|
186
|
+
// <div className="repl__query__content">
|
|
187
|
+
// <DataCubeCodeEditor />
|
|
188
|
+
// </div>
|
|
189
|
+
// </div>
|
|
190
|
+
// </div>
|
|
191
|
+
// {/* {dataCubeState.editor.codeEditorState.currentSubQuery !== undefined && (
|
|
192
|
+
// <div className="repl__query">
|
|
193
|
+
// <div className="repl__query__editor">
|
|
194
|
+
// <div className="repl__query__header">
|
|
195
|
+
// <div className="repl__query__label__sub__query">
|
|
196
|
+
// Current Row Group Sub Query
|
|
197
|
+
// </div>
|
|
198
|
+
// <div className="repl__query__label__sub__query__read--only">
|
|
199
|
+
// Read Only
|
|
200
|
+
// </div>
|
|
201
|
+
// </div>
|
|
202
|
+
// <div className="repl__query__content">
|
|
203
|
+
// <CodeEditor
|
|
204
|
+
// lightTheme={
|
|
205
|
+
// isLightTheme
|
|
206
|
+
// ? CODE_EDITOR_THEME.BUILT_IN__VSCODE_HC_LIGHT
|
|
207
|
+
// : CODE_EDITOR_THEME.BUILT_IN__VSCODE_HC_BLACK
|
|
208
|
+
// }
|
|
209
|
+
// language={CODE_EDITOR_LANGUAGE.PURE}
|
|
210
|
+
// isReadOnly={true}
|
|
211
|
+
// inputValue={
|
|
212
|
+
// dataCubeState.editor.codeEditorState.currentSubQuery
|
|
213
|
+
// }
|
|
214
|
+
// hideActionBar={true}
|
|
215
|
+
// hidePadding={true}
|
|
216
|
+
// />
|
|
217
|
+
// </div>
|
|
218
|
+
// </div>
|
|
219
|
+
// </div>
|
|
220
|
+
// )} */}
|
|
221
|
+
// </div>
|
|
226
222
|
);
|
|
227
223
|
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-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
|
+
|
|
17
|
+
import { DataCubeIcon } from '@finos/legend-art';
|
|
18
|
+
import { observer } from 'mobx-react-lite';
|
|
19
|
+
import { useREPLStore } from '../../REPLStoreProvider.js';
|
|
20
|
+
import { useEffect } from 'react';
|
|
21
|
+
|
|
22
|
+
export const DataCubeEditorColumnPropertiesPanel = observer(() => {
|
|
23
|
+
const replStore = useREPLStore();
|
|
24
|
+
const panel = replStore.dataCubeState.editor.sortsPanel;
|
|
25
|
+
|
|
26
|
+
useEffect(() => {}, [panel]); // TODO: @akphi - remove this dummy useEffect
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<div className="data-cube-column-selector h-full w-full p-2">
|
|
30
|
+
<div className="flex h-6">
|
|
31
|
+
<div className="relative flex h-6 items-center text-xl font-medium">
|
|
32
|
+
<DataCubeIcon.TableColumn />
|
|
33
|
+
<DataCubeIcon.TableColumnOptions__Settings className="absolute bottom-1 right-0 bg-white text-xs" />
|
|
34
|
+
</div>
|
|
35
|
+
<div className="ml-1 flex h-6 items-center text-xl font-medium">
|
|
36
|
+
Column Properties
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
<div className="flex h-[calc(100%_-_24px)] w-full"></div>
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-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
|
+
|
|
17
|
+
import { DataCubeIcon } from '@finos/legend-art';
|
|
18
|
+
import { observer } from 'mobx-react-lite';
|
|
19
|
+
import { useREPLStore } from '../../REPLStoreProvider.js';
|
|
20
|
+
import { useEffect } from 'react';
|
|
21
|
+
|
|
22
|
+
export const DataCubeEditorColumnsPanel = observer(() => {
|
|
23
|
+
const replStore = useREPLStore();
|
|
24
|
+
const panel = replStore.dataCubeState.editor.sortsPanel;
|
|
25
|
+
|
|
26
|
+
useEffect(() => {}, [panel]); // TODO: @akphi - remove this dummy useEffect
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<div className="data-cube-column-selector h-full w-full p-2">
|
|
30
|
+
<div className="flex h-6">
|
|
31
|
+
<div className="flex h-6 items-center text-xl font-medium">
|
|
32
|
+
<DataCubeIcon.TableColumns />
|
|
33
|
+
</div>
|
|
34
|
+
<div className="ml-1 flex h-6 items-center text-xl font-medium">
|
|
35
|
+
Columns
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
<div className="flex h-[calc(100%_-_24px)] w-full"></div>
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
});
|