source: trip-planner-front/node_modules/@angular/cdk/esm2015/overlay/overlay-directives.js@ eed0bf8

Last change on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 47.2 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { Directionality } from '@angular/cdk/bidi';
9import { coerceBooleanProperty } from '@angular/cdk/coercion';
10import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
11import { TemplatePortal } from '@angular/cdk/portal';
12import { Directive, ElementRef, EventEmitter, Inject, InjectionToken, Input, Optional, Output, TemplateRef, ViewContainerRef, } from '@angular/core';
13import { Subscription } from 'rxjs';
14import { takeWhile } from 'rxjs/operators';
15import { Overlay } from './overlay';
16import { OverlayConfig } from './overlay-config';
17import { FlexibleConnectedPositionStrategy, } from './position/flexible-connected-position-strategy';
18/** Default set of positions for the overlay. Follows the behavior of a dropdown. */
19const defaultPositionList = [
20 {
21 originX: 'start',
22 originY: 'bottom',
23 overlayX: 'start',
24 overlayY: 'top'
25 },
26 {
27 originX: 'start',
28 originY: 'top',
29 overlayX: 'start',
30 overlayY: 'bottom'
31 },
32 {
33 originX: 'end',
34 originY: 'top',
35 overlayX: 'end',
36 overlayY: 'bottom'
37 },
38 {
39 originX: 'end',
40 originY: 'bottom',
41 overlayX: 'end',
42 overlayY: 'top'
43 }
44];
45/** Injection token that determines the scroll handling while the connected overlay is open. */
46export const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY = new InjectionToken('cdk-connected-overlay-scroll-strategy');
47/**
48 * Directive applied to an element to make it usable as an origin for an Overlay using a
49 * ConnectedPositionStrategy.
50 */
51export class CdkOverlayOrigin {
52 constructor(
53 /** Reference to the element on which the directive is applied. */
54 elementRef) {
55 this.elementRef = elementRef;
56 }
57}
58CdkOverlayOrigin.decorators = [
59 { type: Directive, args: [{
60 selector: '[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]',
61 exportAs: 'cdkOverlayOrigin',
62 },] }
63];
64CdkOverlayOrigin.ctorParameters = () => [
65 { type: ElementRef }
66];
67/**
68 * Directive to facilitate declarative creation of an
69 * Overlay using a FlexibleConnectedPositionStrategy.
70 */
71export class CdkConnectedOverlay {
72 // TODO(jelbourn): inputs for size, scroll behavior, animation, etc.
73 constructor(_overlay, templateRef, viewContainerRef, scrollStrategyFactory, _dir) {
74 this._overlay = _overlay;
75 this._dir = _dir;
76 this._hasBackdrop = false;
77 this._lockPosition = false;
78 this._growAfterOpen = false;
79 this._flexibleDimensions = false;
80 this._push = false;
81 this._backdropSubscription = Subscription.EMPTY;
82 this._attachSubscription = Subscription.EMPTY;
83 this._detachSubscription = Subscription.EMPTY;
84 this._positionSubscription = Subscription.EMPTY;
85 /** Margin between the overlay and the viewport edges. */
86 this.viewportMargin = 0;
87 /** Whether the overlay is open. */
88 this.open = false;
89 /** Whether the overlay can be closed by user interaction. */
90 this.disableClose = false;
91 /** Event emitted when the backdrop is clicked. */
92 this.backdropClick = new EventEmitter();
93 /** Event emitted when the position has changed. */
94 this.positionChange = new EventEmitter();
95 /** Event emitted when the overlay has been attached. */
96 this.attach = new EventEmitter();
97 /** Event emitted when the overlay has been detached. */
98 this.detach = new EventEmitter();
99 /** Emits when there are keyboard events that are targeted at the overlay. */
100 this.overlayKeydown = new EventEmitter();
101 /** Emits when there are mouse outside click events that are targeted at the overlay. */
102 this.overlayOutsideClick = new EventEmitter();
103 this._templatePortal = new TemplatePortal(templateRef, viewContainerRef);
104 this._scrollStrategyFactory = scrollStrategyFactory;
105 this.scrollStrategy = this._scrollStrategyFactory();
106 }
107 /** The offset in pixels for the overlay connection point on the x-axis */
108 get offsetX() { return this._offsetX; }
109 set offsetX(offsetX) {
110 this._offsetX = offsetX;
111 if (this._position) {
112 this._updatePositionStrategy(this._position);
113 }
114 }
115 /** The offset in pixels for the overlay connection point on the y-axis */
116 get offsetY() { return this._offsetY; }
117 set offsetY(offsetY) {
118 this._offsetY = offsetY;
119 if (this._position) {
120 this._updatePositionStrategy(this._position);
121 }
122 }
123 /** Whether or not the overlay should attach a backdrop. */
124 get hasBackdrop() { return this._hasBackdrop; }
125 set hasBackdrop(value) { this._hasBackdrop = coerceBooleanProperty(value); }
126 /** Whether or not the overlay should be locked when scrolling. */
127 get lockPosition() { return this._lockPosition; }
128 set lockPosition(value) { this._lockPosition = coerceBooleanProperty(value); }
129 /** Whether the overlay's width and height can be constrained to fit within the viewport. */
130 get flexibleDimensions() { return this._flexibleDimensions; }
131 set flexibleDimensions(value) {
132 this._flexibleDimensions = coerceBooleanProperty(value);
133 }
134 /** Whether the overlay can grow after the initial open when flexible positioning is turned on. */
135 get growAfterOpen() { return this._growAfterOpen; }
136 set growAfterOpen(value) { this._growAfterOpen = coerceBooleanProperty(value); }
137 /** Whether the overlay can be pushed on-screen if none of the provided positions fit. */
138 get push() { return this._push; }
139 set push(value) { this._push = coerceBooleanProperty(value); }
140 /** The associated overlay reference. */
141 get overlayRef() {
142 return this._overlayRef;
143 }
144 /** The element's layout direction. */
145 get dir() {
146 return this._dir ? this._dir.value : 'ltr';
147 }
148 ngOnDestroy() {
149 this._attachSubscription.unsubscribe();
150 this._detachSubscription.unsubscribe();
151 this._backdropSubscription.unsubscribe();
152 this._positionSubscription.unsubscribe();
153 if (this._overlayRef) {
154 this._overlayRef.dispose();
155 }
156 }
157 ngOnChanges(changes) {
158 if (this._position) {
159 this._updatePositionStrategy(this._position);
160 this._overlayRef.updateSize({
161 width: this.width,
162 minWidth: this.minWidth,
163 height: this.height,
164 minHeight: this.minHeight,
165 });
166 if (changes['origin'] && this.open) {
167 this._position.apply();
168 }
169 }
170 if (changes['open']) {
171 this.open ? this._attachOverlay() : this._detachOverlay();
172 }
173 }
174 /** Creates an overlay */
175 _createOverlay() {
176 if (!this.positions || !this.positions.length) {
177 this.positions = defaultPositionList;
178 }
179 const overlayRef = this._overlayRef = this._overlay.create(this._buildConfig());
180 this._attachSubscription = overlayRef.attachments().subscribe(() => this.attach.emit());
181 this._detachSubscription = overlayRef.detachments().subscribe(() => this.detach.emit());
182 overlayRef.keydownEvents().subscribe((event) => {
183 this.overlayKeydown.next(event);
184 if (event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)) {
185 event.preventDefault();
186 this._detachOverlay();
187 }
188 });
189 this._overlayRef.outsidePointerEvents().subscribe((event) => {
190 this.overlayOutsideClick.next(event);
191 });
192 }
193 /** Builds the overlay config based on the directive's inputs */
194 _buildConfig() {
195 const positionStrategy = this._position =
196 this.positionStrategy || this._createPositionStrategy();
197 const overlayConfig = new OverlayConfig({
198 direction: this._dir,
199 positionStrategy,
200 scrollStrategy: this.scrollStrategy,
201 hasBackdrop: this.hasBackdrop
202 });
203 if (this.width || this.width === 0) {
204 overlayConfig.width = this.width;
205 }
206 if (this.height || this.height === 0) {
207 overlayConfig.height = this.height;
208 }
209 if (this.minWidth || this.minWidth === 0) {
210 overlayConfig.minWidth = this.minWidth;
211 }
212 if (this.minHeight || this.minHeight === 0) {
213 overlayConfig.minHeight = this.minHeight;
214 }
215 if (this.backdropClass) {
216 overlayConfig.backdropClass = this.backdropClass;
217 }
218 if (this.panelClass) {
219 overlayConfig.panelClass = this.panelClass;
220 }
221 return overlayConfig;
222 }
223 /** Updates the state of a position strategy, based on the values of the directive inputs. */
224 _updatePositionStrategy(positionStrategy) {
225 const positions = this.positions.map(currentPosition => ({
226 originX: currentPosition.originX,
227 originY: currentPosition.originY,
228 overlayX: currentPosition.overlayX,
229 overlayY: currentPosition.overlayY,
230 offsetX: currentPosition.offsetX || this.offsetX,
231 offsetY: currentPosition.offsetY || this.offsetY,
232 panelClass: currentPosition.panelClass || undefined,
233 }));
234 return positionStrategy
235 .setOrigin(this.origin.elementRef)
236 .withPositions(positions)
237 .withFlexibleDimensions(this.flexibleDimensions)
238 .withPush(this.push)
239 .withGrowAfterOpen(this.growAfterOpen)
240 .withViewportMargin(this.viewportMargin)
241 .withLockedPosition(this.lockPosition)
242 .withTransformOriginOn(this.transformOriginSelector);
243 }
244 /** Returns the position strategy of the overlay to be set on the overlay config */
245 _createPositionStrategy() {
246 const strategy = this._overlay.position().flexibleConnectedTo(this.origin.elementRef);
247 this._updatePositionStrategy(strategy);
248 return strategy;
249 }
250 /** Attaches the overlay and subscribes to backdrop clicks if backdrop exists */
251 _attachOverlay() {
252 if (!this._overlayRef) {
253 this._createOverlay();
254 }
255 else {
256 // Update the overlay size, in case the directive's inputs have changed
257 this._overlayRef.getConfig().hasBackdrop = this.hasBackdrop;
258 }
259 if (!this._overlayRef.hasAttached()) {
260 this._overlayRef.attach(this._templatePortal);
261 }
262 if (this.hasBackdrop) {
263 this._backdropSubscription = this._overlayRef.backdropClick().subscribe(event => {
264 this.backdropClick.emit(event);
265 });
266 }
267 else {
268 this._backdropSubscription.unsubscribe();
269 }
270 this._positionSubscription.unsubscribe();
271 // Only subscribe to `positionChanges` if requested, because putting
272 // together all the information for it can be expensive.
273 if (this.positionChange.observers.length > 0) {
274 this._positionSubscription = this._position.positionChanges
275 .pipe(takeWhile(() => this.positionChange.observers.length > 0))
276 .subscribe(position => {
277 this.positionChange.emit(position);
278 if (this.positionChange.observers.length === 0) {
279 this._positionSubscription.unsubscribe();
280 }
281 });
282 }
283 }
284 /** Detaches the overlay and unsubscribes to backdrop clicks if backdrop exists */
285 _detachOverlay() {
286 if (this._overlayRef) {
287 this._overlayRef.detach();
288 }
289 this._backdropSubscription.unsubscribe();
290 this._positionSubscription.unsubscribe();
291 }
292}
293CdkConnectedOverlay.decorators = [
294 { type: Directive, args: [{
295 selector: '[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]',
296 exportAs: 'cdkConnectedOverlay'
297 },] }
298];
299CdkConnectedOverlay.ctorParameters = () => [
300 { type: Overlay },
301 { type: TemplateRef },
302 { type: ViewContainerRef },
303 { type: undefined, decorators: [{ type: Inject, args: [CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY,] }] },
304 { type: Directionality, decorators: [{ type: Optional }] }
305];
306CdkConnectedOverlay.propDecorators = {
307 origin: [{ type: Input, args: ['cdkConnectedOverlayOrigin',] }],
308 positions: [{ type: Input, args: ['cdkConnectedOverlayPositions',] }],
309 positionStrategy: [{ type: Input, args: ['cdkConnectedOverlayPositionStrategy',] }],
310 offsetX: [{ type: Input, args: ['cdkConnectedOverlayOffsetX',] }],
311 offsetY: [{ type: Input, args: ['cdkConnectedOverlayOffsetY',] }],
312 width: [{ type: Input, args: ['cdkConnectedOverlayWidth',] }],
313 height: [{ type: Input, args: ['cdkConnectedOverlayHeight',] }],
314 minWidth: [{ type: Input, args: ['cdkConnectedOverlayMinWidth',] }],
315 minHeight: [{ type: Input, args: ['cdkConnectedOverlayMinHeight',] }],
316 backdropClass: [{ type: Input, args: ['cdkConnectedOverlayBackdropClass',] }],
317 panelClass: [{ type: Input, args: ['cdkConnectedOverlayPanelClass',] }],
318 viewportMargin: [{ type: Input, args: ['cdkConnectedOverlayViewportMargin',] }],
319 scrollStrategy: [{ type: Input, args: ['cdkConnectedOverlayScrollStrategy',] }],
320 open: [{ type: Input, args: ['cdkConnectedOverlayOpen',] }],
321 disableClose: [{ type: Input, args: ['cdkConnectedOverlayDisableClose',] }],
322 transformOriginSelector: [{ type: Input, args: ['cdkConnectedOverlayTransformOriginOn',] }],
323 hasBackdrop: [{ type: Input, args: ['cdkConnectedOverlayHasBackdrop',] }],
324 lockPosition: [{ type: Input, args: ['cdkConnectedOverlayLockPosition',] }],
325 flexibleDimensions: [{ type: Input, args: ['cdkConnectedOverlayFlexibleDimensions',] }],
326 growAfterOpen: [{ type: Input, args: ['cdkConnectedOverlayGrowAfterOpen',] }],
327 push: [{ type: Input, args: ['cdkConnectedOverlayPush',] }],
328 backdropClick: [{ type: Output }],
329 positionChange: [{ type: Output }],
330 attach: [{ type: Output }],
331 detach: [{ type: Output }],
332 overlayKeydown: [{ type: Output }],
333 overlayOutsideClick: [{ type: Output }]
334};
335/** @docs-private */
336export function CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {
337 return () => overlay.scrollStrategies.reposition();
338}
339/** @docs-private */
340export const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {
341 provide: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY,
342 deps: [Overlay],
343 useFactory: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY,
344};
345//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3ZlcmxheS1kaXJlY3RpdmVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2Nkay9vdmVybGF5L292ZXJsYXktZGlyZWN0aXZlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSCxPQUFPLEVBQVksY0FBYyxFQUFDLE1BQU0sbUJBQW1CLENBQUM7QUFDNUQsT0FBTyxFQUFlLHFCQUFxQixFQUFDLE1BQU0sdUJBQXVCLENBQUM7QUFDMUUsT0FBTyxFQUFDLE1BQU0sRUFBRSxjQUFjLEVBQUMsTUFBTSx1QkFBdUIsQ0FBQztBQUM3RCxPQUFPLEVBQUMsY0FBYyxFQUFDLE1BQU0scUJBQXFCLENBQUM7QUFDbkQsT0FBTyxFQUNMLFNBQVMsRUFDVCxVQUFVLEVBQ1YsWUFBWSxFQUNaLE1BQU0sRUFDTixjQUFjLEVBQ2QsS0FBSyxFQUdMLFFBQVEsRUFDUixNQUFNLEVBRU4sV0FBVyxFQUNYLGdCQUFnQixHQUNqQixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0sTUFBTSxDQUFDO0FBQ2xDLE9BQU8sRUFBQyxTQUFTLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUN6QyxPQUFPLEVBQUM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