UNPKG

@obliczeniowo/elementary

Version:
79 lines (70 loc) 3.24 kB
import * as i0 from '@angular/core'; import { ChangeDetectorRef, SimpleChanges } from '@angular/core'; import * as i2 from '@angular/common'; import * as i3 from '@obliczeniowo/elementary/buttons'; import * as i4 from '@obliczeniowo/elementary/icons'; import * as i5 from '@obliczeniowo/elementary/pie-progress'; import * as i6 from '@angular/cdk/overlay'; interface Controller { element: HTMLElement | undefined | null; horizontal: boolean; position: number; checkShow: () => void; } interface Page { step: number; jump: number; } type Move = 'up' | 'down'; type MoveSize = 'step' | 'jump'; declare abstract class PageControllerAdapter { page: Page; constructor(page: Page); protected abstract scroll(nav: Controller, move?: number): void; abstract positionChange(nav: Controller, pos: number): void; abstract stepsPos(nav: Controller): number; abstract show(nav: Controller): boolean; move(nav: Controller, direction?: Move, size?: MoveSize): void; } declare class ScrollerNavComponent implements Controller { protected change: ChangeDetectorRef; element: HTMLElement | undefined | null; show: boolean; horizontal: boolean; pageController: PageControllerAdapter; position: number; isOpen: boolean; protected resize: ResizeObserver; constructor(change: ChangeDetectorRef); ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; checkShow(): void; toggle(): void; static ɵfac: i0.ɵɵFactoryDeclaration<ScrollerNavComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ScrollerNavComponent, "obl-scroller-nav", never, { "element": { "alias": "element"; "required": false; }; "show": { "alias": "show"; "required": false; }; "horizontal": { "alias": "horizontal"; "required": false; }; "pageController": { "alias": "pageController"; "required": false; }; }, {}, never, never, false, never>; } declare class ScrollerNavModule { static ɵfac: i0.ɵɵFactoryDeclaration<ScrollerNavModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<ScrollerNavModule, [typeof ScrollerNavComponent], [typeof i2.CommonModule, typeof i3.ButtonsModule, typeof i4.IconsModule, typeof i5.PieProgressModule, typeof i6.OverlayModule], [typeof ScrollerNavComponent]>; static ɵinj: i0.ɵɵInjectorDeclaration<ScrollerNavModule>; } declare class PageControllerElementAdapter extends PageControllerAdapter { constructor(); protected scroll(nav: Controller, move?: number): void; show(nav: Controller): boolean; positionChange(nav: Controller, pos: number): void; stepsPos(nav: Controller): number; } declare class PageControllerRecordAdapter extends PageControllerAdapter { protected max: number; position: number; getMax(): number; setMax(max: number, nav?: Controller): void; constructor(max: number); protected scroll(nav: Controller, move?: number): void; positionChange(nav: Controller, pos: number): void; stepsPos(nav: Controller): number; show(nav: Controller): boolean; } export { PageControllerAdapter, PageControllerElementAdapter, PageControllerRecordAdapter, ScrollerNavComponent, ScrollerNavModule }; export type { Controller, Move, MoveSize, Page };