Skip to content

Commit

Permalink
Add form support for ExternalFormat embedded data (#1133)
Browse files Browse the repository at this point in the history
* Add form support for ExternalFormat embedded data

* minor changes

* Update .changeset/nervous-trainers-carry.md

Co-authored-by: Mauricio Uyaguari <[email protected]>
  • Loading branch information
gayathrir11 and MauricioUyaguari authored May 9, 2022
1 parent e0de53c commit bd86b7b
Show file tree
Hide file tree
Showing 20 changed files with 1,187 additions and 16 deletions.
4 changes: 4 additions & 0 deletions .changeset/lazy-planets-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@finos/legend-graph": patch
"@finos/legend-extension-external-store-service": patch
---
6 changes: 6 additions & 0 deletions .changeset/nervous-trainers-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@finos/legend-studio": minor
---

Add editor for `ExternalFormat` embedded data.

Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ import {
type MappingElementSourceGetter,
type MappingElementSource,
type ElementIconGetter,
type DSLData_LegendStudioPlugin_Extension,
type EmbeddedDataTypeOption,
type PureGrammarTextSuggestion,
type PureGrammarParserElementSnippetSuggestionsGetter,
type PureGrammarParserKeywordSuggestionGetter,
type PureGrammarParserDocumentationGetter,
type PureGrammarParserElementDocumentationGetter,
type DSLData_LegendStudioPlugin_Extension,
type EmbeddedDataSnippetSuggestion,
} from '@finos/legend-studio';
import { SwaggerIcon } from '@finos/legend-art';
Expand Down Expand Up @@ -226,6 +227,15 @@ export class ESService_LegendStudioPlugin
];
}

getExtraEmbeddedDataTypeOptions(): EmbeddedDataTypeOption[] {
return [
{
value: 'ServiceStore',
label: 'ServiceStore',
},
];
}

getExtraPureGrammarParserElementDocumentationGetters(): PureGrammarParserElementDocumentationGetter[] {
return [
(
Expand Down
7 changes: 6 additions & 1 deletion packages/legend-graph/src/DSLData_Exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export { DataElement } from './models/metamodels/pure/packageableElements/data/D
export { V1_DataElement } from './models/protocols/pure/v1/model/packageableElements/data/V1_DataElement';
export {
EmbeddedData,
ModelStoreData,
DataElementReference,
ExternalFormatData,
type EmbeddedDataVisitor,
} from './models/metamodels/pure/data/EmbeddedData';
Expand All @@ -29,6 +31,9 @@ export {
export * from './models/protocols/pure/DSLData_PureProtocolProcessorPlugin_Extension';
export * from './graphManager/EmbeddedData_PureGraphManagerPlugin_Extension';
export { V1_ProtocolToMetaModelEmbeddedDataBuilder } from './models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_DataElementBuilderHelper';
export { observe_ExternalFormatData } from './graphManager/action/changeDetection/Data_ObserverHelper';
export {
observe_ExternalFormatData,
observe_EmbeddedData,
} from './graphManager/action/changeDetection/Data_ObserverHelper';
export { V1_transformExternalFormatData } from './models/protocols/pure/v1/transformation/pureGraph/from/V1_DataElementTransformer';
export { V1_externalFormatDataModelSchema } from './models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataElementSerializationHelper';
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ import { FileGenerationViewerState } from '../../../stores/editor-state/FileGene
import { FileGenerationViewer } from '../../editor/edit-panel/FileGenerationViewer';
import type { DSL_LegendStudioPlugin_Extension } from '../../../stores/LegendStudioPlugin';
import { useEditorStore } from '../EditorStoreProvider';
import { PackageableDataEditorState } from '../../../stores/editor-state/element-editor-state/data/DataEditorState';
import { DataElementEditor } from './data-editor/DataElementEditor';

export const ViewerEditPanelSplashScreen: React.FC = () => {
const commandListWidth = 300;
Expand Down Expand Up @@ -263,6 +265,8 @@ export const EditPanel = observer(() => {
);
} else if (currentEditorState instanceof FileGenerationEditorState) {
return <FileGenerationEditor key={currentEditorState.uuid} />;
} else if (currentEditorState instanceof PackageableDataEditorState) {
return <DataElementEditor key={currentEditorState.uuid} />;
} else if (
currentEditorState instanceof GenerationSpecificationEditorState
) {
Expand Down
Loading

0 comments on commit bd86b7b

Please sign in to comment.