Member Junction
    Preparing search index...

    EntityCardsComponent - Card-based view for entity records

    This component provides an auto-generated card layout for displaying entity records. Cards are automatically structured based on entity metadata.

    Supports two modes:

    1. Parent-managed data: Records are passed in via [records] input
    2. Standalone: Component loads its own data with pagination
    <mj-entity-cards
    [entity]="selectedEntity"
    [records]="filteredRecords"
    [selectedRecordId]="selectedId"
    (recordSelected)="onRecordSelected($event)"
    (recordOpened)="onRecordOpened($event)">
    </mj-entity-cards>

    Hierarchy (View Summary)

    Implements

    • OnChanges
    • OnInit
    • AfterViewChecked
    Index

    Constructors

    Properties

    autoCardTemplate: CardTemplate | null = null

    Auto-generated card template

    cardTemplate: CardTemplate | null = null

    Custom card template (optional - auto-generated if not provided)

    cardViewModels: CardViewModel[] = []

    Precomputed per-record view-models bound by the template's @for. Rebuilt only when the source records, filter, selection, hidden matches, or template change — never per change-detection cycle. This eliminates the 4-5 buildPkString() allocations + 4 RegExp-building highlight calls that the previous per-card-per-CD method bindings incurred.

    entity: EntityInfo | null = null

    The entity metadata for the records being displayed

    filterText: string = ''

    Current filter text for highlighting matches Supports SQL-style % wildcards

    hiddenFieldMatches: Map<string, string> = ...

    Map of record IDs to hidden field names that matched the filter Used to display an indicator when a match occurred in a non-visible field

    isLoading: boolean = false

    Loading state for standalone mode

    pageSize: number = 100

    Page size for standalone data loading

    100
    
    Provider: IMetadataProvider | null

    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.

    recordOpened: EventEmitter<RecordOpenedEvent> = ...

    Emitted when a record should be opened (double click or open button)

    records: Record<string, unknown>[] | null = null

    The records to display as cards (optional - component can load its own)

    recordSelected: EventEmitter<RecordSelectedEvent> = ...

    Emitted when a record is selected (single click)

    selectedRecordId: string | null = null

    The currently selected record's primary key string

    "ɵdir": unknown
    "ɵfac": unknown

    Accessors

    • get ProviderToUse(): IMetadataProvider

      Returns either the default Metadata provider or the one specified in the Provider property, if it was specified

      Returns IMetadataProvider

    • get RunQueryToUse(): IRunQueryProvider

      Returns either the default RunQuery provider or the one specified in the Provider property, if it was specified

      Returns IRunQueryProvider

    • get RunReportToUse(): IRunReportProvider

      Returns either the default RunReport provider or the one specified in the Provider property, if it was specified

      Returns IRunReportProvider

    • get RunViewToUse(): IRunViewProvider

      Returns either the default RunView provider or the one specified in the Provider property, if it was specified

      Returns IRunViewProvider

    Methods

    • 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.

      Parameters

      • changes: { [propName: string]: SimpleChange<any> }

        The changed properties.

      Returns void

    • A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.

      Returns void