@finos/legend-extension-dsl-data-space 9.1.3 → 9.1.5

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.
Files changed (128) hide show
  1. package/lib/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.d.ts +1 -1
  2. package/lib/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.d.ts.map +1 -1
  3. package/lib/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.js +15 -2
  4. package/lib/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.js.map +1 -1
  5. package/lib/components/DataSpaceDiagramViewer.d.ts +23 -0
  6. package/lib/components/DataSpaceDiagramViewer.d.ts.map +1 -0
  7. package/lib/components/DataSpaceDiagramViewer.js +77 -0
  8. package/lib/components/DataSpaceDiagramViewer.js.map +1 -0
  9. package/lib/components/DataSpaceExecutionContextViewer.d.ts +23 -0
  10. package/lib/components/DataSpaceExecutionContextViewer.d.ts.map +1 -0
  11. package/lib/components/DataSpaceExecutionContextViewer.js +58 -0
  12. package/lib/components/DataSpaceExecutionContextViewer.js.map +1 -0
  13. package/lib/components/DataSpaceInfoPanel.d.ts +23 -0
  14. package/lib/components/DataSpaceInfoPanel.d.ts.map +1 -0
  15. package/lib/components/DataSpaceInfoPanel.js +38 -0
  16. package/lib/components/DataSpaceInfoPanel.js.map +1 -0
  17. package/lib/components/DataSpaceModelsDocumentation.d.ts +23 -0
  18. package/lib/components/DataSpaceModelsDocumentation.d.ts.map +1 -0
  19. package/lib/components/DataSpaceModelsDocumentation.js +60 -0
  20. package/lib/components/DataSpaceModelsDocumentation.js.map +1 -0
  21. package/lib/components/{studio/DataSpacePreview.d.ts → DataSpaceQuickStart.d.ts} +2 -5
  22. package/lib/components/DataSpaceQuickStart.d.ts.map +1 -0
  23. package/lib/components/DataSpaceQuickStart.js +17 -0
  24. package/lib/components/DataSpaceQuickStart.js.map +1 -0
  25. package/lib/components/DataSpaceSupportPanel.d.ts +23 -0
  26. package/lib/components/DataSpaceSupportPanel.d.ts.map +1 -0
  27. package/lib/components/DataSpaceSupportPanel.js +40 -0
  28. package/lib/components/DataSpaceSupportPanel.js.map +1 -0
  29. package/lib/components/DataSpaceViewer.d.ts.map +1 -1
  30. package/lib/components/DataSpaceViewer.js +29 -278
  31. package/lib/components/DataSpaceViewer.js.map +1 -1
  32. package/lib/components/DataSpaceViewerActivityBar.d.ts +23 -0
  33. package/lib/components/DataSpaceViewerActivityBar.d.ts.map +1 -0
  34. package/lib/components/DataSpaceViewerActivityBar.js +105 -0
  35. package/lib/components/DataSpaceViewerActivityBar.js.map +1 -0
  36. package/lib/components/DataSpaceWiki.d.ts +23 -0
  37. package/lib/components/DataSpaceWiki.d.ts.map +1 -0
  38. package/lib/components/DataSpaceWiki.js +36 -0
  39. package/lib/components/DataSpaceWiki.js.map +1 -0
  40. package/lib/components/query/DataSpaceAdvancedSearchModal.js +1 -1
  41. package/lib/components/query/DataSpaceAdvancedSearchModal.js.map +1 -1
  42. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts +1 -2
  43. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts.map +1 -1
  44. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js +0 -13
  45. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js.map +1 -1
  46. package/lib/components/studio/DataSpacePreviewAction.js +1 -1
  47. package/lib/components/studio/DataSpacePreviewAction.js.map +1 -1
  48. package/lib/graph/DSL_DataSpace_HashUtils.d.ts +3 -2
  49. package/lib/graph/DSL_DataSpace_HashUtils.d.ts.map +1 -1
  50. package/lib/graph/DSL_DataSpace_HashUtils.js +3 -2
  51. package/lib/graph/DSL_DataSpace_HashUtils.js.map +1 -1
  52. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.d.ts +23 -0
  53. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.d.ts.map +1 -1
  54. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js +50 -0
  55. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js.map +1 -1
  56. package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts +36 -5
  57. package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts.map +1 -1
  58. package/lib/graphManager/action/analytics/DataSpaceAnalysis.js +35 -8
  59. package/lib/graphManager/action/analytics/DataSpaceAnalysis.js.map +1 -1
  60. package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.d.ts.map +1 -1
  61. package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js +70 -11
  62. package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js.map +1 -1
  63. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.d.ts.map +1 -1
  64. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js +48 -8
  65. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js.map +1 -1
  66. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_SystemModels.json +7 -0
  67. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts +39 -0
  68. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts.map +1 -1
  69. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js +92 -3
  70. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js.map +1 -1
  71. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.d.ts +23 -0
  72. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.d.ts.map +1 -1
  73. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js +50 -0
  74. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js.map +1 -1
  75. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.d.ts +0 -1
  76. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.d.ts.map +1 -1
  77. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js +33 -5
  78. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js.map +1 -1
  79. package/lib/index.css +2 -2
  80. package/lib/index.css.map +1 -1
  81. package/lib/package.json +9 -5
  82. package/lib/stores/DataSpaceViewerState.d.ts +16 -14
  83. package/lib/stores/DataSpaceViewerState.d.ts.map +1 -1
  84. package/lib/stores/DataSpaceViewerState.js +19 -12
  85. package/lib/stores/DataSpaceViewerState.js.map +1 -1
  86. package/lib/stores/studio/DataSpacePreviewState.d.ts.map +1 -1
  87. package/lib/stores/studio/DataSpacePreviewState.js +0 -3
  88. package/lib/stores/studio/DataSpacePreviewState.js.map +1 -1
  89. package/package.json +20 -16
  90. package/src/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.ts +15 -2
  91. package/src/components/DataSpaceDiagramViewer.tsx +191 -0
  92. package/src/components/DataSpaceExecutionContextViewer.tsx +173 -0
  93. package/src/components/DataSpaceInfoPanel.tsx +170 -0
  94. package/src/components/DataSpaceModelsDocumentation.tsx +92 -0
  95. package/src/components/DataSpaceQuickStart.tsx +15 -0
  96. package/src/components/DataSpaceSupportPanel.tsx +80 -0
  97. package/src/components/DataSpaceViewer.tsx +73 -1063
  98. package/src/components/DataSpaceViewerActivityBar.tsx +215 -0
  99. package/src/components/DataSpaceWiki.tsx +76 -0
  100. package/src/components/query/DataSpaceAdvancedSearchModal.tsx +1 -1
  101. package/src/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.tsx +0 -15
  102. package/src/components/studio/DataSpacePreviewAction.tsx +1 -1
  103. package/src/graph/DSL_DataSpace_HashUtils.ts +3 -2
  104. package/src/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.ts +60 -0
  105. package/src/graphManager/action/analytics/DataSpaceAnalysis.ts +46 -15
  106. package/src/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.ts +99 -14
  107. package/src/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.ts +65 -15
  108. package/src/graphManager/protocol/pure/v1/V1_DSL_DataSpace_SystemModels.json +7 -0
  109. package/src/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.ts +140 -2
  110. package/src/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.ts +60 -0
  111. package/src/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.ts +51 -7
  112. package/src/stores/DataSpaceViewerState.ts +24 -20
  113. package/src/stores/studio/DataSpacePreviewState.ts +0 -5
  114. package/tsconfig.json +8 -3
  115. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.d.ts +0 -28
  116. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.d.ts.map +0 -1
  117. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.js +0 -30
  118. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.js.map +0 -1
  119. package/lib/components/studio/DataSpacePreview.d.ts.map +0 -1
  120. package/lib/components/studio/DataSpacePreview.js +0 -52
  121. package/lib/components/studio/DataSpacePreview.js.map +0 -1
  122. package/lib/stores/studio/DataSpacePreviewStore.d.ts +0 -34
  123. package/lib/stores/studio/DataSpacePreviewStore.d.ts.map +0 -1
  124. package/lib/stores/studio/DataSpacePreviewStore.js +0 -98
  125. package/lib/stores/studio/DataSpacePreviewStore.js.map +0 -1
  126. package/src/application/studio/DSL_DataSpace_LegendStudioNavigation.ts +0 -53
  127. package/src/components/studio/DataSpacePreview.tsx +0 -129
  128. package/src/stores/studio/DataSpacePreviewStore.ts +0 -172
@@ -0,0 +1,215 @@
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 { observer } from 'mobx-react-lite';
18
+ import {
19
+ ShapesIcon,
20
+ PlayIcon,
21
+ QuestionCircleIcon,
22
+ clsx,
23
+ InfoCircleIcon,
24
+ DocumentationIcon,
25
+ LaunchIcon,
26
+ DataAccessIcon,
27
+ GovernanceIcon,
28
+ CostCircleIcon,
29
+ DatasetIcon,
30
+ AvailabilityIcon,
31
+ HomeIcon,
32
+ MenuContent,
33
+ MenuContentItem,
34
+ MenuIcon,
35
+ DropdownMenu,
36
+ } from '@finos/legend-art';
37
+ import {
38
+ type DataSpaceViewerState,
39
+ DATA_SPACE_VIEWER_ACTIVITY_MODE,
40
+ } from '../stores/DataSpaceViewerState.js';
41
+
42
+ const ActivityBarMenu = observer(
43
+ (props: { dataSpaceViewerState: DataSpaceViewerState }) => {
44
+ const { dataSpaceViewerState } = props;
45
+
46
+ // actions
47
+ const toggleExpandedMode = (): void =>
48
+ dataSpaceViewerState.enableExpandedMode(
49
+ !dataSpaceViewerState.isExpandedModeEnabled,
50
+ );
51
+
52
+ return (
53
+ <>
54
+ <div className="data-space__viewer__activity-bar__menu">
55
+ <DropdownMenu
56
+ className="data-space__viewer__activity-bar__menu-item"
57
+ menuProps={{
58
+ anchorOrigin: { vertical: 'top', horizontal: 'right' },
59
+ transformOrigin: { vertical: 'top', horizontal: 'left' },
60
+ elevation: 7,
61
+ }}
62
+ content={
63
+ <MenuContent>
64
+ <MenuContentItem onClick={toggleExpandedMode}>
65
+ {dataSpaceViewerState.isExpandedModeEnabled
66
+ ? 'Disable Expanded Mode'
67
+ : 'Enable Expanded Mode'}{' '}
68
+ </MenuContentItem>
69
+ </MenuContent>
70
+ }
71
+ >
72
+ <MenuIcon />
73
+ </DropdownMenu>
74
+ </div>
75
+ </>
76
+ );
77
+ },
78
+ );
79
+
80
+ interface DataSpaceViewerActivityConfig {
81
+ mode: DATA_SPACE_VIEWER_ACTIVITY_MODE;
82
+ title: string;
83
+ icon: React.ReactElement;
84
+ }
85
+
86
+ export const DataSpaceViewerActivityBar = observer(
87
+ (props: { dataSpaceViewerState: DataSpaceViewerState }) => {
88
+ const { dataSpaceViewerState } = props;
89
+ const changeActivity =
90
+ (activity: DATA_SPACE_VIEWER_ACTIVITY_MODE): (() => void) =>
91
+ (): void =>
92
+ dataSpaceViewerState.setCurrentActivity(activity);
93
+
94
+ const wikiActivities: DataSpaceViewerActivityConfig[] = [
95
+ {
96
+ mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.DESCRIPTION,
97
+ title: 'Description',
98
+ icon: (
99
+ <HomeIcon className="data-space__viewer__activity-bar__icon--home" />
100
+ ),
101
+ },
102
+ {
103
+ mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.DIAGRAM_VIEWER,
104
+ title: 'Diagrams',
105
+ icon: <ShapesIcon />,
106
+ },
107
+ {
108
+ mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.MODELS_DOCUMENTATION,
109
+ title: 'Models Documentation',
110
+ icon: <DocumentationIcon />,
111
+ },
112
+ {
113
+ mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.QUICK_START,
114
+ title: 'Quick Start',
115
+ icon: (
116
+ <LaunchIcon className="data-space__viewer__activity-bar__icon--launch" />
117
+ ),
118
+ },
119
+ {
120
+ mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_ACCESS,
121
+ title: 'Data Access',
122
+ icon: (
123
+ <DataAccessIcon className="data-space__viewer__activity-bar__icon--access" />
124
+ ),
125
+ },
126
+ ];
127
+
128
+ const activities: DataSpaceViewerActivityConfig[] = [
129
+ {
130
+ mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.EXECUTION_CONTEXT,
131
+ title: 'Execution Context',
132
+ icon: <PlayIcon />,
133
+ },
134
+ {
135
+ mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_STORES,
136
+ title: 'Data Stores',
137
+ icon: (
138
+ <DatasetIcon className="data-space__viewer__activity-bar__icon--dataset" />
139
+ ),
140
+ },
141
+ {
142
+ mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_AVAILABILITY,
143
+ title: 'Data Availability',
144
+ icon: (
145
+ <AvailabilityIcon className="data-space__viewer__activity-bar__icon--availability" />
146
+ ),
147
+ },
148
+ {
149
+ mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_COST,
150
+ title: 'Data Cost',
151
+ icon: (
152
+ <CostCircleIcon className="data-space__viewer__activity-bar__icon--cost" />
153
+ ),
154
+ },
155
+ {
156
+ mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_GOVERNANCE,
157
+ title: 'Governance',
158
+ icon: (
159
+ <GovernanceIcon className="data-space__viewer__activity-bar__icon--governance" />
160
+ ),
161
+ },
162
+ {
163
+ mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.INFO,
164
+ title: 'Info',
165
+ icon: (
166
+ <InfoCircleIcon className="data-space__viewer__activity-bar__icon--info" />
167
+ ),
168
+ },
169
+ {
170
+ mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.SUPPORT,
171
+ title: 'Support',
172
+ icon: (
173
+ <QuestionCircleIcon className="data-space__viewer__activity-bar__icon--support" />
174
+ ),
175
+ },
176
+ ];
177
+
178
+ return (
179
+ <div className="data-space__viewer__activity-bar">
180
+ <ActivityBarMenu dataSpaceViewerState={dataSpaceViewerState} />
181
+ <div className="data-space__viewer__activity-bar__items">
182
+ {wikiActivities.map((activity) => (
183
+ <button
184
+ key={activity.mode}
185
+ className={clsx('data-space__viewer__activity-bar__item', {
186
+ 'data-space__viewer__activity-bar__item--active':
187
+ dataSpaceViewerState.currentActivity === activity.mode,
188
+ })}
189
+ onClick={changeActivity(activity.mode)}
190
+ tabIndex={-1}
191
+ title={activity.title}
192
+ >
193
+ {activity.icon}
194
+ </button>
195
+ ))}
196
+ <div className="data-space__viewer__activity-bar__divider" />
197
+ {activities.map((activity) => (
198
+ <button
199
+ key={activity.mode}
200
+ className={clsx('data-space__viewer__activity-bar__item', {
201
+ 'data-space__viewer__activity-bar__item--active':
202
+ dataSpaceViewerState.currentActivity === activity.mode,
203
+ })}
204
+ onClick={changeActivity(activity.mode)}
205
+ tabIndex={-1}
206
+ title={activity.title}
207
+ >
208
+ {activity.icon}
209
+ </button>
210
+ ))}
211
+ </div>
212
+ </div>
213
+ );
214
+ },
215
+ );
@@ -0,0 +1,76 @@
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 { MarkdownTextViewer } from '@finos/legend-art';
18
+ import type { DataSpaceViewerState } from '../stores/DataSpaceViewerState.js';
19
+ import { observer } from 'mobx-react-lite';
20
+ import { DataSpaceDiagramViewer } from './DataSpaceDiagramViewer.js';
21
+ import { DataSpaceModelsDocumentation } from './DataSpaceModelsDocumentation.js';
22
+
23
+ const DataSpaceDescription = observer(
24
+ (props: { dataSpaceViewerState: DataSpaceViewerState }) => {
25
+ const { dataSpaceViewerState } = props;
26
+ const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
27
+
28
+ return (
29
+ <div className="data-space__viewer__wiki__section">
30
+ <div className="data-space__viewer__wiki__section__header">
31
+ Description
32
+ </div>
33
+ <div className="data-space__viewer__wiki__section__content">
34
+ <div className="data-space__viewer__description">
35
+ {analysisResult.description !== undefined && (
36
+ <div className="data-space__viewer__description__content">
37
+ <MarkdownTextViewer
38
+ className="data-space__viewer__description__content__markdown-content"
39
+ value={{
40
+ value: analysisResult.description,
41
+ }}
42
+ components={{
43
+ h1: 'h2',
44
+ h2: 'h3',
45
+ h3: 'h4',
46
+ }}
47
+ />
48
+ </div>
49
+ )}
50
+ {analysisResult.description === undefined && (
51
+ <div className="data-space__viewer__description--empty">
52
+ No description
53
+ </div>
54
+ )}
55
+ </div>
56
+ </div>
57
+ </div>
58
+ );
59
+ },
60
+ );
61
+
62
+ export const DataSpaceWiki = observer(
63
+ (props: { dataSpaceViewerState: DataSpaceViewerState }) => {
64
+ const { dataSpaceViewerState } = props;
65
+
66
+ return (
67
+ <div className="data-space__viewer__wiki">
68
+ <DataSpaceDescription dataSpaceViewerState={dataSpaceViewerState} />
69
+ <DataSpaceDiagramViewer dataSpaceViewerState={dataSpaceViewerState} />
70
+ <DataSpaceModelsDocumentation
71
+ dataSpaceViewerState={dataSpaceViewerState}
72
+ />
73
+ </div>
74
+ );
75
+ },
76
+ );
@@ -239,7 +239,7 @@ export const DataSpaceAdvancedSearchModal = observer(
239
239
  <TimesCircleIcon />
240
240
  </div>
241
241
  <div className="data-space-advanced-search__dialog__view--failed__text">
242
- Can&apos;t load data space
242
+ {`Can't load data space`}
243
243
  </div>
244
244
  </div>
245
245
  </BlankPanelContent>
@@ -34,7 +34,6 @@ import {
34
34
  type ExplorerContextMenuItemRendererConfiguration,
35
35
  type EditorExtensionStateCreator,
36
36
  type EditorExtensionComponentRendererConfiguration,
37
- type LegendStudioApplicationPageEntry,
38
37
  } from '@finos/legend-application-studio';
39
38
  import {
40
39
  PackageableElementExplicitReference,
@@ -62,8 +61,6 @@ import {
62
61
  DataSpacePreviewDialog,
63
62
  DataSpacePreviewAction,
64
63
  } from './DataSpacePreviewAction.js';
65
- import { DATA_SPACE_STUDIO_ROUTE_PATTERN } from '../../application/studio/DSL_DataSpace_LegendStudioNavigation.js';
66
- import { DataSpacePreview } from './DataSpacePreview.js';
67
64
 
68
65
  const DATA_SPACE_ELEMENT_TYPE = 'DATA SPACE';
69
66
  const DATA_SPACE_ELEMENT_PROJECT_EXPLORER_DND_TYPE =
@@ -77,18 +74,6 @@ export class DSL_DataSpace_LegendStudioApplicationPlugin
77
74
  super(packageJson.extensions.applicationStudioPlugin, packageJson.version);
78
75
  }
79
76
 
80
- override getExtraApplicationPageEntries(): LegendStudioApplicationPageEntry[] {
81
- return [
82
- // data space preview
83
- {
84
- key: 'data-space-preview',
85
- urlPatterns: [DATA_SPACE_STUDIO_ROUTE_PATTERN.PREVIEW],
86
- renderer: DataSpacePreview,
87
- bypassSDLC: true,
88
- },
89
- ];
90
- }
91
-
92
77
  override getExtraRequiredDocumentationKeys(): string[] {
93
78
  return [
94
79
  DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.CONCEPT_ELEMENT_DATA_SPACE,
@@ -113,7 +113,7 @@ export const DataSpacePreviewDialog = observer(() => {
113
113
  <TimesCircleIcon />
114
114
  </div>
115
115
  <div className="data-space-preview__dialog__content--failed__text">
116
- Can&apos;t load data space
116
+ {`Can't load data space`}
117
117
  </div>
118
118
  </div>
119
119
  </BlankPanelContent>
@@ -17,7 +17,8 @@
17
17
  export enum DATA_SPACE_HASH_STRUCTURE {
18
18
  DATA_SPACE = 'DATA_SPACE',
19
19
  DATA_SPACE_EXECUTION_CONTEXT = 'DATA_SPACE_EXECUTION_CONTEXT',
20
- DATA_SPACE_SAMPLE_TDS_QUERY = 'DATA_SPACE_SAMPLE_TDS_QUERY',
21
- DATA_SPACE_SAMPLE_TDS_QUERY_COLUMN = 'DATA_SPACE_SAMPLE_TDS_QUERY_COLUMN',
20
+ DATA_SPACE_EXECUTABLE = 'DATA_SPACE_EXECUTABLE',
21
+ DATA_SPACE_DIAGRAM = 'DATA_SPACE_DIAGRAM',
22
+ DATA_SPACE_SUPPORT_COMBINED_INFO = 'DATA_SPACE_SUPPORT_COMBINED_INFO',
22
23
  DATA_SPACE_SUPPORT_EMAIL = 'DATA_SPACE_SUPPORT_EMAIL',
23
24
  }
@@ -29,6 +29,8 @@ import { DATA_SPACE_HASH_STRUCTURE } from '../../../../../DSL_DataSpace_HashUtil
29
29
  import type { Diagram } from '@finos/legend-extension-dsl-diagram';
30
30
 
31
31
  export abstract class DataSpaceSupportInfo implements Hashable {
32
+ documentationUrl?: string | undefined;
33
+
32
34
  abstract get hashCode(): string;
33
35
  }
34
36
 
@@ -41,13 +43,36 @@ export class DataSpaceSupportEmail
41
43
  get hashCode(): string {
42
44
  return hashArray([
43
45
  DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_SUPPORT_EMAIL,
46
+ this.documentationUrl ?? '',
44
47
  this.address,
45
48
  ]);
46
49
  }
47
50
  }
48
51
 
52
+ export class DataSpaceSupportCombinedInfo
53
+ extends DataSpaceSupportInfo
54
+ implements Hashable
55
+ {
56
+ emails?: string[] | undefined;
57
+ website?: string | undefined;
58
+ faqUrl?: string | undefined;
59
+ supportUrl?: string | undefined;
60
+
61
+ get hashCode(): string {
62
+ return hashArray([
63
+ DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_SUPPORT_COMBINED_INFO,
64
+ this.documentationUrl ?? '',
65
+ hashArray(this.emails ?? []),
66
+ this.website ?? '',
67
+ this.faqUrl ?? '',
68
+ this.supportUrl ?? '',
69
+ ]);
70
+ }
71
+ }
72
+
49
73
  export class DataSpaceExecutionContext implements Hashable {
50
74
  name!: string;
75
+ title?: string | undefined;
51
76
  description?: string | undefined;
52
77
  mapping!: PackageableElementReference<Mapping>;
53
78
  defaultRuntime!: PackageableElementReference<PackageableRuntime>;
@@ -56,6 +81,7 @@ export class DataSpaceExecutionContext implements Hashable {
56
81
  return hashArray([
57
82
  DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_EXECUTION_CONTEXT,
58
83
  this.name,
84
+ this.title ?? '',
59
85
  this.description ?? '',
60
86
  this.mapping.valueForSerialization ?? '',
61
87
  this.defaultRuntime.valueForSerialization ?? '',
@@ -63,6 +89,36 @@ export class DataSpaceExecutionContext implements Hashable {
63
89
  }
64
90
  }
65
91
 
92
+ export class DataSpaceExecutable implements Hashable {
93
+ title!: string;
94
+ description?: string | undefined;
95
+ executable!: PackageableElementReference<PackageableElement>;
96
+
97
+ get hashCode(): string {
98
+ return hashArray([
99
+ DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_EXECUTABLE,
100
+ this.title,
101
+ this.description ?? '',
102
+ this.executable.valueForSerialization ?? '',
103
+ ]);
104
+ }
105
+ }
106
+
107
+ export class DataSpaceDiagram implements Hashable {
108
+ title!: string;
109
+ description?: string | undefined;
110
+ diagram!: PackageableElementReference<Diagram>;
111
+
112
+ get hashCode(): string {
113
+ return hashArray([
114
+ DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_DIAGRAM,
115
+ this.title,
116
+ this.description ?? '',
117
+ this.diagram.valueForSerialization ?? '',
118
+ ]);
119
+ }
120
+ }
121
+
66
122
  export type DataSpaceElement = Class | Enumeration | Association;
67
123
 
68
124
  export class DataSpace extends PackageableElement implements Hashable {
@@ -72,6 +128,8 @@ export class DataSpace extends PackageableElement implements Hashable {
72
128
  defaultExecutionContext!: DataSpaceExecutionContext;
73
129
  featuredDiagrams?: PackageableElementReference<Diagram>[] | undefined;
74
130
  elements?: PackageableElementReference<DataSpaceElement>[] | undefined;
131
+ executables?: DataSpaceExecutable[] | undefined;
132
+ diagrams?: DataSpaceDiagram[] | undefined;
75
133
  supportInfo?: DataSpaceSupportInfo | undefined;
76
134
 
77
135
  protected override get _elementHashCode(): string {
@@ -95,6 +153,8 @@ export class DataSpace extends PackageableElement implements Hashable {
95
153
  (element) => element.valueForSerialization ?? '',
96
154
  ),
97
155
  ),
156
+ hashArray(this.executables ?? []),
157
+ hashArray(this.diagrams ?? []),
98
158
  this.supportInfo ?? '',
99
159
  ]);
100
160
  }
@@ -14,7 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import type { Diagram } from '@finos/legend-extension-dsl-diagram';
18
17
  import type {
19
18
  Mapping,
20
19
  PackageableRuntime,
@@ -22,15 +21,11 @@ import type {
22
21
  } from '@finos/legend-graph';
23
22
  import { uuid } from '@finos/legend-shared';
24
23
  import type { DataSpaceSupportInfo } from '../../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
25
- import {
26
- HACKY__SHOWCASE1,
27
- type HACKY__DataSpaceUsageShowcase,
28
- HACKY__SHOWCASE2,
29
- HACKY__SHOWCASE3,
30
- } from './HACKY__DataSpaceUsageShowcase.js';
24
+ import type { Diagram } from '@finos/legend-extension-dsl-diagram';
31
25
 
32
26
  export class DataSpaceExecutionContextAnalysisResult {
33
27
  name!: string;
28
+ title?: string | undefined;
34
29
  description?: string | undefined;
35
30
  mapping!: Mapping;
36
31
  defaultRuntime!: PackageableRuntime;
@@ -69,28 +64,64 @@ export class DataSpaceDocumentationEntry {
69
64
  }
70
65
  }
71
66
 
67
+ export class DataSpaceDiagramAnalysisResult {
68
+ title!: string;
69
+ description?: string | undefined;
70
+ diagram!: Diagram;
71
+ }
72
+
73
+ export abstract class DataSpaceExecutableInfo {
74
+ query!: string;
75
+ }
76
+
77
+ export class DataSpaceServiceExecutableInfo extends DataSpaceExecutableInfo {
78
+ pattern!: string;
79
+ mapping?: string | undefined;
80
+ runtime?: string | undefined;
81
+ }
82
+
83
+ export abstract class DataSpaceExecutableResult {}
84
+
85
+ export class DataSpaceExecutableTDSResultColumn {
86
+ name!: string;
87
+ type?: string | undefined;
88
+ relationalType?: string | undefined;
89
+ documentation?: string | undefined;
90
+ }
91
+
92
+ export class DataSpaceExecutableTDSResult extends DataSpaceExecutableResult {
93
+ columns: DataSpaceExecutableTDSResultColumn[] = [];
94
+ }
95
+
96
+ export class DataSpaceExecutableAnalysisResult {
97
+ title!: string;
98
+ description?: string | undefined;
99
+ executable!: string;
100
+ info?: DataSpaceExecutableInfo | undefined;
101
+ result!: DataSpaceExecutableResult;
102
+ }
103
+
72
104
  export class DataSpaceAnalysisResult {
73
105
  name!: string;
74
106
  package!: string;
75
107
  path!: string;
108
+
76
109
  taggedValues: DataSpaceTaggedValueInfo[] = [];
77
110
  stereotypes: DataSpaceStereotypeInfo[] = [];
111
+
78
112
  title?: string | undefined;
79
113
  description?: string | undefined;
80
- supportInfo?: DataSpaceSupportInfo | undefined;
81
114
 
82
115
  graph!: PureModel;
83
116
 
84
117
  executionContextsIndex!: Map<string, DataSpaceExecutionContextAnalysisResult>;
85
118
  defaultExecutionContext!: DataSpaceExecutionContextAnalysisResult;
86
119
 
87
- featuredDiagrams: Diagram[] = [];
88
-
89
120
  elementDocs: DataSpaceDocumentationEntry[] = [];
90
121
 
91
- HACKY__usageShowcases: HACKY__DataSpaceUsageShowcase[] = [
92
- HACKY__SHOWCASE1,
93
- HACKY__SHOWCASE2,
94
- HACKY__SHOWCASE3,
95
- ];
122
+ diagrams: DataSpaceDiagramAnalysisResult[] = [];
123
+
124
+ executables: DataSpaceExecutableAnalysisResult[] = [];
125
+
126
+ supportInfo?: DataSpaceSupportInfo | undefined;
96
127
  }