@finos/legend-extension-dsl-data-space 0.0.6 → 1.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.
- package/CHANGELOG.md +32 -0
- package/lib/DSLDataSpace_Extension.d.ts +0 -5
- package/lib/DSLDataSpace_Extension.d.ts.map +1 -1
- package/lib/DSLDataSpace_Extension.js +0 -12
- package/lib/DSLDataSpace_Extension.js.map +1 -1
- package/lib/components/{studio/DataSpaceEditor.d.ts → DataSpaceViewer.d.ts} +5 -2
- package/lib/components/DataSpaceViewer.d.ts.map +1 -0
- package/lib/components/DataSpaceViewer.js +186 -0
- package/lib/components/DataSpaceViewer.js.map +1 -0
- package/lib/components/query/DSLDataSpace_LegendQueryPlugin.d.ts +24 -0
- package/lib/components/query/DSLDataSpace_LegendQueryPlugin.d.ts.map +1 -0
- package/lib/components/query/DSLDataSpace_LegendQueryPlugin.js +51 -0
- package/lib/components/query/DSLDataSpace_LegendQueryPlugin.js.map +1 -0
- package/lib/components/query/DataSpaceQuerySetup.d.ts +22 -0
- package/lib/components/query/DataSpaceQuerySetup.d.ts.map +1 -0
- package/lib/components/query/DataSpaceQuerySetup.js +95 -0
- package/lib/components/query/DataSpaceQuerySetup.js.map +1 -0
- package/lib/components/studio/{DSLDataSpace_StudioPlugin.d.ts → DSLDataSpace_LegendStudioPlugin.d.ts} +5 -6
- package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.d.ts.map +1 -0
- package/lib/components/studio/{DSLDataSpace_StudioPlugin.js → DSLDataSpace_LegendStudioPlugin.js} +7 -18
- package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.js.map +1 -0
- package/lib/graph/DSLDataSpace_PureGraphPlugin.js +1 -1
- package/lib/graph/DSLDataSpace_PureGraphPlugin.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +5 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -1
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.d.ts +39 -1
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.js +110 -8
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.d.ts +1 -0
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.js +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.js.map +1 -1
- package/lib/stores/DataSpaceViewerState.d.ts +59 -0
- package/lib/stores/DataSpaceViewerState.d.ts.map +1 -0
- package/lib/stores/DataSpaceViewerState.js +137 -0
- package/lib/stores/DataSpaceViewerState.js.map +1 -0
- package/lib/stores/query/DataSpaceQuerySetupState.d.ts +49 -0
- package/lib/stores/query/DataSpaceQuerySetupState.d.ts.map +1 -0
- package/lib/stores/query/DataSpaceQuerySetupState.js +129 -0
- package/lib/stores/query/DataSpaceQuerySetupState.js.map +1 -0
- package/package.json +26 -21
- package/src/DSLDataSpace_Extension.ts +0 -15
- package/src/components/DataSpaceViewer.tsx +598 -0
- package/src/components/query/DSLDataSpace_LegendQueryPlugin.tsx +76 -0
- package/src/components/query/DataSpaceQuerySetup.tsx +234 -0
- package/src/components/studio/{DSLDataSpace_StudioPlugin.tsx → DSLDataSpace_LegendStudioPlugin.tsx} +17 -27
- package/src/graph/DSLDataSpace_PureGraphPlugin.ts +1 -1
- package/src/index.ts +12 -0
- package/src/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.ts +192 -6
- package/src/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.ts +1 -1
- package/src/stores/DataSpaceViewerState.ts +202 -0
- package/src/stores/query/DataSpaceQuerySetupState.ts +235 -0
- package/tsconfig.json +7 -3
- package/tsconfig.package.json +1 -0
- package/lib/components/studio/DSLDataSpace_StudioPlugin.d.ts.map +0 -1
- package/lib/components/studio/DSLDataSpace_StudioPlugin.js.map +0 -1
- package/lib/components/studio/DataSpaceEditor.d.ts.map +0 -1
- package/lib/components/studio/DataSpaceEditor.js +0 -98
- package/lib/components/studio/DataSpaceEditor.js.map +0 -1
- package/lib/stores/studio/DataSpaceEditorState.d.ts +0 -42
- package/lib/stores/studio/DataSpaceEditorState.d.ts.map +0 -1
- package/lib/stores/studio/DataSpaceEditorState.js +0 -76
- package/lib/stores/studio/DataSpaceEditorState.js.map +0 -1
- package/src/components/studio/DataSpaceEditor.tsx +0 -272
- package/src/stores/studio/DataSpaceEditorState.ts +0 -108
|
@@ -0,0 +1,202 @@
|
|
|
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 {
|
|
18
|
+
ClassView,
|
|
19
|
+
DiagramRenderer,
|
|
20
|
+
} from '@finos/legend-extension-dsl-diagram';
|
|
21
|
+
import {
|
|
22
|
+
Diagram,
|
|
23
|
+
DIAGRAM_INTERACTION_MODE,
|
|
24
|
+
} from '@finos/legend-extension-dsl-diagram';
|
|
25
|
+
import type {
|
|
26
|
+
GraphManagerState,
|
|
27
|
+
PackageableElementReference,
|
|
28
|
+
PackageableRuntime,
|
|
29
|
+
} from '@finos/legend-graph';
|
|
30
|
+
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
31
|
+
import { action, computed, makeObservable, observable } from 'mobx';
|
|
32
|
+
import type {
|
|
33
|
+
ResolvedDataSpace,
|
|
34
|
+
ResolvedDataSpaceExecutionContext,
|
|
35
|
+
} from '../models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin';
|
|
36
|
+
|
|
37
|
+
export enum DATA_SPACE_VIEWER_ACTIVITY_MODE {
|
|
38
|
+
MODELS_OVERVIEW = 'MODELS_OVERVIEW',
|
|
39
|
+
EXECUTION = 'EXECUTION',
|
|
40
|
+
ENTITLEMENT = 'ENTITLEMENT',
|
|
41
|
+
TEST_DATA = 'TEST_DATA',
|
|
42
|
+
TEST_COVERAGE = 'TEST_COVERAGE',
|
|
43
|
+
TAGS = 'TAGS',
|
|
44
|
+
SUPPORT = 'SUPPORT',
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export class DataSpaceViewerState {
|
|
48
|
+
graphManagerState: GraphManagerState;
|
|
49
|
+
dataSpaceGroupId: string;
|
|
50
|
+
dataSpaceArtifactId: string;
|
|
51
|
+
dataSpaceVersionId: string;
|
|
52
|
+
dataSpace: ResolvedDataSpace;
|
|
53
|
+
_renderer?: DiagramRenderer | undefined;
|
|
54
|
+
currentDiagram?: Diagram | undefined;
|
|
55
|
+
currentActivity = DATA_SPACE_VIEWER_ACTIVITY_MODE.MODELS_OVERVIEW;
|
|
56
|
+
currentExecutionContext: ResolvedDataSpaceExecutionContext;
|
|
57
|
+
currentRuntime: PackageableRuntime;
|
|
58
|
+
viewProject?:
|
|
59
|
+
| ((
|
|
60
|
+
groupId: string,
|
|
61
|
+
artifactId: string,
|
|
62
|
+
versionId: string,
|
|
63
|
+
entityPath: string | undefined,
|
|
64
|
+
) => void)
|
|
65
|
+
| undefined;
|
|
66
|
+
onDiagramClassDoubleClick?: ((classView: ClassView) => void) | undefined;
|
|
67
|
+
|
|
68
|
+
constructor(
|
|
69
|
+
graphManagerState: GraphManagerState,
|
|
70
|
+
dataSpaceGroupId: string,
|
|
71
|
+
dataSpaceArtifactId: string,
|
|
72
|
+
dataSpaceVersionId: string,
|
|
73
|
+
dataSpace: ResolvedDataSpace,
|
|
74
|
+
options?: {
|
|
75
|
+
viewProject?: (
|
|
76
|
+
groupId: string,
|
|
77
|
+
artifactId: string,
|
|
78
|
+
versionId: string,
|
|
79
|
+
entityPath: string | undefined,
|
|
80
|
+
) => void;
|
|
81
|
+
onDiagramClassDoubleClick?: (classView: ClassView) => void;
|
|
82
|
+
},
|
|
83
|
+
) {
|
|
84
|
+
makeObservable(this, {
|
|
85
|
+
_renderer: observable,
|
|
86
|
+
currentDiagram: observable,
|
|
87
|
+
currentActivity: observable,
|
|
88
|
+
currentExecutionContext: observable,
|
|
89
|
+
currentRuntime: observable,
|
|
90
|
+
renderer: computed,
|
|
91
|
+
setRenderer: action,
|
|
92
|
+
setCurrentDiagram: action,
|
|
93
|
+
setCurrentActivity: action,
|
|
94
|
+
setCurrentExecutionContext: action,
|
|
95
|
+
setCurrentRuntime: action,
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
this.graphManagerState = graphManagerState;
|
|
99
|
+
this.dataSpace = dataSpace;
|
|
100
|
+
this.dataSpaceGroupId = dataSpaceGroupId;
|
|
101
|
+
this.dataSpaceArtifactId = dataSpaceArtifactId;
|
|
102
|
+
this.dataSpaceVersionId = dataSpaceVersionId;
|
|
103
|
+
this.currentExecutionContext = this.dataSpace.defaultExecutionContext;
|
|
104
|
+
this.currentRuntime =
|
|
105
|
+
this.dataSpace.defaultExecutionContext.defaultRuntime.value;
|
|
106
|
+
this.currentDiagram = this.dataSpace.featuredDiagrams.length
|
|
107
|
+
? (
|
|
108
|
+
this.dataSpace
|
|
109
|
+
.featuredDiagrams[0] as PackageableElementReference<Diagram>
|
|
110
|
+
).value
|
|
111
|
+
: this.diagrams.length
|
|
112
|
+
? this.diagrams[0]
|
|
113
|
+
: undefined;
|
|
114
|
+
this.viewProject = options?.viewProject;
|
|
115
|
+
this.onDiagramClassDoubleClick = options?.onDiagramClassDoubleClick;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
get renderer(): DiagramRenderer {
|
|
119
|
+
return guaranteeNonNullable(
|
|
120
|
+
this._renderer,
|
|
121
|
+
`Diagram renderer must be initialized (this is likely caused by calling this method at the wrong place)`,
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
get isDiagramRendererInitialized(): boolean {
|
|
126
|
+
return Boolean(this._renderer);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
get featuredDiagrams(): Diagram[] {
|
|
130
|
+
return this.dataSpace.featuredDiagrams.map((ref) => ref.value);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
get diagrams(): Diagram[] {
|
|
134
|
+
return this.graphManagerState.graph
|
|
135
|
+
.getExtensionElements(Diagram)
|
|
136
|
+
.concat(
|
|
137
|
+
this.graphManagerState.graph.dependencyManager.getExtensionElements(
|
|
138
|
+
Diagram,
|
|
139
|
+
),
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
get runtimes(): PackageableRuntime[] {
|
|
144
|
+
return this.graphManagerState.graph.ownRuntimes
|
|
145
|
+
.concat(this.graphManagerState.graph.dependencyManager.runtimes)
|
|
146
|
+
.filter((runtime) =>
|
|
147
|
+
runtime.runtimeValue.mappings
|
|
148
|
+
.map((mapping) => mapping.value)
|
|
149
|
+
.includes(this.currentExecutionContext.mapping.value),
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// NOTE: we have tried to use React to control the cursor and
|
|
154
|
+
// could not overcome the jank/lag problem, so we settle with CSS-based approach
|
|
155
|
+
// See https://css-tricks.com/using-css-cursors/
|
|
156
|
+
// See https://developer.mozilla.org/en-US/docs/Web/CSS/cursor
|
|
157
|
+
get diagramCursorClass(): string {
|
|
158
|
+
if (!this.isDiagramRendererInitialized) {
|
|
159
|
+
return '';
|
|
160
|
+
}
|
|
161
|
+
if (this.renderer.middleClick || this.renderer.rightClick) {
|
|
162
|
+
return 'diagram-editor__cursor--grabbing';
|
|
163
|
+
}
|
|
164
|
+
switch (this.renderer.interactionMode) {
|
|
165
|
+
case DIAGRAM_INTERACTION_MODE.LAYOUT: {
|
|
166
|
+
if (this.renderer.mouseOverClassView) {
|
|
167
|
+
return 'diagram-editor__cursor--pointer';
|
|
168
|
+
}
|
|
169
|
+
return '';
|
|
170
|
+
}
|
|
171
|
+
default:
|
|
172
|
+
return '';
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
setRenderer(val: DiagramRenderer): void {
|
|
177
|
+
this._renderer = val;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
setCurrentDiagram(val: Diagram): void {
|
|
181
|
+
this.currentDiagram = val;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
setCurrentActivity(val: DATA_SPACE_VIEWER_ACTIVITY_MODE): void {
|
|
185
|
+
this.currentActivity = val;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
setCurrentExecutionContext(val: ResolvedDataSpaceExecutionContext): void {
|
|
189
|
+
this.currentExecutionContext = val;
|
|
190
|
+
this.currentRuntime = val.defaultRuntime.value;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
setCurrentRuntime(val: PackageableRuntime): void {
|
|
194
|
+
this.currentRuntime = val;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
setupRenderer(): void {
|
|
198
|
+
this.renderer.setIsReadOnly(true);
|
|
199
|
+
this.renderer.onClassViewDoubleClick = (classView: ClassView): void =>
|
|
200
|
+
this.onDiagramClassDoubleClick?.(classView);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
@@ -0,0 +1,235 @@
|
|
|
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 { ClassView } from '@finos/legend-extension-dsl-diagram';
|
|
18
|
+
import type { Class } from '@finos/legend-graph';
|
|
19
|
+
import type { Entity } from '@finos/legend-model-storage';
|
|
20
|
+
import type { QuerySetupStore } from '@finos/legend-query';
|
|
21
|
+
import {
|
|
22
|
+
CreateQueryInfoState,
|
|
23
|
+
QuerySetupState,
|
|
24
|
+
generateCreateQueryRoute,
|
|
25
|
+
} from '@finos/legend-query';
|
|
26
|
+
import type { StoredEntity } from '@finos/legend-server-depot';
|
|
27
|
+
import {
|
|
28
|
+
DepotScope,
|
|
29
|
+
ProjectData,
|
|
30
|
+
SNAPSHOT_VERSION_ALIAS,
|
|
31
|
+
} from '@finos/legend-server-depot';
|
|
32
|
+
import type { GeneratorFn, PlainObject } from '@finos/legend-shared';
|
|
33
|
+
import {
|
|
34
|
+
ActionState,
|
|
35
|
+
assertErrorThrown,
|
|
36
|
+
guaranteeNonNullable,
|
|
37
|
+
} from '@finos/legend-shared';
|
|
38
|
+
import { action, flow, flowResult, makeObservable, observable } from 'mobx';
|
|
39
|
+
import {
|
|
40
|
+
DATA_SPACE_ELEMENT_CLASSIFIER_PATH,
|
|
41
|
+
getResolvedDataSpace,
|
|
42
|
+
} from '../../models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin';
|
|
43
|
+
import { DataSpaceViewerState } from '../DataSpaceViewerState';
|
|
44
|
+
|
|
45
|
+
export type LightDataSpace = Entity & {
|
|
46
|
+
groupId: string;
|
|
47
|
+
artifactId: string;
|
|
48
|
+
versionId: string;
|
|
49
|
+
path: string;
|
|
50
|
+
content: {
|
|
51
|
+
groupId: string;
|
|
52
|
+
artifactId: string;
|
|
53
|
+
versionId: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export class DataSpaceQuerySetupState extends QuerySetupState {
|
|
58
|
+
dataSpaces: LightDataSpace[] = [];
|
|
59
|
+
loadDataSpacesState = ActionState.create();
|
|
60
|
+
setUpDataSpaceState = ActionState.create();
|
|
61
|
+
currentDataSpace?: LightDataSpace | undefined;
|
|
62
|
+
dataSpaceViewerState?: DataSpaceViewerState | undefined;
|
|
63
|
+
toGetSnapShot = false;
|
|
64
|
+
|
|
65
|
+
constructor(setupStore: QuerySetupStore) {
|
|
66
|
+
super(setupStore);
|
|
67
|
+
|
|
68
|
+
makeObservable(this, {
|
|
69
|
+
dataSpaces: observable,
|
|
70
|
+
currentDataSpace: observable.ref,
|
|
71
|
+
dataSpaceViewerState: observable,
|
|
72
|
+
toGetSnapShot: observable,
|
|
73
|
+
setCurrentDataSpace: action,
|
|
74
|
+
setDataSpaceViewerState: action,
|
|
75
|
+
setToGetSnapShot: action,
|
|
76
|
+
loadDataSpaces: flow,
|
|
77
|
+
setUpDataSpace: flow,
|
|
78
|
+
proceedToCreateQuery: flow,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
setCurrentDataSpace(val: LightDataSpace | undefined): void {
|
|
83
|
+
this.currentDataSpace = val;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
setDataSpaceViewerState(val: DataSpaceViewerState | undefined): void {
|
|
87
|
+
this.dataSpaceViewerState = val;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
setToGetSnapShot(val: boolean): void {
|
|
91
|
+
this.toGetSnapShot = val;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
*loadDataSpaces(searchText: string): GeneratorFn<void> {
|
|
95
|
+
if (this.queryStore.initState.isInInitialState) {
|
|
96
|
+
yield flowResult(this.queryStore.initialize());
|
|
97
|
+
} else if (this.queryStore.initState.isInProgress) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const isValidSearchString = searchText.length >= 3;
|
|
101
|
+
this.loadDataSpacesState.inProgress();
|
|
102
|
+
try {
|
|
103
|
+
this.dataSpaces = (
|
|
104
|
+
(yield this.queryStore.depotServerClient.getEntitiesByClassifierPath(
|
|
105
|
+
DATA_SPACE_ELEMENT_CLASSIFIER_PATH,
|
|
106
|
+
{
|
|
107
|
+
search: isValidSearchString ? searchText : undefined,
|
|
108
|
+
scope: this.toGetSnapShot
|
|
109
|
+
? DepotScope.SNAPSHOT
|
|
110
|
+
: DepotScope.RELEASES,
|
|
111
|
+
limit: 10,
|
|
112
|
+
},
|
|
113
|
+
)) as StoredEntity[]
|
|
114
|
+
).map(
|
|
115
|
+
(storedEntity) =>
|
|
116
|
+
({
|
|
117
|
+
...storedEntity.entity,
|
|
118
|
+
groupId: storedEntity.groupId,
|
|
119
|
+
artifactId: storedEntity.artifactId,
|
|
120
|
+
versionId: this.toGetSnapShot
|
|
121
|
+
? SNAPSHOT_VERSION_ALIAS
|
|
122
|
+
: storedEntity.versionId,
|
|
123
|
+
path: storedEntity.entity.path,
|
|
124
|
+
content: {
|
|
125
|
+
...storedEntity.entity.content,
|
|
126
|
+
groupId: guaranteeNonNullable(
|
|
127
|
+
storedEntity.entity.content.groupId,
|
|
128
|
+
`Data space 'groupId' field is missing`,
|
|
129
|
+
),
|
|
130
|
+
artifactId: guaranteeNonNullable(
|
|
131
|
+
storedEntity.entity.content.artifactId,
|
|
132
|
+
`Data space 'artifactId' field is missing`,
|
|
133
|
+
),
|
|
134
|
+
versionId: guaranteeNonNullable(
|
|
135
|
+
storedEntity.entity.content.versionId,
|
|
136
|
+
`Data space 'versionId' field is missing`,
|
|
137
|
+
),
|
|
138
|
+
},
|
|
139
|
+
} as LightDataSpace),
|
|
140
|
+
);
|
|
141
|
+
this.loadDataSpacesState.pass();
|
|
142
|
+
} catch (error) {
|
|
143
|
+
assertErrorThrown(error);
|
|
144
|
+
this.loadDataSpacesState.fail();
|
|
145
|
+
this.queryStore.applicationStore.notifyError(error);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
*setUpDataSpace(dataSpace: LightDataSpace): GeneratorFn<void> {
|
|
150
|
+
if (this.queryStore.initState.isInInitialState) {
|
|
151
|
+
yield flowResult(this.queryStore.initialize());
|
|
152
|
+
} else if (this.queryStore.initState.isInProgress) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
this.setUpDataSpaceState.inProgress();
|
|
156
|
+
try {
|
|
157
|
+
const projectData = ProjectData.serialization.fromJson(
|
|
158
|
+
(yield flowResult(
|
|
159
|
+
this.queryStore.depotServerClient.getProject(
|
|
160
|
+
dataSpace.content.groupId,
|
|
161
|
+
dataSpace.content.artifactId,
|
|
162
|
+
),
|
|
163
|
+
)) as PlainObject<ProjectData>,
|
|
164
|
+
);
|
|
165
|
+
yield flowResult(
|
|
166
|
+
this.queryStore.buildGraph(projectData, dataSpace.content.versionId),
|
|
167
|
+
);
|
|
168
|
+
const resolvedDataSpace = getResolvedDataSpace(
|
|
169
|
+
dataSpace.content,
|
|
170
|
+
this.queryStore.graphManagerState.graph,
|
|
171
|
+
);
|
|
172
|
+
this.dataSpaceViewerState = new DataSpaceViewerState(
|
|
173
|
+
this.queryStore.graphManagerState,
|
|
174
|
+
dataSpace.groupId,
|
|
175
|
+
dataSpace.artifactId,
|
|
176
|
+
dataSpace.versionId,
|
|
177
|
+
resolvedDataSpace,
|
|
178
|
+
{
|
|
179
|
+
viewProject: (
|
|
180
|
+
groupId: string,
|
|
181
|
+
artifactId: string,
|
|
182
|
+
versionId: string,
|
|
183
|
+
entityPath: string | undefined,
|
|
184
|
+
): void =>
|
|
185
|
+
this.queryStore.viewStudioProject(
|
|
186
|
+
groupId,
|
|
187
|
+
artifactId,
|
|
188
|
+
versionId,
|
|
189
|
+
entityPath,
|
|
190
|
+
),
|
|
191
|
+
onDiagramClassDoubleClick: (classView: ClassView): void => {
|
|
192
|
+
this.proceedToCreateQuery(classView.class.value);
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
);
|
|
196
|
+
this.setUpDataSpaceState.pass();
|
|
197
|
+
} catch (error) {
|
|
198
|
+
assertErrorThrown(error);
|
|
199
|
+
this.setUpDataSpaceState.fail();
|
|
200
|
+
this.queryStore.applicationStore.notifyError(error);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
*proceedToCreateQuery(_class?: Class): GeneratorFn<void> {
|
|
205
|
+
if (this.dataSpaceViewerState) {
|
|
206
|
+
const projectData = ProjectData.serialization.fromJson(
|
|
207
|
+
(yield flowResult(
|
|
208
|
+
this.queryStore.depotServerClient.getProject(
|
|
209
|
+
this.dataSpaceViewerState.dataSpace.groupId,
|
|
210
|
+
this.dataSpaceViewerState.dataSpace.artifactId,
|
|
211
|
+
),
|
|
212
|
+
)) as PlainObject<ProjectData>,
|
|
213
|
+
);
|
|
214
|
+
const queryInfoState = new CreateQueryInfoState(
|
|
215
|
+
this.queryStore,
|
|
216
|
+
projectData,
|
|
217
|
+
this.dataSpaceViewerState.dataSpace.versionId,
|
|
218
|
+
this.dataSpaceViewerState.currentExecutionContext.mapping.value,
|
|
219
|
+
this.dataSpaceViewerState.currentRuntime,
|
|
220
|
+
);
|
|
221
|
+
queryInfoState.class = _class;
|
|
222
|
+
this.queryStore.setQueryInfoState(queryInfoState);
|
|
223
|
+
this.queryStore.applicationStore.navigator.goTo(
|
|
224
|
+
generateCreateQueryRoute(
|
|
225
|
+
this.dataSpaceViewerState.dataSpace.groupId,
|
|
226
|
+
this.dataSpaceViewerState.dataSpace.artifactId,
|
|
227
|
+
this.dataSpaceViewerState.dataSpace.versionId,
|
|
228
|
+
this.dataSpaceViewerState.currentExecutionContext.mapping.value.path,
|
|
229
|
+
this.dataSpaceViewerState.currentRuntime.path,
|
|
230
|
+
),
|
|
231
|
+
);
|
|
232
|
+
this.setupStore.setSetupState(undefined);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"allowSyntheticDefaultImports": true,
|
|
23
23
|
"strict": true,
|
|
24
24
|
"noImplicitOverride": true,
|
|
25
|
+
"noUncheckedIndexedAccess": true,
|
|
25
26
|
"exactOptionalPropertyTypes": true,
|
|
26
27
|
"forceConsistentCasingInFileNames": true,
|
|
27
28
|
"outDir": "./lib",
|
|
@@ -46,9 +47,12 @@
|
|
|
46
47
|
"./src/models/protocols/pure/v1/model/packageableElements/dataSpace/V1_DataSpace.ts",
|
|
47
48
|
"./src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDataSpace_GraphBuilderHelper.ts",
|
|
48
49
|
"./src/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.ts",
|
|
49
|
-
"./src/stores/
|
|
50
|
-
"./src/
|
|
51
|
-
"./src/components/
|
|
50
|
+
"./src/stores/DataSpaceViewerState.ts",
|
|
51
|
+
"./src/stores/query/DataSpaceQuerySetupState.ts",
|
|
52
|
+
"./src/components/DataSpaceViewer.tsx",
|
|
53
|
+
"./src/components/query/DSLDataSpace_LegendQueryPlugin.tsx",
|
|
54
|
+
"./src/components/query/DataSpaceQuerySetup.tsx",
|
|
55
|
+
"./src/components/studio/DSLDataSpace_LegendStudioPlugin.tsx",
|
|
52
56
|
"./src/models/protocols/pure/v1/V1_DSLDataSpace_SystemModels.json"
|
|
53
57
|
],
|
|
54
58
|
"include": [
|
package/tsconfig.package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DSLDataSpace_StudioPlugin.d.ts","sourceRoot":"","sources":["../../../src/components/studio/DSLDataSpace_StudioPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EACV,mBAAmB,EACnB,0BAA0B,EAG1B,yBAAyB,EACzB,iBAAiB,EACjB,mCAAmC,EACnC,iBAAiB,EACjB,0BAA0B,EAE1B,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAcpD,qBAAa,yBACX,SAAQ,YACR,YAAW,0BAA0B;;IAMrC,OAAO,CAAC,aAAa,EAAE,mBAAmB,GAAG,IAAI;IAIjD,6BAA6B,IAAI,MAAM,EAAE;IAIzC,0BAA0B,IAAI,iBAAiB,EAAE;IAWjD,0BAA0B,IAAI,iBAAiB,EAAE;IAejD,8BAA8B,IAAI,qBAAqB,EAAE;IAWzD,mCAAmC,IAAI,0BAA0B,EAAE;IA2BnE,kCAAkC,IAAI,yBAAyB,EAAE;IAcjE,4CAA4C,IAAI,mCAAmC,EAAE;IAWrF,iCAAiC,IAAI,MAAM,EAAE;CAG9C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DSLDataSpace_StudioPlugin.js","sourceRoot":"","sources":["../../../src/components/studio/DSLDataSpace_StudioPlugin.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAchD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EACL,SAAS,EACT,yBAAyB,GAC1B,MAAM,4EAA4E,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,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sx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA+HH,eAAO,MAAM,eAAe;;CAkI1B,CAAC"}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { useRef, useEffect } from 'react';
|
|
18
|
-
import { observer } from 'mobx-react-lite';
|
|
19
|
-
import { useEditorStore } from '@finos/legend-studio';
|
|
20
|
-
import { useResizeDetector } from 'react-resize-detector';
|
|
21
|
-
import { BlankPanelContent, ShapesIcon, PlayIcon, UserIcon, QuestionCircleIcon, clsx, CustomSelectorInput, } from '@finos/legend-art';
|
|
22
|
-
import { DataSpaceEditorState, DATA_SPACE_VIEWER_ACTIVITY_MODE, } from '../../stores/studio/DataSpaceEditorState';
|
|
23
|
-
import { DiagramRenderer } from '@finos/legend-extension-dsl-diagram';
|
|
24
|
-
const DataSpaceDiagramCanvas = observer((props, ref) => {
|
|
25
|
-
const { dataSpaceEditorState, diagram } = props;
|
|
26
|
-
const diagramCanvasRef = ref;
|
|
27
|
-
const { width, height } = useResizeDetector({
|
|
28
|
-
refreshMode: 'debounce',
|
|
29
|
-
refreshRate: 50,
|
|
30
|
-
targetRef: diagramCanvasRef,
|
|
31
|
-
});
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
if (diagramCanvasRef.current) {
|
|
34
|
-
const renderer = new DiagramRenderer(diagramCanvasRef.current, diagram);
|
|
35
|
-
dataSpaceEditorState.setRenderer(renderer);
|
|
36
|
-
renderer.render();
|
|
37
|
-
renderer.autoRecenter();
|
|
38
|
-
}
|
|
39
|
-
}, [diagramCanvasRef, dataSpaceEditorState, diagram]);
|
|
40
|
-
useEffect(() => {
|
|
41
|
-
if (dataSpaceEditorState.isDiagramRendererInitialized) {
|
|
42
|
-
dataSpaceEditorState.renderer.refresh();
|
|
43
|
-
}
|
|
44
|
-
}, [dataSpaceEditorState, width, height]);
|
|
45
|
-
return (_jsx("div", { ref: diagramCanvasRef, className: "diagram-canvas", tabIndex: 0, onContextMenu: (event) => event.preventDefault() }, void 0));
|
|
46
|
-
}, { forwardRef: true });
|
|
47
|
-
const buildDiagramOption = (diagram) => ({
|
|
48
|
-
label: diagram.name,
|
|
49
|
-
value: diagram,
|
|
50
|
-
});
|
|
51
|
-
const DataSpaceModelsOverview = observer((props) => {
|
|
52
|
-
const { dataSpaceEditorState } = props;
|
|
53
|
-
const diagramCanvasRef = useRef(null);
|
|
54
|
-
const diagramOptions = dataSpaceEditorState.diagrams.map(buildDiagramOption);
|
|
55
|
-
const selectedDiagramOption = dataSpaceEditorState.currentDiagram
|
|
56
|
-
? buildDiagramOption(dataSpaceEditorState.currentDiagram)
|
|
57
|
-
: null;
|
|
58
|
-
const onDiagramOptionChange = (option) => {
|
|
59
|
-
if (option.value !== dataSpaceEditorState.currentDiagram) {
|
|
60
|
-
dataSpaceEditorState.setCurrentDiagram(option.value);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
return (_jsxs(_Fragment, { children: [dataSpaceEditorState.diagrams.length !== 0 && (_jsxs("div", Object.assign({ className: "data-space-viewer__main-panel__content data-space-viewer__overview-panel" }, { children: [_jsx("div", Object.assign({ className: "data-space-viewer__overview-panel__header" }, { children: _jsx(CustomSelectorInput, { className: "data-space-viewer__overview-panel__diagram-selector", options: diagramOptions, onChange: onDiagramOptionChange, value: selectedDiagramOption, placeholder: "Search for a diagram", darkMode: true }, void 0) }), void 0), _jsx("div", Object.assign({ className: "data-space-viewer__overview-panel__content" }, { children: dataSpaceEditorState.currentDiagram && (_jsx(DataSpaceDiagramCanvas, { dataSpaceEditorState: dataSpaceEditorState, diagram: dataSpaceEditorState.currentDiagram, ref: diagramCanvasRef }, void 0)) }), void 0)] }), void 0)), dataSpaceEditorState.diagrams.length === 0 && (_jsx(BlankPanelContent, { children: "No diagrams available" }, void 0))] }, void 0));
|
|
64
|
-
});
|
|
65
|
-
export const DataSpaceViewer = observer(() => {
|
|
66
|
-
const editorStore = useEditorStore();
|
|
67
|
-
const dataSpaceEditorState = editorStore.getCurrentEditorState(DataSpaceEditorState);
|
|
68
|
-
const dataSpace = dataSpaceEditorState.dataSpace;
|
|
69
|
-
const changeActivity = (activity) => () => dataSpaceEditorState.setCurrentActivity(activity);
|
|
70
|
-
const activities = [
|
|
71
|
-
{
|
|
72
|
-
mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.MODELS,
|
|
73
|
-
title: 'Models Overview',
|
|
74
|
-
icon: _jsx(ShapesIcon, {}, void 0),
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.EXECUTION,
|
|
78
|
-
title: 'Execution Context',
|
|
79
|
-
icon: _jsx(PlayIcon, {}, void 0),
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.ENTITLEMENT,
|
|
83
|
-
title: 'Entitlement',
|
|
84
|
-
icon: _jsx(UserIcon, {}, void 0),
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.SUPPORT,
|
|
88
|
-
title: 'Support',
|
|
89
|
-
icon: _jsx(QuestionCircleIcon, {}, void 0),
|
|
90
|
-
},
|
|
91
|
-
];
|
|
92
|
-
return (_jsxs("div", Object.assign({ className: "data-space-viewer" }, { children: [_jsxs("div", Object.assign({ className: "data-space-viewer__header" }, { children: [_jsx("div", Object.assign({ className: "data-space-viewer__path" }, { children: dataSpace.path }), void 0), _jsxs("div", Object.assign({ className: "data-space-viewer__gav" }, { children: [_jsx("div", Object.assign({ className: "data-space-viewer__gav__group-id" }, { children: dataSpace.groupId }), void 0), _jsx("div", Object.assign({ className: "data-space-viewer__gav__separator" }, { children: ":" }), void 0), _jsx("div", Object.assign({ className: "data-space-viewer__gav__artifact-id" }, { children: dataSpace.artifactId }), void 0), _jsx("div", Object.assign({ className: "data-space-viewer__gav__separator" }, { children: ":" }), void 0), _jsx("div", Object.assign({ className: "data-space-viewer__gav__version-id" }, { children: dataSpace.versionId }), void 0)] }), void 0), _jsx("div", Object.assign({ className: "data-space-viewer__description" }, { children: dataSpace.description ? (dataSpace.description) : (_jsx("div", Object.assign({ className: "data-space-viewer__description--empty" }, { children: "No description" }), void 0)) }), void 0)] }), void 0), _jsx("div", Object.assign({ className: "data-space-viewer__content" }, { children: _jsxs("div", Object.assign({ className: "data-space-viewer__body" }, { children: [_jsx("div", Object.assign({ className: "data-space-viewer__activity-bar" }, { children: _jsx("div", Object.assign({ className: "data-space-viewer__activity-bar__items" }, { children: activities.map((activity) => (_jsx("button", Object.assign({ className: clsx('data-space-viewer__activity-bar__item', {
|
|
93
|
-
'data-space-viewer__activity-bar__item--active': dataSpaceEditorState.currentActivity === activity.mode,
|
|
94
|
-
}), onClick: changeActivity(activity.mode), tabIndex: -1, title: activity.title }, { children: activity.icon }), activity.mode))) }), void 0) }), void 0), _jsxs("div", Object.assign({ className: "data-space-viewer__main-panel" }, { children: [dataSpaceEditorState.currentActivity ===
|
|
95
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE.MODELS && (_jsx(DataSpaceModelsOverview, { dataSpaceEditorState: dataSpaceEditorState }, void 0)), dataSpaceEditorState.currentActivity ===
|
|
96
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE.ENTITLEMENT && (_jsx(BlankPanelContent, { children: "(WIP)" }, void 0))] }), void 0)] }), void 0) }), void 0)] }), void 0));
|
|
97
|
-
});
|
|
98
|
-
//# sourceMappingURL=DataSpaceEditor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceEditor.js","sourceRoot":"","sources":["../../../src/components/studio/DataSpaceEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,IAAI,EACJ,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,oBAAoB,EACpB,+BAA+B,GAChC,MAAM,0CAA0C,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAQtE,MAAM,sBAAsB,GAAG,QAAQ,CACrC,CACE,KAGC,EACD,GAA8B,EAC9B,EAAE;IACF,MAAM,EAAE,oBAAoB,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAChD,MAAM,gBAAgB,GACpB,GAAoD,CAAC;IAEvD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,iBAAiB,CAAiB;QAC1D,WAAW,EAAE,UAAU;QACvB,WAAW,EAAE,EAAE;QACf,SAAS,EAAE,gBAAgB;KAC5B,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,gBAAgB,CAAC,OAAO,EAAE;YAC5B,MAAM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yBAAyB,iBACtC,4BAAK,SAAS,EAAC,iCAAiC,gBAC9C,4BAAK,SAAS,EAAC,wCAAwC,gBACpD,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAC5B,+BAEE,SAAS,EAAE,IAAI,CAAC,uCAAuC,EAAE;wCACvD,+CAA+C,EAC7C,oBAAoB,CAAC,eAAe,KAAK,QAAQ,CAAC,IAAI;qCACzD,CAAC,EACF,OAAO,EAAE,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,EACtC,QAAQ,EAAE,CAAC,CAAC,EACZ,KAAK,EAAE,QAAQ,CAAC,KAAK,gBAEpB,QAAQ,CAAC,IAAI,KATT,QAAQ,CAAC,IAAI,CAUX,CACV,CAAC,YACE,YACF,EACN,6BAAK,SAAS,EAAC,+BAA+B,iBAC3C,oBAAoB,CAAC,eAAe;oCACnC,+BAA+B,CAAC,MAAM,IAAI,CAC1C,KAAC,uBAAuB,IACtB,oBAAoB,EAAE,oBAAoB,WAC1C,CACH,EAsBA,oBAAoB,CAAC,eAAe;oCACnC,+BAA+B,CAAC,WAAW,IAAI,CAC/C,KAAC,iBAAiB,gCAA0B,CAC7C,aAcG,aACF,YACF,aACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
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 { EditorStore } from '@finos/legend-studio';
|
|
17
|
-
import { ElementEditorState } from '@finos/legend-studio';
|
|
18
|
-
import type { PackageableElement } from '@finos/legend-graph';
|
|
19
|
-
import { DataSpace } from '../../models/metamodels/pure/model/packageableElements/dataSpace/DataSpace';
|
|
20
|
-
import type { DiagramRenderer } from '@finos/legend-extension-dsl-diagram';
|
|
21
|
-
import { Diagram } from '@finos/legend-extension-dsl-diagram';
|
|
22
|
-
export declare enum DATA_SPACE_VIEWER_ACTIVITY_MODE {
|
|
23
|
-
MODELS = "MODELS",
|
|
24
|
-
EXECUTION = "EXECUTION",
|
|
25
|
-
ENTITLEMENT = "ENTITLEMENT",
|
|
26
|
-
SUPPORT = "SUPPORT"
|
|
27
|
-
}
|
|
28
|
-
export declare class DataSpaceEditorState extends ElementEditorState {
|
|
29
|
-
_renderer?: DiagramRenderer | undefined;
|
|
30
|
-
currentDiagram?: Diagram | undefined;
|
|
31
|
-
currentActivity: DATA_SPACE_VIEWER_ACTIVITY_MODE;
|
|
32
|
-
diagrams: Diagram[];
|
|
33
|
-
constructor(editorStore: EditorStore, element: PackageableElement);
|
|
34
|
-
get dataSpace(): DataSpace;
|
|
35
|
-
get renderer(): DiagramRenderer;
|
|
36
|
-
get isDiagramRendererInitialized(): boolean;
|
|
37
|
-
setRenderer(val: DiagramRenderer): void;
|
|
38
|
-
setCurrentDiagram(val: Diagram): void;
|
|
39
|
-
setCurrentActivity(val: DATA_SPACE_VIEWER_ACTIVITY_MODE): void;
|
|
40
|
-
reprocess(newElement: PackageableElement, editorStore: EditorStore): ElementEditorState;
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=DataSpaceEditorState.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpaceEditorState.d.ts","sourceRoot":"","sources":["../../../src/stores/studio/DataSpaceEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,4EAA4E,CAAC;AACvG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAE9D,oBAAY,+BAA+B;IACzC,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;CACpB;AAED,qBAAa,oBAAqB,SAAQ,kBAAkB;IAC1D,SAAS,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;IACxC,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACrC,eAAe,kCAA0C;IACzD,QAAQ,EAAE,OAAO,EAAE,CAAM;gBAEb,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB;IA4BjE,IAAI,SAAS,IAAI,SAAS,CAMzB;IAED,IAAI,QAAQ,IAAI,eAAe,CAK9B;IAED,IAAI,4BAA4B,IAAI,OAAO,CAE1C;IAED,WAAW,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;IAIvC,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAIrC,kBAAkB,CAAC,GAAG,EAAE,+BAA+B,GAAG,IAAI;IAI9D,SAAS,CACP,UAAU,EAAE,kBAAkB,EAC9B,WAAW,EAAE,WAAW,GACvB,kBAAkB;CAOtB"}
|