@finos/legend-application-repl 0.0.36 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/__lib__/LegendREPLEvent.d.ts +1 -1
- package/lib/__lib__/LegendREPLEvent.d.ts.map +1 -1
- package/lib/__lib__/LegendREPLEvent.js +5 -5
- package/lib/__lib__/LegendREPLEvent.js.map +1 -1
- package/lib/__lib__/LegendREPLSetting.d.ts +1 -1
- package/lib/__lib__/LegendREPLSetting.d.ts.map +1 -1
- package/lib/__lib__/LegendREPLSetting.js +4 -4
- package/lib/__lib__/LegendREPLSetting.js.map +1 -1
- package/lib/application/LegendREPL.d.ts +1 -1
- package/lib/application/LegendREPL.d.ts.map +1 -1
- package/lib/application/LegendREPL.js +2 -2
- package/lib/application/LegendREPL.js.map +1 -1
- package/lib/application/LegendREPLDocumentation.d.ts +21 -0
- package/lib/application/LegendREPLDocumentation.d.ts.map +1 -0
- package/lib/application/LegendREPLDocumentation.js +22 -0
- package/lib/application/LegendREPLDocumentation.js.map +1 -0
- package/lib/components/Core_LegendREPLApplicationPlugin.js +2 -2
- package/lib/components/Core_LegendREPLApplicationPlugin.js.map +1 -1
- package/lib/components/LegendREPLApplication.d.ts.map +1 -1
- package/lib/components/LegendREPLApplication.js +3 -2
- package/lib/components/LegendREPLApplication.js.map +1 -1
- package/lib/components/LegendREPLFrameworkProvider.d.ts.map +1 -1
- package/lib/components/LegendREPLFrameworkProvider.js +2 -2
- package/lib/components/LegendREPLFrameworkProvider.js.map +1 -1
- package/lib/components/REPLStoreProvider.d.ts +4 -2
- package/lib/components/REPLStoreProvider.d.ts.map +1 -1
- package/lib/components/REPLStoreProvider.js +13 -7
- package/lib/components/REPLStoreProvider.js.map +1 -1
- package/lib/components/dataCube/DataCube.d.ts.map +1 -1
- package/lib/components/dataCube/DataCube.js +31 -13
- package/lib/components/dataCube/DataCube.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditor.d.ts +1 -3
- package/lib/components/dataCube/editor/DataCubeEditor.d.ts.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditor.js +18 -20
- package/lib/components/dataCube/editor/DataCubeEditor.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorCodePanel.js +12 -12
- package/lib/components/dataCube/editor/DataCubeEditorCodePanel.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.d.ts.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.js +45 -43
- package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.js +4 -4
- package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.js +4 -4
- package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.js +4 -4
- package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.d.ts.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.js +22 -22
- package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorHorizontalPivotsPanel.js +4 -4
- package/lib/components/dataCube/editor/DataCubeEditorHorizontalPivotsPanel.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.js +5 -5
- package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorVerticalPivotsPanel.js +2 -2
- package/lib/components/dataCube/editor/DataCubeEditorVerticalPivotsPanel.js.map +1 -1
- package/lib/components/dataCube/grid/DataCubeGrid.d.ts.map +1 -1
- package/lib/components/dataCube/grid/DataCubeGrid.js +37 -45
- package/lib/components/dataCube/grid/DataCubeGrid.js.map +1 -1
- package/lib/components/dataCube/grid/DataCubeGridShared.js +2 -2
- package/lib/components/dataCube/grid/DataCubeGridShared.js.map +1 -1
- package/lib/components/repl/Alert.d.ts +23 -0
- package/lib/components/repl/Alert.d.ts.map +1 -0
- package/lib/components/repl/Alert.js +73 -0
- package/lib/components/repl/Alert.js.map +1 -0
- package/lib/components/repl/DocumentationPanel.d.ts +24 -0
- package/lib/components/repl/DocumentationPanel.d.ts.map +1 -0
- package/lib/components/repl/DocumentationPanel.js +56 -0
- package/lib/components/repl/DocumentationPanel.js.map +1 -0
- package/lib/components/{dataCube/editor/DataCubeEditorShared.d.ts → repl/Form.d.ts} +11 -11
- package/lib/components/repl/Form.d.ts.map +1 -0
- package/lib/components/{dataCube/editor/DataCubeEditorShared.js → repl/Form.js} +13 -13
- package/lib/components/repl/Form.js.map +1 -0
- package/lib/components/{REPLWindow.d.ts → repl/LayoutManager.d.ts} +11 -17
- package/lib/components/repl/LayoutManager.d.ts.map +1 -0
- package/lib/components/repl/LayoutManager.js +116 -0
- package/lib/components/repl/LayoutManager.js.map +1 -0
- package/lib/components/{dataCube/editor/DataCubeEditorDeveloperPanel.d.ts → repl/SettingsPanel.d.ts} +2 -2
- package/lib/components/repl/SettingsPanel.d.ts.map +1 -0
- package/lib/components/repl/SettingsPanel.js +47 -0
- package/lib/components/repl/SettingsPanel.js.map +1 -0
- package/lib/index.css +1 -1
- package/lib/package.json +19 -22
- package/lib/server/DataCubeQuery.d.ts.map +1 -0
- package/lib/server/{models/DataCubeQuery.js → DataCubeQuery.js} +6 -6
- package/lib/server/DataCubeQuery.js.map +1 -0
- package/lib/server/{models/DataCubeEngineModels.d.ts → REPLEngine.d.ts} +7 -1
- package/lib/server/REPLEngine.d.ts.map +1 -0
- package/lib/server/{models/DataCubeEngineModels.js → REPLEngine.js} +9 -1
- package/lib/server/REPLEngine.js.map +1 -0
- package/lib/server/REPLServerClient.d.ts +2 -2
- package/lib/server/REPLServerClient.d.ts.map +1 -1
- package/lib/server/REPLServerClient.js +2 -2
- package/lib/server/REPLServerClient.js.map +1 -1
- package/lib/stores/LayoutManagerState.d.ts +62 -0
- package/lib/stores/LayoutManagerState.d.ts.map +1 -0
- package/lib/stores/LayoutManagerState.js +121 -0
- package/lib/stores/LayoutManagerState.js.map +1 -0
- package/lib/stores/LegendREPLApplicationPlugin.d.ts +1 -0
- package/lib/stores/LegendREPLApplicationPlugin.d.ts.map +1 -1
- package/lib/stores/LegendREPLApplicationPlugin.js +8 -0
- package/lib/stores/LegendREPLApplicationPlugin.js.map +1 -1
- package/lib/stores/LegendREPLBaseStore.d.ts +2 -2
- package/lib/stores/LegendREPLBaseStore.d.ts.map +1 -1
- package/lib/stores/LegendREPLBaseStore.js +4 -4
- package/lib/stores/LegendREPLBaseStore.js.map +1 -1
- package/lib/stores/REPLStore.d.ts +12 -4
- package/lib/stores/REPLStore.d.ts.map +1 -1
- package/lib/stores/REPLStore.js +77 -25
- package/lib/stores/REPLStore.js.map +1 -1
- package/lib/stores/dataCube/{DataCubeInfrastructure.d.ts → DataCubeEngine.d.ts} +21 -21
- package/lib/stores/dataCube/DataCubeEngine.d.ts.map +1 -0
- package/lib/stores/dataCube/{DataCubeInfrastructure.js → DataCubeEngine.js} +50 -35
- package/lib/stores/dataCube/DataCubeEngine.js.map +1 -0
- package/lib/stores/dataCube/DataCubeState.d.ts +4 -4
- package/lib/stores/dataCube/DataCubeState.d.ts.map +1 -1
- package/lib/stores/dataCube/DataCubeState.js +13 -8
- package/lib/stores/dataCube/DataCubeState.js.map +1 -1
- package/lib/stores/dataCube/core/DataCubeCoreState.d.ts +1 -1
- package/lib/stores/dataCube/core/DataCubeCoreState.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQueryEngine.d.ts +2 -2
- package/lib/stores/dataCube/core/DataCubeQueryEngine.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQueryEngine.js +2 -2
- package/lib/stores/dataCube/core/DataCubeQueryEngine.js.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.d.ts +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.d.ts +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js +4 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js.map +1 -1
- package/lib/stores/dataCube/editor/DataCubeEditorCodePanelState.js +1 -1
- package/lib/stores/dataCube/editor/DataCubeEditorCodePanelState.js.map +1 -1
- package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts +5 -8
- package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts.map +1 -1
- package/lib/stores/dataCube/editor/DataCubeEditorState.js +19 -29
- package/lib/stores/dataCube/editor/DataCubeEditorState.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.d.ts +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js +31 -28
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridClientExportEngine.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridClientExportEngine.js +7 -2
- package/lib/stores/dataCube/grid/DataCubeGridClientExportEngine.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridConfigurationBuilder.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridConfigurationBuilder.js +9 -8
- package/lib/stores/dataCube/grid/DataCubeGridConfigurationBuilder.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridMenuBuilder.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridMenuBuilder.js +2 -6
- package/lib/stores/dataCube/grid/DataCubeGridMenuBuilder.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.js +0 -2
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridState.d.ts +0 -2
- package/lib/stores/dataCube/grid/DataCubeGridState.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridState.js +1 -7
- package/lib/stores/dataCube/grid/DataCubeGridState.js.map +1 -1
- package/package.json +25 -28
- package/src/__lib__/LegendREPLEvent.ts +1 -1
- package/src/__lib__/LegendREPLSetting.ts +1 -1
- package/src/application/LegendREPL.tsx +2 -2
- package/{lib/grammar/parser.d.ts → src/application/LegendREPLDocumentation.ts} +6 -1
- package/src/components/Core_LegendREPLApplicationPlugin.tsx +2 -2
- package/src/components/LegendREPLApplication.tsx +2 -0
- package/src/components/LegendREPLFrameworkProvider.tsx +2 -4
- package/src/components/REPLStoreProvider.tsx +24 -18
- package/src/components/dataCube/DataCube.tsx +69 -26
- package/src/components/dataCube/editor/DataCubeEditor.tsx +89 -98
- package/src/components/dataCube/editor/DataCubeEditorCodePanel.tsx +12 -12
- package/src/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.tsx +112 -115
- package/src/components/dataCube/editor/DataCubeEditorColumnsPanel.tsx +4 -4
- package/src/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.tsx +4 -4
- package/src/components/dataCube/editor/DataCubeEditorFilterPanel.tsx +4 -4
- package/src/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.tsx +76 -88
- package/src/components/dataCube/editor/DataCubeEditorHorizontalPivotsPanel.tsx +4 -4
- package/src/components/dataCube/editor/DataCubeEditorSortsPanel.tsx +5 -5
- package/src/components/dataCube/editor/DataCubeEditorVerticalPivotsPanel.tsx +2 -2
- package/src/components/dataCube/grid/DataCubeGrid.tsx +45 -53
- package/src/components/dataCube/grid/DataCubeGridShared.tsx +2 -2
- package/src/components/repl/Alert.tsx +138 -0
- package/src/components/repl/DocumentationPanel.tsx +88 -0
- package/src/components/{dataCube/editor/DataCubeEditorShared.tsx → repl/Form.tsx} +12 -12
- package/src/components/repl/LayoutManager.tsx +190 -0
- package/src/components/repl/SettingsPanel.tsx +148 -0
- package/src/server/{models/DataCubeQuery.ts → DataCubeQuery.ts} +3 -3
- package/src/server/{models/DataCubeEngineModels.ts → REPLEngine.ts} +13 -0
- package/src/server/REPLServerClient.ts +4 -3
- package/src/stores/LayoutManagerState.ts +168 -0
- package/src/stores/LegendREPLApplicationPlugin.ts +9 -0
- package/src/stores/LegendREPLBaseStore.ts +4 -4
- package/src/stores/REPLStore.tsx +145 -0
- package/src/stores/dataCube/{DataCubeInfrastructure.ts → DataCubeEngine.ts} +66 -46
- package/src/stores/dataCube/DataCubeState.ts +14 -9
- package/src/stores/dataCube/core/DataCubeCoreState.ts +1 -1
- package/src/stores/dataCube/core/DataCubeQueryEngine.ts +2 -3
- package/src/stores/dataCube/core/DataCubeQuerySnapshotBuilder.ts +1 -1
- package/src/stores/dataCube/core/DataCubeQuerySnapshotManager.ts +1 -1
- package/src/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.ts +10 -0
- package/src/stores/dataCube/editor/DataCubeEditorCodePanelState.ts +1 -1
- package/src/stores/dataCube/editor/{DataCubeEditorState.ts → DataCubeEditorState.tsx} +12 -24
- package/src/stores/dataCube/grid/DataCubeGridClientEngine.ts +23 -12
- package/src/stores/dataCube/grid/DataCubeGridClientExportEngine.ts +4 -1
- package/src/stores/dataCube/grid/DataCubeGridConfigurationBuilder.tsx +9 -11
- package/src/stores/dataCube/grid/DataCubeGridMenuBuilder.tsx +2 -6
- package/src/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.ts +0 -3
- package/src/stores/dataCube/grid/DataCubeGridState.ts +1 -11
- package/tsconfig.json +12 -8
- package/grammar/datacube_filter__lexer.g4 +0 -40
- package/grammar/datacube_filter__parser.g4 +0 -14
- package/grammar/generateGrammar.js +0 -43
- package/grammar/parser/generated/datacube_filter__lexer.interp +0 -59
- package/grammar/parser/generated/datacube_filter__lexer.tokens +0 -14
- package/grammar/parser/generated/datacube_filter__lexer.ts +0 -142
- package/grammar/parser/generated/datacube_filter__parser.interp +0 -38
- package/grammar/parser/generated/datacube_filter__parser.tokens +0 -14
- package/grammar/parser/generated/datacube_filter__parser.ts +0 -514
- package/grammar/parser/parser.ts +0 -55
- package/lib/components/REPLWindow.d.ts.map +0 -1
- package/lib/components/REPLWindow.js +0 -117
- package/lib/components/REPLWindow.js.map +0 -1
- package/lib/components/dataCube/editor/DataCubeEditorDeveloperPanel.d.ts.map +0 -1
- package/lib/components/dataCube/editor/DataCubeEditorDeveloperPanel.js +0 -28
- package/lib/components/dataCube/editor/DataCubeEditorDeveloperPanel.js.map +0 -1
- package/lib/components/dataCube/editor/DataCubeEditorShared.d.ts.map +0 -1
- package/lib/components/dataCube/editor/DataCubeEditorShared.js.map +0 -1
- package/lib/grammar/generated/datacube_filter__lexer.d.ts +0 -31
- package/lib/grammar/generated/datacube_filter__lexer.js +0 -118
- package/lib/grammar/generated/datacube_filter__parser.d.ts +0 -91
- package/lib/grammar/generated/datacube_filter__parser.js +0 -485
- package/lib/grammar/parser.js +0 -39
- package/lib/server/models/DataCubeEngineModels.d.ts.map +0 -1
- package/lib/server/models/DataCubeEngineModels.js.map +0 -1
- package/lib/server/models/DataCubeQuery.d.ts.map +0 -1
- package/lib/server/models/DataCubeQuery.js.map +0 -1
- package/lib/stores/dataCube/DataCubeInfrastructure.d.ts.map +0 -1
- package/lib/stores/dataCube/DataCubeInfrastructure.js.map +0 -1
- package/src/components/REPLWindow.tsx +0 -179
- package/src/components/dataCube/editor/DataCubeEditorDeveloperPanel.tsx +0 -43
- package/src/stores/REPLStore.ts +0 -48
- /package/lib/server/{models/DataCubeQuery.d.ts → DataCubeQuery.d.ts} +0 -0
|
@@ -1,179 +0,0 @@
|
|
|
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 { useState } from 'react';
|
|
18
|
-
import { DataCubeIcon, ResizableAndDraggableBox, cn } from '@finos/legend-art';
|
|
19
|
-
|
|
20
|
-
const WINDOW_DEFAULT_OFFSET = 50;
|
|
21
|
-
const WINDOW_DEFAULT_WIDTH = 800;
|
|
22
|
-
const WINDOW_DEFAULT_HEIGHT = 600;
|
|
23
|
-
const WINDOW_DEFAULT_MIN_WIDTH = 300;
|
|
24
|
-
const WINDOW_DEFAULT_MIN_HEIGHT = 300;
|
|
25
|
-
|
|
26
|
-
export type REPLWindowConfig = {
|
|
27
|
-
title: string;
|
|
28
|
-
uuid: string;
|
|
29
|
-
|
|
30
|
-
x?: number | undefined;
|
|
31
|
-
y?: number | undefined;
|
|
32
|
-
width?: number | undefined;
|
|
33
|
-
height?: number | undefined;
|
|
34
|
-
minWidth?: number | undefined;
|
|
35
|
-
minHeight?: number | undefined;
|
|
36
|
-
center?: boolean | undefined;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export const REPLWindow = (props: {
|
|
40
|
-
containerRef: React.RefObject<HTMLDivElement>;
|
|
41
|
-
children: React.ReactNode;
|
|
42
|
-
config: REPLWindowConfig;
|
|
43
|
-
onClose: () => void;
|
|
44
|
-
}) => {
|
|
45
|
-
const { containerRef, children, onClose, config } = props;
|
|
46
|
-
|
|
47
|
-
const [windowSpec, setWindowSpec] = useState(() => {
|
|
48
|
-
const x = config.x ?? WINDOW_DEFAULT_OFFSET;
|
|
49
|
-
const y = config.y ?? WINDOW_DEFAULT_OFFSET;
|
|
50
|
-
const width = config.width ?? WINDOW_DEFAULT_WIDTH;
|
|
51
|
-
const height = config.height ?? WINDOW_DEFAULT_HEIGHT;
|
|
52
|
-
|
|
53
|
-
if (containerRef.current) {
|
|
54
|
-
const { width: containerWidth, height: containerHeight } =
|
|
55
|
-
containerRef.current.getBoundingClientRect();
|
|
56
|
-
|
|
57
|
-
if (config.center) {
|
|
58
|
-
const finalWidth =
|
|
59
|
-
width + WINDOW_DEFAULT_OFFSET * 2 > containerWidth
|
|
60
|
-
? containerWidth - WINDOW_DEFAULT_OFFSET * 2
|
|
61
|
-
: width;
|
|
62
|
-
const finalHeight =
|
|
63
|
-
height + WINDOW_DEFAULT_OFFSET * 2 > containerHeight
|
|
64
|
-
? containerHeight - WINDOW_DEFAULT_OFFSET * 2
|
|
65
|
-
: height;
|
|
66
|
-
return {
|
|
67
|
-
x: (containerWidth - finalWidth) / 2,
|
|
68
|
-
y: (containerHeight - finalHeight) / 2,
|
|
69
|
-
width: finalWidth,
|
|
70
|
-
height: finalHeight,
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return {
|
|
75
|
-
x,
|
|
76
|
-
y,
|
|
77
|
-
width:
|
|
78
|
-
width + x + WINDOW_DEFAULT_OFFSET > containerWidth
|
|
79
|
-
? containerWidth - x - WINDOW_DEFAULT_OFFSET
|
|
80
|
-
: width,
|
|
81
|
-
height:
|
|
82
|
-
height + y + WINDOW_DEFAULT_OFFSET > containerHeight
|
|
83
|
-
? containerHeight - y - WINDOW_DEFAULT_OFFSET
|
|
84
|
-
: height,
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return {
|
|
89
|
-
x,
|
|
90
|
-
y,
|
|
91
|
-
width,
|
|
92
|
-
height,
|
|
93
|
-
};
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
return (
|
|
97
|
-
<ResizableAndDraggableBox
|
|
98
|
-
className="absolute z-10"
|
|
99
|
-
handle={`.data-cube__window-${config.uuid}`}
|
|
100
|
-
position={{ x: windowSpec.x, y: windowSpec.y }}
|
|
101
|
-
size={{ width: windowSpec.width, height: windowSpec.height }}
|
|
102
|
-
minWidth={config.minWidth ?? WINDOW_DEFAULT_MIN_WIDTH}
|
|
103
|
-
minHeight={config.minHeight ?? WINDOW_DEFAULT_MIN_HEIGHT}
|
|
104
|
-
onDragStop={(event, data) => {
|
|
105
|
-
setWindowSpec({ ...windowSpec, x: data.x, y: data.y });
|
|
106
|
-
}}
|
|
107
|
-
dragHandleClassName={`data-cube__window-${config.uuid}`}
|
|
108
|
-
onResize={(event, direction, ref, delta, position) => {
|
|
109
|
-
setWindowSpec({
|
|
110
|
-
...position,
|
|
111
|
-
width: ref.offsetWidth,
|
|
112
|
-
height: ref.offsetHeight,
|
|
113
|
-
});
|
|
114
|
-
}}
|
|
115
|
-
enableResizing={{
|
|
116
|
-
top: true,
|
|
117
|
-
right: true,
|
|
118
|
-
bottom: true,
|
|
119
|
-
left: true,
|
|
120
|
-
topRight: true,
|
|
121
|
-
bottomRight: true,
|
|
122
|
-
bottomLeft: true,
|
|
123
|
-
topLeft: true,
|
|
124
|
-
}}
|
|
125
|
-
resizeHandleStyles={{
|
|
126
|
-
top: { cursor: 'ns-resize' },
|
|
127
|
-
right: { cursor: 'ew-resize' },
|
|
128
|
-
bottom: { cursor: 'ns-resize' },
|
|
129
|
-
left: { cursor: 'ew-resize' },
|
|
130
|
-
topRight: {
|
|
131
|
-
cursor: 'nesw-resize',
|
|
132
|
-
width: 14,
|
|
133
|
-
height: 14,
|
|
134
|
-
top: -7,
|
|
135
|
-
right: -7,
|
|
136
|
-
},
|
|
137
|
-
bottomRight: {
|
|
138
|
-
cursor: 'nwse-resize',
|
|
139
|
-
width: 14,
|
|
140
|
-
height: 14,
|
|
141
|
-
bottom: -7,
|
|
142
|
-
right: -7,
|
|
143
|
-
},
|
|
144
|
-
bottomLeft: {
|
|
145
|
-
cursor: 'nesw-resize',
|
|
146
|
-
width: 14,
|
|
147
|
-
height: 14,
|
|
148
|
-
bottom: -7,
|
|
149
|
-
left: -7,
|
|
150
|
-
},
|
|
151
|
-
topLeft: {
|
|
152
|
-
cursor: 'nwse-resize',
|
|
153
|
-
width: 14,
|
|
154
|
-
height: 14,
|
|
155
|
-
top: -7,
|
|
156
|
-
left: -7,
|
|
157
|
-
},
|
|
158
|
-
}}
|
|
159
|
-
>
|
|
160
|
-
<div className="h-full w-full border border-neutral-400 bg-neutral-200 shadow-xl">
|
|
161
|
-
<div
|
|
162
|
-
className={cn(
|
|
163
|
-
`data-cube__window-${config.uuid}`,
|
|
164
|
-
'flex h-6 w-full select-none items-center justify-between border-b border-b-neutral-300 bg-white active:cursor-move',
|
|
165
|
-
)}
|
|
166
|
-
>
|
|
167
|
-
<div className="px-2">{config.title}</div>
|
|
168
|
-
<button
|
|
169
|
-
className="flex h-[23px] w-6 items-center justify-center hover:bg-red-500 hover:text-white"
|
|
170
|
-
onClick={onClose}
|
|
171
|
-
>
|
|
172
|
-
<DataCubeIcon.X />
|
|
173
|
-
</button>
|
|
174
|
-
</div>
|
|
175
|
-
<div className="h-[calc(100%_-_24px)] w-full">{children}</div>
|
|
176
|
-
</div>
|
|
177
|
-
</ResizableAndDraggableBox>
|
|
178
|
-
);
|
|
179
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
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
|
-
import { WIP_Badge } from './DataCubeEditorShared.js';
|
|
22
|
-
|
|
23
|
-
export const DataCubeEditorDeveloperPanel = observer(() => {
|
|
24
|
-
const replStore = useREPLStore();
|
|
25
|
-
const panel = replStore.dataCube.editor.sorts;
|
|
26
|
-
|
|
27
|
-
useEffect(() => {}, [panel]); // TODO: @akphi - remove this dummy useEffect
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<div className="h-full w-full select-none p-2">
|
|
31
|
-
<div className="flex h-6">
|
|
32
|
-
<div className="flex h-6 items-center text-xl font-medium">
|
|
33
|
-
<DataCubeIcon.AdvancedSettings />
|
|
34
|
-
</div>
|
|
35
|
-
<div className="ml-1 flex h-6 items-center text-xl font-medium">
|
|
36
|
-
Developer
|
|
37
|
-
<WIP_Badge />
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
<div className="flex h-[calc(100%_-_24px)] w-full"></div>
|
|
41
|
-
</div>
|
|
42
|
-
);
|
|
43
|
-
});
|
package/src/stores/REPLStore.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
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 type { LegendREPLApplicationStore } from './LegendREPLBaseStore.js';
|
|
18
|
-
import { REPLServerClient } from '../server/REPLServerClient.js';
|
|
19
|
-
import { NetworkClient } from '@finos/legend-shared';
|
|
20
|
-
import { makeObservable, observable } from 'mobx';
|
|
21
|
-
import { DataCubeState } from './dataCube/DataCubeState.js';
|
|
22
|
-
import { DataCubeInfrastructure } from './dataCube/DataCubeInfrastructure.js';
|
|
23
|
-
|
|
24
|
-
export class REPLStore {
|
|
25
|
-
readonly applicationStore: LegendREPLApplicationStore;
|
|
26
|
-
readonly client: REPLServerClient;
|
|
27
|
-
|
|
28
|
-
dataCubeInfrastructure!: DataCubeInfrastructure;
|
|
29
|
-
// TODO: when we support multi-view, we would need to support multiple states
|
|
30
|
-
dataCube!: DataCubeState;
|
|
31
|
-
|
|
32
|
-
constructor(applicationStore: LegendREPLApplicationStore) {
|
|
33
|
-
makeObservable(this, {
|
|
34
|
-
dataCube: observable,
|
|
35
|
-
});
|
|
36
|
-
this.applicationStore = applicationStore;
|
|
37
|
-
this.client = new REPLServerClient(
|
|
38
|
-
new NetworkClient({
|
|
39
|
-
baseUrl: this.applicationStore.config.useDynamicREPLServer
|
|
40
|
-
? window.location.origin +
|
|
41
|
-
this.applicationStore.config.baseAddress.replace('/repl/', '')
|
|
42
|
-
: this.applicationStore.config.replUrl,
|
|
43
|
-
}),
|
|
44
|
-
);
|
|
45
|
-
this.dataCubeInfrastructure = new DataCubeInfrastructure(this);
|
|
46
|
-
this.dataCube = new DataCubeState(this);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
File without changes
|