Member Junction
    Preparing search index...

    Slide-in panel that lists all hard-deleted records for a single entity and lets a user with Delete permission re-create any of them from its historical RecordChange snapshot.

    Surface this component from any entity-viewing context where the user might need to restore a hard-deleted record. The EntityViewerComponent, EntityDataGridComponent, and EntityCardsComponent already expose a ShowRecycleBin input (default true) that renders a chip in their toolbar — you only need to use this component directly if you're building a custom viewer.

    The chip / panel is gated on entity.UserPermissions.CanDelete — rationale: there is no native "undelete" permission in MemberJunction, but if a user has the higher-trust permission to delete records of an entity, restoring deleted ones is well within scope. The actual re-create action additionally requires CanCreate; without it the Restore button on each card disables with a tooltip.

    This component only surfaces hard-deleted records. Soft-deletes (e.g., IsDeleted flags, Status='Inactive', etc.) leave the record visible in normal entity views, so the standard Record Changes panel + restore preview already handles them — no Recycle Bin needed.

    Every meaningful action emits a paired before* / after* event. The before* event carries cancel: boolean so consumers can intercept — useful for custom approval workflows, audit logging, or to take over the actual restore execution entirely. See BeforeRecordRestoreEventArgs and friends.

    Basic usage (rareusually embedded by entity-viewer)
    <mj-recycle-bin
    [Visible]="showBin"
    [EntityName]="'Customers'"
    (Closed)="showBin = false"
    (BeforeRecordRestore)="auditRestore($event)"
    (AfterRestoreCommit)="onRestored($event)">
    </mj-recycle-bin>
    Intercepting a restore
    onBeforeRecordRestore(e: BeforeRecordRestoreEventArgs) {
    if (!myCustomApproval(e.entry)) {
    e.cancel = true;
    e.cancelReason = 'Awaiting compliance approval';
    }
    }

    Hierarchy (View Summary)

    Implements

    • OnInit
    Index

    Constructors

    Properties

    AfterRecordRestore: EventEmitter<AfterRecordRestoreEventArgs> = ...

    Fires after the user closes the restore preview, with success indicating whether the actual insert worked.

    AfterRecycleBinOpen: EventEmitter<AfterRecycleBinOpenEventArgs> = ...

    Fires after the deleted-record query completes.

    AfterRestoreCommit: EventEmitter<AfterRestoreCommitEventArgs> = ...

    Fires after the insert completes (success or failure).

    BeforeRecordRestore: EventEmitter<BeforeRecordRestoreEventArgs> = ...

    Cancelable. Fires when the user clicks Restore on a deleted-record card, before the preview panel opens. Setting cancel = true skips the preview entirely — useful for consumers that want to take over the restore flow themselves.

    BeforeRecycleBinOpen: EventEmitter<BeforeRecycleBinOpenEventArgs> = ...

    Cancelable. Fires when Visible flips to true and the bin is about to query for deleted records. Setting cancel = true aborts the query (and the panel will show the empty state).

    BeforeRestoreCommit: EventEmitter<BeforeRestoreCommitEventArgs> = ...

    Cancelable. Fires after the user clicks Restore in the preview but before the entity is inserted. Setting cancel = true aborts the insert.

    CanCreate: boolean = false
    CanDelete: boolean = false

    Permission flags (computed once when EntityName is set).

    Closed: EventEmitter<void> = ...

    Fires when the user closes the panel.

    ContextUser: UserInfo | null = null

    Optional context user. When omitted, falls back to this.ProviderToUse.CurrentUser per standard MJ conventions.

    EntityName: string | null = null

    The name of the entity whose deleted records will be listed. Required.

    Entries: RecycleBinEntry[] = []
    IsLoading: boolean = false
    LoadError: string | null = null
    MaxRecords: number = 200

    Maximum number of deleted-record cards to load. Defaults to 200 — this is a UI affordance, not a hard limit; consumers needing pagination should listen to AfterRecycleBinOpen and surface their own UI if deletedRecordCount === MaxRecords.

    PreviewVisible: boolean = false
    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.

    SelectedEntry: RecycleBinEntry | null = null

    The currently selected entry whose preview is open.

    "ɵ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 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