@finos/legend-application-studio 15.2.0 → 16.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/lib/application/LegendStudio.d.ts.map +1 -1
  2. package/lib/application/LegendStudio.js +5 -2
  3. package/lib/application/LegendStudio.js.map +1 -1
  4. package/lib/application/LegendStudioPluginManager.js +2 -2
  5. package/lib/application/LegendStudioPluginManager.js.map +1 -1
  6. package/lib/components/DSLExternalFormat_LegendStudioApplicationPlugin.d.ts +4 -4
  7. package/lib/components/DSLExternalFormat_LegendStudioApplicationPlugin.d.ts.map +1 -1
  8. package/lib/components/DSLExternalFormat_LegendStudioApplicationPlugin.js +3 -3
  9. package/lib/components/DSLExternalFormat_LegendStudioApplicationPlugin.js.map +1 -1
  10. package/lib/components/EditorComponentTestUtils.d.ts +10 -2
  11. package/lib/components/EditorComponentTestUtils.d.ts.map +1 -1
  12. package/lib/components/EditorComponentTestUtils.js +24 -18
  13. package/lib/components/EditorComponentTestUtils.js.map +1 -1
  14. package/lib/components/EmbeddedQueryBuilder.d.ts +19 -0
  15. package/lib/components/EmbeddedQueryBuilder.d.ts.map +1 -0
  16. package/lib/components/EmbeddedQueryBuilder.js +80 -0
  17. package/lib/components/EmbeddedQueryBuilder.js.map +1 -0
  18. package/lib/components/LegendStudioApplication.d.ts +0 -1
  19. package/lib/components/LegendStudioApplication.d.ts.map +1 -1
  20. package/lib/components/editor/Editor.d.ts.map +1 -1
  21. package/lib/components/editor/Editor.js +12 -13
  22. package/lib/components/editor/Editor.js.map +1 -1
  23. package/lib/components/editor/StatusBar.d.ts +0 -1
  24. package/lib/components/editor/StatusBar.d.ts.map +1 -1
  25. package/lib/components/editor/aux-panel/AuxiliaryPanel.d.ts +0 -1
  26. package/lib/components/editor/aux-panel/AuxiliaryPanel.d.ts.map +1 -1
  27. package/lib/components/editor/aux-panel/Console.d.ts +0 -1
  28. package/lib/components/editor/aux-panel/Console.d.ts.map +1 -1
  29. package/lib/components/editor/aux-panel/DevTool.d.ts +0 -1
  30. package/lib/components/editor/aux-panel/DevTool.d.ts.map +1 -1
  31. package/lib/components/editor/command-center/ProjectSearchCommand.d.ts +0 -1
  32. package/lib/components/editor/command-center/ProjectSearchCommand.d.ts.map +1 -1
  33. package/lib/components/editor/edit-panel/FileGenerationViewer.d.ts +0 -1
  34. package/lib/components/editor/edit-panel/FileGenerationViewer.d.ts.map +1 -1
  35. package/lib/components/editor/edit-panel/FunctionEditor.d.ts +0 -1
  36. package/lib/components/editor/edit-panel/FunctionEditor.d.ts.map +1 -1
  37. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts +0 -1
  38. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts.map +1 -1
  39. package/lib/components/editor/edit-panel/GrammarTextEditor.d.ts.map +1 -1
  40. package/lib/components/editor/edit-panel/GrammarTextEditor.js +15 -3
  41. package/lib/components/editor/edit-panel/GrammarTextEditor.js.map +1 -1
  42. package/lib/components/editor/edit-panel/ModelImporter.d.ts +0 -1
  43. package/lib/components/editor/edit-panel/ModelImporter.d.ts.map +1 -1
  44. package/lib/components/editor/edit-panel/RuntimeEditor.d.ts +0 -1
  45. package/lib/components/editor/edit-panel/RuntimeEditor.d.ts.map +1 -1
  46. package/lib/components/editor/edit-panel/UnsupportedElementEditor.d.ts +0 -1
  47. package/lib/components/editor/edit-panel/UnsupportedElementEditor.d.ts.map +1 -1
  48. package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts +0 -1
  49. package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts.map +1 -1
  50. package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.d.ts +0 -1
  51. package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.d.ts.map +1 -1
  52. package/lib/components/editor/edit-panel/connection-editor/FlatDataConnectionEditor.d.ts +0 -1
  53. package/lib/components/editor/edit-panel/connection-editor/FlatDataConnectionEditor.d.ts.map +1 -1
  54. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts +0 -1
  55. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts.map +1 -1
  56. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js +2 -2
  57. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
  58. package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts +0 -1
  59. package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts.map +1 -1
  60. package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js.map +1 -1
  61. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts +0 -1
  62. package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts.map +1 -1
  63. package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.d.ts +0 -1
  64. package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.d.ts.map +1 -1
  65. package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.d.ts +0 -1
  66. package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.d.ts.map +1 -1
  67. package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.d.ts +0 -1
  68. package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.d.ts.map +1 -1
  69. package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts +0 -1
  70. package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts.map +1 -1
  71. package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.d.ts +0 -1
  72. package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.d.ts.map +1 -1
  73. package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.d.ts +0 -1
  74. package/lib/components/editor/edit-panel/external-format-editor/BindingElementEditor.d.ts.map +1 -1
  75. package/lib/components/editor/edit-panel/external-format-editor/ExternalFormatConnectionEditor.d.ts +0 -1
  76. package/lib/components/editor/edit-panel/external-format-editor/ExternalFormatConnectionEditor.d.ts.map +1 -1
  77. package/lib/components/editor/edit-panel/external-format-editor/NewSchemaSetDriver.d.ts +0 -1
  78. package/lib/components/editor/edit-panel/external-format-editor/NewSchemaSetDriver.d.ts.map +1 -1
  79. package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.d.ts +0 -1
  80. package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.d.ts.map +1 -1
  81. package/lib/components/editor/edit-panel/external-format-editor/SchemaSetModelGenerationEditor.d.ts +0 -1
  82. package/lib/components/editor/edit-panel/external-format-editor/SchemaSetModelGenerationEditor.d.ts.map +1 -1
  83. package/lib/components/editor/edit-panel/mapping-editor/ClassMappingEditor.d.ts +0 -1
  84. package/lib/components/editor/edit-panel/mapping-editor/ClassMappingEditor.d.ts.map +1 -1
  85. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts +0 -1
  86. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -1
  87. package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.d.ts +0 -1
  88. package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.d.ts.map +1 -1
  89. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts +0 -1
  90. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts.map +1 -1
  91. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.d.ts +0 -1
  92. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.d.ts.map +1 -1
  93. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts +0 -1
  94. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts.map +1 -1
  95. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js +40 -8
  96. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js.map +1 -1
  97. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.d.ts +18 -0
  98. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.d.ts.map +1 -0
  99. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.js +38 -0
  100. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.js.map +1 -0
  101. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts +0 -1
  102. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts.map +1 -1
  103. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js +40 -8
  104. package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js.map +1 -1
  105. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts +0 -1
  106. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts.map +1 -1
  107. package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.d.ts +0 -1
  108. package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.d.ts.map +1 -1
  109. package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.d.ts +0 -1
  110. package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.d.ts.map +1 -1
  111. package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.d.ts +0 -1
  112. package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.d.ts.map +1 -1
  113. package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.d.ts +0 -1
  114. package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.d.ts.map +1 -1
  115. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts +0 -1
  116. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts.map +1 -1
  117. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js +52 -8
  118. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -1
  119. package/lib/components/editor/edit-panel/service-editor/NewServiceModal.d.ts +0 -1
  120. package/lib/components/editor/edit-panel/service-editor/NewServiceModal.d.ts.map +1 -1
  121. package/lib/components/editor/edit-panel/service-editor/ServiceEditor.d.ts +0 -1
  122. package/lib/components/editor/edit-panel/service-editor/ServiceEditor.d.ts.map +1 -1
  123. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts +0 -1
  124. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts.map +1 -1
  125. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts +0 -1
  126. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts.map +1 -1
  127. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js +58 -10
  128. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
  129. package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.d.ts +0 -1
  130. package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.d.ts.map +1 -1
  131. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.d.ts +0 -1
  132. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.d.ts.map +1 -1
  133. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts +0 -1
  134. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts.map +1 -1
  135. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.d.ts +0 -1
  136. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.d.ts.map +1 -1
  137. package/lib/components/editor/edit-panel/testable/TestAssertionEditor.d.ts +0 -1
  138. package/lib/components/editor/edit-panel/testable/TestAssertionEditor.d.ts.map +1 -1
  139. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts +0 -1
  140. package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts.map +1 -1
  141. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts +0 -1
  142. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts.map +1 -1
  143. package/lib/components/editor/edit-panel/uml-editor/ClassQueryBuilder.d.ts +19 -0
  144. package/lib/components/editor/edit-panel/uml-editor/ClassQueryBuilder.d.ts.map +1 -0
  145. package/lib/components/editor/edit-panel/uml-editor/ClassQueryBuilder.js +80 -0
  146. package/lib/components/editor/edit-panel/uml-editor/ClassQueryBuilder.js.map +1 -0
  147. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts +0 -1
  148. package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts.map +1 -1
  149. package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.d.ts +0 -1
  150. package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.d.ts.map +1 -1
  151. package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.d.ts +0 -1
  152. package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.d.ts.map +1 -1
  153. package/lib/components/editor/edit-panel/uml-editor/UMLEditor.d.ts +0 -1
  154. package/lib/components/editor/edit-panel/uml-editor/UMLEditor.d.ts.map +1 -1
  155. package/lib/components/editor/side-bar/CreateNewElementModal.d.ts +0 -1
  156. package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
  157. package/lib/components/editor/side-bar/Explorer.d.ts +0 -1
  158. package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
  159. package/lib/components/editor/side-bar/Explorer.js +15 -8
  160. package/lib/components/editor/side-bar/Explorer.js.map +1 -1
  161. package/lib/components/editor/side-bar/LocalChanges.d.ts +0 -1
  162. package/lib/components/editor/side-bar/LocalChanges.d.ts.map +1 -1
  163. package/lib/components/editor/side-bar/ProjectOverview.d.ts +0 -1
  164. package/lib/components/editor/side-bar/ProjectOverview.d.ts.map +1 -1
  165. package/lib/components/editor/side-bar/SideBar.d.ts +0 -1
  166. package/lib/components/editor/side-bar/SideBar.d.ts.map +1 -1
  167. package/lib/components/editor/side-bar/WorkflowManager.d.ts +0 -1
  168. package/lib/components/editor/side-bar/WorkflowManager.d.ts.map +1 -1
  169. package/lib/components/editor/side-bar/WorkspaceReview.d.ts +0 -1
  170. package/lib/components/editor/side-bar/WorkspaceReview.d.ts.map +1 -1
  171. package/lib/components/editor/side-bar/WorkspaceSyncConflictResolver.d.ts +0 -1
  172. package/lib/components/editor/side-bar/WorkspaceSyncConflictResolver.d.ts.map +1 -1
  173. package/lib/components/editor/side-bar/WorkspaceUpdateConflictResolver.d.ts +0 -1
  174. package/lib/components/editor/side-bar/WorkspaceUpdateConflictResolver.d.ts.map +1 -1
  175. package/lib/components/editor/side-bar/WorkspaceUpdater.d.ts +0 -1
  176. package/lib/components/editor/side-bar/WorkspaceUpdater.d.ts.map +1 -1
  177. package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts +0 -1
  178. package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts.map +1 -1
  179. package/lib/components/project-viewer/ProjectViewer.d.ts.map +1 -1
  180. package/lib/components/project-viewer/ProjectViewer.js +5 -6
  181. package/lib/components/project-viewer/ProjectViewer.js.map +1 -1
  182. package/lib/components/shared/DiffView.d.ts +0 -1
  183. package/lib/components/shared/DiffView.d.ts.map +1 -1
  184. package/lib/components/shared/StudioLambdaEditor.d.ts +0 -1
  185. package/lib/components/shared/StudioLambdaEditor.d.ts.map +1 -1
  186. package/lib/components/workspace-review/WorkspaceReviewPanel.d.ts +0 -1
  187. package/lib/components/workspace-review/WorkspaceReviewPanel.d.ts.map +1 -1
  188. package/lib/components/workspace-review/WorkspaceReviewSideBar.d.ts +0 -1
  189. package/lib/components/workspace-review/WorkspaceReviewSideBar.d.ts.map +1 -1
  190. package/lib/components/workspace-setup/ProjectCreateModal.d.ts +0 -1
  191. package/lib/components/workspace-setup/ProjectCreateModal.d.ts.map +1 -1
  192. package/lib/index.css +2 -2
  193. package/lib/index.css.map +1 -1
  194. package/lib/index.d.ts +1 -1
  195. package/lib/index.d.ts.map +1 -1
  196. package/lib/index.js +1 -1
  197. package/lib/index.js.map +1 -1
  198. package/lib/package.json +5 -5
  199. package/lib/stores/DSLMapping_LegendStudioApplicationPlugin_Extension.d.ts +0 -18
  200. package/lib/stores/DSLMapping_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -1
  201. package/lib/stores/DSLService_LegendStudioApplicationPlugin_Extension.d.ts +0 -10
  202. package/lib/stores/DSLService_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -1
  203. package/lib/stores/EditorGraphState.d.ts.map +1 -1
  204. package/lib/stores/EditorGraphState.js +37 -9
  205. package/lib/stores/EditorGraphState.js.map +1 -1
  206. package/lib/stores/EditorStore.d.ts +2 -0
  207. package/lib/stores/EditorStore.d.ts.map +1 -1
  208. package/lib/stores/EditorStore.js +3 -0
  209. package/lib/stores/EditorStore.js.map +1 -1
  210. package/lib/stores/EmbeddedQueryBuilderState.d.ts +40 -0
  211. package/lib/stores/EmbeddedQueryBuilderState.d.ts.map +1 -0
  212. package/lib/stores/EmbeddedQueryBuilderState.js +80 -0
  213. package/lib/stores/EmbeddedQueryBuilderState.js.map +1 -0
  214. package/lib/stores/LegendStudioAppEvent.d.ts +2 -1
  215. package/lib/stores/LegendStudioAppEvent.d.ts.map +1 -1
  216. package/lib/stores/LegendStudioAppEvent.js +1 -0
  217. package/lib/stores/LegendStudioAppEvent.js.map +1 -1
  218. package/lib/stores/LegendStudioApplicationNavigationContext.d.ts +1 -0
  219. package/lib/stores/LegendStudioApplicationNavigationContext.d.ts.map +1 -1
  220. package/lib/stores/LegendStudioApplicationNavigationContext.js +1 -0
  221. package/lib/stores/LegendStudioApplicationNavigationContext.js.map +1 -1
  222. package/lib/stores/LegendStudioApplicationPlugin.d.ts +7 -7
  223. package/lib/stores/LegendStudioApplicationPlugin.d.ts.map +1 -1
  224. package/lib/stores/LegendStudioCodeSnippets.d.ts +2 -0
  225. package/lib/stores/LegendStudioCodeSnippets.d.ts.map +1 -1
  226. package/lib/stores/LegendStudioCodeSnippets.js +28 -0
  227. package/lib/stores/LegendStudioCodeSnippets.js.map +1 -1
  228. package/lib/stores/StoreRelational_LegendStudioApplicationPlugin_Extension.d.ts +13 -5
  229. package/lib/stores/StoreRelational_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -1
  230. package/lib/stores/editor-state/ProjectConfigurationEditorState.d.ts +11 -1
  231. package/lib/stores/editor-state/ProjectConfigurationEditorState.d.ts.map +1 -1
  232. package/lib/stores/editor-state/ProjectConfigurationEditorState.js +66 -1
  233. package/lib/stores/editor-state/ProjectConfigurationEditorState.js.map +1 -1
  234. package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.js +9 -9
  235. package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.js.map +1 -1
  236. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.d.ts +29 -0
  237. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.d.ts.map +1 -0
  238. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.js +42 -0
  239. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.js.map +1 -0
  240. package/lib/stores/shared/DnDUtil.js +1 -1
  241. package/lib/stores/shared/PackageTreeUtil.js +6 -6
  242. package/lib/stores/shared/PackageTreeUtil.js.map +1 -1
  243. package/package.json +13 -13
  244. package/src/application/LegendStudio.tsx +8 -2
  245. package/src/application/LegendStudioPluginManager.ts +2 -2
  246. package/src/components/DSLExternalFormat_LegendStudioApplicationPlugin.tsx +5 -5
  247. package/src/components/EditorComponentTestUtils.tsx +29 -23
  248. package/src/components/EmbeddedQueryBuilder.tsx +165 -0
  249. package/src/components/editor/Editor.tsx +77 -79
  250. package/src/components/editor/edit-panel/GrammarTextEditor.tsx +24 -2
  251. package/src/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.tsx +2 -2
  252. package/src/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.tsx +1 -0
  253. package/src/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.tsx +88 -15
  254. package/src/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.tsx +93 -0
  255. package/src/components/editor/edit-panel/mapping-editor/MappingTestEditor.tsx +81 -16
  256. package/src/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.tsx +170 -4
  257. package/src/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.tsx +115 -20
  258. package/src/components/editor/edit-panel/uml-editor/ClassQueryBuilder.tsx +159 -0
  259. package/src/components/editor/side-bar/Explorer.tsx +20 -10
  260. package/src/components/project-viewer/ProjectViewer.tsx +36 -38
  261. package/src/index.ts +1 -1
  262. package/src/stores/DSLMapping_LegendStudioApplicationPlugin_Extension.ts +0 -27
  263. package/src/stores/DSLService_LegendStudioApplicationPlugin_Extension.ts +0 -14
  264. package/src/stores/EditorGraphState.ts +56 -11
  265. package/src/stores/EditorStore.ts +3 -0
  266. package/src/stores/EmbeddedQueryBuilderState.ts +105 -0
  267. package/src/stores/LegendStudioAppEvent.ts +1 -0
  268. package/src/stores/LegendStudioApplicationNavigationContext.ts +1 -0
  269. package/src/stores/LegendStudioApplicationPlugin.ts +7 -7
  270. package/src/stores/LegendStudioCodeSnippets.ts +34 -0
  271. package/src/stores/StoreRelational_LegendStudioApplicationPlugin_Extension.ts +19 -5
  272. package/src/stores/editor-state/ProjectConfigurationEditorState.ts +104 -1
  273. package/src/stores/editor-state/element-editor-state/connection/ConnectionEditorState.ts +9 -9
  274. package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionQueryBuilderState.ts +58 -0
  275. package/src/stores/shared/DnDUtil.ts +1 -1
  276. package/src/stores/shared/PackageTreeUtil.ts +6 -6
  277. package/tsconfig.json +5 -0
@@ -16,8 +16,6 @@
16
16
 
17
17
  import { useEffect, Fragment } from 'react';
18
18
  import { observer } from 'mobx-react-lite';
19
- import { DndProvider } from 'react-dnd';
20
- import { HTML5Backend } from 'react-dnd-html5-backend';
21
19
  import { useResizeDetector } from 'react-resize-detector';
22
20
  import { EditPanel } from '../editor/edit-panel/EditPanel.js';
23
21
  import { GrammarTextEditor } from '../editor/edit-panel/GrammarTextEditor.js';
@@ -68,6 +66,7 @@ import { Explorer } from '../editor/side-bar/Explorer.js';
68
66
  import { ProjectOverview } from '../editor/side-bar/ProjectOverview.js';
69
67
  import { WorkflowManager } from '../editor/side-bar/WorkflowManager.js';
70
68
  import { useLegendStudioApplicationStore } from '../LegendStudioBaseStoreProvider.js';
69
+ import { EmbeddedQueryBuilder } from '../EmbeddedQueryBuilder.js';
71
70
 
72
71
  const ProjectViewerStatusBar = observer(() => {
73
72
  const params = useParams<ViewerPathParams>();
@@ -313,45 +312,44 @@ export const ProjectViewer = withEditorStore(
313
312
  }, [applicationStore, viewerStore, params]);
314
313
 
315
314
  return (
316
- <DndProvider backend={HTML5Backend}>
317
- <div className="app__page">
318
- <div className="editor viewer">
319
- <GlobalHotKeys keyMap={keyMap} handlers={handlers}>
320
- <div className="editor__body">
321
- <ProjectViewerActivityBar />
322
- <div ref={ref} className="editor__content-container">
323
- <div className="editor__content">
324
- <ResizablePanelGroup orientation="vertical">
325
- <ResizablePanel
326
- {...getControlledResizablePanelProps(
327
- editorStore.sideBarDisplayState.size === 0,
328
- {
329
- onStopResize: resizeSideBar,
330
- size: editorStore.sideBarDisplayState.size,
331
- },
332
- )}
333
- direction={1}
334
- >
335
- <ProjectViewerSideBar />
336
- </ResizablePanel>
337
- <ResizablePanelSplitter />
338
- <ResizablePanel minSize={300}>
339
- {editorStore.isInFormMode && <EditPanel />}
340
- {editorStore.isInGrammarTextMode && (
341
- <GrammarTextEditor />
342
- )}
343
- </ResizablePanel>
344
- </ResizablePanelGroup>
345
- </div>
315
+ <div className="app__page">
316
+ <div className="editor viewer">
317
+ <GlobalHotKeys keyMap={keyMap} handlers={handlers}>
318
+ <div className="editor__body">
319
+ <ProjectViewerActivityBar />
320
+ <div ref={ref} className="editor__content-container">
321
+ <div className="editor__content">
322
+ <ResizablePanelGroup orientation="vertical">
323
+ <ResizablePanel
324
+ {...getControlledResizablePanelProps(
325
+ editorStore.sideBarDisplayState.size === 0,
326
+ {
327
+ onStopResize: resizeSideBar,
328
+ size: editorStore.sideBarDisplayState.size,
329
+ },
330
+ )}
331
+ direction={1}
332
+ >
333
+ <ProjectViewerSideBar />
334
+ </ResizablePanel>
335
+ <ResizablePanelSplitter />
336
+ <ResizablePanel minSize={300}>
337
+ {editorStore.isInFormMode && <EditPanel />}
338
+ {editorStore.isInGrammarTextMode && (
339
+ <GrammarTextEditor />
340
+ )}
341
+ </ResizablePanel>
342
+ </ResizablePanelGroup>
346
343
  </div>
347
344
  </div>
348
- <ProjectViewerStatusBar />
349
- {extraEditorExtensionComponents}
350
- {allowOpeningElement && <ProjectSearchCommand />}
351
- </GlobalHotKeys>
352
- </div>
345
+ </div>
346
+ {allowOpeningElement && <ProjectSearchCommand />}
347
+ <ProjectViewerStatusBar />
348
+ <EmbeddedQueryBuilder />
349
+ {extraEditorExtensionComponents}
350
+ </GlobalHotKeys>
353
351
  </div>
354
- </DndProvider>
352
+ </div>
355
353
  );
356
354
  }),
357
355
  ),
package/src/index.ts CHANGED
@@ -21,9 +21,9 @@ export * from './application/LegendStudio.js';
21
21
  export * from './application/LegendStudioApplicationConfig.js';
22
22
  export * from './application/LegendStudioPluginManager.js';
23
23
  export * from './stores/LegendStudioAppEvent.js';
24
+ export { queryClass } from './components/editor/edit-panel/uml-editor/ClassQueryBuilder.js';
24
25
 
25
26
  // stores
26
- export { FormModeCompilationOutcome } from './stores/EditorGraphState.js';
27
27
  export * from './stores/LegendStudioApplicationPlugin.js';
28
28
  export * from './stores/EditorStore.js';
29
29
  export * from './stores/EditorConfig.js';
@@ -23,8 +23,6 @@ import type {
23
23
  SetImplementation,
24
24
  InstanceSetImplementation,
25
25
  } from '@finos/legend-graph';
26
- import type { MappingTestState } from './editor-state/element-editor-state/mapping/MappingTestState.js';
27
- import type { MappingExecutionState } from './editor-state/element-editor-state/mapping/MappingExecutionState.js';
28
26
  import type { NewConnectionValueDriver } from './editor/NewElementState.js';
29
27
  import type {
30
28
  MappingElement,
@@ -95,21 +93,6 @@ export type NewConnectionDriverCreator = (
95
93
  store: Store,
96
94
  ) => NewConnectionValueDriver<Connection> | undefined;
97
95
 
98
- export type MappingExecutionQueryEditorActionConfiguration = {
99
- key: string;
100
- renderer: (
101
- executionState: MappingExecutionState,
102
- ) => React.ReactNode | undefined;
103
- };
104
-
105
- export type MappingTestQueryEditorActionConfiguration = {
106
- key: string;
107
- renderer: (
108
- testState: MappingTestState,
109
- isReadOnly: boolean,
110
- ) => React.ReactNode | undefined;
111
- };
112
-
113
96
  /**
114
97
  * @returns a boolean indicating whether the update has ocurred or not
115
98
  */
@@ -192,16 +175,6 @@ export interface DSLMapping_LegendStudioApplicationPlugin_Extension
192
175
  */
193
176
  getExtraNewConnectionDriverCreators?(): NewConnectionDriverCreator[];
194
177
 
195
- /**
196
- * Get the list of actions for mapping execution query editor.
197
- */
198
- getExtraMappingExecutionQueryEditorActionConfigurations?(): MappingExecutionQueryEditorActionConfiguration[];
199
-
200
- /**
201
- * Get the list of actions for mapping test query editor.
202
- */
203
- getExtraMappingTestQueryEditorActionConfigurations?(): MappingTestQueryEditorActionConfiguration[];
204
-
205
178
  /**
206
179
  * Get the list of instance set implementation source updaters.
207
180
  */
@@ -16,15 +16,6 @@
16
16
 
17
17
  import type { DSL_LegendStudioApplicationPlugin_Extension } from './LegendStudioApplicationPlugin.js';
18
18
  import type { Connection, Runtime } from '@finos/legend-graph';
19
- import type { ServicePureExecutionState } from './editor-state/element-editor-state/service/ServiceExecutionState.js';
20
-
21
- export type ServiceQueryEditorActionConfiguration = {
22
- key: string;
23
- renderer: (
24
- executionState: ServicePureExecutionState,
25
- isReadOnly: boolean,
26
- ) => React.ReactNode | undefined;
27
- };
28
19
 
29
20
  export type ServiceTestRuntimeConnectionBuilder = (
30
21
  sourceConnection: Connection,
@@ -34,11 +25,6 @@ export type ServiceTestRuntimeConnectionBuilder = (
34
25
 
35
26
  export interface DSLService_LegendStudioApplicationPlugin_Extension
36
27
  extends DSL_LegendStudioApplicationPlugin_Extension {
37
- /**
38
- * Get the list of actions for service execution query editor.
39
- */
40
- getExtraServiceQueryEditorActionConfigurations?(): ServiceQueryEditorActionConfiguration[];
41
-
42
28
  /**
43
29
  * Get the list of service test runtime connection builder for a provided connection and test data.
44
30
  */
@@ -50,6 +50,7 @@ import {
50
50
  ProjectData,
51
51
  ProjectDependencyCoordinates,
52
52
  generateGAVCoordinates,
53
+ ProjectDependencyInfo,
53
54
  } from '@finos/legend-server-depot';
54
55
  import {
55
56
  type SetImplementation,
@@ -95,7 +96,10 @@ import {
95
96
  ActionAlertActionType,
96
97
  ActionAlertType,
97
98
  } from '@finos/legend-application';
98
- import { CONFIGURATION_EDITOR_TAB } from './editor-state/ProjectConfigurationEditorState.js';
99
+ import {
100
+ CONFIGURATION_EDITOR_TAB,
101
+ getConflictsString,
102
+ } from './editor-state/ProjectConfigurationEditorState.js';
99
103
  import type { DSLMapping_LegendStudioApplicationPlugin_Extension } from './DSLMapping_LegendStudioApplicationPlugin_Extension.js';
100
104
  import { graph_dispose } from './graphModifier/GraphModifierHelper.js';
101
105
  import {
@@ -103,6 +107,7 @@ import {
103
107
  SET_IMPLEMENTATION_TYPE,
104
108
  } from './shared/ModelUtil.js';
105
109
  import { GlobalTestRunnerState } from './sidebar-state/testable/GlobalTestRunnerState.js';
110
+ import { LEGEND_STUDIO_APP_EVENT } from './LegendStudioAppEvent.js';
106
111
 
107
112
  export enum GraphBuilderStatus {
108
113
  SUCCEEDED = 'SUCCEEDED',
@@ -1056,7 +1061,7 @@ export class EditorGraphState {
1056
1061
  const dependencyEntities = dependencyEntitiesJson.map((e) =>
1057
1062
  ProjectVersionEntities.serialization.fromJson(e),
1058
1063
  );
1059
- const dependencyProjects = new Set<string>();
1064
+ const dependencyProjects = new Map<string, Set<string>>();
1060
1065
  dependencyEntities.forEach((dependencyInfo) => {
1061
1066
  const projectId = dependencyInfo.id;
1062
1067
  // There are a few validations that must be done:
@@ -1069,21 +1074,61 @@ export class EditorGraphState {
1069
1074
  // e.g. model::someClass -> project1::v1_0_0::model::someClass
1070
1075
  // But this is a rare and advanced use-case which we will not attempt to handle now.
1071
1076
  if (dependencyProjects.has(projectId)) {
1072
- const projectVersions = dependencyEntities
1073
- .filter((e) => e.id === projectId)
1074
- .map((e) => e.versionId);
1075
- throw new UnsupportedOperationError(
1076
- `Depending on multiple versions of a project is not supported. Found dependency on project '${projectId}' with versions: ${projectVersions.join(
1077
- ', ',
1078
- )}.`,
1077
+ dependencyProjects.get(projectId)?.add(dependencyInfo.versionId);
1078
+ } else {
1079
+ dependencyProjects.set(
1080
+ dependencyInfo.id,
1081
+ new Set<string>([dependencyInfo.versionId]),
1079
1082
  );
1080
1083
  }
1081
1084
  dependencyEntitiesIndex.set(
1082
1085
  dependencyInfo.id,
1083
1086
  dependencyInfo.entities,
1084
1087
  );
1085
- dependencyProjects.add(dependencyInfo.id);
1086
1088
  });
1089
+ const hasConflicts = Array.from(dependencyProjects.entries()).find(
1090
+ ([k, v]) => v.size > 1,
1091
+ );
1092
+ if (hasConflicts) {
1093
+ let dependencyInfo: ProjectDependencyInfo | undefined;
1094
+ try {
1095
+ const dependencyTree =
1096
+ (yield this.editorStore.depotServerClient.analyzeDependencyTree(
1097
+ dependencyCoordinates.map((e) =>
1098
+ ProjectDependencyCoordinates.serialization.toJson(e),
1099
+ ),
1100
+ )) as PlainObject<ProjectVersionEntities>;
1101
+ dependencyInfo =
1102
+ ProjectDependencyInfo.serialization.fromJson(dependencyTree);
1103
+ } catch (error) {
1104
+ assertErrorThrown(error);
1105
+ this.editorStore.applicationStore.log.error(
1106
+ LogEvent.create(LEGEND_STUDIO_APP_EVENT.DEPOT_MANAGER_FAILURE),
1107
+ error,
1108
+ );
1109
+ }
1110
+ const startErrorMessage =
1111
+ 'Depending on multiple versions of a project is not supported. Found conflicts:\n';
1112
+ if (dependencyInfo?.conflicts) {
1113
+ throw new UnsupportedOperationError(
1114
+ startErrorMessage + getConflictsString(dependencyInfo),
1115
+ );
1116
+ } else {
1117
+ throw new UnsupportedOperationError(
1118
+ startErrorMessage +
1119
+ Array.from(dependencyProjects.entries())
1120
+ .map(([k, v]) => {
1121
+ if (v.size > 1) {
1122
+ `project: ${k}\n versions: \n${Array.from(
1123
+ v.values(),
1124
+ ).join('\n')}`;
1125
+ }
1126
+ return '';
1127
+ })
1128
+ .join('\n'),
1129
+ );
1130
+ }
1131
+ }
1087
1132
  }
1088
1133
  } catch (error) {
1089
1134
  assertErrorThrown(error);
@@ -1208,7 +1253,7 @@ export class EditorGraphState {
1208
1253
  (plugin) =>
1209
1254
  (
1210
1255
  plugin as DSL_LegendStudioApplicationPlugin_Extension
1211
- ).getExtraElementTypeGetters?.() ?? [],
1256
+ ).getExtraElementClassifiers?.() ?? [],
1212
1257
  );
1213
1258
  for (const labelGetter of extraElementTypeLabelGetters) {
1214
1259
  const label = labelGetter(element);
@@ -142,6 +142,7 @@ import {
142
142
  import { PACKAGEABLE_ELEMENT_TYPE } from './shared/ModelUtil.js';
143
143
  import { GlobalTestRunnerState } from './sidebar-state/testable/GlobalTestRunnerState.js';
144
144
  import type { LegendStudioApplicationStore } from './LegendStudioBaseStore.js';
145
+ import { EmbeddedQueryBuilderState } from './EmbeddedQueryBuilderState.js';
145
146
 
146
147
  export abstract class EditorExtensionState {
147
148
  /**
@@ -194,6 +195,7 @@ export class EditorStore {
194
195
  localChangesState: LocalChangesState;
195
196
  conflictResolutionState: WorkspaceUpdateConflictResolutionState;
196
197
  devToolState: DevToolState;
198
+ embeddedQueryBuilderState: EmbeddedQueryBuilderState;
197
199
 
198
200
  private _isDisposed = false;
199
201
  initState = ActionState.create();
@@ -289,6 +291,7 @@ export class EditorStore {
289
291
  this.graphManagerState = graphManagerState;
290
292
  this.changeDetectionState = new ChangeDetectionState(this, this.graphState);
291
293
  this.devToolState = new DevToolState(this);
294
+ this.embeddedQueryBuilderState = new EmbeddedQueryBuilderState(this);
292
295
  // side bar panels
293
296
  this.explorerTreeState = new ExplorerTreeState(this);
294
297
  this.projectOverviewState = new ProjectOverviewState(this, this.sdlcState);
@@ -0,0 +1,105 @@
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 type { QueryBuilderState } from '@finos/legend-query-builder';
18
+ import type { GeneratorFn } from '@finos/legend-shared';
19
+ import { flow, flowResult, makeObservable, observable } from 'mobx';
20
+ import { FormModeCompilationOutcome } from './EditorGraphState.js';
21
+ import type { EditorStore } from './EditorStore.js';
22
+
23
+ type EmbeddedQueryBuilderActionConfiguration = {
24
+ key: string;
25
+ renderer: (queryBuilderState: QueryBuilderState) => React.ReactNode;
26
+ };
27
+
28
+ type EmbeddedQueryBuilderConfiguration = {
29
+ setupQueryBuilderState: () => QueryBuilderState;
30
+ disableCompile?: boolean | undefined;
31
+ actionConfigs: EmbeddedQueryBuilderActionConfiguration[];
32
+ };
33
+
34
+ export class EmbeddedQueryBuilderState {
35
+ editorStore: EditorStore;
36
+ queryBuilderState?: QueryBuilderState | undefined;
37
+ actionConfigs: EmbeddedQueryBuilderActionConfiguration[] = [];
38
+
39
+ constructor(editorStore: EditorStore) {
40
+ makeObservable(this, {
41
+ queryBuilderState: observable,
42
+ actionConfigs: observable,
43
+ setEmbeddedQueryBuilderConfiguration: flow,
44
+ });
45
+
46
+ this.editorStore = editorStore;
47
+ }
48
+
49
+ /**
50
+ * When opening query builder, we ensure the graph compiles successfully
51
+ */
52
+ *setEmbeddedQueryBuilderConfiguration(
53
+ config: EmbeddedQueryBuilderConfiguration | undefined,
54
+ ): GeneratorFn<void> {
55
+ if (config) {
56
+ if (!this.editorStore.isInFormMode) {
57
+ return;
58
+ }
59
+ if (!config.disableCompile) {
60
+ this.editorStore.setBlockingAlert({
61
+ message: 'Compiling graph before building query...',
62
+ showLoading: true,
63
+ });
64
+ const compilationOutcome = (yield flowResult(
65
+ this.editorStore.graphState.globalCompileInFormMode({
66
+ // we don't want to notify about compilation success since this is just a simple check
67
+ // in order to be able to open query builder
68
+ disableNotificationOnSuccess: true,
69
+ }),
70
+ )) as FormModeCompilationOutcome;
71
+ switch (compilationOutcome) {
72
+ case FormModeCompilationOutcome.SKIPPED: {
73
+ this.editorStore.setBlockingAlert(undefined);
74
+ this.editorStore.applicationStore.notifyWarning(
75
+ `Can't open query builder: Can't compile at this time, please try again later`,
76
+ );
77
+ return;
78
+ }
79
+ case FormModeCompilationOutcome.SUCCEEDED: {
80
+ this.editorStore.setBlockingAlert(undefined);
81
+ break;
82
+ }
83
+ default: {
84
+ this.editorStore.applicationStore.notifyWarning(
85
+ `Can't open query builder: Compilation failed! Please fix the compilation issue and try again`,
86
+ );
87
+ this.editorStore.setBlockingAlert(undefined);
88
+ return;
89
+ }
90
+ }
91
+ }
92
+ if (!this.editorStore.graphState.hasCompilationError) {
93
+ this.queryBuilderState = config.setupQueryBuilderState();
94
+ this.actionConfigs = config.actionConfigs;
95
+ }
96
+ this.editorStore.setBlockGlobalHotkeys(true);
97
+ this.editorStore.setHotkeys([]);
98
+ } else {
99
+ this.queryBuilderState = undefined;
100
+ this.actionConfigs = [];
101
+ this.editorStore.setBlockGlobalHotkeys(false);
102
+ this.editorStore.resetHotkeys();
103
+ }
104
+ }
105
+ }
@@ -32,4 +32,5 @@ export enum LEGEND_STUDIO_APP_EVENT {
32
32
 
33
33
  WORKSPACE_UPDATED = 'sdlc.workspace-update.success',
34
34
  WORKSPACE_LOCAL_CHANGES_PUSHED = 'sdlc.local-changes-push.success',
35
+ DEPOT_MANAGER_FAILURE = 'depot.manager.failure',
35
36
  }
@@ -24,6 +24,7 @@ export enum LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY {
24
24
 
25
25
  MODEL_LOADER = 'studio.editor.model-loader',
26
26
  TEXT_MODE_EDITOR = 'studio.editor.text-mode-editor',
27
+ EMBEDDED_QUERY_BUILDER = 'studio.editor.embedded-query-builder',
27
28
 
28
29
  CLASS_EDITOR = 'studio.editor.class-editor',
29
30
  CLASS_EDITOR_PROPERTIES = 'studio.editor.class-editor.properties',
@@ -117,7 +117,7 @@ export abstract class LegendStudioApplicationPlugin extends LegendApplicationPlu
117
117
  getExtraTestableMetadata?(): TestableMetadataGetter[];
118
118
  }
119
119
 
120
- export type ElementTypeGetter = (
120
+ export type ElementClassifier = (
121
121
  metamodel: PackageableElement,
122
122
  ) => string | undefined;
123
123
 
@@ -165,7 +165,7 @@ export type ElementEditorStateCreator = (
165
165
  element: PackageableElement,
166
166
  ) => ElementEditorState | undefined;
167
167
 
168
- export type ElementProjectExplorerDnDTypeGetter = (
168
+ export type DragElementClassifier = (
169
169
  element: PackageableElement,
170
170
  ) => string | undefined;
171
171
 
@@ -251,7 +251,7 @@ export interface DSL_LegendStudioApplicationPlugin_Extension
251
251
  /**
252
252
  * Get the list of classifiers for a packageable element.
253
253
  */
254
- getExtraElementTypeGetters?(): ElementTypeGetter[];
254
+ getExtraElementClassifiers?(): ElementClassifier[];
255
255
 
256
256
  /**
257
257
  * Get the list of (user-friendly) type labelers for a packageable element.
@@ -304,14 +304,14 @@ export interface DSL_LegendStudioApplicationPlugin_Extension
304
304
  getExtraElementEditorStateCreators?(): ElementEditorStateCreator[];
305
305
 
306
306
  /**
307
- * Get the list of the supported drag-and-drop type speficiers.
307
+ * Get the list of the classifiers for draggable elements from explorer tree
308
308
  */
309
- getExtraElementProjectExplorerDnDTypeGetters?(): ElementProjectExplorerDnDTypeGetter[];
309
+ getExtraDragElementClassifiers?(): DragElementClassifier[];
310
310
 
311
311
  /**
312
- * Get the list of the supported drag-and-drop type speficiers for Pure grammar text editor.
312
+ * Get the list of the supported drag element type speficiers for Pure grammar text editor.
313
313
  */
314
- getExtraPureGrammarTextEditorDnDTypes?(): string[];
314
+ getExtraPureGrammarTextEditorDragElementTypes?(): string[];
315
315
 
316
316
  /**
317
317
  * Get the list of Pure grammar parser description getters based on parser section keyword
@@ -157,6 +157,40 @@ export const RELATIONAL_DATABASE_CONNECTION_SNIPPET = `RelationalDatabaseConnect
157
157
  auth: \${5:DefaultH2 {\\}};
158
158
  }`;
159
159
 
160
+ // ------------------------------------- Post-Processor -------------------------------------
161
+
162
+ export const POST_PROCESSOR_RELATIONAL_DATABASE_CONNECTION_SNIPPET = `RelationalDatabaseConnection \${1:model::NewConnection}
163
+ {
164
+ store: \${2:model::SomeStore};
165
+ // example of a simple H2 connection with a mapper post processor
166
+ type: \${3:H2};
167
+ specification: \${4:LocalH2 {\\}};
168
+ auth: \${5:DefaultH2 {\\}};
169
+ // example of mapper post processor
170
+ postProcessors:
171
+ [
172
+ mapper
173
+ {
174
+ mappers:
175
+ [
176
+ ];
177
+ }
178
+ ];
179
+ }`;
180
+
181
+ export const createConnectionSnippetWithPostProcessorSuggestionSnippet = (
182
+ snippetText: string,
183
+ ): string =>
184
+ `RelationalDatabaseConnection \${1:model::NewConnection}
185
+ {
186
+ store: \${2:model::SomeStore};
187
+ type: \${3:H2};
188
+ specification: \${4:LocalH2 {\\}};
189
+ auth: \${5:DefaultH2 {\\}};
190
+ postProcessors:
191
+ [
192
+ ${indent(snippetText, ' '.repeat(TAB_SIZE))}\n`;
193
+
160
194
  // ------------------------------------- Mapping -------------------------------------
161
195
 
162
196
  export const BLANK_MAPPING_SNIPPET = `Mapping \${1:model::NewMapping}
@@ -14,7 +14,10 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import type { DSL_LegendStudioApplicationPlugin_Extension } from './LegendStudioApplicationPlugin.js';
17
+ import type {
18
+ DSL_LegendStudioApplicationPlugin_Extension,
19
+ ElementEmbeddedContentSnippetSuggestion,
20
+ } from './LegendStudioApplicationPlugin.js';
18
21
  import type {
19
22
  DatasourceSpecification,
20
23
  AuthenticationStrategy,
@@ -24,9 +27,15 @@ import type {
24
27
  import type { RelationalDatabaseConnectionValueState } from './editor-state/element-editor-state/connection/ConnectionEditorState.js';
25
28
  import type { PostProcessorEditorState } from './editor-state/element-editor-state/connection/PostProcessorEditorState.js';
26
29
 
30
+ /**
31
+ * NOTE: The tab-stop index of the snippet must start from 6
32
+ */
33
+ export type EmbeddedPostProcessorSnippetSuggestion =
34
+ ElementEmbeddedContentSnippetSuggestion;
35
+
27
36
  // connection datasource specification
28
37
 
29
- export type DatasourceSpecificationTypeGetter = (
38
+ export type DatasourceSpecificationClassifier = (
30
39
  metamodel: DatasourceSpecification,
31
40
  ) => string | undefined;
32
41
 
@@ -41,7 +50,7 @@ export type DatasourceSpecificationEditorRenderer = (
41
50
 
42
51
  // connection authentication strategy
43
52
 
44
- export type AuthenticationStrategyTypeGetter = (
53
+ export type AuthenticationStrategyClassifier = (
45
54
  metamodel: AuthenticationStrategy,
46
55
  ) => string | undefined;
47
56
 
@@ -90,7 +99,7 @@ export interface StoreRelational_LegendStudioApplicationPlugin_Extension
90
99
  /**
91
100
  * Get the list of classifiers for a relational database datasource specification.
92
101
  */
93
- getExtraDatasourceSpecificationTypeGetters?(): DatasourceSpecificationTypeGetter[];
102
+ getExtraDatasourceSpecificationClassifiers?(): DatasourceSpecificationClassifier[];
94
103
 
95
104
  /**
96
105
  * Get the list of creators for relational database datasource specification given the type specifier.
@@ -113,7 +122,7 @@ export interface StoreRelational_LegendStudioApplicationPlugin_Extension
113
122
  /**
114
123
  * Get the list of classifiers for a relational database authentication strategy.
115
124
  */
116
- getExtraAuthenticationStrategyTypeGetters?(): AuthenticationStrategyTypeGetter[];
125
+ getExtraAuthenticationStrategyClassifiers?(): AuthenticationStrategyClassifier[];
117
126
 
118
127
  /**
119
128
  * Get the list of creators for relational database authentication strategy given the type specifier.
@@ -148,6 +157,11 @@ export interface StoreRelational_LegendStudioApplicationPlugin_Extension
148
157
  */
149
158
  getExtraPostProcessorStateCreators?(): PostProcessorStateCreator[];
150
159
 
160
+ /**
161
+ * Get the list of Pure grammar suggestion snippet getters for post-processors.
162
+ */
163
+ getExtraPostProcessorSnippetSuggestions?(): EmbeddedPostProcessorSnippetSuggestion[];
164
+
151
165
  /**
152
166
  * Get the list of renderers for the editor for a post-processor.
153
167
  */