OptionalallAll entities in the system for relationship discovery. If not provided, uses Metadata.Entities automatically. This is used to look up related entities when building the ERD.
Configuration options passed to the underlying ERD component.
Number of relationship hops to include when auto-discovering related entities.
0: Show only the provided entities (no auto-discovery)1: Show provided entities + directly related entities (default)2+: Show entities within N relationship hopsThe entities to display in the ERD.
Pass one or more EntityInfo objects. The component will automatically
discover and display related entities based on the depth setting.
Emitted when the selection is cleared.
Emitted when an entity is double-clicked. Typically used to open the entity record.
Emitted when an entity is selected by clicking.
The parent should update selectedEntityId in response.
Computed ERD nodes
Focus depth when focusEntityId is set.
ID of entity to focus on (shows only this entity and related up to depth). If null, shows all provided entities.
Title for the header bar.
IDs of entities to highlight (in addition to selected).
Include incoming relationships (entities that reference these entities).
Include outgoing relationships (entities these reference via FK).
Whether the diagram is in a loading/refreshing state.
Emitted when requesting to open an entity record. This is the standard MJ pattern for navigation.
If specified, this provider will be used for communication and for all metadata purposes. By default, if not provided, the Metadata and RunView classes are used for this and the default GraphQLDataProvider is used which is connected to the same back-end MJAPI instance as the Metadata and RunView classes. If you want to have this component connect to a different MJAPI back-end, create an instance of a ProviderBase sub-class like GraphQLDataProvider/etc, and configure it as appropriate to connect to the MJAPI back-end you want to use, and then pass it in here.
Whether the diagram is read-only (no selection/dragging).
Emitted when user requests a refresh via the header button.
ID of the currently selected entity. Controlled by parent - the component emits selection events but doesn't manage selection state internally.
Whether to show the header bar with controls.
Emitted when diagram state changes (selection, zoom, etc.). Parent can use this for state persistence.
Emitted when zoom/pan changes. Parent can use this for state persistence.
StaticɵdirStaticɵfacReturns either the default Metadata provider or the one specified in the Provider property, if it was specified
Returns either the default RunQuery provider or the one specified in the Provider property, if it was specified
Returns either the default RunReport provider or the one specified in the Provider property, if it was specified
Returns either the default RunView provider or the one specified in the Provider property, if it was specified
Export diagram as SVG.
Get current diagram state for persistence.
A callback method that is invoked immediately after the default change detector has checked data-bound properties if at least one has changed, and before the view and content children are checked.
The changed properties.
Refresh the diagram.
Reset zoom to default.
Restore diagram state.
OptionalrestorePositions: booleanTrigger a resize recalculation. Call this when the container size changes.
Zoom in on the diagram.
Zoom out on the diagram.
Zoom to a specific entity.
Optionalscale: numberFit all nodes in view.
Optionalpadding: number
Higher-level MemberJunction Entity ERD component that provides a simplified API for displaying entity relationship diagrams using EntityInfo objects.
This component wraps the generic
ERDDiagramComponentand handles the transformation of MemberJunction EntityInfo objects to the generic ERD format automatically.Key Features
EntityInfo[]- no manual transformation neededUsage Modes
Single Entity Mode (Entity Form)
Show one entity and its immediate relationships:
Multi-Entity Mode (Schema Explorer)
Show multiple entities with persistence handled by parent:
Important Design Decisions
selectedEntityIdinput. The component emitsentitySelectedwhen user clicks, but parent decides what to do.See
ERDDiagramComponent for the underlying generic component