import { CdkScrollable } from '@angular/cdk/overlay'; import { EventEmitter } from '@angular/core'; import { MatSelectionListChange } from '@angular/material/list'; import { PageEvent } from '@angular/material/paginator'; import { Code, trackByCoreResource } from '@mtna/pojo-consumer-ui'; export declare type RdsFilterSelectionType = 'single' | 'multi'; export declare class RdsFilterComponent { /** Required codes to select from */ codes: Array; /** Optional ngStyles for code list, defaults to `{ height: 'auto' }`*/ codeListStyles: { [key: string]: string; }; /** Whether to enable pagination */ enablePagination: boolean; /** Whether to enable text search */ enableSearch: boolean; /** The length of the total number of codes that are being paginated */ length: number; /** Whether the codes are loading */ loading: boolean; /** The zero-based page index of the displayed list of codes */ pageIndex: number; /** Number of codes to display on a page */ pageSize: number; /** Search text */ searchText: number; /** Code(s) the user selected */ get selectedCodes(): Array; set selectedCodes(codes: Array); private _selectedCodes; /** Selection type, can be single or multi, defaults to multi */ selectionType: RdsFilterSelectionType; /** Event emitted when the user clears selected codes */ clearSelectedCodes: EventEmitter; /** Event emitted when the paginator changes the page size or page index */ pageChange: EventEmitter; /** Text search in codes */ search: EventEmitter; /** Event emitted when the user selected a code */ selectCode: EventEmitter; /** Event emitted when the user unselects a code */ unselectCode: EventEmitter; /** the scrollable list when many codes exist. Used for scrollTop on pagination and search */ scrollContainer: CdkScrollable; /** TrackBy function for the *ngFor loop of codes */ trackByCr: typeof trackByCoreResource; /** * Object map of selected Code uris. * * This was necessary because the mat-selection-list was not showing * the correct selected option if objects were not the same dispite the compareWith function. * As of material v7.3.1 */ _selectedUris: { [uri: string]: boolean; }; /** * Function used for comparing codes in a mat-selection-list. */ _compareCodes(c1: Code, c2: Code): boolean; /** * When a code is selected/unselected from a mat-selection-list, * emit the appropriate event. * * @param change change event that describes which code was selected/unselected */ _handleSelectionListChange(change: MatSelectionListChange): void; /** * When a code is selected in a mat-radio group, * emit events to unselect the previously selected code * and emit an event to select the new code. * * @param code the code that is selected */ _handleRadioGroupChange(code: Code): void; _scrollToTop(): void; }