@finos/legend-application-studio 22.2.1 → 22.3.1

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.
Files changed (212) hide show
  1. package/lib/components/editor/StatusBar.js +1 -1
  2. package/lib/components/editor/StatusBar.js.map +1 -1
  3. package/lib/components/editor/command-center/ProjectSearchCommand.d.ts.map +1 -1
  4. package/lib/components/editor/command-center/ProjectSearchCommand.js +1 -0
  5. package/lib/components/editor/command-center/ProjectSearchCommand.js.map +1 -1
  6. package/lib/components/editor/edit-panel/EditPanel.d.ts.map +1 -1
  7. package/lib/components/editor/edit-panel/EditPanel.js +24 -11
  8. package/lib/components/editor/edit-panel/EditPanel.js.map +1 -1
  9. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts.map +1 -1
  10. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js +2 -1
  11. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js.map +1 -1
  12. package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts.map +1 -1
  13. package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js +1 -0
  14. package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js.map +1 -1
  15. package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts.map +1 -1
  16. package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.js +4 -3
  17. package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.js.map +1 -1
  18. package/lib/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.d.ts +32 -0
  19. package/lib/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.d.ts.map +1 -0
  20. package/lib/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.js +66 -0
  21. package/lib/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.js.map +1 -0
  22. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.d.ts +0 -23
  23. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.d.ts.map +1 -1
  24. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js +6 -58
  25. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js.map +1 -1
  26. package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.d.ts +41 -0
  27. package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.d.ts.map +1 -0
  28. package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.js +77 -0
  29. package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.js.map +1 -0
  30. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.d.ts +7 -0
  31. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.d.ts.map +1 -1
  32. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.js +19 -14
  33. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.js.map +1 -1
  34. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -1
  35. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js +3 -1
  36. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -1
  37. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.js +3 -1
  38. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.js.map +1 -1
  39. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.d.ts.map +1 -1
  40. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.js +3 -0
  41. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.js.map +1 -1
  42. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts.map +1 -1
  43. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js +3 -1
  44. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js.map +1 -1
  45. package/lib/components/editor/edit-panel/service-editor/ServiceEditor.d.ts.map +1 -1
  46. package/lib/components/editor/edit-panel/service-editor/ServiceEditor.js +51 -13
  47. package/lib/components/editor/edit-panel/service-editor/ServiceEditor.js.map +1 -1
  48. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts.map +1 -1
  49. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js +18 -10
  50. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
  51. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts +1 -3
  52. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts.map +1 -1
  53. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js +2 -20
  54. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js.map +1 -1
  55. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts.map +1 -1
  56. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js +9 -3
  57. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js.map +1 -1
  58. package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
  59. package/lib/components/editor/side-bar/CreateNewElementModal.js +1 -0
  60. package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
  61. package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
  62. package/lib/components/editor/side-bar/Explorer.js +29 -8
  63. package/lib/components/editor/side-bar/Explorer.js.map +1 -1
  64. package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts.map +1 -1
  65. package/lib/components/editor/side-bar/testable/GlobalTestRunner.js +17 -3
  66. package/lib/components/editor/side-bar/testable/GlobalTestRunner.js.map +1 -1
  67. package/lib/index.css +2 -2
  68. package/lib/index.css.map +1 -1
  69. package/lib/index.d.ts +2 -2
  70. package/lib/index.d.ts.map +1 -1
  71. package/lib/index.js +2 -2
  72. package/lib/index.js.map +1 -1
  73. package/lib/package.json +3 -3
  74. package/lib/stores/DSL_Generation_LegendStudioApplicationPlugin_Extension.d.ts +2 -2
  75. package/lib/stores/DSL_Generation_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -1
  76. package/lib/stores/DependencyProjectViewerHelper.d.ts +19 -0
  77. package/lib/stores/DependencyProjectViewerHelper.d.ts.map +1 -0
  78. package/lib/stores/DependencyProjectViewerHelper.js +23 -0
  79. package/lib/stores/DependencyProjectViewerHelper.js.map +1 -0
  80. package/lib/stores/EditorGraphState.d.ts +9 -2
  81. package/lib/stores/EditorGraphState.d.ts.map +1 -1
  82. package/lib/stores/EditorGraphState.js +35 -95
  83. package/lib/stores/EditorGraphState.js.map +1 -1
  84. package/lib/stores/EditorStore.d.ts.map +1 -1
  85. package/lib/stores/EditorStore.js +7 -1
  86. package/lib/stores/EditorStore.js.map +1 -1
  87. package/lib/stores/EditorTabManagerState.d.ts +1 -1
  88. package/lib/stores/EditorTabManagerState.d.ts.map +1 -1
  89. package/lib/stores/EditorTabManagerState.js +11 -13
  90. package/lib/stores/EditorTabManagerState.js.map +1 -1
  91. package/lib/stores/ExplorerTreeState.d.ts +4 -4
  92. package/lib/stores/ExplorerTreeState.d.ts.map +1 -1
  93. package/lib/stores/ExplorerTreeState.js +12 -13
  94. package/lib/stores/ExplorerTreeState.js.map +1 -1
  95. package/lib/stores/editor/NewElementState.d.ts.map +1 -1
  96. package/lib/stores/editor/NewElementState.js +0 -3
  97. package/lib/stores/editor/NewElementState.js.map +1 -1
  98. package/lib/stores/editor-state/ExternalFormatState.d.ts +2 -0
  99. package/lib/stores/editor-state/ExternalFormatState.d.ts.map +1 -1
  100. package/lib/stores/editor-state/ExternalFormatState.js +6 -0
  101. package/lib/stores/editor-state/ExternalFormatState.js.map +1 -1
  102. package/lib/stores/editor-state/FileGenerationState.d.ts +18 -18
  103. package/lib/stores/editor-state/FileGenerationState.d.ts.map +1 -1
  104. package/lib/stores/editor-state/FileGenerationState.js +86 -133
  105. package/lib/stores/editor-state/FileGenerationState.js.map +1 -1
  106. package/lib/stores/editor-state/FileGenerationViewerState.d.ts +3 -3
  107. package/lib/stores/editor-state/FileGenerationViewerState.d.ts.map +1 -1
  108. package/lib/stores/editor-state/FileGenerationViewerState.js.map +1 -1
  109. package/lib/stores/editor-state/FileSystemState.d.ts +30 -0
  110. package/lib/stores/editor-state/FileSystemState.d.ts.map +1 -0
  111. package/lib/stores/editor-state/FileSystemState.js +82 -0
  112. package/lib/stores/editor-state/FileSystemState.js.map +1 -0
  113. package/lib/stores/editor-state/GraphGenerationState.d.ts +9 -9
  114. package/lib/stores/editor-state/GraphGenerationState.d.ts.map +1 -1
  115. package/lib/stores/editor-state/GraphGenerationState.js +14 -15
  116. package/lib/stores/editor-state/GraphGenerationState.js.map +1 -1
  117. package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts +25 -2
  118. package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
  119. package/lib/stores/editor-state/element-editor-state/ElementEditorState.js +50 -7
  120. package/lib/stores/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
  121. package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.d.ts +44 -0
  122. package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.d.ts.map +1 -0
  123. package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.js +172 -0
  124. package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.js.map +1 -0
  125. package/lib/stores/editor-state/element-editor-state/RuntimeEditorState.d.ts.map +1 -1
  126. package/lib/stores/editor-state/element-editor-state/RuntimeEditorState.js +7 -3
  127. package/lib/stores/editor-state/element-editor-state/RuntimeEditorState.js.map +1 -1
  128. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js +1 -1
  129. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
  130. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js +2 -2
  131. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js.map +1 -1
  132. package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.d.ts +3 -0
  133. package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.d.ts.map +1 -1
  134. package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.js +14 -2
  135. package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.js.map +1 -1
  136. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts +9 -6
  137. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
  138. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +39 -29
  139. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
  140. package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +2 -2
  141. package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -1
  142. package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts.map +1 -1
  143. package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js +6 -3
  144. package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js.map +1 -1
  145. package/lib/stores/shared/FileSystemTreeUtils.d.ts +56 -0
  146. package/lib/stores/shared/FileSystemTreeUtils.d.ts.map +1 -0
  147. package/lib/stores/shared/{FileGenerationTreeUtils.js → FileSystemTreeUtils.js} +31 -32
  148. package/lib/stores/shared/FileSystemTreeUtils.js.map +1 -0
  149. package/lib/stores/shared/PackageTreeUtils.d.ts +6 -4
  150. package/lib/stores/shared/PackageTreeUtils.d.ts.map +1 -1
  151. package/lib/stores/shared/PackageTreeUtils.js +90 -11
  152. package/lib/stores/shared/PackageTreeUtils.js.map +1 -1
  153. package/lib/stores/shared/testable/TestableUtils.d.ts +1 -1
  154. package/lib/stores/shared/testable/TestableUtils.d.ts.map +1 -1
  155. package/lib/stores/shared/testable/TestableUtils.js +6 -4
  156. package/lib/stores/shared/testable/TestableUtils.js.map +1 -1
  157. package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.d.ts +3 -3
  158. package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.d.ts.map +1 -1
  159. package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.js +37 -1
  160. package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.js.map +1 -1
  161. package/package.json +12 -12
  162. package/src/components/editor/StatusBar.tsx +1 -1
  163. package/src/components/editor/command-center/ProjectSearchCommand.tsx +1 -0
  164. package/src/components/editor/edit-panel/EditPanel.tsx +79 -25
  165. package/src/components/editor/edit-panel/GenerationSpecificationEditor.tsx +2 -1
  166. package/src/components/editor/edit-panel/connection-editor/ConnectionEditor.tsx +1 -0
  167. package/src/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.tsx +5 -7
  168. package/src/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.tsx +194 -0
  169. package/src/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.tsx +6 -270
  170. package/src/components/editor/edit-panel/element-generation-editor/FileSystemViewer.tsx +296 -0
  171. package/src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.tsx +177 -155
  172. package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +3 -1
  173. package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.tsx +3 -3
  174. package/src/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.tsx +3 -0
  175. package/src/components/editor/edit-panel/mapping-editor/NewMappingElementModal.tsx +3 -1
  176. package/src/components/editor/edit-panel/service-editor/ServiceEditor.tsx +243 -184
  177. package/src/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.tsx +42 -15
  178. package/src/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.tsx +2 -65
  179. package/src/components/editor/edit-panel/uml-editor/ClassEditor.tsx +9 -3
  180. package/src/components/editor/side-bar/CreateNewElementModal.tsx +1 -0
  181. package/src/components/editor/side-bar/Explorer.tsx +82 -13
  182. package/src/components/editor/side-bar/testable/GlobalTestRunner.tsx +31 -9
  183. package/src/index.ts +5 -2
  184. package/src/stores/DSL_Generation_LegendStudioApplicationPlugin_Extension.ts +2 -2
  185. package/src/stores/DependencyProjectViewerHelper.ts +39 -0
  186. package/src/stores/EditorGraphState.ts +56 -153
  187. package/src/stores/EditorStore.ts +15 -5
  188. package/src/stores/EditorTabManagerState.ts +17 -20
  189. package/src/stores/ExplorerTreeState.ts +26 -18
  190. package/src/stores/editor/NewElementState.ts +0 -2
  191. package/src/stores/editor-state/ExternalFormatState.ts +9 -0
  192. package/src/stores/editor-state/FileGenerationState.ts +129 -180
  193. package/src/stores/editor-state/FileGenerationViewerState.ts +3 -3
  194. package/src/stores/editor-state/FileSystemState.ts +111 -0
  195. package/src/stores/editor-state/GraphGenerationState.ts +35 -31
  196. package/src/stores/editor-state/element-editor-state/ElementEditorState.ts +91 -6
  197. package/src/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.ts +266 -0
  198. package/src/stores/editor-state/element-editor-state/RuntimeEditorState.ts +10 -8
  199. package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +1 -1
  200. package/src/stores/editor-state/element-editor-state/mapping/MappingTestState.ts +2 -2
  201. package/src/stores/editor-state/element-editor-state/service/ServiceEditorState.ts +23 -2
  202. package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +61 -56
  203. package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +2 -2
  204. package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts +6 -2
  205. package/src/stores/shared/{FileGenerationTreeUtils.ts → FileSystemTreeUtils.ts} +77 -76
  206. package/src/stores/shared/PackageTreeUtils.ts +144 -10
  207. package/src/stores/shared/testable/TestableUtils.ts +8 -4
  208. package/src/stores/sidebar-state/testable/GlobalTestRunnerState.ts +42 -3
  209. package/tsconfig.json +6 -1
  210. package/lib/stores/shared/FileGenerationTreeUtils.d.ts +0 -56
  211. package/lib/stores/shared/FileGenerationTreeUtils.d.ts.map +0 -1
  212. package/lib/stores/shared/FileGenerationTreeUtils.js.map +0 -1
@@ -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 executionContext1: PureSingleExecution;
394
+ declare executionState: SingleServicePureExecutionState;
399
395
 
400
- constructor(
401
- executionContext: PureSingleExecution,
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.executionContext1,
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.executionContext1,
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
- declare executionContext: KeyedExecutionParameter;
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.executionContext,
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.executionContext,
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 (!this.selectedExecutionContextState || this.isGeneratingPlan) {
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.executionContext.mapping.value,
537
- this.selectedExecutionContextState.executionContext.runtime,
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.executionContext.mapping.value,
547
- this.selectedExecutionContextState.executionContext.runtime,
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
- *handleExecute(): GeneratorFn<void> {
575
- if (!this.selectedExecutionContextState || this.isRunningQuery) {
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 (!this.selectedExecutionContextState || this.isRunningQuery) {
593
+ if (this.isRunningQuery) {
589
594
  return;
590
595
  }
591
596
  try {
592
597
  this.isRunningQuery = true;
593
- const promise =
594
- this.editorStore.graphManagerState.graphManager.executeMapping(
595
- this.getExecutionQuery(),
596
- this.selectedExecutionContextState.executionContext.mapping.value,
597
- this.selectedExecutionContextState.executionContext.runtime,
598
- this.editorStore.graphManagerState.graph,
599
- {
600
- useLosslessParse: true,
601
- parameterValues: buildExecutionParameterValues(
602
- this.parameterState.parameterStates,
603
- this.editorStore.graphManagerState,
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) {
@@ -679,7 +683,7 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
679
683
  ),
680
684
  );
681
685
  decorateRuntimeWithNewMapping(
682
- executionState.executionContext.runtime,
686
+ customRuntime,
683
687
  executionState.executionContext.mapping.value,
684
688
  this.editorStore,
685
689
  );
@@ -734,7 +738,7 @@ export class InlineServicePureExecutionState extends ServicePureExecutionState {
734
738
  updateExecutionQuery: action,
735
739
  setOpeningQueryEditor: action,
736
740
  generatePlan: flow,
737
- handleExecute: flow,
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
- handleExecute: flow,
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.execution, 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
- handleExecute: flow,
885
+ handleRunQuery: flow,
881
886
  runQuery: flow,
882
887
  });
883
888
 
@@ -57,7 +57,7 @@ import {
57
57
  createMockPrimitiveProperty,
58
58
  } from '../../../../shared/MockDataUtils.js';
59
59
  import {
60
- createRelationalDataFromCSV,
60
+ TEMPORARY_createRelationalDataFromCSV,
61
61
  EmbeddedDataConnectionTypeVisitor,
62
62
  getAllIdentifiedConnectionsFromRuntime,
63
63
  TEMPORARY_EmbeddedDataConnectionVisitor,
@@ -155,7 +155,7 @@ export class ConnectionTestDataState {
155
155
  anonymizeGeneratedData: this.anonymizeGeneratedData,
156
156
  },
157
157
  )) as string;
158
- embeddedData = createRelationalDataFromCSV(value);
158
+ embeddedData = TEMPORARY_createRelationalDataFromCSV(value);
159
159
  } else {
160
160
  embeddedData = connection.accept_ConnectionVisitor(
161
161
  new TEMPORARY_EmbeddedDataConnectionVisitor(this.editorStore),
@@ -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
- return this.testState.suiteState.testableState.serviceEditorState
187
- .executionState.serviceExecutionParameters?.query;
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[] {
@@ -25,16 +25,16 @@ import {
25
25
  type GenerationOutput,
26
26
  } from '@finos/legend-graph';
27
27
 
28
- export interface GenerationOutputResult {
29
- generationOutput: GenerationOutput;
28
+ export const GENERATION_FILE_ROOT_NAME = 'GENERATION_FILE_ROOT';
29
+
30
+ export interface FileResult {
31
+ value: GenerationOutput;
30
32
  parentId?: string | undefined;
31
33
  }
32
- export const GENERATION_FILE_ROOT_NAME = 'GENERATION_FILE_ROOT';
33
34
 
34
- // Generation Directory Model
35
- class GenerationFileNodeElement {
35
+ class FileSystemElement {
36
36
  name: string;
37
- directory?: GenerationDirectory | undefined;
37
+ directory?: FileSystem_Directory | undefined;
38
38
  parentId?: string | undefined;
39
39
 
40
40
  constructor(name: string, fileGenerationParent?: string) {
@@ -53,42 +53,42 @@ class GenerationFileNodeElement {
53
53
  }
54
54
  }
55
55
 
56
- export class GenerationDirectory extends GenerationFileNodeElement {
57
- children: GenerationFileNodeElement[] = [];
56
+ export class FileSystem_Directory extends FileSystemElement {
57
+ children: FileSystemElement[] = [];
58
58
 
59
- setDirectory(val: GenerationDirectory): void {
59
+ setDirectory(val: FileSystem_Directory): void {
60
60
  this.directory = val;
61
61
  }
62
- addChild(val: GenerationFileNodeElement): void {
62
+ addChild(val: FileSystemElement): void {
63
63
  addUniqueEntry(this.children, val);
64
64
  }
65
- addElement(val: GenerationFileNodeElement): void {
65
+ addElement(val: FileSystemElement): void {
66
66
  this.addChild(val);
67
67
  val.directory = this;
68
68
  }
69
69
 
70
70
  static createDirectoryFromParent(
71
71
  name: string,
72
- parent: GenerationDirectory,
73
- fileGenerationParent?: string,
74
- ): GenerationDirectory {
75
- const newDirectory = new GenerationDirectory(name, fileGenerationParent);
72
+ parent: FileSystem_Directory,
73
+ genParent?: string,
74
+ ): FileSystem_Directory {
75
+ const newDirectory = new FileSystem_Directory(name, genParent);
76
76
  newDirectory.setDirectory(parent);
77
77
  return newDirectory;
78
78
  }
79
79
 
80
80
  static getOrCreateDirectory(
81
- parent: GenerationDirectory,
81
+ parent: FileSystem_Directory,
82
82
  directoryName: string,
83
83
  insert: boolean,
84
- ): GenerationDirectory {
84
+ ): FileSystem_Directory {
85
85
  const index = directoryName.indexOf(DIRECTORY_PATH_DELIMITER);
86
86
  const str =
87
87
  index === -1 ? directoryName : directoryName.substring(0, index);
88
- let node: GenerationDirectory | undefined;
88
+ let node: FileSystem_Directory | undefined;
89
89
  node = parent.children.find(
90
- (child: GenerationFileNodeElement): child is GenerationDirectory =>
91
- child instanceof GenerationDirectory && child.name === str,
90
+ (child: FileSystemElement): child is FileSystem_Directory =>
91
+ child instanceof FileSystem_Directory && child.name === str,
92
92
  );
93
93
  if (!node) {
94
94
  if (!insert) {
@@ -97,11 +97,11 @@ export class GenerationDirectory extends GenerationFileNodeElement {
97
97
  );
98
98
  }
99
99
  // create the node if it is not in parent directory
100
- node = GenerationDirectory.createDirectoryFromParent(str, parent);
100
+ node = FileSystem_Directory.createDirectoryFromParent(str, parent);
101
101
  parent.addChild(node);
102
102
  }
103
103
  if (index !== -1) {
104
- return GenerationDirectory.getOrCreateDirectory(
104
+ return FileSystem_Directory.getOrCreateDirectory(
105
105
  node,
106
106
  directoryName.substring(index + DIRECTORY_PATH_DELIMITER.length),
107
107
  insert,
@@ -121,7 +121,7 @@ export class GenerationDirectory extends GenerationFileNodeElement {
121
121
  }
122
122
  }
123
123
 
124
- export class GenerationFile extends GenerationFileNodeElement {
124
+ export class FileSystem_File extends FileSystemElement {
125
125
  content!: string;
126
126
  format?: string | undefined;
127
127
 
@@ -137,31 +137,31 @@ export class GenerationFile extends GenerationFileNodeElement {
137
137
  }
138
138
  }
139
139
 
140
- // Generation Tree Node
141
- export interface GenerationTreeNodeData extends TreeNodeData {
142
- fileNode: GenerationFileNodeElement;
140
+ // Tree Node
141
+ export interface FileSystemTreeNodeData extends TreeNodeData {
142
+ fileNode: FileSystemElement;
143
143
  }
144
144
 
145
- export const getGenerationTreeNodeData = (
146
- fileNode: GenerationFileNodeElement,
147
- ): GenerationTreeNodeData => ({
145
+ export const getFileSystemTreeNodeData = (
146
+ fileNode: FileSystemElement,
147
+ ): FileSystemTreeNodeData => ({
148
148
  id: fileNode.path,
149
149
  label: fileNode.name,
150
150
  childrenIds:
151
- fileNode instanceof GenerationDirectory
151
+ fileNode instanceof FileSystem_Directory
152
152
  ? fileNode.children.map((child) => child.path)
153
153
  : undefined,
154
154
  fileNode: fileNode,
155
155
  });
156
156
 
157
157
  export const populateDirectoryTreeNodeChildren = (
158
- node: GenerationTreeNodeData,
159
- treeData: TreeData<GenerationTreeNodeData>,
158
+ node: FileSystemTreeNodeData,
159
+ treeData: TreeData<FileSystemTreeNodeData>,
160
160
  ): void => {
161
- if (node.childrenIds && node.fileNode instanceof GenerationDirectory) {
161
+ if (node.childrenIds && node.fileNode instanceof FileSystem_Directory) {
162
162
  node.childrenIds = node.fileNode.children.map((child) => child.path);
163
163
  node.fileNode.children
164
- .map((child) => getGenerationTreeNodeData(child))
164
+ .map((child) => getFileSystemTreeNodeData(child))
165
165
  .forEach((childNode) => {
166
166
  const currentNode = treeData.nodes.get(childNode.id);
167
167
  if (currentNode) {
@@ -174,14 +174,14 @@ export const populateDirectoryTreeNodeChildren = (
174
174
  }
175
175
  };
176
176
 
177
- export const getGenerationTreeData = (
178
- dir: GenerationDirectory,
177
+ export const getFileSystemTreeData = (
178
+ dir: FileSystem_Directory,
179
179
  rootWrapperName?: string,
180
- ): TreeData<GenerationTreeNodeData> => {
180
+ ): TreeData<FileSystemTreeNodeData> => {
181
181
  const rootIds: string[] = [];
182
- const nodes = new Map<string, GenerationTreeNodeData>();
182
+ const nodes = new Map<string, FileSystemTreeNodeData>();
183
183
  if (rootWrapperName) {
184
- const rootNode = getGenerationTreeNodeData(dir);
184
+ const rootNode = getFileSystemTreeNodeData(dir);
185
185
  rootNode.label = rootWrapperName;
186
186
  addUniqueEntry(rootIds, rootNode.id);
187
187
  nodes.set(rootNode.id, rootNode);
@@ -191,11 +191,11 @@ export const getGenerationTreeData = (
191
191
  .sort((a, b) => a.name.localeCompare(b.name))
192
192
  .sort(
193
193
  (a, b) =>
194
- (b instanceof GenerationDirectory ? 1 : 0) -
195
- (a instanceof GenerationDirectory ? 1 : 0),
194
+ (b instanceof FileSystem_Directory ? 1 : 0) -
195
+ (a instanceof FileSystem_Directory ? 1 : 0),
196
196
  )
197
197
  .forEach((childDirectory) => {
198
- const childTreeNodeData = getGenerationTreeNodeData(childDirectory);
198
+ const childTreeNodeData = getFileSystemTreeNodeData(childDirectory);
199
199
  addUniqueEntry(rootIds, childTreeNodeData.id);
200
200
  nodes.set(childTreeNodeData.id, childTreeNodeData);
201
201
  });
@@ -204,11 +204,11 @@ export const getGenerationTreeData = (
204
204
  };
205
205
 
206
206
  export const addNode = (
207
- element: GenerationFileNodeElement,
208
- treeData: TreeData<GenerationTreeNodeData>,
207
+ element: FileSystemElement,
208
+ treeData: TreeData<FileSystemTreeNodeData>,
209
209
  showRoot?: boolean,
210
- ): GenerationTreeNodeData => {
211
- const newNode = getGenerationTreeNodeData(element);
210
+ ): FileSystemTreeNodeData => {
211
+ const newNode = getFileSystemTreeNodeData(element);
212
212
  treeData.nodes.set(newNode.id, newNode);
213
213
  if (
214
214
  !element.directory ||
@@ -227,28 +227,28 @@ export const addNode = (
227
227
  };
228
228
 
229
229
  export const openNode = (
230
- element: GenerationFileNodeElement,
231
- treeData: TreeData<GenerationTreeNodeData>,
230
+ element: FileSystemElement,
231
+ treeData: TreeData<FileSystemTreeNodeData>,
232
232
  showRoot?: boolean,
233
- ): GenerationTreeNodeData | undefined => {
233
+ ): FileSystemTreeNodeData | undefined => {
234
234
  let currentElement = element;
235
- let openingNode: GenerationTreeNodeData | undefined;
235
+ let openingNode: FileSystemTreeNodeData | undefined;
236
236
  while (currentElement.directory) {
237
- const node: GenerationTreeNodeData =
237
+ const node: FileSystemTreeNodeData =
238
238
  treeData.nodes.get(currentElement.path) ??
239
239
  addNode(currentElement, treeData, showRoot);
240
- node.isOpen = currentElement instanceof GenerationDirectory;
240
+ node.isOpen = currentElement instanceof FileSystem_Directory;
241
241
  openingNode = !openingNode ? node : openingNode;
242
242
  currentElement = currentElement.directory;
243
243
  }
244
244
  return openingNode;
245
245
  };
246
246
 
247
- export const getFileGenerationChildNodes = (
248
- node: GenerationTreeNodeData,
249
- treeData: TreeData<GenerationTreeNodeData>,
250
- ): GenerationTreeNodeData[] => {
251
- if (node.childrenIds && node.fileNode instanceof GenerationDirectory) {
247
+ export const getFileSystemChildNodes = (
248
+ node: FileSystemTreeNodeData,
249
+ treeData: TreeData<FileSystemTreeNodeData>,
250
+ ): FileSystemTreeNodeData[] => {
251
+ if (node.childrenIds && node.fileNode instanceof FileSystem_Directory) {
252
252
  populateDirectoryTreeNodeChildren(node, treeData);
253
253
  return node.childrenIds
254
254
  .map((id) => treeData.nodes.get(id))
@@ -256,21 +256,21 @@ export const getFileGenerationChildNodes = (
256
256
  .sort((a, b) => a.label.localeCompare(b.label))
257
257
  .sort(
258
258
  (a, b) =>
259
- (b.fileNode instanceof GenerationDirectory ? 1 : 0) -
260
- (a.fileNode instanceof GenerationDirectory ? 1 : 0),
259
+ (b.fileNode instanceof FileSystem_Directory ? 1 : 0) -
260
+ (a.fileNode instanceof FileSystem_Directory ? 1 : 0),
261
261
  );
262
262
  }
263
263
  return [];
264
264
  };
265
265
 
266
- export const buildGenerationDirectory = (
267
- rootDirectory: GenerationDirectory,
268
- generationResultIndex: Map<string, GenerationOutputResult>,
269
- filesIndex: Map<string, GenerationFile>,
266
+ export const buildFileSystemDirectory = (
267
+ rootDirectory: FileSystem_Directory,
268
+ filesResultIndex: Map<string, FileResult>,
269
+ filesIndex: Map<string, FileSystem_File>,
270
270
  ): void => {
271
- Array.from(generationResultIndex.values()).forEach((generationFileInfo) => {
272
- const generationOutput = generationFileInfo.generationOutput;
273
- const filePath = generationOutput.fileName;
271
+ Array.from(filesResultIndex.values()).forEach((fileResult) => {
272
+ const resultValue = fileResult.value;
273
+ const filePath = resultValue.fileName;
274
274
  const index = filePath.lastIndexOf(DIRECTORY_PATH_DELIMITER);
275
275
  const fileName =
276
276
  index === -1
@@ -283,22 +283,23 @@ export const buildGenerationDirectory = (
283
283
  index === -1 ? undefined : filePath.substring(0, index);
284
284
  let directory = rootDirectory;
285
285
  if (directoryName) {
286
- directory = GenerationDirectory.getOrCreateDirectory(
286
+ directory = FileSystem_Directory.getOrCreateDirectory(
287
287
  rootDirectory,
288
288
  directoryName,
289
289
  true,
290
290
  );
291
291
  }
292
- const file = new GenerationFile(
292
+ const file = new FileSystem_File(
293
293
  fileName,
294
- generationOutput.content,
295
- generationFileInfo.generationOutput.format,
296
- generationFileInfo.parentId,
294
+ resultValue.content,
295
+ fileResult.value.format,
296
+ fileResult.parentId,
297
297
  );
298
298
  directory.addElement(file);
299
299
  filesIndex.set(filePath, file);
300
300
  });
301
301
  };
302
+
302
303
  const openNodeById = (
303
304
  id: string,
304
305
  treeData: TreeData<TreeNodeData> | undefined,
@@ -312,19 +313,19 @@ const openNodeById = (
312
313
  };
313
314
 
314
315
  export const reprocessOpenNodes = (
315
- treeData: TreeData<GenerationTreeNodeData>,
316
- filesIndex: Map<string, GenerationFile>,
317
- rootDirectory: GenerationDirectory,
316
+ treeData: TreeData<FileSystemTreeNodeData>,
317
+ filesIndex: Map<string, FileSystem_File>,
318
+ rootDirectory: FileSystem_Directory,
318
319
  openedNodeIds: string[],
319
320
  showRoot?: boolean,
320
321
  ): void => {
321
322
  const openNodeElement = (
322
323
  elementPath: string,
323
- ): GenerationTreeNodeData | undefined => {
324
+ ): FileSystemTreeNodeData | undefined => {
324
325
  const element =
325
326
  filesIndex.get(elementPath) ??
326
327
  returnUndefOnError(() =>
327
- GenerationDirectory.getOrCreateDirectory(
328
+ FileSystem_Directory.getOrCreateDirectory(
328
329
  rootDirectory,
329
330
  elementPath,
330
331
  false,