@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.
- package/lib/__lib__/LegendStudioNavigation.d.ts +1 -1
- package/lib/components/LegendStudioWebApplication.js +2 -2
- package/lib/components/editor/editor-group/UnsupportedElementEditor.d.ts +2 -0
- package/lib/components/editor/editor-group/UnsupportedElementEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/UnsupportedElementEditor.js +12 -3
- package/lib/components/editor/editor-group/UnsupportedElementEditor.js.map +1 -1
- package/lib/components/editor/editor-group/diff-editor/ProjectConfigDiffView.d.ts +22 -0
- package/lib/components/editor/editor-group/diff-editor/ProjectConfigDiffView.d.ts.map +1 -0
- package/lib/components/editor/editor-group/diff-editor/ProjectConfigDiffView.js +26 -0
- package/lib/components/editor/editor-group/diff-editor/ProjectConfigDiffView.js.map +1 -0
- package/lib/components/{workspace-review/WorkspaceReviewSideBar.d.ts → project-reviewer/ProjectReviewSideBar.d.ts} +2 -2
- package/lib/components/project-reviewer/ProjectReviewSideBar.d.ts.map +1 -0
- package/lib/components/{workspace-review/WorkspaceReviewSideBar.js → project-reviewer/ProjectReviewSideBar.js} +34 -18
- package/lib/components/project-reviewer/ProjectReviewSideBar.js.map +1 -0
- package/lib/components/{workspace-review/WorkspaceReviewStoreProvider.d.ts → project-reviewer/ProjectReviewStoreProvider.d.ts} +5 -5
- package/lib/components/project-reviewer/ProjectReviewStoreProvider.d.ts.map +1 -0
- package/lib/components/{workspace-review/WorkspaceReviewStoreProvider.js → project-reviewer/ProjectReviewStoreProvider.js} +9 -9
- package/lib/components/project-reviewer/ProjectReviewStoreProvider.js.map +1 -0
- package/lib/components/{workspace-review/WorkspaceReview.d.ts → project-reviewer/ProjectReviewer.d.ts} +2 -2
- package/lib/components/project-reviewer/ProjectReviewer.d.ts.map +1 -0
- package/lib/components/{workspace-review/WorkspaceReview.js → project-reviewer/ProjectReviewer.js} +19 -28
- package/lib/components/project-reviewer/ProjectReviewer.js.map +1 -0
- package/lib/components/{workspace-review/WorkspaceReviewPanel.d.ts → project-reviewer/ProjectReviewerPanel.d.ts} +2 -2
- package/lib/components/project-reviewer/ProjectReviewerPanel.d.ts.map +1 -0
- package/lib/components/{workspace-review/WorkspaceReviewPanel.js → project-reviewer/ProjectReviewerPanel.js} +26 -10
- package/lib/components/project-reviewer/ProjectReviewerPanel.js.map +1 -0
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/editor-state/diff-viewer-state/EditorDiffViewerState.d.ts +24 -0
- package/lib/stores/editor/editor-state/diff-viewer-state/EditorDiffViewerState.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/diff-viewer-state/EditorDiffViewerState.js +26 -0
- package/lib/stores/editor/editor-state/diff-viewer-state/EditorDiffViewerState.js.map +1 -0
- package/lib/stores/editor/editor-state/diff-viewer-state/ProjectConfigurationDiffEditorState.d.ts +31 -0
- package/lib/stores/editor/editor-state/diff-viewer-state/ProjectConfigurationDiffEditorState.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/diff-viewer-state/ProjectConfigurationDiffEditorState.js +39 -0
- package/lib/stores/editor/editor-state/diff-viewer-state/ProjectConfigurationDiffEditorState.js.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.js +10 -3
- package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionActivatorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionActivatorState.js +2 -2
- package/lib/stores/editor/editor-state/element-editor-state/FunctionActivatorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.d.ts +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.js +5 -4
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.js +1 -1
- package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityDiffEditorState.d.ts +2 -2
- package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityDiffEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityDiffEditorState.js +2 -2
- package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityDiffEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityDiffViewState.d.ts +0 -2
- package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityDiffViewState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityDiffViewState.js +1 -3
- package/lib/stores/editor/editor-state/entity-diff-editor-state/EntityDiffViewState.js.map +1 -1
- package/lib/stores/project-reviewer/ProjectReviewerStore.d.ts +75 -0
- package/lib/stores/project-reviewer/ProjectReviewerStore.d.ts.map +1 -0
- package/lib/stores/project-reviewer/ProjectReviewerStore.js +325 -0
- package/lib/stores/project-reviewer/ProjectReviewerStore.js.map +1 -0
- package/package.json +5 -5
- package/src/__lib__/LegendStudioNavigation.ts +1 -1
- package/src/components/LegendStudioWebApplication.tsx +2 -2
- package/src/components/editor/editor-group/UnsupportedElementEditor.tsx +38 -9
- package/src/components/editor/editor-group/diff-editor/ProjectConfigDiffView.tsx +60 -0
- package/src/components/{workspace-review/WorkspaceReviewSideBar.tsx → project-reviewer/ProjectReviewSideBar.tsx} +91 -11
- package/src/components/{workspace-review/WorkspaceReviewStoreProvider.tsx → project-reviewer/ProjectReviewStoreProvider.tsx} +13 -13
- package/src/components/{workspace-review/WorkspaceReview.tsx → project-reviewer/ProjectReviewer.tsx} +25 -55
- package/src/components/{workspace-review/WorkspaceReviewPanel.tsx → project-reviewer/ProjectReviewerPanel.tsx} +54 -36
- package/src/stores/editor/editor-state/diff-viewer-state/EditorDiffViewerState.ts +34 -0
- package/src/stores/editor/editor-state/diff-viewer-state/ProjectConfigurationDiffEditorState.ts +56 -0
- package/src/stores/editor/editor-state/element-editor-state/ElementEditorState.ts +22 -5
- package/src/stores/editor/editor-state/element-editor-state/FunctionActivatorState.ts +2 -1
- package/src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.ts +6 -3
- package/src/stores/editor/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.ts +1 -1
- package/src/stores/editor/editor-state/entity-diff-editor-state/EntityDiffEditorState.ts +2 -2
- package/src/stores/editor/editor-state/entity-diff-editor-state/EntityDiffViewState.ts +1 -3
- package/src/stores/project-reviewer/ProjectReviewerStore.ts +515 -0
- package/tsconfig.json +8 -5
- package/lib/components/workspace-review/WorkspaceReview.d.ts.map +0 -1
- package/lib/components/workspace-review/WorkspaceReview.js.map +0 -1
- package/lib/components/workspace-review/WorkspaceReviewPanel.d.ts.map +0 -1
- package/lib/components/workspace-review/WorkspaceReviewPanel.js.map +0 -1
- package/lib/components/workspace-review/WorkspaceReviewSideBar.d.ts.map +0 -1
- package/lib/components/workspace-review/WorkspaceReviewSideBar.js.map +0 -1
- package/lib/components/workspace-review/WorkspaceReviewStoreProvider.d.ts.map +0 -1
- package/lib/components/workspace-review/WorkspaceReviewStoreProvider.js.map +0 -1
- package/lib/stores/workspace-review/WorkspaceReviewStore.d.ts +0 -47
- package/lib/stores/workspace-review/WorkspaceReviewStore.d.ts.map +0 -1
- package/lib/stores/workspace-review/WorkspaceReviewStore.js +0 -207
- package/lib/stores/workspace-review/WorkspaceReviewStore.js.map +0 -1
- 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
|
39
|
+
const ProjectReviewerPanelSplashScreen: React.FC = () => (
|
37
40
|
<div className="workspace-review-panel__splash-screen"></div>
|
38
41
|
);
|
39
42
|
|
40
|
-
const
|
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
|
71
|
+
export const ProjectReviewerPanel = observer(() => {
|
69
72
|
const editorStore = useEditorStore();
|
70
73
|
const currentTabState =
|
71
|
-
editorStore.tabManagerState.currentTab instanceof
|
74
|
+
editorStore.tabManagerState.currentTab instanceof EditorDiffViewerState
|
72
75
|
? editorStore.tabManagerState.currentTab
|
73
76
|
: undefined;
|
74
77
|
const openedTabStates = editorStore.tabManagerState.tabs.filter(
|
75
|
-
filterByType(
|
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
|
97
|
+
(): void => {
|
98
|
+
if (currentTabState instanceof EntityDiffViewState) {
|
99
|
+
currentTabState.setDiffMode(mode);
|
100
|
+
}
|
101
|
+
};
|
96
102
|
|
97
103
|
if (!currentTabState) {
|
98
|
-
return <
|
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
|
-
<
|
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
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
<div
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
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
|
-
|
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
|
-
|
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
|
+
}
|
package/src/stores/editor/editor-state/diff-viewer-state/ProjectConfigurationDiffEditorState.ts
ADDED
@@ -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
|
-
|
202
|
-
|
203
|
-
|
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.
|
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
|
-
|
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
|
-
|
74
|
-
this.activator.
|
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 {
|
package/src/stores/editor/editor-state/entity-diff-editor-state/EntityChangeConflictEditorState.ts
CHANGED
@@ -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 {
|
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
|
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,
|