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.
Use EntityDeselected.
The same emitter under the old binding name, so a template still binding (entityDeselected) keeps working. Must stay AFTER EntityDeselected: class fields initialise in order, and the other way round this captures undefined.
Emitted when the selection is cleared.
Use EntityDoubleClick.
The same emitter under the old binding name, so a template still binding (entityDoubleClick) keeps working. Must stay AFTER EntityDoubleClick: class fields initialise in order, and the other way round this captures undefined.
Emitted when an entity is double-clicked. Typically used to open the entity record.
Use EntitySelected.
The same emitter under the old binding name, so a template still binding (entitySelected) keeps working. Must stay AFTER EntitySelected: class fields initialise in order, and the other way round this captures undefined.
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.
Use OpenRecord.
The same emitter under the old binding name, so a template still binding (openRecord) keeps working. Must stay AFTER OpenRecord: class fields initialise in order, and the other way round this captures undefined.
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).
Use RefreshRequested.
The same emitter under the old binding name, so a template still binding (refreshRequested) keeps working. Must stay AFTER RefreshRequested: class fields initialise in order, and the other way round this captures undefined.
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.
Use StateChange.
The same emitter under the old binding name, so a template still binding (stateChange) keeps working. Must stay AFTER StateChange: class fields initialise in order, and the other way round this captures undefined.
Emitted when diagram state changes (selection, zoom, etc.). Parent can use this for state persistence.
Use ZoomChange.
The same emitter under the old binding name, so a template still binding (zoomChange) keeps working. Must stay AFTER ZoomChange: class fields initialise in order, and the other way round this captures undefined.
Emitted when zoom/pan changes. Parent can use this for state persistence.
StaticɵdirStaticɵfacUse AllEntities.
Use Depth.
Use Entities.
Use ErdDiagram.
Use FocusDepth.
Use FocusEntityId.
Use HeaderTitle.
Use HighlightedEntityIds.
Use IncludeIncoming.
Use IncludeOutgoing.
Use IsRefreshing.
Returns either the default Metadata provider or the one specified in the Provider property, if it was specified
Use ReadOnly.
Returns either the default RunQuery 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
Use SelectedEntityId.
Use ShowHeader.
Use ExportAsSVG.
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.
Use OnNodeDeselected.
Use OnRefreshRequested.
Use Refresh.
Refresh the diagram.
Use ResetZoom.
Reset zoom to default.
Restore diagram state.
OptionalrestorePositions: booleanUse TriggerResize.
Trigger a resize recalculation. Call this when the container size changes.
Use ZoomIn.
Zoom in on the diagram.
Use ZoomOut.
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