@finos/legend-application-studio 28.7.1 → 28.9.0

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 (132) hide show
  1. package/lib/__lib__/LegendStudioNavigation.d.ts +6 -0
  2. package/lib/__lib__/LegendStudioNavigation.d.ts.map +1 -1
  3. package/lib/__lib__/LegendStudioNavigation.js +5 -0
  4. package/lib/__lib__/LegendStudioNavigation.js.map +1 -1
  5. package/lib/application/LegendStudioApplicationConfig.d.ts +0 -5
  6. package/lib/application/LegendStudioApplicationConfig.d.ts.map +1 -1
  7. package/lib/application/LegendStudioApplicationConfig.js +0 -6
  8. package/lib/application/LegendStudioApplicationConfig.js.map +1 -1
  9. package/lib/components/LegendStudioWebApplication.d.ts.map +1 -1
  10. package/lib/components/LegendStudioWebApplication.js +4 -1
  11. package/lib/components/LegendStudioWebApplication.js.map +1 -1
  12. package/lib/components/ShowcaseManager.d.ts.map +1 -1
  13. package/lib/components/ShowcaseManager.js +6 -1
  14. package/lib/components/ShowcaseManager.js.map +1 -1
  15. package/lib/components/editor/editor-group/GrammarTextEditor.js +1 -1
  16. package/lib/components/editor/editor-group/GrammarTextEditor.js.map +1 -1
  17. package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.d.ts.map +1 -1
  18. package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.js +41 -4
  19. package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.js.map +1 -1
  20. package/lib/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.d.ts +2 -0
  21. package/lib/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.d.ts.map +1 -1
  22. package/lib/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.js +13 -3
  23. package/lib/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.js.map +1 -1
  24. package/lib/components/editor/editor-group/database/IsolatedQueryDatabase.d.ts +18 -0
  25. package/lib/components/editor/editor-group/database/IsolatedQueryDatabase.d.ts.map +1 -0
  26. package/lib/components/editor/editor-group/database/IsolatedQueryDatabase.js +54 -0
  27. package/lib/components/editor/editor-group/database/IsolatedQueryDatabase.js.map +1 -0
  28. package/lib/components/editor/panel-group/PanelGroup.d.ts.map +1 -1
  29. package/lib/components/editor/panel-group/PanelGroup.js +1 -5
  30. package/lib/components/editor/panel-group/PanelGroup.js.map +1 -1
  31. package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
  32. package/lib/components/editor/side-bar/Explorer.js +11 -4
  33. package/lib/components/editor/side-bar/Explorer.js.map +1 -1
  34. package/lib/components/editor/side-bar/ProjectOverview.d.ts.map +1 -1
  35. package/lib/components/editor/side-bar/ProjectOverview.js +1 -1
  36. package/lib/components/editor/side-bar/ProjectOverview.js.map +1 -1
  37. package/lib/components/project-view/ProjectViewer.d.ts.map +1 -1
  38. package/lib/components/project-view/ProjectViewer.js +37 -5
  39. package/lib/components/project-view/ProjectViewer.js.map +1 -1
  40. package/lib/components/showcase/ShowcaseViewer.d.ts +18 -0
  41. package/lib/components/showcase/ShowcaseViewer.d.ts.map +1 -0
  42. package/lib/components/showcase/ShowcaseViewer.js +147 -0
  43. package/lib/components/showcase/ShowcaseViewer.js.map +1 -0
  44. package/lib/components/showcase/ShowcaseViewerStoreProvider.d.ts +23 -0
  45. package/lib/components/showcase/ShowcaseViewerStoreProvider.d.ts.map +1 -0
  46. package/lib/components/showcase/ShowcaseViewerStoreProvider.js +36 -0
  47. package/lib/components/showcase/ShowcaseViewerStoreProvider.js.map +1 -0
  48. package/lib/index.css +2 -2
  49. package/lib/index.css.map +1 -1
  50. package/lib/package.json +1 -1
  51. package/lib/stores/LegendStudioBaseStore.d.ts.map +1 -1
  52. package/lib/stores/LegendStudioBaseStore.js +1 -0
  53. package/lib/stores/LegendStudioBaseStore.js.map +1 -1
  54. package/lib/stores/editor/EditorMode.d.ts +4 -0
  55. package/lib/stores/editor/EditorMode.d.ts.map +1 -1
  56. package/lib/stores/editor/EditorMode.js +9 -0
  57. package/lib/stores/editor/EditorMode.js.map +1 -1
  58. package/lib/stores/editor/EditorSDLCState.d.ts +1 -2
  59. package/lib/stores/editor/EditorSDLCState.d.ts.map +1 -1
  60. package/lib/stores/editor/EditorSDLCState.js +3 -14
  61. package/lib/stores/editor/EditorSDLCState.js.map +1 -1
  62. package/lib/stores/editor/EditorStore.d.ts.map +1 -1
  63. package/lib/stores/editor/EditorStore.js +1 -3
  64. package/lib/stores/editor/EditorStore.js.map +1 -1
  65. package/lib/stores/editor/StandardEditorMode.d.ts +1 -0
  66. package/lib/stores/editor/StandardEditorMode.d.ts.map +1 -1
  67. package/lib/stores/editor/StandardEditorMode.js +4 -0
  68. package/lib/stores/editor/StandardEditorMode.js.map +1 -1
  69. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts +5 -2
  70. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts.map +1 -1
  71. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js +209 -2
  72. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js.map +1 -1
  73. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseModelBuilderState.d.ts +1 -2
  74. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseModelBuilderState.d.ts.map +1 -1
  75. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseModelBuilderState.js +2 -2
  76. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseModelBuilderState.js.map +1 -1
  77. package/lib/stores/editor/editor-state/element-editor-state/database/QueryDatabaseState.d.ts +37 -0
  78. package/lib/stores/editor/editor-state/element-editor-state/database/QueryDatabaseState.d.ts.map +1 -0
  79. package/lib/stores/editor/editor-state/element-editor-state/database/QueryDatabaseState.js +127 -0
  80. package/lib/stores/editor/editor-state/element-editor-state/database/QueryDatabaseState.js.map +1 -0
  81. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts.map +1 -1
  82. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js +20 -4
  83. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js.map +1 -1
  84. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.d.ts +3 -0
  85. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.d.ts.map +1 -1
  86. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.js +17 -2
  87. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.js.map +1 -1
  88. package/lib/stores/project-view/ProjectViewerEditorMode.d.ts +3 -0
  89. package/lib/stores/project-view/ProjectViewerEditorMode.d.ts.map +1 -1
  90. package/lib/stores/project-view/ProjectViewerEditorMode.js +10 -0
  91. package/lib/stores/project-view/ProjectViewerEditorMode.js.map +1 -1
  92. package/lib/stores/project-view/ProjectViewerStore.d.ts.map +1 -1
  93. package/lib/stores/project-view/ProjectViewerStore.js +1 -0
  94. package/lib/stores/project-view/ProjectViewerStore.js.map +1 -1
  95. package/lib/stores/showcase/ShowcaseViewerEditorMode.d.ts +28 -0
  96. package/lib/stores/showcase/ShowcaseViewerEditorMode.d.ts.map +1 -0
  97. package/lib/stores/showcase/ShowcaseViewerEditorMode.js +40 -0
  98. package/lib/stores/showcase/ShowcaseViewerEditorMode.js.map +1 -0
  99. package/lib/stores/showcase/ShowcaseViewerStore.d.ts +32 -0
  100. package/lib/stores/showcase/ShowcaseViewerStore.d.ts.map +1 -0
  101. package/lib/stores/showcase/ShowcaseViewerStore.js +189 -0
  102. package/lib/stores/showcase/ShowcaseViewerStore.js.map +1 -0
  103. package/package.json +7 -7
  104. package/src/__lib__/LegendStudioNavigation.ts +11 -0
  105. package/src/application/LegendStudioApplicationConfig.ts +0 -7
  106. package/src/components/LegendStudioWebApplication.tsx +11 -1
  107. package/src/components/ShowcaseManager.tsx +26 -2
  108. package/src/components/editor/editor-group/GrammarTextEditor.tsx +1 -1
  109. package/src/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.tsx +117 -16
  110. package/src/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.tsx +40 -1
  111. package/src/components/editor/editor-group/database/IsolatedQueryDatabase.tsx +138 -0
  112. package/src/components/editor/panel-group/PanelGroup.tsx +3 -8
  113. package/src/components/editor/side-bar/Explorer.tsx +41 -18
  114. package/src/components/editor/side-bar/ProjectOverview.tsx +0 -19
  115. package/src/components/project-view/ProjectViewer.tsx +139 -4
  116. package/src/components/showcase/ShowcaseViewer.tsx +418 -0
  117. package/src/components/showcase/ShowcaseViewerStoreProvider.tsx +56 -0
  118. package/src/stores/LegendStudioBaseStore.ts +1 -0
  119. package/src/stores/editor/EditorMode.ts +14 -0
  120. package/src/stores/editor/EditorSDLCState.ts +6 -19
  121. package/src/stores/editor/EditorStore.ts +1 -8
  122. package/src/stores/editor/StandardEditorMode.ts +7 -0
  123. package/src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.ts +288 -2
  124. package/src/stores/editor/editor-state/element-editor-state/connection/DatabaseModelBuilderState.ts +2 -5
  125. package/src/stores/editor/editor-state/element-editor-state/database/QueryDatabaseState.ts +234 -0
  126. package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.ts +31 -9
  127. package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.ts +23 -0
  128. package/src/stores/project-view/ProjectViewerEditorMode.ts +17 -0
  129. package/src/stores/project-view/ProjectViewerStore.ts +1 -0
  130. package/src/stores/showcase/ShowcaseViewerEditorMode.ts +51 -0
  131. package/src/stores/showcase/ShowcaseViewerStore.ts +285 -0
  132. package/tsconfig.json +6 -0
@@ -76,4 +76,21 @@ export class ProjectViewerEditorMode extends EditorMode {
76
76
  elementPath,
77
77
  );
78
78
  }
79
+
80
+ override get isInitialized(): boolean {
81
+ return (
82
+ Boolean(
83
+ this.viewerStore.editorStore.sdlcState.currentProject &&
84
+ this.viewerStore.editorStore.sdlcState.currentWorkspace,
85
+ ) || Boolean(this.viewerStore.projectGAVCoordinates)
86
+ );
87
+ }
88
+
89
+ override get disableEditing(): boolean {
90
+ return true;
91
+ }
92
+
93
+ override get supportSdlcOperations(): boolean {
94
+ return !this.viewerStore.projectGAVCoordinates;
95
+ }
79
96
  }
@@ -274,6 +274,7 @@ export class ProjectViewerStore {
274
274
  yield Promise.all([
275
275
  this.editorStore.sdlcState.fetchProjectVersions(),
276
276
  this.editorStore.sdlcState.fetchPublishedProjectVersions(),
277
+ this.editorStore.sdlcState.fetchAuthorizedActions(),
277
278
  ]);
278
279
 
279
280
  // fetch entities
@@ -0,0 +1,51 @@
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 { ProjectDependency } from '@finos/legend-server-sdlc';
18
+ import { EditorMode } from '../editor/EditorMode.js';
19
+ import type { ShowcaseViewerStore } from './ShowcaseViewerStore.js';
20
+ import { generateShowcasePath } from '../../__lib__/LegendStudioNavigation.js';
21
+
22
+ export class ShowcaseViewerEditorMode extends EditorMode {
23
+ readonly showcaseViewerStore: ShowcaseViewerStore;
24
+
25
+ constructor(showcaseViewerStore: ShowcaseViewerStore) {
26
+ super();
27
+ this.showcaseViewerStore = showcaseViewerStore;
28
+ }
29
+
30
+ override generateElementLink(elementPath: string): string {
31
+ return generateShowcasePath(this.showcaseViewerStore.showcase.path);
32
+ }
33
+ override generateDependencyElementLink(
34
+ elementPath: string,
35
+ dependencyProject: ProjectDependency,
36
+ ): string {
37
+ return generateShowcasePath(this.showcaseViewerStore.showcase.path);
38
+ }
39
+
40
+ override get isInitialized(): boolean {
41
+ return Boolean(this.showcaseViewerStore._showcase);
42
+ }
43
+
44
+ override get supportSdlcOperations(): boolean {
45
+ return false;
46
+ }
47
+
48
+ override get label(): string {
49
+ return 'Showcase View';
50
+ }
51
+ }
@@ -0,0 +1,285 @@
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
+ guaranteeNonNullable,
19
+ type GeneratorFn,
20
+ assertErrorThrown,
21
+ StopWatch,
22
+ LogEvent,
23
+ assertNonEmptyString,
24
+ } from '@finos/legend-shared';
25
+ import type { EditorStore } from '../editor/EditorStore.js';
26
+ import { flow, flowResult, makeObservable, observable } from 'mobx';
27
+ import type { ShowcaseViewerPathParams } from '../../__lib__/LegendStudioNavigation.js';
28
+ import { LEGEND_STUDIO_APP_EVENT } from '../../__lib__/LegendStudioEvent.js';
29
+ import {
30
+ ShowcaseRegistryServerClient,
31
+ type Showcase,
32
+ } from '@finos/legend-server-showcase';
33
+ import {
34
+ DependencyGraphBuilderError,
35
+ GRAPH_MANAGER_EVENT,
36
+ GraphBuilderError,
37
+ GraphDataDeserializationError,
38
+ createGraphBuilderReport,
39
+ } from '@finos/legend-graph';
40
+ import { DEFAULT_TAB_SIZE } from '@finos/legend-application';
41
+ import { payloadDebugger } from '../editor/panel-group/DevToolPanelState.js';
42
+ import { LegendStudioTelemetryHelper } from '../../__lib__/LegendStudioTelemetryHelper.js';
43
+ import { GRAPH_EDITOR_MODE } from '../editor/EditorConfig.js';
44
+ import type { Entity } from '@finos/legend-storage';
45
+
46
+ export class ShowcaseViewerStore {
47
+ readonly editorStore: EditorStore;
48
+ private readonly showcaseServerClient?: ShowcaseRegistryServerClient;
49
+ _showcase: Showcase | undefined;
50
+
51
+ constructor(editorStore: EditorStore) {
52
+ this.editorStore = editorStore;
53
+ makeObservable(this, {
54
+ _showcase: observable,
55
+ initialize: flow,
56
+ buildGraph: flow,
57
+ });
58
+ if (this.editorStore.applicationStore.config.showcaseServerUrl) {
59
+ this.showcaseServerClient = new ShowcaseRegistryServerClient({
60
+ baseUrl: this.editorStore.applicationStore.config.showcaseServerUrl,
61
+ });
62
+ }
63
+ }
64
+
65
+ private get client(): ShowcaseRegistryServerClient {
66
+ return guaranteeNonNullable(
67
+ this.showcaseServerClient,
68
+ `Showcase registry server client is not configured`,
69
+ );
70
+ }
71
+
72
+ get showcase(): Showcase {
73
+ return guaranteeNonNullable(this._showcase);
74
+ }
75
+
76
+ setShowcase(val: Showcase): void {
77
+ this._showcase = val;
78
+ }
79
+
80
+ *initialize(params: ShowcaseViewerPathParams): GeneratorFn<void> {
81
+ if (!this.editorStore.initState.isInInitialState) {
82
+ return;
83
+ }
84
+
85
+ const showcasePath = params[0];
86
+ this.editorStore.initState.inProgress();
87
+ const onLeave = (hasBuildSucceeded: boolean): void => {
88
+ this.editorStore.initState.complete(hasBuildSucceeded);
89
+ };
90
+
91
+ try {
92
+ const stopWatch = new StopWatch();
93
+ assertNonEmptyString(showcasePath, 'Showcase path expected');
94
+ // fetch showcase
95
+ this.editorStore.initState.setMessage(`Fetching Showcase Data...`);
96
+ this._showcase = (yield this.client.getShowcase(
97
+ showcasePath,
98
+ )) as Showcase;
99
+ // initialize graph manager
100
+ yield this.editorStore.graphManagerState.graphManager.initialize(
101
+ {
102
+ env: this.editorStore.applicationStore.config.env,
103
+ tabSize: DEFAULT_TAB_SIZE,
104
+ clientConfig: {
105
+ baseUrl: this.editorStore.applicationStore.config.engineServerUrl,
106
+ queryBaseUrl:
107
+ this.editorStore.applicationStore.config.engineQueryServerUrl,
108
+ enableCompression: true,
109
+ payloadDebugger,
110
+ },
111
+ },
112
+ {
113
+ tracerService: this.editorStore.applicationStore.tracerService,
114
+ },
115
+ );
116
+ // convert code to entities
117
+ stopWatch.record();
118
+ const grammar = this.showcase.code;
119
+ this.editorStore.initState.setMessage(
120
+ `Converting showcase code to entities...`,
121
+ );
122
+ const entities =
123
+ (yield this.editorStore.graphManagerState.graphManager.pureCodeToEntities(
124
+ grammar,
125
+ )) as Entity[];
126
+ this.editorStore.initState.setMessage(undefined);
127
+ stopWatch.record(GRAPH_MANAGER_EVENT.FETCH_GRAPH_ENTITIES__SUCCESS);
128
+ const graphBuilderResult = (yield flowResult(
129
+ this.buildGraph(entities),
130
+ )) as boolean;
131
+
132
+ if (!graphBuilderResult) {
133
+ onLeave(false);
134
+ return;
135
+ }
136
+ this.editorStore.initState.setMessage(`Generating elements...`);
137
+ if (
138
+ this.editorStore.graphManagerState.graph.ownGenerationSpecifications
139
+ .length
140
+ ) {
141
+ yield flowResult(
142
+ this.editorStore.graphState.graphGenerationState.globalGenerate(),
143
+ );
144
+ }
145
+
146
+ // build explorer tree
147
+ this.editorStore.explorerTreeState.buildImmutableModelTrees();
148
+ this.editorStore.explorerTreeState.build();
149
+
150
+ // complete actions
151
+ this.editorStore.initState.setMessage(undefined);
152
+ onLeave(true);
153
+ } catch (error) {
154
+ assertErrorThrown(error);
155
+ this.editorStore.applicationStore.logService.error(
156
+ LogEvent.create(LEGEND_STUDIO_APP_EVENT.SDLC_MANAGER_FAILURE),
157
+ error,
158
+ );
159
+ this.editorStore.applicationStore.notificationService.notifyError(error);
160
+ onLeave(false);
161
+ }
162
+ }
163
+
164
+ *buildGraph(entities: Entity[]): GeneratorFn<boolean> {
165
+ try {
166
+ const stopWatch = new StopWatch();
167
+ yield this.editorStore.graphManagerState.initializeSystem();
168
+
169
+ // reset
170
+ this.editorStore.graphManagerState.resetGraph();
171
+
172
+ // build dependencies
173
+ stopWatch.record();
174
+ const dependencyManager =
175
+ this.editorStore.graphManagerState.graphManager.createDependencyManager();
176
+ this.editorStore.graphManagerState.graph.dependencyManager =
177
+ dependencyManager;
178
+
179
+ const dependency_buildReport = createGraphBuilderReport();
180
+ yield this.editorStore.graphManagerState.graphManager.buildDependencies(
181
+ this.editorStore.graphManagerState.coreModel,
182
+ this.editorStore.graphManagerState.systemModel,
183
+ dependencyManager,
184
+ new Map(),
185
+ this.editorStore.graphManagerState.dependenciesBuildState,
186
+ {},
187
+ dependency_buildReport,
188
+ );
189
+
190
+ // build graph
191
+ const graph_buildReport = createGraphBuilderReport();
192
+ yield this.editorStore.graphManagerState.graphManager.buildGraph(
193
+ this.editorStore.graphManagerState.graph,
194
+ entities,
195
+ this.editorStore.graphManagerState.graphBuildState,
196
+ undefined,
197
+ graph_buildReport,
198
+ );
199
+
200
+ // report
201
+ stopWatch.record(GRAPH_MANAGER_EVENT.INITIALIZE_GRAPH__SUCCESS);
202
+ const graphBuilderReportData = {
203
+ timings:
204
+ this.editorStore.applicationStore.timeService.finalizeTimingsRecord(
205
+ stopWatch,
206
+ ),
207
+ dependencies: dependency_buildReport,
208
+ dependenciesCount:
209
+ this.editorStore.graphManagerState.graph.dependencyManager
210
+ .numberOfDependencies,
211
+ graph: graph_buildReport,
212
+ };
213
+ LegendStudioTelemetryHelper.logEvent_GraphInitializationSucceeded(
214
+ this.editorStore.applicationStore.telemetryService,
215
+ graphBuilderReportData,
216
+ );
217
+
218
+ this.editorStore.applicationStore.logService.info(
219
+ LogEvent.create(GRAPH_MANAGER_EVENT.INITIALIZE_GRAPH__SUCCESS),
220
+ graphBuilderReportData,
221
+ );
222
+
223
+ // fetch available editor configurations
224
+ yield Promise.all([
225
+ this.editorStore.graphState.graphGenerationState.globalFileGenerationState.fetchAvailableFileGenerationDescriptions(),
226
+ this.editorStore.graphState.graphGenerationState.externalFormatState.fetchExternalFormatDescriptions(),
227
+ this.editorStore.graphState.graphGenerationState.externalFormatState.fetchExternalFormatDescriptions(),
228
+ this.editorStore.graphState.fetchAvailableFunctionActivatorConfigurations(),
229
+ ]);
230
+
231
+ return true;
232
+ } catch (error) {
233
+ assertErrorThrown(error);
234
+
235
+ // if graph builder fails, we fall back to text-mode
236
+ this.editorStore.applicationStore.logService.error(
237
+ LogEvent.create(GRAPH_MANAGER_EVENT.GRAPH_BUILDER_FAILURE),
238
+ error,
239
+ );
240
+ if (error instanceof DependencyGraphBuilderError) {
241
+ // no recovery if dependency models cannot be built, this makes assumption that all dependencies models are compiled successfully
242
+ // TODO: we might want to handle this more gracefully when we can show people the dependency model element in the future
243
+ this.editorStore.applicationStore.notificationService.notifyError(
244
+ `Can't initialize dependency models. Error: ${error.message}`,
245
+ );
246
+ this.editorStore.applicationStore.alertService.setBlockingAlert({
247
+ message: `Can't initialize dependencies`,
248
+ prompt: 'Please use editor to better invesigate the issue',
249
+ });
250
+ } else if (error instanceof GraphDataDeserializationError) {
251
+ // if something goes wrong with de-serialization, we can't really do anything but to alert
252
+ this.editorStore.applicationStore.notificationService.notifyError(
253
+ `Can't deserialize graph. Error: ${error.message}`,
254
+ );
255
+ this.editorStore.applicationStore.alertService.setBlockingAlert({
256
+ message: `Can't deserialize graph`,
257
+ prompt: 'Please use editor to better invesigate the issue',
258
+ });
259
+ } else if (error instanceof GraphBuilderError) {
260
+ // TODO: we should split this into 2 notifications when we support multiple notifications
261
+ this.editorStore.applicationStore.notificationService.notifyError(
262
+ `Can't build graph. Redirected to text mode for debugging. Error: ${error.message}`,
263
+ );
264
+ yield flowResult(
265
+ this.editorStore.switchModes(GRAPH_EDITOR_MODE.GRAMMAR_TEXT, {
266
+ isGraphBuildFailure: true,
267
+ }),
268
+ );
269
+ if (this.editorStore.graphEditorMode.mode === GRAPH_EDITOR_MODE.FORM) {
270
+ // nothing we can do here so we will just block the user
271
+ this.editorStore.applicationStore.alertService.setBlockingAlert({
272
+ message: `Can't compose Pure code from graph models`,
273
+ prompt: 'Please use editor to better invesigate the issue',
274
+ });
275
+ return false;
276
+ }
277
+ } else {
278
+ this.editorStore.applicationStore.notificationService.notifyError(
279
+ error,
280
+ );
281
+ }
282
+ return false;
283
+ }
284
+ }
285
+ }
package/tsconfig.json CHANGED
@@ -101,6 +101,7 @@
101
101
  "./src/stores/editor/editor-state/element-editor-state/connection/PostProcessorEditorState.ts",
102
102
  "./src/stores/editor/editor-state/element-editor-state/data/DataEditorState.ts",
103
103
  "./src/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.ts",
104
+ "./src/stores/editor/editor-state/element-editor-state/database/QueryDatabaseState.ts",
104
105
  "./src/stores/editor/editor-state/element-editor-state/external-format/DSL_ExternalFormat_BindingEditorState.ts",
105
106
  "./src/stores/editor/editor-state/element-editor-state/external-format/DSL_ExternalFormat_SchemaSetEditorState.ts",
106
107
  "./src/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.ts",
@@ -167,6 +168,8 @@
167
168
  "./src/stores/graph-modifier/Testable_GraphModifierHelper.ts",
168
169
  "./src/stores/project-view/ProjectViewerEditorMode.ts",
169
170
  "./src/stores/project-view/ProjectViewerStore.ts",
171
+ "./src/stores/showcase/ShowcaseViewerEditorMode.ts",
172
+ "./src/stores/showcase/ShowcaseViewerStore.ts",
170
173
  "./src/stores/workspace-review/WorkspaceReviewStore.ts",
171
174
  "./src/stores/workspace-setup/ProjectConfigurationStatus.ts",
172
175
  "./src/stores/workspace-setup/WorkspaceSetupStore.ts",
@@ -206,6 +209,7 @@
206
209
  "./src/components/editor/editor-group/data-editor/DataElementEditor.tsx",
207
210
  "./src/components/editor/editor-group/data-editor/EmbeddedDataEditor.tsx",
208
211
  "./src/components/editor/editor-group/data-editor/RelationalCSVDataEditor.tsx",
212
+ "./src/components/editor/editor-group/database/IsolatedQueryDatabase.tsx",
209
213
  "./src/components/editor/editor-group/diff-editor/EntityChangeConflictEditor.tsx",
210
214
  "./src/components/editor/editor-group/diff-editor/EntityDiffView.tsx",
211
215
  "./src/components/editor/editor-group/element-generation-editor/ElementGenerationEditor.tsx",
@@ -281,6 +285,8 @@
281
285
  "./src/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.tsx",
282
286
  "./src/components/project-view/ProjectViewer.tsx",
283
287
  "./src/components/project-view/ProjectViewerStoreProvider.tsx",
288
+ "./src/components/showcase/ShowcaseViewer.tsx",
289
+ "./src/components/showcase/ShowcaseViewerStoreProvider.tsx",
284
290
  "./src/components/workspace-review/WorkspaceReview.tsx",
285
291
  "./src/components/workspace-review/WorkspaceReviewPanel.tsx",
286
292
  "./src/components/workspace-review/WorkspaceReviewSideBar.tsx",