@finos/legend-application-studio 26.1.0 → 26.1.2

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 (188) hide show
  1. package/lib/__lib__/LegendStudioApplicationNavigationContext.d.ts +2 -1
  2. package/lib/__lib__/LegendStudioApplicationNavigationContext.d.ts.map +1 -1
  3. package/lib/__lib__/LegendStudioApplicationNavigationContext.js +1 -0
  4. package/lib/__lib__/LegendStudioApplicationNavigationContext.js.map +1 -1
  5. package/lib/__lib__/STO_Relational_LegendStudioCommand.d.ts +21 -0
  6. package/lib/__lib__/STO_Relational_LegendStudioCommand.d.ts.map +1 -0
  7. package/lib/__lib__/STO_Relational_LegendStudioCommand.js +28 -0
  8. package/lib/__lib__/STO_Relational_LegendStudioCommand.js.map +1 -0
  9. package/lib/application/LegendStudioApplicationConfig.d.ts +5 -5
  10. package/lib/application/LegendStudioApplicationConfig.d.ts.map +1 -1
  11. package/lib/application/LegendStudioApplicationConfig.js +6 -6
  12. package/lib/application/LegendStudioApplicationConfig.js.map +1 -1
  13. package/lib/components/ElementIconUtils.d.ts +13 -2
  14. package/lib/components/ElementIconUtils.d.ts.map +1 -1
  15. package/lib/components/ElementIconUtils.js +15 -6
  16. package/lib/components/ElementIconUtils.js.map +1 -1
  17. package/lib/components/editor/Editor.d.ts.map +1 -1
  18. package/lib/components/editor/Editor.js +2 -1
  19. package/lib/components/editor/Editor.js.map +1 -1
  20. package/lib/components/editor/QuickInput.d.ts +19 -0
  21. package/lib/components/editor/QuickInput.d.ts.map +1 -0
  22. package/lib/components/editor/QuickInput.js +51 -0
  23. package/lib/components/editor/QuickInput.js.map +1 -0
  24. package/lib/components/editor/__test-utils__/EditorComponentTestUtils.d.ts.map +1 -1
  25. package/lib/components/editor/__test-utils__/EditorComponentTestUtils.js +5 -1
  26. package/lib/components/editor/__test-utils__/EditorComponentTestUtils.js.map +1 -1
  27. package/lib/components/editor/command-center/ProjectSearchCommand.js +3 -3
  28. package/lib/components/editor/command-center/ProjectSearchCommand.js.map +1 -1
  29. package/lib/components/editor/editor-group/EditorGroup.d.ts.map +1 -1
  30. package/lib/components/editor/editor-group/EditorGroup.js +11 -4
  31. package/lib/components/editor/editor-group/EditorGroup.js.map +1 -1
  32. package/lib/components/editor/editor-group/FunctionEditor.d.ts.map +1 -1
  33. package/lib/components/editor/editor-group/FunctionEditor.js +30 -8
  34. package/lib/components/editor/editor-group/FunctionEditor.js.map +1 -1
  35. package/lib/components/editor/editor-group/GenerationSpecificationEditor.js +1 -1
  36. package/lib/components/editor/editor-group/GenerationSpecificationEditor.js.map +1 -1
  37. package/lib/components/editor/editor-group/GrammarTextEditor.d.ts.map +1 -1
  38. package/lib/components/editor/editor-group/GrammarTextEditor.js +99 -100
  39. package/lib/components/editor/editor-group/GrammarTextEditor.js.map +1 -1
  40. package/lib/components/editor/editor-group/INTERNAL__UnknownFunctionActivatorEdtior.d.ts.map +1 -1
  41. package/lib/components/editor/editor-group/INTERNAL__UnknownFunctionActivatorEdtior.js +5 -5
  42. package/lib/components/editor/editor-group/INTERNAL__UnknownFunctionActivatorEdtior.js.map +1 -1
  43. package/lib/components/editor/editor-group/RuntimeEditor.js +1 -1
  44. package/lib/components/editor/editor-group/RuntimeEditor.js.map +1 -1
  45. package/lib/components/editor/editor-group/connection-editor/DatabaseBuilder.d.ts.map +1 -1
  46. package/lib/components/editor/editor-group/connection-editor/DatabaseBuilder.js +27 -19
  47. package/lib/components/editor/editor-group/connection-editor/DatabaseBuilder.js.map +1 -1
  48. package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.js +2 -2
  49. package/lib/components/editor/editor-group/diff-editor/EntityChangeConflictEditor.d.ts.map +1 -1
  50. package/lib/components/editor/editor-group/diff-editor/EntityChangeConflictEditor.js +5 -5
  51. package/lib/components/editor/editor-group/diff-editor/EntityChangeConflictEditor.js.map +1 -1
  52. package/lib/components/editor/editor-group/element-generation-editor/FileGenerationEditor.js +2 -2
  53. package/lib/components/editor/editor-group/element-generation-editor/FileGenerationEditor.js.map +1 -1
  54. package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_BindingElementEditor.js +1 -1
  55. package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_BindingElementEditor.js.map +1 -1
  56. package/lib/components/editor/editor-group/mapping-editor/ClassMappingEditor.js +1 -1
  57. package/lib/components/editor/editor-group/mapping-editor/ClassMappingEditor.js.map +1 -1
  58. package/lib/components/editor/editor-group/mapping-editor/MappingExplorer.js +2 -2
  59. package/lib/components/editor/editor-group/mapping-editor/MappingExplorer.js.map +1 -1
  60. package/lib/components/editor/editor-group/mapping-editor/PropertyMappingsEditor.js +1 -1
  61. package/lib/components/editor/editor-group/mapping-editor/PropertyMappingsEditor.js.map +1 -1
  62. package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.d.ts.map +1 -1
  63. package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.js +4 -6
  64. package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
  65. package/lib/components/editor/editor-group/service-editor/testable/ServiceTestDataEditor.js +2 -2
  66. package/lib/components/editor/editor-group/service-editor/testable/ServiceTestDataEditor.js.map +1 -1
  67. package/lib/components/editor/editor-group/service-editor/testable/ServiceTestableEditor.d.ts.map +1 -1
  68. package/lib/components/editor/editor-group/service-editor/testable/ServiceTestableEditor.js +2 -2
  69. package/lib/components/editor/editor-group/service-editor/testable/ServiceTestableEditor.js.map +1 -1
  70. package/lib/components/editor/editor-group/uml-editor/AssociationEditor.js +2 -2
  71. package/lib/components/editor/editor-group/uml-editor/AssociationEditor.js.map +1 -1
  72. package/lib/components/editor/editor-group/uml-editor/ClassEditor.js +4 -4
  73. package/lib/components/editor/editor-group/uml-editor/ClassEditor.js.map +1 -1
  74. package/lib/components/editor/panel-group/PanelGroup.d.ts +2 -0
  75. package/lib/components/editor/panel-group/PanelGroup.d.ts.map +1 -1
  76. package/lib/components/editor/panel-group/PanelGroup.js +18 -3
  77. package/lib/components/editor/panel-group/PanelGroup.js.map +1 -1
  78. package/lib/components/editor/panel-group/SQLPlaygroundPanel.d.ts +26 -0
  79. package/lib/components/editor/panel-group/SQLPlaygroundPanel.d.ts.map +1 -0
  80. package/lib/components/editor/panel-group/SQLPlaygroundPanel.js +339 -0
  81. package/lib/components/editor/panel-group/SQLPlaygroundPanel.js.map +1 -0
  82. package/lib/components/editor/side-bar/Explorer.js +5 -6
  83. package/lib/components/editor/side-bar/Explorer.js.map +1 -1
  84. package/lib/components/editor/side-bar/testable/GlobalTestRunner.js +1 -1
  85. package/lib/components/editor/side-bar/testable/GlobalTestRunner.js.map +1 -1
  86. package/lib/components/extensions/Core_LegendStudioApplicationPlugin.d.ts.map +1 -1
  87. package/lib/components/extensions/Core_LegendStudioApplicationPlugin.js +5 -1
  88. package/lib/components/extensions/Core_LegendStudioApplicationPlugin.js.map +1 -1
  89. package/lib/index.css +2 -2
  90. package/lib/index.css.map +1 -1
  91. package/lib/package.json +2 -2
  92. package/lib/stores/editor/EditorConfig.d.ts +2 -1
  93. package/lib/stores/editor/EditorConfig.d.ts.map +1 -1
  94. package/lib/stores/editor/EditorConfig.js +1 -0
  95. package/lib/stores/editor/EditorConfig.js.map +1 -1
  96. package/lib/stores/editor/EditorStore.d.ts +8 -2
  97. package/lib/stores/editor/EditorStore.d.ts.map +1 -1
  98. package/lib/stores/editor/EditorStore.js +19 -4
  99. package/lib/stores/editor/EditorStore.js.map +1 -1
  100. package/lib/stores/editor/GraphEditFormModeState.d.ts.map +1 -1
  101. package/lib/stores/editor/GraphEditFormModeState.js +1 -0
  102. package/lib/stores/editor/GraphEditFormModeState.js.map +1 -1
  103. package/lib/stores/editor/QuickInputState.d.ts +28 -0
  104. package/lib/stores/editor/QuickInputState.d.ts.map +1 -0
  105. package/lib/stores/editor/QuickInputState.js +17 -0
  106. package/lib/stores/editor/QuickInputState.js.map +1 -0
  107. package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.d.ts +22 -2
  108. package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.d.ts.map +1 -1
  109. package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js +181 -4
  110. package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js.map +1 -1
  111. package/lib/stores/editor/editor-state/element-editor-state/ProtocolValueBuilderState.d.ts.map +1 -1
  112. package/lib/stores/editor/editor-state/element-editor-state/ProtocolValueBuilderState.js +6 -2
  113. package/lib/stores/editor/editor-state/element-editor-state/ProtocolValueBuilderState.js.map +1 -1
  114. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts +19 -18
  115. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts.map +1 -1
  116. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js +167 -157
  117. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js.map +1 -1
  118. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingElementDecorator.d.ts +3 -3
  119. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingElementDecorator.d.ts.map +1 -1
  120. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingElementDecorator.js +2 -2
  121. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingElementDecorator.js.map +1 -1
  122. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.d.ts +8 -9
  123. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
  124. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js +9 -14
  125. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
  126. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts +4 -4
  127. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts.map +1 -1
  128. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +16 -51
  129. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -1
  130. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.d.ts +1 -1
  131. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.d.ts.map +1 -1
  132. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js +3 -1
  133. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js.map +1 -1
  134. package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.d.ts +82 -0
  135. package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.d.ts.map +1 -0
  136. package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.js +328 -0
  137. package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.js.map +1 -0
  138. package/lib/stores/graph-modifier/DSL_Service_GraphModifierHelper.d.ts +1 -1
  139. package/lib/stores/graph-modifier/DSL_Service_GraphModifierHelper.d.ts.map +1 -1
  140. package/lib/stores/graph-modifier/DSL_Service_GraphModifierHelper.js +8 -2
  141. package/lib/stores/graph-modifier/DSL_Service_GraphModifierHelper.js.map +1 -1
  142. package/package.json +12 -12
  143. package/src/__lib__/LegendStudioApplicationNavigationContext.ts +2 -0
  144. package/src/__lib__/STO_Relational_LegendStudioCommand.ts +30 -0
  145. package/src/application/LegendStudioApplicationConfig.ts +7 -7
  146. package/src/components/ElementIconUtils.tsx +23 -8
  147. package/src/components/editor/Editor.tsx +2 -0
  148. package/src/components/editor/QuickInput.tsx +91 -0
  149. package/src/components/editor/__test-utils__/EditorComponentTestUtils.tsx +5 -1
  150. package/src/components/editor/command-center/ProjectSearchCommand.tsx +4 -4
  151. package/src/components/editor/editor-group/EditorGroup.tsx +41 -1
  152. package/src/components/editor/editor-group/FunctionEditor.tsx +145 -5
  153. package/src/components/editor/editor-group/GenerationSpecificationEditor.tsx +1 -1
  154. package/src/components/editor/editor-group/GrammarTextEditor.tsx +134 -131
  155. package/src/components/editor/editor-group/INTERNAL__UnknownFunctionActivatorEdtior.tsx +26 -13
  156. package/src/components/editor/editor-group/RuntimeEditor.tsx +1 -1
  157. package/src/components/editor/editor-group/connection-editor/DatabaseBuilder.tsx +193 -150
  158. package/src/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.tsx +2 -2
  159. package/src/components/editor/editor-group/diff-editor/EntityChangeConflictEditor.tsx +6 -5
  160. package/src/components/editor/editor-group/element-generation-editor/FileGenerationEditor.tsx +1 -1
  161. package/src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_BindingElementEditor.tsx +1 -1
  162. package/src/components/editor/editor-group/mapping-editor/ClassMappingEditor.tsx +1 -1
  163. package/src/components/editor/editor-group/mapping-editor/MappingExplorer.tsx +2 -2
  164. package/src/components/editor/editor-group/mapping-editor/PropertyMappingsEditor.tsx +1 -1
  165. package/src/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.tsx +8 -10
  166. package/src/components/editor/editor-group/service-editor/testable/ServiceTestDataEditor.tsx +2 -2
  167. package/src/components/editor/editor-group/service-editor/testable/ServiceTestableEditor.tsx +9 -3
  168. package/src/components/editor/editor-group/uml-editor/AssociationEditor.tsx +2 -2
  169. package/src/components/editor/editor-group/uml-editor/ClassEditor.tsx +4 -4
  170. package/src/components/editor/panel-group/PanelGroup.tsx +35 -3
  171. package/src/components/editor/panel-group/SQLPlaygroundPanel.tsx +730 -0
  172. package/src/components/editor/side-bar/Explorer.tsx +5 -5
  173. package/src/components/editor/side-bar/testable/GlobalTestRunner.tsx +1 -1
  174. package/src/components/extensions/Core_LegendStudioApplicationPlugin.tsx +9 -3
  175. package/src/stores/editor/EditorConfig.ts +1 -0
  176. package/src/stores/editor/EditorStore.ts +23 -4
  177. package/src/stores/editor/GraphEditFormModeState.ts +1 -0
  178. package/src/stores/editor/QuickInputState.ts +24 -0
  179. package/src/stores/editor/editor-state/element-editor-state/FunctionEditorState.ts +317 -3
  180. package/src/stores/editor/editor-state/element-editor-state/ProtocolValueBuilderState.ts +11 -2
  181. package/src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.ts +262 -249
  182. package/src/stores/editor/editor-state/element-editor-state/mapping/MappingElementDecorator.ts +5 -5
  183. package/src/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.ts +19 -23
  184. package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +30 -87
  185. package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.ts +4 -2
  186. package/src/stores/editor/panel-group/SQLPlaygroundPanelState.ts +485 -0
  187. package/src/stores/graph-modifier/DSL_Service_GraphModifierHelper.ts +13 -1
  188. package/tsconfig.json +5 -0
@@ -35,7 +35,7 @@ import {
35
35
  type AggregationAwareSetImplementation,
36
36
  type PropertyMapping,
37
37
  type InstanceSetImplementation,
38
- type TEMPORARY__UnresolvedSetImplementation,
38
+ type INTERNAL__UnresolvedSetImplementation,
39
39
  type Mapping,
40
40
  getAllClassMappings,
41
41
  PurePropertyMapping,
@@ -652,8 +652,8 @@ export class MappingElementDecorator implements SetImplementationVisitor<void> {
652
652
  }
653
653
  }
654
654
 
655
- visit_TEMPORARY__UnresolvedSetImplementation(
656
- setImplementation: TEMPORARY__UnresolvedSetImplementation,
655
+ visit_INTERNAL__UnresolvedSetImplementation(
656
+ setImplementation: INTERNAL__UnresolvedSetImplementation,
657
657
  ): void {
658
658
  return;
659
659
  }
@@ -799,8 +799,8 @@ export class MappingElementDecorationCleaner
799
799
  }
800
800
  }
801
801
 
802
- visit_TEMPORARY__UnresolvedSetImplementation(
803
- setImplementation: TEMPORARY__UnresolvedSetImplementation,
802
+ visit_INTERNAL__UnresolvedSetImplementation(
803
+ setImplementation: INTERNAL__UnresolvedSetImplementation,
804
804
  ): void {
805
805
  return;
806
806
  }
@@ -110,7 +110,7 @@ const QUERY_ROUTE_PATTERN = Object.freeze({
110
110
  UPDATE_PROJECT_SERVICE_QUERY: `/update-project-service-query/:${DSL_SERVICE_PATH_PARAM_TOKEN.PROJECT_ID}/:${DSL_SERVICE_PATH_PARAM_TOKEN.GROUP_WORKSPACE_ID}/:${DSL_SERVICE_PATH_PARAM_TOKEN.SERVICE_PATH}`,
111
111
  });
112
112
 
113
- export class ServiceExecutionParameterState extends LambdaParametersState {
113
+ export class ServiceExecutionParametersState extends LambdaParametersState {
114
114
  executionState: ServicePureExecutionState;
115
115
 
116
116
  constructor(executionState: ServicePureExecutionState) {
@@ -164,9 +164,10 @@ export class ServiceExecutionParameterState extends LambdaParametersState {
164
164
  }
165
165
 
166
166
  export abstract class ServiceExecutionState {
167
- editorStore: EditorStore;
168
- serviceEditorState: ServiceEditorState;
169
- execution: ServiceExecution;
167
+ readonly editorStore: EditorStore;
168
+ readonly serviceEditorState: ServiceEditorState;
169
+ readonly execution: ServiceExecution;
170
+
170
171
  constructor(
171
172
  editorStore: EditorStore,
172
173
  serviceEditorState: ServiceEditorState,
@@ -180,6 +181,7 @@ export abstract class ServiceExecutionState {
180
181
  this.execution = execution;
181
182
  this.serviceEditorState = serviceEditorState;
182
183
  }
184
+
183
185
  abstract get serviceExecutionParameters():
184
186
  | { query: RawLambda; mapping: Mapping; runtime: Runtime }
185
187
  | undefined;
@@ -447,17 +449,17 @@ export class KeyedExecutionContextState extends ServiceExecutionContextState {
447
449
  }
448
450
 
449
451
  export abstract class ServicePureExecutionState extends ServiceExecutionState {
450
- queryState: ServicePureExecutionQueryState;
451
452
  declare execution: PureExecution;
453
+ queryState: ServicePureExecutionQueryState;
452
454
  selectedExecutionContextState: ServiceExecutionContextState | undefined;
453
455
  runtimeEditorState?: RuntimeEditorState | undefined;
456
+ isOpeningQueryEditor = false;
457
+ showChangeExecModal = false;
454
458
  isRunningQuery = false;
455
459
  isGeneratingPlan = false;
456
- isOpeningQueryEditor = false;
457
460
  executionResultText?: string | undefined; // NOTE: stored as lossless JSON string
458
461
  executionPlanState: ExecutionPlanState;
459
- parameterState: ServiceExecutionParameterState;
460
- showChangeExecModal = false;
462
+ readonly parametersState: ServiceExecutionParametersState;
461
463
  queryRunPromise: Promise<ExecutionResult> | undefined = undefined;
462
464
 
463
465
  constructor(
@@ -479,7 +481,7 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
479
481
  this.editorStore.applicationStore,
480
482
  this.editorStore.graphManagerState,
481
483
  );
482
- this.parameterState = new ServiceExecutionParameterState(this);
484
+ this.parametersState = new ServiceExecutionParametersState(this);
483
485
  }
484
486
 
485
487
  abstract changeExecution(): void;
@@ -606,7 +608,7 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
606
608
  const query = this.queryState.query;
607
609
  const parameters = (query.parameters ?? []) as object[];
608
610
  if (parameters.length) {
609
- this.parameterState.openModal(query);
611
+ this.parametersState.openModal(query);
610
612
  } else {
611
613
  this.runQuery();
612
614
  }
@@ -629,14 +631,18 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
629
631
  this.editorStore.graphManagerState.graph,
630
632
  );
631
633
  promise = this.editorStore.graphManagerState.graphManager.runQuery(
632
- this.getExecutionQuery(),
634
+ getExecutionQueryFromRawLambda(
635
+ this.queryState.query,
636
+ this.parametersState.parameterStates,
637
+ this.editorStore.graphManagerState,
638
+ ),
633
639
  this.selectedExecutionContextState?.executionContext.mapping.value,
634
640
  this.selectedExecutionContextState?.executionContext.runtime,
635
641
  this.editorStore.graphManagerState.graph,
636
642
  {
637
643
  useLosslessParse: true,
638
644
  parameterValues: buildExecutionParameterValues(
639
- this.parameterState.parameterStates,
645
+ this.parametersState.parameterStates,
640
646
  this.editorStore.graphManagerState,
641
647
  ),
642
648
  },
@@ -648,7 +654,7 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
648
654
  this.setExecutionResultText(
649
655
  stringifyLosslessJSON(result, undefined, DEFAULT_TAB_SIZE),
650
656
  );
651
- this.parameterState.setParameters([]);
657
+ this.parametersState.setParameters([]);
652
658
  // report
653
659
  report.timings =
654
660
  this.editorStore.applicationStore.timeService.finalizeTimingsRecord(
@@ -695,14 +701,6 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
695
701
  }
696
702
  }
697
703
 
698
- getExecutionQuery(): RawLambda {
699
- return getExecutionQueryFromRawLambda(
700
- this.queryState.query,
701
- this.parameterState.parameterStates,
702
- this.editorStore.graphManagerState,
703
- );
704
- }
705
-
706
704
  get serviceExecutionParameters():
707
705
  | { query: RawLambda; mapping: Mapping; runtime: Runtime }
708
706
  | undefined {
@@ -832,7 +830,6 @@ export class InlineServicePureExecutionState extends ServicePureExecutionState {
832
830
  executionResultText: observable,
833
831
  executionPlanState: observable,
834
832
  showChangeExecModal: observable,
835
- parameterState: observable,
836
833
  setExecutionResultText: action,
837
834
  setQueryState: action,
838
835
  updateExecutionQuery: action,
@@ -879,7 +876,6 @@ export class SingleServicePureExecutionState extends ServicePureExecutionState {
879
876
  executionResultText: observable,
880
877
  executionPlanState: observable,
881
878
  showChangeExecModal: observable,
882
- parameterState: observable,
883
879
  multiExecutionKey: observable,
884
880
  setExecutionResultText: action,
885
881
  closeRuntimeEditor: action,
@@ -34,8 +34,6 @@ import {
34
34
  ConnectionPointer,
35
35
  reportGraphAnalytics,
36
36
  observe_ValueSpecification,
37
- Enumeration,
38
- PrimitiveType,
39
37
  } from '@finos/legend-graph';
40
38
  import {
41
39
  type GeneratorFn,
@@ -47,7 +45,6 @@ import {
47
45
  returnUndefOnError,
48
46
  getNullableFirstEntry,
49
47
  uniq,
50
- isNonNullable,
51
48
  } from '@finos/legend-shared';
52
49
  import { action, flow, flowResult, makeObservable, observable } from 'mobx';
53
50
  import type { EditorStore } from '../../../../EditorStore.js';
@@ -74,31 +71,10 @@ import {
74
71
  LambdaParametersState,
75
72
  PARAMETER_SUBMIT_ACTION,
76
73
  buildExecutionParameterValues,
77
- createMockEnumerationProperty,
78
74
  getExecutionQueryFromRawLambda,
79
75
  } from '@finos/legend-query-builder';
80
- import { createMockPrimitiveProperty } from '../../../../utils/MockDataUtils.js';
81
76
 
82
- const buildTestDataParameters = (
83
- rawLambda: RawLambda,
84
- editorStore: EditorStore,
85
- ): (string | number | boolean)[] =>
86
- buildLambdaVariableExpressions(rawLambda, editorStore.graphManagerState)
87
- .filter(filterByType(VariableExpression))
88
- .map((varExpression) => {
89
- if (varExpression.multiplicity.lowerBound !== 0) {
90
- const type = varExpression.genericType?.value.rawType;
91
- if (type instanceof PrimitiveType) {
92
- return createMockPrimitiveProperty(type, varExpression.name);
93
- } else if (type instanceof Enumeration) {
94
- return createMockEnumerationProperty(type);
95
- }
96
- }
97
- return undefined;
98
- })
99
- .filter(isNonNullable);
100
-
101
- export class ServiceTestDataParameterState extends LambdaParametersState {
77
+ export class ServiceTestDataParametersState extends LambdaParametersState {
102
78
  connectionTestDataState: ConnectionTestDataState;
103
79
 
104
80
  constructor(connectionTestDataState: ConnectionTestDataState) {
@@ -161,10 +137,11 @@ export class ServiceTestDataParameterState extends LambdaParametersState {
161
137
  export class ConnectionTestDataState {
162
138
  readonly editorStore: EditorStore;
163
139
  readonly testDataState: ServiceTestDataState;
164
- connectionData: ConnectionTestData;
165
- parameterState: ServiceTestDataParameterState;
140
+ readonly connectionData: ConnectionTestData;
141
+ readonly parametersState: ServiceTestDataParametersState;
142
+ readonly generatingTestDataState = ActionState.create();
143
+
166
144
  embeddedEditorState: EmbeddedDataEditorState;
167
- generatingTestDataState = ActionState.create();
168
145
  anonymizeGeneratedData = true;
169
146
 
170
147
  constructor(
@@ -173,7 +150,6 @@ export class ConnectionTestDataState {
173
150
  ) {
174
151
  makeObservable(this, {
175
152
  generatingTestDataState: observable,
176
- parameterState: observable,
177
153
  embeddedEditorState: observable,
178
154
  anonymizeGeneratedData: observable,
179
155
  setAnonymizeGeneratedData: action,
@@ -187,7 +163,7 @@ export class ConnectionTestDataState {
187
163
  this.testDataState.editorStore,
188
164
  connectionData.testData,
189
165
  );
190
- this.parameterState = new ServiceTestDataParameterState(this);
166
+ this.parametersState = new ServiceTestDataParametersState(this);
191
167
  }
192
168
  get identifiedConnection(): IdentifiedConnection | undefined {
193
169
  return this.getAllIdentifiedConnections().find(
@@ -215,49 +191,27 @@ export class ConnectionTestDataState {
215
191
  const report = reportGraphAnalytics(
216
192
  this.editorStore.graphManagerState.graph,
217
193
  );
218
- let value;
219
- if (
220
- this.editorStore.applicationStore.config.options
221
- .TEMPORARY__enableTestDataGenerationNewFlow
222
- ) {
223
- value =
224
- (yield this.editorStore.graphManagerState.graphManager.generateExecuteTestData(
225
- getExecutionQueryFromRawLambda(
226
- serviceExecutionParameters.query,
227
- this.parameterState.parameterStates,
228
- this.editorStore.graphManagerState,
229
- ),
230
- [],
231
- serviceExecutionParameters.mapping,
232
- serviceExecutionParameters.runtime,
233
- this.editorStore.graphManagerState.graph,
234
- {
235
- anonymizeGeneratedData: this.anonymizeGeneratedData,
236
- parameterValues: buildExecutionParameterValues(
237
- this.parameterState.parameterStates,
238
- this.editorStore.graphManagerState,
239
- ),
240
- },
241
- report,
242
- )) as string;
243
- } else {
244
- // TODO: delete this once the backend code is in place
245
- value =
246
- (yield this.editorStore.graphManagerState.graphManager.generateExecuteTestData(
194
+ const value =
195
+ (yield this.editorStore.graphManagerState.graphManager.generateExecuteTestData(
196
+ getExecutionQueryFromRawLambda(
247
197
  serviceExecutionParameters.query,
248
- buildTestDataParameters(
249
- serviceExecutionParameters.query,
250
- this.editorStore,
198
+ this.parametersState.parameterStates,
199
+ this.editorStore.graphManagerState,
200
+ ),
201
+ [],
202
+ serviceExecutionParameters.mapping,
203
+ serviceExecutionParameters.runtime,
204
+ this.editorStore.graphManagerState.graph,
205
+ {
206
+ anonymizeGeneratedData: this.anonymizeGeneratedData,
207
+ parameterValues: buildExecutionParameterValues(
208
+ this.parametersState.parameterStates,
209
+ this.editorStore.graphManagerState,
251
210
  ),
252
- serviceExecutionParameters.mapping,
253
- serviceExecutionParameters.runtime,
254
- this.editorStore.graphManagerState.graph,
255
- {
256
- anonymizeGeneratedData: this.anonymizeGeneratedData,
257
- },
258
- report,
259
- )) as string;
260
- }
211
+ },
212
+ report,
213
+ )) as string;
214
+
261
215
  // NOTE: since we don't have a generic mechanism for test-data generation
262
216
  // we will only report metrics around API usage, when we genericize, we will
263
217
  // move this out
@@ -298,22 +252,11 @@ export class ConnectionTestDataState {
298
252
  this.testDataState.testSuiteState.testableState.serviceEditorState
299
253
  .executionState.serviceExecutionParameters,
300
254
  );
301
- if (
302
- this.editorStore.applicationStore.config.options
303
- .TEMPORARY__enableTestDataGenerationNewFlow
304
- ) {
305
- const parameters = (serviceExecutionParameters.query.parameters ??
306
- []) as object[];
307
- if (parameters.length > 0) {
308
- this.parameterState.openModal(serviceExecutionParameters);
309
- return;
310
- } else {
311
- yield flowResult(
312
- this.generateTestDataForDatabaseConnection(
313
- serviceExecutionParameters,
314
- ),
315
- );
316
- }
255
+ const parameters = (serviceExecutionParameters.query.parameters ??
256
+ []) as object[];
257
+ if (parameters.length > 0) {
258
+ this.parametersState.openModal(serviceExecutionParameters);
259
+ return;
317
260
  } else {
318
261
  yield flowResult(
319
262
  this.generateTestDataForDatabaseConnection(
@@ -76,7 +76,7 @@ export class ServiceTestSuiteState {
76
76
  readonly editorStore: EditorStore;
77
77
  readonly testableState: ServiceTestableState;
78
78
  suite: ServiceTestSuite;
79
- testDataState: ServiceTestDataState;
79
+ testDataState: ServiceTestDataState | undefined;
80
80
  selectedTestState: ServiceTestState | undefined;
81
81
  testStates: ServiceTestState[] = [];
82
82
  testToRename: ServiceTest | undefined;
@@ -102,7 +102,9 @@ export class ServiceTestSuiteState {
102
102
  .filter(filterByType(ServiceTest))
103
103
  .map((test) => new ServiceTestState(this, test));
104
104
  this.selectedTestState = this.testStates[0];
105
- this.testDataState = new ServiceTestDataState(this.suite.testData, this);
105
+ this.testDataState = this.suite.testData
106
+ ? new ServiceTestDataState(this.suite.testData, this)
107
+ : undefined;
106
108
  }
107
109
 
108
110
  setTestToRename(test: ServiceTest | undefined): void {