UNPKG

@ctodev/cclibrary-typings

Version:

Library typings for use with CLARC INFINITY

74 lines (73 loc) 2.71 kB
import { OnDestroy } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { TccSearchListDialog } from '../../components/tcc-search-list-dialog/tcc-search-list-dialog.component'; import { Observable } from 'rxjs'; import { TccODataService } from '../../../odata/services/tcc-odata/tcc-odata.service'; import { TccODataQuery } from '../../../odata/services/tcc-odata-query/tcc-odata-query'; import { TccInputMask } from '../../models/inputMask.model'; import { TccC4Node, TccKeyValuePair } from '../../../odata/models/shared.model'; import { TccCatchErrorService } from '../tcc-catch-error/tcc-catch-error.service'; import { TccSingleton } from '../../../core/models/tcc-singleton.model'; export declare namespace TccSearchListDialogServiceNamespace { interface chipData<T> { Id: string; Name: string; ActiveItems: Array<item>; PermanentItems?: Array<item>; DisabledItems?: string[]; Service: TccODataService<T>; prefix?: string; matPrefix?: string; } interface _chipData<T> extends chipData<T> { Query?: TccODataQuery<T>; AllItems?: any[]; } interface _chip { Id: string; Name: string; ActiveItems: Array<string | TccKeyValuePair>; PermanentItems: Array<string | TccKeyValuePair>; } interface item { Id: string; Name: string; Value: boolean | { [key: string]: any; }; } } export declare class TccSearchListDialogService implements TccSingleton, OnDestroy { private matDialog; private tccCatchError; private dialogRef; private nextPageSubscription; private previousPageSubscription; private searchSubscription; private changeChipSubscription; private afterCloseSubscription; private afterOpenedSubscription; private dataArray; private allItemsObj; private searchedItemsObj; private currChipId; private pageSize; private currLocalPage; constructor(matDialog: MatDialog, tccCatchError: TccCatchErrorService); init(): void; reset(): void; ngOnDestroy(): void; setChips<T>(chips: TccSearchListDialogServiceNamespace.chipData<T>[]): void; openDialog<T>(options?: TccSearchListDialog.Options): Observable<TccInputMask.valueChanges>; setAllItems(chipId: string, allItems: Array<TccSearchListDialogServiceNamespace.item>): void; getDataElement(id: string): TccC4Node; private getChips; private onChangeChip; private onSearchListDialogSearch; private getChipById; private addDataSet; private addSearchDataSet; private getFirstPage; private getNextPage; private checkedResults; }