@finos/legend-application-studio 28.15.4 → 28.15.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/lib/components/editor/editor-group/EditorGroup.d.ts.map +1 -1
  2. package/lib/components/editor/editor-group/EditorGroup.js +5 -0
  3. package/lib/components/editor/editor-group/EditorGroup.js.map +1 -1
  4. package/lib/components/editor/editor-group/UnsupportedElementEditor.d.ts +2 -0
  5. package/lib/components/editor/editor-group/UnsupportedElementEditor.d.ts.map +1 -1
  6. package/lib/components/editor/editor-group/UnsupportedElementEditor.js +12 -3
  7. package/lib/components/editor/editor-group/UnsupportedElementEditor.js.map +1 -1
  8. package/lib/components/editor/editor-group/function-activator/FunctionEditor.d.ts +1 -1
  9. package/lib/components/editor/editor-group/function-activator/FunctionEditor.d.ts.map +1 -1
  10. package/lib/components/editor/editor-group/function-activator/FunctionEditor.js +6 -4
  11. package/lib/components/editor/editor-group/function-activator/FunctionEditor.js.map +1 -1
  12. package/lib/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.d.ts +19 -0
  13. package/lib/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.d.ts.map +1 -0
  14. package/lib/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.js +175 -0
  15. package/lib/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.js.map +1 -0
  16. package/lib/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.d.ts.map +1 -1
  17. package/lib/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.js +18 -5
  18. package/lib/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.js.map +1 -1
  19. package/lib/components/project-reviewer/ProjectReviewSideBar.js +1 -1
  20. package/lib/components/project-reviewer/ProjectReviewSideBar.js.map +1 -1
  21. package/lib/components/project-reviewer/ProjectReviewer.js +1 -1
  22. package/lib/components/project-reviewer/ProjectReviewer.js.map +1 -1
  23. package/lib/index.css +2 -2
  24. package/lib/index.css.map +1 -1
  25. package/lib/package.json +1 -1
  26. package/lib/stores/editor/EditorGraphState.d.ts.map +1 -1
  27. package/lib/stores/editor/EditorGraphState.js +4 -1
  28. package/lib/stores/editor/EditorGraphState.js.map +1 -1
  29. package/lib/stores/editor/EditorTabManagerState.d.ts.map +1 -1
  30. package/lib/stores/editor/EditorTabManagerState.js +5 -1
  31. package/lib/stores/editor/EditorTabManagerState.js.map +1 -1
  32. package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
  33. package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.js +10 -3
  34. package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
  35. package/lib/stores/editor/editor-state/element-editor-state/FunctionActivatorState.d.ts.map +1 -1
  36. package/lib/stores/editor/editor-state/element-editor-state/FunctionActivatorState.js +17 -2
  37. package/lib/stores/editor/editor-state/element-editor-state/FunctionActivatorState.js.map +1 -1
  38. package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.d.ts +53 -0
  39. package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.d.ts.map +1 -0
  40. package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.js +150 -0
  41. package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.js.map +1 -0
  42. package/lib/stores/editor/utils/ModelClassifierUtils.d.ts +1 -0
  43. package/lib/stores/editor/utils/ModelClassifierUtils.d.ts.map +1 -1
  44. package/lib/stores/editor/utils/ModelClassifierUtils.js +1 -0
  45. package/lib/stores/editor/utils/ModelClassifierUtils.js.map +1 -1
  46. package/lib/stores/graph-modifier/DSL_FunctionActivator_GraphModifierHelper.d.ts +28 -0
  47. package/lib/stores/graph-modifier/DSL_FunctionActivator_GraphModifierHelper.d.ts.map +1 -0
  48. package/lib/stores/graph-modifier/DSL_FunctionActivator_GraphModifierHelper.js +55 -0
  49. package/lib/stores/graph-modifier/DSL_FunctionActivator_GraphModifierHelper.js.map +1 -0
  50. package/lib/stores/project-reviewer/ProjectReviewerStore.d.ts +9 -7
  51. package/lib/stores/project-reviewer/ProjectReviewerStore.d.ts.map +1 -1
  52. package/lib/stores/project-reviewer/ProjectReviewerStore.js +58 -36
  53. package/lib/stores/project-reviewer/ProjectReviewerStore.js.map +1 -1
  54. package/package.json +5 -5
  55. package/src/components/editor/editor-group/EditorGroup.tsx +10 -0
  56. package/src/components/editor/editor-group/UnsupportedElementEditor.tsx +38 -9
  57. package/src/components/editor/editor-group/function-activator/FunctionEditor.tsx +10 -6
  58. package/src/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.tsx +631 -0
  59. package/src/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.tsx +51 -3
  60. package/src/components/project-reviewer/ProjectReviewSideBar.tsx +1 -1
  61. package/src/components/project-reviewer/ProjectReviewer.tsx +1 -1
  62. package/src/stores/editor/EditorGraphState.ts +3 -0
  63. package/src/stores/editor/EditorTabManagerState.ts +7 -0
  64. package/src/stores/editor/editor-state/element-editor-state/ElementEditorState.ts +22 -5
  65. package/src/stores/editor/editor-state/element-editor-state/FunctionActivatorState.ts +17 -1
  66. package/src/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.ts +212 -0
  67. package/src/stores/editor/utils/ModelClassifierUtils.ts +1 -0
  68. package/src/stores/graph-modifier/DSL_FunctionActivator_GraphModifierHelper.ts +96 -0
  69. package/src/stores/project-reviewer/ProjectReviewerStore.ts +85 -60
  70. package/tsconfig.json +3 -0
@@ -1 +1 @@
1
- {"version":3,"file":"FunctionActivatorState.js","sourceRoot":"","sources":["../../../../../src/stores/editor/editor-state/element-editor-state/FunctionActivatorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;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,0BAA0B,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,aAAa,EACpE,IAAI,CACL,CACF,CAAC;SACH;QAAC,MAAM;YACN,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CACnF,yBAAyB,CAC1B,CAAC;SACH;gBAAS;YACR,IAAI,CAAC,eAAe,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,CAAC;SACnE;IACH,CAAC;CACF"}
1
+ {"version":3,"file":"FunctionActivatorState.js","sourceRoot":"","sources":["../../../../../src/stores/editor/editor-state/element-editor-state/FunctionActivatorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE5E,OAAO,EAGL,mCAAmC,EACnC,YAAY,EACZ,0BAA0B,EAC1B,0BAA0B,EAC1B,mCAAmC,EACnC,eAAe,EACf,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAoB,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iFAAiF,CAAC;AAEzH,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAE3C,MAAM,OAAO,sBAAsB;IACxB,mBAAmB,CAAsB;IAElD,aAAa,CAAS;IACtB,oBAAoB,GAAG,KAAK,CAAC;IAC7B,6BAA6B,GAAG,KAAK,CAAC;IACtC,YAAY,CAAqB;IAEjC,YAAY,mBAAwC;QAClD,cAAc,CAAC,IAAI,EAAE;YACnB,aAAa,EAAE,UAAU;YACzB,oBAAoB,EAAE,UAAU;YAChC,6BAA6B,EAAE,UAAU;YACzC,YAAY,EAAE,UAAU;YACxB,eAAe,EAAE,MAAM;YACvB,mBAAmB,EAAE,MAAM;YAC3B,uBAAuB,EAAE,MAAM;YAC/B,gCAAgC,EAAE,M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CAAC,eAAe,CAAC,UAAU,CAC7D,iBAAiB,EACjB,0BAA0B,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,aAAa,EACpE,IAAI,CACL,CACF,CAAC;SACH;QAAC,MAAM;YACN,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CACnF,yBAAyB,CAC1B,CAAC;SACH;gBAAS;YACR,IAAI,CAAC,eAAe,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,CAAC;SACnE;IACH,CAAC;CACF"}
@@ -0,0 +1,53 @@
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 { HostedService } from '@finos/legend-graph';
17
+ import { type GeneratorFn, ActionState } from '@finos/legend-shared';
18
+ import type { EditorStore } from '../../../EditorStore.js';
19
+ import { ElementEditorState } from '../ElementEditorState.js';
20
+ import { User } from '@finos/legend-server-sdlc';
21
+ declare enum HostedServiceOwnershipType {
22
+ DEPLOYMENT_OWNERSHIP = "deploymentOwnership",
23
+ USERLIST_OWNERSHIP = "userListOwnership"
24
+ }
25
+ export declare const MINIMUM_HOSTED_SERVICE_OWNERS = 2;
26
+ export declare const DeploymentOwnershipLabel = "Deployment";
27
+ export declare const UserlistOwnershipLabel = "User List";
28
+ export declare const OWNERSHIP_OPTIONS: {
29
+ label: string;
30
+ value: HostedServiceOwnershipType;
31
+ }[];
32
+ export type HostedServiceOwnerOption = {
33
+ label: string;
34
+ value: string;
35
+ };
36
+ export declare class HostedServiceFunctionActivatorEditorState extends ElementEditorState {
37
+ readonly validateState: ActionState;
38
+ readonly deployState: ActionState;
39
+ constructor(editorStore: EditorStore, element: HostedService);
40
+ get activator(): HostedService;
41
+ updateDocumentation(val: string): void;
42
+ updatePattern(val: string): void;
43
+ storeModel(val: boolean): void;
44
+ generateLineage(val: boolean): void;
45
+ get selectedOwnership(): HostedServiceOwnerOption | undefined;
46
+ setSelectedOwnership(o: HostedServiceOwnerOption): void;
47
+ validate(): GeneratorFn<void>;
48
+ deployToSandbox(): GeneratorFn<void>;
49
+ searchUsers(name: string): GeneratorFn<User[]>;
50
+ reprocess(newElement: HostedService, editorStore: EditorStore): HostedServiceFunctionActivatorEditorState;
51
+ }
52
+ export {};
53
+ //# sourceMappingURL=HostedServiceFunctionActivatorEditorState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HostedServiceFunctionActivatorEditorState.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,aAAa,EAId,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,WAAW,EAChB,WAAW,EAIZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAGjD,aAAK,0BAA0B;IAC7B,oBAAoB,wBAAwB;IAC5C,kBAAkB,sBAAsB;CACzC;AACD,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAC/C,eAAO,MAAM,wBAAwB,eAAe,CAAC;AACrD,eAAO,MAAM,sBAAsB,cAAc,CAAC;AAElD,eAAO,MAAM,iBAAiB;;;GAS7B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,qBAAa,yCAA0C,SAAQ,kBAAkB;IAC/E,QAAQ,CAAC,aAAa,cAAwB;IAC9C,QAAQ,CAAC,WAAW,cAAwB;gBAEhC,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa;IAkB5D,IAAI,SAAS,IAAI,aAAa,CAQ7B;IAED,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAItC,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIhC,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAI9B,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAInC,IAAI,iBAAiB,IAAI,wBAAwB,GAAG,SAAS,CAc5D;IAED,oBAAoB,CAAC,CAAC,EAAE,wBAAwB,GAAG,IAAI;IA2BtD,QAAQ,IAAI,WAAW,CAAC,IAAI,CAAC;IAkB7B,eAAe,IAAI,WAAW,CAAC,IAAI,CAAC;IAkBpC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;IAc/C,SAAS,CACP,UAAU,EAAE,aAAa,EACzB,WAAW,EAAE,WAAW,GACvB,yCAAyC;CAM7C"}
@@ -0,0 +1,150 @@
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 { InMemoryGraphData, HostedService, observe_HostedService, DeploymentOwner, UserList, } from '@finos/legend-graph';
17
+ import { ActionState, assertErrorThrown, guaranteeType, } from '@finos/legend-shared';
18
+ import { makeObservable, action, flow, computed } from 'mobx';
19
+ import { ElementEditorState } from '../ElementEditorState.js';
20
+ import { activator_setOwnership } from '../../../../graph-modifier/DSL_FunctionActivator_GraphModifierHelper.js';
21
+ import { User } from '@finos/legend-server-sdlc';
22
+ //Ownership
23
+ var HostedServiceOwnershipType;
24
+ (function (HostedServiceOwnershipType) {
25
+ HostedServiceOwnershipType["DEPLOYMENT_OWNERSHIP"] = "deploymentOwnership";
26
+ HostedServiceOwnershipType["USERLIST_OWNERSHIP"] = "userListOwnership";
27
+ })(HostedServiceOwnershipType || (HostedServiceOwnershipType = {}));
28
+ export const MINIMUM_HOSTED_SERVICE_OWNERS = 2;
29
+ export const DeploymentOwnershipLabel = 'Deployment';
30
+ export const UserlistOwnershipLabel = 'User List';
31
+ export const OWNERSHIP_OPTIONS = [
32
+ {
33
+ label: DeploymentOwnershipLabel,
34
+ value: HostedServiceOwnershipType.DEPLOYMENT_OWNERSHIP,
35
+ },
36
+ {
37
+ label: UserlistOwnershipLabel,
38
+ value: HostedServiceOwnershipType.USERLIST_OWNERSHIP,
39
+ },
40
+ ];
41
+ export class HostedServiceFunctionActivatorEditorState extends ElementEditorState {
42
+ validateState = ActionState.create();
43
+ deployState = ActionState.create();
44
+ constructor(editorStore, element) {
45
+ super(editorStore, element);
46
+ makeObservable(this, {
47
+ activator: computed,
48
+ reprocess: action,
49
+ updateDocumentation: action,
50
+ updatePattern: action,
51
+ setSelectedOwnership: action,
52
+ selectedOwnership: computed,
53
+ storeModel: action,
54
+ generateLineage: action,
55
+ validate: flow,
56
+ deployToSandbox: flow,
57
+ searchUsers: flow,
58
+ });
59
+ }
60
+ get activator() {
61
+ return observe_HostedService(guaranteeType(this.element, HostedService, 'Element inside hosted service state must be a HostedService'));
62
+ }
63
+ updateDocumentation(val) {
64
+ this.activator.documentation = val;
65
+ }
66
+ updatePattern(val) {
67
+ this.activator.pattern = val;
68
+ }
69
+ storeModel(val) {
70
+ this.activator.storeModel = val;
71
+ }
72
+ generateLineage(val) {
73
+ this.activator.generateLineage = val;
74
+ }
75
+ get selectedOwnership() {
76
+ const ownership = this.activator.ownership;
77
+ if (ownership instanceof DeploymentOwner) {
78
+ return {
79
+ label: DeploymentOwnershipLabel,
80
+ value: HostedServiceOwnershipType.DEPLOYMENT_OWNERSHIP,
81
+ };
82
+ }
83
+ else if (ownership instanceof UserList) {
84
+ return {
85
+ label: UserlistOwnershipLabel,
86
+ value: HostedServiceOwnershipType.USERLIST_OWNERSHIP,
87
+ };
88
+ }
89
+ return undefined;
90
+ }
91
+ setSelectedOwnership(o) {
92
+ switch (o.value) {
93
+ case HostedServiceOwnershipType.DEPLOYMENT_OWNERSHIP: {
94
+ activator_setOwnership(this.activator, new DeploymentOwner('', this.activator));
95
+ break;
96
+ }
97
+ case HostedServiceOwnershipType.USERLIST_OWNERSHIP: {
98
+ const currentUserId = this.editorStore.graphManagerState.graphManager.TEMPORARY__getEngineConfig()
99
+ .currentUserId;
100
+ activator_setOwnership(this.activator, new UserList(currentUserId ? [currentUserId] : [], this.activator));
101
+ break;
102
+ }
103
+ default: {
104
+ this.editorStore.applicationStore.notificationService.notifyError('Unsupported ownership type');
105
+ }
106
+ }
107
+ }
108
+ *validate() {
109
+ this.validateState.inProgress();
110
+ try {
111
+ yield this.editorStore.graphManagerState.graphManager.validateFunctionActivator(this.activator, new InMemoryGraphData(this.editorStore.graphManagerState.graph));
112
+ this.editorStore.applicationStore.notificationService.notifySuccess(`Hosted Service is valid`);
113
+ }
114
+ catch (error) {
115
+ assertErrorThrown(error);
116
+ this.editorStore.applicationStore.notificationService.notifyError(error);
117
+ }
118
+ finally {
119
+ this.validateState.complete();
120
+ }
121
+ }
122
+ *deployToSandbox() {
123
+ this.deployState.inProgress();
124
+ try {
125
+ yield this.editorStore.graphManagerState.graphManager.publishFunctionActivatorToSandbox(this.activator, new InMemoryGraphData(this.editorStore.graphManagerState.graph));
126
+ this.editorStore.applicationStore.notificationService.notifySuccess('Hosted Service Function Activator has been deployed successfully');
127
+ }
128
+ catch (error) {
129
+ assertErrorThrown(error);
130
+ this.editorStore.applicationStore.notificationService.notifyError(error);
131
+ }
132
+ finally {
133
+ this.deployState.complete();
134
+ }
135
+ }
136
+ *searchUsers(name) {
137
+ try {
138
+ return (yield this.editorStore.sdlcServerClient.getUsers(name)).map((p) => User.serialization.fromJson(p));
139
+ }
140
+ catch (error) {
141
+ assertErrorThrown(error);
142
+ this.editorStore.applicationStore.notificationService.notifyError(error);
143
+ return [];
144
+ }
145
+ }
146
+ reprocess(newElement, editorStore) {
147
+ return new HostedServiceFunctionActivatorEditorState(editorStore, newElement);
148
+ }
149
+ }
150
+ //# sourceMappingURL=HostedServiceFunctionActivatorEditorState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HostedServiceFunctionActivatorEditorState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,QAAQ,GACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,WAAW,EACX,iBAAiB,EACjB,aAAa,GAEd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yEAAyE,CAAC;AACjH,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEjD,WAAW;AACX,IAAK,0BAGJ;AAHD,WAAK,0BAA0B;IAC7B,0EAA4C,CAAA;IAC5C,sEAAwC,CAAA;AAC1C,CAAC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AAE,CAAC;SAC7B;IACH,CAAC;IAED,CAAC,WAAW,CAAC,IAAY;QACvB,IAAI;YACF,OACE,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,QAAQ,CAC/C,IAAI,CACL,CACF,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;SAC9C;QAAC,OAAO,KAAK,EAAE;YACd,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YACzE,OAAO,EAAE,CAAC;SACX;IACH,CAAC;IAED,SAAS,CACP,UAAyB,EACzB,WAAwB;QAExB,OAAO,IAAI,yCAAyC,CAClD,WAAW,EACX,UAAU,CACX,CAAC;IACJ,CAAC;CACF"}
@@ -45,6 +45,7 @@ export declare enum PACKAGEABLE_ELEMENT_TYPE {
45
45
  SECTION_INDEX = "SECTION_INDEX",
46
46
  DATA = "DATA",
47
47
  SNOWFLAKE_APP = "SNOWFLAKE_APP",
48
+ HOSTED_SERVICE = "HOSTED_SERVICE",
48
49
  TEMPORARY__LOCAL_CONNECTION = "LOCAL_CONNECTION",
49
50
  INTERNAL__UNKNOWN = "UNKNOWN"
50
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ModelClassifierUtils.d.ts","sourceRoot":"","sources":["../../../../src/stores/editor/utils/ModelClassifierUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,IAAI,EAMV,MAAM,qBAAqB,CAAC;AAG7B,oBAAY,mBAAmB;IAC7B,KAAK,UAAU;IACf,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,SAAS,cAAc;CACxB;AAED,eAAO,MAAM,oBAAoB,SAAU,IAAI,KAAG,mBAajD,CAAC;AAEF,oBAAY,wBAAwB;IAClC,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,KAAK,UAAU;IACf,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,eAAe,oBAAoB;IACnC,QAAQ,aAAa;IACrB,aAAa,kBAAkB;IAC/B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,qBAAqB,0BAA0B;IAC/C,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,eAAe,oBAAoB;IACnC,wBAAwB,6BAA6B;IACrD,aAAa,kBAAkB;IAC/B,IAAI,SAAS;IACb,aAAa,kBAAkB;IAE/B,2BAA2B,qBAAqB;IAChD,iBAAiB,YAAY;CAC9B;AAED,oBAAY,qCAAqC;IAC/C,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,UAAU;IACf,eAAe,oBAAoB;IACnC,UAAU,eAAe;IACzB,KAAK,UAAU;CAChB"}
1
+ {"version":3,"file":"ModelClassifierUtils.d.ts","sourceRoot":"","sources":["../../../../src/stores/editor/utils/ModelClassifierUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,IAAI,EAMV,MAAM,qBAAqB,CAAC;AAG7B,oBAAY,mBAAmB;IAC7B,KAAK,UAAU;IACf,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,SAAS,cAAc;CACxB;AAED,eAAO,MAAM,oBAAoB,SAAU,IAAI,KAAG,mBAajD,CAAC;AAEF,oBAAY,wBAAwB;IAClC,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,KAAK,UAAU;IACf,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,eAAe,oBAAoB;IACnC,QAAQ,aAAa;IACrB,aAAa,kBAAkB;IAC/B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,qBAAqB,0BAA0B;IAC/C,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,eAAe,oBAAoB;IACnC,wBAAwB,6BAA6B;IACrD,aAAa,kBAAkB;IAC/B,IAAI,SAAS;IACb,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;IAEjC,2BAA2B,qBAAqB;IAChD,iBAAiB,YAAY;CAC9B;AAED,oBAAY,qCAAqC;IAC/C,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,UAAU;IACf,eAAe,oBAAoB;IACnC,UAAU,eAAe;IACzB,KAAK,UAAU;CAChB"}
@@ -65,6 +65,7 @@ export var PACKAGEABLE_ELEMENT_TYPE;
65
65
  PACKAGEABLE_ELEMENT_TYPE["SECTION_INDEX"] = "SECTION_INDEX";
66
66
  PACKAGEABLE_ELEMENT_TYPE["DATA"] = "DATA";
67
67
  PACKAGEABLE_ELEMENT_TYPE["SNOWFLAKE_APP"] = "SNOWFLAKE_APP";
68
+ PACKAGEABLE_ELEMENT_TYPE["HOSTED_SERVICE"] = "HOSTED_SERVICE";
68
69
  PACKAGEABLE_ELEMENT_TYPE["TEMPORARY__LOCAL_CONNECTION"] = "LOCAL_CONNECTION";
69
70
  PACKAGEABLE_ELEMENT_TYPE["INTERNAL__UNKNOWN"] = "UNKNOWN";
70
71
  })(PACKAGEABLE_ELEMENT_TYPE || (PACKAGEABLE_ELEMENT_TYPE = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"ModelClassifierUtils.js","sourceRoot":"","sources":["../../../../src/stores/editor/utils/ModelClassifierUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,KAAK,EACL,WAAW,EACX,OAAO,EACP,aAAa,EACb,IAAI,GACL,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,MAAM,CAA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AA;IAE/B,4EAAgD,CAAA;IAChD,yDAA6B,CAAA;AAC/B,CAAC,EA1BW,wBAAwB,KAAxB,wBAAwB,QA0BnC;AAED,MAAM,CAAN,IAAY,qCAOX;AAPD,WAAY,qCAAqC;IAC/C,wDAAe,CAAA;IACf,wDAAe,CAAA;IACf,wDAAe,CAAA;IACf,4EAAmC,CAAA;IACnC,kEAAyB,CAAA;IACzB,wDAAe,CAAA;AACjB,CAAC,EAPW,qCAAqC,KAArC,qCAAqC,QAOhD"}
1
+ {"version":3,"file":"ModelClassifierUtils.js","sourceRoot":"","sources":["../../../../src/stores/editor/utils/ModelClassifierUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,KAAK,EACL,WAAW,EACX,OAAO,EACP,aAAa,EACb,IAAI,GACL,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,sCAAe,CAAA;IACf,kDAA2B,CAAA;IAC3B,0CAAmB,CAAA;IACnB,oCAAa,CAAA;IACb,8CAAuB,CAAA;AACzB,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAU,EAAuB,EAAE;IACtE,IAAI,IAAI,YAAY,aAAa,EAAE;QACjC,OAAO,mBAAmB,CAAC,SAAS,CAAC;KACtC;SAAM,IAAI,IAAI,YAAY,WAAW,EAAE;QACtC,OAAO,mBAAmB,CAAC,WAAW,CAAC;KACxC;SAAM,IAAI,IAAI,YAAY,KAAK,EAAE;QAChC,OAAO,mBAAmB,CAAC,KAAK,CAAC;KAClC;SAAM,IAAI,IAAI,YAAY,IAAI,EAAE;QAC/B,OAAO,mBAAmB,CAAC,IAAI,CAAC;KACjC;SAAM,IAAI,IAAI,YAAY,OAAO,EAAE;QAClC,OAAO,mBAAmB,CAAC,OAAO,CAAC;KACpC;IACD,MAAM,IAAI,yBAAyB,CAAC,+BAA+B,EAAE,IAAI,CAAC,CAAC;AAC7E,CAAC,CAAC;AAEF,MAAM,CAAN,IAAY,wBA2BX;AA3BD,WAAY,wBAAwB;IAClC,mDAAuB,CAAA;IACvB,+CAAmB,CAAA;IACnB,+CAAmB,CAAA;IACnB,uDAA2B,CAAA;IAC3B,2CAAe,CAAA;IACf,uDAA2B,CAAA;IAC3B,iDAAqB,CAAA;IACrB,+CAAmB,CAAA;IACnB,yCAAa,CAAA;IACb,+DAAmC,CAAA;IACnC,iDAAqB,CAAA;IACrB,2DAA+B,CAAA;IAC/B,+CAAmB,CAAA;IACnB,+CAAmB,CAAA;IACnB,2EAA+C,CAAA;IAC/C,qDAAyB,CAAA;IACzB,+CAAmB,CAAA;IACnB,+DAAmC,CAAA;IACnC,iFAAqD,CAAA;IACrD,2DAA+B,CAAA;IAC/B,yCAAa,CAAA;IACb,2DAA+B,CAAA;IAC/B,6DAAiC,CAAA;IAEjC,4EAAgD,CAAA;IAChD,yDAA6B,CAAA;AAC/B,CAAC,EA3BW,wBAAwB,KAAxB,wBAAwB,QA2BnC;AAED,MAAM,CAAN,IAAY,qCAOX;AAPD,WAAY,qCAAqC;IAC/C,wDAAe,CAAA;IACf,wDAAe,CAAA;IACf,wDAAe,CAAA;IACf,4EAAmC,CAAA;IACnC,kEAAyB,CAAA;IACzB,wDAAe,CAAA;AACjB,CAAC,EAPW,qCAAqC,KAArC,qCAAqC,QAOhD"}
@@ -0,0 +1,28 @@
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 HostedService, type FunctionActivator, type Ownership, type DeploymentOwner, type UserList } from '@finos/legend-graph';
17
+ export declare const hostedService_setDocumentation: (hostedService: HostedService, val: string) => void;
18
+ export declare const hostedService_setAutoActivateUpdates: (hostedService: HostedService, val: boolean) => void;
19
+ export declare const hostedService_setPattern: (hostedService: HostedService, val: string) => void;
20
+ export declare const hostedService_removePatternParameter: (hostedService: HostedService, value: string) => void;
21
+ export declare const hostedService_setStoreModel: (hostedService: HostedService, val: boolean) => void;
22
+ export declare const hostedService_setGenerateLineage: (hostedService: HostedService, val: boolean) => void;
23
+ export declare const activator_setOwnership: (activator: FunctionActivator, value: Ownership) => void;
24
+ export declare const activator_setDeploymentOwner: (deploymentOwner: DeploymentOwner, value: string) => void;
25
+ export declare const activator_addUserOwner: (userList: UserList, value: string) => void;
26
+ export declare const activator_updateUserOwnership: (userList: UserList, value: string, index: number) => void;
27
+ export declare const activator_deleteValueFromUserOwnership: (userList: UserList, index: number) => void;
28
+ //# sourceMappingURL=DSL_FunctionActivator_GraphModifierHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DSL_FunctionActivator_GraphModifierHelper.d.ts","sourceRoot":"","sources":["../../../src/stores/graph-modifier/DSL_FunctionActivator_GraphModifierHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAEd,KAAK,eAAe,EACpB,KAAK,QAAQ,EACd,MAAM,qBAAqB,CAAC;AAG7B,eAAO,MAAM,8BAA8B,kBACzB,aAAa,OAAO,MAAM,KAAG,IAG9C,CAAC;AAEF,eAAO,MAAM,oCAAoC,kBAC/B,aAAa,OAAO,OAAO,KAAG,IAG/C,CAAC;AAEF,eAAO,MAAM,wBAAwB,kBACnB,aAAa,OAAO,MAAM,KAAG,IAG9C,CAAC;AAEF,eAAO,MAAM,oCAAoC,kBAC/B,aAAa,SAAS,MAAM,KAAG,IAOhD,CAAC;AAEF,eAAO,MAAM,2BAA2B,kBACtB,aAAa,OAAO,OAAO,KAAG,IAG/C,CAAC;AAEF,eAAO,MAAM,gCAAgC,kBAC3B,aAAa,OAAO,OAAO,KAAG,IAG/C,CAAC;AAEF,eAAO,MAAM,sBAAsB,cACrB,iBAAiB,SAAS,SAAS,KAAG,IAGnD,CAAC;AAEF,eAAO,MAAM,4BAA4B,oBACrB,eAAe,SAAS,MAAM,KAAG,IAGpD,CAAC;AAEF,eAAO,MAAM,sBAAsB,aACtB,QAAQ,SAAS,MAAM,KAAG,IAGtC,CAAC;AAEF,eAAO,MAAM,6BAA6B,aAC7B,QAAQ,SAAS,MAAM,SAAS,MAAM,KAAG,IAGrD,CAAC;AAEF,eAAO,MAAM,sCAAsC,aACtC,QAAQ,SAAS,MAAM,KAAG,IAGtC,CAAC"}
@@ -0,0 +1,55 @@
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 { DEFAULT_HOSTED_SERVICE_PATTERN, observe_FunctionActivatorOwnership, } from '@finos/legend-graph';
17
+ import { action } from 'mobx';
18
+ export const hostedService_setDocumentation = action((hostedService, val) => {
19
+ hostedService.documentation = val;
20
+ });
21
+ export const hostedService_setAutoActivateUpdates = action((hostedService, val) => {
22
+ hostedService.autoActivateUpdates = val;
23
+ });
24
+ export const hostedService_setPattern = action((hostedService, val) => {
25
+ hostedService.pattern = val;
26
+ });
27
+ export const hostedService_removePatternParameter = action((hostedService, value) => {
28
+ const newPattern = hostedService.pattern
29
+ .replace(new RegExp(`\\/\\{${value}\\}`, 'ug'), '')
30
+ .replace(/\/{2,}/gu, '/');
31
+ hostedService.pattern =
32
+ newPattern !== '' ? newPattern : DEFAULT_HOSTED_SERVICE_PATTERN;
33
+ });
34
+ export const hostedService_setStoreModel = action((hostedService, val) => {
35
+ hostedService.storeModel = val;
36
+ });
37
+ export const hostedService_setGenerateLineage = action((hostedService, val) => {
38
+ hostedService.generateLineage = val;
39
+ });
40
+ export const activator_setOwnership = action((activator, value) => {
41
+ activator.ownership = observe_FunctionActivatorOwnership(value);
42
+ });
43
+ export const activator_setDeploymentOwner = action((deploymentOwner, value) => {
44
+ deploymentOwner.id = value;
45
+ });
46
+ export const activator_addUserOwner = action((userList, value) => {
47
+ userList.users.push(value);
48
+ });
49
+ export const activator_updateUserOwnership = action((userList, value, index) => {
50
+ userList.users[index] = value;
51
+ });
52
+ export const activator_deleteValueFromUserOwnership = action((userList, index) => {
53
+ userList.users.splice(index, 1);
54
+ });
55
+ //# sourceMappingURL=DSL_FunctionActivator_GraphModifierHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DSL_FunctionActivator_GraphModifierHelper.js","sourceRoot":"","sources":["../../../src/stores/graph-modifier/DSL_FunctionActivator_GraphModifierHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,8BAA8B,EAG9B,kCAAkC,GAGnC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,MAAM,CAAC,MAAM,8BAA8B,GAAG,MAAM,CAClD,CAAC,aAA4B,EAAE,GAAW,EAAQ,EAAE;IAClD,aAAa,CAAC,aAAa,GAAG,GAAG,CAAC;AACpC,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAAG,MAAM,CACxD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EAAE;IACxD,eAAe,CAAC,EAAE,GAAG,KAAK,CAAC;AAC7B,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAC1C,CAAC,QAAkB,EAAE,KAAa,EAAQ,EAAE;IAC1C,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CACjD,CAAC,QAAkB,EAAE,KAAa,EAAE,KAAa,EAAQ,EAAE;IACzD,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;AAChC,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAAG,MAAM,CAC1D,CAAC,QAAkB,EAAE,KAAa,EAAQ,EAAE;IAC1C,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AAClC,CAAC,CACF,CAAC"}
@@ -15,19 +15,23 @@
15
15
  */
16
16
  import { type GeneratorFn, type PlainObject, ActionState } from '@finos/legend-shared';
17
17
  import type { EditorStore } from '../editor/EditorStore.js';
18
- import { EntityDiff, type ProjectConfiguration, Comparison, Project, Review, type Patch, ReviewApproval } from '@finos/legend-server-sdlc';
18
+ import { EntityDiff, type ProjectConfiguration, Project, Review, type Patch, ReviewApproval } from '@finos/legend-server-sdlc';
19
19
  import type { Entity } from '@finos/legend-storage';
20
20
  export declare class ProjectReviewReport {
21
21
  diffs: EntityDiff[];
22
22
  fromEntities: Entity[];
23
23
  toEntities: Entity[];
24
+ private fromConfig;
25
+ private toConfig;
24
26
  fromToProjectConfig: [PlainObject<ProjectConfiguration>, PlainObject<ProjectConfiguration>] | undefined;
25
27
  constructor(diffs: EntityDiff[]);
28
+ addFromConfig(config: PlainObject<ProjectConfiguration>): void;
29
+ addToConfig(config: PlainObject<ProjectConfiguration>): void;
30
+ private createFromToConfigIfPossible;
26
31
  findFromEntity(entityPath: string): Entity | undefined;
32
+ addFromEntity(entity: Entity): ProjectReviewReport;
33
+ addToEntity(entity: Entity): ProjectReviewReport;
27
34
  findToEntity(entityPath: string): Entity | undefined;
28
- withFromEntities(val: Entity[]): ProjectReviewReport;
29
- withToEntities(val: Entity[]): ProjectReviewReport;
30
- withProjectConfigChange(val: [PlainObject<ProjectConfiguration>, PlainObject<ProjectConfiguration>]): ProjectReviewReport;
31
35
  }
32
36
  export declare class ProjectReviewerStore {
33
37
  readonly editorStore: EditorStore;
@@ -36,8 +40,7 @@ export declare class ProjectReviewerStore {
36
40
  currentPatch?: Patch | undefined;
37
41
  currentReviewId?: string | undefined;
38
42
  currentReview?: Review | undefined;
39
- fetchComparisonState: ActionState;
40
- reviewComparison?: Comparison | undefined;
43
+ buildReviewReportState: ActionState;
41
44
  reviewReport?: ProjectReviewReport | undefined;
42
45
  fetchCurrentReviewState: ActionState;
43
46
  approveState: ActionState;
@@ -50,7 +53,6 @@ export declare class ProjectReviewerStore {
50
53
  get patchReleaseVersionId(): string | undefined;
51
54
  get reviewId(): string;
52
55
  get review(): Review;
53
- get comparison(): Comparison;
54
56
  get approvalString(): string | undefined;
55
57
  setProjectIdAndReviewId(projectId: string, reviewId: string): void;
56
58
  initialize(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"ProjectReviewerStore.d.ts","sourceRoot":"","sources":["../../../src/stores/project-reviewer/ProjectReviewerStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,WAAW,EAIhB,WAAW,EAEZ,MAAM,sBAAsB,CAAC;AAS9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EACL,UAAU,EACV,KAAK,oBAAoB,EACzB,UAAU,EAEV,OAAO,EACP,MAAM,EACN,KAAK,KAAK,EACV,cAAc,EACf,MAAM,2BAA2B,CAAC;AAGnC,OAAO,KAAK,EAAE,M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S,CAAC;IAE/C,uBAAuB,cAAwB;IAC/C,YAAY,cAAwB;IACpC,cAAc,EAAE,cAAc,GAAG,SAAS,CAAC;IAE3C,UAAU,cAAwB;IAClC,WAAW,cAAwB;IACnC,WAAW,cAAwB;gBAEvB,WAAW,EAAE,WAAW;IAoCpC,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,qBAAqB,IAAI,MAAM,GAAG,SAAS,CAE9C;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,cAAc,IAAI,MAAM,GAAG,SAAS,CAMvC;IAED,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKlE,UAAU,IAAI,IAAI;IAkBjB,gBAAgB,IAAI,WAAW,CAAC,IAAI,CAAC;IA4BtC,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAuCxC,OAAO,IAAI,IAAI;IAQf;;;OAGG;IACF,qBAAqB,IAAI,WAAW,CAAC,IAAI,CAAC;IAyE1C,YAAY,IAAI,WAAW,CAAC,IAAI,CAAC;IAiBjC,oBAAoB,IAAI,WAAW,CAAC,IAAI,CAAC;IAkBzC,WAAW,IAAI,WAAW,CAAC,IAAI,CAAC;IA2BhC,aAAa,IAAI,WAAW,CAAC,IAAI,CAAC;IAsBlC,YAAY,IAAI,WAAW,CAAC,IAAI,CAAC;IAuBjC,YAAY,IAAI,WAAW,CAAC,IAAI,CAAC;IAsBjC,WAAW,IAAI,WAAW,CAAC,IAAI,CAAC;CAqBlC"}
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { assertErrorThrown, LogEvent, guaranteeNonNullable, ActionState, assertNonEmptyString, } from '@finos/legend-shared';
16
+ import { assertErrorThrown, LogEvent, guaranteeNonNullable, ActionState, assertNonEmptyString, isNonNullable, } from '@finos/legend-shared';
17
17
  import { makeObservable, action, observable, flow, computed, flowResult, } from 'mobx';
18
18
  import { ACTIVITY_MODE } from '../editor/EditorConfig.js';
19
19
  import { EntityDiff, Comparison, reprocessEntityDiffs, Project, Review, ReviewApproval, } from '@finos/legend-server-sdlc';
@@ -25,27 +25,45 @@ export class ProjectReviewReport {
25
25
  diffs;
26
26
  fromEntities = [];
27
27
  toEntities = [];
28
+ fromConfig;
29
+ toConfig;
28
30
  fromToProjectConfig;
29
31
  constructor(diffs) {
30
32
  this.diffs = diffs;
33
+ makeObservable(this, {
34
+ fromEntities: observable,
35
+ toEntities: observable,
36
+ fromToProjectConfig: observable,
37
+ addFromConfig: action,
38
+ addToConfig: action,
39
+ });
40
+ }
41
+ addFromConfig(config) {
42
+ this.fromConfig = config;
43
+ this.createFromToConfigIfPossible();
44
+ }
45
+ addToConfig(config) {
46
+ this.toConfig = config;
47
+ this.createFromToConfigIfPossible();
48
+ }
49
+ createFromToConfigIfPossible() {
50
+ if (this.fromConfig && this.toConfig) {
51
+ this.fromToProjectConfig = [this.fromConfig, this.toConfig];
52
+ }
31
53
  }
32
54
  findFromEntity(entityPath) {
33
55
  return this.fromEntities.find((e) => e.path === entityPath);
34
56
  }
35
- findToEntity(entityPath) {
36
- return this.toEntities.find((e) => e.path === entityPath);
37
- }
38
- withFromEntities(val) {
39
- this.fromEntities = val;
57
+ addFromEntity(entity) {
58
+ this.fromEntities.push(entity);
40
59
  return this;
41
60
  }
42
- withToEntities(val) {
43
- this.toEntities = val;
61
+ addToEntity(entity) {
62
+ this.toEntities.push(entity);
44
63
  return this;
45
64
  }
46
- withProjectConfigChange(val) {
47
- this.fromToProjectConfig = val;
48
- return this;
65
+ findToEntity(entityPath) {
66
+ return this.toEntities.find((e) => e.path === entityPath);
49
67
  }
50
68
  }
51
69
  export class ProjectReviewerStore {
@@ -56,8 +74,7 @@ export class ProjectReviewerStore {
56
74
  currentReviewId;
57
75
  currentReview;
58
76
  // comparison
59
- fetchComparisonState = ActionState.create();
60
- reviewComparison;
77
+ buildReviewReportState = ActionState.create();
61
78
  reviewReport;
62
79
  fetchCurrentReviewState = ActionState.create();
63
80
  approveState = ActionState.create();
@@ -73,7 +90,7 @@ export class ProjectReviewerStore {
73
90
  currentReviewId: observable,
74
91
  currentReview: observable,
75
92
  fetchCurrentReviewState: observable,
76
- fetchComparisonState: observable,
93
+ buildReviewReportState: observable,
77
94
  approveState: observable,
78
95
  closeState: observable,
79
96
  commitState: observable,
@@ -111,9 +128,6 @@ export class ProjectReviewerStore {
111
128
  get review() {
112
129
  return guaranteeNonNullable(this.currentReview, 'Review must exist');
113
130
  }
114
- get comparison() {
115
- return guaranteeNonNullable(this.reviewComparison, 'review Comparison must exist');
116
- }
117
131
  get approvalString() {
118
132
  const approvals = this.reviewApproval?.approvedBy;
119
133
  if (approvals?.length) {
@@ -168,7 +182,6 @@ export class ProjectReviewerStore {
168
182
  }
169
183
  refresh() {
170
184
  this.editorStore.tabManagerState.closeAllTabs();
171
- this.reviewComparison = undefined;
172
185
  this.reviewReport = undefined;
173
186
  flowResult(this.fetchReviewComparison()).catch(this.editorStore.applicationStore.alertUnhandledError);
174
187
  }
@@ -177,27 +190,36 @@ export class ProjectReviewerStore {
177
190
  * assume the review has completed been fetched
178
191
  */
179
192
  *fetchReviewComparison() {
180
- this.fetchComparisonState.inProgress();
193
+ this.buildReviewReportState.inProgress();
181
194
  try {
182
- const [comparison, fromEntities, toEntities] = (yield Promise.all([
183
- this.editorStore.sdlcServerClient.getReviewComparision(this.projectId, this.patchReleaseVersionId, this.reviewId),
184
- this.editorStore.sdlcServerClient.getReviewFromEntities(this.projectId, this.patchReleaseVersionId, this.reviewId),
185
- this.editorStore.sdlcServerClient.getReviewToEntities(this.projectId, this.patchReleaseVersionId, this.reviewId),
186
- ]));
187
- const resolvedComparison = Comparison.serialization.fromJson(comparison);
188
- this.reviewComparison = resolvedComparison;
189
- const report = new ProjectReviewReport(reprocessEntityDiffs(resolvedComparison.entityDiffs));
190
- report.withFromEntities(fromEntities).withToEntities(toEntities);
195
+ const comparison = Comparison.serialization.fromJson((yield this.editorStore.sdlcServerClient.getReviewComparision(this.projectId, this.patchReleaseVersionId, this.reviewId)));
196
+ const report = new ProjectReviewReport(reprocessEntityDiffs(comparison.entityDiffs));
191
197
  this.reviewReport = report;
198
+ const fromToRequests = Promise.all([
199
+ ...report.diffs
200
+ .map((diff) => diff.oldPath)
201
+ .filter(isNonNullable)
202
+ .map((fromDiff) => this.editorStore.sdlcServerClient
203
+ .getReviewFromEntity(this.projectId, this.patchReleaseVersionId, this.reviewId, fromDiff)
204
+ .then((fromEntity) => report.addFromEntity(fromEntity))),
205
+ ...report.diffs
206
+ .map((diff) => diff.newPath)
207
+ .filter(isNonNullable)
208
+ .map((toDiff) => this.editorStore.sdlcServerClient
209
+ .getReviewToEntity(this.projectId, this.patchReleaseVersionId, this.reviewId, toDiff)
210
+ .then((toEntity) => report.addToEntity(toEntity))),
211
+ ]);
192
212
  if (comparison.projectConfigurationUpdated) {
193
- const [fromConfig, toConfig] = (yield Promise.all([
194
- this.editorStore.sdlcServerClient.getReviewFromConfiguration(this.projectId, this.patchReleaseVersionId, this.reviewId),
195
- this.editorStore.sdlcServerClient.getReviewToConfiguration(this.projectId, this.patchReleaseVersionId, this.reviewId),
196
- ]));
197
- if (fromConfig && toConfig) {
198
- report.withProjectConfigChange([fromConfig, toConfig]);
199
- }
213
+ [
214
+ this.editorStore.sdlcServerClient
215
+ .getReviewFromConfiguration(this.projectId, this.patchReleaseVersionId, this.reviewId)
216
+ .then((config) => report.addFromConfig(config)),
217
+ this.editorStore.sdlcServerClient
218
+ .getReviewToConfiguration(this.projectId, this.patchReleaseVersionId, this.reviewId)
219
+ .then((config) => report.addToConfig(config)),
220
+ ];
200
221
  }
222
+ yield fromToRequests;
201
223
  }
202
224
  catch (error) {
203
225
  assertErrorThrown(error);
@@ -205,7 +227,7 @@ export class ProjectReviewerStore {
205
227
  this.editorStore.applicationStore.notificationService.notifyError(error);
206
228
  }
207
229
  finally {
208
- this.fetchComparisonState.complete();
230
+ this.buildReviewReportState.complete();
209
231
  }
210
232
  }
211
233
  *fetchProject() {