@finos/legend-application-studio 28.15.3 → 28.15.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. package/lib/__lib__/LegendStudioNavigation.d.ts +1 -1
  2. package/lib/components/LegendStudioWebApplication.js +2 -2
  3. package/lib/components/editor/editor-group/UnsupportedElementEditor.d.ts +2 -0
  4. package/lib/components/editor/editor-group/UnsupportedElementEditor.d.ts.map +1 -1
  5. package/lib/components/editor/editor-group/UnsupportedElementEditor.js +12 -3
  6. package/lib/components/editor/editor-group/UnsupportedElementEditor.js.map +1 -1
  7. package/lib/components/editor/editor-group/diff-editor/ProjectConfigDiffView.d.ts +22 -0
  8. package/lib/components/editor/editor-group/diff-editor/ProjectConfigDiffView.d.ts.map +1 -0
  9. package/lib/components/editor/editor-group/diff-editor/ProjectConfigDiffView.js +26 -0
  10. package/lib/components/editor/editor-group/diff-editor/ProjectConfigDiffView.js.map +1 -0
  11. package/lib/components/{workspace-review/WorkspaceReviewSideBar.d.ts → project-reviewer/ProjectReviewSideBar.d.ts} +2 -2
  12. package/lib/components/project-reviewer/ProjectReviewSideBar.d.ts.map +1 -0
  13. package/lib/components/{workspace-review/WorkspaceReviewSideBar.js → project-reviewer/ProjectReviewSideBar.js} +34 -18
  14. package/lib/components/project-reviewer/ProjectReviewSideBar.js.map +1 -0
  15. package/lib/components/{workspace-review/WorkspaceReviewStoreProvider.d.ts → project-reviewer/ProjectReviewStoreProvider.d.ts} +5 -5
  16. package/lib/components/project-reviewer/ProjectReviewStoreProvider.d.ts.map +1 -0
  17. package/lib/components/{workspace-review/WorkspaceReviewStoreProvider.js → project-reviewer/ProjectReviewStoreProvider.js} +9 -9
  18. package/lib/components/project-reviewer/ProjectReviewStoreProvider.js.map +1 -0
  19. package/lib/components/{workspace-review/WorkspaceReview.d.ts → project-reviewer/ProjectReviewer.d.ts} +2 -2
  20. package/lib/components/project-reviewer/ProjectReviewer.d.ts.map +1 -0
  21. package/lib/components/{workspace-review/WorkspaceReview.js → project-reviewer/ProjectReviewer.js} +19 -28
  22. package/lib/components/project-reviewer/ProjectReviewer.js.map +1 -0
  23. package/lib/components/{workspace-review/WorkspaceReviewPanel.d.ts → project-reviewer/ProjectReviewerPanel.d.ts} +2 -2
  24. package/lib/components/project-reviewer/ProjectReviewerPanel.d.ts.map +1 -0
  25. package/lib/components/{workspace-review/WorkspaceReviewPanel.js → project-reviewer/ProjectReviewerPanel.js} +26 -10
  26. package/lib/components/project-reviewer/ProjectReviewerPanel.js.map +1 -0
  27. package/lib/index.css +2 -2
  28. package/lib/index.css.map +1 -1
  29. package/lib/package.json +1 -1
  30. package/lib/stores/editor/editor-state/diff-viewer-state/EditorDiffViewerState.d.ts +24 -0
  31. package/lib/stores/editor/editor-state/diff-viewer-state/EditorDiffViewerState.d.ts.map +1 -0
  32. package/lib/stores/editor/editor-state/diff-viewer-state/EditorDiffViewerState.js +26 -0
  33. package/lib/stores/editor/editor-state/diff-viewer-state/EditorDiffViewerState.js.map +1 -0
  34. package/lib/stores/editor/editor-state/diff-viewer-state/ProjectConfigurationDiffEditorState.d.ts +31 -0
  35. package/lib/stores/editor/editor-state/diff-viewer-state/ProjectConfigurationDiffEditorState.d.ts.map +1 -0
  36. package/lib/stores/editor/editor-state/diff-viewer-state/ProjectConfigurationDiffEditorState.js +39 -0
  37. package/lib/stores/editor/editor-state/diff-viewer-state/ProjectConfigurationDiffEditorState.js.map +1 -0
  38. package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
  39. package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.js +10 -3
  40. package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
  41. package/lib/stores/editor/editor-state/element-editor-state/FunctionActivatorState.d.ts.map +1 -1
  42. package/lib/stores/editor/editor-state/element-editor-state/FunctionActivatorState.js +2 -2
  43. package/lib/stores/editor/editor-state/element-editor-state/FunctionActivatorState.js.map +1 -1
  44. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.d.ts +1 -1
  45. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.d.ts.map +1 -1
  46. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.js +5 -4
  47. package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.js.map +1 -1
  48. package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.js +1 -1
  49. package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.js.map +1 -1
  50. package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityDiffEditorState.d.ts +2 -2
  51. package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityDiffEditorState.d.ts.map +1 -1
  52. package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityDiffEditorState.js +2 -2
  53. package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityDiffEditorState.js.map +1 -1
  54. package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityDiffViewState.d.ts +0 -2
  55. package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityDiffViewState.d.ts.map +1 -1
  56. package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityDiffViewState.js +1 -3
  57. package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityDiffViewState.js.map +1 -1
  58. package/lib/stores/project-reviewer/ProjectReviewerStore.d.ts +75 -0
  59. package/lib/stores/project-reviewer/ProjectReviewerStore.d.ts.map +1 -0
  60. package/lib/stores/project-reviewer/ProjectReviewerStore.js +325 -0
  61. package/lib/stores/project-reviewer/ProjectReviewerStore.js.map +1 -0
  62. package/package.json +5 -5
  63. package/src/__lib__/LegendStudioNavigation.ts +1 -1
  64. package/src/components/LegendStudioWebApplication.tsx +2 -2
  65. package/src/components/editor/editor-group/UnsupportedElementEditor.tsx +38 -9
  66. package/src/components/editor/editor-group/diff-editor/ProjectConfigDiffView.tsx +60 -0
  67. package/src/components/{workspace-review/WorkspaceReviewSideBar.tsx → project-reviewer/ProjectReviewSideBar.tsx} +91 -11
  68. package/src/components/{workspace-review/WorkspaceReviewStoreProvider.tsx → project-reviewer/ProjectReviewStoreProvider.tsx} +13 -13
  69. package/src/components/{workspace-review/WorkspaceReview.tsx → project-reviewer/ProjectReviewer.tsx} +25 -55
  70. package/src/components/{workspace-review/WorkspaceReviewPanel.tsx → project-reviewer/ProjectReviewerPanel.tsx} +54 -36
  71. package/src/stores/editor/editor-state/diff-viewer-state/EditorDiffViewerState.ts +34 -0
  72. package/src/stores/editor/editor-state/diff-viewer-state/ProjectConfigurationDiffEditorState.ts +56 -0
  73. package/src/stores/editor/editor-state/element-editor-state/ElementEditorState.ts +22 -5
  74. package/src/stores/editor/editor-state/element-editor-state/FunctionActivatorState.ts +2 -1
  75. package/src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.ts +6 -3
  76. package/src/stores/editor/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.ts +1 -1
  77. package/src/stores/editor/editor-state/entity-diff-editor-state/EntityDiffEditorState.ts +2 -2
  78. package/src/stores/editor/editor-state/entity-diff-editor-state/EntityDiffViewState.ts +1 -3
  79. package/src/stores/project-reviewer/ProjectReviewerStore.ts +515 -0
  80. package/tsconfig.json +8 -5
  81. package/lib/components/workspace-review/WorkspaceReview.d.ts.map +0 -1
  82. package/lib/components/workspace-review/WorkspaceReview.js.map +0 -1
  83. package/lib/components/workspace-review/WorkspaceReviewPanel.d.ts.map +0 -1
  84. package/lib/components/workspace-review/WorkspaceReviewPanel.js.map +0 -1
  85. package/lib/components/workspace-review/WorkspaceReviewSideBar.d.ts.map +0 -1
  86. package/lib/components/workspace-review/WorkspaceReviewSideBar.js.map +0 -1
  87. package/lib/components/workspace-review/WorkspaceReviewStoreProvider.d.ts.map +0 -1
  88. package/lib/components/workspace-review/WorkspaceReviewStoreProvider.js.map +0 -1
  89. package/lib/stores/workspace-review/WorkspaceReviewStore.d.ts +0 -47
  90. package/lib/stores/workspace-review/WorkspaceReviewStore.d.ts.map +0 -1
  91. package/lib/stores/workspace-review/WorkspaceReviewStore.js +0 -207
  92. package/lib/stores/workspace-review/WorkspaceReviewStore.js.map +0 -1
  93. package/src/stores/workspace-review/WorkspaceReviewStore.ts +0 -312
@@ -32,12 +32,15 @@ import { EntityDiffView } from '../editor/editor-group/diff-editor/EntityDiffVie
32
32
  import type { EditorState } from '../../stores/editor/editor-state/EditorState.js';
33
33
  import { useEditorStore } from '../editor/EditorStoreProvider.js';
34
34
  import { forwardRef } from 'react';
35
+ import { EditorDiffViewerState } from '../../stores/editor/editor-state/diff-viewer-state/EditorDiffViewerState.js';
36
+ import { ProjectConfigDiffView } from '../editor/editor-group/diff-editor/ProjectConfigDiffView.js';
37
+ import { ProjectConfigurationDiffEditorState } from '../../stores/editor/editor-state/diff-viewer-state/ProjectConfigurationDiffEditorState.js';
35
38
 
36
- const WorkspaceReviewPanelSplashScreen: React.FC = () => (
39
+ const ProjectReviewerPanelSplashScreen: React.FC = () => (
37
40
  <div className="workspace-review-panel__splash-screen"></div>
38
41
  );
39
42
 
40
- const WorkspaceReviewPanelHeaderTabContextMenu = observer(
43
+ const ProjectReviewerPanelHeaderTabContextMenu = observer(
41
44
  forwardRef<
42
45
  HTMLDivElement,
43
46
  {
@@ -65,14 +68,14 @@ const WorkspaceReviewPanelHeaderTabContextMenu = observer(
65
68
  }),
66
69
  );
67
70
 
68
- export const WorkspaceReviewPanel = observer(() => {
71
+ export const ProjectReviewerPanel = observer(() => {
69
72
  const editorStore = useEditorStore();
70
73
  const currentTabState =
71
- editorStore.tabManagerState.currentTab instanceof EntityDiffViewState
74
+ editorStore.tabManagerState.currentTab instanceof EditorDiffViewerState
72
75
  ? editorStore.tabManagerState.currentTab
73
76
  : undefined;
74
77
  const openedTabStates = editorStore.tabManagerState.tabs.filter(
75
- filterByType(EntityDiffViewState),
78
+ filterByType(EditorDiffViewerState),
76
79
  );
77
80
  const closeTab =
78
81
  (diffState: EditorState): React.MouseEventHandler =>
@@ -91,12 +94,25 @@ export const WorkspaceReviewPanel = observer(() => {
91
94
  editorStore.tabManagerState.openTab(editorState);
92
95
  const switchViewMode =
93
96
  (mode: DIFF_VIEW_MODE): (() => void) =>
94
- (): void =>
95
- currentTabState?.setDiffMode(mode);
97
+ (): void => {
98
+ if (currentTabState instanceof EntityDiffViewState) {
99
+ currentTabState.setDiffMode(mode);
100
+ }
101
+ };
96
102
 
97
103
  if (!currentTabState) {
98
- return <WorkspaceReviewPanelSplashScreen />;
104
+ return <ProjectReviewerPanelSplashScreen />;
99
105
  }
106
+ const renderActiveTabState = (
107
+ tab: EditorDiffViewerState,
108
+ ): React.ReactNode => {
109
+ if (tab instanceof EntityDiffViewState) {
110
+ return <EntityDiffView entityDiffViewState={tab} />;
111
+ } else if (tab instanceof ProjectConfigurationDiffEditorState) {
112
+ return <ProjectConfigDiffView configDiffState={tab} />;
113
+ }
114
+ return null;
115
+ };
100
116
  return (
101
117
  <div className="panel workspace-review-panel">
102
118
  <div className="panel__header workspace-review-panel__header">
@@ -113,7 +129,7 @@ export const WorkspaceReviewPanel = observer(() => {
113
129
  <ContextMenu
114
130
  className="workspace-review-panel__header__tab__content"
115
131
  content={
116
- <WorkspaceReviewPanelHeaderTabContextMenu
132
+ <ProjectReviewerPanelHeaderTabContextMenu
117
133
  editorState={editorState}
118
134
  />
119
135
  }
@@ -137,38 +153,40 @@ export const WorkspaceReviewPanel = observer(() => {
137
153
  ))}
138
154
  </div>
139
155
  <div className="workspace-review-panel__header__actions">
140
- <DropdownMenu
141
- className="workspace-review-panel__element-view__type"
142
- title="View as..."
143
- content={
144
- <div className="workspace-review-panel__element-view__options">
145
- <div
146
- className="workspace-review-panel__element-view__option"
147
- onClick={switchViewMode(DIFF_VIEW_MODE.GRAMMAR)}
148
- >
149
- {DIFF_VIEW_MODE.GRAMMAR}
150
- </div>
151
- <div
152
- className="workspace-review-panel__element-view__option"
153
- onClick={switchViewMode(DIFF_VIEW_MODE.JSON)}
154
- >
155
- {DIFF_VIEW_MODE.JSON}
156
+ {currentTabState instanceof EntityDiffViewState && (
157
+ <DropdownMenu
158
+ className="workspace-review-panel__element-view__type"
159
+ title="View as..."
160
+ content={
161
+ <div className="workspace-review-panel__element-view__options">
162
+ <div
163
+ className="workspace-review-panel__element-view__option"
164
+ onClick={switchViewMode(DIFF_VIEW_MODE.GRAMMAR)}
165
+ >
166
+ {DIFF_VIEW_MODE.GRAMMAR}
167
+ </div>
168
+ <div
169
+ className="workspace-review-panel__element-view__option"
170
+ onClick={switchViewMode(DIFF_VIEW_MODE.JSON)}
171
+ >
172
+ {DIFF_VIEW_MODE.JSON}
173
+ </div>
156
174
  </div>
175
+ }
176
+ menuProps={{
177
+ anchorOrigin: { vertical: 'bottom', horizontal: 'right' },
178
+ transformOrigin: { vertical: 'top', horizontal: 'right' },
179
+ }}
180
+ >
181
+ <div className="workspace-review-panel__element-view__type__label">
182
+ {currentTabState.diffMode}
157
183
  </div>
158
- }
159
- menuProps={{
160
- anchorOrigin: { vertical: 'bottom', horizontal: 'right' },
161
- transformOrigin: { vertical: 'top', horizontal: 'right' },
162
- }}
163
- >
164
- <div className="workspace-review-panel__element-view__type__label">
165
- {currentTabState.diffMode}
166
- </div>
167
- </DropdownMenu>
184
+ </DropdownMenu>
185
+ )}
168
186
  </div>
169
187
  </div>
170
188
  <div className="panel__content workspace-review-panel__content">
171
- <EntityDiffView entityDiffViewState={currentTabState} />
189
+ {renderActiveTabState(currentTabState)}
172
190
  </div>
173
191
  </div>
174
192
  );
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import type { EditorStore } from '../../EditorStore.js';
18
+ import { EditorState } from '../EditorState.js';
19
+ import type { SPECIAL_REVISION_ALIAS } from '../entity-diff-editor-state/EntityDiffEditorState.js';
20
+
21
+ export abstract class EditorDiffViewerState extends EditorState {
22
+ fromRevision: SPECIAL_REVISION_ALIAS | string;
23
+ toRevision: SPECIAL_REVISION_ALIAS | string;
24
+
25
+ constructor(
26
+ fromRevision: SPECIAL_REVISION_ALIAS | string,
27
+ toRevision: SPECIAL_REVISION_ALIAS | string,
28
+ editorStore: EditorStore,
29
+ ) {
30
+ super(editorStore);
31
+ this.fromRevision = fromRevision;
32
+ this.toRevision = toRevision;
33
+ }
34
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { prettyCONSTName, type PlainObject } from '@finos/legend-shared';
18
+ import type { ProjectConfiguration } from '@finos/legend-server-sdlc';
19
+ import type { EditorStore } from '../../EditorStore.js';
20
+ import { EditorDiffViewerState } from './EditorDiffViewerState.js';
21
+ import type { SPECIAL_REVISION_ALIAS } from '../entity-diff-editor-state/EntityDiffEditorState.js';
22
+ import type { EditorState } from '../EditorState.js';
23
+
24
+ export const PROJECT_CONFIGURATION = 'PROJECT_CONFIGURATION';
25
+
26
+ export class ProjectConfigurationDiffEditorState extends EditorDiffViewerState {
27
+ fromConfig: PlainObject<ProjectConfiguration>;
28
+ toConfig: PlainObject<ProjectConfiguration>;
29
+ constructor(
30
+ fromConfig: PlainObject<ProjectConfiguration>,
31
+ toConfig: PlainObject<ProjectConfiguration>,
32
+ editorStore: EditorStore,
33
+ fromRevision: SPECIAL_REVISION_ALIAS | string,
34
+ toRevision: SPECIAL_REVISION_ALIAS | string,
35
+ ) {
36
+ super(fromRevision, toRevision, editorStore);
37
+ this.fromConfig = fromConfig;
38
+ this.toConfig = toConfig;
39
+ }
40
+
41
+ override get label(): string {
42
+ return prettyCONSTName(PROJECT_CONFIGURATION);
43
+ }
44
+
45
+ override match(tab: EditorState): boolean {
46
+ return (
47
+ tab instanceof ProjectConfigurationDiffEditorState &&
48
+ tab.fromRevision === this.fromRevision &&
49
+ tab.toRevision === this.toRevision
50
+ );
51
+ }
52
+
53
+ override get description(): string {
54
+ return prettyCONSTName(PROJECT_CONFIGURATION);
55
+ }
56
+ }
@@ -23,12 +23,15 @@ import {
23
23
  LogEvent,
24
24
  assertErrorThrown,
25
25
  guaranteeNonNullable,
26
+ guaranteeType,
27
+ isType,
26
28
  } from '@finos/legend-shared';
27
29
  import {
28
30
  type CompilationError,
29
31
  type PackageableElement,
30
32
  GRAPH_MANAGER_EVENT,
31
33
  isElementReadOnly,
34
+ INTERNAL__UnknownPackageableElement,
32
35
  } from '@finos/legend-graph';
33
36
  import { DEFAULT_TAB_SIZE } from '@finos/legend-application';
34
37
  import type { ElementFileGenerationState } from './ElementFileGenerationState.js';
@@ -198,12 +201,26 @@ export abstract class ElementEditorState extends EditorState {
198
201
  );
199
202
  } catch (error) {
200
203
  assertErrorThrown(error);
201
- this.setTextContent(
202
- generateMultiLineCommentForError(
203
- `Can't generate protocol JSON for element`,
204
- error,
205
- ),
204
+ const isUnknownEntity = isType(
205
+ this.element,
206
+ INTERNAL__UnknownPackageableElement,
206
207
  );
208
+ if (isUnknownEntity) {
209
+ const unknownEntity = guaranteeType(
210
+ this.element,
211
+ INTERNAL__UnknownPackageableElement,
212
+ );
213
+ this.setTextContent(
214
+ JSON.stringify(unknownEntity.content, undefined, DEFAULT_TAB_SIZE),
215
+ );
216
+ } else {
217
+ this.setTextContent(
218
+ generateMultiLineCommentForError(
219
+ `Can't generate protocol JSON for element`,
220
+ error,
221
+ ),
222
+ );
223
+ }
207
224
  this.editorStore.applicationStore.logService.error(
208
225
  LogEvent.create(GRAPH_MANAGER_EVENT.PARSING_FAILURE),
209
226
  error,
@@ -24,6 +24,7 @@ import {
24
24
  extractElementNameFromPath,
25
25
  extractPackagePathFromPath,
26
26
  SnowflakeAppDeploymentConfiguration,
27
+ DeploymentOwner,
27
28
  } from '@finos/legend-graph';
28
29
  import { type GeneratorFn } from '@finos/legend-shared';
29
30
  import { FUNCTION_ACTIVATE_TYPE } from '../../../../components/editor/editor-group/function-activator/FunctionEditor.js';
@@ -92,7 +93,7 @@ export class FunctionActivatorState {
92
93
  const snowflakeApp = new SnowflakeApp(activatorName);
93
94
  snowflakeApp.applicationName = '';
94
95
  snowflakeApp.description = '';
95
- snowflakeApp.owner = undefined;
96
+ snowflakeApp.ownership = new DeploymentOwner('', snowflakeApp);
96
97
  snowflakeApp.function =
97
98
  PackageableElementExplicitReference.create(functionElement);
98
99
  snowflakeApp.activationConfiguration =
@@ -22,6 +22,8 @@ import {
22
22
  PackageableElementExplicitReference,
23
23
  observe_SnowflakeAppDeploymentConfiguration,
24
24
  observe_SnowflakeApp,
25
+ DeploymentOwner,
26
+ observe_DeploymentOwnership,
25
27
  } from '@finos/legend-graph';
26
28
  import {
27
29
  type GeneratorFn,
@@ -43,7 +45,7 @@ export class SnowflakeAppFunctionActivatorEdtiorState extends ElementEditorState
43
45
  makeObservable(this, {
44
46
  activator: computed,
45
47
  reprocess: action,
46
- updateOwner: action,
48
+ updateOwnership: action,
47
49
  updateAppDescription: action,
48
50
  updateApplicationName: action,
49
51
  updateConnection: action,
@@ -70,8 +72,9 @@ export class SnowflakeAppFunctionActivatorEdtiorState extends ElementEditorState
70
72
  );
71
73
  }
72
74
 
73
- updateOwner(val: string): void {
74
- this.activator.owner = val;
75
+ updateOwnership(val: string): void {
76
+ this.activator.ownership = new DeploymentOwner(val, this.activator);
77
+ observe_DeploymentOwnership(this.activator.ownership);
75
78
  }
76
79
 
77
80
  updateApplicationName(val: string): void {
@@ -181,7 +181,7 @@ export class EntityChangeConflictEditorState extends EntityDiffViewerState {
181
181
  entityPath: string | undefined,
182
182
  ) => Entity | undefined,
183
183
  ) {
184
- super(editorStore);
184
+ super(baseRevision, currentChangeRevision, editorStore);
185
185
 
186
186
  makeObservable<
187
187
  EntityChangeConflictEditorState,
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { EditorState } from '../../editor-state/EditorState.js';
17
+ import { EditorDiffViewerState } from '../diff-viewer-state/EditorDiffViewerState.js';
18
18
 
19
19
  export enum SPECIAL_REVISION_ALIAS {
20
20
  LOCAL = 'LOCAL_REVISION',
@@ -43,6 +43,6 @@ export const getPrettyLabelForRevision = (
43
43
  }
44
44
  };
45
45
 
46
- export abstract class EntityDiffViewerState extends EditorState {
46
+ export abstract class EntityDiffViewerState extends EditorDiffViewerState {
47
47
  abstract refresh(): void;
48
48
  }
@@ -49,8 +49,6 @@ export class EntityDiffViewState extends EntityDiffViewerState {
49
49
  diffMode = DIFF_VIEW_MODE.GRAMMAR;
50
50
  fromEntityPath?: string | undefined;
51
51
  toEntityPath?: string | undefined;
52
- fromRevision: SPECIAL_REVISION_ALIAS | string;
53
- toRevision: SPECIAL_REVISION_ALIAS | string;
54
52
  // to and from entities
55
53
  fromEntity?: Entity | undefined;
56
54
  toEntity?: Entity | undefined;
@@ -75,7 +73,7 @@ export class EntityDiffViewState extends EntityDiffViewerState {
75
73
  fromEntityGetter?: (entityPath: string | undefined) => Entity | undefined,
76
74
  toEntityGetter?: (entityPath: string | undefined) => Entity | undefined,
77
75
  ) {
78
- super(editorStore);
76
+ super(fromRevision, toRevision, editorStore);
79
77
 
80
78
  makeObservable<
81
79
  EntityDiffViewState,