1 | import { AfterContentChecked, AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy, QueryList, TemplateRef, AfterViewInit } from '@angular/core';
|
2 | import { NgbCarouselConfig } from './carousel-config';
|
3 | import { NgbSlideEventDirection } from './carousel-transition';
|
4 |
|
5 |
|
6 |
|
7 | export declare class NgbSlide {
|
8 | tplRef: TemplateRef<any>;
|
9 | |
10 |
|
11 |
|
12 |
|
13 |
|
14 | id: string;
|
15 | |
16 |
|
17 |
|
18 |
|
19 |
|
20 | slid: EventEmitter<NgbSingleSlideEvent>;
|
21 | constructor(tplRef: TemplateRef<any>);
|
22 | }
|
23 | /**
|
24 | * Carousel is a component to easily create and control slideshows.
|
25 | *
|
26 | * Allows to set intervals, change the way user interacts with the slides and provides a programmatic API.
|
27 | */
|
28 | export declare class NgbCarousel implements AfterContentChecked, AfterContentInit, AfterViewInit, OnDestroy {
|
29 | private _platformId;
|
30 | private _ngZone;
|
31 | private _cd;
|
32 | private _container;
|
33 | slides: QueryList<NgbSlide>;
|
34 | NgbSlideEventSource: typeof NgbSlideEventSource;
|
35 | private _destroy$;
|
36 | private _interval$;
|
37 | private _mouseHover$;
|
38 | private _focused$;
|
39 | private _pauseOnHover$;
|
40 | private _pauseOnFocus$;
|
41 | private _pause$;
|
42 | private _wrap$;
|
43 | |
44 |
|
45 |
|
46 |
|
47 |
|
48 | animation: boolean;
|
49 | |
50 |
|
51 |
|
52 |
|
53 |
|
54 | activeId: string;
|
55 | |
56 |
|
57 |
|
58 | set interval(value: number);
|
59 | get interval(): number;
|
60 | |
61 |
|
62 |
|
63 | set wrap(value: boolean);
|
64 | get wrap(): boolean;
|
65 | |
66 |
|
67 |
|
68 | keyboard: boolean;
|
69 | |
70 |
|
71 |
|
72 |
|
73 |
|
74 | set pauseOnHover(value: boolean);
|
75 | get pauseOnHover(): boolean;
|
76 | |
77 |
|
78 |
|
79 | set pauseOnFocus(value: boolean);
|
80 | get pauseOnFocus(): boolean;
|
81 | |
82 |
|
83 |
|
84 |
|
85 |
|
86 | showNavigationArrows: boolean;
|
87 | |
88 |
|
89 |
|
90 |
|
91 |
|
92 | showNavigationIndicators: boolean;
|
93 | |
94 |
|
95 |
|
96 |
|
97 |
|
98 | slide: EventEmitter<NgbSlideEvent>;
|
99 | |
100 |
|
101 |
|
102 |
|
103 |
|
104 |
|
105 |
|
106 | slid: EventEmitter<NgbSlideEvent>;
|
107 | private _transitionIds;
|
108 | set mouseHover(value: boolean);
|
109 | get mouseHover(): boolean;
|
110 | set focused(value: boolean);
|
111 | get focused(): boolean;
|
112 | constructor(config: NgbCarouselConfig, _platformId: any, _ngZone: NgZone, _cd: ChangeDetectorRef, _container: ElementRef);
|
113 | arrowLeft(): void;
|
114 | arrowRight(): void;
|
115 | ngAfterContentInit(): void;
|
116 | ngAfterContentChecked(): void;
|
117 | ngAfterViewInit(): void;
|
118 | ngOnDestroy(): void;
|
119 | /**
|
120 | * Navigates to a slide with the specified identifier.
|
121 | */
|
122 | select(slideId: string, source?: NgbSlideEventSource): void;
|
123 | /**
|
124 | * Navigates to the previous slide.
|
125 | */
|
126 | prev(source?: NgbSlideEventSource): void;
|
127 | /**
|
128 | * Navigates to the next slide.
|
129 | */
|
130 | next(source?: NgbSlideEventSource): void;
|
131 | /**
|
132 | * Pauses cycling through the slides.
|
133 | */
|
134 | pause(): void;
|
135 | /**
|
136 | * Restarts cycling through the slides from left to right.
|
137 | */
|
138 | cycle(): void;
|
139 | /**
|
140 | * Set the focus on the carousel.
|
141 | */
|
142 | focus(): void;
|
143 | private _cycleToSelected;
|
144 | private _getSlideEventDirection;
|
145 | private _getSlideById;
|
146 | private _getSlideIdxById;
|
147 | private _getNextSlide;
|
148 | private _getPrevSlide;
|
149 | private _getSlideElement;
|
150 | }
|
151 | /**
|
152 | * A slide change event emitted right after the slide transition is completed.
|
153 | */
|
154 | export interface NgbSlideEvent {
|
155 | |
156 |
|
157 |
|
158 | prev: string;
|
159 | |
160 |
|
161 |
|
162 | current: string;
|
163 | |
164 |
|
165 |
|
166 |
|
167 |
|
168 | direction: NgbSlideEventDirection;
|
169 | |
170 |
|
171 |
|
172 |
|
173 |
|
174 | paused: boolean;
|
175 | |
176 |
|
177 |
|
178 |
|
179 |
|
180 |
|
181 |
|
182 | source?: NgbSlideEventSource;
|
183 | }
|
184 |
|
185 |
|
186 |
|
187 |
|
188 |
|
189 | export interface NgbSingleSlideEvent {
|
190 | |
191 |
|
192 |
|
193 | isShown: boolean;
|
194 | |
195 |
|
196 |
|
197 |
|
198 |
|
199 | direction: NgbSlideEventDirection;
|
200 | |
201 |
|
202 |
|
203 |
|
204 |
|
205 |
|
206 | source?: NgbSlideEventSource;
|
207 | }
|
208 | export declare enum NgbSlideEventSource {
|
209 | TIMER = "timer",
|
210 | ARROW_LEFT = "arrowLeft",
|
211 | ARROW_RIGHT = "arrowRight",
|
212 | INDICATOR = "indicator"
|
213 | }
|
214 | export declare const NGB_CAROUSEL_DIRECTIVES: (typeof NgbSlide | typeof NgbCarousel)[];
|