@finos/legend-application-studio 22.2.0 → 22.3.0
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/components/editor/StatusBar.js +1 -1
- package/lib/components/editor/StatusBar.js.map +1 -1
- package/lib/components/editor/command-center/ProjectSearchCommand.d.ts.map +1 -1
- package/lib/components/editor/command-center/ProjectSearchCommand.js +1 -0
- package/lib/components/editor/command-center/ProjectSearchCommand.js.map +1 -1
- package/lib/components/editor/edit-panel/EditPanel.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/EditPanel.js +24 -11
- package/lib/components/editor/edit-panel/EditPanel.js.map +1 -1
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js +2 -1
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js +1 -0
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.js +4 -3
- package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.d.ts +32 -0
- package/lib/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.js +66 -0
- package/lib/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.d.ts +0 -23
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js +6 -58
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.d.ts +41 -0
- package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.js +77 -0
- package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.js.map +1 -0
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.d.ts +7 -0
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.js +19 -14
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js +3 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.js +3 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.js +3 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js +3 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.js +51 -13
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js +18 -10
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts +1 -3
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js +2 -20
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js +9 -3
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.js +1 -0
- package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
- package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
- package/lib/components/editor/side-bar/Explorer.js +29 -8
- package/lib/components/editor/side-bar/Explorer.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 +17 -3
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/package.json +3 -3
- package/lib/stores/DSL_Generation_LegendStudioApplicationPlugin_Extension.d.ts +2 -2
- package/lib/stores/DSL_Generation_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -1
- package/lib/stores/DependencyProjectViewerHelper.d.ts +19 -0
- package/lib/stores/DependencyProjectViewerHelper.d.ts.map +1 -0
- package/lib/stores/DependencyProjectViewerHelper.js +23 -0
- package/lib/stores/DependencyProjectViewerHelper.js.map +1 -0
- package/lib/stores/EditorGraphState.d.ts +9 -2
- package/lib/stores/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/EditorGraphState.js +39 -137
- package/lib/stores/EditorGraphState.js.map +1 -1
- package/lib/stores/EditorStore.d.ts +1 -1
- package/lib/stores/EditorStore.d.ts.map +1 -1
- package/lib/stores/EditorStore.js +14 -6
- package/lib/stores/EditorStore.js.map +1 -1
- package/lib/stores/EditorTabManagerState.d.ts +1 -2
- package/lib/stores/EditorTabManagerState.d.ts.map +1 -1
- package/lib/stores/EditorTabManagerState.js +11 -25
- package/lib/stores/EditorTabManagerState.js.map +1 -1
- package/lib/stores/ExplorerTreeState.d.ts +4 -4
- package/lib/stores/ExplorerTreeState.d.ts.map +1 -1
- package/lib/stores/ExplorerTreeState.js +12 -15
- package/lib/stores/ExplorerTreeState.js.map +1 -1
- package/lib/stores/editor/NewElementState.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.js +0 -3
- package/lib/stores/editor/NewElementState.js.map +1 -1
- package/lib/stores/editor-state/ExternalFormatState.d.ts +2 -0
- package/lib/stores/editor-state/ExternalFormatState.d.ts.map +1 -1
- package/lib/stores/editor-state/ExternalFormatState.js +6 -0
- package/lib/stores/editor-state/ExternalFormatState.js.map +1 -1
- package/lib/stores/editor-state/FileGenerationState.d.ts +18 -18
- package/lib/stores/editor-state/FileGenerationState.d.ts.map +1 -1
- package/lib/stores/editor-state/FileGenerationState.js +86 -133
- package/lib/stores/editor-state/FileGenerationState.js.map +1 -1
- package/lib/stores/editor-state/FileGenerationViewerState.d.ts +3 -3
- package/lib/stores/editor-state/FileGenerationViewerState.d.ts.map +1 -1
- package/lib/stores/editor-state/FileGenerationViewerState.js.map +1 -1
- package/lib/stores/editor-state/FileSystemState.d.ts +30 -0
- package/lib/stores/editor-state/FileSystemState.d.ts.map +1 -0
- package/lib/stores/editor-state/FileSystemState.js +82 -0
- package/lib/stores/editor-state/FileSystemState.js.map +1 -0
- package/lib/stores/editor-state/GraphGenerationState.d.ts +9 -9
- package/lib/stores/editor-state/GraphGenerationState.d.ts.map +1 -1
- package/lib/stores/editor-state/GraphGenerationState.js +14 -15
- package/lib/stores/editor-state/GraphGenerationState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts +25 -2
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.js +50 -7
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.d.ts +44 -0
- package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.js +172 -0
- package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js +2 -2
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.d.ts +3 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.js +14 -2
- package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts +9 -6
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +38 -28
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js +6 -3
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js.map +1 -1
- package/lib/stores/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.js +1 -0
- package/lib/stores/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.js.map +1 -1
- package/lib/stores/project-viewer/ProjectViewerStore.d.ts.map +1 -1
- package/lib/stores/project-viewer/ProjectViewerStore.js +1 -1
- package/lib/stores/project-viewer/ProjectViewerStore.js.map +1 -1
- package/lib/stores/shared/FileSystemTreeUtils.d.ts +56 -0
- package/lib/stores/shared/FileSystemTreeUtils.d.ts.map +1 -0
- package/lib/stores/shared/{FileGenerationTreeUtils.js → FileSystemTreeUtils.js} +31 -32
- package/lib/stores/shared/FileSystemTreeUtils.js.map +1 -0
- package/lib/stores/shared/PackageTreeUtils.d.ts +6 -4
- package/lib/stores/shared/PackageTreeUtils.d.ts.map +1 -1
- package/lib/stores/shared/PackageTreeUtils.js +90 -11
- package/lib/stores/shared/PackageTreeUtils.js.map +1 -1
- package/lib/stores/sidebar-state/LocalChangesState.d.ts +16 -3
- package/lib/stores/sidebar-state/LocalChangesState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/LocalChangesState.js +143 -246
- package/lib/stores/sidebar-state/LocalChangesState.js.map +1 -1
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.d.ts +3 -3
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.js +37 -1
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.js.map +1 -1
- package/package.json +12 -12
- package/src/components/editor/StatusBar.tsx +1 -1
- package/src/components/editor/command-center/ProjectSearchCommand.tsx +1 -0
- package/src/components/editor/edit-panel/EditPanel.tsx +79 -25
- package/src/components/editor/edit-panel/GenerationSpecificationEditor.tsx +2 -1
- package/src/components/editor/edit-panel/connection-editor/ConnectionEditor.tsx +1 -0
- package/src/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.tsx +5 -7
- package/src/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.tsx +194 -0
- package/src/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.tsx +6 -270
- package/src/components/editor/edit-panel/element-generation-editor/FileSystemViewer.tsx +296 -0
- package/src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.tsx +177 -155
- package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +3 -1
- package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.tsx +3 -3
- package/src/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.tsx +3 -0
- package/src/components/editor/edit-panel/mapping-editor/NewMappingElementModal.tsx +3 -1
- package/src/components/editor/edit-panel/service-editor/ServiceEditor.tsx +243 -184
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.tsx +42 -15
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.tsx +2 -65
- package/src/components/editor/edit-panel/uml-editor/ClassEditor.tsx +9 -3
- package/src/components/editor/side-bar/CreateNewElementModal.tsx +1 -0
- package/src/components/editor/side-bar/Explorer.tsx +82 -13
- package/src/components/editor/side-bar/testable/GlobalTestRunner.tsx +31 -9
- package/src/index.ts +5 -2
- package/src/stores/DSL_Generation_LegendStudioApplicationPlugin_Extension.ts +2 -2
- package/src/stores/DependencyProjectViewerHelper.ts +39 -0
- package/src/stores/EditorGraphState.ts +67 -197
- package/src/stores/EditorStore.ts +22 -10
- package/src/stores/EditorTabManagerState.ts +16 -38
- package/src/stores/ExplorerTreeState.ts +29 -23
- package/src/stores/editor/NewElementState.ts +0 -2
- package/src/stores/editor-state/ExternalFormatState.ts +9 -0
- package/src/stores/editor-state/FileGenerationState.ts +129 -180
- package/src/stores/editor-state/FileGenerationViewerState.ts +3 -3
- package/src/stores/editor-state/FileSystemState.ts +111 -0
- package/src/stores/editor-state/GraphGenerationState.ts +35 -31
- package/src/stores/editor-state/element-editor-state/ElementEditorState.ts +91 -6
- package/src/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.ts +266 -0
- package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +1 -1
- package/src/stores/editor-state/element-editor-state/mapping/MappingTestState.ts +2 -2
- package/src/stores/editor-state/element-editor-state/service/ServiceEditorState.ts +23 -2
- package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +60 -55
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts +6 -2
- package/src/stores/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.ts +2 -0
- package/src/stores/project-viewer/ProjectViewerStore.ts +3 -1
- package/src/stores/shared/{FileGenerationTreeUtils.ts → FileSystemTreeUtils.ts} +77 -76
- package/src/stores/shared/PackageTreeUtils.ts +144 -10
- package/src/stores/sidebar-state/LocalChangesState.ts +279 -450
- package/src/stores/sidebar-state/testable/GlobalTestRunnerState.ts +42 -3
- package/tsconfig.json +6 -1
- package/lib/stores/shared/FileGenerationTreeUtils.d.ts +0 -56
- package/lib/stores/shared/FileGenerationTreeUtils.d.ts.map +0 -1
- package/lib/stores/shared/FileGenerationTreeUtils.js.map +0 -1
|
@@ -760,7 +760,7 @@ export class MappingExecutionState extends MappingEditorTabState {
|
|
|
760
760
|
) {
|
|
761
761
|
this.isExecuting = true;
|
|
762
762
|
const result =
|
|
763
|
-
(yield this.editorStore.graphManagerState.graphManager.
|
|
763
|
+
(yield this.editorStore.graphManagerState.graphManager.runQuery(
|
|
764
764
|
query,
|
|
765
765
|
this.mappingEditorState.mapping,
|
|
766
766
|
runtime,
|
|
@@ -647,7 +647,7 @@ export class MappingTestState extends MappingEditorTabState {
|
|
|
647
647
|
const runtime = this.inputDataState.runtime;
|
|
648
648
|
this.isExecutingTest = true;
|
|
649
649
|
const result =
|
|
650
|
-
(yield this.editorStore.graphManagerState.graphManager.
|
|
650
|
+
(yield this.editorStore.graphManagerState.graphManager.runQuery(
|
|
651
651
|
query,
|
|
652
652
|
this.mappingEditorState.mapping,
|
|
653
653
|
runtime,
|
|
@@ -707,7 +707,7 @@ export class MappingTestState extends MappingEditorTabState {
|
|
|
707
707
|
try {
|
|
708
708
|
const runtime = this.inputDataState.runtime;
|
|
709
709
|
this.isRunningTest = true;
|
|
710
|
-
promise = this.editorStore.graphManagerState.graphManager.
|
|
710
|
+
promise = this.editorStore.graphManagerState.graphManager.runQuery(
|
|
711
711
|
this.test.query,
|
|
712
712
|
this.mappingEditorState.mapping,
|
|
713
713
|
runtime,
|
|
@@ -14,8 +14,13 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { observable, computed, action, makeObservable } from 'mobx';
|
|
18
|
-
import {
|
|
17
|
+
import { observable, computed, action, makeObservable, flow } from 'mobx';
|
|
18
|
+
import {
|
|
19
|
+
type GeneratorFn,
|
|
20
|
+
type PlainObject,
|
|
21
|
+
assertErrorThrown,
|
|
22
|
+
guaranteeType,
|
|
23
|
+
} from '@finos/legend-shared';
|
|
19
24
|
import type { EditorStore } from '../../../EditorStore.js';
|
|
20
25
|
import {
|
|
21
26
|
type ServiceExecutionState,
|
|
@@ -33,6 +38,7 @@ import {
|
|
|
33
38
|
PureMultiExecution,
|
|
34
39
|
} from '@finos/legend-graph';
|
|
35
40
|
import { ServiceTestableState } from './testable/ServiceTestableState.js';
|
|
41
|
+
import { User } from '@finos/legend-server-sdlc';
|
|
36
42
|
|
|
37
43
|
export enum SERVICE_TAB {
|
|
38
44
|
GENERAL = 'GENERAL',
|
|
@@ -59,6 +65,7 @@ export class ServiceEditorState extends ElementEditorState {
|
|
|
59
65
|
resetExecutionState: action,
|
|
60
66
|
service: computed,
|
|
61
67
|
reprocess: action,
|
|
68
|
+
searchUsers: flow,
|
|
62
69
|
});
|
|
63
70
|
|
|
64
71
|
this.executionState = this.buildExecutionState();
|
|
@@ -119,6 +126,20 @@ export class ServiceEditorState extends ElementEditorState {
|
|
|
119
126
|
);
|
|
120
127
|
}
|
|
121
128
|
|
|
129
|
+
*searchUsers(name: string): GeneratorFn<User[]> {
|
|
130
|
+
try {
|
|
131
|
+
return (
|
|
132
|
+
(yield this.editorStore.sdlcServerClient.getUsers(
|
|
133
|
+
name,
|
|
134
|
+
)) as PlainObject<User>[]
|
|
135
|
+
).map((p) => User.serialization.fromJson(p));
|
|
136
|
+
} catch (error) {
|
|
137
|
+
assertErrorThrown(error);
|
|
138
|
+
this.editorStore.applicationStore.notifyError(error);
|
|
139
|
+
return [];
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
122
143
|
reprocess(
|
|
123
144
|
newElement: PackageableElement,
|
|
124
145
|
editorStore: EditorStore,
|
|
@@ -379,69 +379,70 @@ export interface ServiceExecutionContext {
|
|
|
379
379
|
}
|
|
380
380
|
|
|
381
381
|
export abstract class ServiceExecutionContextState {
|
|
382
|
-
executionContext: ServiceExecutionContext;
|
|
383
382
|
executionState: ServiceExecutionState;
|
|
384
383
|
|
|
385
|
-
constructor(
|
|
386
|
-
executionContext: ServiceExecutionContext,
|
|
387
|
-
executionState: ServiceExecutionState,
|
|
388
|
-
) {
|
|
389
|
-
this.executionContext = executionContext;
|
|
384
|
+
constructor(executionState: ServiceExecutionState) {
|
|
390
385
|
this.executionState = executionState;
|
|
391
386
|
}
|
|
392
387
|
|
|
388
|
+
abstract get executionContext(): ServiceExecutionContext;
|
|
393
389
|
abstract setMapping(value: Mapping): void;
|
|
394
390
|
abstract setRuntime(value: Runtime): void;
|
|
395
391
|
}
|
|
396
392
|
|
|
397
393
|
export class SingleExecutionContextState extends ServiceExecutionContextState {
|
|
398
|
-
declare
|
|
394
|
+
declare executionState: SingleServicePureExecutionState;
|
|
399
395
|
|
|
400
|
-
constructor(
|
|
401
|
-
|
|
402
|
-
executionState: ServiceExecutionState,
|
|
403
|
-
) {
|
|
404
|
-
super(
|
|
405
|
-
{
|
|
406
|
-
mapping:
|
|
407
|
-
executionContext.mapping as PackageableElementReference<Mapping>,
|
|
408
|
-
runtime: executionContext.runtime as Runtime,
|
|
409
|
-
},
|
|
410
|
-
executionState,
|
|
411
|
-
);
|
|
412
|
-
this.executionContext1 = executionContext;
|
|
396
|
+
constructor(executionState: SingleServicePureExecutionState) {
|
|
397
|
+
super(executionState);
|
|
413
398
|
makeObservable(this, {
|
|
414
|
-
executionContext: observable,
|
|
415
399
|
setMapping: action,
|
|
416
400
|
setRuntime: action,
|
|
417
401
|
});
|
|
402
|
+
this.executionState = executionState;
|
|
418
403
|
}
|
|
419
404
|
|
|
420
405
|
setMapping(value: Mapping): void {
|
|
421
|
-
this.executionContext.mapping =
|
|
422
|
-
PackageableElementExplicitReference.create(value);
|
|
423
406
|
pureSingleExecution_setMapping(
|
|
424
|
-
this.
|
|
407
|
+
this.executionState.execution,
|
|
425
408
|
value,
|
|
426
409
|
this.executionState.editorStore.changeDetectionState.observerContext,
|
|
427
410
|
);
|
|
428
411
|
}
|
|
429
412
|
setRuntime(value: Runtime): void {
|
|
430
|
-
this.executionContext.runtime = value;
|
|
431
413
|
pureSingleExecution_setRuntime(
|
|
432
|
-
this.
|
|
414
|
+
this.executionState.execution,
|
|
433
415
|
value,
|
|
434
416
|
this.executionState.editorStore.changeDetectionState.observerContext,
|
|
435
417
|
);
|
|
436
418
|
}
|
|
419
|
+
|
|
420
|
+
get executionContext(): ServiceExecutionContext {
|
|
421
|
+
return {
|
|
422
|
+
mapping: guaranteeNonNullable(this.executionState.execution.mapping),
|
|
423
|
+
runtime: guaranteeNonNullable(this.executionState.execution.runtime),
|
|
424
|
+
};
|
|
425
|
+
}
|
|
437
426
|
}
|
|
438
427
|
|
|
439
428
|
export class KeyedExecutionContextState extends ServiceExecutionContextState {
|
|
440
|
-
|
|
429
|
+
keyedExecutionParameter: KeyedExecutionParameter;
|
|
430
|
+
|
|
431
|
+
constructor(
|
|
432
|
+
keyedExecutionParameter: KeyedExecutionParameter,
|
|
433
|
+
executionState: MultiServicePureExecutionState,
|
|
434
|
+
) {
|
|
435
|
+
super(executionState);
|
|
436
|
+
makeObservable(this, {
|
|
437
|
+
setMapping: action,
|
|
438
|
+
setRuntime: action,
|
|
439
|
+
});
|
|
440
|
+
this.keyedExecutionParameter = keyedExecutionParameter;
|
|
441
|
+
}
|
|
441
442
|
|
|
442
443
|
setMapping(value: Mapping): void {
|
|
443
444
|
pureSingleExecution_setMapping(
|
|
444
|
-
this.
|
|
445
|
+
this.keyedExecutionParameter,
|
|
445
446
|
value,
|
|
446
447
|
this.executionState.editorStore.changeDetectionState.observerContext,
|
|
447
448
|
);
|
|
@@ -449,11 +450,15 @@ export class KeyedExecutionContextState extends ServiceExecutionContextState {
|
|
|
449
450
|
|
|
450
451
|
setRuntime(value: Runtime): void {
|
|
451
452
|
pureSingleExecution_setRuntime(
|
|
452
|
-
this.
|
|
453
|
+
this.keyedExecutionParameter,
|
|
453
454
|
value,
|
|
454
455
|
this.executionState.editorStore.changeDetectionState.observerContext,
|
|
455
456
|
);
|
|
456
457
|
}
|
|
458
|
+
|
|
459
|
+
get executionContext(): ServiceExecutionContext {
|
|
460
|
+
return this.keyedExecutionParameter;
|
|
461
|
+
}
|
|
457
462
|
}
|
|
458
463
|
|
|
459
464
|
export abstract class ServicePureExecutionState extends ServiceExecutionState {
|
|
@@ -522,7 +527,7 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
|
|
|
522
527
|
};
|
|
523
528
|
|
|
524
529
|
*generatePlan(debug: boolean): GeneratorFn<void> {
|
|
525
|
-
if (
|
|
530
|
+
if (this.isGeneratingPlan) {
|
|
526
531
|
return;
|
|
527
532
|
}
|
|
528
533
|
try {
|
|
@@ -533,8 +538,8 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
|
|
|
533
538
|
const debugResult =
|
|
534
539
|
(yield this.editorStore.graphManagerState.graphManager.debugExecutionPlanGeneration(
|
|
535
540
|
query,
|
|
536
|
-
this.selectedExecutionContextState
|
|
537
|
-
this.selectedExecutionContextState
|
|
541
|
+
this.selectedExecutionContextState?.executionContext.mapping.value,
|
|
542
|
+
this.selectedExecutionContextState?.executionContext.runtime,
|
|
538
543
|
this.editorStore.graphManagerState.graph,
|
|
539
544
|
)) as { plan: RawExecutionPlan; debug: string };
|
|
540
545
|
rawPlan = debugResult.plan;
|
|
@@ -543,8 +548,8 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
|
|
|
543
548
|
rawPlan =
|
|
544
549
|
(yield this.editorStore.graphManagerState.graphManager.generateExecutionPlan(
|
|
545
550
|
query,
|
|
546
|
-
this.selectedExecutionContextState
|
|
547
|
-
this.selectedExecutionContextState
|
|
551
|
+
this.selectedExecutionContextState?.executionContext.mapping.value,
|
|
552
|
+
this.selectedExecutionContextState?.executionContext.runtime,
|
|
548
553
|
this.editorStore.graphManagerState.graph,
|
|
549
554
|
)) as object;
|
|
550
555
|
}
|
|
@@ -571,8 +576,8 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
|
|
|
571
576
|
}
|
|
572
577
|
}
|
|
573
578
|
|
|
574
|
-
*
|
|
575
|
-
if (
|
|
579
|
+
*handleRunQuery(): GeneratorFn<void> {
|
|
580
|
+
if (this.isRunningQuery) {
|
|
576
581
|
return;
|
|
577
582
|
}
|
|
578
583
|
const query = this.queryState.query;
|
|
@@ -585,25 +590,24 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
|
|
|
585
590
|
}
|
|
586
591
|
|
|
587
592
|
*runQuery(): GeneratorFn<void> {
|
|
588
|
-
if (
|
|
593
|
+
if (this.isRunningQuery) {
|
|
589
594
|
return;
|
|
590
595
|
}
|
|
591
596
|
try {
|
|
592
597
|
this.isRunningQuery = true;
|
|
593
|
-
const promise =
|
|
594
|
-
this.
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
);
|
|
598
|
+
const promise = this.editorStore.graphManagerState.graphManager.runQuery(
|
|
599
|
+
this.getExecutionQuery(),
|
|
600
|
+
this.selectedExecutionContextState?.executionContext.mapping.value,
|
|
601
|
+
this.selectedExecutionContextState?.executionContext.runtime,
|
|
602
|
+
this.editorStore.graphManagerState.graph,
|
|
603
|
+
{
|
|
604
|
+
useLosslessParse: true,
|
|
605
|
+
parameterValues: buildExecutionParameterValues(
|
|
606
|
+
this.parameterState.parameterStates,
|
|
607
|
+
this.editorStore.graphManagerState,
|
|
608
|
+
),
|
|
609
|
+
},
|
|
610
|
+
);
|
|
607
611
|
this.setQueryRunPromise(promise);
|
|
608
612
|
const result = (yield promise) as ExecutionResult;
|
|
609
613
|
if (this.queryRunPromise === promise) {
|
|
@@ -734,7 +738,7 @@ export class InlineServicePureExecutionState extends ServicePureExecutionState {
|
|
|
734
738
|
updateExecutionQuery: action,
|
|
735
739
|
setOpeningQueryEditor: action,
|
|
736
740
|
generatePlan: flow,
|
|
737
|
-
|
|
741
|
+
handleRunQuery: flow,
|
|
738
742
|
runQuery: flow,
|
|
739
743
|
});
|
|
740
744
|
this.selectedExecutionContextState =
|
|
@@ -767,6 +771,7 @@ export class SingleServicePureExecutionState extends ServicePureExecutionState {
|
|
|
767
771
|
makeObservable(this, {
|
|
768
772
|
queryState: observable,
|
|
769
773
|
getInitiallySelectedExecutionContextState: observable,
|
|
774
|
+
selectedExecutionContextState: observable,
|
|
770
775
|
runtimeEditorState: observable,
|
|
771
776
|
isRunningQuery: observable,
|
|
772
777
|
isGeneratingPlan: observable,
|
|
@@ -789,7 +794,7 @@ export class SingleServicePureExecutionState extends ServicePureExecutionState {
|
|
|
789
794
|
setShowChangeExecModal: action,
|
|
790
795
|
setIsRunningQuery: action,
|
|
791
796
|
generatePlan: flow,
|
|
792
|
-
|
|
797
|
+
handleRunQuery: flow,
|
|
793
798
|
runQuery: flow,
|
|
794
799
|
});
|
|
795
800
|
this.selectedExecutionContextState =
|
|
@@ -801,7 +806,7 @@ export class SingleServicePureExecutionState extends ServicePureExecutionState {
|
|
|
801
806
|
}
|
|
802
807
|
|
|
803
808
|
getInitiallySelectedExecutionContextState(): ServiceExecutionContextState {
|
|
804
|
-
return new SingleExecutionContextState(this
|
|
809
|
+
return new SingleExecutionContextState(this);
|
|
805
810
|
}
|
|
806
811
|
|
|
807
812
|
setMultiExecutionKey(val: string): void {
|
|
@@ -877,7 +882,7 @@ export class MultiServicePureExecutionState extends ServicePureExecutionState {
|
|
|
877
882
|
setIsRunningQuery: action,
|
|
878
883
|
changeExecution: action,
|
|
879
884
|
generatePlan: flow,
|
|
880
|
-
|
|
885
|
+
handleRunQuery: flow,
|
|
881
886
|
runQuery: flow,
|
|
882
887
|
});
|
|
883
888
|
|
package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts
CHANGED
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
buildLambdaVariableExpressions,
|
|
25
25
|
VariableExpression,
|
|
26
26
|
PureMultiExecution,
|
|
27
|
+
PureExecution,
|
|
27
28
|
} from '@finos/legend-graph';
|
|
28
29
|
import { action, flow, makeObservable, observable } from 'mobx';
|
|
29
30
|
import { TestableTestEditorState } from '../../testable/TestableEditorState.js';
|
|
@@ -183,8 +184,11 @@ export class ServiceTestSetupState {
|
|
|
183
184
|
}
|
|
184
185
|
|
|
185
186
|
get serviceQuery(): RawLambda | undefined {
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
const execution = this.testState.testable.execution;
|
|
188
|
+
if (execution instanceof PureExecution) {
|
|
189
|
+
return execution.func;
|
|
190
|
+
}
|
|
191
|
+
return undefined;
|
|
188
192
|
}
|
|
189
193
|
|
|
190
194
|
get queryVariableExpressions(): VariableExpression[] {
|
|
@@ -474,7 +474,9 @@ export class ProjectViewerStore {
|
|
|
474
474
|
});
|
|
475
475
|
return false;
|
|
476
476
|
}
|
|
477
|
-
|
|
477
|
+
yield flowResult(
|
|
478
|
+
this.editorStore.setGraphEditMode(GRAPH_EDITOR_MODE.GRAMMAR_TEXT),
|
|
479
|
+
);
|
|
478
480
|
yield flowResult(
|
|
479
481
|
this.editorStore.graphState.globalCompileInTextMode({
|
|
480
482
|
ignoreBlocking: true,
|