Member Junction
    Preparing search index...

    Class RelatedEntityDisplayComponentGeneratorBaseAbstract

    Abstract base class responsible for generating Angular template code for related entity display components. Each subclass handles a specific type of related entity display (e.g., UserViewGrid, JoinGrid, Timeline).

    The generated templates are injected into Angular forms that extend BaseFormComponent, so all BaseFormComponent methods and properties are available in the generated templates:

    Commonly used BaseFormComponent methods/properties:

    • BuildRelationshipViewParamsByEntityName() - Creates view parameters for related entities
    • NewRecordValues() - Provides default values for new related records
    • IsCurrentTab() - Checks if the current tab is active (useful for deferred loading)
    • GridEditMode() - Determines if grids should be in edit mode
    • GridBottomMargin() - Provides consistent bottom margin for grids

    Implementation Pattern:

    1. Extend this class
    2. Register with @RegisterClass(RelatedEntityDisplayComponentGeneratorBase, "YourComponentName")
    3. Implement all abstract methods
    4. Define a configuration class extending ComponentConfigBase
    5. Generate appropriate Angular templates in the Generate() method

    BaseFormComponent

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get ImportPath(): string

      Returns the NPM package import path for the Angular components used by this generator. Can be a local import path or an external package (e.g., '@memberjunction/ng-user-view-grid')

      Returns string

      The import path string

    Methods

    • Helper method that returns the EntityFieldInfo object for the foreign key field in the specified entity that links to the related entity. Provides full field metadata.

      Parameters

      • entityName: string

        The name of the entity containing the foreign key

      • relatedEntityName: string

        The name of the entity being referenced

      Returns EntityFieldInfo

      The EntityFieldInfo object for the foreign key field

      Error if the entity or foreign key field cannot be found

    • Helper method that returns the name of the foreign key field in the specified entity that links to the related entity. Useful for building relationship queries and joins.

      Parameters

      • entityName: string

        The name of the entity containing the foreign key

      • relatedEntityName: string

        The name of the entity being referenced

      Returns string

      The name of the foreign key field

      Error if the foreign key field cannot be found