@finos/legend-application-studio 28.18.126 → 28.18.128

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 (39) hide show
  1. package/lib/components/editor/editor-group/ArtifactGenerationViewer.d.ts +9 -0
  2. package/lib/components/editor/editor-group/ArtifactGenerationViewer.d.ts.map +1 -1
  3. package/lib/components/editor/editor-group/ArtifactGenerationViewer.js +5 -1
  4. package/lib/components/editor/editor-group/ArtifactGenerationViewer.js.map +1 -1
  5. package/lib/components/editor/editor-group/GrammarTextEditor.d.ts.map +1 -1
  6. package/lib/components/editor/editor-group/GrammarTextEditor.js +13 -2
  7. package/lib/components/editor/editor-group/GrammarTextEditor.js.map +1 -1
  8. package/lib/index.css +1 -1
  9. package/lib/package.json +1 -1
  10. package/lib/stores/editor/GraphEditFormModeState.d.ts +2 -0
  11. package/lib/stores/editor/GraphEditFormModeState.d.ts.map +1 -1
  12. package/lib/stores/editor/GraphEditFormModeState.js +4 -0
  13. package/lib/stores/editor/GraphEditFormModeState.js.map +1 -1
  14. package/lib/stores/editor/GraphEditGrammarModeState.d.ts +6 -1
  15. package/lib/stores/editor/GraphEditGrammarModeState.d.ts.map +1 -1
  16. package/lib/stores/editor/GraphEditGrammarModeState.js +18 -2
  17. package/lib/stores/editor/GraphEditGrammarModeState.js.map +1 -1
  18. package/lib/stores/editor/GraphEditorMode.d.ts +4 -1
  19. package/lib/stores/editor/GraphEditorMode.d.ts.map +1 -1
  20. package/lib/stores/editor/GraphEditorMode.js +4 -0
  21. package/lib/stores/editor/GraphEditorMode.js.map +1 -1
  22. package/lib/stores/editor/editor-state/GraphGenerationState.d.ts.map +1 -1
  23. package/lib/stores/editor/editor-state/GraphGenerationState.js +4 -4
  24. package/lib/stores/editor/editor-state/GraphGenerationState.js.map +1 -1
  25. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.d.ts.map +1 -1
  26. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.js +5 -2
  27. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.js.map +1 -1
  28. package/lib/stores/ingestion/IngestDeploymentServerClient.d.ts.map +1 -1
  29. package/lib/stores/ingestion/IngestDeploymentServerClient.js +1 -1
  30. package/lib/stores/ingestion/IngestDeploymentServerClient.js.map +1 -1
  31. package/package.json +13 -13
  32. package/src/components/editor/editor-group/ArtifactGenerationViewer.tsx +76 -58
  33. package/src/components/editor/editor-group/GrammarTextEditor.tsx +64 -0
  34. package/src/stores/editor/GraphEditFormModeState.ts +8 -0
  35. package/src/stores/editor/GraphEditGrammarModeState.ts +26 -1
  36. package/src/stores/editor/GraphEditorMode.ts +12 -1
  37. package/src/stores/editor/editor-state/GraphGenerationState.ts +4 -3
  38. package/src/stores/editor/editor-state/element-editor-state/ingest/IngestDefinitionEditorState.ts +5 -1
  39. package/src/stores/ingestion/IngestDeploymentServerClient.ts +1 -1
@@ -14,7 +14,10 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import type { PackageableElement } from '@finos/legend-graph';
17
+ import type {
18
+ PackageableElement,
19
+ GraphTextInputOption,
20
+ } from '@finos/legend-graph';
18
21
  import type { GeneratorFn } from '@finos/legend-shared';
19
22
  import type { Entity } from '@finos/legend-storage';
20
23
  import { makeObservable, flow, action } from 'mobx';
@@ -23,6 +26,7 @@ import type { EditorStore } from './EditorStore.js';
23
26
  import type { GRAPH_EDITOR_MODE } from './EditorConfig.js';
24
27
  import type { Problem } from './EditorGraphState.js';
25
28
  import type { EditorInitialConfiguration } from './editor-state/element-editor-state/ElementEditorInitialConfiguration.js';
29
+ import type { FileSystem_File } from './utils/FileSystemTreeUtils.js';
26
30
 
27
31
  export abstract class GraphEditorMode {
28
32
  readonly editorStore: EditorStore;
@@ -39,6 +43,7 @@ export abstract class GraphEditorMode {
39
43
  cleanupBeforeEntering: flow,
40
44
  handleCleanupFailure: flow,
41
45
  openElement: action,
46
+ openFileSystem_File: action,
42
47
  });
43
48
  this.editorStore = editorStore;
44
49
  }
@@ -86,4 +91,10 @@ export abstract class GraphEditorMode {
86
91
  element: PackageableElement,
87
92
  config?: EditorInitialConfiguration | undefined,
88
93
  ): void;
94
+
95
+ getGraphTextInputOption(): GraphTextInputOption | undefined {
96
+ return undefined;
97
+ }
98
+
99
+ abstract openFileSystem_File(file: FileSystem_File): void;
89
100
  }
@@ -178,6 +178,7 @@ export class DEPREACTED_GlobalFileGenerationState {
178
178
  fileGeneration.value,
179
179
  mode,
180
180
  this.editorStore.graphManagerState.graph,
181
+ this.editorStore.graphEditorMode.getGraphTextInputOption(),
181
182
  )) as GenerationOutput[];
182
183
  } catch (error) {
183
184
  assertErrorThrown(error);
@@ -348,6 +349,7 @@ export class GraphGenerationState {
348
349
  (yield this.editorStore.graphManagerState.graphManager.generateModel(
349
350
  node.generationElement.value,
350
351
  this.editorStore.graphManagerState.graph,
352
+ this.editorStore.graphEditorMode.getGraphTextInputOption(),
351
353
  )) as Entity[];
352
354
  } catch (error) {
353
355
  assertErrorThrown(error);
@@ -398,6 +400,7 @@ export class GraphGenerationState {
398
400
  artifacts =
399
401
  (yield this.editorStore.graphManagerState.graphManager.generateArtifacts(
400
402
  this.editorStore.graphManagerState.graph,
403
+ this.editorStore.graphEditorMode.getGraphTextInputOption(),
401
404
  )) as ArtifactGenerationExtensionResult;
402
405
  }
403
406
 
@@ -559,9 +562,7 @@ export class GraphGenerationState {
559
562
  }
560
563
  }
561
564
  if (!reprocess && node.fileNode instanceof FileSystem_File) {
562
- this.editorStore.tabManagerState.openTab(
563
- new ArtifactGenerationViewerState(this.editorStore, node.fileNode),
564
- );
565
+ this.editorStore.graphEditorMode.openFileSystem_File(node.fileNode);
565
566
  }
566
567
  this.setSelectedNode(node);
567
568
  this.editorStore.graphState.editorStore.explorerTreeState.setArtifactsGenerationTreeData(
@@ -23,6 +23,7 @@ import {
23
23
  assertTrue,
24
24
  guaranteeNonNullable,
25
25
  guaranteeType,
26
+ removePrefix,
26
27
  type GeneratorFn,
27
28
  } from '@finos/legend-shared';
28
29
  import type { IngestionManager } from '../../../../ingestion/IngestionManager.js';
@@ -59,6 +60,8 @@ export const generateUrlToDeployOnOpen = (
59
60
  ),
60
61
  );
61
62
  };
63
+
64
+ const PARSER_SECTION = `###Lakehouse`;
62
65
  export class IngestDefinitionEditorState extends ElementEditorState {
63
66
  validationError: IngestDefinitionValidationResponse | undefined;
64
67
  deploymentState = ActionState.create();
@@ -127,7 +130,8 @@ export class IngestDefinitionEditorState extends ElementEditorState {
127
130
  const response = (yield guaranteeNonNullable(
128
131
  this.ingestionManager,
129
132
  ).deploy(
130
- guaranteeNonNullable(this.textContent),
133
+ // remove parser prefix for now since api already expects it to be under lakehouse parser
134
+ guaranteeNonNullable(removePrefix(this.textContent, PARSER_SECTION)),
131
135
  guaranteeNonNullable(this.ingest.appDirDeployment),
132
136
  this.deploymentState,
133
137
  token,
@@ -50,7 +50,7 @@ export class IngestDeploymentServerClient extends AbstractServerClient {
50
50
  });
51
51
 
52
52
  private _ingest = (): string =>
53
- `${this.baseUrl}/ingest/sdlc/deploy/definitions`;
53
+ `${this.baseUrl}/api/ingest/sdlc/deploy/definitions`;
54
54
 
55
55
  changeServer(serverConfig: IngestDeploymentServerConfig): void {
56
56
  this.baseUrl = serverConfig.ingestServerUrl;