@finos/legend-application-studio 19.1.0 → 20.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.
Files changed (332) hide show
  1. package/lib/application/LegendStudioApplicationConfig.d.ts +6 -0
  2. package/lib/application/LegendStudioApplicationConfig.d.ts.map +1 -1
  3. package/lib/application/LegendStudioApplicationConfig.js +7 -0
  4. package/lib/application/LegendStudioApplicationConfig.js.map +1 -1
  5. package/lib/components/EditorComponentTestUtils.d.ts +1 -1
  6. package/lib/components/EditorComponentTestUtils.d.ts.map +1 -1
  7. package/lib/components/EditorComponentTestUtils.js +23 -50
  8. package/lib/components/EditorComponentTestUtils.js.map +1 -1
  9. package/lib/components/EmbeddedQueryBuilder.d.ts +0 -1
  10. package/lib/components/EmbeddedQueryBuilder.d.ts.map +1 -1
  11. package/lib/components/LegendStudioApplication.d.ts +0 -1
  12. package/lib/components/LegendStudioApplication.d.ts.map +1 -1
  13. package/lib/components/editor/StatusBar.d.ts +0 -1
  14. package/lib/components/editor/StatusBar.d.ts.map +1 -1
  15. package/lib/components/editor/StatusBar.js +10 -3
  16. package/lib/components/editor/StatusBar.js.map +1 -1
  17. package/lib/components/editor/aux-panel/AuxiliaryPanel.d.ts +0 -1
  18. package/lib/components/editor/aux-panel/AuxiliaryPanel.d.ts.map +1 -1
  19. package/lib/components/editor/aux-panel/AuxiliaryPanel.js +11 -3
  20. package/lib/components/editor/aux-panel/AuxiliaryPanel.js.map +1 -1
  21. package/lib/components/editor/aux-panel/Console.d.ts +0 -1
  22. package/lib/components/editor/aux-panel/Console.d.ts.map +1 -1
  23. package/lib/components/editor/aux-panel/Console.js +2 -1
  24. package/lib/components/editor/aux-panel/Console.js.map +1 -1
  25. package/lib/components/editor/aux-panel/DevTool.d.ts +0 -1
  26. package/lib/components/editor/aux-panel/DevTool.d.ts.map +1 -1
  27. package/lib/components/editor/aux-panel/DevTool.js +4 -7
  28. package/lib/components/editor/aux-panel/DevTool.js.map +1 -1
  29. package/lib/components/editor/aux-panel/Problems.d.ts +19 -0
  30. package/lib/components/editor/aux-panel/Problems.d.ts.map +1 -0
  31. package/lib/components/editor/aux-panel/Problems.js +48 -0
  32. package/lib/components/editor/aux-panel/Problems.js.map +1 -0
  33. package/lib/components/editor/command-center/ProjectSearchCommand.d.ts +0 -1
  34. package/lib/components/editor/command-center/ProjectSearchCommand.d.ts.map +1 -1
  35. package/lib/components/editor/edit-panel/FileGenerationViewer.d.ts +0 -1
  36. package/lib/components/editor/edit-panel/FileGenerationViewer.d.ts.map +1 -1
  37. package/lib/components/editor/edit-panel/FunctionEditor.d.ts +0 -1
  38. package/lib/components/editor/edit-panel/FunctionEditor.d.ts.map +1 -1
  39. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts +0 -1
  40. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts.map +1 -1
  41. package/lib/components/editor/edit-panel/GrammarTextEditor.d.ts.map +1 -1
  42. package/lib/components/editor/edit-panel/GrammarTextEditor.js +36 -25
  43. package/lib/components/editor/edit-panel/GrammarTextEditor.js.map +1 -1
  44. package/lib/components/editor/edit-panel/ModelImporter.d.ts +0 -1
  45. package/lib/components/editor/edit-panel/ModelImporter.d.ts.map +1 -1
  46. package/lib/components/editor/edit-panel/RuntimeEditor.d.ts +0 -1
  47. package/lib/components/editor/edit-panel/RuntimeEditor.d.ts.map +1 -1
  48. package/lib/components/editor/edit-panel/UnsupportedElementEditor.d.ts +0 -1
  49. package/lib/components/editor/edit-panel/UnsupportedElementEditor.d.ts.map +1 -1
  50. package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts +0 -1
  51. package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts.map +1 -1
  52. package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.d.ts +0 -1
  53. package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.d.ts.map +1 -1
  54. package/lib/components/editor/edit-panel/connection-editor/FlatDataConnectionEditor.d.ts +0 -1
  55. package/lib/components/editor/edit-panel/connection-editor/FlatDataConnectionEditor.d.ts.map +1 -1
  56. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts +0 -1
  57. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts.map +1 -1
  58. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js +16 -16
  59. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
  60. package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts +0 -1
  61. package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts.map +1 -1
  62. package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js +4 -4
  63. package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js.map +1 -1
  64. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts +0 -1
  65. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts.map +1 -1
  66. package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.d.ts +0 -1
  67. package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.d.ts.map +1 -1
  68. package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.d.ts +0 -1
  69. package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.d.ts.map +1 -1
  70. package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js +20 -6
  71. package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js.map +1 -1
  72. package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.d.ts +0 -1
  73. package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.d.ts.map +1 -1
  74. package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts +0 -1
  75. package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts.map +1 -1
  76. package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.d.ts +0 -1
  77. package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.d.ts.map +1 -1
  78. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.d.ts +0 -1
  79. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.d.ts.map +1 -1
  80. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.d.ts +0 -1
  81. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.d.ts.map +1 -1
  82. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.d.ts +0 -1
  83. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.d.ts.map +1 -1
  84. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.d.ts +0 -1
  85. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.d.ts.map +1 -1
  86. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.d.ts +0 -1
  87. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.d.ts.map +1 -1
  88. package/lib/components/editor/edit-panel/mapping-editor/ClassMappingEditor.d.ts +0 -1
  89. package/lib/components/editor/edit-panel/mapping-editor/ClassMappingEditor.d.ts.map +1 -1
  90. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts +0 -1
  91. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -1
  92. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js +2 -2
  93. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -1
  94. package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.d.ts +0 -1
  95. package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.d.ts.map +1 -1
  96. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts +0 -1
  97. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts.map +1 -1
  98. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.d.ts +0 -1
  99. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.d.ts.map +1 -1
  100. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts +0 -1
  101. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts.map +1 -1
  102. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts +0 -1
  103. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts.map +1 -1
  104. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts +0 -1
  105. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts.map +1 -1
  106. package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.d.ts +0 -1
  107. package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.d.ts.map +1 -1
  108. package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.d.ts +0 -1
  109. package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.d.ts.map +1 -1
  110. package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.d.ts +0 -1
  111. package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.d.ts.map +1 -1
  112. package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.d.ts +0 -1
  113. package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.d.ts.map +1 -1
  114. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts +0 -1
  115. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts.map +1 -1
  116. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js +2 -2
  117. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -1
  118. package/lib/components/editor/edit-panel/service-editor/NewServiceModal.d.ts +0 -1
  119. package/lib/components/editor/edit-panel/service-editor/NewServiceModal.d.ts.map +1 -1
  120. package/lib/components/editor/edit-panel/service-editor/ServiceEditor.d.ts +0 -1
  121. package/lib/components/editor/edit-panel/service-editor/ServiceEditor.d.ts.map +1 -1
  122. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts +0 -1
  123. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts.map +1 -1
  124. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts +0 -1
  125. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts.map +1 -1
  126. package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.d.ts +0 -1
  127. package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.d.ts.map +1 -1
  128. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.d.ts +0 -1
  129. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.d.ts.map +1 -1
  130. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts +0 -1
  131. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts.map +1 -1
  132. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.d.ts +0 -1
  133. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.d.ts.map +1 -1
  134. package/lib/components/editor/edit-panel/testable/TestAssertionEditor.d.ts +0 -1
  135. package/lib/components/editor/edit-panel/testable/TestAssertionEditor.d.ts.map +1 -1
  136. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts +0 -1
  137. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts.map +1 -1
  138. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts +0 -1
  139. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts.map +1 -1
  140. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts +0 -1
  141. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts.map +1 -1
  142. package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.d.ts +0 -1
  143. package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.d.ts.map +1 -1
  144. package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.d.ts +0 -1
  145. package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.d.ts.map +1 -1
  146. package/lib/components/editor/edit-panel/uml-editor/UMLEditor.d.ts +0 -1
  147. package/lib/components/editor/edit-panel/uml-editor/UMLEditor.d.ts.map +1 -1
  148. package/lib/components/editor/side-bar/CreateNewElementModal.d.ts +0 -1
  149. package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
  150. package/lib/components/editor/side-bar/Explorer.d.ts +0 -1
  151. package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
  152. package/lib/components/editor/side-bar/Explorer.js +3 -3
  153. package/lib/components/editor/side-bar/Explorer.js.map +1 -1
  154. package/lib/components/editor/side-bar/LocalChanges.d.ts +0 -1
  155. package/lib/components/editor/side-bar/LocalChanges.d.ts.map +1 -1
  156. package/lib/components/editor/side-bar/ProjectOverview.d.ts +0 -1
  157. package/lib/components/editor/side-bar/ProjectOverview.d.ts.map +1 -1
  158. package/lib/components/editor/side-bar/ProjectOverview.js +3 -3
  159. package/lib/components/editor/side-bar/ProjectOverview.js.map +1 -1
  160. package/lib/components/editor/side-bar/SideBar.d.ts +0 -1
  161. package/lib/components/editor/side-bar/SideBar.d.ts.map +1 -1
  162. package/lib/components/editor/side-bar/WorkflowManager.d.ts +0 -1
  163. package/lib/components/editor/side-bar/WorkflowManager.d.ts.map +1 -1
  164. package/lib/components/editor/side-bar/WorkspaceReview.d.ts +0 -1
  165. package/lib/components/editor/side-bar/WorkspaceReview.d.ts.map +1 -1
  166. package/lib/components/editor/side-bar/WorkspaceSyncConflictResolver.d.ts +0 -1
  167. package/lib/components/editor/side-bar/WorkspaceSyncConflictResolver.d.ts.map +1 -1
  168. package/lib/components/editor/side-bar/WorkspaceUpdateConflictResolver.d.ts +0 -1
  169. package/lib/components/editor/side-bar/WorkspaceUpdateConflictResolver.d.ts.map +1 -1
  170. package/lib/components/editor/side-bar/WorkspaceUpdater.d.ts +0 -1
  171. package/lib/components/editor/side-bar/WorkspaceUpdater.d.ts.map +1 -1
  172. package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts +0 -1
  173. package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts.map +1 -1
  174. package/lib/components/shared/DiffView.d.ts +0 -1
  175. package/lib/components/shared/DiffView.d.ts.map +1 -1
  176. package/lib/components/shared/DiffView.js +2 -2
  177. package/lib/components/shared/DiffView.js.map +1 -1
  178. package/lib/components/workspace-review/WorkspaceReviewPanel.d.ts +0 -1
  179. package/lib/components/workspace-review/WorkspaceReviewPanel.d.ts.map +1 -1
  180. package/lib/components/workspace-review/WorkspaceReviewSideBar.d.ts +0 -1
  181. package/lib/components/workspace-review/WorkspaceReviewSideBar.d.ts.map +1 -1
  182. package/lib/components/workspace-setup/CreateProjectModal.d.ts +0 -1
  183. package/lib/components/workspace-setup/CreateProjectModal.d.ts.map +1 -1
  184. package/lib/components/workspace-setup/CreateWorkspaceModal.d.ts +0 -1
  185. package/lib/components/workspace-setup/CreateWorkspaceModal.d.ts.map +1 -1
  186. package/lib/index.css +2 -2
  187. package/lib/index.css.map +1 -1
  188. package/lib/package.json +6 -6
  189. package/lib/stores/ChangeDetectionState.d.ts +2 -0
  190. package/lib/stores/ChangeDetectionState.d.ts.map +1 -1
  191. package/lib/stores/ChangeDetectionState.js +12 -6
  192. package/lib/stores/ChangeDetectionState.js.map +1 -1
  193. package/lib/stores/EditorConfig.d.ts +2 -1
  194. package/lib/stores/EditorConfig.d.ts.map +1 -1
  195. package/lib/stores/EditorConfig.js +1 -0
  196. package/lib/stores/EditorConfig.js.map +1 -1
  197. package/lib/stores/EditorGraphState.d.ts +17 -16
  198. package/lib/stores/EditorGraphState.d.ts.map +1 -1
  199. package/lib/stores/EditorGraphState.js +152 -94
  200. package/lib/stores/EditorGraphState.js.map +1 -1
  201. package/lib/stores/EditorSDLCState.d.ts +6 -6
  202. package/lib/stores/EditorSDLCState.d.ts.map +1 -1
  203. package/lib/stores/EditorSDLCState.js +52 -27
  204. package/lib/stores/EditorSDLCState.js.map +1 -1
  205. package/lib/stores/EditorStore.js +1 -1
  206. package/lib/stores/EditorStore.js.map +1 -1
  207. package/lib/stores/EmbeddedQueryBuilderState.js +1 -1
  208. package/lib/stores/EmbeddedQueryBuilderState.js.map +1 -1
  209. package/lib/stores/editor/NewElementState.d.ts.map +1 -1
  210. package/lib/stores/editor/NewElementState.js +14 -5
  211. package/lib/stores/editor/NewElementState.js.map +1 -1
  212. package/lib/stores/editor/StandardEditorMode.d.ts.map +1 -1
  213. package/lib/stores/editor/StandardEditorMode.js +2 -2
  214. package/lib/stores/editor/StandardEditorMode.js.map +1 -1
  215. package/lib/stores/editor-state/FileGenerationState.d.ts +3 -3
  216. package/lib/stores/editor-state/FileGenerationState.d.ts.map +1 -1
  217. package/lib/stores/editor-state/FileGenerationState.js +9 -5
  218. package/lib/stores/editor-state/FileGenerationState.js.map +1 -1
  219. package/lib/stores/editor-state/GrammarTextEditorState.d.ts +6 -4
  220. package/lib/stores/editor-state/GrammarTextEditorState.d.ts.map +1 -1
  221. package/lib/stores/editor-state/GrammarTextEditorState.js +14 -8
  222. package/lib/stores/editor-state/GrammarTextEditorState.js.map +1 -1
  223. package/lib/stores/editor-state/element-editor-state/ClassEditorState.d.ts +0 -1
  224. package/lib/stores/editor-state/element-editor-state/ClassEditorState.d.ts.map +1 -1
  225. package/lib/stores/editor-state/element-editor-state/ClassEditorState.js +0 -5
  226. package/lib/stores/editor-state/element-editor-state/ClassEditorState.js.map +1 -1
  227. package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts +0 -1
  228. package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
  229. package/lib/stores/editor-state/element-editor-state/ElementEditorState.js +0 -3
  230. package/lib/stores/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
  231. package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.d.ts +2 -2
  232. package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.d.ts.map +1 -1
  233. package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.js +5 -4
  234. package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.js.map +1 -1
  235. package/lib/stores/editor-state/element-editor-state/FunctionEditorState.d.ts +0 -1
  236. package/lib/stores/editor-state/element-editor-state/FunctionEditorState.d.ts.map +1 -1
  237. package/lib/stores/editor-state/element-editor-state/FunctionEditorState.js +0 -4
  238. package/lib/stores/editor-state/element-editor-state/FunctionEditorState.js.map +1 -1
  239. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.d.ts +0 -1
  240. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.d.ts.map +1 -1
  241. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js +0 -6
  242. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js.map +1 -1
  243. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts +6 -6
  244. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts.map +1 -1
  245. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js +24 -14
  246. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
  247. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.d.ts +6 -6
  248. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.d.ts.map +1 -1
  249. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js +30 -15
  250. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js.map +1 -1
  251. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
  252. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +1 -1
  253. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
  254. package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts +4 -4
  255. package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts.map +1 -1
  256. package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js +54 -44
  257. package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js.map +1 -1
  258. package/lib/stores/project-viewer/ProjectViewerStore.d.ts.map +1 -1
  259. package/lib/stores/project-viewer/ProjectViewerStore.js +1 -1
  260. package/lib/stores/project-viewer/ProjectViewerStore.js.map +1 -1
  261. package/lib/stores/sidebar-state/LocalChangesState.d.ts +13 -13
  262. package/lib/stores/sidebar-state/LocalChangesState.d.ts.map +1 -1
  263. package/lib/stores/sidebar-state/LocalChangesState.js +71 -63
  264. package/lib/stores/sidebar-state/LocalChangesState.js.map +1 -1
  265. package/lib/stores/sidebar-state/ProjectOverviewState.d.ts.map +1 -1
  266. package/lib/stores/sidebar-state/ProjectOverviewState.js +19 -4
  267. package/lib/stores/sidebar-state/ProjectOverviewState.js.map +1 -1
  268. package/lib/stores/sidebar-state/WorkflowManagerState.d.ts +8 -8
  269. package/lib/stores/sidebar-state/WorkflowManagerState.d.ts.map +1 -1
  270. package/lib/stores/sidebar-state/WorkflowManagerState.js +15 -11
  271. package/lib/stores/sidebar-state/WorkflowManagerState.js.map +1 -1
  272. package/lib/stores/sidebar-state/WorkspaceReviewState.d.ts +3 -3
  273. package/lib/stores/sidebar-state/WorkspaceReviewState.d.ts.map +1 -1
  274. package/lib/stores/sidebar-state/WorkspaceReviewState.js +21 -6
  275. package/lib/stores/sidebar-state/WorkspaceReviewState.js.map +1 -1
  276. package/lib/stores/sidebar-state/WorkspaceSyncState.d.ts +2 -2
  277. package/lib/stores/sidebar-state/WorkspaceSyncState.d.ts.map +1 -1
  278. package/lib/stores/sidebar-state/WorkspaceSyncState.js +9 -7
  279. package/lib/stores/sidebar-state/WorkspaceSyncState.js.map +1 -1
  280. package/lib/stores/sidebar-state/WorkspaceUpdaterState.d.ts +2 -2
  281. package/lib/stores/sidebar-state/WorkspaceUpdaterState.d.ts.map +1 -1
  282. package/lib/stores/sidebar-state/WorkspaceUpdaterState.js +8 -4
  283. package/lib/stores/sidebar-state/WorkspaceUpdaterState.js.map +1 -1
  284. package/lib/stores/workspace-review/WorkspaceReviewStore.d.ts +2 -2
  285. package/lib/stores/workspace-review/WorkspaceReviewStore.d.ts.map +1 -1
  286. package/lib/stores/workspace-review/WorkspaceReviewStore.js +27 -10
  287. package/lib/stores/workspace-review/WorkspaceReviewStore.js.map +1 -1
  288. package/package.json +15 -15
  289. package/src/application/LegendStudioApplicationConfig.ts +7 -0
  290. package/src/components/EditorComponentTestUtils.tsx +64 -60
  291. package/src/components/editor/StatusBar.tsx +38 -3
  292. package/src/components/editor/aux-panel/AuxiliaryPanel.tsx +32 -10
  293. package/src/components/editor/aux-panel/Console.tsx +4 -3
  294. package/src/components/editor/aux-panel/DevTool.tsx +47 -79
  295. package/src/components/editor/aux-panel/Problems.tsx +103 -0
  296. package/src/components/editor/edit-panel/GrammarTextEditor.tsx +48 -36
  297. package/src/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.tsx +61 -61
  298. package/src/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.tsx +21 -25
  299. package/src/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.tsx +23 -23
  300. package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +2 -1
  301. package/src/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.tsx +19 -22
  302. package/src/components/editor/side-bar/Explorer.tsx +5 -3
  303. package/src/components/editor/side-bar/ProjectOverview.tsx +5 -3
  304. package/src/components/shared/DiffView.tsx +2 -2
  305. package/src/stores/ChangeDetectionState.ts +17 -8
  306. package/src/stores/EditorConfig.ts +1 -0
  307. package/src/stores/EditorGraphState.ts +223 -136
  308. package/src/stores/EditorSDLCState.ts +65 -30
  309. package/src/stores/EditorStore.ts +1 -1
  310. package/src/stores/EmbeddedQueryBuilderState.ts +1 -1
  311. package/src/stores/editor/NewElementState.ts +24 -5
  312. package/src/stores/editor/StandardEditorMode.ts +4 -2
  313. package/src/stores/editor-state/FileGenerationState.ts +19 -8
  314. package/src/stores/editor-state/GrammarTextEditorState.ts +18 -10
  315. package/src/stores/editor-state/element-editor-state/ClassEditorState.ts +0 -12
  316. package/src/stores/editor-state/element-editor-state/ElementEditorState.ts +0 -4
  317. package/src/stores/editor-state/element-editor-state/ElementFileGenerationState.ts +8 -6
  318. package/src/stores/editor-state/element-editor-state/FunctionEditorState.ts +0 -5
  319. package/src/stores/editor-state/element-editor-state/mapping/MappingEditorState.ts +0 -11
  320. package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +29 -15
  321. package/src/stores/editor-state/element-editor-state/mapping/MappingTestState.ts +37 -23
  322. package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +4 -3
  323. package/src/stores/editor-state/element-editor-state/service/ServiceRegistrationState.ts +63 -48
  324. package/src/stores/project-viewer/ProjectViewerStore.ts +5 -3
  325. package/src/stores/sidebar-state/LocalChangesState.ts +130 -115
  326. package/src/stores/sidebar-state/ProjectOverviewState.ts +19 -4
  327. package/src/stores/sidebar-state/WorkflowManagerState.ts +28 -31
  328. package/src/stores/sidebar-state/WorkspaceReviewState.ts +24 -8
  329. package/src/stores/sidebar-state/WorkspaceSyncState.ts +11 -16
  330. package/src/stores/sidebar-state/WorkspaceUpdaterState.ts +11 -7
  331. package/src/stores/workspace-review/WorkspaceReviewStore.ts +39 -12
  332. package/tsconfig.json +1 -0
@@ -14,7 +14,14 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { action, computed, flowResult, makeAutoObservable } from 'mobx';
17
+ import {
18
+ action,
19
+ computed,
20
+ flow,
21
+ flowResult,
22
+ makeObservable,
23
+ observable,
24
+ } from 'mobx';
18
25
  import { CHANGE_DETECTION_EVENT } from './ChangeDetectionEvent.js';
19
26
  import { GRAPH_EDITOR_MODE, AUX_PANEL_MODE } from './EditorConfig.js';
20
27
  import {
@@ -52,7 +59,6 @@ import {
52
59
  ProjectDependencyInfo,
53
60
  } from '@finos/legend-server-depot';
54
61
  import {
55
- type PackageableElement,
56
62
  GRAPH_MANAGER_EVENT,
57
63
  CompilationError,
58
64
  EngineError,
@@ -78,9 +84,13 @@ import {
78
84
  DependencyGraphBuilderError,
79
85
  GraphDataDeserializationError,
80
86
  GraphBuilderError,
81
- type GraphBuilderReport,
82
87
  GraphManagerTelemetry,
83
88
  DataElement,
89
+ type PackageableElement,
90
+ type GraphBuilderReport,
91
+ type CompilationWarning,
92
+ type TextCompilationResult,
93
+ type CompilationResult,
84
94
  } from '@finos/legend-graph';
85
95
  import {
86
96
  ActionAlertActionType,
@@ -94,7 +104,6 @@ import { graph_dispose } from './shared/modifier/GraphModifierHelper.js';
94
104
  import { PACKAGEABLE_ELEMENT_TYPE } from './shared/ModelClassifierUtils.js';
95
105
  import { GlobalTestRunnerState } from './sidebar-state/testable/GlobalTestRunnerState.js';
96
106
  import { LEGEND_STUDIO_APP_EVENT } from './LegendStudioAppEvent.js';
97
- import type { LambdaEditorState } from '@finos/legend-query-builder';
98
107
 
99
108
  export enum GraphBuilderStatus {
100
109
  SUCCEEDED = 'SUCCEEDED',
@@ -115,9 +124,12 @@ export interface GraphBuilderResult {
115
124
  error?: Error;
116
125
  }
117
126
 
127
+ export type Problem = CompilationWarning | EngineError;
128
+
118
129
  export class EditorGraphState {
119
- editorStore: EditorStore;
120
- graphGenerationState: GraphGenerationState;
130
+ readonly editorStore: EditorStore;
131
+ readonly graphGenerationState: GraphGenerationState;
132
+
121
133
  isInitializingGraph = false;
122
134
  isRunningGlobalCompile = false;
123
135
  isRunningGlobalGenerate = false;
@@ -125,33 +137,64 @@ export class EditorGraphState {
125
137
  isUpdatingGraph = false; // critical synchronous update to refresh the graph
126
138
  isUpdatingApplication = false; // including graph update and async operations such as change detection
127
139
 
140
+ warnings: CompilationWarning[] = [];
141
+ error: EngineError | undefined;
142
+ private mostRecentTextModeCompilationGraphHash: string | undefined;
143
+ private mostRecentFormModeCompilationGraphHash: string | undefined;
144
+
145
+ enableStrictMode = false;
146
+
128
147
  constructor(editorStore: EditorStore) {
129
- makeAutoObservable(this, {
130
- editorStore: false,
131
- graphGenerationState: false,
132
- getPackageableElementType: false,
133
- hasCompilationError: computed,
134
- clearCompilationError: action,
148
+ makeObservable<
149
+ EditorGraphState,
150
+ | 'updateGraphAndApplication'
151
+ | 'mostRecentFormModeCompilationGraphHash'
152
+ | 'mostRecentTextModeCompilationGraphHash'
153
+ >(this, {
154
+ isInitializingGraph: observable,
155
+ isRunningGlobalCompile: observable,
156
+ isRunningGlobalGenerate: observable,
157
+ isApplicationLeavingTextMode: observable,
158
+ isUpdatingGraph: observable,
159
+ isUpdatingApplication: observable,
160
+ warnings: observable,
161
+ error: observable,
162
+ mostRecentFormModeCompilationGraphHash: observable,
163
+ mostRecentTextModeCompilationGraphHash: observable,
164
+ enableStrictMode: observable,
165
+ problems: computed,
166
+ areProblemsStale: computed,
167
+ isApplicationUpdateOperationIsRunning: computed,
168
+ clearProblems: action,
169
+ setEnableStrictMode: action,
170
+ buildGraph: flow,
171
+ loadEntityChangesToGraph: flow,
172
+ globalCompileInFormMode: flow,
173
+ globalCompileInTextMode: flow,
174
+ leaveTextMode: flow,
175
+ updateGraphAndApplication: flow,
176
+ updateGenerationGraphAndApplication: flow,
135
177
  });
136
178
 
137
179
  this.editorStore = editorStore;
138
180
  this.graphGenerationState = new GraphGenerationState(this.editorStore);
181
+ this.enableStrictMode =
182
+ editorStore.applicationStore.config.options.enableGraphBuilderStrictMode;
139
183
  }
140
184
 
141
- get hasCompilationError(): boolean {
142
- return (
143
- Boolean(this.editorStore.grammarTextEditorState.error) ||
144
- this.editorStore.openedEditorStates
145
- .filter(filterByType(ElementEditorState))
146
- .some((editorState) => editorState.hasCompilationError)
147
- );
185
+ get problems(): Problem[] {
186
+ return [this.error, ...this.warnings].filter(isNonNullable);
148
187
  }
149
188
 
150
- clearCompilationError(): void {
151
- this.editorStore.grammarTextEditorState.setError(undefined);
152
- this.editorStore.openedEditorStates
153
- .filter(filterByType(ElementEditorState))
154
- .forEach((editorState) => editorState.clearCompilationError());
189
+ get areProblemsStale(): boolean {
190
+ return (
191
+ (this.editorStore.isInFormMode &&
192
+ this.mostRecentFormModeCompilationGraphHash !==
193
+ this.editorStore.changeDetectionState.currentGraphHash) ||
194
+ (this.editorStore.isInGrammarTextMode &&
195
+ this.mostRecentTextModeCompilationGraphHash !==
196
+ this.editorStore.grammarTextEditorState.currentTextGraphHash)
197
+ );
155
198
  }
156
199
 
157
200
  get isApplicationUpdateOperationIsRunning(): boolean {
@@ -198,6 +241,64 @@ export class EditorGraphState {
198
241
  return false;
199
242
  }
200
243
 
244
+ /**
245
+ * Get entitiy changes to prepare for syncing
246
+ */
247
+ computeLocalEntityChanges(): EntityChange[] {
248
+ const baseHashesIndex = this.editorStore.isInConflictResolutionMode
249
+ ? this.editorStore.changeDetectionState
250
+ .conflictResolutionHeadRevisionState.entityHashesIndex
251
+ : this.editorStore.changeDetectionState.workspaceLocalLatestRevisionState
252
+ .entityHashesIndex;
253
+ const originalPaths = new Set(Array.from(baseHashesIndex.keys()));
254
+ const entityChanges: EntityChange[] = [];
255
+ this.editorStore.graphManagerState.graph.allOwnElements.forEach(
256
+ (element) => {
257
+ const elementPath = element.path;
258
+ if (baseHashesIndex.get(elementPath) !== element.hashCode) {
259
+ const entity =
260
+ this.editorStore.graphManagerState.graphManager.elementToEntity(
261
+ element,
262
+ {
263
+ pruneSourceInformation: true,
264
+ },
265
+ );
266
+ entityChanges.push({
267
+ classifierPath: entity.classifierPath,
268
+ entityPath: element.path,
269
+ content: entity.content,
270
+ type:
271
+ baseHashesIndex.get(elementPath) !== undefined
272
+ ? EntityChangeType.MODIFY
273
+ : EntityChangeType.CREATE,
274
+ });
275
+ }
276
+ originalPaths.delete(elementPath);
277
+ },
278
+ );
279
+ Array.from(originalPaths).forEach((path) => {
280
+ entityChanges.push({
281
+ type: EntityChangeType.DELETE,
282
+ entityPath: path,
283
+ });
284
+ });
285
+ return entityChanges;
286
+ }
287
+
288
+ clearProblems(): void {
289
+ this.error = undefined;
290
+ this.editorStore.openedEditorStates
291
+ .filter(filterByType(ElementEditorState))
292
+ .forEach((editorState) => editorState.clearCompilationError());
293
+ this.mostRecentFormModeCompilationGraphHash = undefined;
294
+ this.mostRecentTextModeCompilationGraphHash = undefined;
295
+ this.warnings = [];
296
+ }
297
+
298
+ setEnableStrictMode(val: boolean): void {
299
+ this.enableStrictMode = val;
300
+ }
301
+
201
302
  *buildGraph(entities: Entity[]): GeneratorFn<GraphBuilderResult> {
202
303
  try {
203
304
  this.isInitializingGraph = true;
@@ -242,6 +343,7 @@ export class EditorGraphState {
242
343
  TEMPORARY__preserveSectionIndex:
243
344
  this.editorStore.applicationStore.config.options
244
345
  .TEMPORARY__preserveSectionIndex,
346
+ strict: this.enableStrictMode,
245
347
  },
246
348
  )) as GraphBuilderReport;
247
349
 
@@ -380,50 +482,6 @@ export class EditorGraphState {
380
482
  this.editorStore.openState(this.editorStore.modelImporterState);
381
483
  }
382
484
 
383
- /**
384
- * Get entitiy changes to prepare for syncing
385
- */
386
- computeLocalEntityChanges(): EntityChange[] {
387
- const baseHashesIndex = this.editorStore.isInConflictResolutionMode
388
- ? this.editorStore.changeDetectionState
389
- .conflictResolutionHeadRevisionState.entityHashesIndex
390
- : this.editorStore.changeDetectionState.workspaceLocalLatestRevisionState
391
- .entityHashesIndex;
392
- const originalPaths = new Set(Array.from(baseHashesIndex.keys()));
393
- const entityChanges: EntityChange[] = [];
394
- this.editorStore.graphManagerState.graph.allOwnElements.forEach(
395
- (element) => {
396
- const elementPath = element.path;
397
- if (baseHashesIndex.get(elementPath) !== element.hashCode) {
398
- const entity =
399
- this.editorStore.graphManagerState.graphManager.elementToEntity(
400
- element,
401
- {
402
- pruneSourceInformation: true,
403
- },
404
- );
405
- entityChanges.push({
406
- classifierPath: entity.classifierPath,
407
- entityPath: element.path,
408
- content: entity.content,
409
- type:
410
- baseHashesIndex.get(elementPath) !== undefined
411
- ? EntityChangeType.MODIFY
412
- : EntityChangeType.CREATE,
413
- });
414
- }
415
- originalPaths.delete(elementPath);
416
- },
417
- );
418
- Array.from(originalPaths).forEach((path) => {
419
- entityChanges.push({
420
- type: EntityChangeType.DELETE,
421
- entityPath: path,
422
- });
423
- });
424
- return entityChanges;
425
- }
426
-
427
485
  /**
428
486
  * Loads entity changes to graph and updates application.
429
487
  */
@@ -454,8 +512,8 @@ export class EditorGraphState {
454
512
  }
455
513
 
456
514
  // TODO: when we support showing multiple notifications, we can take this options out as the only users of this
457
- // is delete element flow, where we want to say `re-compiling graph after deletion`, but because compilation
458
- // sometimes is so fast, the message flashes, so we want to combine with the message in this method
515
+ // is delete element flow, where we want to say `re-compiling graph after deletion`, but because sometimes, compilation
516
+ // is so fast, the message flashes, so we want to combine with the message in this method
459
517
  *globalCompileInFormMode(options?: {
460
518
  message?: string;
461
519
  disableNotificationOnSuccess?: boolean;
@@ -465,30 +523,50 @@ export class EditorGraphState {
465
523
  this.editorStore.isInFormMode,
466
524
  'Editor must be in form mode to call this method',
467
525
  );
526
+
468
527
  if (this.checkIfApplicationUpdateOperationIsRunning()) {
469
528
  return FormModeCompilationOutcome.SKIPPED;
470
529
  }
471
- this.isRunningGlobalCompile = true;
530
+
531
+ const currentGraphHash =
532
+ this.editorStore.changeDetectionState.currentGraphHash;
533
+
472
534
  try {
473
- this.clearCompilationError();
535
+ this.isRunningGlobalCompile = true;
536
+ this.clearProblems();
474
537
  if (options?.openConsole) {
475
538
  this.editorStore.setActiveAuxPanelMode(AUX_PANEL_MODE.CONSOLE);
476
539
  }
540
+
477
541
  // NOTE: here we always keep the source information while compiling in form mode
478
542
  // so that the form parts where the user interacted with (i.e. where the lamdbas source
479
543
  // information are populated), can reveal compilation error. If compilation errors
480
544
  // show up in other parts, the user will get redirected to text-mode
481
- yield this.editorStore.graphManagerState.graphManager.compileGraph(
482
- this.editorStore.graphManagerState.graph,
483
- {
484
- keepSourceInformation: true,
485
- },
486
- );
545
+ const compilationResult =
546
+ (yield this.editorStore.graphManagerState.graphManager.compileGraph(
547
+ this.editorStore.graphManagerState.graph,
548
+ {
549
+ keepSourceInformation: true,
550
+ },
551
+ )) as CompilationResult;
552
+
553
+ this.warnings = compilationResult.warnings ?? [];
554
+ this.mostRecentFormModeCompilationGraphHash = currentGraphHash;
555
+
487
556
  if (!options?.disableNotificationOnSuccess) {
488
- this.editorStore.applicationStore.notifySuccess(
489
- 'Compiled successfully',
490
- );
557
+ if (this.warnings.length) {
558
+ this.editorStore.applicationStore.notifyWarning(
559
+ `Compilation suceeded with warnings`,
560
+ );
561
+ } else {
562
+ if (!options?.disableNotificationOnSuccess) {
563
+ this.editorStore.applicationStore.notifySuccess(
564
+ 'Compiled successfully',
565
+ );
566
+ }
567
+ }
491
568
  }
569
+
492
570
  return FormModeCompilationOutcome.SUCCEEDED;
493
571
  } catch (error) {
494
572
  assertErrorThrown(error);
@@ -499,6 +577,7 @@ export class EditorGraphState {
499
577
  LogEvent.create(GRAPH_MANAGER_EVENT.COMPILATION_FAILURE),
500
578
  error,
501
579
  );
580
+ this.mostRecentFormModeCompilationGraphHash = currentGraphHash;
502
581
  let fallbackToTextModeForDebugging = true;
503
582
  // if compilation failed, we try to reveal the error in form mode,
504
583
  // if even this fail, we will fall back to show it in text mode
@@ -560,6 +639,7 @@ export class EditorGraphState {
560
639
  );
561
640
  return FormModeCompilationOutcome.FAILED_AND_FALLBACK_TO_TEXT_MODE;
562
641
  } else {
642
+ this.error = error;
563
643
  this.editorStore.applicationStore.notifyWarning(
564
644
  `Compilation failed: ${error.message}`,
565
645
  );
@@ -582,41 +662,61 @@ export class EditorGraphState {
582
662
  this.editorStore.isInGrammarTextMode,
583
663
  'Editor must be in text mode to call this method',
584
664
  );
665
+
585
666
  if (
586
667
  !options?.ignoreBlocking &&
587
668
  this.checkIfApplicationUpdateOperationIsRunning()
588
669
  ) {
589
670
  return;
590
671
  }
672
+
673
+ const currentGraphHash =
674
+ this.editorStore.grammarTextEditorState.currentTextGraphHash;
675
+
591
676
  try {
592
677
  this.isRunningGlobalCompile = true;
593
- this.clearCompilationError();
678
+ this.clearProblems();
594
679
  if (options?.openConsole) {
595
680
  this.editorStore.setActiveAuxPanelMode(AUX_PANEL_MODE.CONSOLE);
596
681
  }
597
- const entities =
682
+
683
+ const compilationResult =
598
684
  (yield this.editorStore.graphManagerState.graphManager.compileText(
599
685
  this.editorStore.grammarTextEditorState.graphGrammarText,
600
686
  this.editorStore.graphManagerState.graph,
601
- )) as Entity[];
687
+ )) as TextCompilationResult;
688
+
689
+ const entities = compilationResult.entities;
690
+ this.mostRecentTextModeCompilationGraphHash = currentGraphHash;
691
+ this.warnings = compilationResult.warnings ?? [];
602
692
 
603
693
  if (!options?.disableNotificationOnSuccess) {
604
- this.editorStore.applicationStore.notifySuccess(
605
- 'Compiled successfully',
606
- );
694
+ if (this.warnings.length) {
695
+ this.editorStore.applicationStore.notifyWarning(
696
+ `Compilation suceeded with warnings`,
697
+ );
698
+ } else {
699
+ if (!options?.disableNotificationOnSuccess) {
700
+ this.editorStore.applicationStore.notifySuccess(
701
+ 'Compiled successfully',
702
+ );
703
+ }
704
+ }
607
705
  }
608
706
 
609
707
  yield flowResult(this.updateGraphAndApplication(entities));
610
708
  } catch (error) {
611
709
  assertErrorThrown(error);
710
+ this.mostRecentTextModeCompilationGraphHash = currentGraphHash;
612
711
  if (error instanceof EngineError) {
613
- this.editorStore.grammarTextEditorState.setError(error);
712
+ this.error = error;
713
+ if (error.sourceInformation) {
714
+ this.editorStore.grammarTextEditorState.setForcedCursorPosition({
715
+ lineNumber: error.sourceInformation.startLine,
716
+ column: error.sourceInformation.startColumn,
717
+ });
718
+ }
614
719
  }
615
- this.editorStore.applicationStore.log.error(
616
- LogEvent.create(GRAPH_MANAGER_EVENT.COMPILATION_FAILURE),
617
- 'Compilation failed:',
618
- error,
619
- );
620
720
  if (
621
721
  !this.editorStore.applicationStore.notification ||
622
722
  !options?.suppressCompilationFailureMessage
@@ -640,13 +740,13 @@ export class EditorGraphState {
640
740
  }
641
741
  try {
642
742
  this.isApplicationLeavingTextMode = true;
643
- this.clearCompilationError();
743
+ this.clearProblems();
644
744
  this.editorStore.applicationStore.setBlockingAlert({
645
745
  message: 'Compiling graph before leaving text mode...',
646
746
  showLoading: true,
647
747
  });
648
748
  try {
649
- const entities =
749
+ const compilationResult =
650
750
  (yield this.editorStore.graphManagerState.graphManager.compileText(
651
751
  this.editorStore.grammarTextEditorState.graphGrammarText,
652
752
  this.editorStore.graphManagerState.graph,
@@ -657,12 +757,18 @@ export class EditorGraphState {
657
757
  onError: () =>
658
758
  this.editorStore.applicationStore.setBlockingAlert(undefined),
659
759
  },
660
- )) as Entity[];
760
+ )) as TextCompilationResult;
761
+
762
+ this.warnings = compilationResult.warnings ?? [];
661
763
  this.editorStore.applicationStore.setBlockingAlert({
662
764
  message: 'Leaving text mode and rebuilding graph...',
663
765
  showLoading: true,
664
766
  });
665
- yield flowResult(this.updateGraphAndApplication(entities));
767
+ yield flowResult(
768
+ this.updateGraphAndApplication(compilationResult.entities),
769
+ );
770
+ this.mostRecentFormModeCompilationGraphHash =
771
+ this.editorStore.changeDetectionState.getCurrentGraphHash();
666
772
  this.editorStore.grammarTextEditorState.setGraphGrammarText('');
667
773
  this.editorStore.grammarTextEditorState.resetCurrentElementLabelRegexString();
668
774
  this.editorStore.setGraphEditMode(GRAPH_EDITOR_MODE.FORM);
@@ -671,8 +777,13 @@ export class EditorGraphState {
671
777
  }
672
778
  } catch (error) {
673
779
  assertErrorThrown(error);
674
- if (error instanceof EngineError) {
675
- this.editorStore.grammarTextEditorState.setError(error);
780
+ this.mostRecentFormModeCompilationGraphHash =
781
+ this.editorStore.changeDetectionState.getCurrentGraphHash();
782
+ if (error instanceof EngineError && error.sourceInformation) {
783
+ this.editorStore.grammarTextEditorState.setForcedCursorPosition({
784
+ lineNumber: error.sourceInformation.startLine,
785
+ column: error.sourceInformation.startColumn,
786
+ });
676
787
  }
677
788
  this.editorStore.applicationStore.log.error(
678
789
  LogEvent.create(GRAPH_MANAGER_EVENT.COMPILATION_FAILURE),
@@ -721,30 +832,6 @@ export class EditorGraphState {
721
832
  }
722
833
  }
723
834
 
724
- /**
725
- * This function is used in lambda editor in form mode when user try to do an action that involves the lambda being edited, it takes an action
726
- * and proceeds with a parsing check for the current lambda before executing the action. This prevents case where user quickly type something
727
- * that does not parse and hit compile or generate right away.
728
- */
729
- *checkLambdaParsingError(
730
- lambdaHolderElement: LambdaEditorState,
731
- checkParsingError: boolean,
732
- onSuccess: () => Promise<void>,
733
- ): GeneratorFn<void> {
734
- this.clearCompilationError();
735
- lambdaHolderElement.clearErrors();
736
- if (checkParsingError) {
737
- yield flowResult(
738
- lambdaHolderElement.convertLambdaGrammarStringToObject(),
739
- );
740
- // abort action if parser error occurred
741
- if (lambdaHolderElement.parserError) {
742
- return;
743
- }
744
- }
745
- yield onSuccess();
746
- }
747
-
748
835
  /**
749
836
  * NOTE: IMPORTANT! This method is both a savior and a sinner. It helps reprocessing the graph state to use a new graph
750
837
  * built from the new model context data, it resets the graph properly. The bane here is that resetting the graph properly is
@@ -856,6 +943,7 @@ export class EditorGraphState {
856
943
  TEMPORARY__preserveSectionIndex:
857
944
  this.editorStore.applicationStore.config.options
858
945
  .TEMPORARY__preserveSectionIndex,
946
+ strict: this.enableStrictMode,
859
947
  },
860
948
  );
861
949
 
@@ -1023,28 +1111,27 @@ export class EditorGraphState {
1023
1111
  }
1024
1112
  }
1025
1113
 
1026
- *getIndexedDependencyEntities(): GeneratorFn<Map<string, Entity[]>> {
1114
+ async getIndexedDependencyEntities(): Promise<Map<string, Entity[]>> {
1027
1115
  const dependencyEntitiesIndex = new Map<string, Entity[]>();
1028
1116
  const currentConfiguration =
1029
1117
  this.editorStore.projectConfigurationEditorState
1030
1118
  .currentProjectConfiguration;
1031
1119
  try {
1032
1120
  if (currentConfiguration.projectDependencies.length) {
1033
- const dependencyCoordinates = (yield flowResult(
1034
- this.buildProjectDependencyCoordinates(
1121
+ const dependencyCoordinates =
1122
+ await this.buildProjectDependencyCoordinates(
1035
1123
  currentConfiguration.projectDependencies,
1036
- ),
1037
- )) as ProjectDependencyCoordinates[];
1124
+ );
1038
1125
  // NOTE: if A@v1 is transitive dependencies of 2 or more
1039
1126
  // direct dependencies, metadata server will take care of deduplication
1040
1127
  const dependencyEntitiesJson =
1041
- (yield this.editorStore.depotServerClient.collectDependencyEntities(
1128
+ await this.editorStore.depotServerClient.collectDependencyEntities(
1042
1129
  dependencyCoordinates.map((e) =>
1043
1130
  ProjectDependencyCoordinates.serialization.toJson(e),
1044
1131
  ),
1045
1132
  true,
1046
1133
  true,
1047
- )) as PlainObject<ProjectVersionEntities>[];
1134
+ );
1048
1135
  const dependencyEntities = dependencyEntitiesJson.map((e) =>
1049
1136
  ProjectVersionEntities.serialization.fromJson(e),
1050
1137
  );
@@ -1080,11 +1167,11 @@ export class EditorGraphState {
1080
1167
  let dependencyInfo: ProjectDependencyInfo | undefined;
1081
1168
  try {
1082
1169
  const dependencyTree =
1083
- (yield this.editorStore.depotServerClient.analyzeDependencyTree(
1170
+ await this.editorStore.depotServerClient.analyzeDependencyTree(
1084
1171
  dependencyCoordinates.map((e) =>
1085
1172
  ProjectDependencyCoordinates.serialization.toJson(e),
1086
1173
  ),
1087
- )) as PlainObject<ProjectVersionEntities>;
1174
+ );
1088
1175
  dependencyInfo =
1089
1176
  ProjectDependencyInfo.serialization.fromJson(dependencyTree);
1090
1177
  } catch (error) {
@@ -1130,10 +1217,10 @@ export class EditorGraphState {
1130
1217
  return dependencyEntitiesIndex;
1131
1218
  }
1132
1219
 
1133
- *buildProjectDependencyCoordinates(
1220
+ async buildProjectDependencyCoordinates(
1134
1221
  projectDependencies: ProjectDependency[],
1135
- ): GeneratorFn<ProjectDependencyCoordinates[]> {
1136
- return (yield Promise.all(
1222
+ ): Promise<ProjectDependencyCoordinates[]> {
1223
+ return Promise.all(
1137
1224
  projectDependencies.map((dep) => {
1138
1225
  // legacyDependencies
1139
1226
  // We do this for backward compatible reasons as we expect current dependency ids to be in the format of {groupId}:{artifactId}.
@@ -1178,7 +1265,7 @@ export class EditorGraphState {
1178
1265
  );
1179
1266
  }
1180
1267
  }),
1181
- )) as ProjectDependencyCoordinates[];
1268
+ );
1182
1269
  }
1183
1270
 
1184
1271
  // -------------------------------------------------- UTILITIES -----------------------------------------------------