@finos/legend-application-pure-ide 6.2.14
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/LICENSE +201 -0
- package/README.md +3 -0
- package/lib/application/LegendPureIDE.d.ts +26 -0
- package/lib/application/LegendPureIDE.d.ts.map +1 -0
- package/lib/application/LegendPureIDE.js +43 -0
- package/lib/application/LegendPureIDE.js.map +1 -0
- package/lib/application/LegendPureIDEApplicationConfig.d.ts +28 -0
- package/lib/application/LegendPureIDEApplicationConfig.d.ts.map +1 -0
- package/lib/application/LegendPureIDEApplicationConfig.js +30 -0
- package/lib/application/LegendPureIDEApplicationConfig.js.map +1 -0
- package/lib/application/LegendPureIDEPluginManager.d.ts +32 -0
- package/lib/application/LegendPureIDEPluginManager.d.ts.map +1 -0
- package/lib/application/LegendPureIDEPluginManager.js +46 -0
- package/lib/application/LegendPureIDEPluginManager.js.map +1 -0
- package/lib/components/Core_LegendPureIDEApplicationPlugin.d.ts +23 -0
- package/lib/components/Core_LegendPureIDEApplicationPlugin.d.ts.map +1 -0
- package/lib/components/Core_LegendPureIDEApplicationPlugin.js +29 -0
- package/lib/components/Core_LegendPureIDEApplicationPlugin.js.map +1 -0
- package/lib/components/LegendPureIDEApplication.d.ts +18 -0
- package/lib/components/LegendPureIDEApplication.d.ts.map +1 -0
- package/lib/components/LegendPureIDEApplication.js +21 -0
- package/lib/components/LegendPureIDEApplication.js.map +1 -0
- package/lib/components/LegendPureIDEBaseStoreProvider.d.ts +23 -0
- package/lib/components/LegendPureIDEBaseStoreProvider.d.ts.map +1 -0
- package/lib/components/LegendPureIDEBaseStoreProvider.js +30 -0
- package/lib/components/LegendPureIDEBaseStoreProvider.js.map +1 -0
- package/lib/components/editor/ActivityBar.d.ts +20 -0
- package/lib/components/editor/ActivityBar.d.ts.map +1 -0
- package/lib/components/editor/ActivityBar.js +41 -0
- package/lib/components/editor/ActivityBar.js.map +1 -0
- package/lib/components/editor/Editor.d.ts +18 -0
- package/lib/components/editor/Editor.d.ts.map +1 -0
- package/lib/components/editor/Editor.js +80 -0
- package/lib/components/editor/Editor.js.map +1 -0
- package/lib/components/editor/EditorStoreProvider.d.ts +22 -0
- package/lib/components/editor/EditorStoreProvider.d.ts.map +1 -0
- package/lib/components/editor/EditorStoreProvider.js +32 -0
- package/lib/components/editor/EditorStoreProvider.js.map +1 -0
- package/lib/components/editor/StatusBar.d.ts +22 -0
- package/lib/components/editor/StatusBar.d.ts.map +1 -0
- package/lib/components/editor/StatusBar.js +39 -0
- package/lib/components/editor/StatusBar.js.map +1 -0
- package/lib/components/editor/aux-panel/AuxiliaryPanel.d.ts +20 -0
- package/lib/components/editor/aux-panel/AuxiliaryPanel.d.ts.map +1 -0
- package/lib/components/editor/aux-panel/AuxiliaryPanel.js +65 -0
- package/lib/components/editor/aux-panel/AuxiliaryPanel.js.map +1 -0
- package/lib/components/editor/aux-panel/ConsolePanel.d.ts +20 -0
- package/lib/components/editor/aux-panel/ConsolePanel.d.ts.map +1 -0
- package/lib/components/editor/aux-panel/ConsolePanel.js +24 -0
- package/lib/components/editor/aux-panel/ConsolePanel.js.map +1 -0
- package/lib/components/editor/aux-panel/SearchPanel.d.ts +20 -0
- package/lib/components/editor/aux-panel/SearchPanel.d.ts.map +1 -0
- package/lib/components/editor/aux-panel/SearchPanel.js +90 -0
- package/lib/components/editor/aux-panel/SearchPanel.js.map +1 -0
- package/lib/components/editor/aux-panel/TestRunnerPanel.d.ts +20 -0
- package/lib/components/editor/aux-panel/TestRunnerPanel.d.ts.map +1 -0
- package/lib/components/editor/aux-panel/TestRunnerPanel.js +151 -0
- package/lib/components/editor/aux-panel/TestRunnerPanel.js.map +1 -0
- package/lib/components/editor/command-center/CreateNewDirectoryCommand.d.ts +20 -0
- package/lib/components/editor/command-center/CreateNewDirectoryCommand.d.ts.map +1 -0
- package/lib/components/editor/command-center/CreateNewDirectoryCommand.js +48 -0
- package/lib/components/editor/command-center/CreateNewDirectoryCommand.js.map +1 -0
- package/lib/components/editor/command-center/CreateNewFileCommand.d.ts +20 -0
- package/lib/components/editor/command-center/CreateNewFileCommand.d.ts.map +1 -0
- package/lib/components/editor/command-center/CreateNewFileCommand.js +48 -0
- package/lib/components/editor/command-center/CreateNewFileCommand.js.map +1 -0
- package/lib/components/editor/command-center/FileSearchCommand.d.ts +20 -0
- package/lib/components/editor/command-center/FileSearchCommand.d.ts.map +1 -0
- package/lib/components/editor/command-center/FileSearchCommand.js +60 -0
- package/lib/components/editor/command-center/FileSearchCommand.js.map +1 -0
- package/lib/components/editor/command-center/TextSearchCommand.d.ts +20 -0
- package/lib/components/editor/command-center/TextSearchCommand.d.ts.map +1 -0
- package/lib/components/editor/command-center/TextSearchCommand.js +50 -0
- package/lib/components/editor/command-center/TextSearchCommand.js.map +1 -0
- package/lib/components/editor/edit-panel/DiagramEditor.d.ts +23 -0
- package/lib/components/editor/edit-panel/DiagramEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/DiagramEditor.js +71 -0
- package/lib/components/editor/edit-panel/DiagramEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/EditPanel.d.ts +21 -0
- package/lib/components/editor/edit-panel/EditPanel.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/EditPanel.js +55 -0
- package/lib/components/editor/edit-panel/EditPanel.js.map +1 -0
- package/lib/components/editor/edit-panel/FileEditor.d.ts +23 -0
- package/lib/components/editor/edit-panel/FileEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/FileEditor.js +114 -0
- package/lib/components/editor/edit-panel/FileEditor.js.map +1 -0
- package/lib/components/editor/shared/ConceptIconUtils.d.ts +17 -0
- package/lib/components/editor/shared/ConceptIconUtils.d.ts.map +1 -0
- package/lib/components/editor/shared/ConceptIconUtils.js +50 -0
- package/lib/components/editor/shared/ConceptIconUtils.js.map +1 -0
- package/lib/components/editor/side-bar/ConceptTreeExplorer.d.ts +24 -0
- package/lib/components/editor/side-bar/ConceptTreeExplorer.d.ts.map +1 -0
- package/lib/components/editor/side-bar/ConceptTreeExplorer.js +165 -0
- package/lib/components/editor/side-bar/ConceptTreeExplorer.js.map +1 -0
- package/lib/components/editor/side-bar/DirectoryTreeExplorer.d.ts +20 -0
- package/lib/components/editor/side-bar/DirectoryTreeExplorer.d.ts.map +1 -0
- package/lib/components/editor/side-bar/DirectoryTreeExplorer.js +142 -0
- package/lib/components/editor/side-bar/DirectoryTreeExplorer.js.map +1 -0
- package/lib/components/editor/side-bar/SideBar.d.ts +23 -0
- package/lib/components/editor/side-bar/SideBar.d.ts.map +1 -0
- package/lib/components/editor/side-bar/SideBar.js +40 -0
- package/lib/components/editor/side-bar/SideBar.js.map +1 -0
- package/lib/extensions.css +17 -0
- package/lib/extensions.css.map +1 -0
- package/lib/index.css +17 -0
- package/lib/index.css.map +1 -0
- package/lib/index.d.ts +22 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +39 -0
- package/lib/index.js.map +1 -0
- package/lib/package.json +85 -0
- package/lib/server/PureServerClient.d.ts +55 -0
- package/lib/server/PureServerClient.d.ts.map +1 -0
- package/lib/server/PureServerClient.js +120 -0
- package/lib/server/PureServerClient.js.map +1 -0
- package/lib/server/models/Command.d.ts +24 -0
- package/lib/server/models/Command.d.ts.map +1 -0
- package/lib/server/models/Command.js +35 -0
- package/lib/server/models/Command.js.map +1 -0
- package/lib/server/models/ConceptTree.d.ts +76 -0
- package/lib/server/models/ConceptTree.d.ts.map +1 -0
- package/lib/server/models/ConceptTree.js +116 -0
- package/lib/server/models/ConceptTree.js.map +1 -0
- package/lib/server/models/DiagramInfo.d.ts +144 -0
- package/lib/server/models/DiagramInfo.d.ts.map +1 -0
- package/lib/server/models/DiagramInfo.js +478 -0
- package/lib/server/models/DiagramInfo.js.map +1 -0
- package/lib/server/models/DirectoryTree.d.ts +37 -0
- package/lib/server/models/DirectoryTree.d.ts.map +1 -0
- package/lib/server/models/DirectoryTree.js +70 -0
- package/lib/server/models/DirectoryTree.js.map +1 -0
- package/lib/server/models/Execution.d.ts +100 -0
- package/lib/server/models/Execution.d.ts.map +1 -0
- package/lib/server/models/Execution.js +183 -0
- package/lib/server/models/Execution.js.map +1 -0
- package/lib/server/models/Initialization.d.ts +49 -0
- package/lib/server/models/Initialization.d.ts.map +1 -0
- package/lib/server/models/Initialization.js +64 -0
- package/lib/server/models/Initialization.js.map +1 -0
- package/lib/server/models/PureFile.d.ts +34 -0
- package/lib/server/models/PureFile.d.ts.map +1 -0
- package/lib/server/models/PureFile.js +56 -0
- package/lib/server/models/PureFile.js.map +1 -0
- package/lib/server/models/SearchEntry.d.ts +36 -0
- package/lib/server/models/SearchEntry.d.ts.map +1 -0
- package/lib/server/models/SearchEntry.js +63 -0
- package/lib/server/models/SearchEntry.js.map +1 -0
- package/lib/server/models/SourceInformation.d.ts +25 -0
- package/lib/server/models/SourceInformation.d.ts.map +1 -0
- package/lib/server/models/SourceInformation.js +35 -0
- package/lib/server/models/SourceInformation.js.map +1 -0
- package/lib/server/models/Test.d.ts +57 -0
- package/lib/server/models/Test.d.ts.map +1 -0
- package/lib/server/models/Test.js +92 -0
- package/lib/server/models/Test.js.map +1 -0
- package/lib/server/models/Usage.d.ts +31 -0
- package/lib/server/models/Usage.d.ts.map +1 -0
- package/lib/server/models/Usage.js +36 -0
- package/lib/server/models/Usage.js.map +1 -0
- package/lib/stores/ConceptTreeState.d.ts +34 -0
- package/lib/stores/ConceptTreeState.d.ts.map +1 -0
- package/lib/stores/ConceptTreeState.js +117 -0
- package/lib/stores/ConceptTreeState.js.map +1 -0
- package/lib/stores/DiagramEditorState.d.ts +40 -0
- package/lib/stores/DiagramEditorState.d.ts.map +1 -0
- package/lib/stores/DiagramEditorState.js +90 -0
- package/lib/stores/DiagramEditorState.js.map +1 -0
- package/lib/stores/DirectoryTreeState.d.ts +35 -0
- package/lib/stores/DirectoryTreeState.d.ts.map +1 -0
- package/lib/stores/DirectoryTreeState.js +119 -0
- package/lib/stores/DirectoryTreeState.js.map +1 -0
- package/lib/stores/EditorConfig.d.ts +25 -0
- package/lib/stores/EditorConfig.d.ts.map +1 -0
- package/lib/stores/EditorConfig.js +27 -0
- package/lib/stores/EditorConfig.js.map +1 -0
- package/lib/stores/EditorStore.d.ts +102 -0
- package/lib/stores/EditorStore.d.ts.map +1 -0
- package/lib/stores/EditorStore.js +761 -0
- package/lib/stores/EditorStore.js.map +1 -0
- package/lib/stores/EditorTabManagerState.d.ts +31 -0
- package/lib/stores/EditorTabManagerState.d.ts.map +1 -0
- package/lib/stores/EditorTabManagerState.js +62 -0
- package/lib/stores/EditorTabManagerState.js.map +1 -0
- package/lib/stores/FileEditorState.d.ts +37 -0
- package/lib/stores/FileEditorState.d.ts.map +1 -0
- package/lib/stores/FileEditorState.js +99 -0
- package/lib/stores/FileEditorState.js.map +1 -0
- package/lib/stores/LegendPureIDEApplicationPlugin.d.ts +26 -0
- package/lib/stores/LegendPureIDEApplicationPlugin.d.ts.map +1 -0
- package/lib/stores/LegendPureIDEApplicationPlugin.js +27 -0
- package/lib/stores/LegendPureIDEApplicationPlugin.js.map +1 -0
- package/lib/stores/LegendPureIDEBaseStore.d.ts +25 -0
- package/lib/stores/LegendPureIDEBaseStore.d.ts.map +1 -0
- package/lib/stores/LegendPureIDEBaseStore.js +25 -0
- package/lib/stores/LegendPureIDEBaseStore.js.map +1 -0
- package/lib/stores/LegendPureIDECommand.d.ts +32 -0
- package/lib/stores/LegendPureIDECommand.d.ts.map +1 -0
- package/lib/stores/LegendPureIDECommand.js +82 -0
- package/lib/stores/LegendPureIDECommand.js.map +1 -0
- package/lib/stores/SearchCommandState.d.ts +28 -0
- package/lib/stores/SearchCommandState.d.ts.map +1 -0
- package/lib/stores/SearchCommandState.js +53 -0
- package/lib/stores/SearchCommandState.js.map +1 -0
- package/lib/stores/SearchResultState.d.ts +43 -0
- package/lib/stores/SearchResultState.d.ts.map +1 -0
- package/lib/stores/SearchResultState.js +92 -0
- package/lib/stores/SearchResultState.js.map +1 -0
- package/lib/stores/TestRunnerState.d.ts +87 -0
- package/lib/stores/TestRunnerState.d.ts.map +1 -0
- package/lib/stores/TestRunnerState.js +336 -0
- package/lib/stores/TestRunnerState.js.map +1 -0
- package/lib/stores/TreeState.d.ts +42 -0
- package/lib/stores/TreeState.d.ts.map +1 -0
- package/lib/stores/TreeState.js +139 -0
- package/lib/stores/TreeState.js.map +1 -0
- package/package.json +85 -0
- package/src/application/LegendPureIDE.tsx +73 -0
- package/src/application/LegendPureIDEApplicationConfig.ts +58 -0
- package/src/application/LegendPureIDEPluginManager.ts +67 -0
- package/src/components/Core_LegendPureIDEApplicationPlugin.tsx +37 -0
- package/src/components/LegendPureIDEApplication.tsx +27 -0
- package/src/components/LegendPureIDEBaseStoreProvider.tsx +57 -0
- package/src/components/editor/ActivityBar.tsx +74 -0
- package/src/components/editor/Editor.tsx +180 -0
- package/src/components/editor/EditorStoreProvider.tsx +57 -0
- package/src/components/editor/StatusBar.tsx +95 -0
- package/src/components/editor/aux-panel/AuxiliaryPanel.tsx +155 -0
- package/src/components/editor/aux-panel/ConsolePanel.tsx +49 -0
- package/src/components/editor/aux-panel/SearchPanel.tsx +421 -0
- package/src/components/editor/aux-panel/TestRunnerPanel.tsx +455 -0
- package/src/components/editor/command-center/CreateNewDirectoryCommand.tsx +86 -0
- package/src/components/editor/command-center/CreateNewFileCommand.tsx +84 -0
- package/src/components/editor/command-center/FileSearchCommand.tsx +112 -0
- package/src/components/editor/command-center/TextSearchCommand.tsx +103 -0
- package/src/components/editor/edit-panel/DiagramEditor.tsx +108 -0
- package/src/components/editor/edit-panel/EditPanel.tsx +114 -0
- package/src/components/editor/edit-panel/FileEditor.tsx +156 -0
- package/src/components/editor/shared/ConceptIconUtils.tsx +78 -0
- package/src/components/editor/side-bar/ConceptTreeExplorer.tsx +401 -0
- package/src/components/editor/side-bar/DirectoryTreeExplorer.tsx +366 -0
- package/src/components/editor/side-bar/SideBar.tsx +51 -0
- package/src/index.tsx +46 -0
- package/src/server/PureServerClient.ts +299 -0
- package/src/server/models/Command.ts +40 -0
- package/src/server/models/ConceptTree.ts +152 -0
- package/src/server/models/DiagramInfo.ts +793 -0
- package/src/server/models/DirectoryTree.ts +100 -0
- package/src/server/models/Execution.ts +223 -0
- package/src/server/models/Initialization.ts +92 -0
- package/src/server/models/PureFile.ts +76 -0
- package/src/server/models/SearchEntry.ts +85 -0
- package/src/server/models/SourceInformation.ts +37 -0
- package/src/server/models/Test.ts +125 -0
- package/src/server/models/Usage.ts +49 -0
- package/src/stores/ConceptTreeState.ts +156 -0
- package/src/stores/DiagramEditorState.ts +150 -0
- package/src/stores/DirectoryTreeState.ts +168 -0
- package/src/stores/EditorConfig.ts +26 -0
- package/src/stores/EditorStore.ts +1087 -0
- package/src/stores/EditorTabManagerState.ts +74 -0
- package/src/stores/FileEditorState.ts +148 -0
- package/src/stores/LegendPureIDEApplicationPlugin.ts +30 -0
- package/src/stores/LegendPureIDEBaseStore.ts +36 -0
- package/src/stores/LegendPureIDECommand.ts +84 -0
- package/src/stores/SearchCommandState.ts +61 -0
- package/src/stores/SearchResultState.ts +131 -0
- package/src/stores/TestRunnerState.ts +470 -0
- package/src/stores/TreeState.ts +179 -0
- package/tsconfig.json +98 -0
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
17
|
+
export declare const ActivityBar: (() => JSX.Element) & {
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=ActivityBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActivityBar.d.ts","sourceRoot":"","sources":["../../../src/components/editor/ActivityBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAcH,eAAO,MAAM,WAAW;;CA6CtB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { observer } from 'mobx-react-lite';
|
|
18
|
+
import { ACTIVITY_MODE } from '../../stores/EditorConfig.js';
|
|
19
|
+
import { clsx, FileAltIcon, LegendLogo, ListIcon } from '@finos/legend-art';
|
|
20
|
+
import { useEditorStore } from './EditorStoreProvider.js';
|
|
21
|
+
export const ActivityBar = observer(() => {
|
|
22
|
+
const editorStore = useEditorStore();
|
|
23
|
+
const changeActivity = (activity) => () => editorStore.setActiveActivity(activity);
|
|
24
|
+
const activities = [
|
|
25
|
+
{
|
|
26
|
+
mode: ACTIVITY_MODE.CONCEPT,
|
|
27
|
+
title: 'Concept Explorer',
|
|
28
|
+
icon: _jsx(ListIcon, {}),
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
mode: ACTIVITY_MODE.FILE,
|
|
32
|
+
title: 'File Explorer',
|
|
33
|
+
icon: _jsx(FileAltIcon, {}),
|
|
34
|
+
},
|
|
35
|
+
].filter((activity) => Boolean(activity));
|
|
36
|
+
return (_jsxs("div", { className: "activity-bar", children: [_jsx("div", { className: "activity-bar__logo", children: _jsx(LegendLogo, {}) }), _jsx("div", { className: "activity-bar__items", children: activities.map((activity) => (_jsx("button", { className: clsx('activity-bar__item', {
|
|
37
|
+
'activity-bar__item--active': editorStore.sideBarDisplayState.isOpen &&
|
|
38
|
+
editorStore.activeActivity === activity.mode,
|
|
39
|
+
}), onClick: changeActivity(activity.mode), tabIndex: -1, title: `${activity.title}${activity.info ? ` - ${activity.info}` : ''}`, children: activity.icon }, activity.mode))) })] }));
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=ActivityBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActivityBar.js","sourceRoot":"","sources":["../../../src/components/editor/ActivityBar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAS1D,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,EAAE;IACvC,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,MAAM,cAAc,GAClB,CAAC,QAAuB,EAAgB,EAAE,CAC1C,GAAS,EAAE,CACT,WAAW,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,UAAU,GAAsB;QACpC;YACE,IAAI,EAAE,aAAa,CAAC,OAAO;YAC3B,KAAK,EAAE,kBAAkB;YACzB,IAAI,EAAE,KAAC,QAAQ,KAAG;SACnB;QACD;YACE,IAAI,EAAE,aAAa,CAAC,IAAI;YACxB,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,KAAC,WAAW,KAAG;SACtB;KACF,CAAC,MAAM,CAAC,CAAC,QAAQ,EAA+B,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEvE,OAAO,CACL,eAAK,SAAS,EAAC,cAAc,aAC3B,cAAK,SAAS,EAAC,oBAAoB,YACjC,KAAC,UAAU,KAAG,GACV,EACN,cAAK,SAAS,EAAC,qBAAqB,YACjC,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAC5B,iBAEE,SAAS,EAAE,IAAI,CAAC,oBAAoB,EAAE;wBACpC,4BAA4B,EAC1B,WAAW,CAAC,mBAAmB,CAAC,MAAM;4BACtC,WAAW,CAAC,cAAc,KAAK,QAAQ,CAAC,IAAI;qBAC/C,CAAC,EACF,OAAO,EAAE,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,EACtC,QAAQ,EAAE,CAAC,CAAC,EACZ,KAAK,EAAE,GAAG,QAAQ,CAAC,KAAK,GACtB,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAC1C,EAAE,YAED,QAAQ,CAAC,IAAI,IAZT,QAAQ,CAAC,IAAI,CAaX,CACV,CAAC,GACE,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
17
|
+
export declare const Editor: import("react").FC<{}>;
|
|
18
|
+
//# sourceMappingURL=Editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../../../src/components/editor/Editor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AA8BH,eAAO,MAAM,MAAM,wBAuIlB,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { useEffect } from 'react';
|
|
18
|
+
import { observer } from 'mobx-react-lite';
|
|
19
|
+
import { AuxiliaryPanel } from './aux-panel/AuxiliaryPanel.js';
|
|
20
|
+
import { SideBar } from './side-bar/SideBar.js';
|
|
21
|
+
import { ActivityBar } from './ActivityBar.js';
|
|
22
|
+
import { withEditorStore, useEditorStore } from './EditorStoreProvider.js';
|
|
23
|
+
import { StatusBar } from './StatusBar.js';
|
|
24
|
+
import { EditPanel } from './edit-panel/EditPanel.js';
|
|
25
|
+
import { FileSearchCommand } from './command-center/FileSearchCommand.js';
|
|
26
|
+
import { flowResult } from 'mobx';
|
|
27
|
+
import { TextSearchCommand } from './command-center/TextSearchCommand.js';
|
|
28
|
+
import { useApplicationStore, useCommands } from '@finos/legend-application';
|
|
29
|
+
import { useResizeDetector, ResizablePanelSplitterLine, ResizablePanel, ResizablePanelGroup, ResizablePanelSplitter, getCollapsiblePanelGroupProps, } from '@finos/legend-art';
|
|
30
|
+
import { getQueryParameters } from '@finos/legend-shared';
|
|
31
|
+
export const Editor = withEditorStore(observer(() => {
|
|
32
|
+
const editorStore = useEditorStore();
|
|
33
|
+
const applicationStore = useApplicationStore();
|
|
34
|
+
const editable = editorStore.initState.hasSucceeded;
|
|
35
|
+
// layout
|
|
36
|
+
const { ref, width, height } = useResizeDetector();
|
|
37
|
+
// These create snapping effect on panel resizing
|
|
38
|
+
const resizeSideBar = (handleProps) => editorStore.sideBarDisplayState.setSize(handleProps.domElement.getBoundingClientRect()
|
|
39
|
+
.width);
|
|
40
|
+
const resizeAuxPanel = (handleProps) => editorStore.auxPanelDisplayState.setSize(handleProps.domElement.getBoundingClientRect()
|
|
41
|
+
.height);
|
|
42
|
+
const sideBarCollapsiblePanelGroupProps = getCollapsiblePanelGroupProps(editorStore.sideBarDisplayState.size === 0, {
|
|
43
|
+
onStopResize: resizeSideBar,
|
|
44
|
+
size: editorStore.sideBarDisplayState.size,
|
|
45
|
+
});
|
|
46
|
+
const auxCollapsiblePanelGroupProps = getCollapsiblePanelGroupProps(editorStore.auxPanelDisplayState.size === 0, {
|
|
47
|
+
onStopResize: resizeAuxPanel,
|
|
48
|
+
size: editorStore.auxPanelDisplayState.size,
|
|
49
|
+
});
|
|
50
|
+
const maximizedAuxCollapsiblePanelGroupProps = getCollapsiblePanelGroupProps(editorStore.auxPanelDisplayState.isMaximized);
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
if (ref.current) {
|
|
53
|
+
editorStore.auxPanelDisplayState.setMaxSize(ref.current.offsetHeight);
|
|
54
|
+
}
|
|
55
|
+
}, [editorStore, ref, height, width]);
|
|
56
|
+
// Cleanup the editor
|
|
57
|
+
useEffect(() => () => {
|
|
58
|
+
editorStore.cleanUp();
|
|
59
|
+
}, [editorStore]);
|
|
60
|
+
// Initialize the app
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
const queryParams = getQueryParameters(window.location.search);
|
|
63
|
+
flowResult(editorStore.initialize(false, undefined, queryParams.mode, queryParams.fastCompile)).catch(applicationStore.alertUnhandledError);
|
|
64
|
+
}, [editorStore, applicationStore]);
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
applicationStore.navigator.blockNavigation([() => true], undefined, () => applicationStore.notifyWarning(`Navigation from the editor is blocked`));
|
|
67
|
+
return () => {
|
|
68
|
+
applicationStore.navigator.unblockNavigation();
|
|
69
|
+
};
|
|
70
|
+
}, [editorStore, applicationStore]);
|
|
71
|
+
useCommands(editorStore);
|
|
72
|
+
return (_jsxs("div", { className: "editor", children: [_jsxs("div", { className: "editor__body", children: [_jsx(ActivityBar, {}), _jsx("div", { className: "editor__content-container", ref: ref, children: _jsx("div", { className: "editor__content", children: _jsxs(ResizablePanelGroup, { orientation: "vertical", children: [_jsx(ResizablePanel, { ...sideBarCollapsiblePanelGroupProps.collapsiblePanel, direction: 1, children: _jsx(SideBar, {}) }), _jsx(ResizablePanelSplitter, {}), _jsx(ResizablePanel, { ...sideBarCollapsiblePanelGroupProps.remainingPanel, minSize: 300, children: _jsxs(ResizablePanelGroup, { orientation: "horizontal", children: [_jsx(ResizablePanel, { ...maximizedAuxCollapsiblePanelGroupProps.collapsiblePanel, ...(editorStore.auxPanelDisplayState.size === 0
|
|
73
|
+
? auxCollapsiblePanelGroupProps.remainingPanel
|
|
74
|
+
: {}), children: _jsx(EditPanel, {}) }), _jsx(ResizablePanelSplitter, { children: _jsx(ResizablePanelSplitterLine, { color: editorStore.auxPanelDisplayState.isMaximized
|
|
75
|
+
? 'transparent'
|
|
76
|
+
: 'var(--color-dark-grey-250)' }) }), _jsx(ResizablePanel, { ...auxCollapsiblePanelGroupProps.collapsiblePanel, ...(editorStore.auxPanelDisplayState.isMaximized
|
|
77
|
+
? maximizedAuxCollapsiblePanelGroupProps.remainingPanel
|
|
78
|
+
: {}), direction: -1, children: _jsx(AuxiliaryPanel, {}) })] }) })] }) }) })] }), _jsx(StatusBar, { actionsDisabled: !editable }), editable && _jsx(FileSearchCommand, {}), editable && _jsx(TextSearchCommand, {})] }));
|
|
79
|
+
}));
|
|
80
|
+
//# sourceMappingURL=Editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Editor.js","sourceRoot":"","sources":["../../../src/components/editor/Editor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE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KAAG,EACjC,QAAQ,IAAI,KAAC,iBAAiB,KAAG,IAC9B,CACP,CAAC;AACJ,CAAC,CAAC,CACH,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
import { EditorStore } from '../../stores/EditorStore.js';
|
|
17
|
+
export declare const EditorStoreProvider: ({ children, }: {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}) => React.ReactElement;
|
|
20
|
+
export declare const useEditorStore: () => EditorStore;
|
|
21
|
+
export declare const withEditorStore: (WrappedComponent: React.FC) => React.FC;
|
|
22
|
+
//# sourceMappingURL=EditorStoreProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorStoreProvider.d.ts","sourceRoot":"","sources":["../../../src/components/editor/EditorStoreProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAQ1D,eAAO,MAAM,mBAAmB;cAGpB,MAAM,SAAS;MACvB,MAAM,YAWT,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,WAI/B,CAAC;AAEJ,eAAO,MAAM,eAAe,qBAAsB,MAAM,EAAE,KAAG,MAAM,EAOhE,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { createContext, useContext } from 'react';
|
|
18
|
+
import { useLocalObservable } from 'mobx-react-lite';
|
|
19
|
+
import { EditorStore } from '../../stores/EditorStore.js';
|
|
20
|
+
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
21
|
+
import { useApplicationStore } from '@finos/legend-application';
|
|
22
|
+
const EditorStoreContext = createContext(undefined);
|
|
23
|
+
export const EditorStoreProvider = ({ children, }) => {
|
|
24
|
+
const applicationStore = useApplicationStore();
|
|
25
|
+
const store = useLocalObservable(() => new EditorStore(applicationStore));
|
|
26
|
+
return (_jsx(EditorStoreContext.Provider, { value: store, children: children }));
|
|
27
|
+
};
|
|
28
|
+
export const useEditorStore = () => guaranteeNonNullable(useContext(EditorStoreContext), `Can't find editor store in context`);
|
|
29
|
+
export const withEditorStore = (WrappedComponent) => function WithEditorStore() {
|
|
30
|
+
return (_jsx(EditorStoreProvider, { children: _jsx(WrappedComponent, {}) }));
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=EditorStoreProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorStoreProvider.js","sourceRoot":"","sources":["../../../src/components/editor/EditorStoreProvider.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,kBAAkB,GAAG,aAAa,CAA0B,SAAS,CAAC,CAAC;AAE7E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAClC,QAAQ,GAGT,EAAsB,EAAE;IACvB,MAAM,gBAAgB,GAAG,mBAAmB,EAGzC,CAAC;IACJ,MAAM,KAAK,GAAG,kBAAkB,CAAC,GAAG,EAAE,CAAC,IAAI,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC1E,OAAO,CACL,KAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACtC,QAAQ,GACmB,CAC/B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAgB,EAAE,CAC9C,oBAAoB,CAClB,UAAU,CAAC,kBAAkB,CAAC,EAC9B,oCAAoC,CACrC,CAAC;AAEJ,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,gBAA0B,EAAY,EAAE,CACtE,SAAS,eAAe;IACtB,OAAO,CACL,KAAC,mBAAmB,cAClB,KAAC,gBAAgB,KAAG,GACA,CACvB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
17
|
+
export declare const StatusBar: ((props: {
|
|
18
|
+
actionsDisabled: boolean;
|
|
19
|
+
}) => JSX.Element) & {
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=StatusBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusBar.d.ts","sourceRoot":"","sources":["../../../src/components/editor/StatusBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAaH,eAAO,MAAM,SAAS,WAAoB;IAAE,eAAe,EAAE,OAAO,CAAA;CAAE;;CAmEpE,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { observer } from 'mobx-react-lite';
|
|
18
|
+
import { flowResult } from 'mobx';
|
|
19
|
+
import { useApplicationStore } from '@finos/legend-application';
|
|
20
|
+
import { AssistantIcon, clsx, HammerIcon, TerminalIcon, } from '@finos/legend-art';
|
|
21
|
+
import { useEditorStore } from './EditorStoreProvider.js';
|
|
22
|
+
export const StatusBar = observer((props) => {
|
|
23
|
+
const editorStore = useEditorStore();
|
|
24
|
+
const applicationStore = useApplicationStore();
|
|
25
|
+
// Other actions
|
|
26
|
+
const toggleAuxPanel = () => editorStore.auxPanelDisplayState.toggle();
|
|
27
|
+
const executeGo = () => {
|
|
28
|
+
flowResult(editorStore.executeGo()).catch(applicationStore.alertUnhandledError);
|
|
29
|
+
};
|
|
30
|
+
const toggleAssistant = () => applicationStore.assistantService.toggleAssistant();
|
|
31
|
+
return (_jsxs("div", { className: "editor__status-bar", children: [_jsx("div", { className: "editor__status-bar__left", children: _jsx("div", { className: "editor__status-bar__workspace" }) }), _jsxs("div", { className: "editor__status-bar__right", children: [_jsx("button", { className: clsx('editor__status-bar__action editor__status-bar__compile-btn', {
|
|
32
|
+
'editor__status-bar__compile-btn--wiggling': editorStore.executionState.isInProgress,
|
|
33
|
+
}), disabled: editorStore.executionState.isInProgress, onClick: executeGo, tabIndex: -1, title: "Execute (F9)", children: _jsx(HammerIcon, {}) }), _jsx("button", { className: clsx('editor__status-bar__action editor__status-bar__action__toggler', {
|
|
34
|
+
'editor__status-bar__action__toggler--active': Boolean(editorStore.auxPanelDisplayState.isOpen),
|
|
35
|
+
}), onClick: toggleAuxPanel, tabIndex: -1, title: "Toggle auxiliary panel (Ctrl + `)", children: _jsx(TerminalIcon, {}) }), _jsx("button", { className: clsx('editor__status-bar__action editor__status-bar__action__toggler', {
|
|
36
|
+
'editor__status-bar__action__toggler--active': !applicationStore.assistantService.isHidden,
|
|
37
|
+
}), onClick: toggleAssistant, tabIndex: -1, title: "Toggle assistant", children: _jsx(AssistantIcon, {}) })] })] }));
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=StatusBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusBar.js","sourceRoot":"","sources":["../../../src/components/editor/StatusBar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,aAAa,EACb,IAAI,EACJ,UAAU,EACV,YAAY,GACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,KAAmC,EAAE,EAAE;IACxE,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAE/C,gBAAgB;IAChB,MAAM,cAAc,GAAG,GAAS,EAAE,CAAC,WAAW,CAAC,oBAAoB,CAAC,MAAM,EAAE,CAAC;IAC7E,MAAM,SAAS,GAAG,GAAS,EAAE;QAC3B,UAAU,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC,CAAC,KAAK,CACvC,gBAAgB,CAAC,mBAAmB,CACrC,CAAC;IACJ,CAAC,CAAC;IACF,MAAM,eAAe,GAAG,GAAS,EAAE,CACjC,gBAAgB,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC;IAEtD,OAAO,CACL,eAAK,SAAS,EAAC,oBAAoB,aACjC,cAAK,SAAS,EAAC,0BAA0B,YACvC,cAAK,SAAS,EAAC,+BAA+B,GAAO,GACjD,EACN,eAAK,SAAS,EAAC,2BAA2B,aACxC,iBACE,SAAS,EAAE,IAAI,CACb,4DAA4D,EAC5D;4BACE,2CAA2C,EACzC,WAAW,CAAC,cAAc,CAAC,YAAY;yBAC1C,CACF,EACD,QAAQ,EAAE,WAAW,CAAC,cAAc,CAAC,YAAY,EACjD,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,CAAC,CAAC,EACZ,KAAK,EAAC,cAAc,YAEpB,KAAC,UAAU,KAAG,GACP,EACT,iBACE,SAAS,EAAE,IAAI,CACb,gEAAgE,EAChE;4BACE,6CAA6C,EAAE,OAAO,CACpD,WAAW,CAAC,oBAAoB,CAAC,MAAM,CACxC;yBACF,CACF,EACD,OAAO,EAAE,cAAc,EACvB,QAAQ,EAAE,CAAC,CAAC,EACZ,KAAK,EAAC,mCAAmC,YAEzC,KAAC,YAAY,KAAG,GACT,EACT,iBACE,SAAS,EAAE,IAAI,CACb,gEAAgE,EAChE;4BACE,6CAA6C,EAC3C,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,QAAQ;yBAC9C,CACF,EACD,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,CAAC,CAAC,EACZ,KAAK,EAAC,kBAAkB,YAExB,KAAC,aAAa,KAAG,GACV,IACL,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
17
|
+
export declare const AuxiliaryPanel: (() => JSX.Element) & {
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=AuxiliaryPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuxiliaryPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/aux-panel/AuxiliaryPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAmBH,eAAO,MAAM,cAAc;;CAyHzB,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { useEffect } from 'react';
|
|
18
|
+
import { observer } from 'mobx-react-lite';
|
|
19
|
+
import { Console } from './ConsolePanel.js';
|
|
20
|
+
import { AUX_PANEL_MODE } from '../../../stores/EditorConfig.js';
|
|
21
|
+
import { SearchPanel } from './SearchPanel.js';
|
|
22
|
+
import { TestRunnerPanel } from './TestRunnerPanel.js';
|
|
23
|
+
import { isNonNullable } from '@finos/legend-shared';
|
|
24
|
+
import { ChevronDownIcon, ChevronUpIcon, clsx, FlaskIcon, SearchIcon, XIcon, } from '@finos/legend-art';
|
|
25
|
+
import { useEditorStore } from '../EditorStoreProvider.js';
|
|
26
|
+
export const AuxiliaryPanel = observer(() => {
|
|
27
|
+
const editorStore = useEditorStore();
|
|
28
|
+
const changeMode = (mode) => () => editorStore.setActiveAuxPanelMode(mode);
|
|
29
|
+
const closePanel = () => editorStore.auxPanelDisplayState.toggle();
|
|
30
|
+
const toggleExpandAuxPanel = () => editorStore.auxPanelDisplayState.toggleMaximize();
|
|
31
|
+
const auxTabMap = {
|
|
32
|
+
[AUX_PANEL_MODE.CONSOLE]: {
|
|
33
|
+
mode: AUX_PANEL_MODE.CONSOLE,
|
|
34
|
+
name: 'CONSOLE',
|
|
35
|
+
icon: undefined,
|
|
36
|
+
isVisible: true,
|
|
37
|
+
},
|
|
38
|
+
[AUX_PANEL_MODE.SEARCH_RESULT]: {
|
|
39
|
+
mode: AUX_PANEL_MODE.SEARCH_RESULT,
|
|
40
|
+
name: 'SEARCH',
|
|
41
|
+
icon: (_jsx("div", { className: "auxiliary-panel__header__tab__icon--search", children: _jsx(SearchIcon, {}) })),
|
|
42
|
+
isVisible: true,
|
|
43
|
+
},
|
|
44
|
+
[AUX_PANEL_MODE.TEST_RUNNER]: {
|
|
45
|
+
mode: AUX_PANEL_MODE.TEST_RUNNER,
|
|
46
|
+
name: 'TEST',
|
|
47
|
+
icon: (_jsx("div", { className: "auxiliary-panel__header__tab__icon--test", children: _jsx(FlaskIcon, {}) })),
|
|
48
|
+
isVisible: true,
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
const tabsToShow = Object.values(AUX_PANEL_MODE).filter((tab) => isNonNullable(auxTabMap[tab]) && auxTabMap[tab].isVisible);
|
|
52
|
+
const isTabVisible = (tabType) => editorStore.activeAuxPanelMode === tabType && tabsToShow.includes(tabType);
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (!tabsToShow.includes(editorStore.activeAuxPanelMode)) {
|
|
55
|
+
editorStore.setActiveAuxPanelMode(AUX_PANEL_MODE.CONSOLE);
|
|
56
|
+
}
|
|
57
|
+
}, [editorStore, tabsToShow, editorStore.activeAuxPanelMode]);
|
|
58
|
+
return (_jsxs("div", { className: "panel auxiliary-panel", children: [_jsxs("div", { className: "panel__header", children: [_jsx("div", { className: "auxiliary-panel__header__tabs", children: tabsToShow
|
|
59
|
+
.map((tab) => auxTabMap[tab])
|
|
60
|
+
.filter(isNonNullable)
|
|
61
|
+
.map((tab) => (_jsxs("button", { tabIndex: -1, className: clsx('auxiliary-panel__header__tab', {
|
|
62
|
+
'auxiliary-panel__header__tab--active': editorStore.activeAuxPanelMode === tab.mode,
|
|
63
|
+
}), onClick: changeMode(tab.mode), children: [tab.icon && (_jsx("div", { className: "auxiliary-panel__header__tab__icon", children: tab.icon })), _jsx("div", { className: "auxiliary-panel__header__tab__title", children: tab.name })] }, tab.mode))) }), _jsxs("div", { className: "auxiliary-panel__header__actions", children: [_jsx("button", { className: "auxiliary-panel__header__action", onClick: toggleExpandAuxPanel, tabIndex: -1, title: "Toggle Expand/Collapse", children: editorStore.auxPanelDisplayState.isMaximized ? (_jsx(ChevronDownIcon, {})) : (_jsx(ChevronUpIcon, {})) }), _jsx("button", { className: "auxiliary-panel__header__action", onClick: closePanel, tabIndex: -1, title: "Close", children: _jsx(XIcon, {}) })] })] }), _jsxs("div", { className: "panel__content", children: [isTabVisible(AUX_PANEL_MODE.CONSOLE) && (_jsx("div", { className: "auxiliary-panel__content__tab", children: _jsx(Console, {}) })), isTabVisible(AUX_PANEL_MODE.SEARCH_RESULT) && (_jsx("div", { className: "auxiliary-panel__content__tab", children: _jsx(SearchPanel, {}) })), isTabVisible(AUX_PANEL_MODE.TEST_RUNNER) && (_jsx("div", { className: "auxiliary-panel__content__tab", children: _jsx(TestRunnerPanel, {}) }))] })] }));
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=AuxiliaryPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuxiliaryPanel.js","sourceRoot":"","sources":["../../../../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+B,YAC5C,KAAC,eAAe,KAAG,GACf,CACP,IACG,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
17
|
+
export declare const Console: (() => JSX.Element) & {
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=ConsolePanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConsolePanel.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/aux-panel/ConsolePanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAMH,eAAO,MAAM,OAAO;;CA4BlB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { BlankPanelContent } from '@finos/legend-art';
|
|
18
|
+
import { observer } from 'mobx-react-lite';
|
|
19
|
+
import { useEditorStore } from '../EditorStoreProvider.js';
|
|
20
|
+
export const Console = observer(() => {
|
|
21
|
+
const editorStore = useEditorStore();
|
|
22
|
+
return (_jsxs("div", { className: "console-panel", children: [editorStore.consoleText && (_jsx("pre", { className: "console-panel__content", children: editorStore.consoleText.trim() })), !editorStore.consoleText && (_jsx(BlankPanelContent, { children: _jsx("div", { className: "auxiliary-panel__splash-screen", children: _jsx("div", { className: "auxiliary-panel__splash-screen__content", children: _jsxs("div", { className: "auxiliary-panel__splash-screen__content__item", children: [_jsx("div", { className: "auxiliary-panel__splash-screen__content__item__label", children: "Execute to see output" }), _jsx("div", { className: "auxiliary-panel__splash-screen__content__item__hot-keys", children: _jsx("div", { className: "hotkey__key", children: "F9" }) })] }) }) }) }))] }));
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=ConsolePanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConsolePanel.js","sourceRoot":"","sources":["../../../../src/components/editor/aux-panel/ConsolePanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,EAAE;IACnC,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IAErC,OAAO,CACL,eAAK,SAAS,EAAC,eAAe,aAC3B,WAAW,CAAC,WAAW,IAAI,CAC1B,cAAK,SAAS,EAAC,wBAAwB,YACpC,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE,GAC3B,CACP,EACA,CAAC,WAAW,CAAC,WAAW,IAAI,CAC3B,KAAC,iBAAiB,cAChB,cAAK,SAAS,EAAC,gCAAgC,YAC7C,cAAK,SAAS,EAAC,yCAAyC,YACtD,eAAK,SAAS,EAAC,+CAA+C,aAC5D,cAAK,SAAS,EAAC,sDAAsD,sCAE/D,EACN,cAAK,SAAS,EAAC,yDAAyD,YACtE,cAAK,SAAS,EAAC,aAAa,mBAAS,GACjC,IACF,GACF,GACF,GACY,CACrB,IACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
17
|
+
export declare const SearchPanel: (() => JSX.Element) & {
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=SearchPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/aux-panel/SearchPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAsWH,eAAO,MAAM,WAAW;;CAgDtB,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { observer } from 'mobx-react-lite';
|
|
18
|
+
import { FileCoordinate, trimPathLeadingSlash, } from '../../../server/models/PureFile.js';
|
|
19
|
+
import { flowResult } from 'mobx';
|
|
20
|
+
import { SearchResultState, UnmatchedFunctionExecutionResultState, UnmatchExecutionResultState, UsageResultState, } from '../../../stores/SearchResultState.js';
|
|
21
|
+
import { getUsageConceptLabel } from '../../../server/models/Usage.js';
|
|
22
|
+
import { ArrowCircleRightIcon, BlankPanelContent, FileAltIcon, PanelLoadingIndicator, PlusIcon, TimesIcon, } from '@finos/legend-art';
|
|
23
|
+
import { useApplicationStore } from '@finos/legend-application';
|
|
24
|
+
import { useEditorStore } from '../EditorStoreProvider.js';
|
|
25
|
+
const SearchResultEntryDisplay = observer((props) => {
|
|
26
|
+
const { searchState, searchEntry } = props;
|
|
27
|
+
const editorStore = useEditorStore();
|
|
28
|
+
const applicationStore = useApplicationStore();
|
|
29
|
+
const goToResult = (coordinate) => () => flowResult(editorStore.loadFile(searchEntry.sourceId, new FileCoordinate(searchEntry.sourceId, coordinate.startLine, coordinate.startColumn))).catch(applicationStore.alertUnhandledError);
|
|
30
|
+
const dismissResultForFile = () => searchState.dismissSearchEntry(searchEntry);
|
|
31
|
+
const dismissCoordinate = (coordinate) => () => {
|
|
32
|
+
searchEntry.dismissCoordinate(coordinate);
|
|
33
|
+
if (!searchEntry.coordinates.length) {
|
|
34
|
+
searchState.dismissSearchEntry(searchEntry);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
return (_jsxs("div", { className: "search-panel__entry", children: [_jsxs("div", { className: "search-panel__entry__header", children: [_jsxs("div", { className: "search-panel__entry__header__title", children: [_jsx("div", { className: "search-panel__entry__header__title__label", children: _jsx(FileAltIcon, {}) }), _jsx("div", { className: "search-panel__entry__header__title__content", children: trimPathLeadingSlash(searchEntry.sourceId) })] }), _jsxs("div", { className: "search-panel__entry__header__actions", children: [_jsx("div", { className: "search-panel__entry__header__action search-panel__entry__header__action--with-counter", children: _jsx("div", { className: "search-panel__entry__header__action__counter", children: searchEntry.coordinates.length }) }), _jsx("button", { className: "search-panel__entry__header__action search-panel__entry__header__action--hidden", tabIndex: -1, title: "Dismiss", onClick: dismissResultForFile, children: _jsx(TimesIcon, {}) })] })] }), _jsx("div", { className: "search-panel__entry__content", children: searchEntry.coordinates.map((coordinate) => (_jsxs("div", { className: "search-panel__entry__content__item", children: [_jsx("div", { className: "search-panel__entry__content__item__label search-panel__entry__content__item__label--full", title: "Go to Result", onClick: goToResult(coordinate), children: `line: ${coordinate.startLine} - column: ${coordinate.startColumn}` }), _jsx("div", { className: "search-panel__entry__content__item__actions", children: _jsx("button", { className: "search-panel__entry__content__item__action search-panel__entry__content__item__action--hidden", tabIndex: -1, title: "Dismiss", onClick: dismissCoordinate(coordinate), children: _jsx(TimesIcon, {}) }) })] }, coordinate.uuid))) })] }));
|
|
38
|
+
});
|
|
39
|
+
const SearchResultDisplay = observer((props) => {
|
|
40
|
+
const { searchState } = props;
|
|
41
|
+
const editorStore = useEditorStore();
|
|
42
|
+
if (!searchState.searchEntries.length) {
|
|
43
|
+
return (_jsx(BlankPanelContent, { children: `No occurrences found for '${editorStore.textSearchCommandState.text}'` }));
|
|
44
|
+
}
|
|
45
|
+
return (_jsxs("div", { className: "search-panel__content", children: [_jsx("div", { className: "search-panel__content__header", children: `Showing ${searchState.numberOfResults} result(s) in ${searchState.numberOfFiles} files for '${editorStore.textSearchCommandState.text}'` }), searchState.searchEntries.map((searchEntry) => (_jsx(SearchResultEntryDisplay, { searchState: searchState, searchEntry: searchEntry }, searchEntry.uuid)))] }));
|
|
46
|
+
});
|
|
47
|
+
const UsageResultDisplay = observer((props) => {
|
|
48
|
+
const { usageState } = props;
|
|
49
|
+
if (!usageState.searchEntries.length) {
|
|
50
|
+
return (_jsx(BlankPanelContent, { children: `No usages found for ${getUsageConceptLabel(usageState.usageConcept)}` }));
|
|
51
|
+
}
|
|
52
|
+
return (_jsxs("div", { className: "search-panel__content", children: [_jsx("div", { className: "search-panel__content__header", children: `Showing ${usageState.numberOfResults} usages(s) in ${usageState.numberOfFiles} files for ${getUsageConceptLabel(usageState.usageConcept)}` }), usageState.searchEntries.map((searchEntry) => (_jsx(SearchResultEntryDisplay, { searchState: usageState, searchEntry: searchEntry }, searchEntry.uuid)))] }));
|
|
53
|
+
});
|
|
54
|
+
const CandidateWithPackageImportedDisplay = observer((props) => {
|
|
55
|
+
const { candidate } = props;
|
|
56
|
+
const editorStore = useEditorStore();
|
|
57
|
+
const applicationStore = useApplicationStore();
|
|
58
|
+
const goToResult = () => {
|
|
59
|
+
flowResult(editorStore.loadFile(candidate.sourceID, new FileCoordinate(candidate.sourceID, candidate.line, candidate.column))).catch(applicationStore.alertUnhandledError);
|
|
60
|
+
};
|
|
61
|
+
return (_jsxs("div", { className: "search-panel__entry__content__item", children: [_jsxs("div", { className: "search-panel__entry__content__item__label__candidate", title: "Go to Result", onClick: goToResult, children: [_jsx("div", { className: "search-panel__entry__content__item__label__candidate-name", children: candidate.foundName }), _jsx("div", { className: "search-panel__entry__content__item__label__candidate-location", children: `${trimPathLeadingSlash(candidate.sourceID)} [${candidate.line}:${candidate.column}]` })] }), _jsx("div", { className: "search-panel__entry__content__item__actions", children: _jsx("button", { className: "search-panel__entry__content__item__action", tabIndex: -1, title: "Go to Result", onClick: goToResult, children: _jsx(ArrowCircleRightIcon, {}) }) })] }));
|
|
62
|
+
});
|
|
63
|
+
const CandidateWithPackageNotImportedDisplay = observer((props) => {
|
|
64
|
+
const { candidate } = props;
|
|
65
|
+
const editorStore = useEditorStore();
|
|
66
|
+
const applicationStore = useApplicationStore();
|
|
67
|
+
const goToResult = () => {
|
|
68
|
+
flowResult(editorStore.loadFile(candidate.sourceID, new FileCoordinate(candidate.sourceID, candidate.line, candidate.column))).catch(applicationStore.alertUnhandledError);
|
|
69
|
+
};
|
|
70
|
+
const useCandidate = () => {
|
|
71
|
+
flowResult(editorStore.updateFileUsingSuggestionCandidate(candidate)).catch(applicationStore.alertUnhandledError);
|
|
72
|
+
};
|
|
73
|
+
return (_jsxs("div", { className: "search-panel__entry__content__item", children: [_jsxs("div", { className: "search-panel__entry__content__item__label__candidate", title: "Add Suggested Import", onClick: useCandidate, children: [_jsx("div", { className: "search-panel__entry__content__item__label__candidate-name", children: candidate.foundName }), _jsx("div", { className: "search-panel__entry__content__item__label__candidate-location", children: `${trimPathLeadingSlash(candidate.sourceID)} [${candidate.line}:${candidate.column}]` })] }), _jsx("div", { className: "search-panel__entry__content__item__actions", children: _jsx("button", { className: "search-panel__entry__content__item__action", tabIndex: -1, title: "Go to Result", onClick: goToResult, children: _jsx(ArrowCircleRightIcon, {}) }) })] }));
|
|
74
|
+
});
|
|
75
|
+
const UnmatchedFunctionExecutionResultDisplay = observer((props) => {
|
|
76
|
+
const { searchState } = props;
|
|
77
|
+
const result = searchState.result;
|
|
78
|
+
return (_jsxs("div", { className: "search-panel__content", children: [!result.candidatesWithPackageImported.length && (_jsx("div", { className: "search-panel__content__header", children: `No functions, in packages already imported, match the function '${result.candidateName}'` })), Boolean(result.candidatesWithPackageImported.length) && (_jsxs(_Fragment, { children: [_jsx("div", { className: "search-panel__content__header", children: `These functions, in packages already imported, would match the function '${result.candidateName}' if you changed the parameters` }), _jsx("div", { className: "search-panel__entry", children: result.candidatesWithPackageImported.map((candidate) => (_jsx(CandidateWithPackageImportedDisplay, { candidate: candidate }, candidate.uuid))) })] })), !result.candidatesWithPackageNotImported.length && (_jsx("div", { className: "search-panel__content__header", children: `No functions, in packages not imported, match the function '${result.candidateName}'` })), Boolean(result.candidatesWithPackageNotImported.length) && (_jsxs(_Fragment, { children: [_jsx("div", { className: "search-panel__content__header", children: `These functions, in packages not imported, match the function '${result.candidateName}'. Click on result to import the necessary package` }), _jsx("div", { className: "search-panel__entry", children: result.candidatesWithPackageNotImported.map((candidate) => (_jsx(CandidateWithPackageNotImportedDisplay, { candidate: candidate }, candidate.uuid))) })] }))] }));
|
|
79
|
+
});
|
|
80
|
+
const UnmatchExecutionResultDisplay = observer((props) => {
|
|
81
|
+
const { searchState } = props;
|
|
82
|
+
const result = searchState.result;
|
|
83
|
+
return (_jsxs("div", { className: "search-panel__content", children: [!result.candidates.length && (_jsx("div", { className: "search-panel__content__header", children: `No possible matches found for '${result.candidateName}'` })), Boolean(result.candidates.length) && (_jsxs(_Fragment, { children: [_jsx("div", { className: "search-panel__content__header", children: `Found possible matches for '${result.candidateName}'. Click on result to import the necessary package` }), _jsx("div", { className: "search-panel__entry", children: result.candidates.map((candidate) => (_jsx(CandidateWithPackageNotImportedDisplay, { candidate: candidate }, candidate.uuid))) })] }))] }));
|
|
84
|
+
});
|
|
85
|
+
export const SearchPanel = observer(() => {
|
|
86
|
+
const editorStore = useEditorStore();
|
|
87
|
+
return (_jsxs("div", { className: "search-panel", children: [_jsx(PanelLoadingIndicator, { isLoading: editorStore.textSearchCommandLoadingState.isInProgress }), !editorStore.searchState && (_jsx(BlankPanelContent, { children: _jsx("div", { className: "auxiliary-panel__splash-screen", children: _jsx("div", { className: "auxiliary-panel__splash-screen__content", children: _jsxs("div", { className: "auxiliary-panel__splash-screen__content__item", children: [_jsx("div", { className: "auxiliary-panel__splash-screen__content__item__label", children: "Search something" }), _jsxs("div", { className: "auxiliary-panel__splash-screen__content__item__hot-keys", children: [_jsx("div", { className: "hotkey__key", children: "Ctrl" }), _jsx("div", { className: "hotkey__plus", children: _jsx(PlusIcon, {}) }), _jsx("div", { className: "hotkey__key", children: "Shift" }), _jsx("div", { className: "hotkey__plus", children: _jsx(PlusIcon, {}) }), _jsx("div", { className: "hotkey__key", children: "F" })] })] }) }) }) })), editorStore.searchState instanceof UsageResultState && (_jsx(UsageResultDisplay, { usageState: editorStore.searchState })), editorStore.searchState instanceof SearchResultState && (_jsx(SearchResultDisplay, { searchState: editorStore.searchState })), editorStore.searchState instanceof
|
|
88
|
+
UnmatchedFunctionExecutionResultState && (_jsx(UnmatchedFunctionExecutionResultDisplay, { searchState: editorStore.searchState })), editorStore.searchState instanceof UnmatchExecutionResultState && (_jsx(UnmatchExecutionResultDisplay, { searchState: editorStore.searchState }))] }));
|
|
89
|
+
});
|
|
90
|
+
//# sourceMappingURL=SearchPanel.js.map
|