import { LiveAnnouncer } from '@angular/cdk/a11y'; import { BooleanInput, NumberInput } from '@angular/cdk/coercion'; import { CdkScrollable } from '@angular/cdk/overlay'; import { EventEmitter } from '@angular/core'; import { MatSelectionListChange } from '@angular/material/list'; import { PageEvent } from '@angular/material/paginator'; import { SortDirection } from '@angular/material/sort'; import { Code, trackByCoreResource } from '@mtna/pojo-consumer-ts'; import { CanLoad, CanLoadCtor } from '../core/common-behaviors'; import * as i0 from "@angular/core"; declare const _RdsCodeSelectBase: CanLoadCtor; export declare type RdsCodeSelectSelectionType = 'single' | 'multi'; export declare class RdsCodeSelectComponent extends _RdsCodeSelectBase implements CanLoad { private _liveAnnouncer; static ngAcceptInputType_codes: Code[] | null | undefined; static ngAcceptInputType_enablePagination: BooleanInput; static ngAcceptInputType_enableSearch: BooleanInput; static ngAcceptInputType_enableSort: BooleanInput; static ngAcceptInputType_length: NumberInput; static ngAcceptInputType_loading: BooleanInput; static ngAcceptInputType_pageIndex: NumberInput; static ngAcceptInputType_pageSize: NumberInput; static ngAcceptInputType_selectedCodes: Code[] | null | undefined; static ngAcceptInputType_sortDirection: SortDirection | null | undefined; /** Aria-label to include on the underlying list element. Defaults to 'Select codes' */ ariaLabel: string | null | undefined; /** Required codes to select from */ get codes(): Array; set codes(codesArray: Array); private _codes; /** Optional ngStyles for code list, defaults to `{ height: 'auto' }`*/ codeListStyles: { [key: string]: string; }; get sortDirection(): SortDirection; set sortDirection(direction: SortDirection); private _sortDirection; /** The length of the total number of items that are being paginated. Defaulted to 0. */ get length(): number; set length(value: number); private _length; /** Whether to enable pagination */ get enablePagination(): boolean; set enablePagination(value: boolean); private _enablePagination; /** Whether to enable text search */ get enableSearch(): boolean; set enableSearch(value: boolean); private _enableSearch; /** Whether to enable to sort button */ get enableSort(): boolean; set enableSort(value: boolean); private _enableSort; /** The zero-based page index of the displayed list of codes. Defaulted to 0. */ get pageIndex(): number; set pageIndex(value: number); private _pageIndex; /** Number of items to display on a page. */ get pageSize(): number | undefined; set pageSize(value: number | undefined); private _pageSize?; /** Code(s) the user selected */ get selectedCodes(): Array; set selectedCodes(codes: Array); private _selectedCodes; /** Search text */ searchText: string | null | undefined; /** Selection type, can be single or multi, defaults to multi */ selectionType: RdsCodeSelectSelectionType; /** 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; sortCodes: 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; }; /** Array of codes being displayed in component. */ _displayedCodes: Code[]; _sortButtonDetails: { [direction: string]: string; }; constructor(_liveAnnouncer: LiveAnnouncer); /** * Function used for comparing codes in a mat-selection-list. */ _compareCodes(c1: Code, c2: Code): boolean; /** * Sets the displayed codes so that any selected codes not in the current pagination are displayed above all other codes. */ _updateDisplayedCodes(): void; /** * 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; _handleCodeSort(currentSortValue: SortDirection): 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; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export {};