@finos/legend-application-studio 22.2.1 → 22.3.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 (200) hide show
  1. package/lib/components/editor/StatusBar.js +1 -1
  2. package/lib/components/editor/StatusBar.js.map +1 -1
  3. package/lib/components/editor/command-center/ProjectSearchCommand.d.ts.map +1 -1
  4. package/lib/components/editor/command-center/ProjectSearchCommand.js +1 -0
  5. package/lib/components/editor/command-center/ProjectSearchCommand.js.map +1 -1
  6. package/lib/components/editor/edit-panel/EditPanel.d.ts.map +1 -1
  7. package/lib/components/editor/edit-panel/EditPanel.js +24 -11
  8. package/lib/components/editor/edit-panel/EditPanel.js.map +1 -1
  9. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts.map +1 -1
  10. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js +2 -1
  11. package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js.map +1 -1
  12. package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts.map +1 -1
  13. package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js +1 -0
  14. package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js.map +1 -1
  15. package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts.map +1 -1
  16. package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.js +4 -3
  17. package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.js.map +1 -1
  18. package/lib/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.d.ts +32 -0
  19. package/lib/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.d.ts.map +1 -0
  20. package/lib/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.js +66 -0
  21. package/lib/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.js.map +1 -0
  22. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.d.ts +0 -23
  23. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.d.ts.map +1 -1
  24. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js +6 -58
  25. package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js.map +1 -1
  26. package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.d.ts +41 -0
  27. package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.d.ts.map +1 -0
  28. package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.js +77 -0
  29. package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.js.map +1 -0
  30. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.d.ts +7 -0
  31. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.d.ts.map +1 -1
  32. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.js +19 -14
  33. package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.js.map +1 -1
  34. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -1
  35. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js +3 -1
  36. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -1
  37. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.js +3 -1
  38. package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.js.map +1 -1
  39. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.d.ts.map +1 -1
  40. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.js +3 -0
  41. package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.js.map +1 -1
  42. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts.map +1 -1
  43. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js +3 -1
  44. package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js.map +1 -1
  45. package/lib/components/editor/edit-panel/service-editor/ServiceEditor.d.ts.map +1 -1
  46. package/lib/components/editor/edit-panel/service-editor/ServiceEditor.js +51 -13
  47. package/lib/components/editor/edit-panel/service-editor/ServiceEditor.js.map +1 -1
  48. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts.map +1 -1
  49. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js +18 -10
  50. package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
  51. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts +1 -3
  52. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts.map +1 -1
  53. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js +2 -20
  54. package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js.map +1 -1
  55. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts.map +1 -1
  56. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js +9 -3
  57. package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js.map +1 -1
  58. package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
  59. package/lib/components/editor/side-bar/CreateNewElementModal.js +1 -0
  60. package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
  61. package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
  62. package/lib/components/editor/side-bar/Explorer.js +29 -8
  63. package/lib/components/editor/side-bar/Explorer.js.map +1 -1
  64. package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts.map +1 -1
  65. package/lib/components/editor/side-bar/testable/GlobalTestRunner.js +17 -3
  66. package/lib/components/editor/side-bar/testable/GlobalTestRunner.js.map +1 -1
  67. package/lib/index.css +2 -2
  68. package/lib/index.css.map +1 -1
  69. package/lib/index.d.ts +2 -2
  70. package/lib/index.d.ts.map +1 -1
  71. package/lib/index.js +2 -2
  72. package/lib/index.js.map +1 -1
  73. package/lib/package.json +3 -3
  74. package/lib/stores/DSL_Generation_LegendStudioApplicationPlugin_Extension.d.ts +2 -2
  75. package/lib/stores/DSL_Generation_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -1
  76. package/lib/stores/DependencyProjectViewerHelper.d.ts +19 -0
  77. package/lib/stores/DependencyProjectViewerHelper.d.ts.map +1 -0
  78. package/lib/stores/DependencyProjectViewerHelper.js +23 -0
  79. package/lib/stores/DependencyProjectViewerHelper.js.map +1 -0
  80. package/lib/stores/EditorGraphState.d.ts +9 -2
  81. package/lib/stores/EditorGraphState.d.ts.map +1 -1
  82. package/lib/stores/EditorGraphState.js +35 -97
  83. package/lib/stores/EditorGraphState.js.map +1 -1
  84. package/lib/stores/EditorStore.d.ts.map +1 -1
  85. package/lib/stores/EditorStore.js +7 -1
  86. package/lib/stores/EditorStore.js.map +1 -1
  87. package/lib/stores/EditorTabManagerState.d.ts +1 -1
  88. package/lib/stores/EditorTabManagerState.d.ts.map +1 -1
  89. package/lib/stores/EditorTabManagerState.js +11 -13
  90. package/lib/stores/EditorTabManagerState.js.map +1 -1
  91. package/lib/stores/ExplorerTreeState.d.ts +4 -4
  92. package/lib/stores/ExplorerTreeState.d.ts.map +1 -1
  93. package/lib/stores/ExplorerTreeState.js +12 -13
  94. package/lib/stores/ExplorerTreeState.js.map +1 -1
  95. package/lib/stores/editor/NewElementState.d.ts.map +1 -1
  96. package/lib/stores/editor/NewElementState.js +0 -3
  97. package/lib/stores/editor/NewElementState.js.map +1 -1
  98. package/lib/stores/editor-state/ExternalFormatState.d.ts +2 -0
  99. package/lib/stores/editor-state/ExternalFormatState.d.ts.map +1 -1
  100. package/lib/stores/editor-state/ExternalFormatState.js +6 -0
  101. package/lib/stores/editor-state/ExternalFormatState.js.map +1 -1
  102. package/lib/stores/editor-state/FileGenerationState.d.ts +18 -18
  103. package/lib/stores/editor-state/FileGenerationState.d.ts.map +1 -1
  104. package/lib/stores/editor-state/FileGenerationState.js +86 -133
  105. package/lib/stores/editor-state/FileGenerationState.js.map +1 -1
  106. package/lib/stores/editor-state/FileGenerationViewerState.d.ts +3 -3
  107. package/lib/stores/editor-state/FileGenerationViewerState.d.ts.map +1 -1
  108. package/lib/stores/editor-state/FileGenerationViewerState.js.map +1 -1
  109. package/lib/stores/editor-state/FileSystemState.d.ts +30 -0
  110. package/lib/stores/editor-state/FileSystemState.d.ts.map +1 -0
  111. package/lib/stores/editor-state/FileSystemState.js +82 -0
  112. package/lib/stores/editor-state/FileSystemState.js.map +1 -0
  113. package/lib/stores/editor-state/GraphGenerationState.d.ts +9 -9
  114. package/lib/stores/editor-state/GraphGenerationState.d.ts.map +1 -1
  115. package/lib/stores/editor-state/GraphGenerationState.js +14 -15
  116. package/lib/stores/editor-state/GraphGenerationState.js.map +1 -1
  117. package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts +25 -2
  118. package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
  119. package/lib/stores/editor-state/element-editor-state/ElementEditorState.js +50 -7
  120. package/lib/stores/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
  121. package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.d.ts +44 -0
  122. package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.d.ts.map +1 -0
  123. package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.js +172 -0
  124. package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.js.map +1 -0
  125. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js +1 -1
  126. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
  127. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js +2 -2
  128. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js.map +1 -1
  129. package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.d.ts +3 -0
  130. package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.d.ts.map +1 -1
  131. package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.js +14 -2
  132. package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.js.map +1 -1
  133. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts +9 -6
  134. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
  135. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +38 -28
  136. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
  137. package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts.map +1 -1
  138. package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js +6 -3
  139. package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js.map +1 -1
  140. package/lib/stores/shared/FileSystemTreeUtils.d.ts +56 -0
  141. package/lib/stores/shared/FileSystemTreeUtils.d.ts.map +1 -0
  142. package/lib/stores/shared/{FileGenerationTreeUtils.js → FileSystemTreeUtils.js} +31 -32
  143. package/lib/stores/shared/FileSystemTreeUtils.js.map +1 -0
  144. package/lib/stores/shared/PackageTreeUtils.d.ts +6 -4
  145. package/lib/stores/shared/PackageTreeUtils.d.ts.map +1 -1
  146. package/lib/stores/shared/PackageTreeUtils.js +90 -11
  147. package/lib/stores/shared/PackageTreeUtils.js.map +1 -1
  148. package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.d.ts +3 -3
  149. package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.d.ts.map +1 -1
  150. package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.js +37 -1
  151. package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.js.map +1 -1
  152. package/package.json +12 -12
  153. package/src/components/editor/StatusBar.tsx +1 -1
  154. package/src/components/editor/command-center/ProjectSearchCommand.tsx +1 -0
  155. package/src/components/editor/edit-panel/EditPanel.tsx +79 -25
  156. package/src/components/editor/edit-panel/GenerationSpecificationEditor.tsx +2 -1
  157. package/src/components/editor/edit-panel/connection-editor/ConnectionEditor.tsx +1 -0
  158. package/src/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.tsx +5 -7
  159. package/src/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.tsx +194 -0
  160. package/src/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.tsx +6 -270
  161. package/src/components/editor/edit-panel/element-generation-editor/FileSystemViewer.tsx +296 -0
  162. package/src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.tsx +177 -155
  163. package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +3 -1
  164. package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.tsx +3 -3
  165. package/src/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.tsx +3 -0
  166. package/src/components/editor/edit-panel/mapping-editor/NewMappingElementModal.tsx +3 -1
  167. package/src/components/editor/edit-panel/service-editor/ServiceEditor.tsx +243 -184
  168. package/src/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.tsx +42 -15
  169. package/src/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.tsx +2 -65
  170. package/src/components/editor/edit-panel/uml-editor/ClassEditor.tsx +9 -3
  171. package/src/components/editor/side-bar/CreateNewElementModal.tsx +1 -0
  172. package/src/components/editor/side-bar/Explorer.tsx +82 -13
  173. package/src/components/editor/side-bar/testable/GlobalTestRunner.tsx +31 -9
  174. package/src/index.ts +5 -2
  175. package/src/stores/DSL_Generation_LegendStudioApplicationPlugin_Extension.ts +2 -2
  176. package/src/stores/DependencyProjectViewerHelper.ts +39 -0
  177. package/src/stores/EditorGraphState.ts +56 -155
  178. package/src/stores/EditorStore.ts +15 -5
  179. package/src/stores/EditorTabManagerState.ts +17 -20
  180. package/src/stores/ExplorerTreeState.ts +26 -18
  181. package/src/stores/editor/NewElementState.ts +0 -2
  182. package/src/stores/editor-state/ExternalFormatState.ts +9 -0
  183. package/src/stores/editor-state/FileGenerationState.ts +129 -180
  184. package/src/stores/editor-state/FileGenerationViewerState.ts +3 -3
  185. package/src/stores/editor-state/FileSystemState.ts +111 -0
  186. package/src/stores/editor-state/GraphGenerationState.ts +35 -31
  187. package/src/stores/editor-state/element-editor-state/ElementEditorState.ts +91 -6
  188. package/src/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.ts +266 -0
  189. package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +1 -1
  190. package/src/stores/editor-state/element-editor-state/mapping/MappingTestState.ts +2 -2
  191. package/src/stores/editor-state/element-editor-state/service/ServiceEditorState.ts +23 -2
  192. package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +60 -55
  193. package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts +6 -2
  194. package/src/stores/shared/{FileGenerationTreeUtils.ts → FileSystemTreeUtils.ts} +77 -76
  195. package/src/stores/shared/PackageTreeUtils.ts +144 -10
  196. package/src/stores/sidebar-state/testable/GlobalTestRunnerState.ts +42 -3
  197. package/tsconfig.json +6 -1
  198. package/lib/stores/shared/FileGenerationTreeUtils.d.ts +0 -56
  199. package/lib/stores/shared/FileGenerationTreeUtils.d.ts.map +0 -1
  200. package/lib/stores/shared/FileGenerationTreeUtils.js.map +0 -1
@@ -14,7 +14,11 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { isNonNullable, addUniqueEntry } from '@finos/legend-shared';
17
+ import {
18
+ isNonNullable,
19
+ addUniqueEntry,
20
+ guaranteeNonNullable,
21
+ } from '@finos/legend-shared';
18
22
  import type { PackageTreeNodeData } from './TreeUtils.js';
19
23
  import type { TreeNodeData, TreeData } from '@finos/legend-art';
20
24
  import type { EditorStore } from '../EditorStore.js';
@@ -41,7 +45,9 @@ import {
41
45
  GenerationSpecification,
42
46
  DataElement,
43
47
  generateFunctionPrettyName,
48
+ getElementRootPackage,
44
49
  } from '@finos/legend-graph';
50
+ import { ExplorerTreeRootPackageLabel } from '../ExplorerTreeState.js';
45
51
 
46
52
  const getElementProjectExplorerDnDType = (
47
53
  editorStore: EditorStore,
@@ -135,6 +141,29 @@ export const getPackableElementTreeNodeData = (
135
141
  packageableElement: element,
136
142
  });
137
143
 
144
+ export const getDependencyPackableElementTreeNodeData = (
145
+ editorStore: EditorStore,
146
+ element: PackageableElement,
147
+ rootName: string,
148
+ isDependencyRoot: boolean,
149
+ childFilter?: (childElement: PackageableElement) => boolean,
150
+ ): PackageTreeNodeData => ({
151
+ id: isDependencyRoot ? element.path : `${rootName}::${element.path}`,
152
+ dndType: getElementProjectExplorerDnDType(editorStore, element),
153
+ label: generatePackageableElementTreeNodeDataLabel(element),
154
+ childrenIds:
155
+ element instanceof Package
156
+ ? element.children
157
+ .filter((child) => !(child instanceof Unit)) // remove unit from package tree
158
+ .filter(
159
+ (child) =>
160
+ child instanceof Package || !childFilter || childFilter(child),
161
+ )
162
+ .map((child) => `${rootName}::${child.path}`)
163
+ : undefined,
164
+ packageableElement: element,
165
+ });
166
+
138
167
  export const getPackableElementTreeData = (
139
168
  editorStore: EditorStore,
140
169
  _package: Package,
@@ -175,6 +204,48 @@ export const getPackableElementTreeData = (
175
204
  return { rootIds, nodes };
176
205
  };
177
206
 
207
+ export const getDependenciesPackableElementTreeData = (
208
+ editorStore: EditorStore,
209
+ _packages: Package[],
210
+ rootWrapperName: string,
211
+ childFilter?: (childElement: PackageableElement) => boolean,
212
+ ): TreeData<PackageTreeNodeData> => {
213
+ const rootIds: string[] = [];
214
+ // Here we warp all the dependency roots with an new root node 'dependencies'
215
+ // We push all the dependency roots as children nodes of this new node so that
216
+ // we can show the tree structure of dependencies wrapped with the label 'dependencies'.
217
+ // In future we would want to support a new tree node type to accomodate these
218
+ // excpetions to the existing structure.
219
+ const root = new Package(ROOT_PACKAGE_NAME.PROJECT_DEPENDENCY_ROOT);
220
+ const nodes = new Map<string, PackageTreeNodeData>();
221
+ _packages.forEach((_package) => {
222
+ const childRootNode = getDependencyPackableElementTreeNodeData(
223
+ editorStore,
224
+ _package,
225
+ _package.name,
226
+ true,
227
+ childFilter,
228
+ );
229
+ childRootNode.label = _package.name;
230
+ childRootNode.id = _package.name;
231
+ addUniqueEntry(rootIds, childRootNode.id);
232
+ nodes.set(childRootNode.id, childRootNode);
233
+ root.children.push(_package);
234
+ });
235
+ const rootNode = {
236
+ id: rootWrapperName,
237
+ dndType: getElementProjectExplorerDnDType(editorStore, root),
238
+ label: rootWrapperName,
239
+ childrenIds: rootIds,
240
+ packageableElement: root,
241
+ };
242
+ rootNode.label = rootWrapperName;
243
+ nodes.set(rootNode.id, rootNode);
244
+ const ids: string[] = [];
245
+ ids.push(rootNode.id);
246
+ return { rootIds: ids, nodes };
247
+ };
248
+
178
249
  /**
179
250
  * Resolve all children of a node
180
251
  */
@@ -182,8 +253,44 @@ export const populatePackageTreeNodeChildren = (
182
253
  editorStore: EditorStore,
183
254
  node: PackageTreeNodeData,
184
255
  treeData: TreeData<PackageTreeNodeData>,
256
+ isDependencyTree?: boolean | undefined,
185
257
  ): void => {
186
- if (node.childrenIds && node.packageableElement instanceof Package) {
258
+ if (
259
+ node.childrenIds &&
260
+ node.packageableElement instanceof Package &&
261
+ node.id === ExplorerTreeRootPackageLabel.PROJECT_DEPENDENCY
262
+ ) {
263
+ // do nothing
264
+ } else if (
265
+ node.childrenIds &&
266
+ node.packageableElement instanceof Package &&
267
+ isDependencyTree
268
+ ) {
269
+ const rootNodeName = node.id.split('::')[0] ?? node.id;
270
+ node.childrenIds = node.packageableElement.children
271
+ .filter((child) => !(child instanceof Unit)) // remove unit from package tree
272
+ .map((child) => `${rootNodeName}::${child.path}`);
273
+ node.packageableElement.children
274
+ .filter((child) => !(child instanceof Unit)) // remove unit from package tree
275
+ .map((child) =>
276
+ getDependencyPackableElementTreeNodeData(
277
+ editorStore,
278
+ child,
279
+ rootNodeName,
280
+ false,
281
+ ),
282
+ )
283
+ .forEach((childNode) => {
284
+ const currentNode = treeData.nodes.get(childNode.id);
285
+ if (currentNode) {
286
+ // Note here that we keep track of isSelected status using reference, we cannot swap out the currentNode to use new childNode
287
+ currentNode.childrenIds = childNode.childrenIds;
288
+ currentNode.label = childNode.label;
289
+ } else {
290
+ treeData.nodes.set(childNode.id, childNode);
291
+ }
292
+ });
293
+ } else if (node.childrenIds && node.packageableElement instanceof Package) {
187
294
  node.childrenIds = node.packageableElement.children
188
295
  .filter((child) => !(child instanceof Unit)) // remove unit from package tree
189
296
  .map((child) => child.path);
@@ -208,12 +315,18 @@ export const addNode = (
208
315
  element: PackageableElement,
209
316
  treeData: TreeData<PackageTreeNodeData>,
210
317
  childFilter?: (childElement: PackageableElement) => boolean,
318
+ isDependencyTreeNode?: boolean | undefined,
211
319
  ): PackageTreeNodeData => {
212
- const newNode = getPackableElementTreeNodeData(
213
- editorStore,
214
- element,
215
- childFilter,
216
- );
320
+ const rootNodeName = getElementRootPackage(element).name;
321
+ const newNode = isDependencyTreeNode
322
+ ? getDependencyPackableElementTreeNodeData(
323
+ editorStore,
324
+ element,
325
+ rootNodeName,
326
+ false,
327
+ childFilter,
328
+ )
329
+ : getPackableElementTreeNodeData(editorStore, element, childFilter);
217
330
  treeData.nodes.set(newNode.id, newNode);
218
331
  if (!element.package || element.package.path === ROOT_PACKAGE_NAME.MAIN) {
219
332
  treeData.rootIds = Array.from(new Set(treeData.rootIds).add(newNode.id));
@@ -241,21 +354,36 @@ export const openNode = (
241
354
  element: PackageableElement,
242
355
  treeData: TreeData<PackageTreeNodeData>,
243
356
  childFilter?: (childElement: PackageableElement) => boolean,
357
+ isDependencyElement?: boolean,
244
358
  ): PackageTreeNodeData | undefined => {
245
359
  let currentElement: PackageableElement | undefined = element;
246
360
  let openingNode: PackageTreeNodeData | undefined;
247
361
  while (currentElement.package) {
248
362
  const node: PackageTreeNodeData =
249
363
  treeData.nodes.get(currentElement.path) ??
250
- addNode(editorStore, currentElement, treeData, childFilter);
364
+ addNode(
365
+ editorStore,
366
+ currentElement,
367
+ treeData,
368
+ childFilter,
369
+ isDependencyElement,
370
+ );
251
371
  node.isOpen = currentElement instanceof Package;
252
372
  openingNode = !openingNode ? node : openingNode;
253
373
  currentElement = currentElement.package;
254
374
  }
255
375
  // Open the dependency root
256
- const node = treeData.nodes.get(currentElement.path);
376
+ const node = treeData.nodes.get(currentElement.name);
257
377
  if (node) {
258
378
  node.isOpen = currentElement instanceof Package;
379
+ if (node.isOpen && treeData.rootIds.length) {
380
+ const rootNode = treeData.nodes.get(
381
+ guaranteeNonNullable(treeData.rootIds[0]),
382
+ );
383
+ if (rootNode) {
384
+ rootNode.isOpen = true;
385
+ }
386
+ }
259
387
  }
260
388
  return openingNode;
261
389
  };
@@ -304,9 +432,15 @@ export const getTreeChildNodes = (
304
432
  editorStore: EditorStore,
305
433
  node: PackageTreeNodeData,
306
434
  treeData: TreeData<PackageTreeNodeData>,
435
+ isDependencyTree?: boolean | undefined,
307
436
  ): PackageTreeNodeData[] => {
308
437
  if (node.childrenIds && node.packageableElement instanceof Package) {
309
- populatePackageTreeNodeChildren(editorStore, node, treeData);
438
+ populatePackageTreeNodeChildren(
439
+ editorStore,
440
+ node,
441
+ treeData,
442
+ isDependencyTree,
443
+ );
310
444
  return (
311
445
  node.childrenIds
312
446
  .map((id) => treeData.nodes.get(id))
@@ -16,7 +16,7 @@
16
16
 
17
17
  import type { TreeData, TreeNodeData } from '@finos/legend-art';
18
18
  import {
19
- type AssertionStatus,
19
+ AssertionStatus,
20
20
  type Test,
21
21
  type Testable,
22
22
  type TestBatch,
@@ -225,10 +225,25 @@ const getAssertion_TestResult = (
225
225
  export const getAssertionStatus = (
226
226
  assertion: TestAssertion,
227
227
  results: Map<AtomicTest, TestResult>,
228
- ): AssertionStatus | undefined => {
228
+ ): AssertionStatus | Map<string, AssertionStatus> | undefined => {
229
229
  const result = getAssertion_TestResult(assertion, results);
230
230
  if (result instanceof TestFailed) {
231
231
  return result.assertStatuses.find((s) => s.assertion === assertion);
232
+ } else if (result instanceof MultiExecutionServiceTestResult) {
233
+ const testAssertionStatus = new Map<string, AssertionStatus>();
234
+ Array.from(result.keyIndexedTestResults.entries()).forEach(
235
+ ([key, testResult]) => {
236
+ if (testResult instanceof TestFailed) {
237
+ const testAssertion = testResult.assertStatuses.find(
238
+ (s) => s.assertion === assertion,
239
+ );
240
+ if (testAssertion) {
241
+ testAssertionStatus.set(key, testAssertion);
242
+ }
243
+ }
244
+ },
245
+ );
246
+ return testAssertionStatus;
232
247
  }
233
248
  return undefined;
234
249
  };
@@ -286,12 +301,19 @@ export const getTestableResultFromTestResult = (
286
301
  };
287
302
 
288
303
  export const getTestableResultFromAssertionStatus = (
289
- assertionStatus: AssertionStatus | undefined,
304
+ assertionStatus: AssertionStatus | Map<string, AssertionStatus> | undefined,
290
305
  ): TESTABLE_RESULT => {
291
306
  if (assertionStatus instanceof AssertPass) {
292
307
  return TESTABLE_RESULT.PASSED;
293
308
  } else if (assertionStatus instanceof AssertFail) {
294
309
  return TESTABLE_RESULT.FAILED;
310
+ } else if (assertionStatus && !(assertionStatus instanceof AssertionStatus)) {
311
+ const assertionStatuses = Array.from(assertionStatus.values());
312
+ if (assertionStatuses.every((t) => t instanceof AssertPass)) {
313
+ return TESTABLE_RESULT.PASSED;
314
+ } else if (assertionStatuses.find((t) => t instanceof AssertFail)) {
315
+ return TESTABLE_RESULT.FAILED;
316
+ }
295
317
  }
296
318
  return TESTABLE_RESULT.DID_NOT_RUN;
297
319
  };
@@ -304,6 +326,23 @@ export const getTestableResultFromTestResults = (
304
326
  return TESTABLE_RESULT.ERROR;
305
327
  } else if (testResults.find((t) => t instanceof TestFailed)) {
306
328
  return TESTABLE_RESULT.FAILED;
329
+ } else if (
330
+ testResults.find((t) => t instanceof MultiExecutionServiceTestResult)
331
+ ) {
332
+ let result: TestResult[] = [];
333
+ testResults.forEach((testResult) => {
334
+ if (testResult instanceof MultiExecutionServiceTestResult) {
335
+ result = result.concat(
336
+ Array.from(testResult.keyIndexedTestResults.values()),
337
+ );
338
+ }
339
+ });
340
+ if (result.every((t) => t instanceof TestPassed)) {
341
+ return TESTABLE_RESULT.PASSED;
342
+ } else if (result.some((t) => t instanceof TestError)) {
343
+ return TESTABLE_RESULT.ERROR;
344
+ }
345
+ return TESTABLE_RESULT.FAILED;
307
346
  }
308
347
  return TESTABLE_RESULT.DID_NOT_RUN;
309
348
  };
package/tsconfig.json CHANGED
@@ -46,6 +46,7 @@
46
46
  "./src/stores/DSL_Generation_LegendStudioApplicationPlugin_Extension.ts",
47
47
  "./src/stores/DSL_Mapping_LegendStudioApplicationPlugin_Extension.ts",
48
48
  "./src/stores/DSL_Service_LegendStudioApplicationPlugin_Extension.ts",
49
+ "./src/stores/DependencyProjectViewerHelper.ts",
49
50
  "./src/stores/EditorConfig.ts",
50
51
  "./src/stores/EditorGraphState.ts",
51
52
  "./src/stores/EditorSDLCState.ts",
@@ -72,6 +73,7 @@
72
73
  "./src/stores/editor-state/ExternalFormatState.ts",
73
74
  "./src/stores/editor-state/FileGenerationState.ts",
74
75
  "./src/stores/editor-state/FileGenerationViewerState.ts",
76
+ "./src/stores/editor-state/FileSystemState.ts",
75
77
  "./src/stores/editor-state/GenerationSpecificationEditorState.ts",
76
78
  "./src/stores/editor-state/GrammarTextEditorState.ts",
77
79
  "./src/stores/editor-state/GraphGenerationState.ts",
@@ -80,6 +82,7 @@
80
82
  "./src/stores/editor-state/element-editor-state/ClassEditorState.ts",
81
83
  "./src/stores/editor-state/element-editor-state/ClassState.ts",
82
84
  "./src/stores/editor-state/element-editor-state/ElementEditorState.ts",
85
+ "./src/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.ts",
83
86
  "./src/stores/editor-state/element-editor-state/ElementFileGenerationState.ts",
84
87
  "./src/stores/editor-state/element-editor-state/FileGenerationEditorState.ts",
85
88
  "./src/stores/editor-state/element-editor-state/FunctionEditorState.ts",
@@ -120,7 +123,7 @@
120
123
  "./src/stores/project-viewer/ProjectViewerEditorMode.ts",
121
124
  "./src/stores/project-viewer/ProjectViewerStore.ts",
122
125
  "./src/stores/shared/DnDUtils.ts",
123
- "./src/stores/shared/FileGenerationTreeUtils.ts",
126
+ "./src/stores/shared/FileSystemTreeUtils.ts",
124
127
  "./src/stores/shared/MockDataUtils.ts",
125
128
  "./src/stores/shared/ModelClassifierUtils.ts",
126
129
  "./src/stores/shared/PackageTreeUtils.ts",
@@ -186,7 +189,9 @@
186
189
  "./src/components/editor/edit-panel/diff-editor/EntityDiffView.tsx",
187
190
  "./src/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.tsx",
188
191
  "./src/components/editor/edit-panel/element-generation-editor/ElementNativeView.tsx",
192
+ "./src/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.tsx",
189
193
  "./src/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.tsx",
194
+ "./src/components/editor/edit-panel/element-generation-editor/FileSystemViewer.tsx",
190
195
  "./src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.tsx",
191
196
  "./src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.tsx",
192
197
  "./src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.tsx",
@@ -1,56 +0,0 @@
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
- import type { TreeNodeData, TreeData } from '@finos/legend-art';
17
- import { type GenerationOutput } from '@finos/legend-graph';
18
- export interface GenerationOutputResult {
19
- generationOutput: GenerationOutput;
20
- parentId?: string | undefined;
21
- }
22
- export declare const GENERATION_FILE_ROOT_NAME = "GENERATION_FILE_ROOT";
23
- declare class GenerationFileNodeElement {
24
- name: string;
25
- directory?: GenerationDirectory | undefined;
26
- parentId?: string | undefined;
27
- constructor(name: string, fileGenerationParent?: string);
28
- get path(): string;
29
- }
30
- export declare class GenerationDirectory extends GenerationFileNodeElement {
31
- children: GenerationFileNodeElement[];
32
- setDirectory(val: GenerationDirectory): void;
33
- addChild(val: GenerationFileNodeElement): void;
34
- addElement(val: GenerationFileNodeElement): void;
35
- static createDirectoryFromParent(name: string, parent: GenerationDirectory, fileGenerationParent?: string): GenerationDirectory;
36
- static getOrCreateDirectory(parent: GenerationDirectory, directoryName: string, insert: boolean): GenerationDirectory;
37
- getDirectoryPath(): string;
38
- }
39
- export declare class GenerationFile extends GenerationFileNodeElement {
40
- content: string;
41
- format?: string | undefined;
42
- constructor(name: string, content: string, format?: string, parentId?: string);
43
- }
44
- export interface GenerationTreeNodeData extends TreeNodeData {
45
- fileNode: GenerationFileNodeElement;
46
- }
47
- export declare const getGenerationTreeNodeData: (fileNode: GenerationFileNodeElement) => GenerationTreeNodeData;
48
- export declare const populateDirectoryTreeNodeChildren: (node: GenerationTreeNodeData, treeData: TreeData<GenerationTreeNodeData>) => void;
49
- export declare const getGenerationTreeData: (dir: GenerationDirectory, rootWrapperName?: string) => TreeData<GenerationTreeNodeData>;
50
- export declare const addNode: (element: GenerationFileNodeElement, treeData: TreeData<GenerationTreeNodeData>, showRoot?: boolean) => GenerationTreeNodeData;
51
- export declare const openNode: (element: GenerationFileNodeElement, treeData: TreeData<GenerationTreeNodeData>, showRoot?: boolean) => GenerationTreeNodeData | undefined;
52
- export declare const getFileGenerationChildNodes: (node: GenerationTreeNodeData, treeData: TreeData<GenerationTreeNodeData>) => GenerationTreeNodeData[];
53
- export declare const buildGenerationDirectory: (rootDirectory: GenerationDirectory, generationResultIndex: Map<string, GenerationOutputResult>, filesIndex: Map<string, GenerationFile>) => void;
54
- export declare const reprocessOpenNodes: (treeData: TreeData<GenerationTreeNodeData>, filesIndex: Map<string, GenerationFile>, rootDirectory: GenerationDirectory, openedNodeIds: string[], showRoot?: boolean) => void;
55
- export {};
56
- //# sourceMappingURL=FileGenerationTreeUtils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileGenerationTreeUtils.d.ts","sourceRoot":"","sources":["../../../src/stores/shared/FileGenerationTreeUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAMhE,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AACD,eAAO,MAAM,yBAAyB,yBAAyB,CAAC;AAGhE,cAAM,yBAAyB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAElB,IAAI,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,MAAM;IAKvD,IAAI,IAAI,IAAI,MAAM,CAQjB;CACF;AAED,qBAAa,mBAAoB,SAAQ,yBAAyB;IAChE,QAAQ,EAAE,yBAAyB,EAAE,CAAM;IAE3C,YAAY,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI;IAG5C,QAAQ,CAAC,GAAG,EAAE,yBAAyB,GAAG,IAAI;IAG9C,UAAU,CAAC,GAAG,EAAE,yBAAyB,GAAG,IAAI;IAKhD,MAAM,CAAC,yBAAyB,CAC9B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,mBAAmB,EAC3B,oBAAoB,CAAC,EAAE,MAAM,GAC5B,mBAAmB;IAMtB,MAAM,CAA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