import { LiveAnnouncer } from '@angular/cdk/a11y'; import { BooleanInput } from '@angular/cdk/coercion'; import { AfterViewInit, ChangeDetectorRef, OnInit } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort, Sort } from '@angular/material/sort'; import { MatTableDataSource } from '@angular/material/table'; import { ApplicationUser, RoleType } from '@mtna/core-user-ui'; import { CanDestroyNotify } from '@mtna/lib-ui'; import { BaseUserService } from '@mtna/lib-ui/base-user-service'; import { MtnaErrorService } from '@mtna/lib-ui/error'; import { MtnaLogger } from '@mtna/lib-ui/logger'; import { BehaviorSubject } from 'rxjs'; import { UserColumn } from './user-column.model'; import { MtnaUserManagementConfig } from './user-management-config.model'; import * as i0 from "@angular/core"; declare const UserManagementBase: import("@mtna/lib-ui").CanDestroyNotifyCtor & import("@mtna/lib-ui").MtnaAriaHeadingLevelCtor & { new (): {}; }; /** * MTNA component to display users' account information within a table. * Utilizes BaseUserService's REST endpoints to retrieve `ApplicationUsers` & `RoleTypes` for rows & columns respectively. * * @author Nick Richards * @author Chase Moore */ export declare class MtnaUserManagementComponent extends UserManagementBase implements AfterViewInit, CanDestroyNotify, OnInit { private cdr; private logger; private errorService; private userService; private liveAnnouncer; protected config?: MtnaUserManagementConfig | undefined; static ngAcceptInputType_columnDisplay: { [column: string]: string; } | null | undefined; static ngAcceptInputType_columns: UserColumn[] | null | undefined; static ngAcceptInputType_showRoles: BooleanInput; static ngAcceptInputType_title: string | null | undefined; static ngAcceptInputType_description: string | null | undefined; paginator: MatPaginator; sort: MatSort; /** Map of display values for the columns' header cells. Defaults to titlecased column id, if not provided. */ get columnDisplay(): { [column: string]: string; }; set columnDisplay(c: { [column: string]: string; }); private _columnDisplay; /** Table column IDs keyed on `ApplicationUser` properties. If `showRoles` is true, application role columns will be added dynamically. */ get columns(): UserColumn[]; set columns(c: UserColumn[]); private _columns; description: string; /** Route path when user edit button is clicked. */ editUserPath: string; /** Material class used for the header of the component. Defaults to mat-h1. */ headerClass: string; /** Whether to display the user role column(s) */ get showRoles(): boolean; set showRoles(s: boolean); private _showRoles; title: string; dataSource: MatTableDataSource>; /** All columns to display, including user role columns. */ _displayedColumns: string[]; /** Whether to display the lock column */ _hasLockColumn: boolean; /** Map of column IDs that belong to a User Role */ _isRoleColumn: { [columnId: string]: boolean; }; /** The roles to be displayed if desired */ _roleTypes?: Array; /** Whether to display disabled user accounts */ showLockedUsers$: BehaviorSubject; _editUserText: string; _sortByText: string; _localizedSortTextMap: { [sort: string]: string; }; /** Manages the status of the progress bar */ protected _loading$: BehaviorSubject; loading$: import("rxjs").Observable; /** All application users, retained internally for filtering locked users */ protected _users: ApplicationUser[]; constructor(cdr: ChangeDetectorRef, logger: MtnaLogger, errorService: MtnaErrorService, userService: BaseUserService, liveAnnouncer: LiveAnnouncer, config?: MtnaUserManagementConfig | undefined); ngOnInit(): void; ngAfterViewInit(): void; handleSortChangeAnnouncement(sort: Sort): void; /** Retrieves the available RoleTypes to display */ protected getRoles(): void; /** Retrieves all application users & initiates setting the data */ protected getUsers(showLocked?: boolean): void; /** * Sets the user data on the DataSource. * @param showLocked Whether to show locked users. */ protected setTableData(showLocked: boolean): void; /** Handles add/removal of the 'locked users' slide toggle */ protected showOrHideLockedUserSlideToggle(): void; /** * Provides the DataSource with sortable string values for each column. * NOTE: Default function only sorts on string | number | Role * @param row An ApplicationUser. * @param columnId ID of the column being sorted. * @returns User property value to sort on. */ protected sortingColumnAccessor: (row: ApplicationUser, columnId: string | UserColumn) => string; /** * Sets the displayed columns & adds Role columns if shown. */ protected updateDisplayedColumns(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export {};