@finos/legend-extension-dsl-data-space 9.1.4 → 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
@@ -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,
@@ -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,23 @@ 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
37
 
38
38
  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',
39
+ DESCRIPTION = 'DESCRIPTION',
40
+ DIAGRAM_VIEWER = 'DIAGRAM_VIEWER',
41
+ MODELS_DOCUMENTATION = 'MODELS_DOCUMENTATION',
42
+ QUICK_START = 'QUICK_START',
43
+ EXECUTION_CONTEXT = 'EXECUTION_CONTEXT',
44
+ DATA_ACCESS = 'DATA_ACCESS',
45
+
46
+ DATA_STORES = 'DATA_STORES', // TODO: with test-data, also let user call TDS query on top of these
47
+ DATA_AVAILABILITY = 'DATA_AVAILABILITY',
48
+ DATA_COST = 'DATA_COST',
49
+ DATA_GOVERNANCE = 'DATA_GOVERNANCE',
50
+ INFO = 'INFO', // TODO: test coverage? (or maybe this should be done in elements/diagrams/data-quality section)
47
51
  SUPPORT = 'SUPPORT',
48
52
  }
49
53
 
@@ -69,12 +73,12 @@ export class DataSpaceViewerState {
69
73
  readonly onDiagramClassDoubleClick: (classView: ClassView) => void;
70
74
 
71
75
  _renderer?: DiagramRenderer | undefined;
72
- currentDiagram?: Diagram | undefined;
73
- currentActivity = DATA_SPACE_VIEWER_ACTIVITY_MODE.OVERVIEW;
76
+ currentDiagram?: DataSpaceDiagramAnalysisResult | undefined;
77
+ currentActivity = DATA_SPACE_VIEWER_ACTIVITY_MODE.DESCRIPTION;
74
78
  currentExecutionContext: DataSpaceExecutionContextAnalysisResult;
75
79
  currentRuntime: PackageableRuntime;
76
80
 
77
- HACKY__previewExperimentalFeatures = false;
81
+ isExpandedModeEnabled = false;
78
82
 
79
83
  constructor(
80
84
  applicationStore: GenericLegendApplicationStore,
@@ -97,9 +101,6 @@ export class DataSpaceViewerState {
97
101
  ) => Promise<void>;
98
102
  onDiagramClassDoubleClick: (classView: ClassView) => void;
99
103
  },
100
- options?: {
101
- HACKY__previewExperimentalFeatures?: boolean | undefined;
102
- },
103
104
  ) {
104
105
  makeObservable(this, {
105
106
  _renderer: observable,
@@ -107,12 +108,14 @@ export class DataSpaceViewerState {
107
108
  currentActivity: observable,
108
109
  currentExecutionContext: observable,
109
110
  currentRuntime: observable,
111
+ isExpandedModeEnabled: observable,
110
112
  renderer: computed,
111
113
  setRenderer: action,
112
114
  setCurrentDiagram: action,
113
115
  setCurrentActivity: action,
114
116
  setCurrentExecutionContext: action,
115
117
  setCurrentRuntime: action,
118
+ enableExpandedMode: action,
116
119
  });
117
120
 
118
121
  this.applicationStore = applicationStore;
@@ -125,14 +128,11 @@ export class DataSpaceViewerState {
125
128
  dataSpaceAnalysisResult.defaultExecutionContext;
126
129
  this.currentRuntime = this.currentExecutionContext.defaultRuntime;
127
130
  this.currentDiagram = getNullableFirstElement(
128
- this.dataSpaceAnalysisResult.featuredDiagrams,
131
+ this.dataSpaceAnalysisResult.diagrams,
129
132
  );
130
133
  this.viewProject = actions.viewProject;
131
134
  this.viewSDLCProject = actions.viewSDLCProject;
132
135
  this.onDiagramClassDoubleClick = actions.onDiagramClassDoubleClick;
133
- this.HACKY__previewExperimentalFeatures = Boolean(
134
- options?.HACKY__previewExperimentalFeatures,
135
- );
136
136
  }
137
137
 
138
138
  get renderer(): DiagramRenderer {
@@ -173,7 +173,7 @@ export class DataSpaceViewerState {
173
173
  this._renderer = val;
174
174
  }
175
175
 
176
- setCurrentDiagram(val: Diagram): void {
176
+ setCurrentDiagram(val: DataSpaceDiagramAnalysisResult): void {
177
177
  this.currentDiagram = val;
178
178
  }
179
179
 
@@ -198,4 +198,8 @@ export class DataSpaceViewerState {
198
198
  this.renderer.onClassViewDoubleClick = (classView: ClassView): void =>
199
199
  this.onDiagramClassDoubleClick(classView);
200
200
  }
201
+
202
+ enableExpandedMode(val: boolean): void {
203
+ this.isExpandedModeEnabled = val;
204
+ }
201
205
  }
@@ -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",
@@ -64,16 +63,22 @@
64
63
  "./src/stores/query/DataSpaceQueryCreatorStore.ts",
65
64
  "./src/stores/query/DataSpaceQuerySetupStore.ts",
66
65
  "./src/stores/studio/DataSpacePreviewState.ts",
67
- "./src/stores/studio/DataSpacePreviewStore.ts",
68
66
  "./src/components/DSL_DataSpace_Icon.tsx",
67
+ "./src/components/DataSpaceDiagramViewer.tsx",
68
+ "./src/components/DataSpaceExecutionContextViewer.tsx",
69
+ "./src/components/DataSpaceInfoPanel.tsx",
70
+ "./src/components/DataSpaceModelsDocumentation.tsx",
71
+ "./src/components/DataSpaceQuickStart.tsx",
72
+ "./src/components/DataSpaceSupportPanel.tsx",
69
73
  "./src/components/DataSpaceViewer.tsx",
74
+ "./src/components/DataSpaceViewerActivityBar.tsx",
75
+ "./src/components/DataSpaceWiki.tsx",
70
76
  "./src/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.tsx",
71
77
  "./src/components/query/DataSpaceAdvancedSearchModal.tsx",
72
78
  "./src/components/query/DataSpaceQueryBuilder.tsx",
73
79
  "./src/components/query/DataSpaceQueryCreator.tsx",
74
80
  "./src/components/query/DataSpaceQuerySetup.tsx",
75
81
  "./src/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.tsx",
76
- "./src/components/studio/DataSpacePreview.tsx",
77
82
  "./src/components/studio/DataSpacePreviewAction.tsx",
78
83
  "./src/graphManager/protocol/pure/v1/V1_DSL_DataSpace_SystemModels.json"
79
84
  ],
@@ -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;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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,i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- * 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 {
18
- generateExtensionUrlPattern,
19
- generatePath,
20
- } from '@finos/legend-application';
21
- import { generateGAVCoordinates } from '@finos/legend-storage';
22
-
23
- export enum DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN {
24
- GAV = 'gav',
25
- DATA_SPACE_PATH = 'dataSpacePath',
26
- }
27
-
28
- export type DataSpacePreviewPathParams = {
29
- [DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN.GAV]: string;
30
- [DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH]: string;
31
- };
32
-
33
- export const DATA_SPACE_STUDIO_ROUTE_PATTERN = Object.freeze({
34
- PREVIEW: `/dataspace/preview/:${DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN.GAV}/:${DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH}`,
35
- });
36
-
37
- export const generateDataSpacePreviewRoute = (
38
- groupId: string,
39
- artifactId: string,
40
- versionId: string,
41
- dataSpacePath: string,
42
- ): string =>
43
- generatePath(
44
- generateExtensionUrlPattern(DATA_SPACE_STUDIO_ROUTE_PATTERN.PREVIEW),
45
- {
46
- [DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN.GAV]: generateGAVCoordinates(
47
- groupId,
48
- artifactId,
49
- versionId,
50
- ),
51
- [DATA_SPACE_STUDIO_ROUTE_PATTERN_TOKEN.DATA_SPACE_PATH]: dataSpacePath,
52
- },
53
- );