@taiga-ui/addon-mobile
Version:
Extension package for Taiga UI that adds support for mobile specific behaviors such as custom data pickers, dropdowns, etc.
30 lines (29 loc) • 1.2 kB
TypeScript
import { type CdkVirtualScrollViewport, type VirtualScrollStrategy } from '@angular/cdk/scrolling';
import { type TuiScrollService } from '@taiga-ui/cdk/services';
import { type Observable } from 'rxjs';
/**
* This scroll strategy is hard wired with styles for iOS and Android.
* It is dependent on month height on those platforms and is designed to
* work for {@link TuiMobileCalendar} with years 1906 to 2102
*/
export declare class TuiMobileCalendarStrategy implements VirtualScrollStrategy {
private readonly isIOS;
private readonly scrollService;
private readonly index$;
private viewport;
private readonly destroy$;
constructor(isIOS: boolean, scrollService: TuiScrollService);
get scrolledIndexChange(): Observable<number>;
attach(viewport: CdkVirtualScrollViewport): void;
detach(): void;
onContentScrolled(): void;
/** These do not matter for this case */
onDataLengthChanged(): void;
onContentRendered(): void;
onRenderedOffsetChanged(): void;
scrollToIndex(index: number, behavior: ScrollBehavior): void;
private getOffsetForIndex;
private getIndexForOffset;
private computeHeight;
private updateRenderedRange;
}