UNPKG

1.74 kBTypeScriptView Raw
1import { NgZone } from '@angular/core';
2import { BlockScrollStrategy, ScrollDispatcher, ScrollStrategyOptions } from '@angular/cdk/overlay';
3import { NbLayoutScrollService } from '../../../services/scroll.service';
4import { NbViewportRulerAdapter } from './viewport-ruler-adapter';
5import * as i0 from "@angular/core";
6/**
7 * Overrides default block scroll strategy because default strategy blocks scrolling on the body only.
8 * But Nebular has its own scrollable container - nb-layout. So, we need to block scrolling in it to.
9 * */
10export declare class NbBlockScrollStrategyAdapter extends BlockScrollStrategy {
11 protected scrollService: NbLayoutScrollService;
12 constructor(document: any, viewportRuler: NbViewportRulerAdapter, scrollService: NbLayoutScrollService);
13 enable(): void;
14 disable(): void;
15 static ɵfac: i0.ɵɵFactoryDeclaration<NbBlockScrollStrategyAdapter, never>;
16 static ɵprov: i0.ɵɵInjectableDeclaration<NbBlockScrollStrategyAdapter>;
17}
18export declare class NbScrollStrategyOptions extends ScrollStrategyOptions {
19 protected scrollService: NbLayoutScrollService;
20 protected scrollDispatcher: ScrollDispatcher;
21 protected viewportRuler: NbViewportRulerAdapter;
22 protected ngZone: NgZone;
23 protected document: any;
24 constructor(scrollService: NbLayoutScrollService, scrollDispatcher: ScrollDispatcher, viewportRuler: NbViewportRulerAdapter, ngZone: NgZone, document: any);
25 block: () => NbBlockScrollStrategyAdapter;
26 static ɵfac: i0.ɵɵFactoryDeclaration<NbScrollStrategyOptions, never>;
27 static ɵprov: i0.ɵɵInjectableDeclaration<NbScrollStrategyOptions>;
28}
29export type NbScrollStrategies = keyof Pick<NbScrollStrategyOptions, 'noop' | 'close' | 'block' | 'reposition'>;