@finos/legend-application-studio 23.1.7 → 23.1.8
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/lib/application/LegendStudio.d.ts.map +1 -1
- package/lib/application/LegendStudio.js +3 -14
- package/lib/application/LegendStudio.js.map +1 -1
- package/lib/application/LegendStudioDocumentation.d.ts +5 -0
- package/lib/application/LegendStudioDocumentation.d.ts.map +1 -1
- package/lib/application/LegendStudioDocumentation.js +5 -0
- package/lib/application/LegendStudioDocumentation.js.map +1 -1
- package/lib/components/editor/edit-panel/EditPanel.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/EditPanel.js +1 -1
- package/lib/components/editor/edit-panel/EditPanel.js.map +1 -1
- package/lib/components/editor/edit-panel/FileGenerationViewer.js +2 -2
- package/lib/components/editor/edit-panel/FileGenerationViewer.js.map +1 -1
- package/lib/components/editor/edit-panel/GrammarTextEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/GrammarTextEditor.js +12 -11
- package/lib/components/editor/edit-panel/GrammarTextEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/ModelImporter.js +5 -4
- package/lib/components/editor/edit-panel/ModelImporter.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.js +3 -2
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js +3 -2
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js +5 -3
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js +3 -2
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js +3 -2
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js +12 -11
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.js +2 -2
- package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.js.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.js +5 -4
- package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.js.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.js +3 -2
- package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.js.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.js +4 -3
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.js +3 -2
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingEditor.js +3 -3
- package/lib/components/editor/edit-panel/mapping-editor/MappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts +2 -2
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js +10 -8
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts +6 -6
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js +8 -7
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.d.ts +4 -4
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.js.map +1 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js +3 -2
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.js +3 -2
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js +6 -5
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js +3 -2
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/testable/TestAssertionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/testable/TestAssertionEditor.js +3 -2
- package/lib/components/editor/edit-panel/testable/TestAssertionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js +3 -2
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js.map +1 -1
- package/lib/components/editor/side-bar/Explorer.js +7 -6
- package/lib/components/editor/side-bar/Explorer.js.map +1 -1
- package/lib/components/editor/side-bar/WorkflowManager.d.ts.map +1 -1
- package/lib/components/editor/side-bar/WorkflowManager.js +3 -2
- package/lib/components/editor/side-bar/WorkflowManager.js.map +1 -1
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts.map +1 -1
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.js +4 -3
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.js.map +1 -1
- package/lib/components/extensions/Core_LegendStudioApplicationPlugin.d.ts +2 -1
- package/lib/components/extensions/Core_LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/components/extensions/Core_LegendStudioApplicationPlugin.js +14 -1
- package/lib/components/extensions/Core_LegendStudioApplicationPlugin.js.map +1 -1
- package/lib/components/shared/DiffView.d.ts +2 -2
- package/lib/components/shared/DiffView.d.ts.map +1 -1
- package/lib/components/shared/DiffView.js +8 -7
- package/lib/components/shared/DiffView.js.map +1 -1
- package/lib/components/workspace-setup/CreateProjectModal.d.ts.map +1 -1
- package/lib/components/workspace-setup/CreateProjectModal.js +2 -1
- package/lib/components/workspace-setup/CreateProjectModal.js.map +1 -1
- package/lib/components/workspace-setup/CreateWorkspaceModal.d.ts.map +1 -1
- package/lib/components/workspace-setup/CreateWorkspaceModal.js +2 -1
- package/lib/components/workspace-setup/CreateWorkspaceModal.js.map +1 -1
- package/lib/components/workspace-setup/WorkspaceSetup.d.ts.map +1 -1
- package/lib/components/workspace-setup/WorkspaceSetup.js +2 -1
- package/lib/components/workspace-setup/WorkspaceSetup.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/package.json +8 -11
- package/lib/stores/editor/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/editor/EditorGraphState.js +1 -1
- package/lib/stores/editor/EditorGraphState.js.map +1 -1
- package/lib/stores/editor/EditorTabManagerState.d.ts +1 -1
- package/lib/stores/editor/EditorTabManagerState.d.ts.map +1 -1
- package/lib/stores/editor/EditorTabManagerState.js +1 -1
- package/lib/stores/editor/EditorTabManagerState.js.map +1 -1
- package/lib/stores/editor/GraphEditFormModeState.d.ts.map +1 -1
- package/lib/stores/editor/GraphEditFormModeState.js.map +1 -1
- package/lib/stores/editor/editor-state/EditorState.d.ts +1 -1
- package/lib/stores/editor/editor-state/EditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/EditorState.js +1 -1
- package/lib/stores/editor/editor-state/EditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/FileGenerationViewerState.d.ts +2 -2
- package/lib/stores/editor/editor-state/FileGenerationViewerState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/FileGenerationViewerState.js +7 -7
- package/lib/stores/editor/editor-state/FileGenerationViewerState.js.map +1 -1
- package/lib/stores/editor/editor-state/GrammarTextEditorState.d.ts +3 -3
- package/lib/stores/editor/editor-state/GrammarTextEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/GrammarTextEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.d.ts +2 -2
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.js +14 -13
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts +1 -2
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.js +2 -2
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingTabManagerState.d.ts +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingTabManagerState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingTabManagerState.js +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingTabManagerState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingTestState.d.ts +2 -3
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingTestState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingTestState.js +3 -3
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingTestState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.d.ts +1 -2
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js +2 -2
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
- package/package.json +17 -20
- package/src/application/LegendStudio.tsx +0 -18
- package/src/application/LegendStudioDocumentation.ts +5 -0
- package/src/components/editor/edit-panel/EditPanel.tsx +4 -1
- package/src/components/editor/edit-panel/FileGenerationViewer.tsx +2 -2
- package/src/components/editor/edit-panel/GrammarTextEditor.tsx +55 -50
- package/src/components/editor/edit-panel/ModelImporter.tsx +5 -5
- package/src/components/editor/edit-panel/connection-editor/DatabaseBuilder.tsx +4 -4
- package/src/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.tsx +6 -6
- package/src/components/editor/edit-panel/data-editor/DataElementEditor.tsx +4 -4
- package/src/components/editor/edit-panel/data-editor/EmbeddedDataEditor.tsx +3 -2
- package/src/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.tsx +4 -3
- package/src/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.tsx +22 -20
- package/src/components/editor/edit-panel/diff-editor/EntityDiffView.tsx +2 -2
- package/src/components/editor/edit-panel/element-generation-editor/ElementNativeView.tsx +5 -5
- package/src/components/editor/edit-panel/element-generation-editor/FileSystemViewer.tsx +3 -5
- package/src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.tsx +5 -4
- package/src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.tsx +4 -3
- package/src/components/editor/edit-panel/mapping-editor/MappingEditor.tsx +3 -3
- package/src/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.tsx +18 -16
- package/src/components/editor/edit-panel/mapping-editor/MappingTestEditor.tsx +19 -19
- package/src/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.tsx +4 -4
- package/src/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.tsx +5 -4
- package/src/components/editor/edit-panel/service-editor/ServiceEditor.tsx +2 -2
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.tsx +9 -9
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.tsx +2 -2
- package/src/components/editor/edit-panel/testable/TestAssertionEditor.tsx +4 -3
- package/src/components/editor/edit-panel/uml-editor/AssociationEditor.tsx +2 -2
- package/src/components/editor/side-bar/Explorer.tsx +8 -8
- package/src/components/editor/side-bar/WorkflowManager.tsx +4 -4
- package/src/components/editor/side-bar/testable/GlobalTestRunner.tsx +7 -6
- package/src/components/extensions/Core_LegendStudioApplicationPlugin.tsx +21 -0
- package/src/components/shared/DiffView.tsx +14 -14
- package/src/components/workspace-setup/CreateProjectModal.tsx +2 -4
- package/src/components/workspace-setup/CreateWorkspaceModal.tsx +2 -4
- package/src/components/workspace-setup/WorkspaceSetup.tsx +1 -1
- package/src/index.ts +1 -1
- package/src/stores/editor/EditorGraphState.ts +2 -4
- package/src/stores/editor/EditorTabManagerState.ts +1 -1
- package/src/stores/editor/GraphEditFormModeState.ts +1 -1
- package/src/stores/editor/editor-state/EditorState.ts +1 -1
- package/src/stores/editor/editor-state/FileGenerationViewerState.ts +8 -8
- package/src/stores/editor/editor-state/GrammarTextEditorState.ts +3 -3
- package/src/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.ts +16 -15
- package/src/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.ts +1 -1
- package/src/stores/editor/editor-state/element-editor-state/mapping/MappingTabManagerState.ts +1 -1
- package/src/stores/editor/editor-state/element-editor-state/mapping/MappingTestState.ts +3 -2
- package/src/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.ts +1 -1
|
@@ -18,16 +18,12 @@ import { useEffect, useState, useRef } from 'react';
|
|
|
18
18
|
import { observer } from 'mobx-react-lite';
|
|
19
19
|
import { editor as monacoEditorAPI } from 'monaco-editor';
|
|
20
20
|
import {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
CODE_EDITOR_THEME,
|
|
22
|
+
CODE_EDITOR_LANGUAGE,
|
|
23
23
|
TAB_SIZE,
|
|
24
24
|
useApplicationStore,
|
|
25
25
|
} from '@finos/legend-application';
|
|
26
|
-
import {
|
|
27
|
-
disposeDiffEditor,
|
|
28
|
-
getBaseTextEditorOptions,
|
|
29
|
-
useResizeDetector,
|
|
30
|
-
} from '@finos/legend-art';
|
|
26
|
+
import { useResizeDetector } from '@finos/legend-art';
|
|
31
27
|
import {
|
|
32
28
|
isString,
|
|
33
29
|
stringifyLosslessJSON,
|
|
@@ -35,10 +31,14 @@ import {
|
|
|
35
31
|
tryToFormatLosslessJSONString,
|
|
36
32
|
} from '@finos/legend-shared';
|
|
37
33
|
import { useEditorStore } from '../editor/EditorStoreProvider.js';
|
|
34
|
+
import {
|
|
35
|
+
disposeDiffCodeEditor,
|
|
36
|
+
getBaseCodeEditorOptions,
|
|
37
|
+
} from '@finos/legend-lego/code-editor';
|
|
38
38
|
|
|
39
39
|
export const TextDiffView = observer(
|
|
40
40
|
(props: {
|
|
41
|
-
language:
|
|
41
|
+
language: CODE_EDITOR_LANGUAGE;
|
|
42
42
|
from?: string | undefined;
|
|
43
43
|
to?: string | undefined;
|
|
44
44
|
}) => {
|
|
@@ -63,8 +63,8 @@ export const TextDiffView = observer(
|
|
|
63
63
|
if (!editor && editorRef.current) {
|
|
64
64
|
const element = editorRef.current;
|
|
65
65
|
const _editor = monacoEditorAPI.createDiffEditor(element, {
|
|
66
|
-
...
|
|
67
|
-
theme:
|
|
66
|
+
...getBaseCodeEditorOptions(),
|
|
67
|
+
theme: CODE_EDITOR_THEME.LEGEND,
|
|
68
68
|
readOnly: true,
|
|
69
69
|
});
|
|
70
70
|
setEditor(_editor);
|
|
@@ -83,15 +83,15 @@ export const TextDiffView = observer(
|
|
|
83
83
|
useEffect(
|
|
84
84
|
() => (): void => {
|
|
85
85
|
if (editor) {
|
|
86
|
-
|
|
86
|
+
disposeDiffCodeEditor(editor);
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
[editor],
|
|
90
90
|
); // dispose editor
|
|
91
91
|
|
|
92
92
|
return (
|
|
93
|
-
<div ref={ref} className="
|
|
94
|
-
<div className="
|
|
93
|
+
<div ref={ref} className="code-editor__container">
|
|
94
|
+
<div className="code-editor__body" ref={editorRef} />
|
|
95
95
|
</div>
|
|
96
96
|
);
|
|
97
97
|
},
|
|
@@ -121,7 +121,7 @@ export const JsonDiffView = observer(
|
|
|
121
121
|
|
|
122
122
|
return (
|
|
123
123
|
<TextDiffView
|
|
124
|
-
language={
|
|
124
|
+
language={CODE_EDITOR_LANGUAGE.JSON}
|
|
125
125
|
from={formatJSONLikeValue(from, Boolean(lossless))}
|
|
126
126
|
to={formatJSONLikeValue(to, Boolean(lossless))}
|
|
127
127
|
/>
|
|
@@ -34,14 +34,12 @@ import {
|
|
|
34
34
|
import { LEGEND_STUDIO_TEST_ID } from '../../application/LegendStudioTesting.js';
|
|
35
35
|
import { isNumber } from '@finos/legend-shared';
|
|
36
36
|
import { flowResult } from 'mobx';
|
|
37
|
-
import {
|
|
38
|
-
DocumentationLink,
|
|
39
|
-
useConditionedApplicationNavigationContext,
|
|
40
|
-
} from '@finos/legend-application';
|
|
37
|
+
import { useConditionedApplicationNavigationContext } from '@finos/legend-application';
|
|
41
38
|
import { LEGEND_STUDIO_DOCUMENTATION_KEY } from '../../application/LegendStudioDocumentation.js';
|
|
42
39
|
import { LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY } from '../../application/LegendStudioApplicationNavigationContext.js';
|
|
43
40
|
import { useLegendStudioApplicationStore } from '../LegendStudioBaseStoreProvider.js';
|
|
44
41
|
import { useWorkspaceSetupStore } from './WorkspaceSetup.js';
|
|
42
|
+
import { DocumentationLink } from '@finos/legend-application/components';
|
|
45
43
|
|
|
46
44
|
enum CREATE_PROJECT_MODAL_TAB {
|
|
47
45
|
CREATE = 'CREATE',
|
|
@@ -28,12 +28,10 @@ import {
|
|
|
28
28
|
} from '@finos/legend-art';
|
|
29
29
|
import { flowResult } from 'mobx';
|
|
30
30
|
import { type Project, WorkspaceType } from '@finos/legend-server-sdlc';
|
|
31
|
-
import {
|
|
32
|
-
useApplicationStore,
|
|
33
|
-
DocumentationLink,
|
|
34
|
-
} from '@finos/legend-application';
|
|
31
|
+
import { useApplicationStore } from '@finos/legend-application';
|
|
35
32
|
import { LEGEND_STUDIO_DOCUMENTATION_KEY } from '../../application/LegendStudioDocumentation.js';
|
|
36
33
|
import { useWorkspaceSetupStore } from './WorkspaceSetup.js';
|
|
34
|
+
import { DocumentationLink } from '@finos/legend-application/components';
|
|
37
35
|
|
|
38
36
|
export const CreateWorkspaceModal = observer(
|
|
39
37
|
(props: { selectedProject: Project }) => {
|
|
@@ -34,7 +34,6 @@ import {
|
|
|
34
34
|
} from '../../application/LegendStudioNavigation.js';
|
|
35
35
|
import { flowResult } from 'mobx';
|
|
36
36
|
import {
|
|
37
|
-
DocumentationLink,
|
|
38
37
|
useApplicationNavigationContext,
|
|
39
38
|
useParams,
|
|
40
39
|
} from '@finos/legend-application';
|
|
@@ -57,6 +56,7 @@ import {
|
|
|
57
56
|
import { debounce, guaranteeNonNullable } from '@finos/legend-shared';
|
|
58
57
|
import { WorkspaceSetupStore } from '../../stores/workspace-setup/WorkspaceSetupStore.js';
|
|
59
58
|
import { useSDLCServerClient } from '@finos/legend-server-sdlc';
|
|
59
|
+
import { DocumentationLink } from '@finos/legend-application/components';
|
|
60
60
|
|
|
61
61
|
const WorkspaceSetupStoreContext = createContext<
|
|
62
62
|
WorkspaceSetupStore | undefined
|
package/src/index.ts
CHANGED
|
@@ -80,7 +80,7 @@ export * from './stores/editor/EditorStoreTestUtils.js';
|
|
|
80
80
|
|
|
81
81
|
export { PostProcessorEditorState } from './stores/editor/editor-state/element-editor-state/connection/PostProcessorEditorState.js';
|
|
82
82
|
export { MappingExecutionState } from './stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.js';
|
|
83
|
-
export {
|
|
83
|
+
export { DEPRECATED__MappingTestState } from './stores/editor/editor-state/element-editor-state/mapping/MappingTestState.js';
|
|
84
84
|
export {
|
|
85
85
|
ConnectionValueState,
|
|
86
86
|
RelationalDatabaseConnectionValueState,
|
|
@@ -91,14 +91,12 @@ import {
|
|
|
91
91
|
createGraphBuilderReport,
|
|
92
92
|
ExecutionEnvironmentInstance,
|
|
93
93
|
} from '@finos/legend-graph';
|
|
94
|
-
import {
|
|
95
|
-
LegendApplicationTelemetryHelper,
|
|
96
|
-
type TabState,
|
|
97
|
-
} from '@finos/legend-application';
|
|
94
|
+
import { LegendApplicationTelemetryHelper } from '@finos/legend-application';
|
|
98
95
|
import { CONFIGURATION_EDITOR_TAB } from './editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js';
|
|
99
96
|
import { PACKAGEABLE_ELEMENT_TYPE } from './shared/ModelClassifierUtils.js';
|
|
100
97
|
import { LEGEND_STUDIO_APP_EVENT } from '../../application/LegendStudioEvent.js';
|
|
101
98
|
import { LEGEND_STUDIO_SETTING_KEY } from '../../application/LegendStudioSetting.js';
|
|
99
|
+
import type { TabState } from '@finos/legend-application/components';
|
|
102
100
|
|
|
103
101
|
export enum GraphBuilderStatus {
|
|
104
102
|
SUCCEEDED = 'SUCCEEDED',
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { TabManagerState } from '@finos/legend-application';
|
|
18
17
|
import {
|
|
19
18
|
Association,
|
|
20
19
|
Class,
|
|
@@ -57,6 +56,7 @@ import { GenerationSpecificationEditorState } from './editor-state/GenerationSpe
|
|
|
57
56
|
import { UnsupportedElementEditorState } from './editor-state/UnsupportedElementEditorState.js';
|
|
58
57
|
import type { EditorStore } from './EditorStore.js';
|
|
59
58
|
import type { DSL_LegendStudioApplicationPlugin_Extension } from '../LegendStudioApplicationPlugin.js';
|
|
59
|
+
import { TabManagerState } from '@finos/legend-application/components';
|
|
60
60
|
|
|
61
61
|
export class EditorTabManagerState extends TabManagerState {
|
|
62
62
|
readonly editorStore: EditorStore;
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type { TabState } from '@finos/legend-application';
|
|
18
17
|
import {
|
|
19
18
|
type PackageableElement,
|
|
20
19
|
isElementReadOnly,
|
|
@@ -55,6 +54,7 @@ import {
|
|
|
55
54
|
import { ElementEditorState } from './editor-state/element-editor-state/ElementEditorState.js';
|
|
56
55
|
import { LegendStudioTelemetryHelper } from '../../application/LegendStudioTelemetryHelper.js';
|
|
57
56
|
import { GraphEditorMode } from './GraphEditorMode.js';
|
|
57
|
+
import type { TabState } from '@finos/legend-application/components';
|
|
58
58
|
|
|
59
59
|
export class GraphEditFormModeState extends GraphEditorMode {
|
|
60
60
|
*initialize(): GeneratorFn<void> {
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
import { TabState } from '@finos/legend-application/components';
|
|
17
18
|
import type { EditorStore } from '../EditorStore.js';
|
|
18
|
-
import { TabState } from '@finos/legend-application';
|
|
19
19
|
|
|
20
20
|
export abstract class EditorState extends TabState {
|
|
21
21
|
readonly editorStore: EditorStore;
|
|
@@ -18,7 +18,7 @@ import type { EditorStore } from '../EditorStore.js';
|
|
|
18
18
|
import { EditorState } from './EditorState.js';
|
|
19
19
|
import { observable, makeObservable, computed } from 'mobx';
|
|
20
20
|
import type { FileSystem_File } from '../shared/FileSystemTreeUtils.js';
|
|
21
|
-
import {
|
|
21
|
+
import { CODE_EDITOR_LANGUAGE, TAB_SIZE } from '@finos/legend-application';
|
|
22
22
|
import { returnUndefOnError } from '@finos/legend-shared';
|
|
23
23
|
|
|
24
24
|
export const getTextContent = (
|
|
@@ -26,7 +26,7 @@ export const getTextContent = (
|
|
|
26
26
|
format: string | undefined,
|
|
27
27
|
): string => {
|
|
28
28
|
switch (format?.toLowerCase()) {
|
|
29
|
-
case
|
|
29
|
+
case CODE_EDITOR_LANGUAGE.JSON:
|
|
30
30
|
return (
|
|
31
31
|
returnUndefOnError(() =>
|
|
32
32
|
JSON.stringify(JSON.parse(content), undefined, TAB_SIZE),
|
|
@@ -39,14 +39,14 @@ export const getTextContent = (
|
|
|
39
39
|
|
|
40
40
|
export const getEditorLanguageForFormat = (
|
|
41
41
|
format?: string,
|
|
42
|
-
):
|
|
42
|
+
): CODE_EDITOR_LANGUAGE => {
|
|
43
43
|
switch (format?.toLowerCase()) {
|
|
44
|
-
case
|
|
45
|
-
return
|
|
46
|
-
case
|
|
47
|
-
return
|
|
44
|
+
case CODE_EDITOR_LANGUAGE.JAVA:
|
|
45
|
+
return CODE_EDITOR_LANGUAGE.JAVA;
|
|
46
|
+
case CODE_EDITOR_LANGUAGE.JSON:
|
|
47
|
+
return CODE_EDITOR_LANGUAGE.JSON;
|
|
48
48
|
default:
|
|
49
|
-
return
|
|
49
|
+
return CODE_EDITOR_LANGUAGE.TEXT;
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
|
|
@@ -44,9 +44,9 @@ import {
|
|
|
44
44
|
PURE_CONNECTION_NAME,
|
|
45
45
|
ExecutionEnvironmentInstance,
|
|
46
46
|
} from '@finos/legend-graph';
|
|
47
|
-
import type { TextEditorPosition } from '@finos/legend-art';
|
|
48
47
|
import { generatePackageableElementTreeNodeDataLabel } from '../shared/PackageTreeUtils.js';
|
|
49
48
|
import { LEGEND_STUDIO_SETTING_KEY } from '../../../application/LegendStudioSetting.js';
|
|
49
|
+
import type { CodeEditorPosition } from '@finos/legend-lego/code-editor';
|
|
50
50
|
|
|
51
51
|
const getGrammarElementTypeLabelRegexString = (
|
|
52
52
|
typeLabel: string,
|
|
@@ -71,7 +71,7 @@ export class GrammarTextEditorState {
|
|
|
71
71
|
graphGrammarText = '';
|
|
72
72
|
currentElementLabelRegexString?: string | undefined;
|
|
73
73
|
wrapText: boolean;
|
|
74
|
-
forcedCursorPosition?:
|
|
74
|
+
forcedCursorPosition?: CodeEditorPosition | undefined;
|
|
75
75
|
|
|
76
76
|
constructor(editorStore: EditorStore) {
|
|
77
77
|
makeObservable(this, {
|
|
@@ -105,7 +105,7 @@ export class GrammarTextEditorState {
|
|
|
105
105
|
this.wrapText = val;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
setForcedCursorPosition(position:
|
|
108
|
+
setForcedCursorPosition(position: CodeEditorPosition | undefined): void {
|
|
109
109
|
this.forcedCursorPosition = position;
|
|
110
110
|
}
|
|
111
111
|
|
|
@@ -31,7 +31,7 @@ import { PureInstanceSetImplementationState } from './PureInstanceSetImplementat
|
|
|
31
31
|
import { ElementEditorState } from '../../../editor-state/element-editor-state/ElementEditorState.js';
|
|
32
32
|
import {
|
|
33
33
|
MAPPING_TEST_EDITOR_TAB_TYPE,
|
|
34
|
-
|
|
34
|
+
DEPRECATED__MappingTestState,
|
|
35
35
|
TEST_RESULT,
|
|
36
36
|
} from './MappingTestState.js';
|
|
37
37
|
import { createMockDataForMappingElementSource } from '../../../shared/MockDataUtils.js';
|
|
@@ -583,7 +583,7 @@ export class MappingEditorState extends ElementEditorState {
|
|
|
583
583
|
mappingExplorerTreeData: TreeData<MappingExplorerTreeNodeData>;
|
|
584
584
|
newMappingElementSpec?: MappingElementSpec | undefined;
|
|
585
585
|
|
|
586
|
-
mappingTestStates:
|
|
586
|
+
mappingTestStates: DEPRECATED__MappingTestState[] = [];
|
|
587
587
|
isRunningAllTests = false;
|
|
588
588
|
allTestRunTime = 0;
|
|
589
589
|
|
|
@@ -623,7 +623,7 @@ export class MappingEditorState extends ElementEditorState {
|
|
|
623
623
|
});
|
|
624
624
|
|
|
625
625
|
this.mappingTestStates = this.mapping.test.map(
|
|
626
|
-
(t) => new
|
|
626
|
+
(t) => new DEPRECATED__MappingTestState(editorStore, t, this),
|
|
627
627
|
);
|
|
628
628
|
this.mappingExplorerTreeData = getMappingElementTreeData(
|
|
629
629
|
this.mapping,
|
|
@@ -675,7 +675,7 @@ export class MappingEditorState extends ElementEditorState {
|
|
|
675
675
|
|
|
676
676
|
*openTab(tabState: MappingEditorTabState): GeneratorFn<void> {
|
|
677
677
|
if (tabState !== this.currentTabState) {
|
|
678
|
-
if (tabState instanceof
|
|
678
|
+
if (tabState instanceof DEPRECATED__MappingTestState) {
|
|
679
679
|
yield flowResult(this.openTest(tabState.test));
|
|
680
680
|
} else if (tabState instanceof MappingElementState) {
|
|
681
681
|
this.openMappingElement(tabState.mappingElement, false);
|
|
@@ -1185,7 +1185,7 @@ export class MappingEditorState extends ElementEditorState {
|
|
|
1185
1185
|
tabState.mappingElement.id.value,
|
|
1186
1186
|
);
|
|
1187
1187
|
return this.createMappingElementState(mappingElement);
|
|
1188
|
-
} else if (tabState instanceof
|
|
1188
|
+
} else if (tabState instanceof DEPRECATED__MappingTestState) {
|
|
1189
1189
|
return mappingEditorState.mappingTestStates.find(
|
|
1190
1190
|
(testState) => testState.test.name === tabState.test.name,
|
|
1191
1191
|
);
|
|
@@ -1210,16 +1210,16 @@ export class MappingEditorState extends ElementEditorState {
|
|
|
1210
1210
|
tabState instanceof MappingElementState &&
|
|
1211
1211
|
tabState.mappingElement === currentlyOpenedMappingElement,
|
|
1212
1212
|
);
|
|
1213
|
-
} else if (this.currentTabState instanceof
|
|
1213
|
+
} else if (this.currentTabState instanceof DEPRECATED__MappingTestState) {
|
|
1214
1214
|
const currentlyOpenedMappingTest =
|
|
1215
1215
|
mappingEditorState.mappingTestStates.find(
|
|
1216
1216
|
(testState) =>
|
|
1217
|
-
this.currentTabState instanceof
|
|
1217
|
+
this.currentTabState instanceof DEPRECATED__MappingTestState &&
|
|
1218
1218
|
testState.test.name === this.currentTabState.test.name,
|
|
1219
1219
|
)?.test;
|
|
1220
1220
|
mappingEditorState.currentTabState = this.openedTabStates.find(
|
|
1221
1221
|
(tabState) =>
|
|
1222
|
-
tabState instanceof
|
|
1222
|
+
tabState instanceof DEPRECATED__MappingTestState &&
|
|
1223
1223
|
tabState.test === currentlyOpenedMappingTest,
|
|
1224
1224
|
);
|
|
1225
1225
|
} else {
|
|
@@ -1351,7 +1351,7 @@ export class MappingEditorState extends ElementEditorState {
|
|
|
1351
1351
|
const isOpened = Boolean(
|
|
1352
1352
|
this.openedTabStates.find(
|
|
1353
1353
|
(tabState) =>
|
|
1354
|
-
tabState instanceof
|
|
1354
|
+
tabState instanceof DEPRECATED__MappingTestState &&
|
|
1355
1355
|
tabState.test === test,
|
|
1356
1356
|
),
|
|
1357
1357
|
);
|
|
@@ -1365,7 +1365,7 @@ export class MappingEditorState extends ElementEditorState {
|
|
|
1365
1365
|
if (
|
|
1366
1366
|
!this.openedTabStates.find(
|
|
1367
1367
|
(tabState) =>
|
|
1368
|
-
tabState instanceof
|
|
1368
|
+
tabState instanceof DEPRECATED__MappingTestState &&
|
|
1369
1369
|
tabState.test === test,
|
|
1370
1370
|
)
|
|
1371
1371
|
) {
|
|
@@ -1373,7 +1373,7 @@ export class MappingEditorState extends ElementEditorState {
|
|
|
1373
1373
|
}
|
|
1374
1374
|
this.currentTabState = this.openedTabStates.find(
|
|
1375
1375
|
(tabState) =>
|
|
1376
|
-
tabState instanceof
|
|
1376
|
+
tabState instanceof DEPRECATED__MappingTestState &&
|
|
1377
1377
|
tabState.test === test,
|
|
1378
1378
|
);
|
|
1379
1379
|
yield flowResult(
|
|
@@ -1413,7 +1413,7 @@ export class MappingEditorState extends ElementEditorState {
|
|
|
1413
1413
|
testState.resetTestRunStatus(),
|
|
1414
1414
|
);
|
|
1415
1415
|
const input = this.mappingTestStates
|
|
1416
|
-
.map((testState:
|
|
1416
|
+
.map((testState: DEPRECATED__MappingTestState) => {
|
|
1417
1417
|
// run non-skip tests, and reset all skipped tests
|
|
1418
1418
|
if (!testState.isSkipped) {
|
|
1419
1419
|
testState.setIsRunningTest(true);
|
|
@@ -1454,7 +1454,7 @@ export class MappingEditorState extends ElementEditorState {
|
|
|
1454
1454
|
|
|
1455
1455
|
*addTest(test: DEPRECATED__MappingTest): GeneratorFn<void> {
|
|
1456
1456
|
this.mappingTestStates.push(
|
|
1457
|
-
new
|
|
1457
|
+
new DEPRECATED__MappingTestState(this.editorStore, test, this),
|
|
1458
1458
|
);
|
|
1459
1459
|
mapping_addTest(
|
|
1460
1460
|
this.mapping,
|
|
@@ -1468,7 +1468,8 @@ export class MappingEditorState extends ElementEditorState {
|
|
|
1468
1468
|
const matchMappingTestState = (
|
|
1469
1469
|
tabState: MappingEditorTabState | undefined,
|
|
1470
1470
|
): boolean =>
|
|
1471
|
-
tabState instanceof
|
|
1471
|
+
tabState instanceof DEPRECATED__MappingTestState &&
|
|
1472
|
+
tabState.test === test;
|
|
1472
1473
|
mapping_deleteTest(this.mapping, test);
|
|
1473
1474
|
if (this.currentTabState && matchMappingTestState(this.currentTabState)) {
|
|
1474
1475
|
yield flowResult(this.closeTab(this.currentTabState));
|
|
@@ -1536,7 +1537,7 @@ export class MappingEditorState extends ElementEditorState {
|
|
|
1536
1537
|
);
|
|
1537
1538
|
// open the test
|
|
1538
1539
|
this.mappingTestStates.push(
|
|
1539
|
-
new
|
|
1540
|
+
new DEPRECATED__MappingTestState(this.editorStore, newTest, this),
|
|
1540
1541
|
);
|
|
1541
1542
|
yield flowResult(this.openTest(newTest));
|
|
1542
1543
|
}
|
package/src/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.ts
CHANGED
|
@@ -105,7 +105,6 @@ import {
|
|
|
105
105
|
import {
|
|
106
106
|
ActionAlertActionType,
|
|
107
107
|
ActionAlertType,
|
|
108
|
-
ExecutionPlanState,
|
|
109
108
|
TAB_SIZE,
|
|
110
109
|
} from '@finos/legend-application';
|
|
111
110
|
import {
|
|
@@ -133,6 +132,7 @@ import {
|
|
|
133
132
|
LambdaEditorState,
|
|
134
133
|
QueryBuilderTelemetryHelper,
|
|
135
134
|
QUERY_BUILDER_EVENT,
|
|
135
|
+
ExecutionPlanState,
|
|
136
136
|
} from '@finos/legend-query-builder';
|
|
137
137
|
import { MappingEditorTabState } from './MappingTabManagerState.js';
|
|
138
138
|
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
ModelStore,
|
|
81
81
|
reportGraphAnalytics,
|
|
82
82
|
} from '@finos/legend-graph';
|
|
83
|
-
import {
|
|
83
|
+
import { TAB_SIZE } from '@finos/legend-application';
|
|
84
84
|
import { flatData_setData } from '../../../shared/modifier/STO_FlatData_GraphModifierHelper.js';
|
|
85
85
|
import {
|
|
86
86
|
expectedOutputMappingTestAssert_setExpectedOutput,
|
|
@@ -99,6 +99,7 @@ import {
|
|
|
99
99
|
LambdaEditorState,
|
|
100
100
|
QueryBuilderTelemetryHelper,
|
|
101
101
|
QUERY_BUILDER_EVENT,
|
|
102
|
+
ExecutionPlanState,
|
|
102
103
|
} from '@finos/legend-query-builder';
|
|
103
104
|
import { MappingEditorTabState } from './MappingTabManagerState.js';
|
|
104
105
|
|
|
@@ -397,7 +398,7 @@ export enum MAPPING_TEST_EDITOR_TAB_TYPE {
|
|
|
397
398
|
* TODO: Remove once migration from `MappingTest_Legacy` to `MappingTest` is complete
|
|
398
399
|
* @deprecated
|
|
399
400
|
*/
|
|
400
|
-
export class
|
|
401
|
+
export class DEPRECATED__MappingTestState extends MappingEditorTabState {
|
|
401
402
|
readonly editorStore: EditorStore;
|
|
402
403
|
readonly mappingEditorState: MappingEditorState;
|
|
403
404
|
|
package/src/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.ts
CHANGED
|
@@ -34,7 +34,6 @@ import {
|
|
|
34
34
|
import {
|
|
35
35
|
DEFAULT_TYPEAHEAD_SEARCH_LIMIT,
|
|
36
36
|
DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH,
|
|
37
|
-
ExecutionPlanState,
|
|
38
37
|
generateExtensionUrlPattern,
|
|
39
38
|
generatePath,
|
|
40
39
|
TAB_SIZE,
|
|
@@ -94,6 +93,7 @@ import {
|
|
|
94
93
|
PARAMETER_SUBMIT_ACTION,
|
|
95
94
|
QueryBuilderTelemetryHelper,
|
|
96
95
|
QUERY_BUILDER_EVENT,
|
|
96
|
+
ExecutionPlanState,
|
|
97
97
|
} from '@finos/legend-query-builder';
|
|
98
98
|
|
|
99
99
|
enum DSL_SERVICE_PATH_PARAM_TOKEN {
|