@finos/legend-application-studio 19.1.0 → 20.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 (195) hide show
  1. package/lib/application/LegendStudioApplicationConfig.d.ts +6 -0
  2. package/lib/application/LegendStudioApplicationConfig.d.ts.map +1 -1
  3. package/lib/application/LegendStudioApplicationConfig.js +7 -0
  4. package/lib/application/LegendStudioApplicationConfig.js.map +1 -1
  5. package/lib/components/EditorComponentTestUtils.d.ts +1 -1
  6. package/lib/components/EditorComponentTestUtils.d.ts.map +1 -1
  7. package/lib/components/EditorComponentTestUtils.js +23 -50
  8. package/lib/components/EditorComponentTestUtils.js.map +1 -1
  9. package/lib/components/editor/StatusBar.d.ts.map +1 -1
  10. package/lib/components/editor/StatusBar.js +10 -3
  11. package/lib/components/editor/StatusBar.js.map +1 -1
  12. package/lib/components/editor/aux-panel/AuxiliaryPanel.d.ts.map +1 -1
  13. package/lib/components/editor/aux-panel/AuxiliaryPanel.js +11 -3
  14. package/lib/components/editor/aux-panel/AuxiliaryPanel.js.map +1 -1
  15. package/lib/components/editor/aux-panel/Console.d.ts.map +1 -1
  16. package/lib/components/editor/aux-panel/Console.js +2 -1
  17. package/lib/components/editor/aux-panel/Console.js.map +1 -1
  18. package/lib/components/editor/aux-panel/DevTool.d.ts.map +1 -1
  19. package/lib/components/editor/aux-panel/DevTool.js +4 -7
  20. package/lib/components/editor/aux-panel/DevTool.js.map +1 -1
  21. package/lib/components/editor/aux-panel/Problems.d.ts +20 -0
  22. package/lib/components/editor/aux-panel/Problems.d.ts.map +1 -0
  23. package/lib/components/editor/aux-panel/Problems.js +48 -0
  24. package/lib/components/editor/aux-panel/Problems.js.map +1 -0
  25. package/lib/components/editor/edit-panel/GrammarTextEditor.d.ts.map +1 -1
  26. package/lib/components/editor/edit-panel/GrammarTextEditor.js +36 -25
  27. package/lib/components/editor/edit-panel/GrammarTextEditor.js.map +1 -1
  28. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js +16 -16
  29. package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
  30. package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts.map +1 -1
  31. package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js +4 -4
  32. package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js.map +1 -1
  33. package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js +20 -6
  34. package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js.map +1 -1
  35. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -1
  36. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js +2 -2
  37. package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -1
  38. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts.map +1 -1
  39. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js +2 -2
  40. package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -1
  41. package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
  42. package/lib/components/editor/side-bar/Explorer.js +3 -3
  43. package/lib/components/editor/side-bar/Explorer.js.map +1 -1
  44. package/lib/components/editor/side-bar/ProjectOverview.d.ts.map +1 -1
  45. package/lib/components/editor/side-bar/ProjectOverview.js +3 -3
  46. package/lib/components/editor/side-bar/ProjectOverview.js.map +1 -1
  47. package/lib/components/shared/DiffView.js +2 -2
  48. package/lib/components/shared/DiffView.js.map +1 -1
  49. package/lib/index.css +2 -2
  50. package/lib/index.css.map +1 -1
  51. package/lib/package.json +6 -6
  52. package/lib/stores/ChangeDetectionState.d.ts +2 -0
  53. package/lib/stores/ChangeDetectionState.d.ts.map +1 -1
  54. package/lib/stores/ChangeDetectionState.js +12 -6
  55. package/lib/stores/ChangeDetectionState.js.map +1 -1
  56. package/lib/stores/EditorConfig.d.ts +2 -1
  57. package/lib/stores/EditorConfig.d.ts.map +1 -1
  58. package/lib/stores/EditorConfig.js +1 -0
  59. package/lib/stores/EditorConfig.js.map +1 -1
  60. package/lib/stores/EditorGraphState.d.ts +17 -16
  61. package/lib/stores/EditorGraphState.d.ts.map +1 -1
  62. package/lib/stores/EditorGraphState.js +152 -94
  63. package/lib/stores/EditorGraphState.js.map +1 -1
  64. package/lib/stores/EditorSDLCState.d.ts +6 -6
  65. package/lib/stores/EditorSDLCState.d.ts.map +1 -1
  66. package/lib/stores/EditorSDLCState.js +52 -27
  67. package/lib/stores/EditorSDLCState.js.map +1 -1
  68. package/lib/stores/EditorStore.js +1 -1
  69. package/lib/stores/EditorStore.js.map +1 -1
  70. package/lib/stores/EmbeddedQueryBuilderState.js +1 -1
  71. package/lib/stores/EmbeddedQueryBuilderState.js.map +1 -1
  72. package/lib/stores/editor/NewElementState.d.ts.map +1 -1
  73. package/lib/stores/editor/NewElementState.js +14 -5
  74. package/lib/stores/editor/NewElementState.js.map +1 -1
  75. package/lib/stores/editor/StandardEditorMode.d.ts.map +1 -1
  76. package/lib/stores/editor/StandardEditorMode.js +2 -2
  77. package/lib/stores/editor/StandardEditorMode.js.map +1 -1
  78. package/lib/stores/editor-state/FileGenerationState.d.ts +3 -3
  79. package/lib/stores/editor-state/FileGenerationState.d.ts.map +1 -1
  80. package/lib/stores/editor-state/FileGenerationState.js +9 -5
  81. package/lib/stores/editor-state/FileGenerationState.js.map +1 -1
  82. package/lib/stores/editor-state/GrammarTextEditorState.d.ts +6 -4
  83. package/lib/stores/editor-state/GrammarTextEditorState.d.ts.map +1 -1
  84. package/lib/stores/editor-state/GrammarTextEditorState.js +14 -8
  85. package/lib/stores/editor-state/GrammarTextEditorState.js.map +1 -1
  86. package/lib/stores/editor-state/element-editor-state/ClassEditorState.d.ts +0 -1
  87. package/lib/stores/editor-state/element-editor-state/ClassEditorState.d.ts.map +1 -1
  88. package/lib/stores/editor-state/element-editor-state/ClassEditorState.js +0 -5
  89. package/lib/stores/editor-state/element-editor-state/ClassEditorState.js.map +1 -1
  90. package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts +0 -1
  91. package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
  92. package/lib/stores/editor-state/element-editor-state/ElementEditorState.js +0 -3
  93. package/lib/stores/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
  94. package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.d.ts +2 -2
  95. package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.d.ts.map +1 -1
  96. package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.js +5 -4
  97. package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.js.map +1 -1
  98. package/lib/stores/editor-state/element-editor-state/FunctionEditorState.d.ts +0 -1
  99. package/lib/stores/editor-state/element-editor-state/FunctionEditorState.d.ts.map +1 -1
  100. package/lib/stores/editor-state/element-editor-state/FunctionEditorState.js +0 -4
  101. package/lib/stores/editor-state/element-editor-state/FunctionEditorState.js.map +1 -1
  102. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.d.ts +0 -1
  103. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.d.ts.map +1 -1
  104. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js +0 -6
  105. package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js.map +1 -1
  106. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts +6 -6
  107. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts.map +1 -1
  108. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js +24 -14
  109. package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
  110. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.d.ts +6 -6
  111. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.d.ts.map +1 -1
  112. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js +30 -15
  113. package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js.map +1 -1
  114. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
  115. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +1 -1
  116. package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
  117. package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts +4 -4
  118. package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts.map +1 -1
  119. package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js +54 -44
  120. package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js.map +1 -1
  121. package/lib/stores/project-viewer/ProjectViewerStore.d.ts.map +1 -1
  122. package/lib/stores/project-viewer/ProjectViewerStore.js +1 -1
  123. package/lib/stores/project-viewer/ProjectViewerStore.js.map +1 -1
  124. package/lib/stores/sidebar-state/LocalChangesState.d.ts +13 -13
  125. package/lib/stores/sidebar-state/LocalChangesState.d.ts.map +1 -1
  126. package/lib/stores/sidebar-state/LocalChangesState.js +71 -63
  127. package/lib/stores/sidebar-state/LocalChangesState.js.map +1 -1
  128. package/lib/stores/sidebar-state/ProjectOverviewState.d.ts.map +1 -1
  129. package/lib/stores/sidebar-state/ProjectOverviewState.js +19 -4
  130. package/lib/stores/sidebar-state/ProjectOverviewState.js.map +1 -1
  131. package/lib/stores/sidebar-state/WorkflowManagerState.d.ts +8 -8
  132. package/lib/stores/sidebar-state/WorkflowManagerState.d.ts.map +1 -1
  133. package/lib/stores/sidebar-state/WorkflowManagerState.js +15 -11
  134. package/lib/stores/sidebar-state/WorkflowManagerState.js.map +1 -1
  135. package/lib/stores/sidebar-state/WorkspaceReviewState.d.ts +3 -3
  136. package/lib/stores/sidebar-state/WorkspaceReviewState.d.ts.map +1 -1
  137. package/lib/stores/sidebar-state/WorkspaceReviewState.js +21 -6
  138. package/lib/stores/sidebar-state/WorkspaceReviewState.js.map +1 -1
  139. package/lib/stores/sidebar-state/WorkspaceSyncState.d.ts +2 -2
  140. package/lib/stores/sidebar-state/WorkspaceSyncState.d.ts.map +1 -1
  141. package/lib/stores/sidebar-state/WorkspaceSyncState.js +9 -7
  142. package/lib/stores/sidebar-state/WorkspaceSyncState.js.map +1 -1
  143. package/lib/stores/sidebar-state/WorkspaceUpdaterState.d.ts +2 -2
  144. package/lib/stores/sidebar-state/WorkspaceUpdaterState.d.ts.map +1 -1
  145. package/lib/stores/sidebar-state/WorkspaceUpdaterState.js +8 -4
  146. package/lib/stores/sidebar-state/WorkspaceUpdaterState.js.map +1 -1
  147. package/lib/stores/workspace-review/WorkspaceReviewStore.d.ts +2 -2
  148. package/lib/stores/workspace-review/WorkspaceReviewStore.d.ts.map +1 -1
  149. package/lib/stores/workspace-review/WorkspaceReviewStore.js +27 -10
  150. package/lib/stores/workspace-review/WorkspaceReviewStore.js.map +1 -1
  151. package/package.json +15 -15
  152. package/src/application/LegendStudioApplicationConfig.ts +7 -0
  153. package/src/components/EditorComponentTestUtils.tsx +64 -60
  154. package/src/components/editor/StatusBar.tsx +38 -3
  155. package/src/components/editor/aux-panel/AuxiliaryPanel.tsx +32 -10
  156. package/src/components/editor/aux-panel/Console.tsx +4 -3
  157. package/src/components/editor/aux-panel/DevTool.tsx +47 -79
  158. package/src/components/editor/aux-panel/Problems.tsx +103 -0
  159. package/src/components/editor/edit-panel/GrammarTextEditor.tsx +48 -36
  160. package/src/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.tsx +61 -61
  161. package/src/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.tsx +21 -25
  162. package/src/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.tsx +23 -23
  163. package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +2 -1
  164. package/src/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.tsx +19 -22
  165. package/src/components/editor/side-bar/Explorer.tsx +5 -3
  166. package/src/components/editor/side-bar/ProjectOverview.tsx +5 -3
  167. package/src/components/shared/DiffView.tsx +2 -2
  168. package/src/stores/ChangeDetectionState.ts +17 -8
  169. package/src/stores/EditorConfig.ts +1 -0
  170. package/src/stores/EditorGraphState.ts +223 -136
  171. package/src/stores/EditorSDLCState.ts +65 -30
  172. package/src/stores/EditorStore.ts +1 -1
  173. package/src/stores/EmbeddedQueryBuilderState.ts +1 -1
  174. package/src/stores/editor/NewElementState.ts +24 -5
  175. package/src/stores/editor/StandardEditorMode.ts +4 -2
  176. package/src/stores/editor-state/FileGenerationState.ts +19 -8
  177. package/src/stores/editor-state/GrammarTextEditorState.ts +18 -10
  178. package/src/stores/editor-state/element-editor-state/ClassEditorState.ts +0 -12
  179. package/src/stores/editor-state/element-editor-state/ElementEditorState.ts +0 -4
  180. package/src/stores/editor-state/element-editor-state/ElementFileGenerationState.ts +8 -6
  181. package/src/stores/editor-state/element-editor-state/FunctionEditorState.ts +0 -5
  182. package/src/stores/editor-state/element-editor-state/mapping/MappingEditorState.ts +0 -11
  183. package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +29 -15
  184. package/src/stores/editor-state/element-editor-state/mapping/MappingTestState.ts +37 -23
  185. package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +4 -3
  186. package/src/stores/editor-state/element-editor-state/service/ServiceRegistrationState.ts +63 -48
  187. package/src/stores/project-viewer/ProjectViewerStore.ts +5 -3
  188. package/src/stores/sidebar-state/LocalChangesState.ts +130 -115
  189. package/src/stores/sidebar-state/ProjectOverviewState.ts +19 -4
  190. package/src/stores/sidebar-state/WorkflowManagerState.ts +28 -31
  191. package/src/stores/sidebar-state/WorkspaceReviewState.ts +24 -8
  192. package/src/stores/sidebar-state/WorkspaceSyncState.ts +11 -16
  193. package/src/stores/sidebar-state/WorkspaceUpdaterState.ts +11 -7
  194. package/src/stores/workspace-review/WorkspaceReviewStore.ts +39 -12
  195. package/tsconfig.json +1 -0
@@ -15,14 +15,7 @@
15
15
  */
16
16
 
17
17
  import type { TreeNodeData, TreeData } from '@finos/legend-art';
18
- import {
19
- makeAutoObservable,
20
- observable,
21
- action,
22
- flowResult,
23
- makeObservable,
24
- flow,
25
- } from 'mobx';
18
+ import { observable, action, flowResult, makeObservable, flow } from 'mobx';
26
19
  import { LEGEND_STUDIO_APP_EVENT } from '../LegendStudioAppEvent.js';
27
20
  import type { EditorStore } from '../EditorStore.js';
28
21
  import type { EditorSDLCState } from '../EditorSDLCState.js';
@@ -102,11 +95,12 @@ const updateWorkflowJobData = (
102
95
  };
103
96
 
104
97
  export class WorkflowLogState {
105
- editorStore: EditorStore;
106
- workflowManagerState: WorkflowManagerState;
98
+ readonly editorStore: EditorStore;
99
+ readonly workflowManagerState: WorkflowManagerState;
100
+ readonly fetchJobLogState = ActionState.create();
101
+
107
102
  job: WorkflowJob | undefined;
108
103
  logs: string;
109
- fetchJobLogState = ActionState.create();
110
104
 
111
105
  constructor(
112
106
  editorStore: EditorStore,
@@ -114,12 +108,14 @@ export class WorkflowLogState {
114
108
  job: WorkflowJob | undefined,
115
109
  logs: string | undefined,
116
110
  ) {
117
- makeAutoObservable(this, {
118
- editorStore: false,
111
+ makeObservable(this, {
119
112
  job: observable,
120
113
  logs: observable,
121
114
  setLogs: action,
122
115
  setJob: action,
116
+ closeModal: action,
117
+ refreshJobLogs: flow,
118
+ viewJobLogs: flow,
123
119
  });
124
120
 
125
121
  this.editorStore = editorStore;
@@ -187,8 +183,9 @@ export class WorkflowLogState {
187
183
 
188
184
  export class WorkflowState {
189
185
  readonly uuid = uuid();
190
- editorStore: EditorStore;
191
- workflowManagerState: WorkflowManagerState;
186
+ readonly editorStore: EditorStore;
187
+ readonly workflowManagerState: WorkflowManagerState;
188
+
192
189
  treeData: TreeData<WorkflowExplorerTreeNodeData>;
193
190
  isExecutingWorkflowRequest = false;
194
191
 
@@ -198,10 +195,15 @@ export class WorkflowState {
198
195
  workflow: Workflow,
199
196
  jobs: WorkflowJob[] | undefined,
200
197
  ) {
201
- makeAutoObservable(this, {
202
- editorStore: false,
198
+ makeObservable(this, {
203
199
  treeData: observable.ref,
200
+ isExecutingWorkflowRequest: observable,
204
201
  setWorkflowTreeData: action,
202
+ fetchAllWorkspaceWorkJobs: flow,
203
+ onTreeNodeSelect: flow,
204
+ cancelJob: flow,
205
+ refreshWorkflow: flow,
206
+ retryJob: flow,
205
207
  });
206
208
 
207
209
  this.editorStore = editorStore;
@@ -326,19 +328,15 @@ export class WorkflowState {
326
328
  }
327
329
 
328
330
  export abstract class WorkflowManagerState {
329
- editorStore: EditorStore;
330
- sdlcState: EditorSDLCState;
331
- fetchWorkflowsState = ActionState.create();
331
+ readonly editorStore: EditorStore;
332
+ readonly sdlcState: EditorSDLCState;
333
+ readonly fetchWorkflowsState = ActionState.create();
334
+
332
335
  logState: WorkflowLogState;
333
336
  workflowStates: WorkflowState[] = [];
334
337
 
335
338
  constructor(editorStore: EditorStore, sdlcState: EditorSDLCState) {
336
- this.editorStore = editorStore;
337
- this.sdlcState = sdlcState;
338
339
  makeObservable(this, {
339
- editorStore: false,
340
- sdlcState: false,
341
- fetchWorkflowsState: observable,
342
340
  logState: observable,
343
341
  workflowStates: observable,
344
342
  fetchAllWorkflows: flow,
@@ -350,6 +348,10 @@ export abstract class WorkflowManagerState {
350
348
  cancelJob: flow,
351
349
  getJobLogs: flow,
352
350
  });
351
+
352
+ this.editorStore = editorStore;
353
+ this.sdlcState = sdlcState;
354
+
353
355
  this.logState = new WorkflowLogState(
354
356
  this.editorStore,
355
357
  this,
@@ -357,18 +359,13 @@ export abstract class WorkflowManagerState {
357
359
  undefined,
358
360
  );
359
361
  }
360
- abstract getWorkflows(): GeneratorFn<Workflow[]>;
361
362
 
363
+ abstract getWorkflows(): GeneratorFn<Workflow[]>;
362
364
  abstract getWorkflow(workflowId: string): GeneratorFn<Workflow>;
363
-
364
365
  abstract getJobs(workflowId: string): GeneratorFn<WorkflowJob[]>;
365
-
366
366
  abstract getJob(job: WorkflowJob): GeneratorFn<WorkflowJob[]>;
367
-
368
367
  abstract retryJob(workflowJob: WorkflowJob): GeneratorFn<void>;
369
-
370
368
  abstract cancelJob(workflowJob: WorkflowJob): GeneratorFn<void>;
371
-
372
369
  abstract getJobLogs(workflowJob: WorkflowJob): GeneratorFn<string>;
373
370
 
374
371
  *fetchAllWorkflows(): GeneratorFn<void> {
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { action, makeAutoObservable, flowResult } from 'mobx';
17
+ import { action, makeObservable, flowResult, observable, flow } from 'mobx';
18
18
  import type { EditorStore } from '../EditorStore.js';
19
19
  import type { EditorSDLCState } from '../EditorSDLCState.js';
20
20
  import { CHANGE_DETECTION_EVENT } from '../ChangeDetectionEvent.js';
@@ -41,8 +41,9 @@ import {
41
41
  import { ActionAlertActionType } from '@finos/legend-application';
42
42
 
43
43
  export class WorkspaceReviewState {
44
- editorStore: EditorStore;
45
- sdlcState: EditorSDLCState;
44
+ readonly editorStore: EditorStore;
45
+ readonly sdlcState: EditorSDLCState;
46
+
46
47
  reviewTitle = '';
47
48
  committedReviewsBetweenWorkspaceBaseAndProjectLatest: Review[] = [];
48
49
  workspaceReview?: Review | undefined;
@@ -57,20 +58,35 @@ export class WorkspaceReviewState {
57
58
  isRecreatingWorkspaceAfterCommittingReview = false;
58
59
 
59
60
  constructor(editorStore: EditorStore, sdlcState: EditorSDLCState) {
60
- makeAutoObservable(this, {
61
- editorStore: false,
62
- sdlcState: false,
61
+ makeObservable(this, {
62
+ reviewTitle: observable,
63
+ committedReviewsBetweenWorkspaceBaseAndProjectLatest: observable,
64
+ workspaceReview: observable,
65
+ isUpdatingWorkspace: observable,
66
+ isRefreshingWorkspaceUpdater: observable,
67
+ isFetchingCurrentWorkspaceReview: observable,
68
+ isRefreshingWorkspaceChangesDetector: observable,
69
+ isClosingWorkspaceReview: observable,
70
+ isCreatingWorkspaceReview: observable,
71
+ isCommittingWorkspaceReview: observable,
72
+ isRecreatingWorkspaceAfterCommittingReview: observable,
63
73
  setReviewTitle: action,
64
74
  openReviewChange: action,
75
+ refreshWorkspaceChanges: flow,
76
+ fetchCurrentWorkspaceReview: flow,
77
+ recreateWorkspaceAfterCommittingReview: flow,
78
+ closeWorkspaceReview: flow,
79
+ createWorkspaceReview: flow,
80
+ commitWorkspaceReview: flow,
65
81
  });
66
82
 
67
83
  this.editorStore = editorStore;
68
84
  this.sdlcState = sdlcState;
69
85
  }
70
86
 
71
- setReviewTitle = (val: string): void => {
87
+ setReviewTitle(val: string): void {
72
88
  this.reviewTitle = val;
73
- };
89
+ }
74
90
 
75
91
  openReviewChange(diff: EntityDiff): void {
76
92
  const fromEntityGetter = (
@@ -14,14 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import {
18
- makeAutoObservable,
19
- flowResult,
20
- action,
21
- flow,
22
- makeObservable,
23
- observable,
24
- } from 'mobx';
17
+ import { flowResult, action, flow, makeObservable, observable } from 'mobx';
25
18
  import type { EditorStore } from '../EditorStore.js';
26
19
  import type { EditorSDLCState } from '../EditorSDLCState.js';
27
20
  import type { Entity } from '@finos/legend-storage';
@@ -373,23 +366,25 @@ class WorkspaceSyncConflictResolutionState extends AbstractConflictResolutionSta
373
366
  }
374
367
 
375
368
  export class WorkspaceSyncState {
376
- editorStore: EditorStore;
377
- sdlcState: EditorSDLCState;
369
+ readonly editorStore: EditorStore;
370
+ readonly sdlcState: EditorSDLCState;
378
371
 
379
372
  pullChangesState = ActionState.create();
380
373
  incomingRevisions: Revision[] = [];
381
374
  workspaceSyncConflictResolutionState: WorkspaceSyncConflictResolutionState;
382
375
 
383
376
  constructor(editorStore: EditorStore, sdlcState: EditorSDLCState) {
384
- makeAutoObservable(this, {
385
- editorStore: false,
386
- sdlcState: false,
387
- fetchIncomingRevisions: flow,
377
+ makeObservable(this, {
378
+ pullChangesState: observable,
379
+ incomingRevisions: observable,
380
+ workspaceSyncConflictResolutionState: observable,
381
+ resetConflictState: action,
388
382
  setIncomingRevisions: action,
383
+ fetchIncomingRevisions: flow,
389
384
  pullChanges: flow,
390
- resetConflictState: action,
391
- forcePull: flow,
392
385
  loadChanges: flow,
386
+ forcePull: flow,
387
+ applyResolutionChanges: flow,
393
388
  });
394
389
 
395
390
  this.editorStore = editorStore;
@@ -16,7 +16,7 @@
16
16
 
17
17
  import type { EditorStore } from '../EditorStore.js';
18
18
  import type { EditorSDLCState } from '../EditorSDLCState.js';
19
- import { action, makeAutoObservable, flowResult } from 'mobx';
19
+ import { action, makeObservable, flowResult, observable, flow } from 'mobx';
20
20
  import { CHANGE_DETECTION_EVENT } from '../ChangeDetectionEvent.js';
21
21
  import {
22
22
  type GeneratorFn,
@@ -45,19 +45,23 @@ import {
45
45
  import { LEGEND_STUDIO_APP_EVENT } from '../LegendStudioAppEvent.js';
46
46
 
47
47
  export class WorkspaceUpdaterState {
48
- editorStore: EditorStore;
49
- sdlcState: EditorSDLCState;
50
- committedReviewsBetweenWorkspaceBaseAndProjectLatest: Review[] = [];
48
+ readonly editorStore: EditorStore;
49
+ readonly sdlcState: EditorSDLCState;
51
50
 
51
+ committedReviewsBetweenWorkspaceBaseAndProjectLatest: Review[] = [];
52
52
  isUpdatingWorkspace = false;
53
53
  isRefreshingWorkspaceUpdater = false;
54
54
 
55
55
  constructor(editorStore: EditorStore, sdlcState: EditorSDLCState) {
56
- makeAutoObservable(this, {
57
- editorStore: false,
58
- sdlcState: false,
56
+ makeObservable(this, {
57
+ committedReviewsBetweenWorkspaceBaseAndProjectLatest: observable,
58
+ isUpdatingWorkspace: observable,
59
+ isRefreshingWorkspaceUpdater: observable,
59
60
  openProjectLatestChange: action,
60
61
  openPotentialWorkspaceUpdateConflict: action,
62
+ refreshWorkspaceUpdater: flow,
63
+ updateWorkspace: flow,
64
+ fetchLatestCommittedReviews: flow,
61
65
  });
62
66
 
63
67
  this.editorStore = editorStore;
@@ -22,7 +22,14 @@ import {
22
22
  LogEvent,
23
23
  guaranteeNonNullable,
24
24
  } from '@finos/legend-shared';
25
- import { makeAutoObservable, action, flowResult } from 'mobx';
25
+ import {
26
+ makeObservable,
27
+ action,
28
+ flowResult,
29
+ observable,
30
+ flow,
31
+ computed,
32
+ } from 'mobx';
26
33
  import type { EditorStore } from '../EditorStore.js';
27
34
  import { ACTIVITY_MODE } from '../EditorConfig.js';
28
35
  import type { Entity } from '@finos/legend-storage';
@@ -31,7 +38,8 @@ import { LEGEND_STUDIO_APP_EVENT } from '../LegendStudioAppEvent.js';
31
38
  import { TAB_SIZE } from '@finos/legend-application';
32
39
 
33
40
  export class WorkspaceReviewStore {
34
- editorStore: EditorStore;
41
+ readonly editorStore: EditorStore;
42
+
35
43
  currentProjectId?: string | undefined;
36
44
  currentProject?: Project | undefined;
37
45
  currentReviewId?: string | undefined;
@@ -44,12 +52,29 @@ export class WorkspaceReviewStore {
44
52
  isReopeningReview = false;
45
53
 
46
54
  constructor(editorStore: EditorStore) {
47
- makeAutoObservable(this, {
48
- editorStore: false,
49
- projectId: false,
50
- reviewId: false,
51
- review: false,
55
+ makeObservable(this, {
56
+ currentProjectId: observable,
57
+ currentProject: observable,
58
+ currentReviewId: observable,
59
+ currentReview: observable,
60
+ isFetchingCurrentReview: observable,
61
+ isFetchingComparison: observable,
62
+ isApprovingReview: observable,
63
+ isClosingReview: observable,
64
+ isCommittingReview: observable,
65
+ isReopeningReview: observable,
66
+ projectId: computed,
67
+ reviewId: computed,
68
+ review: computed,
52
69
  setProjectIdAndReviewId: action,
70
+ initialize: flow,
71
+ fetchReviewComparison: flow,
72
+ fetchProject: flow,
73
+ getReview: flow,
74
+ approveReview: flow,
75
+ commitReview: flow,
76
+ reOpenReview: flow,
77
+ closeReview: flow,
53
78
  });
54
79
 
55
80
  this.editorStore = editorStore;
@@ -59,13 +84,20 @@ export class WorkspaceReviewStore {
59
84
  get projectId(): string {
60
85
  return guaranteeNonNullable(this.currentProjectId, 'Project ID must exist');
61
86
  }
87
+
62
88
  get reviewId(): string {
63
89
  return guaranteeNonNullable(this.currentReviewId, 'Review ID must exist');
64
90
  }
91
+
65
92
  get review(): Review {
66
93
  return guaranteeNonNullable(this.currentReview, 'Review must exist');
67
94
  }
68
95
 
96
+ setProjectIdAndReviewId(projectId: string, reviewId: string): void {
97
+ this.currentProjectId = projectId;
98
+ this.currentReviewId = reviewId;
99
+ }
100
+
69
101
  *initialize(): GeneratorFn<void> {
70
102
  try {
71
103
  // setup engine
@@ -94,11 +126,6 @@ export class WorkspaceReviewStore {
94
126
  }
95
127
  }
96
128
 
97
- setProjectIdAndReviewId(projectId: string, reviewId: string): void {
98
- this.currentProjectId = projectId;
99
- this.currentReviewId = reviewId;
100
- }
101
-
102
129
  *fetchReviewComparison(): GeneratorFn<void> {
103
130
  this.isFetchingComparison = true;
104
131
  try {
package/tsconfig.json CHANGED
@@ -159,6 +159,7 @@
159
159
  "./src/components/editor/aux-panel/AuxiliaryPanel.tsx",
160
160
  "./src/components/editor/aux-panel/Console.tsx",
161
161
  "./src/components/editor/aux-panel/DevTool.tsx",
162
+ "./src/components/editor/aux-panel/Problems.tsx",
162
163
  "./src/components/editor/command-center/ProjectSearchCommand.tsx",
163
164
  "./src/components/editor/edit-panel/EditPanel.tsx",
164
165
  "./src/components/editor/edit-panel/FileGenerationViewer.tsx",