@finos/legend-application-studio 21.0.0 → 22.0.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/DSL_ExternalFormat_LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/components/DSL_ExternalFormat_LegendStudioApplicationPlugin.js.map +1 -1
- package/lib/components/editor/edit-panel/GrammarTextEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/GrammarTextEditor.js +9 -200
- package/lib/components/editor/edit-panel/GrammarTextEditor.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 +5 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingEditor.js +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js +2 -2
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.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 +3 -3
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js +0 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.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 +7 -3
- 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 +3 -1
- 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 +19 -2
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/DSL_Data_LegendStudioApplicationPlugin_Extension.d.ts +2 -1
- package/lib/stores/DSL_Data_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -1
- package/lib/stores/EditorTabManagerState.d.ts +0 -2
- package/lib/stores/EditorTabManagerState.d.ts.map +1 -1
- package/lib/stores/EditorTabManagerState.js +1 -32
- package/lib/stores/EditorTabManagerState.js.map +1 -1
- package/lib/stores/LegendStudioApplicationPlugin.d.ts +1 -48
- package/lib/stores/LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/stores/LegendStudioApplicationPlugin.js.map +1 -1
- package/lib/stores/STO_Relational_LegendStudioApplicationPlugin_Extension.d.ts +2 -1
- package/lib/stores/STO_Relational_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -1
- package/lib/stores/editor-state/EditorState.d.ts +0 -5
- package/lib/stores/editor-state/EditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/EditorState.js.map +1 -1
- 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/ModelImporterState.d.ts.map +1 -1
- package/lib/stores/editor-state/ModelImporterState.js.map +1 -1
- package/lib/stores/editor-state/ProjectConfigurationEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/ProjectConfigurationEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts +1 -0
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.js +3 -0
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
- 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 +7 -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 +7 -1
- 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 +55 -15
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +3 -2
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts +2 -0
- 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 +8 -4
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js.map +1 -1
- package/lib/stores/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.js.map +1 -1
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffViewState.d.ts.map +1 -1
- package/lib/stores/editor-state/entity-diff-editor-state/EntityDiffViewState.js.map +1 -1
- package/lib/stores/shared/FileGenerationTreeUtils.d.ts +1 -2
- package/lib/stores/shared/FileGenerationTreeUtils.d.ts.map +1 -1
- package/lib/stores/shared/FileGenerationTreeUtils.js +1 -1
- package/lib/stores/shared/FileGenerationTreeUtils.js.map +1 -1
- package/lib/stores/shared/modifier/DSL_Service_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/shared/modifier/DSL_Service_GraphModifierHelper.js +3 -1
- package/lib/stores/shared/modifier/DSL_Service_GraphModifierHelper.js.map +1 -1
- package/package.json +10 -10
- package/src/components/DSL_ExternalFormat_LegendStudioApplicationPlugin.tsx +4 -2
- package/src/components/editor/edit-panel/GrammarTextEditor.tsx +28 -219
- package/src/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.tsx +5 -1
- package/src/components/editor/edit-panel/mapping-editor/MappingEditor.tsx +2 -5
- package/src/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.tsx +2 -2
- package/src/components/editor/edit-panel/service-editor/ServiceEditor.tsx +4 -3
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionEditor.tsx +0 -5
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.tsx +10 -5
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.tsx +63 -2
- package/src/stores/DSL_Data_LegendStudioApplicationPlugin_Extension.ts +2 -4
- package/src/stores/EditorTabManagerState.ts +1 -40
- package/src/stores/LegendStudioApplicationPlugin.ts +1 -49
- package/src/stores/STO_Relational_LegendStudioApplicationPlugin_Extension.ts +2 -4
- package/src/stores/editor-state/EditorState.ts +0 -6
- package/src/stores/editor-state/FileGenerationViewerState.ts +1 -1
- package/src/stores/editor-state/ModelImporterState.ts +1 -1
- package/src/stores/editor-state/ProjectConfigurationEditorState.ts +1 -1
- package/src/stores/editor-state/element-editor-state/ElementEditorState.ts +5 -1
- package/src/stores/editor-state/element-editor-state/service/ServiceEditorState.ts +12 -1
- package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +93 -36
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +5 -2
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts +8 -4
- package/src/stores/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.ts +1 -1
- package/src/stores/editor-state/entity-diff-editor-state/EntityDiffViewState.ts +1 -1
- package/src/stores/shared/FileGenerationTreeUtils.ts +4 -2
- package/src/stores/shared/modifier/DSL_Service_GraphModifierHelper.ts +3 -1
|
@@ -24,6 +24,7 @@ import type {
|
|
|
24
24
|
import type { Class, PackageableElement, Testable } from '@finos/legend-graph';
|
|
25
25
|
import {
|
|
26
26
|
type DocumentationEntry,
|
|
27
|
+
type PureGrammarTextSuggestion,
|
|
27
28
|
LegendApplicationPlugin,
|
|
28
29
|
} from '@finos/legend-application';
|
|
29
30
|
import type { TestableMetadata } from './sidebar-state/testable/GlobalTestRunnerState.js';
|
|
@@ -180,55 +181,6 @@ export type PureGrammarParserElementDocumentationGetter = (
|
|
|
180
181
|
elementKeyword: string,
|
|
181
182
|
) => DocumentationEntry | undefined;
|
|
182
183
|
|
|
183
|
-
/**
|
|
184
|
-
* This snippet suggestion is meant for an embedded content of an element
|
|
185
|
-
* In other words, it is used to construct element snippet suggestions
|
|
186
|
-
*
|
|
187
|
-
* Because of that, it is expected that there are text content wrapping around
|
|
188
|
-
* this snippet, so the first suggestion might not start from index 1.
|
|
189
|
-
*/
|
|
190
|
-
export interface ElementEmbeddedContentSnippetSuggestion {
|
|
191
|
-
/**
|
|
192
|
-
* Brief description about the suggestion item to enable the users to quickly
|
|
193
|
-
* differentiate between one suggestions from another
|
|
194
|
-
*/
|
|
195
|
-
description?: string | undefined;
|
|
196
|
-
/**
|
|
197
|
-
* The snippet text to be embedded in the full snippet suggestion text for the element
|
|
198
|
-
*
|
|
199
|
-
* NOTE: The snippet syntax follows that of `monaco-editor`
|
|
200
|
-
* See https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets
|
|
201
|
-
*/
|
|
202
|
-
text: string;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* This mirrors `monaco-editor` completion item structure
|
|
207
|
-
* See https://microsoft.github.io/monaco-editor/api/interfaces/monaco.languages.CompletionItem.html
|
|
208
|
-
*/
|
|
209
|
-
export interface PureGrammarTextSuggestion {
|
|
210
|
-
/**
|
|
211
|
-
* The text label of the suggestion.
|
|
212
|
-
*/
|
|
213
|
-
text: string;
|
|
214
|
-
/**
|
|
215
|
-
* Brief description about the suggestion item to enable the users to quickly
|
|
216
|
-
* differentiate between one suggestions from another
|
|
217
|
-
*/
|
|
218
|
-
description?: string | undefined;
|
|
219
|
-
/**
|
|
220
|
-
* Detailed documentation that explains/elaborates the suggestion item.
|
|
221
|
-
*/
|
|
222
|
-
documentation?: DocumentationEntry | undefined;
|
|
223
|
-
/**
|
|
224
|
-
* A string or snippet that should be inserted when selecting this suggestion.
|
|
225
|
-
*
|
|
226
|
-
* NOTE: The snippet syntax follows that of `monaco-editor`
|
|
227
|
-
* See https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets
|
|
228
|
-
*/
|
|
229
|
-
insertText: string;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
184
|
export type PureGrammarParserKeywordSuggestionGetter = (
|
|
233
185
|
editorStore: EditorStore,
|
|
234
186
|
) => PureGrammarTextSuggestion[];
|
|
@@ -14,10 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type {
|
|
18
|
-
DSL_LegendStudioApplicationPlugin_Extension,
|
|
19
|
-
ElementEmbeddedContentSnippetSuggestion,
|
|
20
|
-
} from './LegendStudioApplicationPlugin.js';
|
|
17
|
+
import type { DSL_LegendStudioApplicationPlugin_Extension } from './LegendStudioApplicationPlugin.js';
|
|
21
18
|
import type {
|
|
22
19
|
DatasourceSpecification,
|
|
23
20
|
AuthenticationStrategy,
|
|
@@ -26,6 +23,7 @@ import type {
|
|
|
26
23
|
} from '@finos/legend-graph';
|
|
27
24
|
import type { RelationalDatabaseConnectionValueState } from './editor-state/element-editor-state/connection/ConnectionEditorState.js';
|
|
28
25
|
import type { PostProcessorEditorState } from './editor-state/element-editor-state/connection/PostProcessorEditorState.js';
|
|
26
|
+
import type { ElementEmbeddedContentSnippetSuggestion } from '@finos/legend-application';
|
|
29
27
|
|
|
30
28
|
/**
|
|
31
29
|
* NOTE: The tab-stop index of the snippet must start from 6
|
|
@@ -24,10 +24,4 @@ export abstract class EditorState extends TabState {
|
|
|
24
24
|
super();
|
|
25
25
|
this.editorStore = editorStore;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Check if the specified tab this tab or not.
|
|
30
|
-
* This is often used when checking if a tab is already opened.
|
|
31
|
-
*/
|
|
32
|
-
abstract match(tab: EditorState): boolean;
|
|
33
27
|
}
|
|
@@ -68,7 +68,7 @@ export class FileGenerationViewerState extends EditorState {
|
|
|
68
68
|
return this.file.name;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
match(tab: EditorState): boolean {
|
|
71
|
+
override match(tab: EditorState): boolean {
|
|
72
72
|
return tab instanceof FileGenerationViewerState && tab.file === this.file;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -186,7 +186,7 @@ export class ProjectConfigurationEditorState extends EditorState {
|
|
|
186
186
|
return 'config';
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
match(tab: EditorState): boolean {
|
|
189
|
+
override match(tab: EditorState): boolean {
|
|
190
190
|
return tab instanceof ProjectConfigurationEditorState;
|
|
191
191
|
}
|
|
192
192
|
|
|
@@ -74,7 +74,7 @@ export abstract class ElementEditorState extends EditorState {
|
|
|
74
74
|
return this.element.path;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
match(tab: EditorState): boolean {
|
|
77
|
+
override match(tab: EditorState): boolean {
|
|
78
78
|
return tab instanceof ElementEditorState && tab.element === this.element;
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -158,6 +158,10 @@ export abstract class ElementEditorState extends EditorState {
|
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
+
override onOpen(): void {
|
|
162
|
+
this.editorStore.explorerTreeState.openNode(this.element);
|
|
163
|
+
}
|
|
164
|
+
|
|
161
165
|
/**
|
|
162
166
|
* Clone the element editor state to be replaced as processing graph
|
|
163
167
|
*
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
UnsupportedServiceExecutionState,
|
|
23
23
|
SingleServicePureExecutionState,
|
|
24
24
|
MultiServicePureExecutionState,
|
|
25
|
+
InlineServicePureExecutionState,
|
|
25
26
|
} from './ServiceExecutionState.js';
|
|
26
27
|
import { ServiceRegistrationState } from '../../../editor-state/element-editor-state/service/ServiceRegistrationState.js';
|
|
27
28
|
import { ElementEditorState } from '../../../editor-state/element-editor-state/ElementEditorState.js';
|
|
@@ -80,12 +81,22 @@ export class ServiceEditorState extends ElementEditorState {
|
|
|
80
81
|
|
|
81
82
|
buildExecutionState(): ServiceExecutionState {
|
|
82
83
|
const execution = this.service.execution;
|
|
83
|
-
if (
|
|
84
|
+
if (
|
|
85
|
+
execution instanceof PureSingleExecution &&
|
|
86
|
+
execution.mapping &&
|
|
87
|
+
execution.runtime
|
|
88
|
+
) {
|
|
84
89
|
return new SingleServicePureExecutionState(
|
|
85
90
|
this.editorStore,
|
|
86
91
|
this,
|
|
87
92
|
execution,
|
|
88
93
|
);
|
|
94
|
+
} else if (execution instanceof PureSingleExecution) {
|
|
95
|
+
return new InlineServicePureExecutionState(
|
|
96
|
+
this.editorStore,
|
|
97
|
+
this,
|
|
98
|
+
execution,
|
|
99
|
+
);
|
|
89
100
|
} else if (execution instanceof PureMultiExecution) {
|
|
90
101
|
return new MultiServicePureExecutionState(
|
|
91
102
|
this.editorStore,
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
stringifyLosslessJSON,
|
|
24
24
|
UnsupportedOperationError,
|
|
25
25
|
filterByType,
|
|
26
|
+
guaranteeNonNullable,
|
|
26
27
|
} from '@finos/legend-shared';
|
|
27
28
|
import type { ServiceEditorState } from './ServiceEditorState.js';
|
|
28
29
|
import {
|
|
@@ -394,13 +395,21 @@ export abstract class ServiceExecutionContextState {
|
|
|
394
395
|
}
|
|
395
396
|
|
|
396
397
|
export class SingleExecutionContextState extends ServiceExecutionContextState {
|
|
397
|
-
declare
|
|
398
|
+
declare executionContext1: PureSingleExecution;
|
|
398
399
|
|
|
399
400
|
constructor(
|
|
400
401
|
executionContext: PureSingleExecution,
|
|
401
402
|
executionState: ServiceExecutionState,
|
|
402
403
|
) {
|
|
403
|
-
super(
|
|
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;
|
|
404
413
|
makeObservable(this, {
|
|
405
414
|
executionContext: observable,
|
|
406
415
|
setMapping: action,
|
|
@@ -409,15 +418,18 @@ export class SingleExecutionContextState extends ServiceExecutionContextState {
|
|
|
409
418
|
}
|
|
410
419
|
|
|
411
420
|
setMapping(value: Mapping): void {
|
|
421
|
+
this.executionContext.mapping =
|
|
422
|
+
PackageableElementExplicitReference.create(value);
|
|
412
423
|
pureSingleExecution_setMapping(
|
|
413
|
-
this.
|
|
424
|
+
this.executionContext1,
|
|
414
425
|
value,
|
|
415
426
|
this.executionState.editorStore.changeDetectionState.observerContext,
|
|
416
427
|
);
|
|
417
428
|
}
|
|
418
429
|
setRuntime(value: Runtime): void {
|
|
430
|
+
this.executionContext.runtime = value;
|
|
419
431
|
pureSingleExecution_setRuntime(
|
|
420
|
-
this.
|
|
432
|
+
this.executionContext1,
|
|
421
433
|
value,
|
|
422
434
|
this.executionState.editorStore.changeDetectionState.observerContext,
|
|
423
435
|
);
|
|
@@ -656,21 +668,22 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
|
|
|
656
668
|
}
|
|
657
669
|
|
|
658
670
|
useCustomRuntime(): void {
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
this.
|
|
673
|
-
|
|
671
|
+
const customRuntime = new EngineRuntime();
|
|
672
|
+
guaranteeNonNullable(this.selectedExecutionContextState);
|
|
673
|
+
const executionState = this
|
|
674
|
+
.selectedExecutionContextState as ServiceExecutionContextState;
|
|
675
|
+
runtime_addMapping(
|
|
676
|
+
customRuntime,
|
|
677
|
+
PackageableElementExplicitReference.create(
|
|
678
|
+
executionState.executionContext.mapping.value,
|
|
679
|
+
),
|
|
680
|
+
);
|
|
681
|
+
decorateRuntimeWithNewMapping(
|
|
682
|
+
executionState.executionContext.runtime,
|
|
683
|
+
executionState.executionContext.mapping.value,
|
|
684
|
+
this.editorStore,
|
|
685
|
+
);
|
|
686
|
+
executionState.setRuntime(customRuntime);
|
|
674
687
|
}
|
|
675
688
|
|
|
676
689
|
autoSelectRuntimeOnMappingChange(mapping: Mapping): void {
|
|
@@ -697,6 +710,48 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
|
|
|
697
710
|
}
|
|
698
711
|
}
|
|
699
712
|
|
|
713
|
+
export class InlineServicePureExecutionState extends ServicePureExecutionState {
|
|
714
|
+
declare execution: PureSingleExecution;
|
|
715
|
+
|
|
716
|
+
constructor(
|
|
717
|
+
editorStore: EditorStore,
|
|
718
|
+
serviceEditorState: ServiceEditorState,
|
|
719
|
+
execution: PureSingleExecution,
|
|
720
|
+
) {
|
|
721
|
+
super(editorStore, serviceEditorState, execution);
|
|
722
|
+
|
|
723
|
+
makeObservable(this, {
|
|
724
|
+
queryState: observable,
|
|
725
|
+
isRunningQuery: observable,
|
|
726
|
+
isGeneratingPlan: observable,
|
|
727
|
+
isOpeningQueryEditor: observable,
|
|
728
|
+
executionResultText: observable,
|
|
729
|
+
executionPlanState: observable,
|
|
730
|
+
showChangeExecModal: observable,
|
|
731
|
+
parameterState: observable,
|
|
732
|
+
setExecutionResultText: action,
|
|
733
|
+
setQueryState: action,
|
|
734
|
+
updateExecutionQuery: action,
|
|
735
|
+
setOpeningQueryEditor: action,
|
|
736
|
+
generatePlan: flow,
|
|
737
|
+
handleExecute: flow,
|
|
738
|
+
runQuery: flow,
|
|
739
|
+
});
|
|
740
|
+
this.selectedExecutionContextState =
|
|
741
|
+
this.getInitiallySelectedExecutionContextState();
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
changeExecution(): void {
|
|
745
|
+
throw new Error('Method not implemented.');
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
getInitiallySelectedExecutionContextState():
|
|
749
|
+
| ServiceExecutionContextState
|
|
750
|
+
| undefined {
|
|
751
|
+
return undefined;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
|
|
700
755
|
export class SingleServicePureExecutionState extends ServicePureExecutionState {
|
|
701
756
|
declare execution: PureSingleExecution;
|
|
702
757
|
declare selectedExecutionContextState: ServiceExecutionContextState;
|
|
@@ -754,23 +809,25 @@ export class SingleServicePureExecutionState extends ServicePureExecutionState {
|
|
|
754
809
|
}
|
|
755
810
|
|
|
756
811
|
changeExecution(): void {
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
812
|
+
if (this.execution.mapping && this.execution.runtime) {
|
|
813
|
+
const _execution = new PureMultiExecution(
|
|
814
|
+
this.multiExecutionKey,
|
|
815
|
+
this.execution.func,
|
|
816
|
+
this.serviceEditorState.service,
|
|
817
|
+
);
|
|
818
|
+
const _parameter = new KeyedExecutionParameter(
|
|
819
|
+
`execContext_1`,
|
|
820
|
+
this.execution.mapping,
|
|
821
|
+
this.execution.runtime,
|
|
822
|
+
);
|
|
823
|
+
_execution.executionParameters = [_parameter];
|
|
824
|
+
service_setExecution(
|
|
825
|
+
this.serviceEditorState.service,
|
|
826
|
+
_execution,
|
|
827
|
+
this.editorStore.changeDetectionState.observerContext,
|
|
828
|
+
);
|
|
829
|
+
this.serviceEditorState.resetExecutionState();
|
|
830
|
+
}
|
|
774
831
|
}
|
|
775
832
|
}
|
|
776
833
|
|
package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts
CHANGED
|
@@ -196,7 +196,7 @@ export class ConnectionTestDataState {
|
|
|
196
196
|
.service;
|
|
197
197
|
const execution = service.execution;
|
|
198
198
|
let runtimes: Runtime[] = [];
|
|
199
|
-
if (execution instanceof PureSingleExecution) {
|
|
199
|
+
if (execution instanceof PureSingleExecution && execution.runtime) {
|
|
200
200
|
runtimes = [execution.runtime];
|
|
201
201
|
} else if (execution instanceof PureMultiExecution) {
|
|
202
202
|
runtimes = execution.executionParameters.map((t) => t.runtime);
|
|
@@ -366,7 +366,10 @@ export class ServiceTestDataState {
|
|
|
366
366
|
this.testSuiteState.testableState.serviceEditorState.service;
|
|
367
367
|
const execution = service.execution;
|
|
368
368
|
let runtimes: Runtime[] = [];
|
|
369
|
-
if (
|
|
369
|
+
if (
|
|
370
|
+
execution instanceof PureSingleExecution &&
|
|
371
|
+
execution.runtime !== undefined
|
|
372
|
+
) {
|
|
370
373
|
runtimes = [execution.runtime];
|
|
371
374
|
} else if (execution instanceof PureMultiExecution) {
|
|
372
375
|
runtimes = execution.executionParameters.map((t) => t.runtime);
|
package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts
CHANGED
|
@@ -52,19 +52,20 @@ import { generateVariableExpressionMockValue } from '@finos/legend-query-builder
|
|
|
52
52
|
|
|
53
53
|
export enum SERIALIZATION_FORMAT {
|
|
54
54
|
PURE = 'PURE',
|
|
55
|
-
|
|
56
|
-
// See https://github.com/finos/legend-engine/pull/799
|
|
57
|
-
// DEFAULT = 'DEFAULT',
|
|
55
|
+
DEFAULT = 'DEFAULT',
|
|
58
56
|
PURE_TDSOBJECT = 'PURE_TDSOBJECT',
|
|
59
57
|
}
|
|
60
58
|
|
|
61
59
|
export enum SERIALIZATION_FORMAT_LABEL {
|
|
60
|
+
DEFAULT = 'DEFAULT',
|
|
62
61
|
PURE = 'PURE',
|
|
63
62
|
TDS = 'TDS',
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
const getSerializationFormatLabel = (val: string): string => {
|
|
67
66
|
switch (val) {
|
|
67
|
+
case SERIALIZATION_FORMAT.DEFAULT:
|
|
68
|
+
return SERIALIZATION_FORMAT.DEFAULT;
|
|
68
69
|
case SERIALIZATION_FORMAT.PURE:
|
|
69
70
|
return SERIALIZATION_FORMAT.PURE;
|
|
70
71
|
case SERIALIZATION_FORMAT.PURE_TDSOBJECT:
|
|
@@ -365,7 +366,10 @@ export class ServiceTestSetupState {
|
|
|
365
366
|
label: getSerializationFormatLabel(test.serializationFormat),
|
|
366
367
|
};
|
|
367
368
|
}
|
|
368
|
-
return
|
|
369
|
+
return {
|
|
370
|
+
value: SERIALIZATION_FORMAT.DEFAULT,
|
|
371
|
+
label: SERIALIZATION_FORMAT.DEFAULT,
|
|
372
|
+
};
|
|
369
373
|
}
|
|
370
374
|
|
|
371
375
|
changeSerializationFormat(val: string | undefined): void {
|
|
@@ -328,7 +328,7 @@ export class EntityChangeConflictEditorState extends EntityDiffViewerState {
|
|
|
328
328
|
);
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
match(tab: EditorState): boolean {
|
|
331
|
+
override match(tab: EditorState): boolean {
|
|
332
332
|
return (
|
|
333
333
|
tab instanceof EntityChangeConflictEditorState &&
|
|
334
334
|
tab.entityPath === this.entityPath
|
|
@@ -177,7 +177,7 @@ export class EntityDiffViewState extends EntityDiffViewerState {
|
|
|
177
177
|
this.fromGrammarText = text;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
match(tab: EditorState): boolean {
|
|
180
|
+
override match(tab: EditorState): boolean {
|
|
181
181
|
return (
|
|
182
182
|
tab instanceof EntityDiffViewState &&
|
|
183
183
|
tab.fromEntityPath === this.fromEntityPath &&
|
|
@@ -20,13 +20,15 @@ import {
|
|
|
20
20
|
returnUndefOnError,
|
|
21
21
|
addUniqueEntry,
|
|
22
22
|
} from '@finos/legend-shared';
|
|
23
|
-
import
|
|
23
|
+
import {
|
|
24
|
+
DIRECTORY_PATH_DELIMITER,
|
|
25
|
+
type GenerationOutput,
|
|
26
|
+
} from '@finos/legend-graph';
|
|
24
27
|
|
|
25
28
|
export interface GenerationOutputResult {
|
|
26
29
|
generationOutput: GenerationOutput;
|
|
27
30
|
parentId?: string | undefined;
|
|
28
31
|
}
|
|
29
|
-
export const DIRECTORY_PATH_DELIMITER = '/';
|
|
30
32
|
export const GENERATION_FILE_ROOT_NAME = 'GENERATION_FILE_ROOT';
|
|
31
33
|
|
|
32
34
|
// Generation Directory Model
|
|
@@ -208,7 +208,9 @@ export const pureSingleExecution_setMapping = action(
|
|
|
208
208
|
value: Mapping,
|
|
209
209
|
observerContext: ObserverContext,
|
|
210
210
|
): void => {
|
|
211
|
-
pe.mapping
|
|
211
|
+
if (pe.mapping) {
|
|
212
|
+
pe.mapping.value = observe_Mapping(value, observerContext);
|
|
213
|
+
}
|
|
212
214
|
},
|
|
213
215
|
);
|
|
214
216
|
export const pureSingleExecution_setRuntime = action(
|