@finos/legend-extension-dsl-data-space 9.1.4 → 9.1.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 (168) 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/DSL_DataSpace_LegendApplicationPlugin.d.ts +0 -4
  6. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.d.ts.map +1 -1
  7. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js +0 -3
  8. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js.map +1 -1
  9. package/lib/components/DataSpaceDataAccess.d.ts +23 -0
  10. package/lib/components/DataSpaceDataAccess.d.ts.map +1 -0
  11. package/lib/components/DataSpaceDataAccess.js +34 -0
  12. package/lib/components/DataSpaceDataAccess.js.map +1 -0
  13. package/lib/components/DataSpaceDescription.d.ts +23 -0
  14. package/lib/components/DataSpaceDescription.d.ts.map +1 -0
  15. package/lib/components/DataSpaceDescription.js +26 -0
  16. package/lib/components/DataSpaceDescription.js.map +1 -0
  17. package/lib/components/DataSpaceDiagramViewer.d.ts +23 -0
  18. package/lib/components/DataSpaceDiagramViewer.d.ts.map +1 -0
  19. package/lib/components/DataSpaceDiagramViewer.js +75 -0
  20. package/lib/components/DataSpaceDiagramViewer.js.map +1 -0
  21. package/lib/components/DataSpaceExecutionContextViewer.d.ts +23 -0
  22. package/lib/components/DataSpaceExecutionContextViewer.d.ts.map +1 -0
  23. package/lib/components/DataSpaceExecutionContextViewer.js +58 -0
  24. package/lib/components/DataSpaceExecutionContextViewer.js.map +1 -0
  25. package/lib/components/DataSpaceInfoPanel.d.ts +23 -0
  26. package/lib/components/DataSpaceInfoPanel.d.ts.map +1 -0
  27. package/lib/components/DataSpaceInfoPanel.js +38 -0
  28. package/lib/components/DataSpaceInfoPanel.js.map +1 -0
  29. package/lib/components/DataSpaceMarkdownTextViewer.d.ts +20 -0
  30. package/lib/components/DataSpaceMarkdownTextViewer.d.ts.map +1 -0
  31. package/lib/components/DataSpaceMarkdownTextViewer.js +25 -0
  32. package/lib/components/DataSpaceMarkdownTextViewer.js.map +1 -0
  33. package/lib/components/DataSpaceModelsDocumentation.d.ts +23 -0
  34. package/lib/components/DataSpaceModelsDocumentation.d.ts.map +1 -0
  35. package/lib/components/DataSpaceModelsDocumentation.js +58 -0
  36. package/lib/components/DataSpaceModelsDocumentation.js.map +1 -0
  37. package/lib/components/{studio/DataSpacePreview.d.ts → DataSpacePlaceholder.d.ts} +4 -4
  38. package/lib/components/DataSpacePlaceholder.d.ts.map +1 -0
  39. package/lib/components/DataSpacePlaceholder.js +18 -0
  40. package/lib/components/DataSpacePlaceholder.js.map +1 -0
  41. package/lib/components/DataSpaceQuickStart.d.ts +23 -0
  42. package/lib/components/DataSpaceQuickStart.d.ts.map +1 -0
  43. package/lib/components/DataSpaceQuickStart.js +108 -0
  44. package/lib/components/DataSpaceQuickStart.js.map +1 -0
  45. package/lib/components/DataSpaceSupportPanel.d.ts +23 -0
  46. package/lib/components/DataSpaceSupportPanel.d.ts.map +1 -0
  47. package/lib/components/DataSpaceSupportPanel.js +40 -0
  48. package/lib/components/DataSpaceSupportPanel.js.map +1 -0
  49. package/lib/components/DataSpaceViewer.d.ts.map +1 -1
  50. package/lib/components/DataSpaceViewer.js +40 -276
  51. package/lib/components/DataSpaceViewer.js.map +1 -1
  52. package/lib/components/DataSpaceViewerActivityBar.d.ts +23 -0
  53. package/lib/components/DataSpaceViewerActivityBar.d.ts.map +1 -0
  54. package/lib/components/DataSpaceViewerActivityBar.js +105 -0
  55. package/lib/components/DataSpaceViewerActivityBar.js.map +1 -0
  56. package/lib/components/DataSpaceWiki.d.ts +23 -0
  57. package/lib/components/DataSpaceWiki.d.ts.map +1 -0
  58. package/lib/components/DataSpaceWiki.js +12 -0
  59. package/lib/components/DataSpaceWiki.js.map +1 -0
  60. package/lib/components/query/DataSpaceAdvancedSearchModal.js +1 -1
  61. package/lib/components/query/DataSpaceAdvancedSearchModal.js.map +1 -1
  62. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts +1 -2
  63. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts.map +1 -1
  64. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js +0 -13
  65. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js.map +1 -1
  66. package/lib/components/studio/DataSpacePreviewAction.js +1 -1
  67. package/lib/components/studio/DataSpacePreviewAction.js.map +1 -1
  68. package/lib/graph/DSL_DataSpace_HashUtils.d.ts +3 -2
  69. package/lib/graph/DSL_DataSpace_HashUtils.d.ts.map +1 -1
  70. package/lib/graph/DSL_DataSpace_HashUtils.js +3 -2
  71. package/lib/graph/DSL_DataSpace_HashUtils.js.map +1 -1
  72. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.d.ts +23 -0
  73. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.d.ts.map +1 -1
  74. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js +50 -0
  75. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js.map +1 -1
  76. package/lib/graphManager/DSL_DataSpace_PureGraphManagerPlugin.d.ts +5 -0
  77. package/lib/graphManager/DSL_DataSpace_PureGraphManagerPlugin.d.ts.map +1 -1
  78. package/lib/graphManager/DSL_DataSpace_PureGraphManagerPlugin.js +7 -0
  79. package/lib/graphManager/DSL_DataSpace_PureGraphManagerPlugin.js.map +1 -1
  80. package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts +39 -5
  81. package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts.map +1 -1
  82. package/lib/graphManager/action/analytics/DataSpaceAnalysis.js +40 -8
  83. package/lib/graphManager/action/analytics/DataSpaceAnalysis.js.map +1 -1
  84. package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.d.ts.map +1 -1
  85. package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js +70 -11
  86. package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js.map +1 -1
  87. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.d.ts.map +1 -1
  88. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js +62 -10
  89. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js.map +1 -1
  90. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_SystemModels.json +7 -0
  91. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts +39 -0
  92. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts.map +1 -1
  93. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js +92 -3
  94. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js.map +1 -1
  95. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.d.ts +23 -0
  96. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.d.ts.map +1 -1
  97. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js +50 -0
  98. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js.map +1 -1
  99. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.d.ts +0 -1
  100. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.d.ts.map +1 -1
  101. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js +33 -5
  102. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js.map +1 -1
  103. package/lib/index.css +2 -2
  104. package/lib/index.css.map +1 -1
  105. package/lib/index.d.ts +2 -1
  106. package/lib/index.d.ts.map +1 -1
  107. package/lib/index.js +2 -1
  108. package/lib/index.js.map +1 -1
  109. package/lib/package.json +10 -6
  110. package/lib/stores/DSL_DataSpace_LegendApplicationPlugin_Extension.d.ts +32 -0
  111. package/lib/stores/DSL_DataSpace_LegendApplicationPlugin_Extension.d.ts.map +1 -0
  112. package/lib/stores/DSL_DataSpace_LegendApplicationPlugin_Extension.js +17 -0
  113. package/lib/stores/DSL_DataSpace_LegendApplicationPlugin_Extension.js.map +1 -0
  114. package/lib/stores/DataSpaceViewerState.d.ts +17 -14
  115. package/lib/stores/DataSpaceViewerState.d.ts.map +1 -1
  116. package/lib/stores/DataSpaceViewerState.js +25 -12
  117. package/lib/stores/DataSpaceViewerState.js.map +1 -1
  118. package/lib/stores/studio/DataSpacePreviewState.d.ts.map +1 -1
  119. package/lib/stores/studio/DataSpacePreviewState.js +0 -3
  120. package/lib/stores/studio/DataSpacePreviewState.js.map +1 -1
  121. package/package.json +21 -17
  122. package/src/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.ts +15 -2
  123. package/src/components/DSL_DataSpace_LegendApplicationPlugin.ts +0 -9
  124. package/src/components/DataSpaceDataAccess.tsx +66 -0
  125. package/src/components/DataSpaceDescription.tsx +55 -0
  126. package/src/components/DataSpaceDiagramViewer.tsx +199 -0
  127. package/src/components/DataSpaceExecutionContextViewer.tsx +167 -0
  128. package/src/components/DataSpaceInfoPanel.tsx +170 -0
  129. package/src/components/DataSpaceMarkdownTextViewer.tsx +33 -0
  130. package/src/components/DataSpaceModelsDocumentation.tsx +99 -0
  131. package/src/components/DataSpacePlaceholder.tsx +21 -0
  132. package/src/components/DataSpaceQuickStart.tsx +381 -0
  133. package/src/components/DataSpaceSupportPanel.tsx +80 -0
  134. package/src/components/DataSpaceViewer.tsx +88 -1052
  135. package/src/components/DataSpaceViewerActivityBar.tsx +215 -0
  136. package/src/components/DataSpaceWiki.tsx +41 -0
  137. package/src/components/query/DataSpaceAdvancedSearchModal.tsx +1 -1
  138. package/src/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.tsx +0 -15
  139. package/src/components/studio/DataSpacePreviewAction.tsx +1 -1
  140. package/src/graph/DSL_DataSpace_HashUtils.ts +3 -2
  141. package/src/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.ts +60 -0
  142. package/src/graphManager/DSL_DataSpace_PureGraphManagerPlugin.ts +9 -0
  143. package/src/graphManager/action/analytics/DataSpaceAnalysis.ts +54 -15
  144. package/src/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.ts +99 -14
  145. package/src/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.ts +86 -17
  146. package/src/graphManager/protocol/pure/v1/V1_DSL_DataSpace_SystemModels.json +7 -0
  147. package/src/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.ts +140 -2
  148. package/src/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.ts +60 -0
  149. package/src/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.ts +51 -7
  150. package/src/index.ts +2 -4
  151. package/src/stores/DSL_DataSpace_LegendApplicationPlugin_Extension.ts +41 -0
  152. package/src/stores/DataSpaceViewerState.ts +39 -20
  153. package/src/stores/studio/DataSpacePreviewState.ts +0 -5
  154. package/tsconfig.json +13 -3
  155. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.d.ts +0 -28
  156. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.d.ts.map +0 -1
  157. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.js +0 -30
  158. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.js.map +0 -1
  159. package/lib/components/studio/DataSpacePreview.d.ts.map +0 -1
  160. package/lib/components/studio/DataSpacePreview.js +0 -52
  161. package/lib/components/studio/DataSpacePreview.js.map +0 -1
  162. package/lib/stores/studio/DataSpacePreviewStore.d.ts +0 -34
  163. package/lib/stores/studio/DataSpacePreviewStore.d.ts.map +0 -1
  164. package/lib/stores/studio/DataSpacePreviewStore.js +0 -98
  165. package/lib/stores/studio/DataSpacePreviewStore.js.map +0 -1
  166. package/src/application/studio/DSL_DataSpace_LegendStudioNavigation.ts +0 -53
  167. package/src/components/studio/DataSpacePreview.tsx +0 -129
  168. package/src/stores/studio/DataSpacePreviewStore.ts +0 -172
@@ -43,10 +43,14 @@ import {
43
43
  V1_DataSpace,
44
44
  V1_DataSpaceExecutionContext,
45
45
  V1_DataSpaceSupportEmail,
46
+ V1_DataSpaceSupportCombinedInfo,
47
+ V1_DataSpaceExecutable,
48
+ V1_DataSpaceDiagram,
46
49
  } from '../../model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js';
47
50
 
48
51
  export const V1_DATA_SPACE_ELEMENT_PROTOCOL_TYPE = 'dataSpace';
49
- export const V1_DATA_SPACE_SUPPORT_EMAIL_TYPE = 'email';
52
+ const V1_DATA_SPACE_SUPPORT_EMAIL_TYPE = 'email';
53
+ const V1_DATA_SPACE_SUPPORT_COMBINED_INFO_TYPE = 'combined';
50
54
 
51
55
  const V1_dataSpaceExecutionContextModelSchema = createModelSchema(
52
56
  V1_DataSpaceExecutionContext,
@@ -57,13 +61,30 @@ const V1_dataSpaceExecutionContextModelSchema = createModelSchema(
57
61
  description: optional(primitive()),
58
62
  mapping: usingModelSchema(V1_packageableElementPointerDeserializerSchema),
59
63
  name: primitive(),
64
+ title: optional(primitive()),
60
65
  },
61
66
  );
62
67
 
63
- const V1_dataSpaceSupportEmail = createModelSchema(V1_DataSpaceSupportEmail, {
64
- _type: usingConstantValueSchema(V1_DATA_SPACE_SUPPORT_EMAIL_TYPE),
65
- address: primitive(),
66
- });
68
+ const V1_dataSpaceSupportEmailModelSchema = createModelSchema(
69
+ V1_DataSpaceSupportEmail,
70
+ {
71
+ _type: usingConstantValueSchema(V1_DATA_SPACE_SUPPORT_EMAIL_TYPE),
72
+ address: primitive(),
73
+ documentationUrl: optional(primitive()),
74
+ },
75
+ );
76
+
77
+ const V1_dataSpaceSupportCombinedInfoModelSchema = createModelSchema(
78
+ V1_DataSpaceSupportCombinedInfo,
79
+ {
80
+ _type: usingConstantValueSchema(V1_DATA_SPACE_SUPPORT_COMBINED_INFO_TYPE),
81
+ emails: optional(list(primitive())),
82
+ faqUrl: optional(primitive()),
83
+ documentationUrl: optional(primitive()),
84
+ supportUrl: optional(primitive()),
85
+ website: optional(primitive()),
86
+ },
87
+ );
67
88
 
68
89
  const V1_serializeSupportInfo = (
69
90
  protocol: V1_DataSpaceSupportInfo | undefined,
@@ -72,7 +93,9 @@ const V1_serializeSupportInfo = (
72
93
  return SKIP;
73
94
  }
74
95
  if (protocol instanceof V1_DataSpaceSupportEmail) {
75
- return serialize(V1_dataSpaceSupportEmail, protocol);
96
+ return serialize(V1_dataSpaceSupportEmailModelSchema, protocol);
97
+ } else if (protocol instanceof V1_DataSpaceSupportCombinedInfo) {
98
+ return serialize(V1_dataSpaceSupportCombinedInfoModelSchema, protocol);
76
99
  }
77
100
  throw new UnsupportedOperationError(`Can't serialize support info`, protocol);
78
101
  };
@@ -85,7 +108,9 @@ export const V1_deserializeSupportInfo = (
85
108
  }
86
109
  switch (json._type) {
87
110
  case V1_DATA_SPACE_SUPPORT_EMAIL_TYPE:
88
- return deserialize(V1_dataSpaceSupportEmail, json);
111
+ return deserialize(V1_dataSpaceSupportEmailModelSchema, json);
112
+ case V1_DATA_SPACE_SUPPORT_COMBINED_INFO_TYPE:
113
+ return deserialize(V1_dataSpaceSupportCombinedInfoModelSchema, json);
89
114
  default: {
90
115
  throw new UnsupportedOperationError(
91
116
  `Can't deserialize support info of type '${json._type}'`,
@@ -94,13 +119,32 @@ export const V1_deserializeSupportInfo = (
94
119
  }
95
120
  };
96
121
 
122
+ const V1_dataSpaceExecutableModelSchema = createModelSchema(
123
+ V1_DataSpaceExecutable,
124
+ {
125
+ description: optional(primitive()),
126
+ executable: usingModelSchema(
127
+ V1_packageableElementPointerDeserializerSchema,
128
+ ),
129
+ title: primitive(),
130
+ },
131
+ );
132
+
133
+ const V1_dataSpaceDiagramModelSchema = createModelSchema(V1_DataSpaceDiagram, {
134
+ description: optional(primitive()),
135
+ diagram: usingModelSchema(V1_packageableElementPointerDeserializerSchema),
136
+ title: primitive(),
137
+ });
138
+
97
139
  export const V1_dataSpaceModelSchema = createModelSchema(V1_DataSpace, {
98
140
  _type: usingConstantValueSchema(V1_DATA_SPACE_ELEMENT_PROTOCOL_TYPE),
99
141
  defaultExecutionContext: primitive(),
100
142
  description: optional(primitive()),
143
+ diagrams: list(object(V1_dataSpaceDiagramModelSchema)),
101
144
  elements: optionalCustomListWithSchema(
102
145
  V1_packageableElementPointerDeserializerSchema,
103
146
  ),
147
+ executables: list(object(V1_dataSpaceExecutableModelSchema)),
104
148
  executionContexts: list(object(V1_dataSpaceExecutionContextModelSchema)),
105
149
  featuredDiagrams: optionalCustomListWithSchema(
106
150
  V1_packageableElementPointerDeserializerSchema,
package/src/index.ts CHANGED
@@ -17,10 +17,8 @@
17
17
  export * from './DSL_DataSpace_Extension.js';
18
18
  export { DSL_DataSpace_LegendStudioApplicationPlugin } from './components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js';
19
19
  export { DSL_DataSpace_LegendQueryApplicationPlugin } from './components/query/DSL_DataSpace_LegendQueryApplicationPlugin.js';
20
- export {
21
- type CheckEntitlementEditorRender,
22
- DSL_DataSpace_LegendApplicationPlugin,
23
- } from './components/DSL_DataSpace_LegendApplicationPlugin.js';
20
+ export { DSL_DataSpace_LegendApplicationPlugin } from './components/DSL_DataSpace_LegendApplicationPlugin.js';
21
+ export * from './stores/DSL_DataSpace_LegendApplicationPlugin_Extension.js';
24
22
  export { DataSpaceViewer } from './components/DataSpaceViewer.js';
25
23
 
26
24
  export {
@@ -0,0 +1,41 @@
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 { LegendApplicationPlugin } from '@finos/legend-application';
18
+ import type { DataSpaceViewerState } from './DataSpaceViewerState.js';
19
+ import type {
20
+ DataSpaceExecutableAnalysisResult,
21
+ DataSpaceExecutableTDSResult,
22
+ } from '../graphManager/action/analytics/DataSpaceAnalysis.js';
23
+
24
+ export type TDSExecutableActionConfiguration = {
25
+ key: string;
26
+ title: string;
27
+ icon?: React.ReactNode | undefined;
28
+ renderer: (
29
+ dataSpaceViewerState: DataSpaceViewerState,
30
+ executableAnalysisResult: DataSpaceExecutableAnalysisResult,
31
+ tdsResult: DataSpaceExecutableTDSResult,
32
+ ) => React.ReactNode | undefined;
33
+ };
34
+
35
+ export interface DSL_DataSpace_LegendApplicationPlugin_Extension
36
+ extends LegendApplicationPlugin {
37
+ /**
38
+ * Get the list of configurations of actions for TDS executable
39
+ */
40
+ getExtraDataSpaceTDSExecutableActionConfigurations?(): TDSExecutableActionConfiguration[];
41
+ }
@@ -18,7 +18,6 @@ import type { GenericLegendApplicationStore } from '@finos/legend-application';
18
18
  import {
19
19
  type ClassView,
20
20
  type DiagramRenderer,
21
- type Diagram,
22
21
  DIAGRAM_INTERACTION_MODE,
23
22
  } from '@finos/legend-extension-dsl-diagram';
24
23
  import type {
@@ -32,18 +31,27 @@ import {
32
31
  import { action, computed, makeObservable, observable } from 'mobx';
33
32
  import type {
34
33
  DataSpaceAnalysisResult,
34
+ DataSpaceDiagramAnalysisResult,
35
35
  DataSpaceExecutionContextAnalysisResult,
36
36
  } from '../graphManager/action/analytics/DataSpaceAnalysis.js';
37
+ import {
38
+ PURE_DATA_SPACE_INFO_PROFILE_PATH,
39
+ PURE_DATA_SPACE_INFO_PROFILE_VERIFIED_STEREOTYPE,
40
+ } from '../graphManager/DSL_DataSpace_PureGraphManagerPlugin.js';
37
41
 
38
42
  export enum DATA_SPACE_VIEWER_ACTIVITY_MODE {
39
- OVERVIEW = 'OVERVIEW',
40
- DOCUMENTATION = 'DOCUMENTATION',
41
- USAGE_SHOWCASE = 'USAGE SHOWCASE',
42
- EXECUTION = 'EXECUTION',
43
- ENTITLEMENT = 'ENTITLEMENT',
44
- TEST_DATA = 'TEST_DATA',
45
- TEST_COVERAGE = 'TEST_COVERAGE',
46
- INFO = 'INFO',
43
+ DESCRIPTION = 'DESCRIPTION',
44
+ DIAGRAM_VIEWER = 'DIAGRAM_VIEWER',
45
+ MODELS_DOCUMENTATION = 'MODELS_DOCUMENTATION',
46
+ QUICK_START = 'QUICK_START',
47
+ EXECUTION_CONTEXT = 'EXECUTION_CONTEXT',
48
+ DATA_ACCESS = 'DATA_ACCESS',
49
+
50
+ DATA_STORES = 'DATA_STORES', // TODO: with test-data, also let user call TDS query on top of these
51
+ DATA_AVAILABILITY = 'DATA_AVAILABILITY',
52
+ DATA_COST = 'DATA_COST',
53
+ DATA_GOVERNANCE = 'DATA_GOVERNANCE',
54
+ INFO = 'INFO', // TODO: test coverage? (or maybe this should be done in elements/diagrams/data-quality section)
47
55
  SUPPORT = 'SUPPORT',
48
56
  }
49
57
 
@@ -69,12 +77,12 @@ export class DataSpaceViewerState {
69
77
  readonly onDiagramClassDoubleClick: (classView: ClassView) => void;
70
78
 
71
79
  _renderer?: DiagramRenderer | undefined;
72
- currentDiagram?: Diagram | undefined;
73
- currentActivity = DATA_SPACE_VIEWER_ACTIVITY_MODE.OVERVIEW;
80
+ currentDiagram?: DataSpaceDiagramAnalysisResult | undefined;
81
+ currentActivity = DATA_SPACE_VIEWER_ACTIVITY_MODE.DESCRIPTION;
74
82
  currentExecutionContext: DataSpaceExecutionContextAnalysisResult;
75
83
  currentRuntime: PackageableRuntime;
76
84
 
77
- HACKY__previewExperimentalFeatures = false;
85
+ isExpandedModeEnabled = false;
78
86
 
79
87
  constructor(
80
88
  applicationStore: GenericLegendApplicationStore,
@@ -97,9 +105,6 @@ export class DataSpaceViewerState {
97
105
  ) => Promise<void>;
98
106
  onDiagramClassDoubleClick: (classView: ClassView) => void;
99
107
  },
100
- options?: {
101
- HACKY__previewExperimentalFeatures?: boolean | undefined;
102
- },
103
108
  ) {
104
109
  makeObservable(this, {
105
110
  _renderer: observable,
@@ -107,12 +112,15 @@ export class DataSpaceViewerState {
107
112
  currentActivity: observable,
108
113
  currentExecutionContext: observable,
109
114
  currentRuntime: observable,
115
+ isExpandedModeEnabled: observable,
116
+ isVerified: computed,
110
117
  renderer: computed,
111
118
  setRenderer: action,
112
119
  setCurrentDiagram: action,
113
120
  setCurrentActivity: action,
114
121
  setCurrentExecutionContext: action,
115
122
  setCurrentRuntime: action,
123
+ enableExpandedMode: action,
116
124
  });
117
125
 
118
126
  this.applicationStore = applicationStore;
@@ -125,14 +133,11 @@ export class DataSpaceViewerState {
125
133
  dataSpaceAnalysisResult.defaultExecutionContext;
126
134
  this.currentRuntime = this.currentExecutionContext.defaultRuntime;
127
135
  this.currentDiagram = getNullableFirstElement(
128
- this.dataSpaceAnalysisResult.featuredDiagrams,
136
+ this.dataSpaceAnalysisResult.diagrams,
129
137
  );
130
138
  this.viewProject = actions.viewProject;
131
139
  this.viewSDLCProject = actions.viewSDLCProject;
132
140
  this.onDiagramClassDoubleClick = actions.onDiagramClassDoubleClick;
133
- this.HACKY__previewExperimentalFeatures = Boolean(
134
- options?.HACKY__previewExperimentalFeatures,
135
- );
136
141
  }
137
142
 
138
143
  get renderer(): DiagramRenderer {
@@ -169,11 +174,21 @@ export class DataSpaceViewerState {
169
174
  }
170
175
  }
171
176
 
177
+ get isVerified(): boolean {
178
+ return Boolean(
179
+ this.dataSpaceAnalysisResult.stereotypes.find(
180
+ (stereotype) =>
181
+ stereotype.profile === PURE_DATA_SPACE_INFO_PROFILE_PATH &&
182
+ stereotype.value === PURE_DATA_SPACE_INFO_PROFILE_VERIFIED_STEREOTYPE,
183
+ ),
184
+ );
185
+ }
186
+
172
187
  setRenderer(val: DiagramRenderer): void {
173
188
  this._renderer = val;
174
189
  }
175
190
 
176
- setCurrentDiagram(val: Diagram): void {
191
+ setCurrentDiagram(val: DataSpaceDiagramAnalysisResult): void {
177
192
  this.currentDiagram = val;
178
193
  }
179
194
 
@@ -198,4 +213,8 @@ export class DataSpaceViewerState {
198
213
  this.renderer.onClassViewDoubleClick = (classView: ClassView): void =>
199
214
  this.onDiagramClassDoubleClick(classView);
200
215
  }
216
+
217
+ enableExpandedMode(val: boolean): void {
218
+ this.isExpandedModeEnabled = val;
219
+ }
201
220
  }
@@ -132,11 +132,6 @@ export class DataSpacePreviewState extends EditorExtensionState {
132
132
  );
133
133
  },
134
134
  },
135
- {
136
- HACKY__previewExperimentalFeatures:
137
- this.editorStore.applicationStore.config.options
138
- .HACKY__previewExperimentalFeatures,
139
- },
140
135
  );
141
136
  this.loadDataSpaceState.pass();
142
137
  } catch (error) {
package/tsconfig.json CHANGED
@@ -38,7 +38,6 @@
38
38
  "./src/application/query/DSL_DataSpace_LegendQueryNavigation.ts",
39
39
  "./src/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.ts",
40
40
  "./src/application/studio/DSL_DataSpace_LegendStudioDocumentation.ts",
41
- "./src/application/studio/DSL_DataSpace_LegendStudioNavigation.ts",
42
41
  "./src/components/DSL_DataSpace_LegendApplicationPlugin.ts",
43
42
  "./src/graph/DSL_DataSpace_HashUtils.ts",
44
43
  "./src/graph/DSL_DataSpace_PureGraphPlugin.ts",
@@ -57,6 +56,7 @@
57
56
  "./src/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.ts",
58
57
  "./src/graphManager/protocol/pure/v1/transformation/pureGraph/V1_DSL_DataSpace_GraphBuilderHelper.ts",
59
58
  "./src/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.ts",
59
+ "./src/stores/DSL_DataSpace_LegendApplicationPlugin_Extension.ts",
60
60
  "./src/stores/DataSpaceViewerState.ts",
61
61
  "./src/stores/query/DataSpaceAdvancedSearchState.ts",
62
62
  "./src/stores/query/DataSpaceInfo.ts",
@@ -64,16 +64,26 @@
64
64
  "./src/stores/query/DataSpaceQueryCreatorStore.ts",
65
65
  "./src/stores/query/DataSpaceQuerySetupStore.ts",
66
66
  "./src/stores/studio/DataSpacePreviewState.ts",
67
- "./src/stores/studio/DataSpacePreviewStore.ts",
68
67
  "./src/components/DSL_DataSpace_Icon.tsx",
68
+ "./src/components/DataSpaceDataAccess.tsx",
69
+ "./src/components/DataSpaceDescription.tsx",
70
+ "./src/components/DataSpaceDiagramViewer.tsx",
71
+ "./src/components/DataSpaceExecutionContextViewer.tsx",
72
+ "./src/components/DataSpaceInfoPanel.tsx",
73
+ "./src/components/DataSpaceMarkdownTextViewer.tsx",
74
+ "./src/components/DataSpaceModelsDocumentation.tsx",
75
+ "./src/components/DataSpacePlaceholder.tsx",
76
+ "./src/components/DataSpaceQuickStart.tsx",
77
+ "./src/components/DataSpaceSupportPanel.tsx",
69
78
  "./src/components/DataSpaceViewer.tsx",
79
+ "./src/components/DataSpaceViewerActivityBar.tsx",
80
+ "./src/components/DataSpaceWiki.tsx",
70
81
  "./src/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.tsx",
71
82
  "./src/components/query/DataSpaceAdvancedSearchModal.tsx",
72
83
  "./src/components/query/DataSpaceQueryBuilder.tsx",
73
84
  "./src/components/query/DataSpaceQueryCreator.tsx",
74
85
  "./src/components/query/DataSpaceQuerySetup.tsx",
75
86
  "./src/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.tsx",
76
- "./src/components/studio/DataSpacePreview.tsx",
77
87
  "./src/components/studio/DataSpacePreviewAction.tsx",
78
88
  "./src/graphManager/protocol/pure/v1/V1_DSL_DataSpace_SystemModels.json"
79
89
  ],
@@ -1,28 +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
- export declare enum DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN {
17
- GAV = "gav",
18
- DATA_SPACE_PATH = "dataSpacePath"
19
- }
20
- export type DataSpacePreviewPathParams = {
21
- [DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN.GAV]: string;
22
- [DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH]: string;
23
- };
24
- export declare const DATA_SPACE_STUDIO_ROUTE_PATTERN: Readonly<{
25
- PREVIEW: "/dataspace/preview/:gav/:dataSpacePath";
26
- }>;
27
- export declare const generateDataSpacePreviewRoute: (groupId: string, artifactId: string, versionId: string, dataSpacePath: string) => string;
28
- //# sourceMappingURL=DSL_DataSpace_LegendStudioNavigation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DSL_DataSpace_LegendStudioNavigation.d.ts","sourceRoot":"","sources":["../../../src/application/studio/DSL_DataSpace_LegendStudioNavigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAQH,oBAAY,qCAAqC;IAC/C,GAAG,QAAQ;IACX,eAAe,kBAAkB;CAClC;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,CAAC,qCAAqC,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACpD,CAAC,qCAAqC,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACjE,CAAC;AAEF,eAAO,MAAM,+BAA+B;;EAE1C,CAAC;AAEH,eAAO,MAAM,6BAA6B,YAC/B,MAAM,cACH,MAAM,aACP,MAAM,iBACF,MAAM,KACpB,MAWA,CAAC"}
@@ -1,30 +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 { generateExtensionUrlPattern, generatePath, } from '@finos/legend-application';
17
- import { generateGAVCoordinates } from '@finos/legend-storage';
18
- export var DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN;
19
- (function (DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN) {
20
- DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN["GAV"] = "gav";
21
- DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN["DATA_SPACE_PATH"] = "dataSpacePath";
22
- })(DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN = DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN || (DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN = {}));
23
- export const DATA_SPACE_STUDIO_ROUTE_PATTERN = Object.freeze({
24
- PREVIEW: `/dataspace/preview/:${DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN.GAV}/:${DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH}`,
25
- });
26
- export const generateDataSpacePreviewRoute = (groupId, artifactId, versionId, dataSpacePath) => generatePath(generateExtensionUrlPattern(DATA_SPACE_STUDIO_ROUTE_PATTERN.PREVIEW), {
27
- [DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN.GAV]: generateGAVCoordinates(groupId, artifactId, versionId),
28
- [DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH]: dataSpacePath,
29
- });
30
- //# sourceMappingURL=DSL_DataSpace_LegendStudioNavigation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DSL_DataSpace_LegendStudioNavigation.js","sourceRoot":"","sources":["../../../src/application/studio/DSL_DataSpace_LegendStudioNavigation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,2BAA2B,EAC3B,YAAY,GACb,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,MAAM,CAAN,IAAY,qCAGX;AAHD,WAAY,qCAAqC;IAC/C,oDAAW,CAAA;IACX,0EAAiC,CAAA;AACnC,CAAC,EAHW,qCAAqC,GAArC,qCAAqC,KAArC,qCAAqC,QAGhD;AAOD,MAAM,CAAC,MAAM,+BAA+B,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3D,OAAO,EAAE,uBAAuB,qCAAqC,CAAC,GAAG,KAAK,qCAAqC,CAAC,eAAe,EAAE;CACtI,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAC3C,OAAe,EACf,UAAkB,EAClB,SAAiB,EACjB,aAAqB,EACb,EAAE,CACV,YAAY,CACV,2BAA2B,CAAC,+BAA+B,CAAC,OAAO,CAAC,EACpE;IACE,CAAC,qCAAqC,CAAC,GAAG,CAAC,EAAE,sBAAsB,CACjE,OAAO,EACP,UAAU,EACV,SAAS,CACV;IACD,CAAC,qCAAqC,CAAC,eAAe,CAAC,EAAE,aAAa;CACvE,CACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataSpacePreview.d.ts","sourceRoot":"","sources":["../../../src/components/studio/DataSpacePreview.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAuGH,eAAO,MAAM,gBAAgB;;CAW3B,CAAC"}
@@ -1,52 +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 { observer, useLocalObservable } from 'mobx-react-lite';
18
- import { useApplicationStore, useParams } from '@finos/legend-application';
19
- import { useDepotServerClient } from '@finos/legend-server-depot';
20
- import { parseGAVCoordinates } from '@finos/legend-storage';
21
- import { DataSpacePreviewStore } from '../../stores/studio/DataSpacePreviewStore.js';
22
- import { createContext, useContext, useEffect } from 'react';
23
- import { useLegendStudioApplicationStore } from '@finos/legend-application-studio';
24
- import { DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN, } from '../../application/studio/DSL_DataSpace_LegendStudioNavigation.js';
25
- import { guaranteeNonNullable } from '@finos/legend-shared';
26
- import { flowResult } from 'mobx';
27
- import { DataSpaceViewer } from '../DataSpaceViewer.js';
28
- import { BlankPanelContent, PanelLoadingIndicator, TimesCircleIcon, } from '@finos/legend-art';
29
- const DataSpacePreviewStoreContext = createContext(undefined);
30
- const DataSpacePreviewStoreProvider = ({ children, gav, dataSpacePath }) => {
31
- const { groupId, artifactId, versionId } = parseGAVCoordinates(gav);
32
- const applicationStore = useLegendStudioApplicationStore();
33
- const depotServerClient = useDepotServerClient();
34
- const store = useLocalObservable(() => new DataSpacePreviewStore(applicationStore, depotServerClient, groupId, artifactId, versionId, dataSpacePath));
35
- return (_jsx(DataSpacePreviewStoreContext.Provider, { value: store, children: children }));
36
- };
37
- const useDataSpacePreviewStore = () => guaranteeNonNullable(useContext(DataSpacePreviewStoreContext), `Can't find data space preview store in context`);
38
- const DataSpacePreviewInner = observer(() => {
39
- const previewStore = useDataSpacePreviewStore();
40
- const applicationStore = useApplicationStore();
41
- useEffect(() => {
42
- flowResult(previewStore.initialize()).catch(applicationStore.alertUnhandledError);
43
- }, [applicationStore, previewStore]);
44
- return (_jsxs("div", { className: "data-space-preview", children: [_jsx(PanelLoadingIndicator, { isLoading: previewStore.loadDataSpaceState.isInProgress }), previewStore.dataSpaceViewerState && (_jsx(DataSpaceViewer, { dataSpaceViewerState: previewStore.dataSpaceViewerState })), !previewStore.dataSpaceViewerState && (_jsxs(_Fragment, { children: [previewStore.loadDataSpaceState.isInProgress && (_jsx(BlankPanelContent, { children: previewStore.loadDataSpaceState.message })), previewStore.loadDataSpaceState.hasFailed && (_jsx(BlankPanelContent, { children: _jsxs("div", { className: "data-space-preview__failure", children: [_jsx("div", { className: "data-space-preview__failure__icon", children: _jsx(TimesCircleIcon, {}) }), _jsx("div", { className: "data-space-preview__failure__text", children: "Can't load data space" })] }) }))] }))] }));
45
- });
46
- export const DataSpacePreview = observer(() => {
47
- const parameters = useParams();
48
- const gav = parameters[DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN.GAV];
49
- const dataSpacePath = parameters[DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH];
50
- return (_jsx(DataSpacePreviewStoreProvider, { gav: gav, dataSpacePath: dataSpacePath, children: _jsx(DataSpacePreviewInner, {}) }));
51
- });
52
- //# sourceMappingURL=DataSpacePreview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataSpacePreview.js","sourceRoot":"","sources":["../../../src/components/studio/DataSpacePreview.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EACL,qCAAqC,GAEtC,MAAM,kEAAkE,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,4BAA4B,GAAG,aAAa,CAEhD,SAAS,CAAC,CAAC;AAEb,MAAM,6BAA6B,GAI9B,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,EAAE,EAAE,EAAE;IACxC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;IACpE,MAAM,gBA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I,CAC5C,KAAC,iBAAiB,cAChB,eAAK,SAAS,EAAC,6BAA6B,aAC1C,cAAK,SAAS,EAAC,mCAAmC,YAChD,KAAC,eAAe,KAAG,GACf,EACN,cAAK,SAAS,EAAC,mCAAmC,sCAE5C,IACF,GACY,CACrB,IACA,CACJ,IACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,GAAG,EAAE;IAC5C,MAAM,UAAU,GAAG,SAAS,EAA8B,CAAC;IAC3D,MAAM,GAAG,GAAG,UAAU,CAAC,qCAAqC,CAAC,GAAG,CAAC,CAAC;IAClE,MAAM,aAAa,GACjB,UAAU,CAAC,qCAAqC,CAAC,eAAe,CAAC,CAAC;IAEpE,OAAO,CACL,KAAC,6BAA6B,IAAC,GAAG,EAAE,GAAG,EAAE,aAAa,EAAE,aAAa,YACnE,KAAC,qBAAqB,KAAG,GACK,CACjC,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,34 +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 DepotServerClient } from '@finos/legend-server-depot';
17
- import type { LegendStudioApplicationStore } from '@finos/legend-application-studio';
18
- import { ActionState, type GeneratorFn } from '@finos/legend-shared';
19
- import { DataSpaceViewerState } from '../DataSpaceViewerState.js';
20
- import { BasicGraphManagerState } from '@finos/legend-graph';
21
- export declare class DataSpacePreviewStore {
22
- readonly applicationStore: LegendStudioApplicationStore;
23
- readonly depotServerClient: DepotServerClient;
24
- readonly graphManagerState: BasicGraphManagerState;
25
- readonly groupId: string;
26
- readonly artifactId: string;
27
- readonly versionId: string;
28
- readonly dataSpacePath: string;
29
- readonly loadDataSpaceState: ActionState;
30
- dataSpaceViewerState?: DataSpaceViewerState | undefined;
31
- constructor(applicationStore: LegendStudioApplicationStore, depotServerClient: DepotServerClient, groupId: string, artifactId: string, versionId: string, dataSpacePath: string);
32
- initialize(): GeneratorFn<void>;
33
- }
34
- //# sourceMappingURL=DataSpacePreviewStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataSpacePreviewStore.d.ts","sourceRoot":"","sources":["../../../src/stores/studio/DataSpacePreviewStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,KAAK,iBAAiB,EAEvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AACrF,OAAO,EACL,WAAW,EAEX,KAAK,WAAW,EAEjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAM7D,qBAAa,qBAAqB;IAChC,QAAQ,CAAC,gBAAgB,EAAE,4BAA4B,CAAC;IACxD,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C,QAAQ,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;IAEnD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAE/B,QAAQ,CAAC,kBAAkB,cAAwB;IACnD,oBAAoB,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;gBAGtD,gBAAgB,EAAE,4BAA4B,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM;IAsBtB,UAAU,IAAI,WAAW,CAAC,IAAI,CAAC;CA6FjC"}
@@ -1,98 +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 { retrieveProjectEntitiesWithDependencies, ProjectData, } from '@finos/legend-server-depot';
17
- import { ActionState, assertErrorThrown, } from '@finos/legend-shared';
18
- import { flow, flowResult, makeObservable, observable } from 'mobx';
19
- import { DataSpaceViewerState } from '../DataSpaceViewerState.js';
20
- import { DSL_DataSpace_getGraphManagerExtension } from '../../graphManager/protocol/pure/DSL_DataSpace_PureGraphManagerExtension.js';
21
- import { BasicGraphManagerState } from '@finos/legend-graph';
22
- import { retrieveAnalyticsResultCache } from '../../graphManager/action/analytics/DataSpaceAnalysisHelper.js';
23
- import { TAB_SIZE } from '@finos/legend-application';
24
- export class DataSpacePreviewStore {
25
- applicationStore;
26
- depotServerClient;
27
- graphManagerState;
28
- groupId;
29
- artifactId;
30
- versionId;
31
- dataSpacePath;
32
- loadDataSpaceState = ActionState.create();
33
- dataSpaceViewerState;
34
- constructor(applicationStore, depotServerClient, groupId, artifactId, versionId, dataSpacePath) {
35
- makeObservable(this, {
36
- dataSpaceViewerState: observable,
37
- initialize: flow,
38
- });
39
- this.applicationStore = applicationStore;
40
- this.applicationStore.assistantService.setIsHidden(true);
41
- this.depotServerClient = depotServerClient;
42
- this.graphManagerState = new BasicGraphManagerState(applicationStore.pluginManager, applicationStore.logService);
43
- this.groupId = groupId;
44
- this.artifactId = artifactId;
45
- this.versionId = versionId;
46
- this.dataSpacePath = dataSpacePath;
47
- }
48
- *initialize() {
49
- this.loadDataSpaceState.inProgress();
50
- this.loadDataSpaceState.setMessage(`Initializing...`);
51
- try {
52
- const groupId = this.groupId;
53
- const artifactId = this.artifactId;
54
- const versionId = this.versionId;
55
- // initialize
56
- yield this.graphManagerState.graphManager.initialize({
57
- env: this.applicationStore.config.env,
58
- tabSize: TAB_SIZE,
59
- clientConfig: {
60
- baseUrl: this.applicationStore.config.engineServerUrl,
61
- queryBaseUrl: this.applicationStore.config.engineQueryServerUrl,
62
- enableCompression: true,
63
- },
64
- }, {
65
- tracerService: this.applicationStore.tracerService,
66
- });
67
- // fetch project
68
- this.loadDataSpaceState.setMessage(`Fetching project...`);
69
- const project = ProjectData.serialization.fromJson((yield flowResult(this.depotServerClient.getProject(groupId, artifactId))));
70
- // analyze data space
71
- const analysisResult = (yield DSL_DataSpace_getGraphManagerExtension(this.graphManagerState.graphManager).analyzeDataSpace(this.dataSpacePath, () => retrieveProjectEntitiesWithDependencies(project, versionId, this.depotServerClient), () => retrieveAnalyticsResultCache(project, versionId, this.dataSpacePath, this.depotServerClient), this.loadDataSpaceState));
72
- this.dataSpaceViewerState = new DataSpaceViewerState(this.applicationStore, this.graphManagerState, groupId, artifactId, versionId, analysisResult, {
73
- viewProject: () => {
74
- this.applicationStore.notificationService.notifyWarning('This feature is not supported in preview mode');
75
- },
76
- viewSDLCProject: async () => {
77
- this.applicationStore.notificationService.notifyWarning('This feature is not supported in preview mode');
78
- },
79
- onDiagramClassDoubleClick: (classView) => {
80
- this.applicationStore.notificationService.notifyWarning('This feature is not supported in preview mode');
81
- },
82
- }, {
83
- HACKY__previewExperimentalFeatures: this.applicationStore.config.options
84
- .HACKY__previewExperimentalFeatures,
85
- });
86
- this.loadDataSpaceState.pass();
87
- }
88
- catch (error) {
89
- assertErrorThrown(error);
90
- this.loadDataSpaceState.fail();
91
- this.applicationStore.notificationService.notifyError(error);
92
- }
93
- finally {
94
- this.loadDataSpaceState.setMessage(undefined);
95
- }
96
- }
97
- }
98
- //# sourceMappingURL=DataSpacePreviewStore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataSpacePreviewStore.js","sourceRoot":"","sources":["../../../src/stores/studio/DataSpacePreviewStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,uCAAuC,EAEvC,WAAW,GACZ,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,WAAW,EACX,iBAAiB,GAGlB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,sCAAsC,EAAE,MAAM,6EAA6E,CAAC;AACrI,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,gEAAgE,CAAC;AAG9G,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,MAAM,OAAO,qBAAqB;IACvB,gBAAgB,CAA+B;IAC/C,iBAAiB,CAAoB;IACrC,iBAAiB,CAAyB;IAE1C,OAAO,CAAS;IAChB,UAAU,CAAS;IACnB,SAAS,CAAS;IAClB,aAAa,CAAS;IAEtB,kBAAkB,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC;IACnD,oBAAoB,CAAoC;IAExD,YACE,gBAA8C,EAC9C,iBAAoC,EACpC,OAAe,EACf,UAAkB,EAClB,SAAiB,EACjB,aAAqB;QAErB,cAAc,CAAC,IAAI,EAAE;YACnB,oBAAoB,EAAE,UAAU;YAChC,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC;QAEH,IAAI,CAAC,g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