@finos/legend-application-studio 18.1.0 → 19.1.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 (349) hide show
  1. package/lib/application/LegendStudio.d.ts.map +1 -1
  2. package/lib/application/LegendStudio.js +3 -9
  3. package/lib/application/LegendStudio.js.map +1 -1
  4. package/lib/components/Core_LegendStudioApplicationPlugin.d.ts +2 -1
  5. package/lib/components/Core_LegendStudioApplicationPlugin.d.ts.map +1 -1
  6. package/lib/components/Core_LegendStudioApplicationPlugin.js +5 -1
  7. package/lib/components/Core_LegendStudioApplicationPlugin.js.map +1 -1
  8. package/lib/components/EditorComponentTestUtils.d.ts.map +1 -1
  9. package/lib/components/EditorComponentTestUtils.js +3 -3
  10. package/lib/components/EditorComponentTestUtils.js.map +1 -1
  11. package/lib/components/LegendStudioApplication.d.ts.map +1 -1
  12. package/lib/components/LegendStudioApplication.js +11 -8
  13. package/lib/components/LegendStudioApplication.js.map +1 -1
  14. package/lib/components/editor/ActivityBar.d.ts.map +1 -1
  15. package/lib/components/editor/ActivityBar.js +13 -18
  16. package/lib/components/editor/ActivityBar.js.map +1 -1
  17. package/lib/components/editor/Editor.d.ts.map +1 -1
  18. package/lib/components/editor/Editor.js +58 -95
  19. package/lib/components/editor/Editor.js.map +1 -1
  20. package/lib/components/editor/StatusBar.d.ts.map +1 -1
  21. package/lib/components/editor/StatusBar.js +4 -6
  22. package/lib/components/editor/StatusBar.js.map +1 -1
  23. package/lib/components/editor/aux-panel/AuxiliaryPanel.js +1 -1
  24. package/lib/components/editor/aux-panel/AuxiliaryPanel.js.map +1 -1
  25. package/lib/components/editor/command-center/ProjectSearchCommand.d.ts.map +1 -1
  26. package/lib/components/editor/command-center/ProjectSearchCommand.js +1 -1
  27. package/lib/components/editor/command-center/ProjectSearchCommand.js.map +1 -1
  28. package/lib/components/editor/edit-panel/EditPanel.d.ts.map +1 -1
  29. package/lib/components/editor/edit-panel/EditPanel.js +5 -5
  30. package/lib/components/editor/edit-panel/EditPanel.js.map +1 -1
  31. package/lib/components/editor/edit-panel/FileGenerationViewer.d.ts.map +1 -1
  32. package/lib/components/editor/edit-panel/FileGenerationViewer.js +2 -2
  33. package/lib/components/editor/edit-panel/FileGenerationViewer.js.map +1 -1
  34. package/lib/components/editor/edit-panel/FunctionEditor.d.ts.map +1 -1
  35. package/lib/components/editor/edit-panel/FunctionEditor.js +33 -7
  36. package/lib/components/editor/edit-panel/FunctionEditor.js.map +1 -1
  37. package/lib/components/editor/edit-panel/GrammarTextEditor.d.ts.map +1 -1
  38. package/lib/components/editor/edit-panel/GrammarTextEditor.js +4 -16
  39. package/lib/components/editor/edit-panel/GrammarTextEditor.js.map +1 -1
  40. package/lib/components/editor/edit-panel/ModelImporter.d.ts.map +1 -1
  41. package/lib/components/editor/edit-panel/ModelImporter.js +6 -32
  42. package/lib/components/editor/edit-panel/ModelImporter.js.map +1 -1
  43. package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.js +2 -3
  44. package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.js.map +1 -1
  45. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts.map +1 -1
  46. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js +14 -15
  47. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
  48. package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts.map +1 -1
  49. package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js +12 -6
  50. package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js.map +1 -1
  51. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts.map +1 -1
  52. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js +3 -3
  53. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js.map +1 -1
  54. package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.d.ts.map +1 -1
  55. package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js +3 -4
  56. package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js.map +1 -1
  57. package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.d.ts.map +1 -1
  58. package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js +7 -8
  59. package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js.map +1 -1
  60. package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.d.ts.map +1 -1
  61. package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js +3 -3
  62. package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js.map +1 -1
  63. package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts.map +1 -1
  64. package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.js +4 -5
  65. package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.js.map +1 -1
  66. package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.js +2 -3
  67. package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.js.map +1 -1
  68. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.d.ts.map +1 -1
  69. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js +2 -3
  70. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js.map +1 -1
  71. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.d.ts.map +1 -1
  72. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.js +2 -3
  73. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.js.map +1 -1
  74. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.d.ts.map +1 -1
  75. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.js +2 -3
  76. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.js.map +1 -1
  77. package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.js +3 -3
  78. package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.js.map +1 -1
  79. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts.map +1 -1
  80. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js +5 -9
  81. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js.map +1 -1
  82. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts.map +1 -1
  83. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js +12 -15
  84. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js.map +1 -1
  85. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts.map +1 -1
  86. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js +9 -12
  87. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js.map +1 -1
  88. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts.map +1 -1
  89. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js +4 -5
  90. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js.map +1 -1
  91. package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.js +4 -4
  92. package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.js.map +1 -1
  93. package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.js +4 -4
  94. package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.js.map +1 -1
  95. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts.map +1 -1
  96. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js +17 -41
  97. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -1
  98. package/lib/components/editor/edit-panel/service-editor/NewServiceModal.d.ts.map +1 -1
  99. package/lib/components/editor/edit-panel/service-editor/NewServiceModal.js +4 -5
  100. package/lib/components/editor/edit-panel/service-editor/NewServiceModal.js.map +1 -1
  101. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js +16 -16
  102. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js.map +1 -1
  103. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts.map +1 -1
  104. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js +6 -7
  105. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
  106. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js +9 -9
  107. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js.map +1 -1
  108. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js +5 -5
  109. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js.map +1 -1
  110. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.d.ts.map +1 -1
  111. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.js +4 -2
  112. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.js.map +1 -1
  113. package/lib/components/editor/edit-panel/testable/TestAssertionEditor.d.ts.map +1 -1
  114. package/lib/components/editor/edit-panel/testable/TestAssertionEditor.js +2 -3
  115. package/lib/components/editor/edit-panel/testable/TestAssertionEditor.js.map +1 -1
  116. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts.map +1 -1
  117. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js +7 -5
  118. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js.map +1 -1
  119. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts.map +1 -1
  120. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js +12 -8
  121. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js.map +1 -1
  122. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts.map +1 -1
  123. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.js +7 -5
  124. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.js.map +1 -1
  125. package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
  126. package/lib/components/editor/side-bar/CreateNewElementModal.js +4 -5
  127. package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
  128. package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
  129. package/lib/components/editor/side-bar/Explorer.js +21 -12
  130. package/lib/components/editor/side-bar/Explorer.js.map +1 -1
  131. package/lib/components/editor/side-bar/WorkflowManager.js +3 -5
  132. package/lib/components/editor/side-bar/WorkflowManager.js.map +1 -1
  133. package/lib/components/editor/side-bar/WorkspaceReview.d.ts.map +1 -1
  134. package/lib/components/editor/side-bar/WorkspaceReview.js +5 -32
  135. package/lib/components/editor/side-bar/WorkspaceReview.js.map +1 -1
  136. package/lib/components/editor/side-bar/WorkspaceUpdater.d.ts.map +1 -1
  137. package/lib/components/editor/side-bar/WorkspaceUpdater.js +2 -26
  138. package/lib/components/editor/side-bar/WorkspaceUpdater.js.map +1 -1
  139. package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts.map +1 -1
  140. package/lib/components/editor/side-bar/testable/GlobalTestRunner.js +3 -4
  141. package/lib/components/editor/side-bar/testable/GlobalTestRunner.js.map +1 -1
  142. package/lib/components/project-viewer/ProjectViewer.d.ts.map +1 -1
  143. package/lib/components/project-viewer/ProjectViewer.js +19 -33
  144. package/lib/components/project-viewer/ProjectViewer.js.map +1 -1
  145. package/lib/components/shared/DiffView.d.ts.map +1 -1
  146. package/lib/components/shared/DiffView.js +4 -19
  147. package/lib/components/shared/DiffView.js.map +1 -1
  148. package/lib/components/workspace-review/WorkspaceReview.d.ts.map +1 -1
  149. package/lib/components/workspace-review/WorkspaceReview.js +8 -6
  150. package/lib/components/workspace-review/WorkspaceReview.js.map +1 -1
  151. package/lib/components/workspace-review/WorkspaceReviewPanel.d.ts.map +1 -1
  152. package/lib/components/workspace-review/WorkspaceReviewPanel.js +2 -2
  153. package/lib/components/workspace-review/WorkspaceReviewPanel.js.map +1 -1
  154. package/lib/components/workspace-review/WorkspaceReviewSideBar.js +1 -1
  155. package/lib/components/workspace-review/WorkspaceReviewSideBar.js.map +1 -1
  156. package/lib/components/workspace-setup/CreateProjectModal.d.ts.map +1 -1
  157. package/lib/components/workspace-setup/CreateProjectModal.js +10 -6
  158. package/lib/components/workspace-setup/CreateProjectModal.js.map +1 -1
  159. package/lib/components/workspace-setup/CreateWorkspaceModal.d.ts.map +1 -1
  160. package/lib/components/workspace-setup/CreateWorkspaceModal.js +4 -5
  161. package/lib/components/workspace-setup/CreateWorkspaceModal.js.map +1 -1
  162. package/lib/components/workspace-setup/WorkspaceSetup.d.ts.map +1 -1
  163. package/lib/components/workspace-setup/WorkspaceSetup.js +4 -1
  164. package/lib/components/workspace-setup/WorkspaceSetup.js.map +1 -1
  165. package/lib/index.css +2 -2
  166. package/lib/index.css.map +1 -1
  167. package/lib/index.d.ts +0 -1
  168. package/lib/index.d.ts.map +1 -1
  169. package/lib/index.js +0 -1
  170. package/lib/index.js.map +1 -1
  171. package/lib/package.json +5 -7
  172. package/lib/stores/EditorConfig.d.ts +0 -28
  173. package/lib/stores/EditorConfig.d.ts.map +1 -1
  174. package/lib/stores/EditorConfig.js +0 -29
  175. package/lib/stores/EditorConfig.js.map +1 -1
  176. package/lib/stores/EditorGraphState.d.ts.map +1 -1
  177. package/lib/stores/EditorGraphState.js +8 -8
  178. package/lib/stores/EditorGraphState.js.map +1 -1
  179. package/lib/stores/EditorSDLCState.d.ts.map +1 -1
  180. package/lib/stores/EditorSDLCState.js +4 -2
  181. package/lib/stores/EditorSDLCState.js.map +1 -1
  182. package/lib/stores/EditorStore.d.ts +27 -30
  183. package/lib/stores/EditorStore.d.ts.map +1 -1
  184. package/lib/stores/EditorStore.js +183 -146
  185. package/lib/stores/EditorStore.js.map +1 -1
  186. package/lib/stores/EmbeddedQueryBuilderState.d.ts +1 -1
  187. package/lib/stores/EmbeddedQueryBuilderState.d.ts.map +1 -1
  188. package/lib/stores/EmbeddedQueryBuilderState.js +7 -8
  189. package/lib/stores/EmbeddedQueryBuilderState.js.map +1 -1
  190. package/lib/stores/LegendStudioBaseStore.d.ts +1 -1
  191. package/lib/stores/LegendStudioBaseStore.d.ts.map +1 -1
  192. package/lib/stores/LegendStudioBaseStore.js +25 -17
  193. package/lib/stores/LegendStudioBaseStore.js.map +1 -1
  194. package/lib/stores/LegendStudioCommand.d.ts +32 -0
  195. package/lib/stores/LegendStudioCommand.d.ts.map +1 -0
  196. package/lib/stores/LegendStudioCommand.js +81 -0
  197. package/lib/stores/LegendStudioCommand.js.map +1 -0
  198. package/lib/stores/LegendStudioRouter.d.ts +15 -15
  199. package/lib/stores/LegendStudioRouter.d.ts.map +1 -1
  200. package/lib/stores/LegendStudioRouter.js +37 -24
  201. package/lib/stores/LegendStudioRouter.js.map +1 -1
  202. package/lib/stores/editor-state/GraphGenerationState.d.ts.map +1 -1
  203. package/lib/stores/editor-state/GraphGenerationState.js +2 -3
  204. package/lib/stores/editor-state/GraphGenerationState.js.map +1 -1
  205. package/lib/stores/editor-state/ModelImporterState.d.ts.map +1 -1
  206. package/lib/stores/editor-state/ModelImporterState.js +21 -21
  207. package/lib/stores/editor-state/ModelImporterState.js.map +1 -1
  208. package/lib/stores/editor-state/ProjectConfigurationEditorState.js +2 -2
  209. package/lib/stores/editor-state/ProjectConfigurationEditorState.js.map +1 -1
  210. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts.map +1 -1
  211. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js +1 -3
  212. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
  213. package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts.map +1 -1
  214. package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js +1 -3
  215. package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js.map +1 -1
  216. package/lib/stores/editor-state/element-editor-state/testable/TestAssertionState.d.ts.map +1 -1
  217. package/lib/stores/editor-state/element-editor-state/testable/TestAssertionState.js +2 -2
  218. package/lib/stores/editor-state/element-editor-state/testable/TestAssertionState.js.map +1 -1
  219. package/lib/stores/project-viewer/ProjectViewerStore.d.ts +2 -4
  220. package/lib/stores/project-viewer/ProjectViewerStore.d.ts.map +1 -1
  221. package/lib/stores/project-viewer/ProjectViewerStore.js +45 -44
  222. package/lib/stores/project-viewer/ProjectViewerStore.js.map +1 -1
  223. package/lib/stores/shared/MockDataUtils.d.ts.map +1 -1
  224. package/lib/stores/shared/MockDataUtils.js +3 -4
  225. package/lib/stores/shared/MockDataUtils.js.map +1 -1
  226. package/lib/stores/shared/PackageTreeUtils.d.ts +1 -0
  227. package/lib/stores/shared/PackageTreeUtils.d.ts.map +1 -1
  228. package/lib/stores/shared/PackageTreeUtils.js +5 -2
  229. package/lib/stores/shared/PackageTreeUtils.js.map +1 -1
  230. package/lib/stores/shared/testable/TestableUtils.d.ts.map +1 -1
  231. package/lib/stores/shared/testable/TestableUtils.js +6 -6
  232. package/lib/stores/shared/testable/TestableUtils.js.map +1 -1
  233. package/lib/stores/sidebar-state/LocalChangesState.d.ts +1 -0
  234. package/lib/stores/sidebar-state/LocalChangesState.d.ts.map +1 -1
  235. package/lib/stores/sidebar-state/LocalChangesState.js +42 -25
  236. package/lib/stores/sidebar-state/LocalChangesState.js.map +1 -1
  237. package/lib/stores/sidebar-state/ProjectOverviewState.d.ts.map +1 -1
  238. package/lib/stores/sidebar-state/ProjectOverviewState.js +3 -2
  239. package/lib/stores/sidebar-state/ProjectOverviewState.js.map +1 -1
  240. package/lib/stores/sidebar-state/WorkspaceReviewState.d.ts.map +1 -1
  241. package/lib/stores/sidebar-state/WorkspaceReviewState.js +10 -10
  242. package/lib/stores/sidebar-state/WorkspaceReviewState.js.map +1 -1
  243. package/lib/stores/sidebar-state/WorkspaceSyncState.d.ts.map +1 -1
  244. package/lib/stores/sidebar-state/WorkspaceSyncState.js +6 -8
  245. package/lib/stores/sidebar-state/WorkspaceSyncState.js.map +1 -1
  246. package/lib/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.d.ts.map +1 -1
  247. package/lib/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.js +20 -17
  248. package/lib/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.js.map +1 -1
  249. package/lib/stores/sidebar-state/WorkspaceUpdaterState.d.ts.map +1 -1
  250. package/lib/stores/sidebar-state/WorkspaceUpdaterState.js +8 -7
  251. package/lib/stores/sidebar-state/WorkspaceUpdaterState.js.map +1 -1
  252. package/lib/stores/workspace-setup/WorkspaceSetupStore.js +6 -6
  253. package/lib/stores/workspace-setup/WorkspaceSetupStore.js.map +1 -1
  254. package/package.json +14 -16
  255. package/src/application/LegendStudio.tsx +3 -9
  256. package/src/components/Core_LegendStudioApplicationPlugin.tsx +9 -0
  257. package/src/components/EditorComponentTestUtils.tsx +8 -2
  258. package/src/components/LegendStudioApplication.tsx +28 -8
  259. package/src/components/editor/ActivityBar.tsx +35 -73
  260. package/src/components/editor/Editor.tsx +135 -172
  261. package/src/components/editor/StatusBar.tsx +16 -13
  262. package/src/components/editor/aux-panel/AuxiliaryPanel.tsx +1 -1
  263. package/src/components/editor/command-center/ProjectSearchCommand.tsx +12 -16
  264. package/src/components/editor/edit-panel/EditPanel.tsx +14 -22
  265. package/src/components/editor/edit-panel/FileGenerationViewer.tsx +9 -11
  266. package/src/components/editor/edit-panel/FunctionEditor.tsx +51 -5
  267. package/src/components/editor/edit-panel/GrammarTextEditor.tsx +2 -18
  268. package/src/components/editor/edit-panel/ModelImporter.tsx +10 -38
  269. package/src/components/editor/edit-panel/connection-editor/DatabaseBuilder.tsx +2 -2
  270. package/src/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.tsx +32 -33
  271. package/src/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.tsx +28 -23
  272. package/src/components/editor/edit-panel/data-editor/DataElementEditor.tsx +8 -9
  273. package/src/components/editor/edit-panel/data-editor/EmbeddedDataEditor.tsx +8 -10
  274. package/src/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.tsx +7 -8
  275. package/src/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.tsx +2 -2
  276. package/src/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.tsx +9 -5
  277. package/src/components/editor/edit-panel/element-generation-editor/ElementNativeView.tsx +2 -2
  278. package/src/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.tsx +5 -3
  279. package/src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.tsx +2 -3
  280. package/src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.tsx +2 -3
  281. package/src/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.tsx +3 -3
  282. package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.tsx +5 -9
  283. package/src/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.tsx +23 -27
  284. package/src/components/editor/edit-panel/mapping-editor/MappingTestEditor.tsx +20 -24
  285. package/src/components/editor/edit-panel/mapping-editor/NewMappingElementModal.tsx +4 -5
  286. package/src/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.tsx +4 -4
  287. package/src/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.tsx +4 -4
  288. package/src/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.tsx +57 -75
  289. package/src/components/editor/edit-panel/service-editor/NewServiceModal.tsx +7 -5
  290. package/src/components/editor/edit-panel/service-editor/ServiceExecutionEditor.tsx +16 -16
  291. package/src/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.tsx +15 -14
  292. package/src/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.tsx +9 -9
  293. package/src/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.tsx +5 -5
  294. package/src/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.tsx +4 -2
  295. package/src/components/editor/edit-panel/testable/TestAssertionEditor.tsx +2 -3
  296. package/src/components/editor/edit-panel/uml-editor/AssociationEditor.tsx +12 -5
  297. package/src/components/editor/edit-panel/uml-editor/ClassEditor.tsx +17 -11
  298. package/src/components/editor/edit-panel/uml-editor/EnumerationEditor.tsx +14 -5
  299. package/src/components/editor/side-bar/CreateNewElementModal.tsx +4 -5
  300. package/src/components/editor/side-bar/Explorer.tsx +60 -39
  301. package/src/components/editor/side-bar/WorkflowManager.tsx +3 -3
  302. package/src/components/editor/side-bar/WorkspaceReview.tsx +5 -35
  303. package/src/components/editor/side-bar/WorkspaceUpdater.tsx +2 -31
  304. package/src/components/editor/side-bar/testable/GlobalTestRunner.tsx +3 -4
  305. package/src/components/project-viewer/ProjectViewer.tsx +65 -78
  306. package/src/components/shared/DiffView.tsx +3 -22
  307. package/src/components/workspace-review/WorkspaceReview.tsx +26 -16
  308. package/src/components/workspace-review/WorkspaceReviewPanel.tsx +5 -9
  309. package/src/components/workspace-review/WorkspaceReviewSideBar.tsx +1 -1
  310. package/src/components/workspace-setup/CreateProjectModal.tsx +14 -10
  311. package/src/components/workspace-setup/CreateWorkspaceModal.tsx +6 -5
  312. package/src/components/workspace-setup/WorkspaceSetup.tsx +6 -1
  313. package/src/index.ts +0 -1
  314. package/src/stores/EditorConfig.ts +0 -30
  315. package/src/stores/EditorGraphState.ts +9 -8
  316. package/src/stores/EditorSDLCState.ts +4 -2
  317. package/src/stores/EditorStore.ts +231 -245
  318. package/src/stores/EmbeddedQueryBuilderState.ts +14 -9
  319. package/src/stores/LegendStudioBaseStore.ts +33 -24
  320. package/src/stores/LegendStudioCommand.ts +83 -0
  321. package/src/stores/LegendStudioRouter.ts +50 -41
  322. package/src/stores/editor-state/GraphGenerationState.ts +3 -2
  323. package/src/stores/editor-state/ModelImporterState.ts +35 -23
  324. package/src/stores/editor-state/ProjectConfigurationEditorState.ts +2 -2
  325. package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +1 -3
  326. package/src/stores/editor-state/element-editor-state/service/ServiceRegistrationState.ts +1 -3
  327. package/src/stores/editor-state/element-editor-state/testable/TestAssertionState.ts +2 -1
  328. package/src/stores/project-viewer/ProjectViewerStore.ts +65 -59
  329. package/src/stores/shared/MockDataUtils.ts +4 -3
  330. package/src/stores/shared/PackageTreeUtils.ts +10 -1
  331. package/src/stores/shared/testable/TestableUtils.ts +6 -5
  332. package/src/stores/sidebar-state/LocalChangesState.ts +50 -36
  333. package/src/stores/sidebar-state/ProjectOverviewState.ts +4 -2
  334. package/src/stores/sidebar-state/WorkspaceReviewState.ts +11 -10
  335. package/src/stores/sidebar-state/WorkspaceSyncState.ts +6 -8
  336. package/src/stores/sidebar-state/WorkspaceUpdateConflictResolutionState.ts +20 -17
  337. package/src/stores/sidebar-state/WorkspaceUpdaterState.ts +8 -7
  338. package/src/stores/workspace-setup/WorkspaceSetupStore.ts +6 -6
  339. package/tsconfig.json +1 -2
  340. package/lib/components/shared/StudioLambdaEditor.d.ts +0 -41
  341. package/lib/components/shared/StudioLambdaEditor.d.ts.map +0 -1
  342. package/lib/components/shared/StudioLambdaEditor.js +0 -53
  343. package/lib/components/shared/StudioLambdaEditor.js.map +0 -1
  344. package/lib/components/shared/StudioTextInputEditor.d.ts +0 -28
  345. package/lib/components/shared/StudioTextInputEditor.d.ts.map +0 -1
  346. package/lib/components/shared/StudioTextInputEditor.js +0 -36
  347. package/lib/components/shared/StudioTextInputEditor.js.map +0 -1
  348. package/src/components/shared/StudioLambdaEditor.tsx +0 -146
  349. package/src/components/shared/StudioTextInputEditor.tsx +0 -83
@@ -31,31 +31,30 @@ import { LEGEND_STUDIO_TEST_ID } from '../LegendStudioTestID.js';
31
31
  import { ACTIVITY_MODE } from '../../stores/EditorConfig.js';
32
32
  import {
33
33
  generateSetupRoute,
34
- type EditorPathParams,
35
- type GroupEditorPathParams,
34
+ type WorkspaceEditorPathParams,
36
35
  } from '../../stores/LegendStudioRouter.js';
37
36
  import { flowResult } from 'mobx';
38
37
  import { useEditorStore } from './EditorStoreProvider.js';
39
38
  import { WorkspaceType } from '@finos/legend-server-sdlc';
40
39
  import { useLegendStudioApplicationStore } from '../LegendStudioBaseStoreProvider.js';
41
40
  import { useParams } from '@finos/legend-application';
41
+ import { guaranteeNonNullable } from '@finos/legend-shared';
42
42
 
43
43
  export const StatusBar = observer((props: { actionsDisabled: boolean }) => {
44
44
  const { actionsDisabled } = props;
45
- const params = useParams<EditorPathParams | GroupEditorPathParams>();
45
+ const params = useParams<WorkspaceEditorPathParams>();
46
46
  const editorStore = useEditorStore();
47
47
  const applicationStore = useLegendStudioApplicationStore();
48
48
  const isInConflictResolutionMode = editorStore.isInConflictResolutionMode;
49
49
  // SDLC
50
50
  const projectId = params.projectId;
51
- const workspaceType = (params as { groupWorkspaceId: string | undefined })
52
- .groupWorkspaceId
51
+ const workspaceType = params.groupWorkspaceId
53
52
  ? WorkspaceType.GROUP
54
53
  : WorkspaceType.USER;
55
- const workspaceId =
56
- workspaceType === WorkspaceType.GROUP
57
- ? (params as GroupEditorPathParams).groupWorkspaceId
58
- : (params as EditorPathParams).workspaceId;
54
+ const workspaceId = guaranteeNonNullable(
55
+ params.groupWorkspaceId ?? params.workspaceId,
56
+ `Workspace/group workspace ID is not provided`,
57
+ );
59
58
  const currentProject = editorStore.sdlcState.currentProject;
60
59
  const goToWorkspaceUpdater = (): void =>
61
60
  editorStore.setActiveActivity(
@@ -155,8 +154,10 @@ export const StatusBar = observer((props: { actionsDisabled: boolean }) => {
155
154
  title="Go back to workspace setup using the specified project"
156
155
  tabIndex={-1}
157
156
  onClick={(): void =>
158
- applicationStore.navigator.goToLocation(
159
- generateSetupRoute(projectId),
157
+ applicationStore.navigator.visitAddress(
158
+ applicationStore.navigator.generateAddress(
159
+ generateSetupRoute(projectId),
160
+ ),
160
161
  )
161
162
  }
162
163
  >
@@ -168,8 +169,10 @@ export const StatusBar = observer((props: { actionsDisabled: boolean }) => {
168
169
  title="Go back to workspace setup using the specified workspace"
169
170
  tabIndex={-1}
170
171
  onClick={(): void =>
171
- applicationStore.navigator.goToLocation(
172
- generateSetupRoute(projectId, workspaceId, workspaceType),
172
+ applicationStore.navigator.visitAddress(
173
+ applicationStore.navigator.generateAddress(
174
+ generateSetupRoute(projectId, workspaceId, workspaceType),
175
+ ),
173
176
  )
174
177
  }
175
178
  >
@@ -57,7 +57,7 @@ export const AuxiliaryPanel = observer(() => {
57
57
  mode: AUX_PANEL_MODE.DEV_TOOL,
58
58
  name: 'DEVELOPER TOOLS',
59
59
  icon: undefined,
60
- isVisible: editorStore.isDevToolEnabled,
60
+ isVisible: true,
61
61
  },
62
62
  };
63
63
 
@@ -98,6 +98,8 @@ export const ProjectSearchCommand = observer(() => {
98
98
  <div className="modal search-modal modal--dark">
99
99
  <div className="project-search-command">
100
100
  <DropdownMenu
101
+ className="project-search-command__type"
102
+ title="Choose Element Type..."
101
103
  content={
102
104
  <div className="project-search-command__options">
103
105
  <div
@@ -118,22 +120,16 @@ export const ProjectSearchCommand = observer(() => {
118
120
  </div>
119
121
  }
120
122
  >
121
- <button
122
- className="project-search-command__type"
123
- tabIndex={-1}
124
- title="Choose Element Type..."
125
- >
126
- <div className="project-search-command__type__label">
127
- {elementType ? (
128
- getElementTypeIcon(editorStore, elementType)
129
- ) : (
130
- <MoreHorizontalIcon />
131
- )}
132
- </div>
133
- <div className="project-search-command__type__selector">
134
- <CaretDownIcon />
135
- </div>
136
- </button>
123
+ <div className="project-search-command__type__label">
124
+ {elementType ? (
125
+ getElementTypeIcon(editorStore, elementType)
126
+ ) : (
127
+ <MoreHorizontalIcon />
128
+ )}
129
+ </div>
130
+ <div className="project-search-command__type__selector">
131
+ <CaretDownIcon />
132
+ </div>
137
133
  </DropdownMenu>
138
134
  <CustomSelectorInput
139
135
  ref={selectorRef}
@@ -440,7 +440,8 @@ export const EditPanel = observer(() => {
440
440
  <div className="edit-panel__header__actions">
441
441
  {currentEditorState instanceof ElementEditorState && (
442
442
  <DropdownMenu
443
- className="edit-panel__view-mode"
443
+ className="edit-panel__view-mode__type"
444
+ title="View as..."
444
445
  content={
445
446
  <MenuContent
446
447
  data-testid={
@@ -503,23 +504,19 @@ export const EditPanel = observer(() => {
503
504
  transformOrigin: { vertical: 'top', horizontal: 'right' },
504
505
  }}
505
506
  >
506
- <button
507
- className="edit-panel__view-mode__type"
508
- title="View as..."
509
- >
510
- <div className="edit-panel__view-mode__type__label">
511
- {currentEditorState.generationViewMode
512
- ? editorStore.graphState.graphGenerationState.getFileGenerationConfiguration(
513
- currentEditorState.generationViewMode,
514
- ).label
515
- : currentEditorState.editMode}
516
- </div>
517
- </button>
507
+ <div className="edit-panel__view-mode__type__label">
508
+ {currentEditorState.generationViewMode
509
+ ? editorStore.graphState.graphGenerationState.getFileGenerationConfiguration(
510
+ currentEditorState.generationViewMode,
511
+ ).label
512
+ : currentEditorState.editMode}
513
+ </div>
518
514
  </DropdownMenu>
519
515
  )}
520
516
  {currentEditorState instanceof EntityDiffViewState && (
521
517
  <DropdownMenu
522
- className="edit-panel__view-mode"
518
+ className="edit-panel__view-mode__type"
519
+ title="View as..."
523
520
  content={
524
521
  <MenuContent
525
522
  data-testid={
@@ -550,14 +547,9 @@ export const EditPanel = observer(() => {
550
547
  transformOrigin: { vertical: 'top', horizontal: 'right' },
551
548
  }}
552
549
  >
553
- <button
554
- className="edit-panel__view-mode__type"
555
- title="View as..."
556
- >
557
- <div className="edit-panel__view-mode__type__label">
558
- {currentEditorState.diffMode}
559
- </div>
560
- </button>
550
+ <div className="edit-panel__view-mode__type__label">
551
+ {currentEditorState.diffMode}
552
+ </div>
561
553
  </DropdownMenu>
562
554
  )}
563
555
  </div>
@@ -29,7 +29,7 @@ import {
29
29
  } from '@finos/legend-art';
30
30
  import type { FileGenerationSpecification } from '@finos/legend-graph';
31
31
  import { useEditorStore } from '../EditorStoreProvider.js';
32
- import { StudioTextInputEditor } from '../../shared/StudioTextInputEditor.js';
32
+ import { TextInputEditor } from '@finos/legend-application';
33
33
 
34
34
  export const FileGenerationViewer = observer(() => {
35
35
  const editorStore = useEditorStore();
@@ -90,16 +90,14 @@ export const FileGenerationViewer = observer(() => {
90
90
  </div>
91
91
  </div>
92
92
  <PanelContent>
93
- {
94
- <StudioTextInputEditor
95
- inputValue={getTextContent(
96
- generatedFile.content,
97
- generatedFile.format,
98
- )}
99
- isReadOnly={true}
100
- language={getEditorLanguageFromFormat(generatedFile.format)}
101
- />
102
- }
93
+ <TextInputEditor
94
+ inputValue={getTextContent(
95
+ generatedFile.content,
96
+ generatedFile.format,
97
+ )}
98
+ isReadOnly={true}
99
+ language={getEditorLanguageFromFormat(generatedFile.format)}
100
+ />
103
101
  </PanelContent>
104
102
  </div>
105
103
  </Panel>
@@ -26,6 +26,7 @@ import {
26
26
  type ElementDragSource,
27
27
  } from '../../../stores/shared/DnDUtils.js';
28
28
  import {
29
+ assertErrorThrown,
29
30
  prettyCONSTName,
30
31
  UnsupportedOperationError,
31
32
  } from '@finos/legend-shared';
@@ -75,14 +76,19 @@ import {
75
76
  stub_TaggedValue,
76
77
  stub_Stereotype,
77
78
  stub_RawVariableExpression,
79
+ getFunctionNameWithPath,
80
+ getFunctionSignature,
78
81
  } from '@finos/legend-graph';
79
82
  import {
80
83
  type PackageableElementOption,
84
+ type ApplicationStore,
85
+ type LegendApplicationPlugin,
86
+ type LegendApplicationConfig,
87
+ type LegendApplicationPluginManager,
81
88
  useApplicationNavigationContext,
82
89
  useApplicationStore,
83
90
  buildElementOption,
84
91
  } from '@finos/legend-application';
85
- import { StudioLambdaEditor } from '../../shared/StudioLambdaEditor.js';
86
92
  import { getElementIcon } from '../../shared/ElementIconUtils.js';
87
93
  import {
88
94
  function_setReturnType,
@@ -101,6 +107,9 @@ import {
101
107
  rawVariableExpression_setType,
102
108
  } from '../../../stores/shared/modifier/RawValueSpecificationGraphModifierHelper.js';
103
109
  import { LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY } from '../../../stores/LegendStudioApplicationNavigationContext.js';
110
+ import { LambdaEditor } from '@finos/legend-query-builder';
111
+ import type { EditorStore } from '../../../stores/EditorStore.js';
112
+ import { graph_renameElement } from '../../../stores/shared/modifier/GraphModifierHelper.js';
104
113
 
105
114
  enum FUNCTION_PARAMETER_TYPE {
106
115
  CLASS = 'CLASS',
@@ -130,6 +139,31 @@ type FunctionParameterDragSource = {
130
139
 
131
140
  const FUNCTION_PARAMETER_DND_TYPE = 'FUNCTION_PARAMETER';
132
141
 
142
+ /**
143
+ * NOTE: every time we update the function signature (parameters, return value), we need to adjust the function path,
144
+ * therefore, we need to update the graph's function index.
145
+ */
146
+ const updateFunctionName = (
147
+ editorStore: EditorStore,
148
+ applicationStore: ApplicationStore<
149
+ LegendApplicationConfig,
150
+ LegendApplicationPluginManager<LegendApplicationPlugin>
151
+ >,
152
+ func: ConcreteFunctionDefinition,
153
+ ): void => {
154
+ try {
155
+ graph_renameElement(
156
+ editorStore.graphManagerState.graph,
157
+ func,
158
+ `${getFunctionNameWithPath(func)}${getFunctionSignature(func)}`,
159
+ editorStore.changeDetectionState.observerContext,
160
+ );
161
+ } catch (error) {
162
+ assertErrorThrown(error);
163
+ applicationStore.notifyError(error);
164
+ }
165
+ };
166
+
133
167
  const ParameterBasicEditor = observer(
134
168
  (props: {
135
169
  parameter: RawVariableExpression;
@@ -140,6 +174,7 @@ const ParameterBasicEditor = observer(
140
174
  const ref = useRef<HTMLDivElement>(null);
141
175
  const { parameter, _func, deleteParameter, isReadOnly } = props;
142
176
  const editorStore = useEditorStore();
177
+ const applicationStore = useApplicationStore();
143
178
  // Name
144
179
  const changeValue: React.ChangeEventHandler<HTMLInputElement> = (event) =>
145
180
  rawVariableExpression_setName(parameter, event.target.value);
@@ -159,7 +194,10 @@ const ParameterBasicEditor = observer(
159
194
  });
160
195
  const selectedType = { value: paramType, label: paramType.name };
161
196
  const changeType = (val: PackageableElementOption<Type>): void => {
162
- rawVariableExpression_setType(parameter, val.value);
197
+ if (val.value !== parameter.type.value) {
198
+ rawVariableExpression_setType(parameter, val.value);
199
+ updateFunctionName(editorStore, applicationStore, _func);
200
+ }
163
201
  setIsEditingType(false);
164
202
  };
165
203
  const openElement = (): void => {
@@ -192,6 +230,7 @@ const ParameterBasicEditor = observer(
192
230
  parameter,
193
231
  editorStore.graphManagerState.graph.getMultiplicity(lBound, uBound),
194
232
  );
233
+ updateFunctionName(editorStore, applicationStore, _func);
195
234
  }
196
235
  };
197
236
  const changeLowerBound: React.ChangeEventHandler<HTMLInputElement> = (
@@ -395,6 +434,7 @@ const ReturnTypeEditor = observer(
395
434
  const { functionElement, isReadOnly } = props;
396
435
  const { returnType, returnMultiplicity } = functionElement;
397
436
  const editorStore = useEditorStore();
437
+ const applicationStore = useApplicationStore();
398
438
  // Type
399
439
  const [isEditingType, setIsEditingType] = useState(false);
400
440
  const typeOptions =
@@ -412,6 +452,7 @@ const ReturnTypeEditor = observer(
412
452
  const changeType = (val: PackageableElementOption<Type>): void => {
413
453
  function_setReturnType(functionElement, val.value);
414
454
  setIsEditingType(false);
455
+ updateFunctionName(editorStore, applicationStore, functionElement);
415
456
  };
416
457
 
417
458
  const openElement = (): void => {
@@ -446,6 +487,7 @@ const ReturnTypeEditor = observer(
446
487
  functionElement,
447
488
  editorStore.graphManagerState.graph.getMultiplicity(lBound, uBound),
448
489
  );
490
+ updateFunctionName(editorStore, applicationStore, functionElement);
449
491
  }
450
492
  };
451
493
  const changeLowerBound: React.ChangeEventHandler<HTMLInputElement> = (
@@ -580,6 +622,7 @@ export const FunctionMainEditor = observer(
580
622
  functionEditorState: FunctionEditorState;
581
623
  }) => {
582
624
  const editorStore = useEditorStore();
625
+ const applicationStore = useApplicationStore();
583
626
  const defaultType = editorStore.graphManagerState.graph.getPrimitiveType(
584
627
  PRIMITIVE_TYPE.STRING,
585
628
  );
@@ -591,11 +634,13 @@ export const FunctionMainEditor = observer(
591
634
  functionElement,
592
635
  stub_RawVariableExpression(defaultType),
593
636
  );
637
+ updateFunctionName(editorStore, applicationStore, functionElement);
594
638
  };
595
639
  const deleteParameter =
596
640
  (val: RawVariableExpression): (() => void) =>
597
641
  (): void => {
598
642
  function_deleteParameter(functionElement, val);
643
+ updateFunctionName(editorStore, applicationStore, functionElement);
599
644
  };
600
645
  const handleDropParameter = useCallback(
601
646
  (item: UMLEditorElementDropTarget): void => {
@@ -604,9 +649,10 @@ export const FunctionMainEditor = observer(
604
649
  functionElement,
605
650
  stub_RawVariableExpression(item.data.packageableElement),
606
651
  );
652
+ updateFunctionName(editorStore, applicationStore, functionElement);
607
653
  }
608
654
  },
609
- [functionElement, isReadOnly],
655
+ [applicationStore, editorStore, functionElement, isReadOnly],
610
656
  );
611
657
  const [{ isParameterDragOver }, dropParameterRef] = useDrop<
612
658
  ElementDragSource,
@@ -685,7 +731,7 @@ export const FunctionMainEditor = observer(
685
731
  ),
686
732
  })}
687
733
  >
688
- <StudioLambdaEditor
734
+ <LambdaEditor
689
735
  className="function-editor__element__lambda-editor"
690
736
  disabled={
691
737
  lambdaEditorState.isConvertingFunctionBodyToString || isReadOnly
@@ -827,7 +873,7 @@ export const FunctionEditor = observer(() => {
827
873
  )}
828
874
  <div className="panel__header__title__label">function</div>
829
875
  <div className="panel__header__title__content">
830
- {functionElement.name}
876
+ {functionElement.functionName}
831
877
  </div>
832
878
  </div>
833
879
  </div>
@@ -20,7 +20,6 @@ import {
20
20
  type IDisposable,
21
21
  editor as monacoEditorAPI,
22
22
  languages as monacoLanguagesAPI,
23
- KeyCode,
24
23
  } from 'monaco-editor';
25
24
  import {
26
25
  ContextMenu,
@@ -28,7 +27,6 @@ import {
28
27
  setErrorMarkers,
29
28
  disposeEditor,
30
29
  baseTextEditorSettings,
31
- disableEditorHotKeys,
32
30
  resetLineNumberGutterWidth,
33
31
  clsx,
34
32
  WordWrapIcon,
@@ -46,6 +44,7 @@ import {
46
44
  useApplicationStore,
47
45
  type DocumentationEntry,
48
46
  useApplicationNavigationContext,
47
+ createPassThroughOnKeyHandler,
49
48
  } from '@finos/legend-application';
50
49
  import {
51
50
  type ElementDragSource,
@@ -817,22 +816,7 @@ export const GrammarTextEditor = observer(() => {
817
816
  // but if we do that on first load, the cursor will not jump to the current element
818
817
  // also, it's better to place that logic in an effect that watches for the regex string
819
818
  });
820
- _editor.onKeyDown((event) => {
821
- if (event.keyCode === KeyCode.F9) {
822
- event.preventDefault();
823
- event.stopPropagation();
824
- flowResult(editorStore.graphState.globalCompileInTextMode()).catch(
825
- applicationStore.alertUnhandledError,
826
- );
827
- } else if (event.keyCode === KeyCode.F8) {
828
- event.preventDefault();
829
- event.stopPropagation();
830
- flowResult(editorStore.toggleTextMode()).catch(
831
- applicationStore.alertUnhandledError,
832
- );
833
- }
834
- });
835
- disableEditorHotKeys(_editor);
819
+ _editor.onKeyDown(createPassThroughOnKeyHandler());
836
820
  _editor.focus(); // focus on the editor initially
837
821
  setEditor(_editor);
838
822
  }
@@ -39,13 +39,11 @@ import {
39
39
  import { flowResult } from 'mobx';
40
40
  import { useEditorStore } from '../EditorStoreProvider.js';
41
41
  import {
42
- ActionAlertType,
43
- ActionAlertActionType,
44
42
  useApplicationStore,
45
43
  EDITOR_LANGUAGE,
46
44
  useApplicationNavigationContext,
45
+ TextInputEditor,
47
46
  } from '@finos/legend-application';
48
- import { StudioTextInputEditor } from '../../shared/StudioTextInputEditor.js';
49
47
  import type { ModelImporterExtensionConfiguration } from '../../../stores/LegendStudioApplicationPlugin.js';
50
48
  import { LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY } from '../../../stores/LegendStudioApplicationNavigationContext.js';
51
49
  import { SCHEMA_SET_TAB_TYPE } from '../../../stores/editor-state/element-editor-state/external-format/DSL_ExternalFormat_SchemaSetEditorState.js';
@@ -151,36 +149,11 @@ export const ModelImporter = observer(() => {
151
149
  const label = modelImporterState.modelImportEditorState.label;
152
150
  const modelImportEditorState = modelImporterState.modelImportEditorState;
153
151
  const loadModel = (): void => {
154
- if (editorStore.localChangesState.hasUnpushedChanges) {
155
- editorStore.setActionAlertInfo({
156
- message: 'You have unpushed changes',
157
- prompt:
158
- 'This action will discard these changes and refresh the application',
159
- type: ActionAlertType.CAUTION,
160
- onEnter: (): void => editorStore.setBlockGlobalHotkeys(true),
161
- onClose: (): void => editorStore.setBlockGlobalHotkeys(false),
162
- actions: [
163
- {
164
- label: 'Proceed to load model',
165
- type: ActionAlertActionType.PROCEED_WITH_CAUTION,
166
- handler: (): void => {
167
- modelImporterState.modelImportEditorState
168
- .loadModel()
169
- .catch(applicationStore.alertUnhandledError);
170
- },
171
- },
172
- {
173
- label: 'Abort',
174
- type: ActionAlertActionType.PROCEED,
175
- default: true,
176
- },
177
- ],
178
- });
179
- } else {
152
+ editorStore.localChangesState.alertUnsavedChanges((): void => {
180
153
  modelImporterState.modelImportEditorState
181
154
  .loadModel()
182
155
  .catch(applicationStore.alertUnhandledError);
183
- }
156
+ });
184
157
  };
185
158
  useApplicationNavigationContext(
186
159
  LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY.MODEL_LOADER,
@@ -216,7 +189,7 @@ export const ModelImporter = observer(() => {
216
189
  modelImportEditorState.setModelText(val);
217
190
  return (
218
191
  <div className="panel__content model-loader__editor">
219
- <StudioTextInputEditor
192
+ <TextInputEditor
220
193
  language={
221
194
  modelImportEditorState.nativeType ===
222
195
  MODEL_IMPORT_NATIVE_INPUT_TYPE.PURE_GRAMMAR
@@ -246,6 +219,7 @@ export const ModelImporter = observer(() => {
246
219
  <div className="panel__header model-loader__header">
247
220
  <div className="model-loader__header__configs">
248
221
  <DropdownMenu
222
+ className="model-loader__header__configs__type"
249
223
  content={
250
224
  <MenuContent className="model-loader__header__configs__type__menu">
251
225
  <div className="model-loader__header__configs__type-option__group model-loader__header__configs__type-option__group--native">
@@ -325,13 +299,11 @@ export const ModelImporter = observer(() => {
325
299
  transformOrigin: { vertical: 'top', horizontal: 'right' },
326
300
  }}
327
301
  >
328
- <div className="model-loader__header__configs__type">
329
- <div className="model-loader__header__configs__type__label">
330
- {prettyCONSTName(label)}
331
- </div>
332
- <div className="model-loader__header__configs__type__icon">
333
- <CaretDownIcon />
334
- </div>
302
+ <div className="model-loader__header__configs__type__label">
303
+ {prettyCONSTName(label)}
304
+ </div>
305
+ <div className="model-loader__header__configs__type__icon">
306
+ <CaretDownIcon />
335
307
  </div>
336
308
  </DropdownMenu>
337
309
  {modelImportEditorState.allowHardReplace && (
@@ -47,6 +47,7 @@ import {
47
47
  import { capitalize } from '@finos/legend-shared';
48
48
  import {
49
49
  EDITOR_LANGUAGE,
50
+ TextInputEditor,
50
51
  useApplicationStore,
51
52
  } from '@finos/legend-application';
52
53
  import {
@@ -54,7 +55,6 @@ import {
54
55
  renderColumnTypeIcon,
55
56
  } from './DatabaseEditorHelper.js';
56
57
  import { flowResult } from 'mobx';
57
- import { StudioTextInputEditor } from '../../../shared/StudioTextInputEditor.js';
58
58
 
59
59
  const getNodeIcon = (node: DatabaseBuilderTreeNodeData): React.ReactNode => {
60
60
  if (node instanceof SchemaDatabaseBuilderTreeNodeData) {
@@ -338,7 +338,7 @@ export const DatabaseBuilder = observer(
338
338
  </div>
339
339
  </div>
340
340
  <PanelContent>
341
- <StudioTextInputEditor
341
+ <TextInputEditor
342
342
  language={EDITOR_LANGUAGE.PURE}
343
343
  inputValue={databaseBuilderState.databaseGrammarCode}
344
344
  isReadOnly={true}
@@ -29,7 +29,6 @@ import {
29
29
  CustomSelectorInput,
30
30
  ErrorIcon,
31
31
  PanelHeader,
32
- PanelHeaderActionItem,
33
32
  PlusIcon,
34
33
  PanelFormTextEditor,
35
34
  ContextMenu,
@@ -46,6 +45,7 @@ import {
46
45
  PanelListSelectorItemLabel,
47
46
  PanelSection,
48
47
  PanelFormBooleanEditor,
48
+ PanelHeaderActions,
49
49
  } from '@finos/legend-art';
50
50
  import { capitalize, prettyCONSTName } from '@finos/legend-shared';
51
51
 
@@ -79,8 +79,8 @@ import {
79
79
  EDITOR_LANGUAGE,
80
80
  buildElementOption,
81
81
  type PackageableElementOption,
82
+ TextInputEditor,
82
83
  } from '@finos/legend-application';
83
- import { StudioTextInputEditor } from '../../../shared/StudioTextInputEditor.js';
84
84
  import { connection_setStore } from '../../../../stores/shared/modifier/DSL_Mapping_GraphModifierHelper.js';
85
85
  import {
86
86
  apiTokenAuthenticationStrategy_setApiToken,
@@ -153,7 +153,7 @@ const LocalH2DatasourceSpecificationEditor = observer(
153
153
  {capitalize('test data setup SQL')}
154
154
  </div>
155
155
  <div className="panel__content__form__section__text-editor">
156
- <StudioTextInputEditor
156
+ <TextInputEditor
157
157
  inputValue={SQLValue}
158
158
  updateInput={(value: string | undefined): void =>
159
159
  localH2DatasourceSpecification_setTestDataSetupSqls(
@@ -1024,39 +1024,38 @@ const PostProcessorRelationalConnectionEditor = observer(
1024
1024
  <ResizablePanel size={200} minSize={100}>
1025
1025
  <Panel>
1026
1026
  <PanelHeader title="post-processor">
1027
- <DropdownMenu
1028
- disabled={isReadOnly}
1029
- content={postProcessorOptions.map(
1030
- (postProcessorType) => (
1031
- <MenuContentItem
1032
- key={postProcessorType.value}
1033
- onClick={addPostProcessor(
1034
- postProcessorType.value,
1035
- )}
1036
- >
1037
- New {postProcessorType.label} Post-Processor
1038
- </MenuContentItem>
1039
- ),
1040
- )}
1041
- menuProps={{
1042
- anchorOrigin: {
1043
- vertical: 'bottom',
1044
- horizontal: 'right',
1045
- },
1046
- transformOrigin: {
1047
- vertical: 'top',
1048
- horizontal: 'right',
1049
- },
1050
- elevation: 7,
1051
- }}
1052
- >
1053
- <PanelHeaderActionItem
1027
+ <PanelHeaderActions>
1028
+ <DropdownMenu
1029
+ title="Create post-processor"
1030
+ className="panel__header__action"
1054
1031
  disabled={isReadOnly}
1055
- title="Create Post-Processor"
1032
+ content={postProcessorOptions.map(
1033
+ (postProcessorType) => (
1034
+ <MenuContentItem
1035
+ key={postProcessorType.value}
1036
+ onClick={addPostProcessor(
1037
+ postProcessorType.value,
1038
+ )}
1039
+ >
1040
+ New {postProcessorType.label} Post-Processor
1041
+ </MenuContentItem>
1042
+ ),
1043
+ )}
1044
+ menuProps={{
1045
+ anchorOrigin: {
1046
+ vertical: 'bottom',
1047
+ horizontal: 'right',
1048
+ },
1049
+ transformOrigin: {
1050
+ vertical: 'top',
1051
+ horizontal: 'right',
1052
+ },
1053
+ elevation: 7,
1054
+ }}
1056
1055
  >
1057
1056
  <PlusIcon />
1058
- </PanelHeaderActionItem>
1059
- </DropdownMenu>
1057
+ </DropdownMenu>
1058
+ </PanelHeaderActions>
1060
1059
  </PanelHeader>
1061
1060
  <PanelContent>
1062
1061
  {postProcessors.map((postProcessor, idx) => (