1 | import { ElementRef } from '@angular/core';
|
2 | import { GlobalPositionStrategy } from '@angular/cdk/overlay';
|
3 | import { Observable } from 'rxjs';
|
4 | import { NbConnectedPosition, NbFlexibleConnectedPositionStrategy, NbOverlayPositionBuilder, NbOverlayRef, NbPositionStrategy } from './mapping';
|
5 | import { NbPlatform } from '../platform/platform-service';
|
6 | import { NbOverlayContainerAdapter } from '../adapter/overlay-container-adapter';
|
7 | import { NbViewportRulerAdapter } from '../adapter/viewport-ruler-adapter';
|
8 | import { NbGlobalLogicalPosition } from './position-helper';
|
9 | import { NbLayoutDirection } from '../../../services/direction.service';
|
10 | import * as i0 from "@angular/core";
|
11 | export type NbAdjustmentValues = 'noop' | 'clockwise' | 'counterclockwise' | 'vertical' | 'horizontal';
|
12 | export declare enum NbAdjustment {
|
13 | NOOP = "noop",
|
14 | CLOCKWISE = "clockwise",
|
15 | COUNTERCLOCKWISE = "counterclockwise",
|
16 | VERTICAL = "vertical",
|
17 | HORIZONTAL = "horizontal"
|
18 | }
|
19 | export type NbPositionValues = 'top' | 'bottom' | 'left' | 'right' | 'start' | 'end' | 'top-end' | 'top-start' | 'bottom-end' | 'bottom-start' | 'end-top' | 'end-bottom' | 'start-top' | 'start-bottom';
|
20 | export declare enum NbPosition {
|
21 | TOP = "top",
|
22 | BOTTOM = "bottom",
|
23 | LEFT = "left",
|
24 | RIGHT = "right",
|
25 | START = "start",
|
26 | END = "end",
|
27 | TOP_END = "top-end",
|
28 | TOP_START = "top-start",
|
29 | BOTTOM_END = "bottom-end",
|
30 | BOTTOM_START = "bottom-start",
|
31 | END_TOP = "end-top",
|
32 | END_BOTTOM = "end-bottom",
|
33 | START_TOP = "start-top",
|
34 | START_BOTTOM = "start-bottom"
|
35 | }
|
36 |
|
37 |
|
38 |
|
39 |
|
40 | export declare class NbAdjustableConnectedPositionStrategy extends NbFlexibleConnectedPositionStrategy implements NbPositionStrategy {
|
41 | protected _position: NbPosition;
|
42 | protected _offset: number;
|
43 | protected _adjustment: NbAdjustment;
|
44 | protected _direction: NbLayoutDirection | undefined;
|
45 | protected appliedPositions: {
|
46 | key: NbPosition;
|
47 | connectedPosition: NbConnectedPosition;
|
48 | }[];
|
49 | readonly positionChange: Observable<NbPosition>;
|
50 | attach(overlayRef: NbOverlayRef): void;
|
51 | direction(direction: NbLayoutDirection): this;
|
52 | apply(): void;
|
53 | position(position: NbPosition): this;
|
54 | adjustment(adjustment: NbAdjustment): this;
|
55 | offset(offset: number): this;
|
56 | protected applyPositions(): void;
|
57 | protected createPositions(): NbPosition[];
|
58 | protected mapToLogicalPosition(position: NbPosition): NbPosition;
|
59 | protected persistChosenPositions(positions: NbPosition[]): void;
|
60 | protected reorderPreferredPositions(positions: NbPosition[]): NbPosition[];
|
61 | }
|
62 | export declare class NbGlobalPositionStrategy extends GlobalPositionStrategy {
|
63 | position(position: NbGlobalLogicalPosition): this;
|
64 | }
|
65 | export declare class NbPositionBuilderService {
|
66 | protected document: any;
|
67 | protected viewportRuler: NbViewportRulerAdapter;
|
68 | protected platform: NbPlatform;
|
69 | protected positionBuilder: NbOverlayPositionBuilder;
|
70 | protected overlayContainer: NbOverlayContainerAdapter;
|
71 | constructor(document: any, viewportRuler: NbViewportRulerAdapter, platform: NbPlatform, positionBuilder: NbOverlayPositionBuilder, overlayContainer: NbOverlayContainerAdapter);
|
72 | global(): NbGlobalPositionStrategy;
|
73 | connectedTo(elementRef: ElementRef): NbAdjustableConnectedPositionStrategy;
|
74 | static ɵfac: i0.ɵɵFactoryDeclaration<NbPositionBuilderService, never>;
|
75 | static ɵprov: i0.ɵɵInjectableDeclaration<NbPositionBuilderService>;
|
76 | }
|