@finos/legend-extension-dsl-data-space 9.2.4 → 9.2.6

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 (62) hide show
  1. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.d.ts +2 -1
  2. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.d.ts.map +1 -1
  3. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js +8 -0
  4. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js.map +1 -1
  5. package/lib/components/DataSpaceDataAccess.d.ts.map +1 -1
  6. package/lib/components/DataSpaceDataAccess.js +70 -66
  7. package/lib/components/DataSpaceDataAccess.js.map +1 -1
  8. package/lib/components/DataSpaceDiagramViewer.js +1 -1
  9. package/lib/components/DataSpaceDiagramViewer.js.map +1 -1
  10. package/lib/components/DataSpaceModelsDocumentation.d.ts.map +1 -1
  11. package/lib/components/DataSpaceModelsDocumentation.js +337 -34
  12. package/lib/components/DataSpaceModelsDocumentation.js.map +1 -1
  13. package/lib/components/DataSpaceQuickStart.d.ts.map +1 -1
  14. package/lib/components/DataSpaceQuickStart.js +33 -12
  15. package/lib/components/DataSpaceQuickStart.js.map +1 -1
  16. package/lib/components/DataSpaceViewer.d.ts.map +1 -1
  17. package/lib/components/DataSpaceViewer.js +1 -1
  18. package/lib/components/DataSpaceViewer.js.map +1 -1
  19. package/lib/components/DataSpaceWiki.d.ts.map +1 -1
  20. package/lib/components/DataSpaceWiki.js +0 -1
  21. package/lib/components/DataSpaceWiki.js.map +1 -1
  22. package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts +45 -9
  23. package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts.map +1 -1
  24. package/lib/graphManager/action/analytics/DataSpaceAnalysis.js +55 -12
  25. package/lib/graphManager/action/analytics/DataSpaceAnalysis.js.map +1 -1
  26. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.d.ts.map +1 -1
  27. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js +51 -8
  28. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js.map +1 -1
  29. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts +15 -3
  30. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts.map +1 -1
  31. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js +16 -2
  32. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js.map +1 -1
  33. package/lib/index.css +2 -2
  34. package/lib/index.css.map +1 -1
  35. package/lib/package.json +7 -10
  36. package/lib/stores/DataSpaceModelsDocumentationState.d.ts +93 -0
  37. package/lib/stores/DataSpaceModelsDocumentationState.d.ts.map +1 -0
  38. package/lib/stores/DataSpaceModelsDocumentationState.js +396 -0
  39. package/lib/stores/DataSpaceModelsDocumentationState.js.map +1 -0
  40. package/lib/stores/DataSpaceViewerState.d.ts +5 -0
  41. package/lib/stores/DataSpaceViewerState.d.ts.map +1 -1
  42. package/lib/stores/DataSpaceViewerState.js +6 -1
  43. package/lib/stores/DataSpaceViewerState.js.map +1 -1
  44. package/package.json +18 -21
  45. package/src/components/DSL_DataSpace_LegendApplicationPlugin.ts +10 -0
  46. package/src/components/DataSpaceDataAccess.tsx +101 -96
  47. package/src/components/DataSpaceDiagramViewer.tsx +1 -1
  48. package/src/components/DataSpaceModelsDocumentation.tsx +1043 -46
  49. package/src/components/DataSpaceQuickStart.tsx +69 -15
  50. package/src/components/DataSpaceViewer.tsx +2 -4
  51. package/src/components/DataSpaceWiki.tsx +0 -2
  52. package/src/graphManager/action/analytics/DataSpaceAnalysis.ts +71 -19
  53. package/src/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.ts +97 -29
  54. package/src/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.ts +22 -3
  55. package/src/stores/DataSpaceModelsDocumentationState.ts +588 -0
  56. package/src/stores/DataSpaceViewerState.ts +14 -0
  57. package/tsconfig.json +1 -1
  58. package/lib/graphManager/action/analytics/HACKY__DataSpaceUsageShowcase.d.ts +0 -57
  59. package/lib/graphManager/action/analytics/HACKY__DataSpaceUsageShowcase.d.ts.map +0 -1
  60. package/lib/graphManager/action/analytics/HACKY__DataSpaceUsageShowcase.js +0 -209
  61. package/lib/graphManager/action/analytics/HACKY__DataSpaceUsageShowcase.js.map +0 -1
  62. package/src/graphManager/action/analytics/HACKY__DataSpaceUsageShowcase.ts +0 -313
@@ -25,8 +25,6 @@ import { useApplicationStore } from '@finos/legend-application';
25
25
  import { DataSpaceWikiPlaceholder } from './DataSpacePlaceholder.js';
26
26
  import { useEffect } from 'react';
27
27
  import { flowResult } from 'mobx';
28
- import { AgGridReact } from '@ag-grid-community/react';
29
- import { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-model';
30
28
  import {
31
29
  DatasetEntitlementAccessApprovedReport,
32
30
  DatasetEntitlementAccessGrantedReport,
@@ -34,22 +32,13 @@ import {
34
32
  DatasetEntitlementAccessRequestedReport,
35
33
  DatasetEntitlementUnsupportedReport,
36
34
  } from '@finos/legend-graph';
35
+ import { DataGrid } from '@finos/legend-lego/data-grid';
37
36
 
38
- export const DataSpaceDataAccess = observer(
37
+ const DataAccessOverview = observer(
39
38
  (props: { dataSpaceViewerState: DataSpaceViewerState }) => {
40
39
  const { dataSpaceViewerState } = props;
41
40
  const dataAccessState = dataSpaceViewerState.dataAccessState;
42
41
  const applicationStore = useApplicationStore();
43
- const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
44
- const documentationUrl = analysisResult.supportInfo?.documentationUrl;
45
-
46
- const seeDocumentation = (): void => {
47
- if (documentationUrl) {
48
- applicationStore.navigationService.navigator.visitAddress(
49
- documentationUrl,
50
- );
51
- }
52
- };
53
42
 
54
43
  useEffect(() => {
55
44
  flowResult(dataAccessState.fetchDatasetSpecifications()).catch(
@@ -64,6 +53,102 @@ export const DataSpaceDataAccess = observer(
64
53
  dataSpaceViewerState.currentExecutionContext,
65
54
  ]);
66
55
 
56
+ return (
57
+ <div className="data-space__viewer__data-access__overview">
58
+ <PanelLoadingIndicator
59
+ isLoading={
60
+ dataAccessState.fetchDatasetSpecificationsState.isInProgress ||
61
+ dataAccessState.fetchDatasetEntitlementReportsState.isInProgress
62
+ }
63
+ />
64
+ <div className="data-space__viewer__data-access__chart"></div>
65
+ <div className="data-space__viewer__data-access__grid data-space__viewer__grid ag-theme-balham-dark">
66
+ <DataGrid
67
+ rowData={dataAccessState.datasets}
68
+ gridOptions={{
69
+ suppressScrollOnNewData: true,
70
+ getRowId: (rowData) => rowData.data.uuid,
71
+ }}
72
+ suppressFieldDotNotation={true}
73
+ columnDefs={[
74
+ {
75
+ minWidth: 50,
76
+ sortable: true,
77
+ resizable: true,
78
+ valueGetter: (params) => params.data?.specification.name,
79
+ headerName: 'Dataset',
80
+ flex: 1,
81
+ },
82
+ {
83
+ minWidth: 50,
84
+ sortable: true,
85
+ resizable: true,
86
+ valueGetter: (params) => params.data?.specification.type,
87
+ headerName: 'Type',
88
+ flex: 1,
89
+ },
90
+ {
91
+ minWidth: 50,
92
+ sortable: true,
93
+ resizable: true,
94
+ headerName: 'Access Status',
95
+ valueGetter: (params) => {
96
+ const entitlementReport = params.data?.entitlementReport;
97
+ if (
98
+ entitlementReport instanceof
99
+ DatasetEntitlementAccessGrantedReport
100
+ ) {
101
+ return 'Access Granted';
102
+ } else if (
103
+ entitlementReport instanceof
104
+ DatasetEntitlementAccessApprovedReport
105
+ ) {
106
+ return 'Access Approved';
107
+ } else if (
108
+ entitlementReport instanceof
109
+ DatasetEntitlementAccessRequestedReport
110
+ ) {
111
+ return 'Access Requested';
112
+ } else if (
113
+ entitlementReport instanceof
114
+ DatasetEntitlementAccessNotGrantedReport
115
+ ) {
116
+ return '(x) Access Not Granted';
117
+ } else if (
118
+ entitlementReport instanceof
119
+ DatasetEntitlementUnsupportedReport
120
+ ) {
121
+ return '(unsupported)';
122
+ }
123
+ return '';
124
+ },
125
+ flex: 1,
126
+ wrapText: true,
127
+ autoHeight: true,
128
+ },
129
+ ]}
130
+ />
131
+ </div>
132
+ </div>
133
+ );
134
+ },
135
+ );
136
+
137
+ export const DataSpaceDataAccess = observer(
138
+ (props: { dataSpaceViewerState: DataSpaceViewerState }) => {
139
+ const { dataSpaceViewerState } = props;
140
+ const applicationStore = useApplicationStore();
141
+ const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
142
+ const documentationUrl = analysisResult.supportInfo?.documentationUrl;
143
+
144
+ const seeDocumentation = (): void => {
145
+ if (documentationUrl) {
146
+ applicationStore.navigationService.navigator.visitAddress(
147
+ documentationUrl,
148
+ );
149
+ }
150
+ };
151
+
67
152
  return (
68
153
  <div className="data-space__viewer__wiki__section">
69
154
  <div className="data-space__viewer__wiki__section__header">
@@ -85,92 +170,12 @@ export const DataSpaceDataAccess = observer(
85
170
  )}
86
171
  </div>
87
172
  <div className="data-space__viewer__wiki__section__content">
88
- <PanelLoadingIndicator
89
- isLoading={
90
- dataAccessState.fetchDatasetSpecificationsState.isInProgress ||
91
- dataAccessState.fetchDatasetEntitlementReportsState.isInProgress
92
- }
93
- />
94
173
  <div className="data-space__viewer__data-access">
95
- {dataAccessState.datasets.length > 0 && (
174
+ {!dataSpaceViewerState.TEMPORARY__enableExperimentalFeatures && (
96
175
  <DataSpaceWikiPlaceholder message="View Data Access (Work in Progress)" />
97
176
  )}
98
- {dataAccessState.datasets.length === 0 && (
99
- <>
100
- <div className="data-space__viewer__data-access__chart"></div>
101
- <div className="data-space__viewer__data-access__grid data-space__viewer__grid ag-theme-balham-dark">
102
- <AgGridReact
103
- rowData={dataAccessState.datasets}
104
- gridOptions={{
105
- suppressScrollOnNewData: true,
106
- getRowId: (rowData) => rowData.data.uuid,
107
- }}
108
- modules={[ClientSideRowModelModule]}
109
- suppressFieldDotNotation={true}
110
- columnDefs={[
111
- {
112
- minWidth: 50,
113
- sortable: true,
114
- resizable: true,
115
- valueGetter: (params) =>
116
- params.data?.specification.name,
117
- headerName: 'Dataset',
118
- flex: 1,
119
- },
120
- {
121
- minWidth: 50,
122
- sortable: true,
123
- resizable: true,
124
- valueGetter: (params) =>
125
- params.data?.specification.type,
126
- headerName: 'Type',
127
- flex: 1,
128
- },
129
- {
130
- minWidth: 50,
131
- sortable: true,
132
- resizable: true,
133
- headerName: 'Access Status',
134
- valueGetter: (params) => {
135
- const entitlementReport =
136
- params.data?.entitlementReport;
137
- if (
138
- entitlementReport instanceof
139
- DatasetEntitlementAccessGrantedReport
140
- ) {
141
- return 'Access Granted';
142
- } else if (
143
- entitlementReport instanceof
144
- DatasetEntitlementAccessApprovedReport
145
- ) {
146
- return 'Access Approved';
147
- } else if (
148
- entitlementReport instanceof
149
- DatasetEntitlementAccessRequestedReport
150
- ) {
151
- return 'Access Requested';
152
- } else if (
153
- entitlementReport instanceof
154
- DatasetEntitlementAccessNotGrantedReport
155
- ) {
156
- return '(x) Access Not Granted';
157
- } else if (
158
- entitlementReport instanceof
159
- DatasetEntitlementUnsupportedReport
160
- ) {
161
- return '(unsupported)';
162
- }
163
- return '';
164
- },
165
- flex: 1,
166
- wrapText: true,
167
- autoHeight: true,
168
- },
169
- ]}
170
- />
171
- </div>
172
- <DataSpaceWikiPlaceholder message="No documentation provided" />
173
- </>
177
+ {dataSpaceViewerState.TEMPORARY__enableExperimentalFeatures && (
178
+ <DataAccessOverview dataSpaceViewerState={dataSpaceViewerState} />
174
179
  )}
175
180
  </div>
176
181
  </div>
@@ -168,7 +168,7 @@ export const DataSpaceDiagramViewer = observer(
168
168
  <div className="data-space__viewer__diagram-viewer__carousel__frame__indicators__notch">
169
169
  {analysisResult.diagrams.map((diagram) => (
170
170
  <button
171
- key={diagram.diagram.path}
171
+ key={diagram.uuid}
172
172
  className={clsx(
173
173
  'data-space__viewer__diagram-viewer__carousel__frame__indicator',
174
174
  {