import { OnInit, ChangeDetectorRef } from '@angular/core'; import { LetterToBoardService, LetterOnBoard } from '@schoolbelle/api/letter-to-board'; import { GroupService } from '@schoolbelle/api/group'; import { InfiniteListService } from '@schoolbelle/common/infinite-list'; import { Subscription, Observable, Subject } from 'rxjs'; import { BoardService } from '@schoolbelle/api/board'; import { LetterReadService } from '@schoolbelle/api/letter-read'; import { ActivatedRoute } from '@angular/router'; import { LetterService } from '@schoolbelle/api/letter'; export declare type LetterListQuries = { query?: string; survey?: boolean; mine?: boolean; from?: number; to?: number; }; export declare const quriesDefault: LetterListQuries; export declare class LetterListComponent implements OnInit { group: GroupService; board: BoardService; protected letter: LetterService; protected ltb: LetterToBoardService; protected read: LetterReadService; protected route: ActivatedRoute; protected cdRef: ChangeDetectorRef; /** * Should fetch an initial chunk programmatically */ RUN_INITIALLY: boolean; /** * Constant query params to be applied when fetching */ defaultParams: { [key: string]: any; }; /** * Filtering elements */ queries: LetterListQuries; protected queriesChangeEvent: Subject<{}>; protected refreshFixedList: Subject<{}>; _fixed: LetterOnBoard[]; fixed: LetterOnBoard[]; list: LetterOnBoard[]; infinite: InfiniteListService; boardMap: Map; }>; board$: Observable; protected subscriptions: Subscription; constructor(group: GroupService, board: BoardService, letter: LetterService, ltb: LetterToBoardService, read: LetterReadService, route: ActivatedRoute, cdRef: ChangeDetectorRef); ngOnInit(): void; ngOnDestroy(): void; defaultListFilter(item: any): boolean; queryListFilter(item: any): boolean; /** * Update board related properties upon switching boards * @param bid */ fill(bid: string): void; map(li: any): any; filter(li: any): boolean; updateGeneralList(list: LetterOnBoard[]): void; updateFixedList(list: LetterOnBoard[]): void; trackByInternalId(index: any, item: any): any; search(params?: { query?: string; survey?: boolean; mine?: boolean; from?: number; to?: number; }): void; fetchLatest(): Observable>; removeItem(item: { ltg_id: number; }): number; /** * update a matched item first in infinite list and then in component list too. * Infinite list may have a "map" function provided. * In that case, the matched item in component list must be replaced with the one from the infinite list. * * @param ltg_id * @param data * @returns */ updateItem(ltg_id: number, data: { [key: string]: any; }): number; markAsRead(item: LetterOnBoard): Observable; loadGeneralList(): Observable<{ infinite: InfiniteListService; list: any[]; }>; loadFixedList(): Observable; refreshItem(item: { ltg_id: number; }): Observable; isInFixedList(item: any): boolean; fixAtTopFor(item: LetterOnBoard, time?: number): Observable; scrollHasHitBottom(): void; scrollHasHitTop(): void; }