@finos/legend-application-studio 13.1.0 → 14.0.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.
- package/lib/components/EditorComponentTestUtils.d.ts +3 -13
- package/lib/components/EditorComponentTestUtils.d.ts.map +1 -1
- package/lib/components/EditorComponentTestUtils.js +3 -22
- package/lib/components/EditorComponentTestUtils.js.map +1 -1
- package/lib/components/editor/edit-panel/EditPanel.js +4 -4
- package/lib/components/editor/edit-panel/EditPanel.js.map +1 -1
- package/lib/components/editor/edit-panel/{ModelLoader.d.ts → ModelImporter.d.ts} +2 -2
- package/lib/components/editor/edit-panel/ModelImporter.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/ModelImporter.js +132 -0
- package/lib/components/editor/edit-panel/ModelImporter.js.map +1 -0
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js +10 -2
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.d.ts +7 -0
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.js +18 -42
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetModelGenerationEditor.d.ts +24 -0
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetModelGenerationEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetModelGenerationEditor.js +75 -0
- package/lib/components/editor/edit-panel/external-format-editor/SchemaSetModelGenerationEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js +6 -4
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js +2 -4
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js.map +1 -1
- package/lib/components/editor/side-bar/Explorer.js +4 -4
- package/lib/components/editor/side-bar/Explorer.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/EditorGraphState.d.ts +1 -1
- package/lib/stores/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/EditorGraphState.js +10 -10
- package/lib/stores/EditorGraphState.js.map +1 -1
- package/lib/stores/EditorStore.d.ts +3 -3
- package/lib/stores/EditorStore.d.ts.map +1 -1
- package/lib/stores/EditorStore.js +6 -8
- package/lib/stores/EditorStore.js.map +1 -1
- package/lib/stores/LegendStudioApplicationPlugin.d.ts +3 -3
- package/lib/stores/LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.js +4 -3
- package/lib/stores/editor/NewElementState.js.map +1 -1
- package/lib/stores/editor-state/ExternalFormatState.d.ts +3 -2
- package/lib/stores/editor-state/ExternalFormatState.d.ts.map +1 -1
- package/lib/stores/editor-state/ExternalFormatState.js +11 -8
- package/lib/stores/editor-state/ExternalFormatState.js.map +1 -1
- package/lib/stores/editor-state/ModelImporterState.d.ts +95 -0
- package/lib/stores/editor-state/ModelImporterState.d.ts.map +1 -0
- package/lib/stores/editor-state/ModelImporterState.js +358 -0
- package/lib/stores/editor-state/ModelImporterState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts +2 -1
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.js +9 -1
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/external-format/SchemaSetEditorState.d.ts +35 -12
- package/lib/stores/editor-state/element-editor-state/external-format/SchemaSetEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/external-format/SchemaSetEditorState.js +141 -34
- package/lib/stores/editor-state/element-editor-state/external-format/SchemaSetEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +2 -2
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js +3 -3
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js.map +1 -1
- package/lib/stores/graphModifier/DSLExternalFormat_GraphModifierHelper.d.ts +1 -0
- package/lib/stores/graphModifier/DSLExternalFormat_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graphModifier/DSLExternalFormat_GraphModifierHelper.js +3 -0
- package/lib/stores/graphModifier/DSLExternalFormat_GraphModifierHelper.js.map +1 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.d.ts +2 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.js +3 -0
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.js.map +1 -1
- package/lib/stores/shared/testable/TestableUtils.d.ts.map +1 -1
- package/lib/stores/shared/testable/TestableUtils.js +2 -3
- package/lib/stores/shared/testable/TestableUtils.js.map +1 -1
- package/package.json +9 -9
- package/src/components/EditorComponentTestUtils.tsx +2 -29
- package/src/components/editor/edit-panel/EditPanel.tsx +4 -4
- package/src/components/editor/edit-panel/ModelImporter.tsx +376 -0
- package/src/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.tsx +36 -0
- package/src/components/editor/edit-panel/external-format-editor/SchemaSetElementEditor.tsx +47 -163
- package/src/components/editor/edit-panel/external-format-editor/SchemaSetModelGenerationEditor.tsx +226 -0
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.tsx +63 -36
- package/src/components/editor/edit-panel/uml-editor/AssociationEditor.tsx +1 -7
- package/src/components/editor/side-bar/Explorer.tsx +8 -8
- package/src/stores/EditorGraphState.ts +13 -12
- package/src/stores/EditorStore.ts +7 -9
- package/src/stores/LegendStudioApplicationPlugin.ts +4 -4
- package/src/stores/editor/NewElementState.ts +4 -3
- package/src/stores/editor-state/ExternalFormatState.ts +15 -12
- package/src/stores/editor-state/ModelImporterState.ts +506 -0
- package/src/stores/editor-state/element-editor-state/connection/ConnectionEditorState.ts +10 -0
- package/src/stores/editor-state/element-editor-state/external-format/SchemaSetEditorState.ts +203 -46
- package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +1 -0
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +2 -1
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts +12 -3
- package/src/stores/graphModifier/DSLExternalFormat_GraphModifierHelper.ts +5 -0
- package/src/stores/graphModifier/StoreRelational_GraphModifierHelper.ts +10 -0
- package/src/stores/shared/testable/TestableUtils.ts +4 -3
- package/tsconfig.json +3 -2
- package/lib/components/editor/edit-panel/ModelLoader.d.ts.map +0 -1
- package/lib/components/editor/edit-panel/ModelLoader.js +0 -95
- package/lib/components/editor/edit-panel/ModelLoader.js.map +0 -1
- package/lib/stores/editor-state/ModelLoaderState.d.ts +0 -52
- package/lib/stores/editor-state/ModelLoaderState.d.ts.map +0 -1
- package/lib/stores/editor-state/ModelLoaderState.js +0 -199
- package/lib/stores/editor-state/ModelLoaderState.js.map +0 -1
- package/src/components/editor/edit-panel/ModelLoader.tsx +0 -259
- package/src/stores/editor-state/ModelLoaderState.ts +0 -280
|
@@ -74,7 +74,6 @@ import {
|
|
|
74
74
|
stub_Stereotype,
|
|
75
75
|
getFirstAssociatedProperty,
|
|
76
76
|
getSecondAssociatedProperty,
|
|
77
|
-
getOtherAssociatedProperty,
|
|
78
77
|
} from '@finos/legend-graph';
|
|
79
78
|
import {
|
|
80
79
|
property_setName,
|
|
@@ -120,12 +119,7 @@ const AssociationPropertyBasicEditor = observer(
|
|
|
120
119
|
// Generic Type
|
|
121
120
|
const [isEditingType, setIsEditingType] = useState(false);
|
|
122
121
|
// TODO: make this so that association can only refer to classes from the same graph space
|
|
123
|
-
const propertyTypeOptions = editorStore.classOptions
|
|
124
|
-
(classOption) =>
|
|
125
|
-
classOption.value !==
|
|
126
|
-
getOtherAssociatedProperty(association, property).genericType.value
|
|
127
|
-
.rawType,
|
|
128
|
-
);
|
|
122
|
+
const propertyTypeOptions = editorStore.classOptions;
|
|
129
123
|
const propertyType = property.genericType.value.rawType;
|
|
130
124
|
const propertyTypeName = getClassPropertyType(propertyType);
|
|
131
125
|
const filterOption = createFilter({
|
|
@@ -483,8 +483,8 @@ const ExplorerDropdownMenu = observer(() => {
|
|
|
483
483
|
const ExplorerTrees = observer(() => {
|
|
484
484
|
const editorStore = useEditorStore();
|
|
485
485
|
const { isInGrammarTextMode, isInViewerMode } = editorStore;
|
|
486
|
-
const
|
|
487
|
-
editorStore.openSingletonEditorState(editorStore.
|
|
486
|
+
const openModelImport = (): void =>
|
|
487
|
+
editorStore.openSingletonEditorState(editorStore.modelImporterState);
|
|
488
488
|
const graph = editorStore.graphManagerState.graph;
|
|
489
489
|
// Explorer tree
|
|
490
490
|
const treeData = editorStore.explorerTreeState.getTreeData();
|
|
@@ -661,9 +661,9 @@ const ExplorerTrees = observer(() => {
|
|
|
661
661
|
</div>
|
|
662
662
|
<button
|
|
663
663
|
className="btn--dark explorer__content--empty__btn"
|
|
664
|
-
onClick={
|
|
664
|
+
onClick={openModelImport}
|
|
665
665
|
>
|
|
666
|
-
Open Model
|
|
666
|
+
Open Model Importer
|
|
667
667
|
</button>
|
|
668
668
|
</div>
|
|
669
669
|
)}
|
|
@@ -688,8 +688,8 @@ const ProjectExplorerActionPanel = observer((props: { disabled: boolean }) => {
|
|
|
688
688
|
});
|
|
689
689
|
editorStore.explorerTreeState.setTreeData({ ...treeData });
|
|
690
690
|
};
|
|
691
|
-
const
|
|
692
|
-
editorStore.openState(editorStore.
|
|
691
|
+
const showModelImporter = (): void =>
|
|
692
|
+
editorStore.openState(editorStore.modelImporterState);
|
|
693
693
|
|
|
694
694
|
return (
|
|
695
695
|
<div className="panel__header__actions">
|
|
@@ -697,8 +697,8 @@ const ProjectExplorerActionPanel = observer((props: { disabled: boolean }) => {
|
|
|
697
697
|
<button
|
|
698
698
|
className="panel__header__action"
|
|
699
699
|
disabled={disabled}
|
|
700
|
-
title="Open Model
|
|
701
|
-
onClick={
|
|
700
|
+
title="Open Model Importer (F2)"
|
|
701
|
+
onClick={showModelImporter}
|
|
702
702
|
>
|
|
703
703
|
<FileImportIcon />
|
|
704
704
|
</button>
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
import type { EditorStore } from './EditorStore.js';
|
|
36
36
|
import { ElementEditorState } from './editor-state/element-editor-state/ElementEditorState.js';
|
|
37
37
|
import { GraphGenerationState } from './editor-state/GraphGenerationState.js';
|
|
38
|
-
import {
|
|
38
|
+
import { MODEL_IMPORT_NATIVE_INPUT_TYPE } from './editor-state/ModelImporterState.js';
|
|
39
39
|
import type { DSL_LegendStudioApplicationPlugin_Extension } from './LegendStudioApplicationPlugin.js';
|
|
40
40
|
import type { Entity } from '@finos/legend-storage';
|
|
41
41
|
import {
|
|
@@ -303,8 +303,8 @@ export class EditorGraphState {
|
|
|
303
303
|
);
|
|
304
304
|
this.editorStore.setCurrentEditorState(projectConfigurationEditorState);
|
|
305
305
|
} else if (error instanceof GraphDataDeserializationError) {
|
|
306
|
-
// if something goes wrong with de-serialization, redirect to model
|
|
307
|
-
this.
|
|
306
|
+
// if something goes wrong with de-serialization, redirect to model importer to fix
|
|
307
|
+
this.redirectToModelImporterForDebugging(error);
|
|
308
308
|
} else if (error instanceof NetworkClientError) {
|
|
309
309
|
this.editorStore.graphManagerState.graphBuildState.fail();
|
|
310
310
|
this.editorStore.applicationStore.notifyWarning(
|
|
@@ -332,8 +332,8 @@ export class EditorGraphState {
|
|
|
332
332
|
error2,
|
|
333
333
|
);
|
|
334
334
|
if (error2 instanceof NetworkClientError) {
|
|
335
|
-
// in case the server cannot even transform the JSON due to corrupted protocol, we can redirect to model
|
|
336
|
-
this.
|
|
335
|
+
// in case the server cannot even transform the JSON due to corrupted protocol, we can redirect to model importer
|
|
336
|
+
this.redirectToModelImporterForDebugging(error2);
|
|
337
337
|
return {
|
|
338
338
|
status: GraphBuilderStatus.FAILED,
|
|
339
339
|
error: error2,
|
|
@@ -361,7 +361,7 @@ export class EditorGraphState {
|
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
-
private
|
|
364
|
+
private redirectToModelImporterForDebugging(error: Error): void {
|
|
365
365
|
if (this.editorStore.isInConflictResolutionMode) {
|
|
366
366
|
this.editorStore.setBlockingAlert({
|
|
367
367
|
message: `Can't de-serialize graph model from entities`,
|
|
@@ -370,14 +370,15 @@ export class EditorGraphState {
|
|
|
370
370
|
return;
|
|
371
371
|
}
|
|
372
372
|
this.editorStore.applicationStore.notifyWarning(
|
|
373
|
-
`Can't de-serialize graph model from entities. Redirected to model
|
|
374
|
-
);
|
|
375
|
-
this.editorStore.modelLoaderState.setCurrentModelLoadType(
|
|
376
|
-
MODEL_UPDATER_INPUT_TYPE.ENTITIES,
|
|
373
|
+
`Can't de-serialize graph model from entities. Redirected to model importer for debugging. Error: ${error.message}`,
|
|
377
374
|
);
|
|
375
|
+
const nativeImporterState =
|
|
376
|
+
this.editorStore.modelImporterState.setNativeImportType(
|
|
377
|
+
MODEL_IMPORT_NATIVE_INPUT_TYPE.ENTITIES,
|
|
378
|
+
);
|
|
378
379
|
// Making an async call
|
|
379
|
-
|
|
380
|
-
this.editorStore.openState(this.editorStore.
|
|
380
|
+
nativeImporterState.loadCurrentProjectEntities();
|
|
381
|
+
this.editorStore.openState(this.editorStore.modelImporterState);
|
|
381
382
|
}
|
|
382
383
|
|
|
383
384
|
/**
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
import { UMLEditorState } from './editor-state/element-editor-state/UMLEditorState.js';
|
|
60
60
|
import { ServiceEditorState } from './editor-state/element-editor-state/service/ServiceEditorState.js';
|
|
61
61
|
import { EditorSDLCState } from './EditorSDLCState.js';
|
|
62
|
-
import {
|
|
62
|
+
import { ModelImporterState } from './editor-state/ModelImporterState.js';
|
|
63
63
|
import type { EditorState } from './editor-state/EditorState.js';
|
|
64
64
|
import { EntityDiffViewState } from './editor-state/entity-diff-editor-state/EntityDiffViewState.js';
|
|
65
65
|
import { FunctionEditorState } from './editor-state/element-editor-state/FunctionEditorState.js';
|
|
@@ -186,7 +186,7 @@ export class EditorStore {
|
|
|
186
186
|
graphManagerState: GraphManagerState;
|
|
187
187
|
changeDetectionState: ChangeDetectionState;
|
|
188
188
|
grammarTextEditorState: GrammarTextEditorState;
|
|
189
|
-
|
|
189
|
+
modelImporterState: ModelImporterState;
|
|
190
190
|
projectConfigurationEditorState: ProjectConfigurationEditorState;
|
|
191
191
|
projectOverviewState: ProjectOverviewState;
|
|
192
192
|
workspaceWorkflowManagerState: WorkspaceWorkflowManagerState;
|
|
@@ -315,7 +315,7 @@ export class EditorStore {
|
|
|
315
315
|
this.newElementState = new NewElementState(this);
|
|
316
316
|
// special (singleton) editors
|
|
317
317
|
this.grammarTextEditorState = new GrammarTextEditorState(this);
|
|
318
|
-
this.
|
|
318
|
+
this.modelImporterState = new ModelImporterState(this);
|
|
319
319
|
this.projectConfigurationEditorState = new ProjectConfigurationEditorState(
|
|
320
320
|
this,
|
|
321
321
|
this.sdlcState,
|
|
@@ -375,7 +375,7 @@ export class EditorStore {
|
|
|
375
375
|
LEGEND_STUDIO_HOTKEY.TOGGLE_MODEL_LOADER,
|
|
376
376
|
[LEGEND_STUDIO_HOTKEY_MAP.TOGGLE_MODEL_LOADER],
|
|
377
377
|
this.createGlobalHotKeyAction(() =>
|
|
378
|
-
this.openState(this.
|
|
378
|
+
this.openState(this.modelImporterState),
|
|
379
379
|
),
|
|
380
380
|
),
|
|
381
381
|
new HotkeyConfiguration(
|
|
@@ -736,7 +736,6 @@ export class EditorStore {
|
|
|
736
736
|
this.projectConfigurationEditorState.fetchLatestProjectStructureVersion(),
|
|
737
737
|
this.graphState.graphGenerationState.fetchAvailableFileGenerationDescriptions(),
|
|
738
738
|
this.graphState.graphGenerationState.externalFormatState.fetchExternalFormatsDescriptions(),
|
|
739
|
-
this.modelLoaderState.fetchAvailableModelImportDescriptions(),
|
|
740
739
|
this.sdlcState.fetchProjectVersions(),
|
|
741
740
|
]);
|
|
742
741
|
}
|
|
@@ -775,7 +774,6 @@ export class EditorStore {
|
|
|
775
774
|
this.projectConfigurationEditorState.fetchLatestProjectStructureVersion(),
|
|
776
775
|
this.graphState.graphGenerationState.fetchAvailableFileGenerationDescriptions(),
|
|
777
776
|
this.graphState.graphGenerationState.externalFormatState.fetchExternalFormatsDescriptions(),
|
|
778
|
-
this.modelLoaderState.fetchAvailableModelImportDescriptions(),
|
|
779
777
|
this.sdlcState.fetchProjectVersions(),
|
|
780
778
|
]);
|
|
781
779
|
}
|
|
@@ -959,8 +957,8 @@ export class EditorStore {
|
|
|
959
957
|
this.openEntityChangeConflict(editorState);
|
|
960
958
|
} else if (editorState instanceof FileGenerationViewerState) {
|
|
961
959
|
this.openGeneratedFile(editorState.generatedFile);
|
|
962
|
-
} else if (editorState === this.
|
|
963
|
-
this.openSingletonEditorState(this.
|
|
960
|
+
} else if (editorState === this.modelImporterState) {
|
|
961
|
+
this.openSingletonEditorState(this.modelImporterState);
|
|
964
962
|
} else if (editorState === this.projectConfigurationEditorState) {
|
|
965
963
|
this.openSingletonEditorState(this.projectConfigurationEditorState);
|
|
966
964
|
} else {
|
|
@@ -1008,7 +1006,7 @@ export class EditorStore {
|
|
|
1008
1006
|
* This method helps open editor that only exists one instance at at time such as model-loader, project config, settings ...
|
|
1009
1007
|
*/
|
|
1010
1008
|
openSingletonEditorState(
|
|
1011
|
-
singularEditorState:
|
|
1009
|
+
singularEditorState: ModelImporterState | ProjectConfigurationEditorState,
|
|
1012
1010
|
): void {
|
|
1013
1011
|
const existingEditorState = this.openedEditorStates.find(
|
|
1014
1012
|
(e) => e === singularEditorState,
|
|
@@ -49,12 +49,12 @@ export type ClassPreviewRenderer = (
|
|
|
49
49
|
_class: Class,
|
|
50
50
|
) => React.ReactNode | undefined;
|
|
51
51
|
|
|
52
|
-
export type
|
|
52
|
+
export type ModelImporterExtensionConfiguration = {
|
|
53
53
|
key: string;
|
|
54
54
|
label?: string | undefined;
|
|
55
55
|
allowHardReplace?: boolean;
|
|
56
56
|
// TODO: document about this behavior better, right now the behavior is not well
|
|
57
|
-
// structured yet, also, model
|
|
57
|
+
// structured yet, also, model importer seems rather fragmented at the moment
|
|
58
58
|
load: (editorStore: EditorStore) => Promise<void>;
|
|
59
59
|
renderer: (editorStore: EditorStore) => React.ReactNode | undefined;
|
|
60
60
|
};
|
|
@@ -98,9 +98,9 @@ export abstract class LegendStudioApplicationPlugin extends LegendApplicationPlu
|
|
|
98
98
|
getExtraEditorExtensionComponentRendererConfigurations?(): EditorExtensionComponentRendererConfiguration[];
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
* Get the list of extension configurations for model
|
|
101
|
+
* Get the list of extension configurations for model importer.
|
|
102
102
|
*/
|
|
103
|
-
|
|
103
|
+
getExtraModelImporterExtensionConfigurations?(): ModelImporterExtensionConfiguration[];
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* Get the list of extension for testables
|
|
@@ -190,7 +190,7 @@ export class NewPackageableRuntimeDriver extends NewElementDriver<PackageableRun
|
|
|
190
190
|
isValid: computed,
|
|
191
191
|
});
|
|
192
192
|
|
|
193
|
-
const mappings = this.editorStore.graphManagerState.graph.
|
|
193
|
+
const mappings = this.editorStore.graphManagerState.graph.mappings;
|
|
194
194
|
if (mappings.length) {
|
|
195
195
|
this.mapping = mappings[0];
|
|
196
196
|
}
|
|
@@ -240,7 +240,7 @@ export class NewPureModelConnectionDriver extends NewConnectionValueDriver<PureM
|
|
|
240
240
|
isValid: computed,
|
|
241
241
|
});
|
|
242
242
|
|
|
243
|
-
const classes = this.editorStore.graphManagerState.graph.
|
|
243
|
+
const classes = this.editorStore.graphManagerState.graph.classes;
|
|
244
244
|
if (classes.length) {
|
|
245
245
|
this.class = classes[0];
|
|
246
246
|
}
|
|
@@ -302,7 +302,7 @@ export class NewRelationalDatabaseConnectionDriver extends NewConnectionValueDri
|
|
|
302
302
|
if (store instanceof Database) {
|
|
303
303
|
selectedStore = store;
|
|
304
304
|
} else {
|
|
305
|
-
const dbs = this.editorStore.graphManagerState.graph.
|
|
305
|
+
const dbs = this.editorStore.graphManagerState.graph.databases;
|
|
306
306
|
selectedStore = dbs.length ? (dbs[0] as Database) : stub_Database();
|
|
307
307
|
}
|
|
308
308
|
return new RelationalDatabaseConnection(
|
|
@@ -533,6 +533,7 @@ export class NewGenerationSpecificationDriver extends NewElementDriver<Generatio
|
|
|
533
533
|
}
|
|
534
534
|
|
|
535
535
|
get isValid(): boolean {
|
|
536
|
+
// only one generation specification should exist
|
|
536
537
|
return !this.editorStore.graphManagerState.graph.ownGenerationSpecifications
|
|
537
538
|
.length;
|
|
538
539
|
}
|
|
@@ -18,7 +18,6 @@ import type { ExternalFormatDescription } from '@finos/legend-graph';
|
|
|
18
18
|
import {
|
|
19
19
|
type GeneratorFn,
|
|
20
20
|
assertErrorThrown,
|
|
21
|
-
guaranteeNonNullable,
|
|
22
21
|
LogEvent,
|
|
23
22
|
ActionState,
|
|
24
23
|
} from '@finos/legend-shared';
|
|
@@ -58,12 +57,22 @@ export class ExternalFormatState {
|
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
get formatTypeOptions(): ExternalFormatTypeOption[] {
|
|
61
|
-
return this.externalFormatsDescriptions.map((
|
|
62
|
-
value:
|
|
63
|
-
label:
|
|
60
|
+
return this.externalFormatsDescriptions.map((types) => ({
|
|
61
|
+
value: types.name,
|
|
62
|
+
label: types.name,
|
|
64
63
|
}));
|
|
65
64
|
}
|
|
66
65
|
|
|
66
|
+
get formatContentTypes(): string[] {
|
|
67
|
+
return this.externalFormatsDescriptions.map((e) => e.contentTypes).flat();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
get externalFormatDescriptionsWithModelGenerationSupport(): ExternalFormatDescription[] {
|
|
71
|
+
return this.externalFormatsDescriptions.filter(
|
|
72
|
+
(d) => d.supportsModelGeneration,
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
67
76
|
getFormatTypeForContentType(contentType: string): string | undefined {
|
|
68
77
|
return this.externalFormatsDescriptions.find(
|
|
69
78
|
(externalFormatDescription) =>
|
|
@@ -71,10 +80,6 @@ export class ExternalFormatState {
|
|
|
71
80
|
)?.name;
|
|
72
81
|
}
|
|
73
82
|
|
|
74
|
-
get formatContentTypes(): string[] {
|
|
75
|
-
return this.externalFormatsDescriptions.map((e) => e.contentTypes).flat();
|
|
76
|
-
}
|
|
77
|
-
|
|
78
83
|
setExternalFormatsDescriptions(
|
|
79
84
|
externalFormatsDescriptions: ExternalFormatDescription[],
|
|
80
85
|
): void {
|
|
@@ -99,9 +104,7 @@ export class ExternalFormatState {
|
|
|
99
104
|
}
|
|
100
105
|
}
|
|
101
106
|
|
|
102
|
-
getTypeDescription(type: string): ExternalFormatDescription {
|
|
103
|
-
return
|
|
104
|
-
this.externalFormatsDescriptions.find((e) => e.name === type),
|
|
105
|
-
);
|
|
107
|
+
getTypeDescription(type: string): ExternalFormatDescription | undefined {
|
|
108
|
+
return this.externalFormatsDescriptions.find((e) => e.name === type);
|
|
106
109
|
}
|
|
107
110
|
}
|