@finos/legend-application-studio 19.0.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 (340) 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/FunctionEditor.js +31 -5
  40. package/lib/components/editor/edit-panel/FunctionEditor.js.map +1 -1
  41. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts +0 -1
  42. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts.map +1 -1
  43. package/lib/components/editor/edit-panel/GrammarTextEditor.d.ts.map +1 -1
  44. package/lib/components/editor/edit-panel/GrammarTextEditor.js +36 -25
  45. package/lib/components/editor/edit-panel/GrammarTextEditor.js.map +1 -1
  46. package/lib/components/editor/edit-panel/ModelImporter.d.ts +0 -1
  47. package/lib/components/editor/edit-panel/ModelImporter.d.ts.map +1 -1
  48. package/lib/components/editor/edit-panel/RuntimeEditor.d.ts +0 -1
  49. package/lib/components/editor/edit-panel/RuntimeEditor.d.ts.map +1 -1
  50. package/lib/components/editor/edit-panel/UnsupportedElementEditor.d.ts +0 -1
  51. package/lib/components/editor/edit-panel/UnsupportedElementEditor.d.ts.map +1 -1
  52. package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts +0 -1
  53. package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts.map +1 -1
  54. package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.d.ts +0 -1
  55. package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.d.ts.map +1 -1
  56. package/lib/components/editor/edit-panel/connection-editor/FlatDataConnectionEditor.d.ts +0 -1
  57. package/lib/components/editor/edit-panel/connection-editor/FlatDataConnectionEditor.d.ts.map +1 -1
  58. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts +0 -1
  59. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts.map +1 -1
  60. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js +16 -16
  61. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
  62. package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts +0 -1
  63. package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts.map +1 -1
  64. package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js +4 -4
  65. package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js.map +1 -1
  66. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts +0 -1
  67. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts.map +1 -1
  68. package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.d.ts +0 -1
  69. package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.d.ts.map +1 -1
  70. package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.d.ts +0 -1
  71. package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.d.ts.map +1 -1
  72. package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js +20 -6
  73. package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js.map +1 -1
  74. package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.d.ts +0 -1
  75. package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.d.ts.map +1 -1
  76. package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts +0 -1
  77. package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts.map +1 -1
  78. package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.d.ts +0 -1
  79. package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.d.ts.map +1 -1
  80. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.d.ts +0 -1
  81. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.d.ts.map +1 -1
  82. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.d.ts +0 -1
  83. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.d.ts.map +1 -1
  84. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.d.ts +0 -1
  85. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.d.ts.map +1 -1
  86. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.d.ts +0 -1
  87. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.d.ts.map +1 -1
  88. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.d.ts +0 -1
  89. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.d.ts.map +1 -1
  90. package/lib/components/editor/edit-panel/mapping-editor/ClassMappingEditor.d.ts +0 -1
  91. package/lib/components/editor/edit-panel/mapping-editor/ClassMappingEditor.d.ts.map +1 -1
  92. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts +0 -1
  93. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -1
  94. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js +2 -2
  95. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -1
  96. package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.d.ts +0 -1
  97. package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.d.ts.map +1 -1
  98. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts +0 -1
  99. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts.map +1 -1
  100. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.d.ts +0 -1
  101. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.d.ts.map +1 -1
  102. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts +0 -1
  103. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts.map +1 -1
  104. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts +0 -1
  105. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts.map +1 -1
  106. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts +0 -1
  107. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts.map +1 -1
  108. package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.d.ts +0 -1
  109. package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.d.ts.map +1 -1
  110. package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.d.ts +0 -1
  111. package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.d.ts.map +1 -1
  112. package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.d.ts +0 -1
  113. package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.d.ts.map +1 -1
  114. package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.d.ts +0 -1
  115. package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.d.ts.map +1 -1
  116. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts +0 -1
  117. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts.map +1 -1
  118. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js +2 -2
  119. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -1
  120. package/lib/components/editor/edit-panel/service-editor/NewServiceModal.d.ts +0 -1
  121. package/lib/components/editor/edit-panel/service-editor/NewServiceModal.d.ts.map +1 -1
  122. package/lib/components/editor/edit-panel/service-editor/ServiceEditor.d.ts +0 -1
  123. package/lib/components/editor/edit-panel/service-editor/ServiceEditor.d.ts.map +1 -1
  124. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts +0 -1
  125. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts.map +1 -1
  126. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts +0 -1
  127. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts.map +1 -1
  128. package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.d.ts +0 -1
  129. package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.d.ts.map +1 -1
  130. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.d.ts +0 -1
  131. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.d.ts.map +1 -1
  132. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts +0 -1
  133. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts.map +1 -1
  134. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.d.ts +0 -1
  135. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.d.ts.map +1 -1
  136. package/lib/components/editor/edit-panel/testable/TestAssertionEditor.d.ts +0 -1
  137. package/lib/components/editor/edit-panel/testable/TestAssertionEditor.d.ts.map +1 -1
  138. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts +0 -1
  139. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts.map +1 -1
  140. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts +0 -1
  141. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts.map +1 -1
  142. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts +0 -1
  143. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts.map +1 -1
  144. package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.d.ts +0 -1
  145. package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.d.ts.map +1 -1
  146. package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.d.ts +0 -1
  147. package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.d.ts.map +1 -1
  148. package/lib/components/editor/edit-panel/uml-editor/UMLEditor.d.ts +0 -1
  149. package/lib/components/editor/edit-panel/uml-editor/UMLEditor.d.ts.map +1 -1
  150. package/lib/components/editor/side-bar/CreateNewElementModal.d.ts +0 -1
  151. package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
  152. package/lib/components/editor/side-bar/Explorer.d.ts +0 -1
  153. package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
  154. package/lib/components/editor/side-bar/Explorer.js +15 -9
  155. package/lib/components/editor/side-bar/Explorer.js.map +1 -1
  156. package/lib/components/editor/side-bar/LocalChanges.d.ts +0 -1
  157. package/lib/components/editor/side-bar/LocalChanges.d.ts.map +1 -1
  158. package/lib/components/editor/side-bar/ProjectOverview.d.ts +0 -1
  159. package/lib/components/editor/side-bar/ProjectOverview.d.ts.map +1 -1
  160. package/lib/components/editor/side-bar/ProjectOverview.js +3 -3
  161. package/lib/components/editor/side-bar/ProjectOverview.js.map +1 -1
  162. package/lib/components/editor/side-bar/SideBar.d.ts +0 -1
  163. package/lib/components/editor/side-bar/SideBar.d.ts.map +1 -1
  164. package/lib/components/editor/side-bar/WorkflowManager.d.ts +0 -1
  165. package/lib/components/editor/side-bar/WorkflowManager.d.ts.map +1 -1
  166. package/lib/components/editor/side-bar/WorkspaceReview.d.ts +0 -1
  167. package/lib/components/editor/side-bar/WorkspaceReview.d.ts.map +1 -1
  168. package/lib/components/editor/side-bar/WorkspaceSyncConflictResolver.d.ts +0 -1
  169. package/lib/components/editor/side-bar/WorkspaceSyncConflictResolver.d.ts.map +1 -1
  170. package/lib/components/editor/side-bar/WorkspaceUpdateConflictResolver.d.ts +0 -1
  171. package/lib/components/editor/side-bar/WorkspaceUpdateConflictResolver.d.ts.map +1 -1
  172. package/lib/components/editor/side-bar/WorkspaceUpdater.d.ts +0 -1
  173. package/lib/components/editor/side-bar/WorkspaceUpdater.d.ts.map +1 -1
  174. package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts +0 -1
  175. package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts.map +1 -1
  176. package/lib/components/shared/DiffView.d.ts +0 -1
  177. package/lib/components/shared/DiffView.d.ts.map +1 -1
  178. package/lib/components/shared/DiffView.js +2 -2
  179. package/lib/components/shared/DiffView.js.map +1 -1
  180. package/lib/components/workspace-review/WorkspaceReviewPanel.d.ts +0 -1
  181. package/lib/components/workspace-review/WorkspaceReviewPanel.d.ts.map +1 -1
  182. package/lib/components/workspace-review/WorkspaceReviewSideBar.d.ts +0 -1
  183. package/lib/components/workspace-review/WorkspaceReviewSideBar.d.ts.map +1 -1
  184. package/lib/components/workspace-setup/CreateProjectModal.d.ts +0 -1
  185. package/lib/components/workspace-setup/CreateProjectModal.d.ts.map +1 -1
  186. package/lib/components/workspace-setup/CreateWorkspaceModal.d.ts +0 -1
  187. package/lib/components/workspace-setup/CreateWorkspaceModal.d.ts.map +1 -1
  188. package/lib/index.css +2 -2
  189. package/lib/index.css.map +1 -1
  190. package/lib/package.json +6 -6
  191. package/lib/stores/ChangeDetectionState.d.ts +2 -0
  192. package/lib/stores/ChangeDetectionState.d.ts.map +1 -1
  193. package/lib/stores/ChangeDetectionState.js +12 -6
  194. package/lib/stores/ChangeDetectionState.js.map +1 -1
  195. package/lib/stores/EditorConfig.d.ts +2 -1
  196. package/lib/stores/EditorConfig.d.ts.map +1 -1
  197. package/lib/stores/EditorConfig.js +1 -0
  198. package/lib/stores/EditorConfig.js.map +1 -1
  199. package/lib/stores/EditorGraphState.d.ts +17 -16
  200. package/lib/stores/EditorGraphState.d.ts.map +1 -1
  201. package/lib/stores/EditorGraphState.js +152 -94
  202. package/lib/stores/EditorGraphState.js.map +1 -1
  203. package/lib/stores/EditorSDLCState.d.ts +6 -6
  204. package/lib/stores/EditorSDLCState.d.ts.map +1 -1
  205. package/lib/stores/EditorSDLCState.js +52 -27
  206. package/lib/stores/EditorSDLCState.js.map +1 -1
  207. package/lib/stores/EditorStore.js +1 -1
  208. package/lib/stores/EditorStore.js.map +1 -1
  209. package/lib/stores/EmbeddedQueryBuilderState.js +1 -1
  210. package/lib/stores/EmbeddedQueryBuilderState.js.map +1 -1
  211. package/lib/stores/editor/NewElementState.d.ts.map +1 -1
  212. package/lib/stores/editor/NewElementState.js +14 -5
  213. package/lib/stores/editor/NewElementState.js.map +1 -1
  214. package/lib/stores/editor/StandardEditorMode.d.ts.map +1 -1
  215. package/lib/stores/editor/StandardEditorMode.js +2 -2
  216. package/lib/stores/editor/StandardEditorMode.js.map +1 -1
  217. package/lib/stores/editor-state/FileGenerationState.d.ts +3 -3
  218. package/lib/stores/editor-state/FileGenerationState.d.ts.map +1 -1
  219. package/lib/stores/editor-state/FileGenerationState.js +9 -5
  220. package/lib/stores/editor-state/FileGenerationState.js.map +1 -1
  221. package/lib/stores/editor-state/GrammarTextEditorState.d.ts +6 -4
  222. package/lib/stores/editor-state/GrammarTextEditorState.d.ts.map +1 -1
  223. package/lib/stores/editor-state/GrammarTextEditorState.js +14 -8
  224. package/lib/stores/editor-state/GrammarTextEditorState.js.map +1 -1
  225. package/lib/stores/editor-state/element-editor-state/ClassEditorState.d.ts +0 -1
  226. package/lib/stores/editor-state/element-editor-state/ClassEditorState.d.ts.map +1 -1
  227. package/lib/stores/editor-state/element-editor-state/ClassEditorState.js +0 -5
  228. package/lib/stores/editor-state/element-editor-state/ClassEditorState.js.map +1 -1
  229. package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts +0 -1
  230. package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
  231. package/lib/stores/editor-state/element-editor-state/ElementEditorState.js +0 -3
  232. package/lib/stores/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
  233. package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.d.ts +2 -2
  234. package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.d.ts.map +1 -1
  235. package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.js +5 -4
  236. package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.js.map +1 -1
  237. package/lib/stores/editor-state/element-editor-state/FunctionEditorState.d.ts +0 -1
  238. package/lib/stores/editor-state/element-editor-state/FunctionEditorState.d.ts.map +1 -1
  239. package/lib/stores/editor-state/element-editor-state/FunctionEditorState.js +0 -4
  240. package/lib/stores/editor-state/element-editor-state/FunctionEditorState.js.map +1 -1
  241. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.d.ts +0 -1
  242. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.d.ts.map +1 -1
  243. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js +0 -6
  244. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js.map +1 -1
  245. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts +6 -6
  246. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts.map +1 -1
  247. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js +24 -14
  248. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
  249. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.d.ts +6 -6
  250. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.d.ts.map +1 -1
  251. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js +30 -15
  252. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js.map +1 -1
  253. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
  254. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +1 -1
  255. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
  256. package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts +4 -4
  257. package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts.map +1 -1
  258. package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js +54 -44
  259. package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js.map +1 -1
  260. package/lib/stores/project-viewer/ProjectViewerStore.d.ts.map +1 -1
  261. package/lib/stores/project-viewer/ProjectViewerStore.js +1 -1
  262. package/lib/stores/project-viewer/ProjectViewerStore.js.map +1 -1
  263. package/lib/stores/shared/PackageTreeUtils.d.ts +1 -0
  264. package/lib/stores/shared/PackageTreeUtils.d.ts.map +1 -1
  265. package/lib/stores/shared/PackageTreeUtils.js +5 -2
  266. package/lib/stores/shared/PackageTreeUtils.js.map +1 -1
  267. package/lib/stores/sidebar-state/LocalChangesState.d.ts +13 -13
  268. package/lib/stores/sidebar-state/LocalChangesState.d.ts.map +1 -1
  269. package/lib/stores/sidebar-state/LocalChangesState.js +85 -78
  270. package/lib/stores/sidebar-state/LocalChangesState.js.map +1 -1
  271. package/lib/stores/sidebar-state/ProjectOverviewState.d.ts.map +1 -1
  272. package/lib/stores/sidebar-state/ProjectOverviewState.js +19 -4
  273. package/lib/stores/sidebar-state/ProjectOverviewState.js.map +1 -1
  274. package/lib/stores/sidebar-state/WorkflowManagerState.d.ts +8 -8
  275. package/lib/stores/sidebar-state/WorkflowManagerState.d.ts.map +1 -1
  276. package/lib/stores/sidebar-state/WorkflowManagerState.js +15 -11
  277. package/lib/stores/sidebar-state/WorkflowManagerState.js.map +1 -1
  278. package/lib/stores/sidebar-state/WorkspaceReviewState.d.ts +3 -3
  279. package/lib/stores/sidebar-state/WorkspaceReviewState.d.ts.map +1 -1
  280. package/lib/stores/sidebar-state/WorkspaceReviewState.js +21 -6
  281. package/lib/stores/sidebar-state/WorkspaceReviewState.js.map +1 -1
  282. package/lib/stores/sidebar-state/WorkspaceSyncState.d.ts +2 -2
  283. package/lib/stores/sidebar-state/WorkspaceSyncState.d.ts.map +1 -1
  284. package/lib/stores/sidebar-state/WorkspaceSyncState.js +9 -7
  285. package/lib/stores/sidebar-state/WorkspaceSyncState.js.map +1 -1
  286. package/lib/stores/sidebar-state/WorkspaceUpdaterState.d.ts +2 -2
  287. package/lib/stores/sidebar-state/WorkspaceUpdaterState.d.ts.map +1 -1
  288. package/lib/stores/sidebar-state/WorkspaceUpdaterState.js +8 -4
  289. package/lib/stores/sidebar-state/WorkspaceUpdaterState.js.map +1 -1
  290. package/lib/stores/workspace-review/WorkspaceReviewStore.d.ts +2 -2
  291. package/lib/stores/workspace-review/WorkspaceReviewStore.d.ts.map +1 -1
  292. package/lib/stores/workspace-review/WorkspaceReviewStore.js +27 -10
  293. package/lib/stores/workspace-review/WorkspaceReviewStore.js.map +1 -1
  294. package/package.json +15 -15
  295. package/src/application/LegendStudioApplicationConfig.ts +7 -0
  296. package/src/components/EditorComponentTestUtils.tsx +64 -60
  297. package/src/components/editor/StatusBar.tsx +38 -3
  298. package/src/components/editor/aux-panel/AuxiliaryPanel.tsx +32 -10
  299. package/src/components/editor/aux-panel/Console.tsx +4 -3
  300. package/src/components/editor/aux-panel/DevTool.tsx +47 -79
  301. package/src/components/editor/aux-panel/Problems.tsx +103 -0
  302. package/src/components/editor/edit-panel/FunctionEditor.tsx +49 -3
  303. package/src/components/editor/edit-panel/GrammarTextEditor.tsx +48 -36
  304. package/src/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.tsx +61 -61
  305. package/src/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.tsx +21 -25
  306. package/src/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.tsx +23 -23
  307. package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +2 -1
  308. package/src/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.tsx +19 -22
  309. package/src/components/editor/side-bar/Explorer.tsx +34 -10
  310. package/src/components/editor/side-bar/ProjectOverview.tsx +5 -3
  311. package/src/components/shared/DiffView.tsx +2 -2
  312. package/src/stores/ChangeDetectionState.ts +17 -8
  313. package/src/stores/EditorConfig.ts +1 -0
  314. package/src/stores/EditorGraphState.ts +223 -136
  315. package/src/stores/EditorSDLCState.ts +65 -30
  316. package/src/stores/EditorStore.ts +1 -1
  317. package/src/stores/EmbeddedQueryBuilderState.ts +1 -1
  318. package/src/stores/editor/NewElementState.ts +24 -5
  319. package/src/stores/editor/StandardEditorMode.ts +4 -2
  320. package/src/stores/editor-state/FileGenerationState.ts +19 -8
  321. package/src/stores/editor-state/GrammarTextEditorState.ts +18 -10
  322. package/src/stores/editor-state/element-editor-state/ClassEditorState.ts +0 -12
  323. package/src/stores/editor-state/element-editor-state/ElementEditorState.ts +0 -4
  324. package/src/stores/editor-state/element-editor-state/ElementFileGenerationState.ts +8 -6
  325. package/src/stores/editor-state/element-editor-state/FunctionEditorState.ts +0 -5
  326. package/src/stores/editor-state/element-editor-state/mapping/MappingEditorState.ts +0 -11
  327. package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +29 -15
  328. package/src/stores/editor-state/element-editor-state/mapping/MappingTestState.ts +37 -23
  329. package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +4 -3
  330. package/src/stores/editor-state/element-editor-state/service/ServiceRegistrationState.ts +63 -48
  331. package/src/stores/project-viewer/ProjectViewerStore.ts +5 -3
  332. package/src/stores/shared/PackageTreeUtils.ts +10 -1
  333. package/src/stores/sidebar-state/LocalChangesState.ts +151 -142
  334. package/src/stores/sidebar-state/ProjectOverviewState.ts +19 -4
  335. package/src/stores/sidebar-state/WorkflowManagerState.ts +28 -31
  336. package/src/stores/sidebar-state/WorkspaceReviewState.ts +24 -8
  337. package/src/stores/sidebar-state/WorkspaceSyncState.ts +11 -16
  338. package/src/stores/sidebar-state/WorkspaceUpdaterState.ts +11 -7
  339. package/src/stores/workspace-review/WorkspaceReviewStore.ts +39 -12
  340. package/tsconfig.json +1 -0
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { jest, expect } from '@jest/globals';
17
+ import { expect } from '@jest/globals';
18
18
  import {
19
19
  type RenderResult,
20
20
  render,
@@ -29,7 +29,7 @@ import {
29
29
  generateEditorRoute,
30
30
  LEGEND_STUDIO_ROUTE_PATTERN,
31
31
  } from '../stores/LegendStudioRouter.js';
32
- import type { PlainObject, TEMPORARY__JestMock } from '@finos/legend-shared';
32
+ import { createMock, createSpy, type PlainObject } from '@finos/legend-shared';
33
33
  import { LegendStudioPluginManager } from '../application/LegendStudioPluginManager.js';
34
34
  import type { Entity } from '@finos/legend-storage';
35
35
  import {
@@ -165,7 +165,7 @@ export const TEST__provideMockedEditorStore = (customization?: {
165
165
  TEST__getTestGraphManagerState(customization?.pluginManager),
166
166
  );
167
167
  const MockedEditorStoreProvider = require('./editor/EditorStoreProvider.js'); // eslint-disable-line @typescript-eslint/no-unsafe-assignment
168
- MockedEditorStoreProvider.useEditorStore = jest.fn();
168
+ MockedEditorStoreProvider.useEditorStore = createMock();
169
169
  MockedEditorStoreProvider.useEditorStore.mockReturnValue(value);
170
170
  return value;
171
171
  };
@@ -247,39 +247,41 @@ export const TEST__setUpEditor = async (
247
247
  } = data;
248
248
 
249
249
  // SDLC
250
- jest
251
- .spyOn(MOCK__editorStore.sdlcServerClient, 'getProject')
252
- .mockReturnValue(Promise.resolve(project));
253
- jest
254
- .spyOn(MOCK__editorStore.sdlcServerClient, 'getWorkspace')
255
- .mockReturnValue(Promise.resolve(workspace));
256
- jest
257
- .spyOn(MOCK__editorStore.sdlcServerClient, 'getVersions')
258
- .mockReturnValue(Promise.resolve(projectVersions));
259
- jest
260
- .spyOn(MOCK__editorStore.sdlcServerClient, 'getRevision')
261
- .mockReturnValue(Promise.resolve(curentRevision));
262
- jest
263
- .spyOn(
264
- MOCK__editorStore.sdlcServerClient,
265
- 'checkIfWorkspaceIsInConflictResolutionMode',
266
- )
267
- .mockReturnValue(Promise.resolve(false));
268
- jest
269
- .spyOn(MOCK__editorStore.sdlcServerClient, 'isWorkspaceOutdated')
270
- .mockReturnValue(Promise.resolve(false));
271
- jest
272
- .spyOn(MOCK__editorStore.sdlcServerClient, 'getEntities')
273
- .mockReturnValue(Promise.resolve(entities));
274
- jest
275
- .spyOn(MOCK__editorStore.sdlcServerClient, 'getConfiguration')
276
- .mockReturnValue(Promise.resolve(projectConfiguration));
277
- jest
278
- .spyOn(
279
- MOCK__editorStore.sdlcServerClient,
280
- 'getLatestProjectStructureVersion',
281
- )
282
- .mockReturnValue(Promise.resolve(latestProjectStructureVersion));
250
+ createSpy(MOCK__editorStore.sdlcServerClient, 'getProject').mockResolvedValue(
251
+ project,
252
+ );
253
+ createSpy(
254
+ MOCK__editorStore.sdlcServerClient,
255
+ 'getWorkspace',
256
+ ).mockResolvedValue(workspace);
257
+ createSpy(
258
+ MOCK__editorStore.sdlcServerClient,
259
+ 'getVersions',
260
+ ).mockResolvedValue(projectVersions);
261
+ createSpy(
262
+ MOCK__editorStore.sdlcServerClient,
263
+ 'getRevision',
264
+ ).mockResolvedValue(curentRevision);
265
+ createSpy(
266
+ MOCK__editorStore.sdlcServerClient,
267
+ 'checkIfWorkspaceIsInConflictResolutionMode',
268
+ ).mockResolvedValue(false);
269
+ createSpy(
270
+ MOCK__editorStore.sdlcServerClient,
271
+ 'isWorkspaceOutdated',
272
+ ).mockResolvedValue(false);
273
+ createSpy(
274
+ MOCK__editorStore.sdlcServerClient,
275
+ 'getEntities',
276
+ ).mockResolvedValue(entities);
277
+ createSpy(
278
+ MOCK__editorStore.sdlcServerClient,
279
+ 'getConfiguration',
280
+ ).mockResolvedValue(projectConfiguration);
281
+ createSpy(
282
+ MOCK__editorStore.sdlcServerClient,
283
+ 'getLatestProjectStructureVersion',
284
+ ).mockResolvedValue(latestProjectStructureVersion);
283
285
  MOCK__editorStore.sdlcServerClient._setFeatures(
284
286
  SDLCServerFeaturesConfiguration.serialization.fromJson({
285
287
  canCreateProject: true,
@@ -288,40 +290,42 @@ export const TEST__setUpEditor = async (
288
290
  );
289
291
 
290
292
  // depot
291
- jest
292
- .spyOn(MOCK__editorStore.depotServerClient, 'getProjects')
293
- .mockReturnValue(Promise.resolve(projects));
294
- jest
295
- .spyOn(MOCK__editorStore.depotServerClient, 'getProjectById')
296
- .mockReturnValue(Promise.resolve(projectData));
297
- jest
298
- .spyOn(MOCK__editorStore.depotServerClient, 'collectDependencyEntities')
299
- .mockReturnValue(Promise.resolve(projectDependency));
300
- jest
301
- .spyOn(MOCK__editorStore.depotServerClient, 'analyzeDependencyTree')
302
- .mockReturnValue(Promise.resolve(projectDependencyInfo));
293
+ createSpy(
294
+ MOCK__editorStore.depotServerClient,
295
+ 'getProjects',
296
+ ).mockResolvedValue(projects);
297
+ createSpy(
298
+ MOCK__editorStore.depotServerClient,
299
+ 'getProjectById',
300
+ ).mockResolvedValue(projectData);
301
+ createSpy(
302
+ MOCK__editorStore.depotServerClient,
303
+ 'collectDependencyEntities',
304
+ ).mockResolvedValue(projectDependency);
305
+ createSpy(
306
+ MOCK__editorStore.depotServerClient,
307
+ 'analyzeDependencyTree',
308
+ ).mockResolvedValue(projectDependencyInfo);
303
309
 
304
310
  // TODO: we need to think of how we will mock these calls when we modularize
305
311
  const graphManagerState = MOCK__editorStore.graphManagerState;
306
- graphManagerState.graphManager.initialize = jest.fn<TEMPORARY__JestMock>();
307
- jest
308
- .spyOn(
309
- graphManagerState.graphManager,
310
- 'getAvailableGenerationConfigurationDescriptions',
311
- )
312
- .mockReturnValue(Promise.resolve(availableGenerationDescriptions));
312
+ graphManagerState.graphManager.initialize = createMock();
313
+ createSpy(
314
+ graphManagerState.graphManager,
315
+ 'getAvailableGenerationConfigurationDescriptions',
316
+ ).mockResolvedValue(availableGenerationDescriptions);
313
317
 
314
318
  // mock change detections (since we do not test them now)
315
319
  MOCK__editorStore.changeDetectionState.workspaceLocalLatestRevisionState.buildEntityHashesIndex =
316
- jest.fn<TEMPORARY__JestMock>();
320
+ createMock();
317
321
  MOCK__editorStore.sdlcState.buildWorkspaceBaseRevisionEntityHashesIndex =
318
- jest.fn<TEMPORARY__JestMock>();
322
+ createMock();
319
323
  MOCK__editorStore.sdlcState.buildProjectLatestRevisionEntityHashesIndex =
320
- jest.fn<TEMPORARY__JestMock>();
324
+ createMock();
321
325
  MOCK__editorStore.workspaceReviewState.fetchCurrentWorkspaceReview =
322
- jest.fn<TEMPORARY__JestMock>();
326
+ createMock();
323
327
  MOCK__editorStore.workspaceUpdaterState.fetchLatestCommittedReviews =
324
- jest.fn<TEMPORARY__JestMock>();
328
+ createMock();
325
329
 
326
330
  const history = createMemoryHistory({
327
331
  initialEntries: [
@@ -26,9 +26,11 @@ import {
26
26
  BrushIcon,
27
27
  CloudUploadIcon,
28
28
  AssistantIcon,
29
+ ErrorIcon,
30
+ WarningIcon,
29
31
  } from '@finos/legend-art';
30
32
  import { LEGEND_STUDIO_TEST_ID } from '../LegendStudioTestID.js';
31
- import { ACTIVITY_MODE } from '../../stores/EditorConfig.js';
33
+ import { ACTIVITY_MODE, AUX_PANEL_MODE } from '../../stores/EditorConfig.js';
32
34
  import {
33
35
  generateSetupRoute,
34
36
  type WorkspaceEditorPathParams,
@@ -62,12 +64,14 @@ export const StatusBar = observer((props: { actionsDisabled: boolean }) => {
62
64
  ? ACTIVITY_MODE.CONFLICT_RESOLUTION
63
65
  : ACTIVITY_MODE.WORKSPACE_UPDATER,
64
66
  );
67
+
65
68
  const goToLocalChanges = (): void =>
66
69
  editorStore.setActiveActivity(ACTIVITY_MODE.LOCAL_CHANGES);
67
70
  // Change Detection
68
71
  const changes =
69
72
  editorStore.changeDetectionState.workspaceLocalLatestRevisionState.changes
70
73
  .length;
74
+
71
75
  const configurationState = editorStore.projectConfigurationEditorState;
72
76
  const pushLocalChanges = applicationStore.guardUnhandledError(() =>
73
77
  flowResult(editorStore.localChangesState.pushLocalChanges()),
@@ -92,6 +96,11 @@ export const StatusBar = observer((props: { actionsDisabled: boolean }) => {
92
96
  : 'no changes detected';
93
97
  const workspaceOutOfSync =
94
98
  !actionsDisabled && editorStore.sdlcState.isWorkspaceOutOfSync;
99
+
100
+ // Problems
101
+ const error = editorStore.graphState.error;
102
+ const warnings = editorStore.graphState.warnings;
103
+
95
104
  // Conflict resolution
96
105
  const conflicts = editorStore.conflictResolutionState.conflicts.length;
97
106
  const acceptConflictResolution = applicationStore.guardUnhandledError(() =>
@@ -118,6 +127,12 @@ export const StatusBar = observer((props: { actionsDisabled: boolean }) => {
118
127
 
119
128
  // Other actions
120
129
  const toggleAuxPanel = (): void => editorStore.auxPanelDisplayState.toggle();
130
+
131
+ const showCompilationWarnings = (): void => {
132
+ editorStore.auxPanelDisplayState.open();
133
+ editorStore.setActiveAuxPanelMode(AUX_PANEL_MODE.PROBLEMS);
134
+ };
135
+
121
136
  const handleTextModeClick = applicationStore.guardUnhandledError(() =>
122
137
  flowResult(editorStore.toggleTextMode()),
123
138
  );
@@ -177,10 +192,11 @@ export const StatusBar = observer((props: { actionsDisabled: boolean }) => {
177
192
  }
178
193
  >
179
194
  {workspaceId}
195
+ {editorStore.localChangesState.hasUnpushedChanges ? '*' : ''}
180
196
  </button>
181
197
  {workspaceOutOfSync && (
182
198
  <button
183
- className="editor__status-bar__workspace__status"
199
+ className="editor__status-bar__workspace__status__btn"
184
200
  tabIndex={-1}
185
201
  onClick={goToLocalChanges}
186
202
  title={
@@ -192,7 +208,7 @@ export const StatusBar = observer((props: { actionsDisabled: boolean }) => {
192
208
  )}
193
209
  {editorStore.sdlcState.isWorkspaceOutdated && !workspaceOutOfSync && (
194
210
  <button
195
- className="editor__status-bar__workspace__status"
211
+ className="editor__status-bar__workspace__status__btn"
196
212
  tabIndex={-1}
197
213
  onClick={goToWorkspaceUpdater}
198
214
  title={
@@ -202,6 +218,25 @@ export const StatusBar = observer((props: { actionsDisabled: boolean }) => {
202
218
  OUTDATED
203
219
  </button>
204
220
  )}
221
+ <button
222
+ className="editor__status-bar__problems"
223
+ tabIndex={-1}
224
+ onClick={showCompilationWarnings}
225
+ title={`${error ? 'Error: 1, ' : ''}Warnings: ${warnings.length}`}
226
+ >
227
+ <div className="editor__status-bar__problems__icon">
228
+ <ErrorIcon />
229
+ </div>
230
+ <div className="editor__status-bar__problems__counter">
231
+ {error ? 1 : 0}
232
+ </div>
233
+ <div className="editor__status-bar__problems__icon">
234
+ <WarningIcon />
235
+ </div>
236
+ <div className="editor__status-bar__problems__counter">
237
+ {warnings.length}
238
+ </div>
239
+ </button>
205
240
  </div>
206
241
  </div>
207
242
  <div
@@ -22,12 +22,17 @@ import {
22
22
  ChevronDownIcon,
23
23
  XIcon,
24
24
  PanelContent,
25
+ Badge,
26
+ PanelHeader,
27
+ PanelHeaderActions,
28
+ PanelHeaderActionItem,
25
29
  } from '@finos/legend-art';
26
30
  import { Console } from './Console.js';
27
31
  import { AUX_PANEL_MODE } from '../../../stores/EditorConfig.js';
28
32
  import { isNonNullable } from '@finos/legend-shared';
29
33
  import { DevTool } from './DevTool.js';
30
34
  import { useEditorStore } from '../EditorStoreProvider.js';
35
+ import { Problems } from './Problems.js';
31
36
 
32
37
  export const AuxiliaryPanel = observer(() => {
33
38
  const editorStore = useEditorStore();
@@ -45,6 +50,7 @@ export const AuxiliaryPanel = observer(() => {
45
50
  name: string;
46
51
  icon?: React.ReactNode;
47
52
  isVisible: boolean;
53
+ counter?: number;
48
54
  };
49
55
  } = {
50
56
  [AUX_PANEL_MODE.CONSOLE]: {
@@ -59,6 +65,13 @@ export const AuxiliaryPanel = observer(() => {
59
65
  icon: undefined,
60
66
  isVisible: true,
61
67
  },
68
+ [AUX_PANEL_MODE.PROBLEMS]: {
69
+ mode: AUX_PANEL_MODE.PROBLEMS,
70
+ name: 'PROBLEMS',
71
+ icon: undefined,
72
+ isVisible: true,
73
+ counter: editorStore.graphState.problems.length,
74
+ },
62
75
  };
63
76
 
64
77
  const tabsToShow = Object.values(AUX_PANEL_MODE).filter(
@@ -75,7 +88,7 @@ export const AuxiliaryPanel = observer(() => {
75
88
 
76
89
  return (
77
90
  <div className="panel auxiliary-panel">
78
- <div className="panel__header">
91
+ <PanelHeader>
79
92
  <div className="auxiliary-panel__header__tabs">
80
93
  {tabsToShow
81
94
  .map((tab) => auxTabMap[tab])
@@ -97,15 +110,20 @@ export const AuxiliaryPanel = observer(() => {
97
110
  )}
98
111
  <div className="auxiliary-panel__header__tab__title">
99
112
  {tab.name}
113
+ {tab.counter !== undefined && (
114
+ <Badge
115
+ title={tab.counter.toString()}
116
+ className="auxiliary-panel__header__tab__title__problem__count"
117
+ />
118
+ )}
100
119
  </div>
101
120
  </button>
102
121
  ))}
103
122
  </div>
104
- <div className="auxiliary-panel__header__actions">
105
- <button
123
+ <PanelHeaderActions>
124
+ <PanelHeaderActionItem
106
125
  className="auxiliary-panel__header__action"
107
126
  onClick={toggleExpandAuxPanel}
108
- tabIndex={-1}
109
127
  title="Toggle expand/collapse"
110
128
  >
111
129
  {editorStore.auxPanelDisplayState.isMaximized ? (
@@ -113,18 +131,22 @@ export const AuxiliaryPanel = observer(() => {
113
131
  ) : (
114
132
  <ChevronUpIcon />
115
133
  )}
116
- </button>
117
- <button
134
+ </PanelHeaderActionItem>
135
+ <PanelHeaderActionItem
118
136
  className="auxiliary-panel__header__action"
119
137
  onClick={closePanel}
120
- tabIndex={-1}
121
138
  title="Close"
122
139
  >
123
140
  <XIcon />
124
- </button>
125
- </div>
126
- </div>
141
+ </PanelHeaderActionItem>
142
+ </PanelHeaderActions>
143
+ </PanelHeader>
127
144
  <PanelContent>
145
+ {isTabVisible(AUX_PANEL_MODE.PROBLEMS) && (
146
+ <div className="auxiliary-panel__content__tab">
147
+ <Problems />
148
+ </div>
149
+ )}
128
150
  {isTabVisible(AUX_PANEL_MODE.CONSOLE) && (
129
151
  <div className="auxiliary-panel__content__tab">
130
152
  <Console />
@@ -14,12 +14,13 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
+ import { Panel, PanelContent } from '@finos/legend-art';
17
18
  import { observer } from 'mobx-react-lite';
18
19
 
19
20
  // TODO: add `xterm` so we have a stream/log
20
21
  // See https://github.com/finos/legend-studio/issues/273
21
22
  export const Console = observer(() => (
22
- <div className="console-panel">
23
- <div className="console-panel__content"></div>
24
- </div>
23
+ <Panel className="console-panel">
24
+ <PanelContent className="console-panel__content"></PanelContent>
25
+ </Panel>
25
26
  ));
@@ -15,7 +15,12 @@
15
15
  */
16
16
 
17
17
  import { observer } from 'mobx-react-lite';
18
- import { clsx, CheckSquareIcon, SquareIcon } from '@finos/legend-art';
18
+ import {
19
+ PanelFormBooleanField,
20
+ Panel,
21
+ PanelFormTextField,
22
+ PanelForm,
23
+ } from '@finos/legend-art';
19
24
  import { isValidUrl } from '@finos/legend-shared';
20
25
  import { useEditorStore } from '../EditorStoreProvider.js';
21
26
  import { observe_TEMPORARY__AbstractEngineConfig } from '@finos/legend-graph';
@@ -26,12 +31,6 @@ export const DevTool = observer(() => {
26
31
  const engineConfig = observe_TEMPORARY__AbstractEngineConfig(
27
32
  editorStore.graphManagerState.graphManager.TEMPORARY__getEngineConfig(),
28
33
  );
29
- const changeEngineClientBaseUrl: React.ChangeEventHandler<
30
- HTMLInputElement
31
- > = (event) =>
32
- engineConfig.setBaseUrl(
33
- event.target.value === '' ? undefined : event.target.value,
34
- );
35
34
  const toggleEngineClientRequestPayloadCompression = (): void =>
36
35
  engineConfig.setUseClientRequestPayloadCompression(
37
36
  !engineConfig.useClientRequestPayloadCompression,
@@ -40,79 +39,48 @@ export const DevTool = observer(() => {
40
39
  engineConfig.setUseBase64ForAdhocConnectionDataUrls(
41
40
  !engineConfig.useBase64ForAdhocConnectionDataUrls,
42
41
  );
42
+ // Graph Manager
43
+ const toggleStrictMode = (): void =>
44
+ editorStore.graphState.setEnableStrictMode(
45
+ !editorStore.graphState.enableStrictMode,
46
+ );
43
47
 
44
48
  return (
45
- <div className="console-panel">
46
- <div className="console-panel__content">
47
- <div className="panel__content__form">
48
- <div className="panel__content__form__section">
49
- <div className="panel__content__form__section__header__label">
50
- Engine client request payload compression
51
- </div>
52
- <div
53
- className={clsx('panel__content__form__section__toggler')}
54
- onClick={toggleEngineClientRequestPayloadCompression}
55
- >
56
- <button
57
- className={clsx('panel__content__form__section__toggler__btn', {
58
- 'panel__content__form__section__toggler__btn--toggled':
59
- engineConfig.useClientRequestPayloadCompression,
60
- })}
61
- >
62
- {engineConfig.useClientRequestPayloadCompression ? (
63
- <CheckSquareIcon />
64
- ) : (
65
- <SquareIcon />
66
- )}
67
- </button>
68
- <div className="panel__content__form__section__toggler__prompt">
69
- Specifies if request payload should be compressed
70
- </div>
71
- </div>
72
- </div>
73
- <div className="panel__content__form__section">
74
- <div className="panel__content__form__section__header__label">
75
- Engine client base URL
76
- </div>
77
- <div className="input-group">
78
- <input
79
- className="panel__content__form__section__input input-group__input input--dark"
80
- spellCheck={false}
81
- value={engineConfig.baseUrl ?? ''}
82
- onChange={changeEngineClientBaseUrl}
83
- />
84
- {!isValidUrl(engineConfig.baseUrl ?? '') && (
85
- <div className="input-group__error-message">Invalid URL</div>
86
- )}
87
- </div>
88
- </div>
89
- <div className="panel__content__form__section">
90
- <div className="panel__content__form__section__header__label">
91
- Engine execution runner
92
- </div>
93
- <div
94
- className={clsx('panel__content__form__section__toggler')}
95
- onClick={toggleDataUrlEncoding}
96
- >
97
- <button
98
- className={clsx('panel__content__form__section__toggler__btn', {
99
- 'panel__content__form__section__toggler__btn--toggled':
100
- engineConfig.useBase64ForAdhocConnectionDataUrls,
101
- })}
102
- >
103
- {engineConfig.useBase64ForAdhocConnectionDataUrls ? (
104
- <CheckSquareIcon />
105
- ) : (
106
- <SquareIcon />
107
- )}
108
- </button>
109
- <div className="panel__content__form__section__toggler__prompt">
110
- Use Base64 encoding for adhoc connection data URLs
111
- </div>
112
- </div>
113
- </div>
114
- </div>
115
- </div>
116
- </div>
49
+ <Panel>
50
+ <PanelForm>
51
+ <PanelFormBooleanField
52
+ name="Engine client request payload compression"
53
+ prompt="Specifies if request payload should be compressed"
54
+ value={engineConfig.useClientRequestPayloadCompression}
55
+ isReadOnly={false}
56
+ update={toggleEngineClientRequestPayloadCompression}
57
+ />
58
+ <PanelFormTextField
59
+ name="Engine client base URL"
60
+ value={engineConfig.baseUrl ?? ''}
61
+ isReadOnly={false}
62
+ update={(value: string | undefined): void =>
63
+ engineConfig.setBaseUrl(value === '' ? undefined : value)
64
+ }
65
+ errorMessage={
66
+ !isValidUrl(engineConfig.baseUrl ?? '') ? 'Invalid URL' : ''
67
+ }
68
+ />
69
+ <PanelFormBooleanField
70
+ name="Engine execution runner"
71
+ prompt="Use Base64 encoding for adhoc connection data URLs"
72
+ value={engineConfig.useClientRequestPayloadCompression}
73
+ isReadOnly={false}
74
+ update={toggleDataUrlEncoding}
75
+ />
76
+ <PanelFormBooleanField
77
+ name="Graph builder strict mode"
78
+ prompt="Use strict-mode when building the graph (some warnings will be treated as errors)"
79
+ value={editorStore.graphState.enableStrictMode}
80
+ isReadOnly={false}
81
+ update={toggleStrictMode}
82
+ />
83
+ </PanelForm>
84
+ </Panel>
117
85
  );
118
86
  });
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { observer } from 'mobx-react-lite';
18
+ import {
19
+ PanelList,
20
+ PanelListItem,
21
+ clsx,
22
+ Panel,
23
+ ErrorIcon,
24
+ WarningIcon,
25
+ } from '@finos/legend-art';
26
+ import { useEditorStore } from '../EditorStoreProvider.js';
27
+ import type { Problem } from '../../../stores/EditorGraphState.js';
28
+ import { CompilationWarning, EngineError } from '@finos/legend-graph';
29
+
30
+ const ProblemItem = observer((props: { problem: Problem }) => {
31
+ const { problem } = props;
32
+ const editorStore = useEditorStore();
33
+ const isStale = editorStore.graphState.areProblemsStale;
34
+ const goToSource = (): void => {
35
+ // NOTE: in text mode, we allow click to go to position even when the problems might already be stale
36
+ if (editorStore.isInGrammarTextMode && problem.sourceInformation) {
37
+ editorStore.grammarTextEditorState.setForcedCursorPosition({
38
+ lineNumber: problem.sourceInformation.startLine,
39
+ column: problem.sourceInformation.startColumn,
40
+ });
41
+ }
42
+ };
43
+
44
+ return (
45
+ <PanelListItem>
46
+ <button
47
+ className={clsx([
48
+ 'auxiliary-panel__problem',
49
+ {
50
+ 'auxiliary-panel__problem--stale': isStale,
51
+ },
52
+ ])}
53
+ title={problem.message}
54
+ onClick={goToSource}
55
+ >
56
+ {problem instanceof EngineError && (
57
+ <ErrorIcon className="auxiliary-panel__problem__icon auxiliary-panel__problem__icon--error" />
58
+ )}
59
+ {problem instanceof CompilationWarning && (
60
+ <WarningIcon className="auxiliary-panel__problem__icon auxiliary-panel__problem__icon--warning" />
61
+ )}
62
+ <div className="auxiliary-panel__problem__message">
63
+ {problem.message}
64
+ </div>
65
+ {problem.sourceInformation && (
66
+ <div className="auxiliary-panel__problem__source">
67
+ {editorStore.isInGrammarTextMode &&
68
+ `[Ln ${problem.sourceInformation.startLine}, Col ${problem.sourceInformation.startColumn}]`}
69
+ </div>
70
+ )}
71
+ </button>
72
+ </PanelListItem>
73
+ );
74
+ });
75
+
76
+ export const Problems = observer(() => {
77
+ const editorStore = useEditorStore();
78
+ const problems = editorStore.graphState.problems;
79
+ const isStale = editorStore.graphState.areProblemsStale;
80
+
81
+ return (
82
+ <Panel>
83
+ {isStale && (
84
+ <div className="auxiliary-panel__problems__stale-warning">
85
+ The following result might be stale - please run compilation (F9) to
86
+ check for the latest problems
87
+ </div>
88
+ )}
89
+ {problems.length === 0 && (
90
+ <div className="auxiliary-panel__problems__placeholder">
91
+ No problems have been detected in the workspace.
92
+ </div>
93
+ )}
94
+ {problems.length !== 0 && (
95
+ <PanelList>
96
+ {problems.map((problem) => (
97
+ <ProblemItem key={problem.uuid} problem={problem} />
98
+ ))}
99
+ </PanelList>
100
+ )}
101
+ </Panel>
102
+ );
103
+ });