@finos/legend-application-studio 28.4.4 → 28.5.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 (113) hide show
  1. package/lib/__lib__/LegendStudioDocumentation.d.ts +1 -0
  2. package/lib/__lib__/LegendStudioDocumentation.d.ts.map +1 -1
  3. package/lib/__lib__/LegendStudioDocumentation.js +1 -0
  4. package/lib/__lib__/LegendStudioDocumentation.js.map +1 -1
  5. package/lib/__lib__/LegendStudioNavigation.d.ts +12 -2
  6. package/lib/__lib__/LegendStudioNavigation.d.ts.map +1 -1
  7. package/lib/__lib__/LegendStudioNavigation.js +92 -37
  8. package/lib/__lib__/LegendStudioNavigation.js.map +1 -1
  9. package/lib/components/LegendStudioWebApplication.d.ts.map +1 -1
  10. package/lib/components/LegendStudioWebApplication.js +6 -0
  11. package/lib/components/LegendStudioWebApplication.js.map +1 -1
  12. package/lib/components/editor/ActivityBar.js +1 -1
  13. package/lib/components/editor/ActivityBar.js.map +1 -1
  14. package/lib/components/editor/Editor.d.ts.map +1 -1
  15. package/lib/components/editor/Editor.js +10 -2
  16. package/lib/components/editor/Editor.js.map +1 -1
  17. package/lib/components/editor/StatusBar.d.ts.map +1 -1
  18. package/lib/components/editor/StatusBar.js +4 -1
  19. package/lib/components/editor/StatusBar.js.map +1 -1
  20. package/lib/components/editor/__test-utils__/EditorComponentTestUtils.d.ts.map +1 -1
  21. package/lib/components/editor/__test-utils__/EditorComponentTestUtils.js +1 -1
  22. package/lib/components/editor/__test-utils__/EditorComponentTestUtils.js.map +1 -1
  23. package/lib/components/editor/editor-group/GrammarTextEditor.d.ts.map +1 -1
  24. package/lib/components/editor/editor-group/GrammarTextEditor.js +6 -3
  25. package/lib/components/editor/editor-group/GrammarTextEditor.js.map +1 -1
  26. package/lib/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.d.ts +4 -0
  27. package/lib/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.d.ts.map +1 -1
  28. package/lib/components/editor/side-bar/ProjectOverview.d.ts.map +1 -1
  29. package/lib/components/editor/side-bar/ProjectOverview.js +109 -7
  30. package/lib/components/editor/side-bar/ProjectOverview.js.map +1 -1
  31. package/lib/components/project-view/ProjectViewer.js +1 -1
  32. package/lib/components/project-view/ProjectViewer.js.map +1 -1
  33. package/lib/components/workspace-review/WorkspaceReview.js +1 -1
  34. package/lib/components/workspace-review/WorkspaceReview.js.map +1 -1
  35. package/lib/components/workspace-setup/CreateWorkspaceModal.d.ts +5 -1
  36. package/lib/components/workspace-setup/CreateWorkspaceModal.d.ts.map +1 -1
  37. package/lib/components/workspace-setup/CreateWorkspaceModal.js +34 -6
  38. package/lib/components/workspace-setup/CreateWorkspaceModal.js.map +1 -1
  39. package/lib/components/workspace-setup/WorkspaceSelectorUtils.d.ts.map +1 -1
  40. package/lib/components/workspace-setup/WorkspaceSelectorUtils.js +1 -1
  41. package/lib/components/workspace-setup/WorkspaceSelectorUtils.js.map +1 -1
  42. package/lib/components/workspace-setup/WorkspaceSetup.d.ts +1 -0
  43. package/lib/components/workspace-setup/WorkspaceSetup.d.ts.map +1 -1
  44. package/lib/components/workspace-setup/WorkspaceSetup.js +2 -1
  45. package/lib/components/workspace-setup/WorkspaceSetup.js.map +1 -1
  46. package/lib/index.css +2 -2
  47. package/lib/index.css.map +1 -1
  48. package/lib/package.json +1 -1
  49. package/lib/stores/LegendStudioApplicationPlugin.d.ts +1 -1
  50. package/lib/stores/LegendStudioApplicationPlugin.d.ts.map +1 -1
  51. package/lib/stores/editor/EditorSDLCState.d.ts +8 -2
  52. package/lib/stores/editor/EditorSDLCState.d.ts.map +1 -1
  53. package/lib/stores/editor/EditorSDLCState.js +29 -3
  54. package/lib/stores/editor/EditorSDLCState.js.map +1 -1
  55. package/lib/stores/editor/EditorStore.d.ts +1 -1
  56. package/lib/stores/editor/EditorStore.d.ts.map +1 -1
  57. package/lib/stores/editor/EditorStore.js +8 -5
  58. package/lib/stores/editor/EditorStore.js.map +1 -1
  59. package/lib/stores/editor/StandardEditorMode.d.ts.map +1 -1
  60. package/lib/stores/editor/StandardEditorMode.js +1 -1
  61. package/lib/stores/editor/StandardEditorMode.js.map +1 -1
  62. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.d.ts.map +1 -1
  63. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js +1 -1
  64. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js.map +1 -1
  65. package/lib/stores/editor/sidebar-state/ProjectOverviewState.d.ts +9 -3
  66. package/lib/stores/editor/sidebar-state/ProjectOverviewState.d.ts.map +1 -1
  67. package/lib/stores/editor/sidebar-state/ProjectOverviewState.js +71 -7
  68. package/lib/stores/editor/sidebar-state/ProjectOverviewState.js.map +1 -1
  69. package/lib/stores/editor/sidebar-state/WorkspaceReviewState.d.ts.map +1 -1
  70. package/lib/stores/editor/sidebar-state/WorkspaceReviewState.js +6 -6
  71. package/lib/stores/editor/sidebar-state/WorkspaceReviewState.js.map +1 -1
  72. package/lib/stores/editor/sidebar-state/WorkspaceUpdaterState.d.ts.map +1 -1
  73. package/lib/stores/editor/sidebar-state/WorkspaceUpdaterState.js +2 -2
  74. package/lib/stores/editor/sidebar-state/WorkspaceUpdaterState.js.map +1 -1
  75. package/lib/stores/workspace-review/WorkspaceReviewStore.d.ts +3 -1
  76. package/lib/stores/workspace-review/WorkspaceReviewStore.d.ts.map +1 -1
  77. package/lib/stores/workspace-review/WorkspaceReviewStore.js +13 -7
  78. package/lib/stores/workspace-review/WorkspaceReviewStore.js.map +1 -1
  79. package/lib/stores/workspace-setup/ProjectConfigurationStatus.d.ts +1 -1
  80. package/lib/stores/workspace-setup/ProjectConfigurationStatus.d.ts.map +1 -1
  81. package/lib/stores/workspace-setup/ProjectConfigurationStatus.js +2 -2
  82. package/lib/stores/workspace-setup/ProjectConfigurationStatus.js.map +1 -1
  83. package/lib/stores/workspace-setup/WorkspaceSetupStore.d.ts +6 -2
  84. package/lib/stores/workspace-setup/WorkspaceSetupStore.d.ts.map +1 -1
  85. package/lib/stores/workspace-setup/WorkspaceSetupStore.js +45 -12
  86. package/lib/stores/workspace-setup/WorkspaceSetupStore.js.map +1 -1
  87. package/package.json +3 -3
  88. package/src/__lib__/LegendStudioDocumentation.ts +1 -0
  89. package/src/__lib__/LegendStudioNavigation.ts +106 -25
  90. package/src/components/LegendStudioWebApplication.tsx +6 -0
  91. package/src/components/editor/ActivityBar.tsx +1 -1
  92. package/src/components/editor/Editor.tsx +15 -2
  93. package/src/components/editor/StatusBar.tsx +5 -1
  94. package/src/components/editor/__test-utils__/EditorComponentTestUtils.tsx +1 -0
  95. package/src/components/editor/editor-group/GrammarTextEditor.tsx +6 -3
  96. package/src/components/editor/editor-group/project-configuration-editor/ProjectDependencyEditor.tsx +1 -1
  97. package/src/components/editor/side-bar/ProjectOverview.tsx +340 -8
  98. package/src/components/project-view/ProjectViewer.tsx +1 -1
  99. package/src/components/workspace-review/WorkspaceReview.tsx +1 -1
  100. package/src/components/workspace-setup/CreateWorkspaceModal.tsx +63 -4
  101. package/src/components/workspace-setup/WorkspaceSelectorUtils.tsx +13 -6
  102. package/src/components/workspace-setup/WorkspaceSetup.tsx +3 -0
  103. package/src/stores/LegendStudioApplicationPlugin.ts +1 -1
  104. package/src/stores/editor/EditorSDLCState.ts +45 -0
  105. package/src/stores/editor/EditorStore.ts +15 -2
  106. package/src/stores/editor/StandardEditorMode.ts +1 -0
  107. package/src/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.ts +1 -0
  108. package/src/stores/editor/sidebar-state/ProjectOverviewState.ts +135 -1
  109. package/src/stores/editor/sidebar-state/WorkspaceReviewState.ts +6 -1
  110. package/src/stores/editor/sidebar-state/WorkspaceUpdaterState.ts +2 -0
  111. package/src/stores/workspace-review/WorkspaceReviewStore.ts +15 -1
  112. package/src/stores/workspace-setup/ProjectConfigurationStatus.ts +2 -0
  113. package/src/stores/workspace-setup/WorkspaceSetupStore.ts +71 -7
@@ -32,6 +32,7 @@ import {
32
32
  Project,
33
33
  Review,
34
34
  Workspace,
35
+ Patch,
35
36
  } from '@finos/legend-server-sdlc';
36
37
  import type { LegendStudioApplicationStore } from '../LegendStudioBaseStore.js';
37
38
  import {
@@ -63,11 +64,15 @@ export class WorkspaceSetupStore {
63
64
  importProjectSuccessReport?: ImportProjectSuccessReport | undefined;
64
65
  showCreateProjectModal = false;
65
66
 
67
+ patches: Patch[] = [];
68
+ loadPatchesState = ActionState.create();
69
+
66
70
  workspaces: Workspace[] = [];
67
71
  currentWorkspace?: Workspace | undefined;
68
72
  loadWorkspacesState = ActionState.create();
69
73
  createWorkspaceState = ActionState.create();
70
74
  showCreateWorkspaceModal = false;
75
+ showAdvancedWorkspaceFilterOptions = false;
71
76
 
72
77
  constructor(
73
78
  applicationStore: LegendStudioApplicationStore,
@@ -81,9 +86,11 @@ export class WorkspaceSetupStore {
81
86
  showCreateProjectModal: observable,
82
87
  workspaces: observable,
83
88
  currentWorkspace: observable,
89
+ showAdvancedWorkspaceFilterOptions: observable,
84
90
  showCreateWorkspaceModal: observable,
85
91
  setShowCreateProjectModal: action,
86
92
  setShowCreateWorkspaceModal: action,
93
+ setShowAdvancedWorkspaceFilterOptions: action,
87
94
  setImportProjectSuccessReport: action,
88
95
  changeWorkspace: action,
89
96
  resetProject: action,
@@ -108,6 +115,10 @@ export class WorkspaceSetupStore {
108
115
  this.showCreateWorkspaceModal = val;
109
116
  }
110
117
 
118
+ setShowAdvancedWorkspaceFilterOptions(val: boolean): void {
119
+ this.showAdvancedWorkspaceFilterOptions = val;
120
+ }
121
+
111
122
  setImportProjectSuccessReport(
112
123
  importProjectSuccessReport: ImportProjectSuccessReport | undefined,
113
124
  ): void {
@@ -116,10 +127,11 @@ export class WorkspaceSetupStore {
116
127
 
117
128
  resetProject(): void {
118
129
  this.currentProject = undefined;
130
+ this.patches = [];
119
131
  this.workspaces = [];
120
132
  this.currentWorkspace = undefined;
121
133
  this.applicationStore.navigationService.navigator.updateCurrentLocation(
122
- generateSetupRoute(undefined, undefined, undefined),
134
+ generateSetupRoute(undefined, undefined, undefined, undefined),
123
135
  );
124
136
  this.currentProjectConfigurationStatus = undefined;
125
137
  }
@@ -128,7 +140,12 @@ export class WorkspaceSetupStore {
128
140
  this.currentWorkspace = undefined;
129
141
  if (this.currentProject) {
130
142
  this.applicationStore.navigationService.navigator.updateCurrentLocation(
131
- generateSetupRoute(this.currentProject.projectId, undefined, undefined),
143
+ generateSetupRoute(
144
+ this.currentProject.projectId,
145
+ undefined,
146
+ undefined,
147
+ undefined,
148
+ ),
132
149
  );
133
150
  }
134
151
  }
@@ -157,7 +174,7 @@ export class WorkspaceSetupStore {
157
174
  );
158
175
  } catch {
159
176
  this.applicationStore.navigationService.navigator.updateCurrentLocation(
160
- generateSetupRoute(undefined),
177
+ generateSetupRoute(undefined, undefined),
161
178
  );
162
179
  this.initState.pass();
163
180
  return;
@@ -221,12 +238,30 @@ export class WorkspaceSetupStore {
221
238
  ): GeneratorFn<void> {
222
239
  this.currentProject = project;
223
240
  this.currentProjectConfigurationStatus = undefined;
224
- this.loadWorkspacesState.inProgress();
241
+ this.loadPatchesState.inProgress();
242
+ try {
243
+ this.patches = (
244
+ (yield this.sdlcServerClient.getPatches(
245
+ project.projectId,
246
+ )) as PlainObject<Patch>[]
247
+ ).map((v) => Patch.serialization.fromJson(v));
248
+ this.loadPatchesState.pass();
249
+ } catch (error) {
250
+ assertErrorThrown(error);
251
+ this.applicationStore.logService.error(
252
+ LogEvent.create(LEGEND_STUDIO_APP_EVENT.DEPOT_MANAGER_FAILURE),
253
+ error,
254
+ );
255
+ this.applicationStore.notificationService.notifyError(error);
256
+ this.loadPatchesState.fail();
257
+ }
225
258
 
259
+ this.loadWorkspacesState.inProgress();
226
260
  try {
227
261
  this.currentProjectConfigurationStatus =
228
262
  (yield fetchProjectConfigurationStatus(
229
263
  project.projectId,
264
+ undefined,
230
265
  this.applicationStore,
231
266
  this.sdlcServerClient,
232
267
  )) as ProjectConfigurationStatus;
@@ -234,6 +269,7 @@ export class WorkspaceSetupStore {
234
269
  const workspacesInConflictResolutionIds = (
235
270
  (yield this.sdlcServerClient.getWorkspacesInConflictResolutionMode(
236
271
  project.projectId,
272
+ undefined,
237
273
  )) as Workspace[]
238
274
  ).map((workspace) => workspace.workspaceId);
239
275
 
@@ -250,6 +286,30 @@ export class WorkspaceSetupStore {
250
286
  !workspacesInConflictResolutionIds.includes(workspace.workspaceId),
251
287
  );
252
288
 
289
+ for (const patch of this.patches) {
290
+ this.workspaces = this.workspaces.concat(
291
+ (
292
+ (yield this.sdlcServerClient.getWorkspaces(
293
+ project.projectId,
294
+ patch.patchReleaseVersionId.id,
295
+ )) as PlainObject<Workspace>[]
296
+ )
297
+ .map((v) => {
298
+ const w = Workspace.serialization.fromJson(v);
299
+ w.source = patch.patchReleaseVersionId.id;
300
+ return w;
301
+ })
302
+ .filter(
303
+ // NOTE we don't handle workspaces that only have conflict resolution but no standard workspace
304
+ // since that indicates bad state of the SDLC server
305
+ (workspace) =>
306
+ !workspacesInConflictResolutionIds.includes(
307
+ workspace.workspaceId,
308
+ ),
309
+ ),
310
+ );
311
+ }
312
+
253
313
  if (workspaceInfo) {
254
314
  const matchingWorkspace = this.workspaces.find(
255
315
  (workspace) =>
@@ -260,16 +320,15 @@ export class WorkspaceSetupStore {
260
320
  this.changeWorkspace(matchingWorkspace);
261
321
  } else {
262
322
  this.applicationStore.navigationService.navigator.updateCurrentLocation(
263
- generateSetupRoute(project.projectId),
323
+ generateSetupRoute(project.projectId, undefined),
264
324
  );
265
325
  }
266
326
  } else {
267
327
  this.currentWorkspace = undefined;
268
328
  this.applicationStore.navigationService.navigator.updateCurrentLocation(
269
- generateSetupRoute(project.projectId),
329
+ generateSetupRoute(project.projectId, undefined),
270
330
  );
271
331
  }
272
-
273
332
  this.loadWorkspacesState.pass();
274
333
  } catch (error) {
275
334
  assertErrorThrown(error);
@@ -292,6 +351,7 @@ export class WorkspaceSetupStore {
292
351
  this.applicationStore.navigationService.navigator.updateCurrentLocation(
293
352
  generateSetupRoute(
294
353
  this.currentProject.projectId,
354
+ workspace.source,
295
355
  workspace.workspaceId,
296
356
  workspace.workspaceType,
297
357
  ),
@@ -348,6 +408,7 @@ export class WorkspaceSetupStore {
348
408
  const importReview = Review.serialization.fromJson(
349
409
  (yield this.sdlcServerClient.getReview(
350
410
  report.project.projectId,
411
+ undefined,
351
412
  report.reviewId,
352
413
  )) as PlainObject<Review>,
353
414
  );
@@ -368,6 +429,7 @@ export class WorkspaceSetupStore {
368
429
 
369
430
  *createWorkspace(
370
431
  projectId: string,
432
+ patchReleaseVersionId: string | undefined,
371
433
  workspaceId: string,
372
434
  workspaceType: WorkspaceType,
373
435
  ): GeneratorFn<void> {
@@ -376,10 +438,12 @@ export class WorkspaceSetupStore {
376
438
  const newWorkspace = Workspace.serialization.fromJson(
377
439
  (yield this.sdlcServerClient.createWorkspace(
378
440
  projectId,
441
+ patchReleaseVersionId,
379
442
  workspaceId,
380
443
  workspaceType,
381
444
  )) as PlainObject<Workspace>,
382
445
  );
446
+ newWorkspace.source = patchReleaseVersionId;
383
447
 
384
448
  this.applicationStore.notificationService.notifySuccess(
385
449
  `Workspace '${newWorkspace.workspaceId}' is succesfully created`,