@finos/legend-extension-dsl-data-space 10.2.3 → 10.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. package/lib/{components → __lib__}/query/DSL_DataSpace_LegendQueryDocumentation.d.ts +1 -1
  2. package/lib/__lib__/query/DSL_DataSpace_LegendQueryDocumentation.d.ts.map +1 -0
  3. package/lib/{components → __lib__}/query/DSL_DataSpace_LegendQueryDocumentation.js +4 -4
  4. package/lib/__lib__/query/DSL_DataSpace_LegendQueryDocumentation.js.map +1 -0
  5. package/lib/__lib__/query/DSL_DataSpace_LegendQueryNavigation.d.ts +0 -12
  6. package/lib/__lib__/query/DSL_DataSpace_LegendQueryNavigation.d.ts.map +1 -1
  7. package/lib/__lib__/query/DSL_DataSpace_LegendQueryNavigation.js +0 -12
  8. package/lib/__lib__/query/DSL_DataSpace_LegendQueryNavigation.js.map +1 -1
  9. package/lib/__lib__/shared/DSL_DataSpace_LegendNavigation.d.ts +15 -0
  10. package/lib/__lib__/shared/DSL_DataSpace_LegendNavigation.d.ts.map +1 -0
  11. package/lib/__lib__/shared/DSL_DataSpace_LegendNavigation.js +32 -0
  12. package/lib/__lib__/shared/DSL_DataSpace_LegendNavigation.js.map +1 -0
  13. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js +1 -1
  14. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js.map +1 -1
  15. package/lib/components/index.d.ts +4 -2
  16. package/lib/components/index.d.ts.map +1 -1
  17. package/lib/components/index.js +4 -2
  18. package/lib/components/index.js.map +1 -1
  19. package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.js +3 -2
  20. package/lib/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.js.map +1 -1
  21. package/lib/components/query/DataSpaceQueryBuilder.d.ts +2 -5
  22. package/lib/components/query/DataSpaceQueryBuilder.d.ts.map +1 -1
  23. package/lib/components/query/DataSpaceQueryBuilder.js +5 -24
  24. package/lib/components/query/DataSpaceQueryBuilder.js.map +1 -1
  25. package/lib/components/query/DataSpaceQueryBuilderTemplateQueryPanelContent.d.ts +1 -1
  26. package/lib/components/query/DataSpaceQueryBuilderTemplateQueryPanelContent.d.ts.map +1 -1
  27. package/lib/components/query/DataSpaceQueryBuilderTemplateQueryPanelContent.js +2 -2
  28. package/lib/components/query/DataSpaceQueryBuilderTemplateQueryPanelContent.js.map +1 -1
  29. package/lib/components/query/DataSpaceQuerySetup.js +1 -1
  30. package/lib/components/query/DataSpaceQuerySetup.js.map +1 -1
  31. package/lib/components/shared/DSL_DataSpace_Icon.d.ts.map +1 -0
  32. package/lib/components/shared/DSL_DataSpace_Icon.js.map +1 -0
  33. package/lib/graph-manager/index.d.ts +3 -0
  34. package/lib/graph-manager/index.d.ts.map +1 -1
  35. package/lib/graph-manager/index.js +4 -0
  36. package/lib/graph-manager/index.js.map +1 -1
  37. package/lib/index.css +2 -2
  38. package/lib/index.css.map +1 -1
  39. package/lib/package.json +1 -4
  40. package/lib/stores/query/DataSpaceAdvancedSearchState.d.ts +1 -1
  41. package/lib/stores/query/DataSpaceAdvancedSearchState.d.ts.map +1 -1
  42. package/lib/stores/query/DataSpaceAdvancedSearchState.js +1 -1
  43. package/lib/stores/query/DataSpaceAdvancedSearchState.js.map +1 -1
  44. package/lib/stores/query/DataSpaceQueryCreatorStore.js +1 -1
  45. package/lib/stores/query/DataSpaceQueryCreatorStore.js.map +1 -1
  46. package/lib/stores/query/DataSpaceQuerySetupStore.d.ts +1 -1
  47. package/lib/stores/query/DataSpaceQuerySetupStore.d.ts.map +1 -1
  48. package/lib/stores/query/DataSpaceQuerySetupStore.js +1 -1
  49. package/lib/stores/query/DataSpaceQuerySetupStore.js.map +1 -1
  50. package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.js +1 -1
  51. package/lib/stores/query/DataSpaceTemplateQueryCreatorStore.js.map +1 -1
  52. package/lib/stores/{query → query-builder}/DataSpaceQueryBuilderState.d.ts +2 -2
  53. package/lib/stores/query-builder/DataSpaceQueryBuilderState.d.ts.map +1 -0
  54. package/lib/stores/{query → query-builder}/DataSpaceQueryBuilderState.js +2 -2
  55. package/lib/stores/query-builder/DataSpaceQueryBuilderState.js.map +1 -0
  56. package/lib/stores/shared/DataSpaceInfo.d.ts.map +1 -0
  57. package/lib/stores/shared/DataSpaceInfo.js.map +1 -0
  58. package/package.json +6 -9
  59. package/src/{components → __lib__}/query/DSL_DataSpace_LegendQueryDocumentation.ts +1 -1
  60. package/src/__lib__/query/DSL_DataSpace_LegendQueryNavigation.ts +0 -34
  61. package/src/__lib__/shared/DSL_DataSpace_LegendNavigation.ts +57 -0
  62. package/src/components/DSL_DataSpace_LegendApplicationPlugin.tsx +1 -1
  63. package/src/components/index.ts +6 -2
  64. package/src/components/query/DSL_DataSpace_LegendQueryApplicationPlugin.tsx +3 -3
  65. package/src/components/query/DataSpaceAdvancedSearchModal.tsx +1 -1
  66. package/src/components/query/DataSpaceQueryBuilder.tsx +7 -68
  67. package/src/components/query/DataSpaceQueryBuilderTemplateQueryPanelContent.tsx +3 -3
  68. package/src/components/query/DataSpaceQuerySetup.tsx +1 -1
  69. package/src/graph-manager/index.ts +5 -0
  70. package/src/stores/query/DataSpaceAdvancedSearchState.ts +4 -1
  71. package/src/stores/query/DataSpaceQueryCreatorStore.ts +2 -2
  72. package/src/stores/query/DataSpaceQuerySetupStore.ts +4 -1
  73. package/src/stores/query/DataSpaceTemplateQueryCreatorStore.ts +2 -2
  74. package/src/stores/{query → query-builder}/DataSpaceQueryBuilderState.ts +5 -2
  75. package/tsconfig.json +5 -13
  76. package/lib/__lib__/studio/DSL_DataSpace_LegendStudioCodeSnippet.d.ts +0 -17
  77. package/lib/__lib__/studio/DSL_DataSpace_LegendStudioCodeSnippet.d.ts.map +0 -1
  78. package/lib/__lib__/studio/DSL_DataSpace_LegendStudioCodeSnippet.js +0 -54
  79. package/lib/__lib__/studio/DSL_DataSpace_LegendStudioCodeSnippet.js.map +0 -1
  80. package/lib/__lib__/studio/DSL_DataSpace_LegendStudioDocumentation.d.ts +0 -20
  81. package/lib/__lib__/studio/DSL_DataSpace_LegendStudioDocumentation.d.ts.map +0 -1
  82. package/lib/__lib__/studio/DSL_DataSpace_LegendStudioDocumentation.js +0 -21
  83. package/lib/__lib__/studio/DSL_DataSpace_LegendStudioDocumentation.js.map +0 -1
  84. package/lib/components/DSL_DataSpace_Icon.d.ts.map +0 -1
  85. package/lib/components/DSL_DataSpace_Icon.js.map +0 -1
  86. package/lib/components/query/DSL_DataSpace_LegendQueryDocumentation.d.ts.map +0 -1
  87. package/lib/components/query/DSL_DataSpace_LegendQueryDocumentation.js.map +0 -1
  88. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts +0 -39
  89. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts.map +0 -1
  90. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js +0 -207
  91. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js.map +0 -1
  92. package/lib/components/studio/DataSpacePreviewAction.d.ts +0 -25
  93. package/lib/components/studio/DataSpacePreviewAction.d.ts.map +0 -1
  94. package/lib/components/studio/DataSpacePreviewAction.js +0 -53
  95. package/lib/components/studio/DataSpacePreviewAction.js.map +0 -1
  96. package/lib/components/studio/DataSpaceQueryAction.d.ts +0 -22
  97. package/lib/components/studio/DataSpaceQueryAction.d.ts.map +0 -1
  98. package/lib/components/studio/DataSpaceQueryAction.js +0 -29
  99. package/lib/components/studio/DataSpaceQueryAction.js.map +0 -1
  100. package/lib/components/studio/DataSpaceTemplateQueryPromoteReview.d.ts +0 -19
  101. package/lib/components/studio/DataSpaceTemplateQueryPromoteReview.d.ts.map +0 -1
  102. package/lib/components/studio/DataSpaceTemplateQueryPromoteReview.js +0 -81
  103. package/lib/components/studio/DataSpaceTemplateQueryPromoteReview.js.map +0 -1
  104. package/lib/components/studio/index.d.ts +0 -17
  105. package/lib/components/studio/index.d.ts.map +0 -1
  106. package/lib/components/studio/index.js +0 -17
  107. package/lib/components/studio/index.js.map +0 -1
  108. package/lib/stores/query/DataSpaceInfo.d.ts.map +0 -1
  109. package/lib/stores/query/DataSpaceInfo.js.map +0 -1
  110. package/lib/stores/query/DataSpaceQueryBuilderState.d.ts.map +0 -1
  111. package/lib/stores/query/DataSpaceQueryBuilderState.js.map +0 -1
  112. package/lib/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.d.ts +0 -61
  113. package/lib/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.d.ts.map +0 -1
  114. package/lib/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.js +0 -407
  115. package/lib/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.js.map +0 -1
  116. package/lib/stores/studio/DataSpacePreviewState.d.ts +0 -33
  117. package/lib/stores/studio/DataSpacePreviewState.d.ts.map +0 -1
  118. package/lib/stores/studio/DataSpacePreviewState.js +0 -117
  119. package/lib/stores/studio/DataSpacePreviewState.js.map +0 -1
  120. package/src/__lib__/studio/DSL_DataSpace_LegendStudioCodeSnippet.ts +0 -54
  121. package/src/__lib__/studio/DSL_DataSpace_LegendStudioDocumentation.ts +0 -20
  122. package/src/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.tsx +0 -297
  123. package/src/components/studio/DataSpacePreviewAction.tsx +0 -136
  124. package/src/components/studio/DataSpaceQueryAction.tsx +0 -34
  125. package/src/components/studio/DataSpaceTemplateQueryPromoteReview.tsx +0 -292
  126. package/src/components/studio/index.ts +0 -17
  127. package/src/stores/query/DataSpaceTemplateQueryPromotionReviewerStore.ts +0 -636
  128. package/src/stores/studio/DataSpacePreviewState.ts +0 -195
  129. /package/lib/components/{DSL_DataSpace_Icon.d.ts → shared/DSL_DataSpace_Icon.d.ts} +0 -0
  130. /package/lib/components/{DSL_DataSpace_Icon.js → shared/DSL_DataSpace_Icon.js} +0 -0
  131. /package/lib/stores/{query → shared}/DataSpaceInfo.d.ts +0 -0
  132. /package/lib/stores/{query → shared}/DataSpaceInfo.js +0 -0
  133. /package/src/components/{DSL_DataSpace_Icon.tsx → shared/DSL_DataSpace_Icon.tsx} +0 -0
  134. /package/src/stores/{query → shared}/DataSpaceInfo.ts +0 -0
@@ -1,195 +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
-
17
- import {
18
- EditorExtensionState,
19
- queryClass,
20
- type EditorStore,
21
- } from '@finos/legend-application-studio';
22
- import {
23
- type GeneratorFn,
24
- guaranteeNonNullable,
25
- ActionState,
26
- assertErrorThrown,
27
- } from '@finos/legend-shared';
28
- import { action, flow, makeObservable, observable } from 'mobx';
29
- import type { DataSpace } from '../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
30
- import type { DataSpaceAnalysisResult } from '../../graph-manager/action/analytics/DataSpaceAnalysis.js';
31
- import { DSL_DataSpace_getGraphManagerExtension } from '../../graph-manager/protocol/pure/DSL_DataSpace_PureGraphManagerExtension.js';
32
- import { DataSpaceViewerState } from '../DataSpaceViewerState.js';
33
- import { type Class, InMemoryGraphData } from '@finos/legend-graph';
34
- import { EXTERNAL_APPLICATION_NAVIGATION__generateServiceQueryCreatorUrl } from '../../__lib__/DSL_DataSpace_LegendApplicationNavigation.js';
35
-
36
- export class DataSpacePreviewState extends EditorExtensionState {
37
- private static readonly IDENTIFIER = 'data-space-preview';
38
-
39
- readonly editorStore: EditorStore;
40
- readonly loadDataSpaceState = ActionState.create();
41
-
42
- dataSpace?: DataSpace | undefined;
43
- dataSpaceViewerState?: DataSpaceViewerState | undefined;
44
-
45
- constructor(editorStore: EditorStore) {
46
- super();
47
-
48
- makeObservable(this, {
49
- dataSpace: observable,
50
- dataSpaceViewerState: observable,
51
- setDataSpace: action,
52
- previewDataSpace: flow,
53
- });
54
-
55
- this.editorStore = editorStore;
56
- }
57
-
58
- override get INTERNAL__identifierKey(): string {
59
- return DataSpacePreviewState.IDENTIFIER;
60
- }
61
-
62
- static retrieveNullableState(
63
- editorStore: EditorStore,
64
- ): DataSpacePreviewState | undefined {
65
- return editorStore.extensionStates.find((extensionState) => {
66
- if (
67
- /**
68
- * In development mode, when we make changes in certain areas like utils or base states, the following `instanceof`
69
- * check will fail as if there were multiple copies of the classes with the same name, this could be caused by either
70
- * React `fast-refresh` or `webpack HMR`; we didn't have time to really do a thorough debug here, as such,
71
- * we will just do a simple key check to match the right state to bypass the problem for development mode.
72
- */
73
- // eslint-disable-next-line no-process-env
74
- process.env.NODE_ENV === 'development'
75
- ) {
76
- return (
77
- extensionState.INTERNAL__identifierKey ===
78
- DataSpacePreviewState.IDENTIFIER
79
- );
80
- }
81
- return extensionState instanceof DataSpacePreviewState;
82
- }) as DataSpacePreviewState;
83
- }
84
-
85
- static retrieveState(editorStore: EditorStore): DataSpacePreviewState {
86
- return guaranteeNonNullable(
87
- DataSpacePreviewState.retrieveNullableState(editorStore),
88
- `Can't find data space preview state: make sure it is added as an editor extension state`,
89
- );
90
- }
91
-
92
- setDataSpace(val: DataSpace | undefined): void {
93
- this.dataSpace = val;
94
- if (val === undefined) {
95
- this.dataSpaceViewerState = undefined;
96
- }
97
- }
98
-
99
- *previewDataSpace(dataSpace: DataSpace): GeneratorFn<void> {
100
- this.setDataSpace(dataSpace);
101
- this.loadDataSpaceState.inProgress();
102
- this.loadDataSpaceState.setMessage(`Initializing...`);
103
-
104
- try {
105
- const groupId =
106
- this.editorStore.projectConfigurationEditorState
107
- .currentProjectConfiguration.groupId;
108
- const artifactId =
109
- this.editorStore.projectConfigurationEditorState
110
- .currentProjectConfiguration.artifactId;
111
- const versionId = 'LOCAL';
112
-
113
- // analyze data space
114
- const analysisResult = (yield DSL_DataSpace_getGraphManagerExtension(
115
- this.editorStore.graphManagerState.graphManager,
116
- ).analyzeDataSpace(
117
- dataSpace.path,
118
- async () =>
119
- this.editorStore.graphManagerState.graph.allOwnElements
120
- .map((element) =>
121
- this.editorStore.graphManagerState.graphManager.elementToEntity(
122
- element,
123
- ),
124
- )
125
- .concat(
126
- this.editorStore.graphManagerState.graph.dependencyManager.allOwnElements.map(
127
- (element) =>
128
- this.editorStore.graphManagerState.graphManager.elementToEntity(
129
- element,
130
- ),
131
- ),
132
- ),
133
- undefined,
134
- this.loadDataSpaceState,
135
- )) as DataSpaceAnalysisResult;
136
-
137
- this.dataSpaceViewerState = new DataSpaceViewerState(
138
- this.editorStore.applicationStore,
139
- this.editorStore.graphManagerState,
140
- groupId,
141
- artifactId,
142
- versionId,
143
- analysisResult,
144
- {
145
- retrieveGraphData: () =>
146
- new InMemoryGraphData(this.editorStore.graphManagerState.graph),
147
- queryDataSpace: () => {
148
- this.editorStore.applicationStore.notificationService.notifyWarning(
149
- 'This feature is not supported in preview mode',
150
- );
151
- },
152
- viewProject: () => {
153
- this.editorStore.applicationStore.notificationService.notifyWarning(
154
- 'This feature is not supported in preview mode',
155
- );
156
- },
157
- viewSDLCProject: async () => {
158
- this.editorStore.applicationStore.notificationService.notifyWarning(
159
- 'This feature is not supported in preview mode',
160
- );
161
- },
162
- queryClass: (_class: Class): void => {
163
- queryClass(_class, this.editorStore).catch(
164
- this.editorStore.applicationStore.alertUnhandledError,
165
- );
166
- },
167
- openServiceQuery: (servicePath: string): void => {
168
- if (this.editorStore.applicationStore.config.queryApplicationUrl) {
169
- this.editorStore.applicationStore.navigationService.navigator.visitAddress(
170
- EXTERNAL_APPLICATION_NAVIGATION__generateServiceQueryCreatorUrl(
171
- this.editorStore.applicationStore.config.queryApplicationUrl,
172
- groupId,
173
- artifactId,
174
- versionId,
175
- servicePath,
176
- ),
177
- );
178
- } else {
179
- this.editorStore.applicationStore.notificationService.notifyWarning(
180
- 'Query application URL is not configured',
181
- );
182
- }
183
- },
184
- },
185
- );
186
- this.loadDataSpaceState.pass();
187
- } catch (error) {
188
- assertErrorThrown(error);
189
- this.loadDataSpaceState.fail();
190
- this.editorStore.applicationStore.notificationService.notifyError(error);
191
- } finally {
192
- this.loadDataSpaceState.setMessage(undefined);
193
- }
194
- }
195
- }
File without changes
File without changes
File without changes