@finos/legend-extension-dsl-data-space 10.0.10 → 10.0.12

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 (131) hide show
  1. package/lib/__lib__/DSL_DataSpace_LegendApplicationCommand.d.ts +28 -0
  2. package/lib/__lib__/DSL_DataSpace_LegendApplicationCommand.d.ts.map +1 -0
  3. package/lib/__lib__/DSL_DataSpace_LegendApplicationCommand.js +70 -0
  4. package/lib/__lib__/DSL_DataSpace_LegendApplicationCommand.js.map +1 -0
  5. package/lib/__lib__/DSL_DataSpace_LegendApplicationNavigation.d.ts +20 -0
  6. package/lib/__lib__/DSL_DataSpace_LegendApplicationNavigation.d.ts.map +1 -0
  7. package/lib/__lib__/DSL_DataSpace_LegendApplicationNavigation.js +21 -0
  8. package/lib/__lib__/DSL_DataSpace_LegendApplicationNavigation.js.map +1 -0
  9. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.d.ts +5 -2
  10. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.d.ts.map +1 -1
  11. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js +47 -1
  12. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js.map +1 -1
  13. package/lib/components/DataSpaceDataAccess.d.ts.map +1 -1
  14. package/lib/components/DataSpaceDataAccess.js +5 -76
  15. package/lib/components/DataSpaceDataAccess.js.map +1 -1
  16. package/lib/components/DataSpaceDescription.d.ts.map +1 -1
  17. package/lib/components/DataSpaceDescription.js +2 -1
  18. package/lib/components/DataSpaceDescription.js.map +1 -1
  19. package/lib/components/DataSpaceDiagramViewer.d.ts.map +1 -1
  20. package/lib/components/DataSpaceDiagramViewer.js +110 -39
  21. package/lib/components/DataSpaceDiagramViewer.js.map +1 -1
  22. package/lib/components/DataSpaceExecutionContextViewer.d.ts.map +1 -1
  23. package/lib/components/DataSpaceExecutionContextViewer.js +3 -3
  24. package/lib/components/DataSpaceExecutionContextViewer.js.map +1 -1
  25. package/lib/components/DataSpaceInfoPanel.d.ts.map +1 -1
  26. package/lib/components/DataSpaceInfoPanel.js +6 -6
  27. package/lib/components/DataSpaceInfoPanel.js.map +1 -1
  28. package/lib/components/DataSpaceModelsDocumentation.d.ts.map +1 -1
  29. package/lib/components/DataSpaceModelsDocumentation.js +18 -8
  30. package/lib/components/DataSpaceModelsDocumentation.js.map +1 -1
  31. package/lib/components/DataSpacePlaceholder.d.ts +4 -0
  32. package/lib/components/DataSpacePlaceholder.d.ts.map +1 -1
  33. package/lib/components/DataSpacePlaceholder.js +6 -1
  34. package/lib/components/DataSpacePlaceholder.js.map +1 -1
  35. package/lib/components/DataSpaceQuickStart.d.ts.map +1 -1
  36. package/lib/components/DataSpaceQuickStart.js +24 -11
  37. package/lib/components/DataSpaceQuickStart.js.map +1 -1
  38. package/lib/components/DataSpaceSupportPanel.d.ts.map +1 -1
  39. package/lib/components/DataSpaceSupportPanel.js +17 -8
  40. package/lib/components/DataSpaceSupportPanel.js.map +1 -1
  41. package/lib/components/DataSpaceViewer.d.ts.map +1 -1
  42. package/lib/components/DataSpaceViewer.js +34 -13
  43. package/lib/components/DataSpaceViewer.js.map +1 -1
  44. package/lib/components/DataSpaceViewerActivityBar.d.ts.map +1 -1
  45. package/lib/components/DataSpaceViewerActivityBar.js +15 -12
  46. package/lib/components/DataSpaceViewerActivityBar.js.map +1 -1
  47. package/lib/components/index.d.ts +1 -0
  48. package/lib/components/index.d.ts.map +1 -1
  49. package/lib/components/index.js +1 -0
  50. package/lib/components/index.js.map +1 -1
  51. package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.d.ts.map +1 -1
  52. package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.js +1 -0
  53. package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.js.map +1 -1
  54. package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js +1 -1
  55. package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js.map +1 -1
  56. package/lib/index.css +2 -2
  57. package/lib/index.css.map +1 -1
  58. package/lib/package.json +1 -1
  59. package/lib/stores/DataSpaceLayoutState.d.ts +48 -0
  60. package/lib/stores/DataSpaceLayoutState.d.ts.map +1 -0
  61. package/lib/stores/DataSpaceLayoutState.js +185 -0
  62. package/lib/stores/DataSpaceLayoutState.js.map +1 -0
  63. package/lib/stores/DataSpaceModelsDocumentationState.d.ts +11 -2
  64. package/lib/stores/DataSpaceModelsDocumentationState.d.ts.map +1 -1
  65. package/lib/stores/DataSpaceModelsDocumentationState.js +41 -0
  66. package/lib/stores/DataSpaceModelsDocumentationState.js.map +1 -1
  67. package/lib/stores/DataSpaceQuickStartState.d.ts +24 -0
  68. package/lib/stores/DataSpaceQuickStartState.d.ts.map +1 -0
  69. package/lib/stores/DataSpaceQuickStartState.js +48 -0
  70. package/lib/stores/DataSpaceQuickStartState.js.map +1 -0
  71. package/lib/stores/DataSpaceViewerDiagramViewerState.d.ts +44 -0
  72. package/lib/stores/DataSpaceViewerDiagramViewerState.d.ts.map +1 -0
  73. package/lib/stores/DataSpaceViewerDiagramViewerState.js +194 -0
  74. package/lib/stores/DataSpaceViewerDiagramViewerState.js.map +1 -0
  75. package/lib/stores/DataSpaceViewerNavigation.d.ts +36 -0
  76. package/lib/stores/DataSpaceViewerNavigation.d.ts.map +1 -0
  77. package/lib/stores/DataSpaceViewerNavigation.js +47 -0
  78. package/lib/stores/DataSpaceViewerNavigation.js.map +1 -0
  79. package/lib/stores/DataSpaceViewerState.d.ts +22 -74
  80. package/lib/stores/DataSpaceViewerState.d.ts.map +1 -1
  81. package/lib/stores/DataSpaceViewerState.js +34 -259
  82. package/lib/stores/DataSpaceViewerState.js.map +1 -1
  83. package/lib/stores/query/DataSpaceAdvancedSearchState.d.ts.map +1 -1
  84. package/lib/stores/query/DataSpaceAdvancedSearchState.js +8 -5
  85. package/lib/stores/query/DataSpaceAdvancedSearchState.js.map +1 -1
  86. package/lib/stores/query/DataSpaceQueryCreatorStore.d.ts +8 -8
  87. package/lib/stores/query/DataSpaceQueryCreatorStore.d.ts.map +1 -1
  88. package/lib/stores/query/DataSpaceQueryCreatorStore.js +1 -1
  89. package/lib/stores/query/DataSpaceQueryCreatorStore.js.map +1 -1
  90. package/lib/stores/query/DataSpaceQuerySetupStore.d.ts +1 -1
  91. package/lib/stores/query/DataSpaceQuerySetupStore.d.ts.map +1 -1
  92. package/lib/stores/query/DataSpaceQuerySetupStore.js +1 -1
  93. package/lib/stores/query/DataSpaceQuerySetupStore.js.map +1 -1
  94. package/lib/stores/studio/DataSpacePreviewState.d.ts.map +1 -1
  95. package/lib/stores/studio/DataSpacePreviewState.js +15 -3
  96. package/lib/stores/studio/DataSpacePreviewState.js.map +1 -1
  97. package/package.json +13 -13
  98. package/src/__lib__/DSL_DataSpace_LegendApplicationCommand.ts +74 -0
  99. package/src/__lib__/DSL_DataSpace_LegendApplicationNavigation.ts +33 -0
  100. package/src/components/DSL_DataSpace_LegendApplicationPlugin.tsx +116 -0
  101. package/src/components/DataSpaceDataAccess.tsx +9 -122
  102. package/src/components/DataSpaceDescription.tsx +5 -5
  103. package/src/components/DataSpaceDiagramViewer.tsx +449 -69
  104. package/src/components/DataSpaceExecutionContextViewer.tsx +47 -40
  105. package/src/components/DataSpaceInfoPanel.tsx +107 -117
  106. package/src/components/DataSpaceModelsDocumentation.tsx +31 -12
  107. package/src/components/DataSpacePlaceholder.tsx +22 -0
  108. package/src/components/DataSpaceQuickStart.tsx +95 -15
  109. package/src/components/DataSpaceSupportPanel.tsx +146 -14
  110. package/src/components/DataSpaceViewer.tsx +153 -23
  111. package/src/components/DataSpaceViewerActivityBar.tsx +40 -20
  112. package/src/components/index.ts +1 -0
  113. package/src/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.tsx +1 -0
  114. package/src/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.ts +1 -1
  115. package/src/stores/DataSpaceLayoutState.ts +272 -0
  116. package/src/stores/DataSpaceModelsDocumentationState.ts +61 -2
  117. package/src/stores/DataSpaceQuickStartState.ts +91 -0
  118. package/src/stores/DataSpaceViewerDiagramViewerState.ts +245 -0
  119. package/src/stores/DataSpaceViewerNavigation.ts +64 -0
  120. package/src/stores/DataSpaceViewerState.ts +88 -401
  121. package/src/stores/query/DataSpaceAdvancedSearchState.ts +30 -6
  122. package/src/stores/query/DataSpaceQueryCreatorStore.ts +8 -8
  123. package/src/stores/query/DataSpaceQuerySetupStore.ts +1 -1
  124. package/src/stores/studio/DataSpacePreviewState.ts +27 -5
  125. package/tsconfig.json +7 -2
  126. package/lib/stores/DataSpaceViewerDataAccessState.d.ts +0 -35
  127. package/lib/stores/DataSpaceViewerDataAccessState.d.ts.map +0 -1
  128. package/lib/stores/DataSpaceViewerDataAccessState.js +0 -98
  129. package/lib/stores/DataSpaceViewerDataAccessState.js.map +0 -1
  130. package/src/components/DSL_DataSpace_LegendApplicationPlugin.ts +0 -45
  131. package/src/stores/DataSpaceViewerDataAccessState.ts +0 -143
@@ -17,24 +17,23 @@
17
17
  import { observer } from 'mobx-react-lite';
18
18
  import {
19
19
  AnchorLinkIcon,
20
+ BlankPanelContent,
20
21
  CodeIcon,
21
22
  CopyIcon,
23
+ DataAccessIcon,
22
24
  LegendLogo,
23
25
  MoreVerticalIcon,
24
26
  QuestionCircleIcon,
27
+ StatisticsIcon,
25
28
  clsx,
26
29
  } from '@finos/legend-art';
27
- import {
28
- DATA_SPACE_VIEWER_ACTIVITY_MODE,
29
- generateAnchorForActivity,
30
- type DataSpaceViewerState,
31
- generateAnchorForQuickStart,
32
- } from '../stores/DataSpaceViewerState.js';
30
+ import { type DataSpaceViewerState } from '../stores/DataSpaceViewerState.js';
33
31
  import { useApplicationStore } from '@finos/legend-application';
34
32
  import {
35
33
  DataSpaceExecutableTDSResult,
36
34
  type DataSpaceExecutableAnalysisResult,
37
35
  type DataSpaceExecutableTDSResultColumn,
36
+ DataSpaceServiceExecutableInfo,
38
37
  } from '../graph-manager/action/analytics/DataSpaceAnalysis.js';
39
38
  import { DataSpaceMarkdownTextViewer } from './DataSpaceMarkdownTextViewer.js';
40
39
  import type { DSL_DataSpace_LegendApplicationPlugin_Extension } from '../stores/DSL_DataSpace_LegendApplicationPlugin_Extension.js';
@@ -46,12 +45,22 @@ import {
46
45
  } from '@finos/legend-lego/data-grid';
47
46
  import {
48
47
  CODE_EDITOR_LANGUAGE,
48
+ CODE_EDITOR_THEME,
49
49
  CodeEditor,
50
50
  } from '@finos/legend-lego/code-editor';
51
+ import {
52
+ DATA_SPACE_VIEWER_ACTIVITY_MODE,
53
+ generateAnchorForActivity,
54
+ generateAnchorForQuickStart,
55
+ } from '../stores/DataSpaceViewerNavigation.js';
56
+ import { DataAccessOverview } from '@finos/legend-query-builder';
51
57
 
52
58
  enum TDS_EXECUTABLE_ACTION_TAB {
53
59
  COLUMN_SPECS = 'COLUMN_SPECS',
54
60
  QUERY = 'QUERY',
61
+
62
+ DATA_ACCESS = 'DATA_ACCESS',
63
+ USAGE_STATS = 'USAGE_STATS',
55
64
  QUERY_TEXT = 'QUERY_TEXT',
56
65
  }
57
66
 
@@ -99,7 +108,20 @@ const DataSpaceExecutableTDSResultView = observer(
99
108
  TDS_EXECUTABLE_ACTION_TAB.COLUMN_SPECS,
100
109
  );
101
110
  const queryText = executableAnalysisResult.info?.query;
111
+ const dataAccessState =
112
+ dataSpaceViewerState.quickStartState.dataAccessStateIndex.get(
113
+ executableAnalysisResult,
114
+ );
102
115
 
116
+ const openServiceQuery = (): void => {
117
+ if (
118
+ executableAnalysisResult.info instanceof DataSpaceServiceExecutableInfo
119
+ ) {
120
+ dataSpaceViewerState.openServiceQuery(
121
+ executableAnalysisResult.executable,
122
+ );
123
+ }
124
+ };
103
125
  const columnSpecifications = tdsResult.columns;
104
126
  const extractTDSExecutableActionConfigurations =
105
127
  applicationStore.pluginManager
@@ -185,25 +207,64 @@ const DataSpaceExecutableTDSResultView = observer(
185
207
  </button>
186
208
  ))}
187
209
  </div>
188
- {queryText !== undefined && (
210
+ <div className="data-space__viewer__quickstart__item__content__action-tab-group">
189
211
  <button
190
212
  className={clsx(
191
213
  'data-space__viewer__quickstart__item__content__tab',
192
214
  {
193
215
  'data-space__viewer__quickstart__item__content__tab--active':
194
- selectedTab === TDS_EXECUTABLE_ACTION_TAB.QUERY_TEXT,
216
+ selectedTab === TDS_EXECUTABLE_ACTION_TAB.DATA_ACCESS,
195
217
  },
196
218
  )}
197
219
  tabIndex={-1}
220
+ title="Data Access"
198
221
  onClick={() =>
199
- setSelectedTab(TDS_EXECUTABLE_ACTION_TAB.QUERY_TEXT)
222
+ setSelectedTab(TDS_EXECUTABLE_ACTION_TAB.DATA_ACCESS)
200
223
  }
201
224
  >
202
225
  <div className="data-space__viewer__quickstart__item__content__tab__icon">
203
- <CodeIcon className="data-space__viewer__quickstart__item__content__tab__icon--query" />
226
+ <DataAccessIcon />
204
227
  </div>
205
228
  </button>
206
- )}
229
+ <button
230
+ className={clsx(
231
+ 'data-space__viewer__quickstart__item__content__tab',
232
+ {
233
+ 'data-space__viewer__quickstart__item__content__tab--active':
234
+ selectedTab === TDS_EXECUTABLE_ACTION_TAB.USAGE_STATS,
235
+ },
236
+ )}
237
+ tabIndex={-1}
238
+ title="Usage Statistics"
239
+ onClick={() =>
240
+ setSelectedTab(TDS_EXECUTABLE_ACTION_TAB.USAGE_STATS)
241
+ }
242
+ >
243
+ <div className="data-space__viewer__quickstart__item__content__tab__icon">
244
+ <StatisticsIcon />
245
+ </div>
246
+ </button>
247
+ {queryText !== undefined && (
248
+ <button
249
+ className={clsx(
250
+ 'data-space__viewer__quickstart__item__content__tab',
251
+ {
252
+ 'data-space__viewer__quickstart__item__content__tab--active':
253
+ selectedTab === TDS_EXECUTABLE_ACTION_TAB.QUERY_TEXT,
254
+ },
255
+ )}
256
+ tabIndex={-1}
257
+ title="Pure Query"
258
+ onClick={() =>
259
+ setSelectedTab(TDS_EXECUTABLE_ACTION_TAB.QUERY_TEXT)
260
+ }
261
+ >
262
+ <div className="data-space__viewer__quickstart__item__content__tab__icon">
263
+ <CodeIcon className="data-space__viewer__quickstart__item__content__tab__icon--query" />
264
+ </div>
265
+ </button>
266
+ )}
267
+ </div>
207
268
  </div>
208
269
  <div className="data-space__viewer__quickstart__item__content__tab__content">
209
270
  {selectedTab === TDS_EXECUTABLE_ACTION_TAB.COLUMN_SPECS && (
@@ -258,9 +319,7 @@ const DataSpaceExecutableTDSResultView = observer(
258
319
  <button
259
320
  className="data-space__viewer__quickstart__tds__query__action btn--dark"
260
321
  tabIndex={-1}
261
- onClick={() => {
262
- // TODO: wire this so we can go to the query for the service
263
- }}
322
+ onClick={openServiceQuery}
264
323
  >
265
324
  Open in Query
266
325
  </button>
@@ -274,6 +333,26 @@ const DataSpaceExecutableTDSResultView = observer(
274
333
  </div>
275
334
  </div>
276
335
  )}
336
+ {selectedTab === TDS_EXECUTABLE_ACTION_TAB.DATA_ACCESS &&
337
+ (dataAccessState ? (
338
+ <DataAccessOverview
339
+ dataAccessState={dataAccessState}
340
+ compact={true}
341
+ />
342
+ ) : (
343
+ <div className="data-space__viewer__quickstart__tds__placeholder-panel">
344
+ <BlankPanelContent>
345
+ No data access information available
346
+ </BlankPanelContent>
347
+ </div>
348
+ ))}
349
+ {selectedTab === TDS_EXECUTABLE_ACTION_TAB.USAGE_STATS && (
350
+ <div className="data-space__viewer__quickstart__tds__placeholder-panel">
351
+ <BlankPanelContent>
352
+ Usage Statistics (Work in Progress)
353
+ </BlankPanelContent>
354
+ </div>
355
+ )}
277
356
  {selectedTab === TDS_EXECUTABLE_ACTION_TAB.QUERY_TEXT &&
278
357
  queryText !== undefined && (
279
358
  <div className="data-space__viewer__quickstart__tds__query-text">
@@ -281,8 +360,9 @@ const DataSpaceExecutableTDSResultView = observer(
281
360
  <CodeEditor
282
361
  inputValue={queryText}
283
362
  isReadOnly={true}
363
+ lightTheme={CODE_EDITOR_THEME.ONE_DARK_PRO}
284
364
  language={CODE_EDITOR_LANGUAGE.PURE}
285
- showMiniMap={false}
365
+ hideMinimap={true}
286
366
  hideGutter={true}
287
367
  />
288
368
  </div>
@@ -15,28 +15,39 @@
15
15
  */
16
16
 
17
17
  import { observer } from 'mobx-react-lite';
18
- import { BlankPanelContent, EnvelopIcon } from '@finos/legend-art';
19
- import { DataSpaceSupportEmail } from '../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
18
+ import {
19
+ BlankPanelContent,
20
+ DocumentationIcon,
21
+ EnvelopIcon,
22
+ HomeIcon,
23
+ QuestionAnswerIcon,
24
+ SparkleIcon,
25
+ SupportIcon,
26
+ } from '@finos/legend-art';
27
+ import {
28
+ DataSpaceSupportCombinedInfo,
29
+ DataSpaceSupportEmail,
30
+ } from '../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
20
31
  import { type DataSpaceViewerState } from '../stores/DataSpaceViewerState.js';
21
32
 
22
33
  const DataSpaceSupportEmailViewer = observer(
23
34
  (props: {
24
35
  dataSpaceViewerState: DataSpaceViewerState;
25
- dataSpaceSupportEmail: DataSpaceSupportEmail;
36
+ supportInfo: DataSpaceSupportEmail;
26
37
  }) => {
27
- const { dataSpaceSupportEmail } = props;
38
+ const { supportInfo } = props;
28
39
 
29
40
  return (
30
- <div className="data-space__viewer__support__email">
31
- <div className="data-space__viewer__support__email__entry">
32
- <div className="data-space__viewer__support__email__entry__icon">
41
+ <div className="data-space__viewer__support__section">
42
+ <div className="data-space__viewer__support__entry">
43
+ <div className="data-space__viewer__support__entry__icon">
33
44
  <EnvelopIcon />
34
45
  </div>
35
46
  <a
36
- href={`mailto:${dataSpaceSupportEmail.address}`}
37
- className="data-space__viewer__support__email__entry__content"
47
+ href={`mailto:${supportInfo.address}`}
48
+ className="data-space__viewer__support__entry__content"
38
49
  >
39
- {dataSpaceSupportEmail.address}
50
+ {supportInfo.address}
40
51
  </a>
41
52
  </div>
42
53
  </div>
@@ -44,6 +55,111 @@ const DataSpaceSupportEmailViewer = observer(
44
55
  },
45
56
  );
46
57
 
58
+ const DataSpaceSupportCombinedInfoViewer = observer(
59
+ (props: {
60
+ dataSpaceViewerState: DataSpaceViewerState;
61
+ supportInfo: DataSpaceSupportCombinedInfo;
62
+ }) => {
63
+ const { supportInfo } = props;
64
+
65
+ return (
66
+ <>
67
+ <div className="data-space__viewer__support__section">
68
+ <div className="data-space__viewer__support__entry" title="Website">
69
+ <div className="data-space__viewer__support__entry__icon data-space__viewer__support__entry__icon--website">
70
+ <HomeIcon />
71
+ </div>
72
+ {supportInfo.website ? (
73
+ <a
74
+ href={supportInfo.website}
75
+ className="data-space__viewer__support__entry__content"
76
+ >
77
+ {supportInfo.website}
78
+ </a>
79
+ ) : (
80
+ <div className="data-space__viewer__support__entry__content">
81
+ (not specified)
82
+ </div>
83
+ )}
84
+ </div>
85
+ <div
86
+ className="data-space__viewer__support__entry"
87
+ title="Documentation"
88
+ >
89
+ <div className="data-space__viewer__support__entry__icon">
90
+ <DocumentationIcon />
91
+ </div>
92
+ {supportInfo.documentationUrl ? (
93
+ <a
94
+ href={supportInfo.documentationUrl}
95
+ className="data-space__viewer__support__entry__content"
96
+ >
97
+ {supportInfo.documentationUrl}
98
+ </a>
99
+ ) : (
100
+ <div className="data-space__viewer__support__entry__content">
101
+ (not specified)
102
+ </div>
103
+ )}
104
+ </div>
105
+ <div className="data-space__viewer__support__entry" title="Support">
106
+ <div className="data-space__viewer__support__entry__icon data-space__viewer__support__entry__icon--support">
107
+ <SupportIcon />
108
+ </div>
109
+ {supportInfo.supportUrl ? (
110
+ <a
111
+ href={supportInfo.supportUrl}
112
+ className="data-space__viewer__support__entry__content"
113
+ >
114
+ {supportInfo.supportUrl}
115
+ </a>
116
+ ) : (
117
+ <div className="data-space__viewer__support__entry__content">
118
+ (not specified)
119
+ </div>
120
+ )}
121
+ </div>
122
+ <div className="data-space__viewer__support__entry" title="FAQ">
123
+ <div className="data-space__viewer__support__entry__icon data-space__viewer__support__entry__icon--faq">
124
+ <QuestionAnswerIcon />
125
+ </div>
126
+ {supportInfo.faqUrl ? (
127
+ <a
128
+ href={supportInfo.faqUrl}
129
+ className="data-space__viewer__support__entry__content"
130
+ >
131
+ {supportInfo.faqUrl}
132
+ </a>
133
+ ) : (
134
+ <div className="data-space__viewer__support__entry__content">
135
+ (not specified)
136
+ </div>
137
+ )}
138
+ </div>
139
+ </div>
140
+ {supportInfo.emails?.length && (
141
+ <div className="data-space__viewer__support__section">
142
+ {supportInfo.emails.map((email, idx) => (
143
+ // eslint-disable-next-line react/no-array-index-key
144
+ <div key={idx} className="data-space__viewer__support__entry">
145
+ <div className="data-space__viewer__support__entry__icon">
146
+ <EnvelopIcon />
147
+ </div>
148
+ <a
149
+ href={`mailto:${email}`}
150
+ className="data-space__viewer__support__entry__content"
151
+ >
152
+ {email}
153
+ </a>
154
+ </div>
155
+ ))}
156
+ </div>
157
+ )}
158
+ </>
159
+ );
160
+ },
161
+ );
162
+
47
163
  const DataSpaceSupport = observer(
48
164
  (props: { dataSpaceViewerState: DataSpaceViewerState }) => {
49
165
  const { dataSpaceViewerState } = props;
@@ -56,12 +172,21 @@ const DataSpaceSupport = observer(
56
172
  return (
57
173
  <DataSpaceSupportEmailViewer
58
174
  dataSpaceViewerState={dataSpaceViewerState}
59
- dataSpaceSupportEmail={supportInfo}
175
+ supportInfo={supportInfo}
176
+ />
177
+ );
178
+ } else if (supportInfo instanceof DataSpaceSupportCombinedInfo) {
179
+ return (
180
+ <DataSpaceSupportCombinedInfoViewer
181
+ dataSpaceViewerState={dataSpaceViewerState}
182
+ supportInfo={supportInfo}
60
183
  />
61
184
  );
62
185
  }
63
186
  return (
64
- <BlankPanelContent>{`Can't display support info`}</BlankPanelContent>
187
+ <div className="data-space__viewer__panel__content__placeholder">
188
+ <SparkleIcon /> This is work in progress
189
+ </div>
65
190
  );
66
191
  },
67
192
  );
@@ -71,8 +196,15 @@ export const DataSpaceSupportPanel = observer(
71
196
  const { dataSpaceViewerState } = props;
72
197
  return (
73
198
  <div className="data-space__viewer__panel">
74
- <div className="data-space__viewer__support-info">
75
- <DataSpaceSupport dataSpaceViewerState={dataSpaceViewerState} />
199
+ <div className="data-space__viewer__panel__header">
200
+ <div className="data-space__viewer__panel__header__label">
201
+ Support
202
+ </div>
203
+ </div>
204
+ <div className="data-space__viewer__panel__content">
205
+ <div className="data-space__viewer__support-info">
206
+ <DataSpaceSupport dataSpaceViewerState={dataSpaceViewerState} />
207
+ </div>
76
208
  </div>
77
209
  </div>
78
210
  );
@@ -16,22 +16,31 @@
16
16
 
17
17
  import { observer } from 'mobx-react-lite';
18
18
  import {
19
- BlankPanelContent,
19
+ CaretDownIcon,
20
20
  CaretUpIcon,
21
+ DropdownMenu,
22
+ MenuContent,
23
+ MenuContentDivider,
24
+ MenuContentItem,
25
+ MoreVerticalIcon,
26
+ PlayIcon,
21
27
  VerifiedIcon,
22
28
  clsx,
23
29
  } from '@finos/legend-art';
24
- import {
25
- type DataSpaceViewerState,
26
- DATA_SPACE_VIEWER_ACTIVITY_MODE,
27
- DATA_SPACE_WIKI_PAGE_SECTIONS,
28
- } from '../stores/DataSpaceViewerState.js';
30
+ import { type DataSpaceViewerState } from '../stores/DataSpaceViewerState.js';
29
31
  import { DataSpaceExecutionContextViewer } from './DataSpaceExecutionContextViewer.js';
30
32
  import { DataSpaceInfoPanel } from './DataSpaceInfoPanel.js';
31
33
  import { DataSpaceSupportPanel } from './DataSpaceSupportPanel.js';
32
34
  import { DataSpaceWiki } from './DataSpaceWiki.js';
33
35
  import { DataSpaceViewerActivityBar } from './DataSpaceViewerActivityBar.js';
34
36
  import { useEffect, useRef, useState } from 'react';
37
+ import { DATA_SPACE_WIKI_PAGE_SECTIONS } from '../stores/DataSpaceLayoutState.js';
38
+ import {
39
+ DATA_SPACE_VIEWER_ACTIVITY_MODE,
40
+ generateAnchorForActivity,
41
+ } from '../stores/DataSpaceViewerNavigation.js';
42
+ import { DataSpacePlaceholderPanel } from './DataSpacePlaceholder.js';
43
+ import { useApplicationStore } from '@finos/legend-application';
35
44
 
36
45
  const DataSpaceHeader = observer(
37
46
  (props: {
@@ -39,6 +48,7 @@ const DataSpaceHeader = observer(
39
48
  showFullHeader: boolean;
40
49
  }) => {
41
50
  const { dataSpaceViewerState, showFullHeader } = props;
51
+ const applicationStore = useApplicationStore();
42
52
  const headerRef = useRef<HTMLDivElement>(null);
43
53
  const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
44
54
 
@@ -69,28 +79,133 @@ const DataSpaceHeader = observer(
69
79
  {analysisResult.displayName}
70
80
  </div>
71
81
  {dataSpaceViewerState.isVerified && (
72
- <VerifiedIcon
82
+ <div
73
83
  className="data-space__viewer__header__title__verified-badge"
74
84
  title="Verified Data Space"
75
- />
85
+ >
86
+ <VerifiedIcon />
87
+ </div>
76
88
  )}
77
89
  </div>
90
+ <div className="data-space__viewer__header__actions">
91
+ <DropdownMenu
92
+ className="data-space__viewer__header__execution-context-selector"
93
+ menuProps={{
94
+ anchorOrigin: { vertical: 'bottom', horizontal: 'right' },
95
+ transformOrigin: { vertical: 'top', horizontal: 'right' },
96
+ elevation: 7,
97
+ }}
98
+ title={`Current Execution Context: ${dataSpaceViewerState.currentExecutionContext.name}\nClick to switch`}
99
+ content={
100
+ <MenuContent>
101
+ {Array.from(
102
+ dataSpaceViewerState.dataSpaceAnalysisResult.executionContextsIndex.values(),
103
+ ).map((context) => (
104
+ <MenuContentItem
105
+ key={context.name}
106
+ className={clsx(
107
+ 'data-space__viewer__header__execution-context-selector__option',
108
+ {
109
+ 'data-space__viewer__header__execution-context-selector__option--active':
110
+ context ===
111
+ dataSpaceViewerState.currentExecutionContext,
112
+ },
113
+ )}
114
+ onClick={() =>
115
+ dataSpaceViewerState.setCurrentExecutionContext(context)
116
+ }
117
+ >
118
+ {context.name}
119
+ </MenuContentItem>
120
+ ))}
121
+ </MenuContent>
122
+ }
123
+ >
124
+ <div className="data-space__viewer__header__execution-context-selector__trigger">
125
+ <div className="data-space__viewer__header__execution-context-selector__trigger__icon">
126
+ <PlayIcon />
127
+ </div>
128
+ <div className="data-space__viewer__header__execution-context-selector__trigger__label">
129
+ {dataSpaceViewerState.currentExecutionContext.name}
130
+ </div>
131
+ <div className="data-space__viewer__header__execution-context-selector__trigger__dropdown-icon">
132
+ <CaretDownIcon />
133
+ </div>
134
+ </div>
135
+ </DropdownMenu>
136
+ <DropdownMenu
137
+ className="data-space__viewer__header__actions-selector"
138
+ menuProps={{
139
+ anchorOrigin: { vertical: 'bottom', horizontal: 'right' },
140
+ transformOrigin: { vertical: 'top', horizontal: 'right' },
141
+ elevation: 7,
142
+ }}
143
+ title="More Actions..."
144
+ content={
145
+ <MenuContent>
146
+ <MenuContentItem
147
+ onClick={() =>
148
+ dataSpaceViewerState.queryDataSpace(
149
+ dataSpaceViewerState.currentExecutionContext.name,
150
+ )
151
+ }
152
+ >
153
+ Query Data Space
154
+ </MenuContentItem>
155
+ <MenuContentDivider />
156
+ <MenuContentItem
157
+ onClick={() =>
158
+ dataSpaceViewerState.viewProject(analysisResult.path)
159
+ }
160
+ >
161
+ View Project
162
+ </MenuContentItem>
163
+ <MenuContentItem
164
+ onClick={() => {
165
+ dataSpaceViewerState
166
+ .viewSDLCProject(analysisResult.path)
167
+ .catch(applicationStore.alertUnhandledError);
168
+ }}
169
+ >
170
+ View SDLC Project
171
+ </MenuContentItem>
172
+ <MenuContentDivider />
173
+ <MenuContentItem
174
+ onClick={() => {
175
+ const documentationUrl =
176
+ analysisResult.supportInfo?.documentationUrl;
177
+ if (documentationUrl) {
178
+ applicationStore.navigationService.navigator.visitAddress(
179
+ documentationUrl,
180
+ );
181
+ }
182
+ }}
183
+ >
184
+ View Documentation
185
+ </MenuContentItem>
186
+ <MenuContentItem
187
+ onClick={() =>
188
+ dataSpaceViewerState.changeZone(
189
+ generateAnchorForActivity(
190
+ DATA_SPACE_VIEWER_ACTIVITY_MODE.SUPPORT,
191
+ ),
192
+ )
193
+ }
194
+ >
195
+ Get Help
196
+ </MenuContentItem>
197
+ </MenuContent>
198
+ }
199
+ >
200
+ <MoreVerticalIcon />
201
+ </DropdownMenu>
202
+ </div>
78
203
  </div>
79
204
  </div>
80
205
  );
81
206
  },
82
207
  );
83
208
 
84
- const DataSpacePlaceholderPanel: React.FC<{ message: string }> = (props) => {
85
- const { message } = props;
86
-
87
- return (
88
- <div className="data-space__viewer__panel">
89
- <BlankPanelContent>{message}</BlankPanelContent>
90
- </div>
91
- );
92
- };
93
-
94
209
  export const DataSpaceViewer = observer(
95
210
  (props: { dataSpaceViewerState: DataSpaceViewerState }) => {
96
211
  const { dataSpaceViewerState } = props;
@@ -182,23 +297,38 @@ export const DataSpaceViewer = observer(
182
297
  )}
183
298
  {dataSpaceViewerState.currentActivity ===
184
299
  DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_STORES && (
185
- <DataSpacePlaceholderPanel message="View all data stores (Work in Progress)" />
300
+ <DataSpacePlaceholderPanel
301
+ header="Data Stores"
302
+ message="This panel will provide details about the available datasets' schema and test data"
303
+ />
186
304
  )}
187
305
  {dataSpaceViewerState.currentActivity ===
188
306
  DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_AVAILABILITY && (
189
- <DataSpacePlaceholderPanel message="View data availability (Work in Progress)" />
307
+ <DataSpacePlaceholderPanel
308
+ header="Data Availability"
309
+ message="This panel will provide details about the status of data being made available to end-users and applications"
310
+ />
190
311
  )}
191
312
  {dataSpaceViewerState.currentActivity ===
192
313
  DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_READINESS && (
193
- <DataSpacePlaceholderPanel message="View data readiness (Work in Progress)" />
314
+ <DataSpacePlaceholderPanel
315
+ header="Data Readiness"
316
+ message="This will provide details about the status of data being prepared to collect, process, and analyze"
317
+ />
194
318
  )}
195
319
  {dataSpaceViewerState.currentActivity ===
196
320
  DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_COST && (
197
- <DataSpacePlaceholderPanel message="View data cost (Work in Progress)" />
321
+ <DataSpacePlaceholderPanel
322
+ header="Data Cost"
323
+ message="This will provide details about the cost of data usage"
324
+ />
198
325
  )}
199
326
  {dataSpaceViewerState.currentActivity ===
200
327
  DATA_SPACE_VIEWER_ACTIVITY_MODE.DATA_GOVERNANCE && (
201
- <DataSpacePlaceholderPanel message="View data ownership and governance (Work in Progress)" />
328
+ <DataSpacePlaceholderPanel
329
+ header="Data Governance"
330
+ message="This will provide details about data policy, data contract, and dataset lineage information"
331
+ />
202
332
  )}
203
333
  {dataSpaceViewerState.currentActivity ===
204
334
  DATA_SPACE_VIEWER_ACTIVITY_MODE.INFO && (