@finos/legend-extension-dsl-data-space-studio 0.1.359 → 0.1.360
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/lib/components/DataSpaceEditor.d.ts.map +1 -1
- package/lib/components/DataSpaceEditor.js +4 -0
- package/lib/components/DataSpaceEditor.js.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.d.ts.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.js +3 -0
- package/lib/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.js.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceInfoTab.d.ts +19 -0
- package/lib/components/DataSpaceGeneralEditor/DataSpaceInfoTab.d.ts.map +1 -0
- package/lib/components/DataSpaceGeneralEditor/DataSpaceInfoTab.js +28 -0
- package/lib/components/DataSpaceGeneralEditor/DataSpaceInfoTab.js.map +1 -0
- package/lib/components/DataSpaceGeneralEditor/DataSpaceRelatedDataSpacesSection.d.ts +19 -0
- package/lib/components/DataSpaceGeneralEditor/DataSpaceRelatedDataSpacesSection.d.ts.map +1 -0
- package/lib/components/DataSpaceGeneralEditor/DataSpaceRelatedDataSpacesSection.js +48 -0
- package/lib/components/DataSpaceGeneralEditor/DataSpaceRelatedDataSpacesSection.js.map +1 -0
- package/lib/components/DataSpaceGeneralEditor/DataSpaceSidebar.d.ts.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceSidebar.js +2 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceSidebar.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/DataSpaceEditorState.d.ts +36 -3
- package/lib/stores/DataSpaceEditorState.d.ts.map +1 -1
- package/lib/stores/DataSpaceEditorState.js +178 -5
- package/lib/stores/DataSpaceEditorState.js.map +1 -1
- package/lib/stores/DataSpacePreviewState.d.ts.map +1 -1
- package/lib/stores/DataSpacePreviewState.js +11 -2
- package/lib/stores/DataSpacePreviewState.js.map +1 -1
- package/package.json +8 -8
- package/src/components/DataSpaceEditor.tsx +7 -0
- package/src/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.tsx +3 -0
- package/src/components/DataSpaceGeneralEditor/DataSpaceInfoTab.tsx +67 -0
- package/src/components/DataSpaceGeneralEditor/DataSpaceRelatedDataSpacesSection.tsx +101 -0
- package/src/components/DataSpaceGeneralEditor/DataSpaceSidebar.tsx +8 -1
- package/src/stores/DataSpaceEditorState.ts +321 -2
- package/src/stores/DataSpacePreviewState.ts +19 -0
- package/tsconfig.json +2 -0
|
@@ -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 { EditorExtensionState, queryClass, } from '@finos/legend-application-studio';
|
|
16
|
+
import { EditorExtensionState, queryClass, EXTERNAL_APPLICATION_NAVIGATION__generateMarketplaceDataSpaceViewUrl, } from '@finos/legend-application-studio';
|
|
17
17
|
import { DataSpaceViewerState, EXTERNAL_APPLICATION_NAVIGATION__generateServiceQueryCreatorUrl, } from '@finos/legend-extension-dsl-data-space/application';
|
|
18
18
|
import { DSL_DataSpace_getGraphManagerExtension, } from '@finos/legend-extension-dsl-data-space/graph';
|
|
19
19
|
import { InMemoryGraphData } from '@finos/legend-graph';
|
|
@@ -78,7 +78,7 @@ export class DataSpacePreviewState extends EditorExtensionState {
|
|
|
78
78
|
const analysisResult = (yield DSL_DataSpace_getGraphManagerExtension(this.editorStore.graphManagerState.graphManager).analyzeDataSpace(dataSpace.path, async () => this.editorStore.graphManagerState.graph.allOwnElements
|
|
79
79
|
.map((element) => this.editorStore.graphManagerState.graphManager.elementToEntity(element))
|
|
80
80
|
.concat(this.editorStore.graphManagerState.graph.dependencyManager.allOwnElements.map((element) => this.editorStore.graphManagerState.graphManager.elementToEntity(element))), undefined, this.loadDataSpaceState));
|
|
81
|
-
this.dataSpaceViewerState = new DataSpaceViewerState(this.editorStore.applicationStore, this.editorStore.graphManagerState, groupId, artifactId, versionId, analysisResult, {
|
|
81
|
+
this.dataSpaceViewerState = new DataSpaceViewerState(this.editorStore.applicationStore, this.editorStore.graphManagerState, groupId, artifactId, versionId, analysisResult, this.editorStore.depotServerClient, {
|
|
82
82
|
retrieveGraphData: () => new InMemoryGraphData(this.editorStore.graphManagerState.graph),
|
|
83
83
|
queryDataSpace: () => {
|
|
84
84
|
this.editorStore.applicationStore.notificationService.notifyWarning('This feature is not supported in preview mode');
|
|
@@ -89,6 +89,15 @@ export class DataSpacePreviewState extends EditorExtensionState {
|
|
|
89
89
|
viewSDLCProject: async () => {
|
|
90
90
|
this.editorStore.applicationStore.notificationService.notifyWarning('This feature is not supported in preview mode');
|
|
91
91
|
},
|
|
92
|
+
viewDataSpace: (gavPath) => {
|
|
93
|
+
if (this.editorStore.applicationStore.config.marketplaceApplicationUrl) {
|
|
94
|
+
this.editorStore.applicationStore.navigationService.navigator.visitAddress(EXTERNAL_APPLICATION_NAVIGATION__generateMarketplaceDataSpaceViewUrl(this.editorStore.applicationStore.config
|
|
95
|
+
.marketplaceApplicationUrl, gavPath));
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
this.editorStore.applicationStore.notificationService.notifyWarning('Marketplace application URL is not configured');
|
|
99
|
+
}
|
|
100
|
+
},
|
|
92
101
|
queryClass: (_class) => {
|
|
93
102
|
queryClass(_class, this.editorStore).catch(this.editorStore.applicationStore.alertUnhandledError);
|
|
94
103
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSpacePreviewState.js","sourceRoot":"","sources":["../../src/stores/DataSpacePreviewState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,oBAAoB,EACpB,UAAU,
|
|
1
|
+
{"version":3,"file":"DataSpacePreviewState.js","sourceRoot":"","sources":["../../src/stores/DataSpacePreviewState.ts"],"names":[],"mappings":"AAAA;;;;;;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kBAAkB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAChD,CAAC;IACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-extension-dsl-data-space-studio",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.360",
|
|
4
4
|
"description": "Legend extension for Data Space DSL - Studio",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"test:watch": "jest --watch"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@finos/legend-application": "16.0.
|
|
46
|
-
"@finos/legend-application-studio": "28.21.
|
|
47
|
-
"@finos/legend-art": "7.1.
|
|
48
|
-
"@finos/legend-code-editor": "2.0.
|
|
49
|
-
"@finos/legend-extension-dsl-data-space": "10.4.
|
|
50
|
-
"@finos/legend-graph": "32.7.
|
|
51
|
-
"@finos/legend-query-builder": "4.19.
|
|
45
|
+
"@finos/legend-application": "16.0.128",
|
|
46
|
+
"@finos/legend-application-studio": "28.21.51",
|
|
47
|
+
"@finos/legend-art": "7.1.168",
|
|
48
|
+
"@finos/legend-code-editor": "2.0.210",
|
|
49
|
+
"@finos/legend-extension-dsl-data-space": "10.4.263",
|
|
50
|
+
"@finos/legend-graph": "32.7.6",
|
|
51
|
+
"@finos/legend-query-builder": "4.19.19",
|
|
52
52
|
"@finos/legend-server-depot": "6.1.24",
|
|
53
53
|
"@finos/legend-server-sdlc": "5.5.2",
|
|
54
54
|
"@finos/legend-shared": "11.0.32",
|
|
@@ -21,6 +21,7 @@ import { DataSpaceEditorState } from '../stores/DataSpaceEditorState.js';
|
|
|
21
21
|
import { DataSpaceGeneralEditor } from './DataSpaceGeneralEditor/DataSpaceGeneralEditor.js';
|
|
22
22
|
import { DataSpacePreviewState } from '../stores/DataSpacePreviewState.js';
|
|
23
23
|
import { flowResult } from 'mobx';
|
|
24
|
+
import { useEffect } from 'react';
|
|
24
25
|
import { isStubbed_PackageableElement } from '@finos/legend-graph';
|
|
25
26
|
import { resolveExecutionContextMapping } from '@finos/legend-extension-dsl-data-space/graph';
|
|
26
27
|
import { DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY } from '../__lib__/DSL_DataSpace_LegendStudioDocumentation.js';
|
|
@@ -70,6 +71,12 @@ export const DataSpaceEditor = observer(() => {
|
|
|
70
71
|
DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY.DATA_SPACE_EDITOR,
|
|
71
72
|
);
|
|
72
73
|
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
flowResult(dataSpaceState.loadRelatedDataSpaces()).catch(
|
|
76
|
+
editorStore.applicationStore.alertUnhandledError,
|
|
77
|
+
);
|
|
78
|
+
}, [dataSpaceState, editorStore]);
|
|
79
|
+
|
|
73
80
|
return (
|
|
74
81
|
<Panel className="dataSpace-editor">
|
|
75
82
|
<PanelHeader
|
|
@@ -25,6 +25,7 @@ import { DataSpaceSidebar } from './DataSpaceSidebar.js';
|
|
|
25
25
|
import { DataSpaceHomeTab } from './DataSpaceHomeTab.js';
|
|
26
26
|
import { DataSpaceExecutionContextEditor } from '../DataSpaceExecutionContextEditor.js';
|
|
27
27
|
import { DataspaceExecutablesSection } from './DataSpaceExecutablesSection.js';
|
|
28
|
+
import { DataSpaceInfoTab } from './DataSpaceInfoTab.js';
|
|
28
29
|
|
|
29
30
|
export const DataSpaceGeneralEditor = observer(() => {
|
|
30
31
|
const editorStore = useEditorStore();
|
|
@@ -37,6 +38,8 @@ export const DataSpaceGeneralEditor = observer(() => {
|
|
|
37
38
|
return <DataSpaceExecutionContextEditor />;
|
|
38
39
|
case DATA_SPACE_TAB.EXECUTABLES:
|
|
39
40
|
return <DataspaceExecutablesSection />;
|
|
41
|
+
case DATA_SPACE_TAB.INFO:
|
|
42
|
+
return <DataSpaceInfoTab />;
|
|
40
43
|
case DATA_SPACE_TAB.HOME:
|
|
41
44
|
default:
|
|
42
45
|
return <DataSpaceHomeTab />;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026-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 { useEditorStore } from '@finos/legend-application-studio';
|
|
18
|
+
import {
|
|
19
|
+
PanelForm,
|
|
20
|
+
PanelFormBooleanField,
|
|
21
|
+
PanelFormTextField,
|
|
22
|
+
} from '@finos/legend-art';
|
|
23
|
+
import { observer } from 'mobx-react-lite';
|
|
24
|
+
import { DataSpaceEditorState } from '../../stores/DataSpaceEditorState.js';
|
|
25
|
+
import { DataSpaceRelatedDataSpacesSection } from './DataSpaceRelatedDataSpacesSection.js';
|
|
26
|
+
|
|
27
|
+
export const DataSpaceInfoTab = observer(() => {
|
|
28
|
+
const editorStore = useEditorStore();
|
|
29
|
+
const dataSpaceState =
|
|
30
|
+
editorStore.tabManagerState.getCurrentEditorState(DataSpaceEditorState);
|
|
31
|
+
const isReadOnly = dataSpaceState.isReadOnly;
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<PanelForm>
|
|
35
|
+
<PanelFormBooleanField
|
|
36
|
+
name="Verified"
|
|
37
|
+
prompt="Marks this Data Space as verified"
|
|
38
|
+
value={dataSpaceState.isVerified}
|
|
39
|
+
isReadOnly={isReadOnly}
|
|
40
|
+
update={(value): void => dataSpaceState.toggleVerified(Boolean(value))}
|
|
41
|
+
/>
|
|
42
|
+
<PanelFormBooleanField
|
|
43
|
+
name="In Development"
|
|
44
|
+
prompt="Marks this Data Space as still in development"
|
|
45
|
+
value={dataSpaceState.isInDevelopment}
|
|
46
|
+
isReadOnly={isReadOnly}
|
|
47
|
+
update={(value): void =>
|
|
48
|
+
dataSpaceState.toggleInDevelopment(Boolean(value))
|
|
49
|
+
}
|
|
50
|
+
/>
|
|
51
|
+
<PanelFormBooleanField
|
|
52
|
+
name="External"
|
|
53
|
+
prompt="Marks this Data Space as externally sourced"
|
|
54
|
+
value={dataSpaceState.isExternal}
|
|
55
|
+
isReadOnly={isReadOnly}
|
|
56
|
+
update={(value): void => dataSpaceState.toggleExternal(Boolean(value))}
|
|
57
|
+
/>
|
|
58
|
+
<PanelFormTextField
|
|
59
|
+
name="Deprecation Notice"
|
|
60
|
+
value={dataSpaceState.deprecationNotice}
|
|
61
|
+
isReadOnly={isReadOnly}
|
|
62
|
+
update={(value): void => dataSpaceState.setDeprecationNotice(value)}
|
|
63
|
+
/>
|
|
64
|
+
<DataSpaceRelatedDataSpacesSection />
|
|
65
|
+
</PanelForm>
|
|
66
|
+
);
|
|
67
|
+
});
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026-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 { useEditorStore } from '@finos/legend-application-studio';
|
|
18
|
+
import { ListEditor, CustomSelectorInput } from '@finos/legend-art';
|
|
19
|
+
import { type ResolvedDataSpaceEntityWithOrigin } from '@finos/legend-extension-dsl-data-space/application';
|
|
20
|
+
import { observer } from 'mobx-react-lite';
|
|
21
|
+
import {
|
|
22
|
+
DataSpaceEditorState,
|
|
23
|
+
type RelatedDataSpaceRow,
|
|
24
|
+
} from '../../stores/DataSpaceEditorState.js';
|
|
25
|
+
|
|
26
|
+
export const DataSpaceRelatedDataSpacesSection = observer(() => {
|
|
27
|
+
const editorStore = useEditorStore();
|
|
28
|
+
const applicationStore = editorStore.applicationStore;
|
|
29
|
+
const darkMode =
|
|
30
|
+
!applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled;
|
|
31
|
+
|
|
32
|
+
const dataSpaceState =
|
|
33
|
+
editorStore.tabManagerState.getCurrentEditorState(DataSpaceEditorState);
|
|
34
|
+
|
|
35
|
+
const handleAddRelatedDataSpace = (option: {
|
|
36
|
+
label: string;
|
|
37
|
+
value: ResolvedDataSpaceEntityWithOrigin;
|
|
38
|
+
}): void => {
|
|
39
|
+
dataSpaceState.addRelatedDataSpace(option.value);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const handleRemoveRelatedDataSpace = (row: RelatedDataSpaceRow): void => {
|
|
43
|
+
dataSpaceState.removeRelatedDataSpaceRow(row);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const RelatedDataSpaceComponent = observer(
|
|
47
|
+
(props: { item: RelatedDataSpaceRow }): React.ReactElement => {
|
|
48
|
+
const { item } = props;
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<div className="panel__content__form__section__list__item__content">
|
|
52
|
+
<div className="panel__content__form__section__list__item__content__label">
|
|
53
|
+
{item.label}
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
},
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
const NewRelatedDataSpaceComponent = observer(
|
|
61
|
+
(props: { onFinishEditing: () => void }) => {
|
|
62
|
+
const { onFinishEditing } = props;
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<div className="panel__content__form__section__list__new-item__input">
|
|
66
|
+
<CustomSelectorInput
|
|
67
|
+
options={dataSpaceState.getRelatedDataSpaceOptions()}
|
|
68
|
+
onChange={(option: {
|
|
69
|
+
label: string;
|
|
70
|
+
value: ResolvedDataSpaceEntityWithOrigin;
|
|
71
|
+
}) => {
|
|
72
|
+
onFinishEditing();
|
|
73
|
+
handleAddRelatedDataSpace(option);
|
|
74
|
+
}}
|
|
75
|
+
placeholder={
|
|
76
|
+
dataSpaceState.loadRelatedDataSpacesState.isInProgress
|
|
77
|
+
? 'Loading Data Spaces...'
|
|
78
|
+
: 'Select a Data Space to add...'
|
|
79
|
+
}
|
|
80
|
+
isLoading={dataSpaceState.loadRelatedDataSpacesState.isInProgress}
|
|
81
|
+
darkMode={darkMode}
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
);
|
|
85
|
+
},
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
return (
|
|
89
|
+
<ListEditor
|
|
90
|
+
title="Related Data Spaces"
|
|
91
|
+
prompt="Add Data Spaces to display under Related Data Spaces."
|
|
92
|
+
items={dataSpaceState.relatedDataSpaceRows}
|
|
93
|
+
keySelector={(row: RelatedDataSpaceRow) => row.id}
|
|
94
|
+
ItemComponent={RelatedDataSpaceComponent}
|
|
95
|
+
NewItemComponent={NewRelatedDataSpaceComponent}
|
|
96
|
+
handleRemoveItem={handleRemoveRelatedDataSpace}
|
|
97
|
+
isReadOnly={dataSpaceState.isReadOnly}
|
|
98
|
+
emptyMessage="No related Data Spaces specified"
|
|
99
|
+
/>
|
|
100
|
+
);
|
|
101
|
+
});
|
|
@@ -15,13 +15,20 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { observer } from 'mobx-react-lite';
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
clsx,
|
|
20
|
+
HomeIcon,
|
|
21
|
+
PlayIcon,
|
|
22
|
+
QuestionCircleIcon,
|
|
23
|
+
SitemapIcon,
|
|
24
|
+
} from '@finos/legend-art';
|
|
19
25
|
import { DATA_SPACE_TAB } from '../../stores/DataSpaceEditorState.js';
|
|
20
26
|
|
|
21
27
|
const SIDEBAR_TABS = [
|
|
22
28
|
{ tab: DATA_SPACE_TAB.HOME, icon: <HomeIcon /> },
|
|
23
29
|
{ tab: DATA_SPACE_TAB.EXECUTION_CONTEXTS, icon: <SitemapIcon /> },
|
|
24
30
|
{ tab: DATA_SPACE_TAB.EXECUTABLES, icon: <PlayIcon /> },
|
|
31
|
+
{ tab: DATA_SPACE_TAB.INFO, icon: <QuestionCircleIcon /> },
|
|
25
32
|
];
|
|
26
33
|
|
|
27
34
|
export const DataSpaceSidebar = observer(
|