@angular/cdk 7.0.4 → 7.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/_a11y.scss +1 -1
- package/a11y/typings/focus-monitor/focus-monitor.d.ts +20 -5
- package/a11y/typings/focus-trap/focus-trap.d.ts +2 -0
- package/a11y/typings/index.metadata.json +1 -1
- package/a11y/typings/live-announcer/live-announcer.d.ts +34 -3
- package/bundles/cdk-a11y.umd.js +477 -216
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +1 -1
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-accordion.umd.js +16 -9
- package/bundles/cdk-accordion.umd.js.map +1 -1
- package/bundles/cdk-accordion.umd.min.js.map +1 -1
- package/bundles/cdk-bidi.umd.js +11 -6
- package/bundles/cdk-bidi.umd.js.map +1 -1
- package/bundles/cdk-bidi.umd.min.js.map +1 -1
- package/bundles/cdk-coercion.umd.js +25 -9
- package/bundles/cdk-coercion.umd.js.map +1 -1
- package/bundles/cdk-coercion.umd.min.js +1 -1
- package/bundles/cdk-coercion.umd.min.js.map +1 -1
- package/bundles/cdk-collections.umd.js +28 -5
- package/bundles/cdk-collections.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +2177 -915
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +2 -1
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-keycodes.umd.js +33 -1
- package/bundles/cdk-keycodes.umd.js.map +1 -1
- package/bundles/cdk-keycodes.umd.min.js +1 -1
- package/bundles/cdk-keycodes.umd.min.js.map +1 -1
- package/bundles/cdk-layout.umd.js +29 -22
- package/bundles/cdk-layout.umd.js.map +1 -1
- package/bundles/cdk-layout.umd.min.js +1 -1
- package/bundles/cdk-layout.umd.min.js.map +1 -1
- package/bundles/cdk-observers.umd.js +26 -7
- package/bundles/cdk-observers.umd.js.map +1 -1
- package/bundles/cdk-observers.umd.min.js +1 -1
- package/bundles/cdk-observers.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +605 -258
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +2 -2
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-platform.umd.js +50 -28
- package/bundles/cdk-platform.umd.js.map +1 -1
- package/bundles/cdk-platform.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +14 -7
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +139 -44
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +1 -1
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-stepper.umd.js +103 -19
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.min.js +1 -1
- package/bundles/cdk-stepper.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +182 -48
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js.map +1 -1
- package/bundles/cdk-text-field.umd.js +76 -38
- package/bundles/cdk-text-field.umd.js.map +1 -1
- package/bundles/cdk-text-field.umd.min.js +1 -1
- package/bundles/cdk-text-field.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +71 -34
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js +1 -1
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +5 -4
- package/bundles/cdk.umd.js.map +1 -1
- package/bundles/cdk.umd.min.js +1 -1
- package/bundles/cdk.umd.min.js.map +1 -1
- package/coercion/typings/element.d.ts +13 -0
- package/coercion/typings/index.metadata.json +1 -1
- package/coercion/typings/public-api.d.ts +1 -0
- package/drag-drop/typings/{drag-handle.d.ts → directives/drag-handle.d.ts} +3 -0
- package/drag-drop/typings/{drag-placeholder.d.ts → directives/drag-placeholder.d.ts} +0 -0
- package/drag-drop/typings/{drag-preview.d.ts → directives/drag-preview.d.ts} +0 -0
- package/drag-drop/typings/directives/drag.d.ts +109 -0
- package/{typings/drag-drop → drag-drop/typings/directives}/drop-list-group.d.ts +3 -0
- package/drag-drop/typings/directives/drop-list.d.ts +135 -0
- package/drag-drop/typings/drag-drop-registry.d.ts +8 -3
- package/drag-drop/typings/drag-events.d.ts +14 -7
- package/{typings/esm5/drag-drop/drag.d.ts → drag-drop/typings/drag-ref.d.ts} +152 -82
- package/drag-drop/typings/drop-list-container.d.ts +21 -3
- package/drag-drop/typings/{drop-list.d.ts → drop-list-ref.d.ts} +132 -81
- package/drag-drop/typings/index.d.ts +1 -0
- package/drag-drop/typings/index.metadata.json +1 -1
- package/drag-drop/typings/public-api.d.ts +13 -6
- package/esm2015/a11y.js +337 -190
- package/esm2015/a11y.js.map +1 -1
- package/esm2015/accordion.js +16 -11
- package/esm2015/accordion.js.map +1 -1
- package/esm2015/bidi.js +13 -8
- package/esm2015/bidi.js.map +1 -1
- package/esm2015/cdk.js +7 -6
- package/esm2015/cdk.js.map +1 -1
- package/esm2015/coercion.js +25 -8
- package/esm2015/coercion.js.map +1 -1
- package/esm2015/collections.js +22 -7
- package/esm2015/collections.js.map +1 -1
- package/esm2015/drag-drop.js +1587 -691
- package/esm2015/drag-drop.js.map +1 -1
- package/esm2015/keycodes.js +31 -4
- package/esm2015/keycodes.js.map +1 -1
- package/esm2015/layout.js +29 -19
- package/esm2015/layout.js.map +1 -1
- package/esm2015/observers.js +15 -10
- package/esm2015/observers.js.map +1 -1
- package/esm2015/overlay.js +393 -232
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/platform.js +53 -31
- package/esm2015/platform.js.map +1 -1
- package/esm2015/portal.js +13 -9
- package/esm2015/portal.js.map +1 -1
- package/esm2015/scrolling.js +102 -45
- package/esm2015/scrolling.js.map +1 -1
- package/esm2015/stepper.js +93 -24
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +89 -45
- package/esm2015/table.js.map +1 -1
- package/esm2015/text-field.js +54 -37
- package/esm2015/text-field.js.map +1 -1
- package/esm2015/tree.js +55 -36
- package/esm2015/tree.js.map +1 -1
- package/esm5/a11y.es5.js +481 -220
- package/esm5/a11y.es5.js.map +1 -1
- package/esm5/accordion.es5.js +18 -11
- package/esm5/accordion.es5.js.map +1 -1
- package/esm5/bidi.es5.js +13 -8
- package/esm5/bidi.es5.js.map +1 -1
- package/esm5/cdk.es5.js +7 -6
- package/esm5/cdk.es5.js.map +1 -1
- package/esm5/coercion.es5.js +25 -8
- package/esm5/coercion.es5.js.map +1 -1
- package/esm5/collections.es5.js +35 -7
- package/esm5/collections.es5.js.map +1 -1
- package/esm5/drag-drop.es5.js +2233 -972
- package/esm5/drag-drop.es5.js.map +1 -1
- package/esm5/keycodes.es5.js +35 -4
- package/esm5/keycodes.es5.js.map +1 -1
- package/esm5/layout.es5.js +31 -24
- package/esm5/layout.es5.js.map +1 -1
- package/esm5/observers.es5.js +29 -10
- package/esm5/observers.es5.js.map +1 -1
- package/esm5/overlay.es5.js +609 -262
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/platform.es5.js +52 -30
- package/esm5/platform.es5.js.map +1 -1
- package/esm5/portal.es5.js +16 -9
- package/esm5/portal.es5.js.map +1 -1
- package/esm5/scrolling.es5.js +141 -46
- package/esm5/scrolling.es5.js.map +1 -1
- package/esm5/stepper.es5.js +106 -24
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +184 -50
- package/esm5/table.es5.js.map +1 -1
- package/esm5/text-field.es5.js +75 -37
- package/esm5/text-field.es5.js.map +1 -1
- package/esm5/tree.es5.js +74 -37
- package/esm5/tree.es5.js.map +1 -1
- package/keycodes/typings/index.metadata.json +1 -1
- package/keycodes/typings/modifiers.d.ts +14 -0
- package/keycodes/typings/public-api.d.ts +1 -0
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/overlay-directives.d.ts +0 -2
- package/package.json +4 -4
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/schematics/ng-update/upgrade-data.js +2 -1
- package/schematics/ng-update/upgrade-data.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/index.js +3 -2
- package/schematics/ng-update/upgrade-rules/index.js.map +1 -1
- package/schematics/utils/ast/ng-module-imports.d.ts +1 -1
- package/schematics/utils/ast/ng-module-imports.js +25 -13
- package/schematics/utils/ast/ng-module-imports.js.map +1 -1
- package/schematics/utils/get-project.js +2 -1
- package/schematics/utils/get-project.js.map +1 -1
- package/schematics/utils/parse5-element.js +3 -2
- package/schematics/utils/parse5-element.js.map +1 -1
- package/schematics/utils/project-targets.js +2 -1
- package/schematics/utils/project-targets.js.map +1 -1
- package/schematics/utils/version-agnostic-typescript.js +3 -2
- package/schematics/utils/version-agnostic-typescript.js.map +1 -1
- package/scrolling/typings/index.metadata.json +1 -1
- package/stepper/typings/index.metadata.json +1 -1
- package/stepper/typings/public-api.d.ts +1 -0
- package/stepper/typings/step-header.d.ts +15 -0
- package/stepper/typings/stepper.d.ts +11 -1
- package/text-field/typings/autosize.d.ts +6 -0
- package/text-field/typings/index.metadata.json +1 -1
- package/tree/typings/control/base-tree-control.d.ts +1 -1
- package/tree/typings/control/nested-tree-control.d.ts +2 -2
- package/tree/typings/control/tree-control.d.ts +1 -1
- package/tree/typings/nested-node.d.ts +5 -5
- package/typings/a11y/focus-monitor/focus-monitor.d.ts +20 -5
- package/typings/a11y/focus-trap/focus-trap.d.ts +2 -0
- package/typings/a11y/index.metadata.json +1 -1
- package/typings/a11y/live-announcer/live-announcer.d.ts +34 -3
- package/typings/coercion/element.d.ts +13 -0
- package/typings/coercion/index.metadata.json +1 -1
- package/typings/coercion/public-api.d.ts +1 -0
- package/typings/{esm5/drag-drop → drag-drop/directives}/drag-handle.d.ts +3 -0
- package/typings/drag-drop/{drag-placeholder.d.ts → directives/drag-placeholder.d.ts} +0 -0
- package/typings/drag-drop/{drag-preview.d.ts → directives/drag-preview.d.ts} +0 -0
- package/typings/drag-drop/directives/drag.d.ts +109 -0
- package/typings/{esm5/drag-drop → drag-drop/directives}/drop-list-group.d.ts +3 -0
- package/typings/drag-drop/directives/drop-list.d.ts +135 -0
- package/typings/drag-drop/drag-drop-registry.d.ts +8 -3
- package/typings/drag-drop/drag-events.d.ts +14 -7
- package/typings/drag-drop/{drag.d.ts → drag-ref.d.ts} +152 -82
- package/typings/drag-drop/drop-list-container.d.ts +21 -3
- package/typings/{esm5/drag-drop/drop-list.d.ts → drag-drop/drop-list-ref.d.ts} +132 -81
- package/typings/drag-drop/index.d.ts +1 -0
- package/typings/drag-drop/index.metadata.json +1 -1
- package/typings/drag-drop/public-api.d.ts +13 -6
- package/typings/esm5/a11y/focus-monitor/focus-monitor.d.ts +20 -5
- package/typings/esm5/a11y/focus-trap/focus-trap.d.ts +2 -0
- package/typings/esm5/a11y/index.metadata.json +1 -1
- package/typings/esm5/a11y/live-announcer/live-announcer.d.ts +34 -3
- package/typings/esm5/coercion/element.d.ts +13 -0
- package/typings/esm5/coercion/index.metadata.json +1 -1
- package/typings/esm5/coercion/public-api.d.ts +1 -0
- package/typings/{drag-drop → esm5/drag-drop/directives}/drag-handle.d.ts +3 -0
- package/typings/esm5/drag-drop/{drag-placeholder.d.ts → directives/drag-placeholder.d.ts} +0 -0
- package/typings/esm5/drag-drop/{drag-preview.d.ts → directives/drag-preview.d.ts} +0 -0
- package/typings/esm5/drag-drop/directives/drag.d.ts +109 -0
- package/{drag-drop/typings → typings/esm5/drag-drop/directives}/drop-list-group.d.ts +3 -0
- package/typings/esm5/drag-drop/directives/drop-list.d.ts +135 -0
- package/typings/esm5/drag-drop/drag-drop-registry.d.ts +8 -3
- package/typings/esm5/drag-drop/drag-events.d.ts +14 -7
- package/{drag-drop/typings/drag.d.ts → typings/esm5/drag-drop/drag-ref.d.ts} +152 -82
- package/typings/esm5/drag-drop/drop-list-container.d.ts +21 -3
- package/typings/{drag-drop/drop-list.d.ts → esm5/drag-drop/drop-list-ref.d.ts} +132 -81
- package/typings/esm5/drag-drop/index.d.ts +1 -0
- package/typings/esm5/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/drag-drop/public-api.d.ts +13 -6
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/keycodes/index.metadata.json +1 -1
- package/typings/esm5/keycodes/modifiers.d.ts +14 -0
- package/typings/esm5/keycodes/public-api.d.ts +1 -0
- package/typings/esm5/overlay/index.metadata.json +1 -1
- package/typings/esm5/overlay/overlay-directives.d.ts +0 -2
- package/typings/esm5/scrolling/index.metadata.json +1 -1
- package/typings/esm5/stepper/index.metadata.json +1 -1
- package/typings/esm5/stepper/public-api.d.ts +1 -0
- package/typings/esm5/stepper/step-header.d.ts +15 -0
- package/typings/esm5/stepper/stepper.d.ts +11 -1
- package/typings/esm5/text-field/autosize.d.ts +6 -0
- package/typings/esm5/text-field/index.metadata.json +1 -1
- package/typings/esm5/tree/control/base-tree-control.d.ts +1 -1
- package/typings/esm5/tree/control/nested-tree-control.d.ts +2 -2
- package/typings/esm5/tree/control/tree-control.d.ts +1 -1
- package/typings/esm5/tree/nested-node.d.ts +5 -5
- package/typings/index.metadata.json +1 -1
- package/typings/keycodes/index.metadata.json +1 -1
- package/typings/keycodes/modifiers.d.ts +14 -0
- package/typings/keycodes/public-api.d.ts +1 -0
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/overlay-directives.d.ts +0 -2
- package/typings/schematics/utils/ast/ng-module-imports.d.ts +1 -1
- package/typings/scrolling/index.metadata.json +1 -1
- package/typings/stepper/index.metadata.json +1 -1
- package/typings/stepper/public-api.d.ts +1 -0
- package/typings/stepper/step-header.d.ts +15 -0
- package/typings/stepper/stepper.d.ts +11 -1
- package/typings/text-field/autosize.d.ts +6 -0
- package/typings/text-field/index.metadata.json +1 -1
- package/typings/tree/control/base-tree-control.d.ts +1 -1
- package/typings/tree/control/nested-tree-control.d.ts +2 -2
- package/typings/tree/control/tree-control.d.ts +1 -1
- package/typings/tree/nested-node.d.ts +5 -5
package/esm2015/overlay.js
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
import { coerceCssPixelValue, coerceArray, coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
8
|
+
import { coerceCssPixelValue, coerceArray, coerceElement, coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
9
9
|
import { ScrollDispatcher, ViewportRuler, ScrollingModule, VIEWPORT_RULER_PROVIDER } from '@angular/cdk/scrolling';
|
|
10
10
|
export { ViewportRuler, VIEWPORT_RULER_PROVIDER, CdkScrollable, ScrollDispatcher } from '@angular/cdk/scrolling';
|
|
11
11
|
import { DOCUMENT, Location } from '@angular/common';
|
|
12
|
-
import { Inject, Injectable, NgZone, Optional, NgModule, SkipSelf, ApplicationRef, ComponentFactoryResolver, Injector,
|
|
12
|
+
import { Inject, Injectable, NgZone, Optional, NgModule, SkipSelf, ApplicationRef, ComponentFactoryResolver, Injector, Directive, ElementRef, EventEmitter, InjectionToken, Input, Output, TemplateRef, ViewContainerRef, defineInjectable, inject } from '@angular/core';
|
|
13
13
|
import { Observable, Subject, merge, Subscription } from 'rxjs';
|
|
14
14
|
import { take, takeUntil } from 'rxjs/operators';
|
|
15
15
|
import { Platform } from '@angular/cdk/platform';
|
|
@@ -19,7 +19,7 @@ import { ESCAPE } from '@angular/cdk/keycodes';
|
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* @fileoverview added by tsickle
|
|
22
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
22
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
23
23
|
*/
|
|
24
24
|
/**
|
|
25
25
|
* Strategy that will prevent the user from scrolling while the overlay is visible.
|
|
@@ -47,7 +47,7 @@ class BlockScrollStrategy {
|
|
|
47
47
|
enable() {
|
|
48
48
|
if (this._canBeEnabled()) {
|
|
49
49
|
/** @type {?} */
|
|
50
|
-
const root = /** @type {?} */ (
|
|
50
|
+
const root = (/** @type {?} */ (this._document.documentElement));
|
|
51
51
|
this._previousScrollPosition = this._viewportRuler.getViewportScrollPosition();
|
|
52
52
|
// Cache the previous inline styles in case the user had set them.
|
|
53
53
|
this._previousHTMLStyles.left = root.style.left || '';
|
|
@@ -67,13 +67,13 @@ class BlockScrollStrategy {
|
|
|
67
67
|
disable() {
|
|
68
68
|
if (this._isEnabled) {
|
|
69
69
|
/** @type {?} */
|
|
70
|
-
const html = /** @type {?} */ (
|
|
70
|
+
const html = (/** @type {?} */ (this._document.documentElement));
|
|
71
71
|
/** @type {?} */
|
|
72
|
-
const body = /** @type {?} */ (
|
|
72
|
+
const body = (/** @type {?} */ (this._document.body));
|
|
73
73
|
/** @type {?} */
|
|
74
|
-
const htmlStyle = /** @type {?} */ (html.style);
|
|
74
|
+
const htmlStyle = (/** @type {?} */ (html.style));
|
|
75
75
|
/** @type {?} */
|
|
76
|
-
const bodyStyle = /** @type {?} */ (body.style);
|
|
76
|
+
const bodyStyle = (/** @type {?} */ (body.style));
|
|
77
77
|
/** @type {?} */
|
|
78
78
|
const previousHtmlScrollBehavior = htmlStyle.scrollBehavior || '';
|
|
79
79
|
/** @type {?} */
|
|
@@ -91,11 +91,15 @@ class BlockScrollStrategy {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
|
+
* @private
|
|
94
95
|
* @return {?}
|
|
95
96
|
*/
|
|
96
97
|
_canBeEnabled() {
|
|
98
|
+
// Since the scroll strategies can't be singletons, we have to use a global CSS class
|
|
99
|
+
// (`cdk-global-scrollblock`) to make sure that we don't try to disable global
|
|
100
|
+
// scrolling multiple times.
|
|
97
101
|
/** @type {?} */
|
|
98
|
-
const html = /** @type {?} */ (
|
|
102
|
+
const html = (/** @type {?} */ (this._document.documentElement));
|
|
99
103
|
if (html.classList.contains('cdk-global-scrollblock') || this._isEnabled) {
|
|
100
104
|
return false;
|
|
101
105
|
}
|
|
@@ -109,7 +113,7 @@ class BlockScrollStrategy {
|
|
|
109
113
|
|
|
110
114
|
/**
|
|
111
115
|
* @fileoverview added by tsickle
|
|
112
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
116
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
113
117
|
*/
|
|
114
118
|
/**
|
|
115
119
|
* Returns an error to be thrown when attempting to attach an already-attached scroll strategy.
|
|
@@ -121,7 +125,7 @@ function getMatScrollStrategyAlreadyAttachedError() {
|
|
|
121
125
|
|
|
122
126
|
/**
|
|
123
127
|
* @fileoverview added by tsickle
|
|
124
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
128
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
125
129
|
*/
|
|
126
130
|
/**
|
|
127
131
|
* Strategy that will close the overlay as soon as the user starts scrolling.
|
|
@@ -175,7 +179,7 @@ class CloseScrollStrategy {
|
|
|
175
179
|
this._scrollSubscription = stream.subscribe(() => {
|
|
176
180
|
/** @type {?} */
|
|
177
181
|
const scrollPosition = this._viewportRuler.getViewportScrollPosition().top;
|
|
178
|
-
if (Math.abs(scrollPosition - this._initialScrollPosition) > /** @type {?} */ ((/** @type {?} */ (
|
|
182
|
+
if (Math.abs(scrollPosition - this._initialScrollPosition) > (/** @type {?} */ ((/** @type {?} */ (this._config)).threshold))) {
|
|
179
183
|
this._detach();
|
|
180
184
|
}
|
|
181
185
|
else {
|
|
@@ -201,7 +205,7 @@ class CloseScrollStrategy {
|
|
|
201
205
|
|
|
202
206
|
/**
|
|
203
207
|
* @fileoverview added by tsickle
|
|
204
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
208
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
205
209
|
*/
|
|
206
210
|
|
|
207
211
|
/**
|
|
@@ -227,7 +231,7 @@ class NoopScrollStrategy {
|
|
|
227
231
|
|
|
228
232
|
/**
|
|
229
233
|
* @fileoverview added by tsickle
|
|
230
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
234
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
231
235
|
*/
|
|
232
236
|
|
|
233
237
|
// TODO(jelbourn): move this to live with the rest of the scrolling code
|
|
@@ -275,7 +279,7 @@ function isElementClippedByScrolling(element, scrollContainers) {
|
|
|
275
279
|
|
|
276
280
|
/**
|
|
277
281
|
* @fileoverview added by tsickle
|
|
278
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
282
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
279
283
|
*/
|
|
280
284
|
/**
|
|
281
285
|
* Strategy that will update the element position as the user is scrolling.
|
|
@@ -320,6 +324,8 @@ class RepositionScrollStrategy {
|
|
|
320
324
|
/** @type {?} */
|
|
321
325
|
const overlayRect = this._overlayRef.overlayElement.getBoundingClientRect();
|
|
322
326
|
const { width, height } = this._viewportRuler.getViewportSize();
|
|
327
|
+
// TODO(crisbeto): include all ancestor scroll containers here once
|
|
328
|
+
// we have a way of exposing the trigger element to the scroll strategy.
|
|
323
329
|
/** @type {?} */
|
|
324
330
|
const parentRects = [{ width, height, bottom: height, right: width, top: 0, left: 0 }];
|
|
325
331
|
if (isElementScrolledOutsideView(overlayRect, parentRects)) {
|
|
@@ -344,7 +350,7 @@ class RepositionScrollStrategy {
|
|
|
344
350
|
|
|
345
351
|
/**
|
|
346
352
|
* @fileoverview added by tsickle
|
|
347
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
353
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
348
354
|
*/
|
|
349
355
|
/**
|
|
350
356
|
* Options for how an overlay will handle scrolling.
|
|
@@ -399,12 +405,12 @@ ScrollStrategyOptions.ctorParameters = () => [
|
|
|
399
405
|
|
|
400
406
|
/**
|
|
401
407
|
* @fileoverview added by tsickle
|
|
402
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
408
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
403
409
|
*/
|
|
404
410
|
|
|
405
411
|
/**
|
|
406
412
|
* @fileoverview added by tsickle
|
|
407
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
413
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
408
414
|
*/
|
|
409
415
|
/**
|
|
410
416
|
* Initial configuration used when creating an overlay.
|
|
@@ -439,7 +445,7 @@ class OverlayConfig {
|
|
|
439
445
|
if (config) {
|
|
440
446
|
Object.keys(config).forEach(k => {
|
|
441
447
|
/** @type {?} */
|
|
442
|
-
const key = /** @type {?} */ (k);
|
|
448
|
+
const key = (/** @type {?} */ (k));
|
|
443
449
|
if (typeof config[key] !== 'undefined') {
|
|
444
450
|
this[key] = config[key];
|
|
445
451
|
}
|
|
@@ -450,7 +456,7 @@ class OverlayConfig {
|
|
|
450
456
|
|
|
451
457
|
/**
|
|
452
458
|
* @fileoverview added by tsickle
|
|
453
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
459
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
454
460
|
*/
|
|
455
461
|
/**
|
|
456
462
|
* The points of the origin element and the overlay element to connect.
|
|
@@ -508,8 +514,7 @@ class ConnectedOverlayPositionChange {
|
|
|
508
514
|
* @param {?} connectionPair
|
|
509
515
|
* @param {?} scrollableViewProperties
|
|
510
516
|
*/
|
|
511
|
-
constructor(connectionPair,
|
|
512
|
-
scrollableViewProperties) {
|
|
517
|
+
constructor(connectionPair, scrollableViewProperties) {
|
|
513
518
|
this.connectionPair = connectionPair;
|
|
514
519
|
this.scrollableViewProperties = scrollableViewProperties;
|
|
515
520
|
}
|
|
@@ -548,7 +553,7 @@ function validateHorizontalPosition(property, value) {
|
|
|
548
553
|
|
|
549
554
|
/**
|
|
550
555
|
* @fileoverview added by tsickle
|
|
551
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
556
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
552
557
|
*/
|
|
553
558
|
/**
|
|
554
559
|
* Service for dispatching keyboard events that land on the body to appropriate overlay ref,
|
|
@@ -624,6 +629,7 @@ class OverlayKeyboardDispatcher {
|
|
|
624
629
|
}
|
|
625
630
|
/**
|
|
626
631
|
* Detaches the global keyboard event listener.
|
|
632
|
+
* @private
|
|
627
633
|
* @return {?}
|
|
628
634
|
*/
|
|
629
635
|
_detach() {
|
|
@@ -650,16 +656,17 @@ OverlayKeyboardDispatcher.ctorParameters = () => [
|
|
|
650
656
|
function OVERLAY_KEYBOARD_DISPATCHER_PROVIDER_FACTORY(dispatcher, _document) {
|
|
651
657
|
return dispatcher || new OverlayKeyboardDispatcher(_document);
|
|
652
658
|
}
|
|
653
|
-
/**
|
|
659
|
+
/**
|
|
654
660
|
* \@docs-private \@deprecated \@breaking-change 8.0.0
|
|
655
|
-
|
|
661
|
+
* @type {?}
|
|
662
|
+
*/
|
|
656
663
|
const OVERLAY_KEYBOARD_DISPATCHER_PROVIDER = {
|
|
657
664
|
// If there is already an OverlayKeyboardDispatcher available, use that.
|
|
658
665
|
// Otherwise, provide a new one.
|
|
659
666
|
provide: OverlayKeyboardDispatcher,
|
|
660
667
|
deps: [
|
|
661
668
|
[new Optional(), new SkipSelf(), OverlayKeyboardDispatcher],
|
|
662
|
-
/** @type {?} */ (
|
|
669
|
+
(/** @type {?} */ (
|
|
663
670
|
// Coerce to `InjectionToken` so that the `deps` match the "shape"
|
|
664
671
|
// of the type expected by Angular
|
|
665
672
|
DOCUMENT))
|
|
@@ -669,7 +676,7 @@ const OVERLAY_KEYBOARD_DISPATCHER_PROVIDER = {
|
|
|
669
676
|
|
|
670
677
|
/**
|
|
671
678
|
* @fileoverview added by tsickle
|
|
672
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
679
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
673
680
|
*/
|
|
674
681
|
/**
|
|
675
682
|
* Container inside which all overlays will render.
|
|
@@ -704,6 +711,7 @@ class OverlayContainer {
|
|
|
704
711
|
/**
|
|
705
712
|
* Create the overlay container element, which is simply a div
|
|
706
713
|
* with the 'cdk-overlay-container' class on the document body.
|
|
714
|
+
* @protected
|
|
707
715
|
* @return {?}
|
|
708
716
|
*/
|
|
709
717
|
_createContainer() {
|
|
@@ -731,23 +739,23 @@ OverlayContainer.ctorParameters = () => [
|
|
|
731
739
|
function OVERLAY_CONTAINER_PROVIDER_FACTORY(parentContainer, _document) {
|
|
732
740
|
return parentContainer || new OverlayContainer(_document);
|
|
733
741
|
}
|
|
734
|
-
/**
|
|
742
|
+
/**
|
|
735
743
|
* \@docs-private \@deprecated \@breaking-change 8.0.0
|
|
736
|
-
|
|
744
|
+
* @type {?}
|
|
745
|
+
*/
|
|
737
746
|
const OVERLAY_CONTAINER_PROVIDER = {
|
|
738
747
|
// If there is already an OverlayContainer available, use that. Otherwise, provide a new one.
|
|
739
748
|
provide: OverlayContainer,
|
|
740
749
|
deps: [
|
|
741
750
|
[new Optional(), new SkipSelf(), OverlayContainer],
|
|
742
|
-
/** @type {?} */ (DOCUMENT
|
|
743
|
-
) // We need to use the InjectionToken somewhere to keep TS happy
|
|
751
|
+
(/** @type {?} */ (DOCUMENT))
|
|
744
752
|
],
|
|
745
753
|
useFactory: OVERLAY_CONTAINER_PROVIDER_FACTORY
|
|
746
754
|
};
|
|
747
755
|
|
|
748
756
|
/**
|
|
749
757
|
* @fileoverview added by tsickle
|
|
750
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
758
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
751
759
|
*/
|
|
752
760
|
/**
|
|
753
761
|
* Reference to an overlay that has been created with the Overlay service.
|
|
@@ -931,9 +939,9 @@ class OverlayRef {
|
|
|
931
939
|
this._keydownEvents.complete();
|
|
932
940
|
if (this._host && this._host.parentNode) {
|
|
933
941
|
this._host.parentNode.removeChild(this._host);
|
|
934
|
-
this._host = /** @type {?} */ (
|
|
942
|
+
this._host = (/** @type {?} */ (null));
|
|
935
943
|
}
|
|
936
|
-
this._previousHostParent = this._pane = /** @type {?} */ (
|
|
944
|
+
this._previousHostParent = this._pane = (/** @type {?} */ (null));
|
|
937
945
|
if (isAttached) {
|
|
938
946
|
this._detachments.next();
|
|
939
947
|
}
|
|
@@ -1040,6 +1048,7 @@ class OverlayRef {
|
|
|
1040
1048
|
}
|
|
1041
1049
|
/**
|
|
1042
1050
|
* Updates the text direction of the overlay panel.
|
|
1051
|
+
* @private
|
|
1043
1052
|
* @return {?}
|
|
1044
1053
|
*/
|
|
1045
1054
|
_updateElementDirection() {
|
|
@@ -1047,6 +1056,7 @@ class OverlayRef {
|
|
|
1047
1056
|
}
|
|
1048
1057
|
/**
|
|
1049
1058
|
* Updates the size of the overlay element based on the overlay config.
|
|
1059
|
+
* @private
|
|
1050
1060
|
* @return {?}
|
|
1051
1061
|
*/
|
|
1052
1062
|
_updateElementSize() {
|
|
@@ -1061,6 +1071,7 @@ class OverlayRef {
|
|
|
1061
1071
|
}
|
|
1062
1072
|
/**
|
|
1063
1073
|
* Toggles the pointer events for the overlay pane element.
|
|
1074
|
+
* @private
|
|
1064
1075
|
* @param {?} enablePointer
|
|
1065
1076
|
* @return {?}
|
|
1066
1077
|
*/
|
|
@@ -1069,6 +1080,7 @@ class OverlayRef {
|
|
|
1069
1080
|
}
|
|
1070
1081
|
/**
|
|
1071
1082
|
* Attaches a backdrop for this overlay.
|
|
1083
|
+
* @private
|
|
1072
1084
|
* @return {?}
|
|
1073
1085
|
*/
|
|
1074
1086
|
_attachBackdrop() {
|
|
@@ -1078,11 +1090,10 @@ class OverlayRef {
|
|
|
1078
1090
|
this._backdropElement.classList.add('cdk-overlay-backdrop');
|
|
1079
1091
|
if (this._config.backdropClass) {
|
|
1080
1092
|
this._toggleClasses(this._backdropElement, this._config.backdropClass, true);
|
|
1081
|
-
}
|
|
1082
|
-
((
|
|
1093
|
+
}
|
|
1083
1094
|
// Insert the backdrop before the pane in the DOM order,
|
|
1084
1095
|
// in order to handle stacked overlays properly.
|
|
1085
|
-
this._host.parentElement)).insertBefore(this._backdropElement, this._host);
|
|
1096
|
+
(/** @type {?} */ (this._host.parentElement)).insertBefore(this._backdropElement, this._host);
|
|
1086
1097
|
// Forward backdrop clicks such that the consumer of the overlay can perform whatever
|
|
1087
1098
|
// action desired when such a click occurs (usually closing the overlay).
|
|
1088
1099
|
this._backdropElement.addEventListener('click', (event) => this._backdropClick.next(event));
|
|
@@ -1106,11 +1117,12 @@ class OverlayRef {
|
|
|
1106
1117
|
* that should be behind it, was destroyed. The next time both of them are opened,
|
|
1107
1118
|
* the stacking will be wrong, because the detached element's pane will still be
|
|
1108
1119
|
* in its original DOM position.
|
|
1120
|
+
* @private
|
|
1109
1121
|
* @return {?}
|
|
1110
1122
|
*/
|
|
1111
1123
|
_updateStackingOrder() {
|
|
1112
1124
|
if (this._host.nextSibling) {
|
|
1113
|
-
/** @type {?} */ (
|
|
1125
|
+
(/** @type {?} */ (this._host.parentNode)).appendChild(this._host);
|
|
1114
1126
|
}
|
|
1115
1127
|
}
|
|
1116
1128
|
/**
|
|
@@ -1120,41 +1132,43 @@ class OverlayRef {
|
|
|
1120
1132
|
detachBackdrop() {
|
|
1121
1133
|
/** @type {?} */
|
|
1122
1134
|
let backdropToDetach = this._backdropElement;
|
|
1123
|
-
if (backdropToDetach) {
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
}
|
|
1140
|
-
backdropToDetach.classList.remove('cdk-overlay-backdrop-showing');
|
|
1135
|
+
if (!backdropToDetach) {
|
|
1136
|
+
return;
|
|
1137
|
+
}
|
|
1138
|
+
/** @type {?} */
|
|
1139
|
+
let timeoutId;
|
|
1140
|
+
/** @type {?} */
|
|
1141
|
+
let finishDetach = () => {
|
|
1142
|
+
// It may not be attached to anything in certain cases (e.g. unit tests).
|
|
1143
|
+
if (backdropToDetach && backdropToDetach.parentNode) {
|
|
1144
|
+
backdropToDetach.parentNode.removeChild(backdropToDetach);
|
|
1145
|
+
}
|
|
1146
|
+
// It is possible that a new portal has been attached to this overlay since we started
|
|
1147
|
+
// removing the backdrop. If that is the case, only clear the backdrop reference if it
|
|
1148
|
+
// is still the same instance that we started to remove.
|
|
1149
|
+
if (this._backdropElement == backdropToDetach) {
|
|
1150
|
+
this._backdropElement = null;
|
|
1151
|
+
}
|
|
1141
1152
|
if (this._config.backdropClass) {
|
|
1142
|
-
this._toggleClasses(backdropToDetach, this._config.backdropClass, false);
|
|
1153
|
+
this._toggleClasses((/** @type {?} */ (backdropToDetach)), this._config.backdropClass, false);
|
|
1143
1154
|
}
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
+
clearTimeout(timeoutId);
|
|
1156
|
+
};
|
|
1157
|
+
backdropToDetach.classList.remove('cdk-overlay-backdrop-showing');
|
|
1158
|
+
this._ngZone.runOutsideAngular(() => {
|
|
1159
|
+
(/** @type {?} */ (backdropToDetach)).addEventListener('transitionend', finishDetach);
|
|
1160
|
+
});
|
|
1161
|
+
// If the backdrop doesn't have a transition, the `transitionend` event won't fire.
|
|
1162
|
+
// In this case we make it unclickable and we try to remove it after a delay.
|
|
1163
|
+
backdropToDetach.style.pointerEvents = 'none';
|
|
1164
|
+
// Run this outside the Angular zone because there's nothing that Angular cares about.
|
|
1165
|
+
// If it were to run inside the Angular zone, every test that used Overlay would have to be
|
|
1166
|
+
// either async or fakeAsync.
|
|
1167
|
+
timeoutId = this._ngZone.runOutsideAngular(() => setTimeout(finishDetach, 500));
|
|
1155
1168
|
}
|
|
1156
1169
|
/**
|
|
1157
1170
|
* Toggles a single CSS class or an array of classes on an element.
|
|
1171
|
+
* @private
|
|
1158
1172
|
* @param {?} element
|
|
1159
1173
|
* @param {?} cssClasses
|
|
1160
1174
|
* @param {?} isAdd
|
|
@@ -1170,6 +1184,7 @@ class OverlayRef {
|
|
|
1170
1184
|
}
|
|
1171
1185
|
/**
|
|
1172
1186
|
* Detaches the overlay content next time the zone stabilizes.
|
|
1187
|
+
* @private
|
|
1173
1188
|
* @return {?}
|
|
1174
1189
|
*/
|
|
1175
1190
|
_detachContentWhenStable() {
|
|
@@ -1177,6 +1192,9 @@ class OverlayRef {
|
|
|
1177
1192
|
// if the consumer is using `zone-patch-rxjs`, the `Subscription.unsubscribe` call will
|
|
1178
1193
|
// be patched to run inside the zone, which will throw us into an infinite loop.
|
|
1179
1194
|
this._ngZone.runOutsideAngular(() => {
|
|
1195
|
+
// We can't remove the host here immediately, because the overlay pane's content
|
|
1196
|
+
// might still be animating. This stream helps us avoid interrupting the animation
|
|
1197
|
+
// by waiting for the pane to become empty.
|
|
1180
1198
|
/** @type {?} */
|
|
1181
1199
|
const subscription = this._ngZone.onStable
|
|
1182
1200
|
.asObservable()
|
|
@@ -1201,11 +1219,14 @@ class OverlayRef {
|
|
|
1201
1219
|
|
|
1202
1220
|
/**
|
|
1203
1221
|
* @fileoverview added by tsickle
|
|
1204
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1222
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1205
1223
|
*/
|
|
1206
|
-
|
|
1224
|
+
// TODO: refactor clipping detection into a separate thing (part of scrolling module)
|
|
1225
|
+
// TODO: doesn't handle both flexible width and height when it has to scroll along both axis.
|
|
1226
|
+
/**
|
|
1207
1227
|
* Class to be added to the overlay bounding box.
|
|
1208
|
-
|
|
1228
|
+
* @type {?}
|
|
1229
|
+
*/
|
|
1209
1230
|
const boundingBoxClass = 'cdk-overlay-connected-position-bounding-box';
|
|
1210
1231
|
/**
|
|
1211
1232
|
* A strategy for positioning overlays. Using this strategy, an overlay is given an
|
|
@@ -1377,17 +1398,24 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1377
1398
|
const overlayRect = this._overlayRect;
|
|
1378
1399
|
/** @type {?} */
|
|
1379
1400
|
const viewportRect = this._viewportRect;
|
|
1401
|
+
// Positions where the overlay will fit with flexible dimensions.
|
|
1380
1402
|
/** @type {?} */
|
|
1381
1403
|
const flexibleFits = [];
|
|
1404
|
+
// Fallback if none of the preferred positions fit within the viewport.
|
|
1382
1405
|
/** @type {?} */
|
|
1383
1406
|
let fallback;
|
|
1384
1407
|
// Go through each of the preferred positions looking for a good fit.
|
|
1385
1408
|
// If a good fit is found, it will be applied immediately.
|
|
1386
1409
|
for (let pos of this._preferredPositions) {
|
|
1410
|
+
// Get the exact (x, y) coordinate for the point-of-origin on the origin element.
|
|
1387
1411
|
/** @type {?} */
|
|
1388
1412
|
let originPoint = this._getOriginPoint(originRect, pos);
|
|
1413
|
+
// From that point-of-origin, get the exact (x, y) coordinate for the top-left corner of the
|
|
1414
|
+
// overlay in this position. We use the top-left corner for calculations and later translate
|
|
1415
|
+
// this into an appropriate (top, left, bottom, right) style.
|
|
1389
1416
|
/** @type {?} */
|
|
1390
1417
|
let overlayPoint = this._getOverlayPoint(originPoint, overlayRect, pos);
|
|
1418
|
+
// Calculate how well the overlay would fit into the viewport with this point.
|
|
1391
1419
|
/** @type {?} */
|
|
1392
1420
|
let overlayFit = this._getOverlayFit(overlayPoint, overlayRect, viewportRect, pos);
|
|
1393
1421
|
// If the overlay, without any further work, fits into the viewport, use this position.
|
|
@@ -1432,7 +1460,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1432
1460
|
}
|
|
1433
1461
|
}
|
|
1434
1462
|
this._isPushed = false;
|
|
1435
|
-
this._applyPosition(/** @type {?} */ (
|
|
1463
|
+
this._applyPosition((/** @type {?} */ (bestFit)).position, (/** @type {?} */ (bestFit)).origin);
|
|
1436
1464
|
return;
|
|
1437
1465
|
}
|
|
1438
1466
|
// When none of the preferred positions fit within the viewport, take the position
|
|
@@ -1440,12 +1468,12 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1440
1468
|
if (this._canPush) {
|
|
1441
1469
|
// TODO(jelbourn): after pushing, the opening "direction" of the overlay might not make sense.
|
|
1442
1470
|
this._isPushed = true;
|
|
1443
|
-
this._applyPosition(/** @type {?} */ (
|
|
1471
|
+
this._applyPosition((/** @type {?} */ (fallback)).position, (/** @type {?} */ (fallback)).originPoint);
|
|
1444
1472
|
return;
|
|
1445
1473
|
}
|
|
1446
1474
|
// All options for getting the overlay within the viewport have been exhausted, so go with the
|
|
1447
1475
|
// position that went off-screen the least.
|
|
1448
|
-
this._applyPosition(/** @type {?} */ (
|
|
1476
|
+
this._applyPosition((/** @type {?} */ (fallback)).position, (/** @type {?} */ (fallback)).originPoint);
|
|
1449
1477
|
}
|
|
1450
1478
|
/**
|
|
1451
1479
|
* @return {?}
|
|
@@ -1467,7 +1495,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1467
1495
|
// We can't use `_resetBoundingBoxStyles` here, because it resets
|
|
1468
1496
|
// some properties to zero, rather than removing them.
|
|
1469
1497
|
if (this._boundingBox) {
|
|
1470
|
-
extendStyles(this._boundingBox.style, /** @type {?} */ ({
|
|
1498
|
+
extendStyles(this._boundingBox.style, (/** @type {?} */ ({
|
|
1471
1499
|
top: '',
|
|
1472
1500
|
left: '',
|
|
1473
1501
|
right: '',
|
|
@@ -1476,7 +1504,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1476
1504
|
width: '',
|
|
1477
1505
|
alignItems: '',
|
|
1478
1506
|
justifyContent: '',
|
|
1479
|
-
}));
|
|
1507
|
+
})));
|
|
1480
1508
|
}
|
|
1481
1509
|
if (this._pane) {
|
|
1482
1510
|
this._resetOverlayElementStyles();
|
|
@@ -1486,7 +1514,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1486
1514
|
}
|
|
1487
1515
|
this.detach();
|
|
1488
1516
|
this._positionChanges.complete();
|
|
1489
|
-
this._overlayRef = this._boundingBox = /** @type {?} */ (
|
|
1517
|
+
this._overlayRef = this._boundingBox = (/** @type {?} */ (null));
|
|
1490
1518
|
this._isDisposed = true;
|
|
1491
1519
|
}
|
|
1492
1520
|
/**
|
|
@@ -1519,108 +1547,129 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1519
1547
|
}
|
|
1520
1548
|
/**
|
|
1521
1549
|
* Adds new preferred positions.
|
|
1550
|
+
* @template THIS
|
|
1551
|
+
* @this {THIS}
|
|
1522
1552
|
* @param {?} positions List of positions options for this overlay.
|
|
1523
|
-
* @return {
|
|
1553
|
+
* @return {THIS}
|
|
1524
1554
|
*/
|
|
1525
1555
|
withPositions(positions) {
|
|
1526
|
-
this._preferredPositions = positions;
|
|
1556
|
+
(/** @type {?} */ (this))._preferredPositions = positions;
|
|
1527
1557
|
// If the last calculated position object isn't part of the positions anymore, clear
|
|
1528
1558
|
// it in order to avoid it being picked up if the consumer tries to re-apply.
|
|
1529
|
-
if (positions.indexOf(/** @type {?} */ ((this._lastPosition))) === -1) {
|
|
1530
|
-
this._lastPosition = null;
|
|
1559
|
+
if (positions.indexOf((/** @type {?} */ ((/** @type {?} */ (this))._lastPosition))) === -1) {
|
|
1560
|
+
(/** @type {?} */ (this))._lastPosition = null;
|
|
1531
1561
|
}
|
|
1532
|
-
this._validatePositions();
|
|
1533
|
-
return this;
|
|
1562
|
+
(/** @type {?} */ (this))._validatePositions();
|
|
1563
|
+
return (/** @type {?} */ (this));
|
|
1534
1564
|
}
|
|
1535
1565
|
/**
|
|
1536
1566
|
* Sets a minimum distance the overlay may be positioned to the edge of the viewport.
|
|
1567
|
+
* @template THIS
|
|
1568
|
+
* @this {THIS}
|
|
1537
1569
|
* @param {?} margin Required margin between the overlay and the viewport edge in pixels.
|
|
1538
|
-
* @return {
|
|
1570
|
+
* @return {THIS}
|
|
1539
1571
|
*/
|
|
1540
1572
|
withViewportMargin(margin) {
|
|
1541
|
-
this._viewportMargin = margin;
|
|
1542
|
-
return this;
|
|
1573
|
+
(/** @type {?} */ (this))._viewportMargin = margin;
|
|
1574
|
+
return (/** @type {?} */ (this));
|
|
1543
1575
|
}
|
|
1544
1576
|
/**
|
|
1545
1577
|
* Sets whether the overlay's width and height can be constrained to fit within the viewport.
|
|
1578
|
+
* @template THIS
|
|
1579
|
+
* @this {THIS}
|
|
1546
1580
|
* @param {?=} flexibleDimensions
|
|
1547
|
-
* @return {
|
|
1581
|
+
* @return {THIS}
|
|
1548
1582
|
*/
|
|
1549
1583
|
withFlexibleDimensions(flexibleDimensions = true) {
|
|
1550
|
-
this._hasFlexibleDimensions = flexibleDimensions;
|
|
1551
|
-
return this;
|
|
1584
|
+
(/** @type {?} */ (this))._hasFlexibleDimensions = flexibleDimensions;
|
|
1585
|
+
return (/** @type {?} */ (this));
|
|
1552
1586
|
}
|
|
1553
1587
|
/**
|
|
1554
1588
|
* Sets whether the overlay can grow after the initial open via flexible width/height.
|
|
1589
|
+
* @template THIS
|
|
1590
|
+
* @this {THIS}
|
|
1555
1591
|
* @param {?=} growAfterOpen
|
|
1556
|
-
* @return {
|
|
1592
|
+
* @return {THIS}
|
|
1557
1593
|
*/
|
|
1558
1594
|
withGrowAfterOpen(growAfterOpen = true) {
|
|
1559
|
-
this._growAfterOpen = growAfterOpen;
|
|
1560
|
-
return this;
|
|
1595
|
+
(/** @type {?} */ (this))._growAfterOpen = growAfterOpen;
|
|
1596
|
+
return (/** @type {?} */ (this));
|
|
1561
1597
|
}
|
|
1562
1598
|
/**
|
|
1563
1599
|
* Sets whether the overlay can be pushed on-screen if none of the provided positions fit.
|
|
1600
|
+
* @template THIS
|
|
1601
|
+
* @this {THIS}
|
|
1564
1602
|
* @param {?=} canPush
|
|
1565
|
-
* @return {
|
|
1603
|
+
* @return {THIS}
|
|
1566
1604
|
*/
|
|
1567
1605
|
withPush(canPush = true) {
|
|
1568
|
-
this._canPush = canPush;
|
|
1569
|
-
return this;
|
|
1606
|
+
(/** @type {?} */ (this))._canPush = canPush;
|
|
1607
|
+
return (/** @type {?} */ (this));
|
|
1570
1608
|
}
|
|
1571
1609
|
/**
|
|
1572
1610
|
* Sets whether the overlay's position should be locked in after it is positioned
|
|
1573
1611
|
* initially. When an overlay is locked in, it won't attempt to reposition itself
|
|
1574
1612
|
* when the position is re-applied (e.g. when the user scrolls away).
|
|
1613
|
+
* @template THIS
|
|
1614
|
+
* @this {THIS}
|
|
1575
1615
|
* @param {?=} isLocked Whether the overlay should locked in.
|
|
1576
|
-
* @return {
|
|
1616
|
+
* @return {THIS}
|
|
1577
1617
|
*/
|
|
1578
1618
|
withLockedPosition(isLocked = true) {
|
|
1579
|
-
this._positionLocked = isLocked;
|
|
1580
|
-
return this;
|
|
1619
|
+
(/** @type {?} */ (this))._positionLocked = isLocked;
|
|
1620
|
+
return (/** @type {?} */ (this));
|
|
1581
1621
|
}
|
|
1582
1622
|
/**
|
|
1583
1623
|
* Sets the origin element, relative to which to position the overlay.
|
|
1624
|
+
* @template THIS
|
|
1625
|
+
* @this {THIS}
|
|
1584
1626
|
* @param {?} origin Reference to the new origin element.
|
|
1585
|
-
* @return {
|
|
1627
|
+
* @return {THIS}
|
|
1586
1628
|
*/
|
|
1587
1629
|
setOrigin(origin) {
|
|
1588
|
-
|
|
1589
|
-
return this;
|
|
1630
|
+
(/** @type {?} */ (this))._origin = coerceElement(origin);
|
|
1631
|
+
return (/** @type {?} */ (this));
|
|
1590
1632
|
}
|
|
1591
1633
|
/**
|
|
1592
1634
|
* Sets the default offset for the overlay's connection point on the x-axis.
|
|
1635
|
+
* @template THIS
|
|
1636
|
+
* @this {THIS}
|
|
1593
1637
|
* @param {?} offset New offset in the X axis.
|
|
1594
|
-
* @return {
|
|
1638
|
+
* @return {THIS}
|
|
1595
1639
|
*/
|
|
1596
1640
|
withDefaultOffsetX(offset) {
|
|
1597
|
-
this._offsetX = offset;
|
|
1598
|
-
return this;
|
|
1641
|
+
(/** @type {?} */ (this))._offsetX = offset;
|
|
1642
|
+
return (/** @type {?} */ (this));
|
|
1599
1643
|
}
|
|
1600
1644
|
/**
|
|
1601
1645
|
* Sets the default offset for the overlay's connection point on the y-axis.
|
|
1646
|
+
* @template THIS
|
|
1647
|
+
* @this {THIS}
|
|
1602
1648
|
* @param {?} offset New offset in the Y axis.
|
|
1603
|
-
* @return {
|
|
1649
|
+
* @return {THIS}
|
|
1604
1650
|
*/
|
|
1605
1651
|
withDefaultOffsetY(offset) {
|
|
1606
|
-
this._offsetY = offset;
|
|
1607
|
-
return this;
|
|
1652
|
+
(/** @type {?} */ (this))._offsetY = offset;
|
|
1653
|
+
return (/** @type {?} */ (this));
|
|
1608
1654
|
}
|
|
1609
1655
|
/**
|
|
1610
1656
|
* Configures that the position strategy should set a `transform-origin` on some elements
|
|
1611
1657
|
* inside the overlay, depending on the current position that is being applied. This is
|
|
1612
1658
|
* useful for the cases where the origin of an animation can change depending on the
|
|
1613
1659
|
* alignment of the overlay.
|
|
1660
|
+
* @template THIS
|
|
1661
|
+
* @this {THIS}
|
|
1614
1662
|
* @param {?} selector CSS selector that will be used to find the target
|
|
1615
1663
|
* elements onto which to set the transform origin.
|
|
1616
|
-
* @return {
|
|
1664
|
+
* @return {THIS}
|
|
1617
1665
|
*/
|
|
1618
1666
|
withTransformOriginOn(selector) {
|
|
1619
|
-
this._transformOriginSelector = selector;
|
|
1620
|
-
return this;
|
|
1667
|
+
(/** @type {?} */ (this))._transformOriginSelector = selector;
|
|
1668
|
+
return (/** @type {?} */ (this));
|
|
1621
1669
|
}
|
|
1622
1670
|
/**
|
|
1623
1671
|
* Gets the (x, y) coordinate of a connection point on the origin based on a relative position.
|
|
1672
|
+
* @private
|
|
1624
1673
|
* @param {?} originRect
|
|
1625
1674
|
* @param {?} pos
|
|
1626
1675
|
* @return {?}
|
|
@@ -1653,12 +1702,15 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1653
1702
|
/**
|
|
1654
1703
|
* Gets the (x, y) coordinate of the top-left corner of the overlay given a given position and
|
|
1655
1704
|
* origin point to which the overlay should be connected.
|
|
1705
|
+
* @private
|
|
1656
1706
|
* @param {?} originPoint
|
|
1657
1707
|
* @param {?} overlayRect
|
|
1658
1708
|
* @param {?} pos
|
|
1659
1709
|
* @return {?}
|
|
1660
1710
|
*/
|
|
1661
1711
|
_getOverlayPoint(originPoint, overlayRect, pos) {
|
|
1712
|
+
// Calculate the (overlayStartX, overlayStartY), the start of the
|
|
1713
|
+
// potential overlay position relative to the origin point.
|
|
1662
1714
|
/** @type {?} */
|
|
1663
1715
|
let overlayStartX;
|
|
1664
1716
|
if (pos.overlayX == 'center') {
|
|
@@ -1686,6 +1738,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1686
1738
|
}
|
|
1687
1739
|
/**
|
|
1688
1740
|
* Gets how well an overlay at the given point will fit within the viewport.
|
|
1741
|
+
* @private
|
|
1689
1742
|
* @param {?} point
|
|
1690
1743
|
* @param {?} overlay
|
|
1691
1744
|
* @param {?} viewport
|
|
@@ -1705,6 +1758,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1705
1758
|
if (offsetY) {
|
|
1706
1759
|
y += offsetY;
|
|
1707
1760
|
}
|
|
1761
|
+
// How much the overlay would overflow at this position, on each side.
|
|
1708
1762
|
/** @type {?} */
|
|
1709
1763
|
let leftOverflow = 0 - x;
|
|
1710
1764
|
/** @type {?} */
|
|
@@ -1713,6 +1767,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1713
1767
|
let topOverflow = 0 - y;
|
|
1714
1768
|
/** @type {?} */
|
|
1715
1769
|
let bottomOverflow = (y + overlay.height) - viewport.height;
|
|
1770
|
+
// Visible parts of the element on each axis.
|
|
1716
1771
|
/** @type {?} */
|
|
1717
1772
|
let visibleWidth = this._subtractOverflows(overlay.width, leftOverflow, rightOverflow);
|
|
1718
1773
|
/** @type {?} */
|
|
@@ -1728,6 +1783,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1728
1783
|
}
|
|
1729
1784
|
/**
|
|
1730
1785
|
* Whether the overlay can fit within the viewport when it may resize either its width or height.
|
|
1786
|
+
* @private
|
|
1731
1787
|
* @param {?} fit How well the overlay fits in the viewport at some position.
|
|
1732
1788
|
* @param {?} point The (x, y) coordinates of the overlat at some position.
|
|
1733
1789
|
* @param {?} viewport The geometry of the viewport.
|
|
@@ -1757,6 +1813,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1757
1813
|
* the viewport, the top-left corner will be pushed on-screen (with overflow occuring on the
|
|
1758
1814
|
* right and bottom).
|
|
1759
1815
|
*
|
|
1816
|
+
* @private
|
|
1760
1817
|
* @param {?} start Starting point from which the overlay is pushed.
|
|
1761
1818
|
* @param {?} overlay Dimensions of the overlay.
|
|
1762
1819
|
* @param {?} scrollPosition Current viewport scroll position.
|
|
@@ -1775,6 +1832,8 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1775
1832
|
}
|
|
1776
1833
|
/** @type {?} */
|
|
1777
1834
|
const viewport = this._viewportRect;
|
|
1835
|
+
// Determine how much the overlay goes outside the viewport on each
|
|
1836
|
+
// side, which we'll use to decide which direction to push it.
|
|
1778
1837
|
/** @type {?} */
|
|
1779
1838
|
const overflowRight = Math.max(start.x + overlay.width - viewport.right, 0);
|
|
1780
1839
|
/** @type {?} */
|
|
@@ -1783,6 +1842,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1783
1842
|
const overflowTop = Math.max(viewport.top - scrollPosition.top - start.y, 0);
|
|
1784
1843
|
/** @type {?} */
|
|
1785
1844
|
const overflowLeft = Math.max(viewport.left - scrollPosition.left - start.x, 0);
|
|
1845
|
+
// Amount by which to push the overlay in each axis such that it remains on-screen.
|
|
1786
1846
|
/** @type {?} */
|
|
1787
1847
|
let pushX = 0;
|
|
1788
1848
|
/** @type {?} */
|
|
@@ -1810,6 +1870,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1810
1870
|
}
|
|
1811
1871
|
/**
|
|
1812
1872
|
* Applies a computed position to the overlay and emits a position change.
|
|
1873
|
+
* @private
|
|
1813
1874
|
* @param {?} position The position preference
|
|
1814
1875
|
* @param {?} originPoint The point on the origin element where the overlay is connected.
|
|
1815
1876
|
* @return {?}
|
|
@@ -1837,6 +1898,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1837
1898
|
}
|
|
1838
1899
|
/**
|
|
1839
1900
|
* Sets the transform origin based on the configured selector and the passed-in position.
|
|
1901
|
+
* @private
|
|
1840
1902
|
* @param {?} position
|
|
1841
1903
|
* @return {?}
|
|
1842
1904
|
*/
|
|
@@ -1845,7 +1907,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1845
1907
|
return;
|
|
1846
1908
|
}
|
|
1847
1909
|
/** @type {?} */
|
|
1848
|
-
const elements = /** @type {?} */ (
|
|
1910
|
+
const elements = (/** @type {?} */ (this._boundingBox)).querySelectorAll(this._transformOriginSelector);
|
|
1849
1911
|
/** @type {?} */
|
|
1850
1912
|
let xOrigin;
|
|
1851
1913
|
/** @type {?} */
|
|
@@ -1868,6 +1930,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1868
1930
|
*
|
|
1869
1931
|
* This method does no measuring and applies no styles so that we can cheaply compute the
|
|
1870
1932
|
* bounds for all positions and choose the best fit based on these results.
|
|
1933
|
+
* @private
|
|
1871
1934
|
* @param {?} origin
|
|
1872
1935
|
* @param {?} position
|
|
1873
1936
|
* @return {?}
|
|
@@ -1896,6 +1959,10 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1896
1959
|
height = viewport.height - bottom + this._viewportMargin;
|
|
1897
1960
|
}
|
|
1898
1961
|
else {
|
|
1962
|
+
// If neither top nor bottom, it means that the overlay is vertically centered on the
|
|
1963
|
+
// origin point. Note that we want the position relative to the viewport, rather than
|
|
1964
|
+
// the page, which is why we don't use something like `viewport.bottom - origin.y` and
|
|
1965
|
+
// `origin.y - viewport.top`.
|
|
1899
1966
|
/** @type {?} */
|
|
1900
1967
|
const smallestDistanceToViewportEdge = Math.min(viewport.bottom - origin.y + viewport.top, origin.y);
|
|
1901
1968
|
/** @type {?} */
|
|
@@ -1906,9 +1973,11 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1906
1973
|
top = origin.y - (previousHeight / 2);
|
|
1907
1974
|
}
|
|
1908
1975
|
}
|
|
1976
|
+
// The overlay is opening 'right-ward' (the content flows to the right).
|
|
1909
1977
|
/** @type {?} */
|
|
1910
1978
|
const isBoundedByRightViewportEdge = (position.overlayX === 'start' && !isRtl) ||
|
|
1911
1979
|
(position.overlayX === 'end' && isRtl);
|
|
1980
|
+
// The overlay is opening 'left-ward' (the content flows to the left).
|
|
1912
1981
|
/** @type {?} */
|
|
1913
1982
|
const isBoundedByLeftViewportEdge = (position.overlayX === 'end' && !isRtl) ||
|
|
1914
1983
|
(position.overlayX === 'start' && isRtl);
|
|
@@ -1927,6 +1996,10 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1927
1996
|
width = viewport.right - origin.x;
|
|
1928
1997
|
}
|
|
1929
1998
|
else {
|
|
1999
|
+
// If neither start nor end, it means that the overlay is horizontally centered on the
|
|
2000
|
+
// origin point. Note that we want the position relative to the viewport, rather than
|
|
2001
|
+
// the page, which is why we don't use something like `viewport.right - origin.x` and
|
|
2002
|
+
// `origin.x - viewport.left`.
|
|
1930
2003
|
/** @type {?} */
|
|
1931
2004
|
const smallestDistanceToViewportEdge = Math.min(viewport.right - origin.x + viewport.left, origin.x);
|
|
1932
2005
|
/** @type {?} */
|
|
@@ -1937,12 +2010,13 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1937
2010
|
left = origin.x - (previousWidth / 2);
|
|
1938
2011
|
}
|
|
1939
2012
|
}
|
|
1940
|
-
return { top: /** @type {?} */ (
|
|
2013
|
+
return { top: (/** @type {?} */ (top)), left: (/** @type {?} */ (left)), bottom: (/** @type {?} */ (bottom)), right: (/** @type {?} */ (right)), width, height };
|
|
1941
2014
|
}
|
|
1942
2015
|
/**
|
|
1943
2016
|
* Sets the position and size of the overlay's sizing wrapper. The wrapper is positioned on the
|
|
1944
2017
|
* origin's connection point and stetches to the bounds of the viewport.
|
|
1945
2018
|
*
|
|
2019
|
+
* @private
|
|
1946
2020
|
* @param {?} origin The point on the origin element where the overlay is connected.
|
|
1947
2021
|
* @param {?} position The position preference
|
|
1948
2022
|
* @return {?}
|
|
@@ -1957,7 +2031,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1957
2031
|
boundingBoxRect.width = Math.min(boundingBoxRect.width, this._lastBoundingBoxSize.width);
|
|
1958
2032
|
}
|
|
1959
2033
|
/** @type {?} */
|
|
1960
|
-
const styles = /** @type {?} */ ({});
|
|
2034
|
+
const styles = (/** @type {?} */ ({}));
|
|
1961
2035
|
if (this._hasExactPosition()) {
|
|
1962
2036
|
styles.top = styles.left = '0';
|
|
1963
2037
|
styles.bottom = styles.right = '';
|
|
@@ -1995,14 +2069,15 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1995
2069
|
}
|
|
1996
2070
|
}
|
|
1997
2071
|
this._lastBoundingBoxSize = boundingBoxRect;
|
|
1998
|
-
extendStyles(/** @type {?} */ (
|
|
2072
|
+
extendStyles((/** @type {?} */ (this._boundingBox)).style, styles);
|
|
1999
2073
|
}
|
|
2000
2074
|
/**
|
|
2001
2075
|
* Resets the styles for the bounding box so that a new positioning can be computed.
|
|
2076
|
+
* @private
|
|
2002
2077
|
* @return {?}
|
|
2003
2078
|
*/
|
|
2004
2079
|
_resetBoundingBoxStyles() {
|
|
2005
|
-
extendStyles(/** @type {?} */ (
|
|
2080
|
+
extendStyles((/** @type {?} */ (this._boundingBox)).style, (/** @type {?} */ ({
|
|
2006
2081
|
top: '0',
|
|
2007
2082
|
left: '0',
|
|
2008
2083
|
right: '0',
|
|
@@ -2011,30 +2086,32 @@ class FlexibleConnectedPositionStrategy {
|
|
|
2011
2086
|
width: '',
|
|
2012
2087
|
alignItems: '',
|
|
2013
2088
|
justifyContent: '',
|
|
2014
|
-
}));
|
|
2089
|
+
})));
|
|
2015
2090
|
}
|
|
2016
2091
|
/**
|
|
2017
2092
|
* Resets the styles for the overlay pane so that a new positioning can be computed.
|
|
2093
|
+
* @private
|
|
2018
2094
|
* @return {?}
|
|
2019
2095
|
*/
|
|
2020
2096
|
_resetOverlayElementStyles() {
|
|
2021
|
-
extendStyles(this._pane.style, /** @type {?} */ ({
|
|
2097
|
+
extendStyles(this._pane.style, (/** @type {?} */ ({
|
|
2022
2098
|
top: '',
|
|
2023
2099
|
left: '',
|
|
2024
2100
|
bottom: '',
|
|
2025
2101
|
right: '',
|
|
2026
2102
|
position: '',
|
|
2027
|
-
}));
|
|
2103
|
+
})));
|
|
2028
2104
|
}
|
|
2029
2105
|
/**
|
|
2030
2106
|
* Sets positioning styles to the overlay element.
|
|
2107
|
+
* @private
|
|
2031
2108
|
* @param {?} originPoint
|
|
2032
2109
|
* @param {?} position
|
|
2033
2110
|
* @return {?}
|
|
2034
2111
|
*/
|
|
2035
2112
|
_setOverlayElementStyles(originPoint, position) {
|
|
2036
2113
|
/** @type {?} */
|
|
2037
|
-
const styles = /** @type {?} */ ({});
|
|
2114
|
+
const styles = (/** @type {?} */ ({}));
|
|
2038
2115
|
if (this._hasExactPosition()) {
|
|
2039
2116
|
/** @type {?} */
|
|
2040
2117
|
const scrollPosition = this._viewportRuler.getViewportScrollPosition();
|
|
@@ -2044,6 +2121,11 @@ class FlexibleConnectedPositionStrategy {
|
|
|
2044
2121
|
else {
|
|
2045
2122
|
styles.position = 'static';
|
|
2046
2123
|
}
|
|
2124
|
+
// Use a transform to apply the offsets. We do this because the `center` positions rely on
|
|
2125
|
+
// being in the normal flex flow and setting a `top` / `left` at all will completely throw
|
|
2126
|
+
// off the position. We also can't use margins, because they won't have an effect in some
|
|
2127
|
+
// cases where the element doesn't have anything to "push off of". Finally, this works
|
|
2128
|
+
// better both with flexible and non-flexible positioning.
|
|
2047
2129
|
/** @type {?} */
|
|
2048
2130
|
let transformString = '';
|
|
2049
2131
|
/** @type {?} */
|
|
@@ -2070,19 +2152,25 @@ class FlexibleConnectedPositionStrategy {
|
|
|
2070
2152
|
}
|
|
2071
2153
|
/**
|
|
2072
2154
|
* Gets the exact top/bottom for the overlay when not using flexible sizing or when pushing.
|
|
2155
|
+
* @private
|
|
2073
2156
|
* @param {?} position
|
|
2074
2157
|
* @param {?} originPoint
|
|
2075
2158
|
* @param {?} scrollPosition
|
|
2076
2159
|
* @return {?}
|
|
2077
2160
|
*/
|
|
2078
2161
|
_getExactOverlayY(position, originPoint, scrollPosition) {
|
|
2162
|
+
// Reset any existing styles. This is necessary in case the
|
|
2163
|
+
// preferred position has changed since the last `apply`.
|
|
2079
2164
|
/** @type {?} */
|
|
2080
|
-
let styles = /** @type {?} */ ({ top: null, bottom: null });
|
|
2165
|
+
let styles = (/** @type {?} */ ({ top: null, bottom: null }));
|
|
2081
2166
|
/** @type {?} */
|
|
2082
2167
|
let overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);
|
|
2083
2168
|
if (this._isPushed) {
|
|
2084
2169
|
overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition);
|
|
2085
2170
|
}
|
|
2171
|
+
// @breaking-change 8.0.0 Currently the `_overlayContainer` is optional in order to avoid a
|
|
2172
|
+
// breaking change. The null check here can be removed once the `_overlayContainer` becomes
|
|
2173
|
+
// a required parameter.
|
|
2086
2174
|
/** @type {?} */
|
|
2087
2175
|
let virtualKeyboardOffset = this._overlayContainer ?
|
|
2088
2176
|
this._overlayContainer.getContainerElement().getBoundingClientRect().top : 0;
|
|
@@ -2094,8 +2182,10 @@ class FlexibleConnectedPositionStrategy {
|
|
|
2094
2182
|
// We want to set either `top` or `bottom` based on whether the overlay wants to appear
|
|
2095
2183
|
// above or below the origin and the direction in which the element will expand.
|
|
2096
2184
|
if (position.overlayY === 'bottom') {
|
|
2185
|
+
// When using `bottom`, we adjust the y position such that it is the distance
|
|
2186
|
+
// from the bottom of the viewport rather than the top.
|
|
2097
2187
|
/** @type {?} */
|
|
2098
|
-
const documentHeight = /** @type {?} */ (
|
|
2188
|
+
const documentHeight = (/** @type {?} */ (this._document.documentElement)).clientHeight;
|
|
2099
2189
|
styles.bottom = `${documentHeight - (overlayPoint.y + this._overlayRect.height)}px`;
|
|
2100
2190
|
}
|
|
2101
2191
|
else {
|
|
@@ -2105,19 +2195,26 @@ class FlexibleConnectedPositionStrategy {
|
|
|
2105
2195
|
}
|
|
2106
2196
|
/**
|
|
2107
2197
|
* Gets the exact left/right for the overlay when not using flexible sizing or when pushing.
|
|
2198
|
+
* @private
|
|
2108
2199
|
* @param {?} position
|
|
2109
2200
|
* @param {?} originPoint
|
|
2110
2201
|
* @param {?} scrollPosition
|
|
2111
2202
|
* @return {?}
|
|
2112
2203
|
*/
|
|
2113
2204
|
_getExactOverlayX(position, originPoint, scrollPosition) {
|
|
2205
|
+
// Reset any existing styles. This is necessary in case the preferred position has
|
|
2206
|
+
// changed since the last `apply`.
|
|
2114
2207
|
/** @type {?} */
|
|
2115
|
-
let styles = /** @type {?} */ ({ left: null, right: null });
|
|
2208
|
+
let styles = (/** @type {?} */ ({ left: null, right: null }));
|
|
2116
2209
|
/** @type {?} */
|
|
2117
2210
|
let overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);
|
|
2118
2211
|
if (this._isPushed) {
|
|
2119
2212
|
overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition);
|
|
2120
2213
|
}
|
|
2214
|
+
// We want to set either `left` or `right` based on whether the overlay wants to appear "before"
|
|
2215
|
+
// or "after" the origin, which determines the direction in which the element will expand.
|
|
2216
|
+
// For the horizontal axis, the meaning of "before" and "after" change based on whether the
|
|
2217
|
+
// page is in RTL or LTR.
|
|
2121
2218
|
/** @type {?} */
|
|
2122
2219
|
let horizontalStyleProperty;
|
|
2123
2220
|
if (this._isRtl()) {
|
|
@@ -2130,7 +2227,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
2130
2227
|
// from the right edge of the viewport rather than the left edge.
|
|
2131
2228
|
if (horizontalStyleProperty === 'right') {
|
|
2132
2229
|
/** @type {?} */
|
|
2133
|
-
const documentWidth = /** @type {?} */ (
|
|
2230
|
+
const documentWidth = (/** @type {?} */ (this._document.documentElement)).clientWidth;
|
|
2134
2231
|
styles.right = `${documentWidth - (overlayPoint.x + this._overlayRect.width)}px`;
|
|
2135
2232
|
}
|
|
2136
2233
|
else {
|
|
@@ -2141,13 +2238,18 @@ class FlexibleConnectedPositionStrategy {
|
|
|
2141
2238
|
/**
|
|
2142
2239
|
* Gets the view properties of the trigger and overlay, including whether they are clipped
|
|
2143
2240
|
* or completely outside the view of any of the strategy's scrollables.
|
|
2241
|
+
* @private
|
|
2144
2242
|
* @return {?}
|
|
2145
2243
|
*/
|
|
2146
2244
|
_getScrollVisibility() {
|
|
2245
|
+
// Note: needs fresh rects since the position could've changed.
|
|
2147
2246
|
/** @type {?} */
|
|
2148
2247
|
const originBounds = this._origin.getBoundingClientRect();
|
|
2149
2248
|
/** @type {?} */
|
|
2150
2249
|
const overlayBounds = this._pane.getBoundingClientRect();
|
|
2250
|
+
// TODO(jelbourn): instead of needing all of the client rects for these scrolling containers
|
|
2251
|
+
// every time, we should be able to use the scrollTop of the containers if the size of those
|
|
2252
|
+
// containers hasn't changed.
|
|
2151
2253
|
/** @type {?} */
|
|
2152
2254
|
const scrollContainerBounds = this.scrollables.map(scrollable => {
|
|
2153
2255
|
return scrollable.getElementRef().nativeElement.getBoundingClientRect();
|
|
@@ -2161,6 +2263,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
2161
2263
|
}
|
|
2162
2264
|
/**
|
|
2163
2265
|
* Subtracts the amount that an element is overflowing on an axis from it's length.
|
|
2266
|
+
* @private
|
|
2164
2267
|
* @param {?} length
|
|
2165
2268
|
* @param {...?} overflows
|
|
2166
2269
|
* @return {?}
|
|
@@ -2172,13 +2275,19 @@ class FlexibleConnectedPositionStrategy {
|
|
|
2172
2275
|
}
|
|
2173
2276
|
/**
|
|
2174
2277
|
* Narrows the given viewport rect by the current _viewportMargin.
|
|
2278
|
+
* @private
|
|
2175
2279
|
* @return {?}
|
|
2176
2280
|
*/
|
|
2177
2281
|
_getNarrowedViewportRect() {
|
|
2282
|
+
// We recalculate the viewport rect here ourselves, rather than using the ViewportRuler,
|
|
2283
|
+
// because we want to use the `clientWidth` and `clientHeight` as the base. The difference
|
|
2284
|
+
// being that the client properties don't include the scrollbar, as opposed to `innerWidth`
|
|
2285
|
+
// and `innerHeight` that do. This is necessary, because the overlay container uses
|
|
2286
|
+
// 100% `width` and `height` which don't include the scrollbar either.
|
|
2178
2287
|
/** @type {?} */
|
|
2179
|
-
const width = /** @type {?} */ (
|
|
2288
|
+
const width = (/** @type {?} */ (this._document.documentElement)).clientWidth;
|
|
2180
2289
|
/** @type {?} */
|
|
2181
|
-
const height = /** @type {?} */ (
|
|
2290
|
+
const height = (/** @type {?} */ (this._document.documentElement)).clientHeight;
|
|
2182
2291
|
/** @type {?} */
|
|
2183
2292
|
const scrollPosition = this._viewportRuler.getViewportScrollPosition();
|
|
2184
2293
|
return {
|
|
@@ -2192,6 +2301,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
2192
2301
|
}
|
|
2193
2302
|
/**
|
|
2194
2303
|
* Whether the we're dealing with an RTL context
|
|
2304
|
+
* @private
|
|
2195
2305
|
* @return {?}
|
|
2196
2306
|
*/
|
|
2197
2307
|
_isRtl() {
|
|
@@ -2199,6 +2309,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
2199
2309
|
}
|
|
2200
2310
|
/**
|
|
2201
2311
|
* Determines whether the overlay uses exact or flexible positioning.
|
|
2312
|
+
* @private
|
|
2202
2313
|
* @return {?}
|
|
2203
2314
|
*/
|
|
2204
2315
|
_hasExactPosition() {
|
|
@@ -2206,6 +2317,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
2206
2317
|
}
|
|
2207
2318
|
/**
|
|
2208
2319
|
* Retrieves the offset of a position along the x or y axis.
|
|
2320
|
+
* @private
|
|
2209
2321
|
* @param {?} position
|
|
2210
2322
|
* @param {?} axis
|
|
2211
2323
|
* @return {?}
|
|
@@ -2220,6 +2332,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
2220
2332
|
}
|
|
2221
2333
|
/**
|
|
2222
2334
|
* Validates that the current position match the expected values.
|
|
2335
|
+
* @private
|
|
2223
2336
|
* @return {?}
|
|
2224
2337
|
*/
|
|
2225
2338
|
_validatePositions() {
|
|
@@ -2237,6 +2350,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
2237
2350
|
}
|
|
2238
2351
|
/**
|
|
2239
2352
|
* Adds a single CSS class or an array of classes on the overlay panel.
|
|
2353
|
+
* @private
|
|
2240
2354
|
* @param {?} cssClasses
|
|
2241
2355
|
* @return {?}
|
|
2242
2356
|
*/
|
|
@@ -2252,6 +2366,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
2252
2366
|
}
|
|
2253
2367
|
/**
|
|
2254
2368
|
* Clears the classes that the position strategy has applied from the overlay panel.
|
|
2369
|
+
* @private
|
|
2255
2370
|
* @return {?}
|
|
2256
2371
|
*/
|
|
2257
2372
|
_clearPanelClasses() {
|
|
@@ -2278,7 +2393,7 @@ function extendStyles(dest, source) {
|
|
|
2278
2393
|
|
|
2279
2394
|
/**
|
|
2280
2395
|
* @fileoverview added by tsickle
|
|
2281
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
2396
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2282
2397
|
*/
|
|
2283
2398
|
/**
|
|
2284
2399
|
* A strategy for positioning overlays. Using this strategy, an overlay is given an
|
|
@@ -2394,94 +2509,109 @@ class ConnectedPositionStrategy {
|
|
|
2394
2509
|
}
|
|
2395
2510
|
/**
|
|
2396
2511
|
* Adds a new preferred fallback position.
|
|
2512
|
+
* @template THIS
|
|
2513
|
+
* @this {THIS}
|
|
2397
2514
|
* @param {?} originPos
|
|
2398
2515
|
* @param {?} overlayPos
|
|
2399
2516
|
* @param {?=} offsetX
|
|
2400
2517
|
* @param {?=} offsetY
|
|
2401
|
-
* @return {
|
|
2518
|
+
* @return {THIS}
|
|
2402
2519
|
*/
|
|
2403
2520
|
withFallbackPosition(originPos, overlayPos, offsetX, offsetY) {
|
|
2404
2521
|
/** @type {?} */
|
|
2405
2522
|
const position = new ConnectionPositionPair(originPos, overlayPos, offsetX, offsetY);
|
|
2406
|
-
this._preferredPositions.push(position);
|
|
2407
|
-
this._positionStrategy.withPositions(this._preferredPositions);
|
|
2408
|
-
return this;
|
|
2523
|
+
(/** @type {?} */ (this))._preferredPositions.push(position);
|
|
2524
|
+
(/** @type {?} */ (this))._positionStrategy.withPositions((/** @type {?} */ (this))._preferredPositions);
|
|
2525
|
+
return (/** @type {?} */ (this));
|
|
2409
2526
|
}
|
|
2410
2527
|
/**
|
|
2411
2528
|
* Sets the layout direction so the overlay's position can be adjusted to match.
|
|
2529
|
+
* @template THIS
|
|
2530
|
+
* @this {THIS}
|
|
2412
2531
|
* @param {?} dir New layout direction.
|
|
2413
|
-
* @return {
|
|
2532
|
+
* @return {THIS}
|
|
2414
2533
|
*/
|
|
2415
2534
|
withDirection(dir) {
|
|
2416
2535
|
// Since the direction might be declared before the strategy is attached,
|
|
2417
2536
|
// we save the value in a temporary property and we'll transfer it to the
|
|
2418
2537
|
// overlay ref on attachment.
|
|
2419
|
-
if (this._overlayRef) {
|
|
2420
|
-
this._overlayRef.setDirection(dir);
|
|
2538
|
+
if ((/** @type {?} */ (this))._overlayRef) {
|
|
2539
|
+
(/** @type {?} */ (this))._overlayRef.setDirection(dir);
|
|
2421
2540
|
}
|
|
2422
2541
|
else {
|
|
2423
|
-
this._direction = dir;
|
|
2542
|
+
(/** @type {?} */ (this))._direction = dir;
|
|
2424
2543
|
}
|
|
2425
|
-
return this;
|
|
2544
|
+
return (/** @type {?} */ (this));
|
|
2426
2545
|
}
|
|
2427
2546
|
/**
|
|
2428
2547
|
* Sets an offset for the overlay's connection point on the x-axis
|
|
2548
|
+
* @template THIS
|
|
2549
|
+
* @this {THIS}
|
|
2429
2550
|
* @param {?} offset New offset in the X axis.
|
|
2430
|
-
* @return {
|
|
2551
|
+
* @return {THIS}
|
|
2431
2552
|
*/
|
|
2432
2553
|
withOffsetX(offset) {
|
|
2433
|
-
this._positionStrategy.withDefaultOffsetX(offset);
|
|
2434
|
-
return this;
|
|
2554
|
+
(/** @type {?} */ (this))._positionStrategy.withDefaultOffsetX(offset);
|
|
2555
|
+
return (/** @type {?} */ (this));
|
|
2435
2556
|
}
|
|
2436
2557
|
/**
|
|
2437
2558
|
* Sets an offset for the overlay's connection point on the y-axis
|
|
2559
|
+
* @template THIS
|
|
2560
|
+
* @this {THIS}
|
|
2438
2561
|
* @param {?} offset New offset in the Y axis.
|
|
2439
|
-
* @return {
|
|
2562
|
+
* @return {THIS}
|
|
2440
2563
|
*/
|
|
2441
2564
|
withOffsetY(offset) {
|
|
2442
|
-
this._positionStrategy.withDefaultOffsetY(offset);
|
|
2443
|
-
return this;
|
|
2565
|
+
(/** @type {?} */ (this))._positionStrategy.withDefaultOffsetY(offset);
|
|
2566
|
+
return (/** @type {?} */ (this));
|
|
2444
2567
|
}
|
|
2445
2568
|
/**
|
|
2446
2569
|
* Sets whether the overlay's position should be locked in after it is positioned
|
|
2447
2570
|
* initially. When an overlay is locked in, it won't attempt to reposition itself
|
|
2448
2571
|
* when the position is re-applied (e.g. when the user scrolls away).
|
|
2572
|
+
* @template THIS
|
|
2573
|
+
* @this {THIS}
|
|
2449
2574
|
* @param {?} isLocked Whether the overlay should locked in.
|
|
2450
|
-
* @return {
|
|
2575
|
+
* @return {THIS}
|
|
2451
2576
|
*/
|
|
2452
2577
|
withLockedPosition(isLocked) {
|
|
2453
|
-
this._positionStrategy.withLockedPosition(isLocked);
|
|
2454
|
-
return this;
|
|
2578
|
+
(/** @type {?} */ (this))._positionStrategy.withLockedPosition(isLocked);
|
|
2579
|
+
return (/** @type {?} */ (this));
|
|
2455
2580
|
}
|
|
2456
2581
|
/**
|
|
2457
2582
|
* Overwrites the current set of positions with an array of new ones.
|
|
2583
|
+
* @template THIS
|
|
2584
|
+
* @this {THIS}
|
|
2458
2585
|
* @param {?} positions Position pairs to be set on the strategy.
|
|
2459
|
-
* @return {
|
|
2586
|
+
* @return {THIS}
|
|
2460
2587
|
*/
|
|
2461
2588
|
withPositions(positions) {
|
|
2462
|
-
this._preferredPositions = positions.slice();
|
|
2463
|
-
this._positionStrategy.withPositions(this._preferredPositions);
|
|
2464
|
-
return this;
|
|
2589
|
+
(/** @type {?} */ (this))._preferredPositions = positions.slice();
|
|
2590
|
+
(/** @type {?} */ (this))._positionStrategy.withPositions((/** @type {?} */ (this))._preferredPositions);
|
|
2591
|
+
return (/** @type {?} */ (this));
|
|
2465
2592
|
}
|
|
2466
2593
|
/**
|
|
2467
2594
|
* Sets the origin element, relative to which to position the overlay.
|
|
2595
|
+
* @template THIS
|
|
2596
|
+
* @this {THIS}
|
|
2468
2597
|
* @param {?} origin Reference to the new origin element.
|
|
2469
|
-
* @return {
|
|
2598
|
+
* @return {THIS}
|
|
2470
2599
|
*/
|
|
2471
2600
|
setOrigin(origin) {
|
|
2472
|
-
this._positionStrategy.setOrigin(origin);
|
|
2473
|
-
return this;
|
|
2601
|
+
(/** @type {?} */ (this))._positionStrategy.setOrigin(origin);
|
|
2602
|
+
return (/** @type {?} */ (this));
|
|
2474
2603
|
}
|
|
2475
2604
|
}
|
|
2476
2605
|
|
|
2477
2606
|
/**
|
|
2478
2607
|
* @fileoverview added by tsickle
|
|
2479
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
2608
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2480
2609
|
*/
|
|
2481
2610
|
|
|
2482
|
-
/**
|
|
2611
|
+
/**
|
|
2483
2612
|
* Class to be added to the overlay pane wrapper.
|
|
2484
|
-
|
|
2613
|
+
* @type {?}
|
|
2614
|
+
*/
|
|
2485
2615
|
const wrapperClass = 'cdk-global-overlay-wrapper';
|
|
2486
2616
|
/**
|
|
2487
2617
|
* A strategy for positioning overlays. Using this strategy, an overlay is given an
|
|
@@ -2520,103 +2650,119 @@ class GlobalPositionStrategy {
|
|
|
2520
2650
|
}
|
|
2521
2651
|
/**
|
|
2522
2652
|
* Sets the top position of the overlay. Clears any previously set vertical position.
|
|
2653
|
+
* @template THIS
|
|
2654
|
+
* @this {THIS}
|
|
2523
2655
|
* @param {?=} value New top offset.
|
|
2524
|
-
* @return {
|
|
2656
|
+
* @return {THIS}
|
|
2525
2657
|
*/
|
|
2526
2658
|
top(value = '') {
|
|
2527
|
-
this._bottomOffset = '';
|
|
2528
|
-
this._topOffset = value;
|
|
2529
|
-
this._alignItems = 'flex-start';
|
|
2530
|
-
return this;
|
|
2659
|
+
(/** @type {?} */ (this))._bottomOffset = '';
|
|
2660
|
+
(/** @type {?} */ (this))._topOffset = value;
|
|
2661
|
+
(/** @type {?} */ (this))._alignItems = 'flex-start';
|
|
2662
|
+
return (/** @type {?} */ (this));
|
|
2531
2663
|
}
|
|
2532
2664
|
/**
|
|
2533
2665
|
* Sets the left position of the overlay. Clears any previously set horizontal position.
|
|
2666
|
+
* @template THIS
|
|
2667
|
+
* @this {THIS}
|
|
2534
2668
|
* @param {?=} value New left offset.
|
|
2535
|
-
* @return {
|
|
2669
|
+
* @return {THIS}
|
|
2536
2670
|
*/
|
|
2537
2671
|
left(value = '') {
|
|
2538
|
-
this._rightOffset = '';
|
|
2539
|
-
this._leftOffset = value;
|
|
2540
|
-
this._justifyContent = 'flex-start';
|
|
2541
|
-
return this;
|
|
2672
|
+
(/** @type {?} */ (this))._rightOffset = '';
|
|
2673
|
+
(/** @type {?} */ (this))._leftOffset = value;
|
|
2674
|
+
(/** @type {?} */ (this))._justifyContent = 'flex-start';
|
|
2675
|
+
return (/** @type {?} */ (this));
|
|
2542
2676
|
}
|
|
2543
2677
|
/**
|
|
2544
2678
|
* Sets the bottom position of the overlay. Clears any previously set vertical position.
|
|
2679
|
+
* @template THIS
|
|
2680
|
+
* @this {THIS}
|
|
2545
2681
|
* @param {?=} value New bottom offset.
|
|
2546
|
-
* @return {
|
|
2682
|
+
* @return {THIS}
|
|
2547
2683
|
*/
|
|
2548
2684
|
bottom(value = '') {
|
|
2549
|
-
this._topOffset = '';
|
|
2550
|
-
this._bottomOffset = value;
|
|
2551
|
-
this._alignItems = 'flex-end';
|
|
2552
|
-
return this;
|
|
2685
|
+
(/** @type {?} */ (this))._topOffset = '';
|
|
2686
|
+
(/** @type {?} */ (this))._bottomOffset = value;
|
|
2687
|
+
(/** @type {?} */ (this))._alignItems = 'flex-end';
|
|
2688
|
+
return (/** @type {?} */ (this));
|
|
2553
2689
|
}
|
|
2554
2690
|
/**
|
|
2555
2691
|
* Sets the right position of the overlay. Clears any previously set horizontal position.
|
|
2692
|
+
* @template THIS
|
|
2693
|
+
* @this {THIS}
|
|
2556
2694
|
* @param {?=} value New right offset.
|
|
2557
|
-
* @return {
|
|
2695
|
+
* @return {THIS}
|
|
2558
2696
|
*/
|
|
2559
2697
|
right(value = '') {
|
|
2560
|
-
this._leftOffset = '';
|
|
2561
|
-
this._rightOffset = value;
|
|
2562
|
-
this._justifyContent = 'flex-end';
|
|
2563
|
-
return this;
|
|
2698
|
+
(/** @type {?} */ (this))._leftOffset = '';
|
|
2699
|
+
(/** @type {?} */ (this))._rightOffset = value;
|
|
2700
|
+
(/** @type {?} */ (this))._justifyContent = 'flex-end';
|
|
2701
|
+
return (/** @type {?} */ (this));
|
|
2564
2702
|
}
|
|
2565
2703
|
/**
|
|
2566
2704
|
* Sets the overlay width and clears any previously set width.
|
|
2567
2705
|
* @deprecated Pass the `width` through the `OverlayConfig`.
|
|
2568
2706
|
* \@breaking-change 8.0.0
|
|
2707
|
+
* @template THIS
|
|
2708
|
+
* @this {THIS}
|
|
2569
2709
|
* @param {?=} value New width for the overlay
|
|
2570
|
-
* @return {
|
|
2710
|
+
* @return {THIS}
|
|
2571
2711
|
*/
|
|
2572
2712
|
width(value = '') {
|
|
2573
|
-
if (this._overlayRef) {
|
|
2574
|
-
this._overlayRef.updateSize({ width: value });
|
|
2713
|
+
if ((/** @type {?} */ (this))._overlayRef) {
|
|
2714
|
+
(/** @type {?} */ (this))._overlayRef.updateSize({ width: value });
|
|
2575
2715
|
}
|
|
2576
2716
|
else {
|
|
2577
|
-
this._width = value;
|
|
2717
|
+
(/** @type {?} */ (this))._width = value;
|
|
2578
2718
|
}
|
|
2579
|
-
return this;
|
|
2719
|
+
return (/** @type {?} */ (this));
|
|
2580
2720
|
}
|
|
2581
2721
|
/**
|
|
2582
2722
|
* Sets the overlay height and clears any previously set height.
|
|
2583
2723
|
* @deprecated Pass the `height` through the `OverlayConfig`.
|
|
2584
2724
|
* \@breaking-change 8.0.0
|
|
2725
|
+
* @template THIS
|
|
2726
|
+
* @this {THIS}
|
|
2585
2727
|
* @param {?=} value New height for the overlay
|
|
2586
|
-
* @return {
|
|
2728
|
+
* @return {THIS}
|
|
2587
2729
|
*/
|
|
2588
2730
|
height(value = '') {
|
|
2589
|
-
if (this._overlayRef) {
|
|
2590
|
-
this._overlayRef.updateSize({ height: value });
|
|
2731
|
+
if ((/** @type {?} */ (this))._overlayRef) {
|
|
2732
|
+
(/** @type {?} */ (this))._overlayRef.updateSize({ height: value });
|
|
2591
2733
|
}
|
|
2592
2734
|
else {
|
|
2593
|
-
this._height = value;
|
|
2735
|
+
(/** @type {?} */ (this))._height = value;
|
|
2594
2736
|
}
|
|
2595
|
-
return this;
|
|
2737
|
+
return (/** @type {?} */ (this));
|
|
2596
2738
|
}
|
|
2597
2739
|
/**
|
|
2598
2740
|
* Centers the overlay horizontally with an optional offset.
|
|
2599
2741
|
* Clears any previously set horizontal position.
|
|
2600
2742
|
*
|
|
2743
|
+
* @template THIS
|
|
2744
|
+
* @this {THIS}
|
|
2601
2745
|
* @param {?=} offset Overlay offset from the horizontal center.
|
|
2602
|
-
* @return {
|
|
2746
|
+
* @return {THIS}
|
|
2603
2747
|
*/
|
|
2604
2748
|
centerHorizontally(offset = '') {
|
|
2605
|
-
this.left(offset);
|
|
2606
|
-
this._justifyContent = 'center';
|
|
2607
|
-
return this;
|
|
2749
|
+
(/** @type {?} */ (this)).left(offset);
|
|
2750
|
+
(/** @type {?} */ (this))._justifyContent = 'center';
|
|
2751
|
+
return (/** @type {?} */ (this));
|
|
2608
2752
|
}
|
|
2609
2753
|
/**
|
|
2610
2754
|
* Centers the overlay vertically with an optional offset.
|
|
2611
2755
|
* Clears any previously set vertical position.
|
|
2612
2756
|
*
|
|
2757
|
+
* @template THIS
|
|
2758
|
+
* @this {THIS}
|
|
2613
2759
|
* @param {?=} offset Overlay offset from the vertical center.
|
|
2614
|
-
* @return {
|
|
2760
|
+
* @return {THIS}
|
|
2615
2761
|
*/
|
|
2616
2762
|
centerVertically(offset = '') {
|
|
2617
|
-
this.top(offset);
|
|
2618
|
-
this._alignItems = 'center';
|
|
2619
|
-
return this;
|
|
2763
|
+
(/** @type {?} */ (this)).top(offset);
|
|
2764
|
+
(/** @type {?} */ (this))._alignItems = 'center';
|
|
2765
|
+
return (/** @type {?} */ (this));
|
|
2620
2766
|
}
|
|
2621
2767
|
/**
|
|
2622
2768
|
* Apply the position to the element.
|
|
@@ -2682,14 +2828,14 @@ class GlobalPositionStrategy {
|
|
|
2682
2828
|
parent.classList.remove(wrapperClass);
|
|
2683
2829
|
parentStyles.justifyContent = parentStyles.alignItems = styles.marginTop =
|
|
2684
2830
|
styles.marginBottom = styles.marginLeft = styles.marginRight = styles.position = '';
|
|
2685
|
-
this._overlayRef = /** @type {?} */ (
|
|
2831
|
+
this._overlayRef = (/** @type {?} */ (null));
|
|
2686
2832
|
this._isDisposed = true;
|
|
2687
2833
|
}
|
|
2688
2834
|
}
|
|
2689
2835
|
|
|
2690
2836
|
/**
|
|
2691
2837
|
* @fileoverview added by tsickle
|
|
2692
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
2838
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2693
2839
|
*/
|
|
2694
2840
|
/**
|
|
2695
2841
|
* Builder for overlay position strategy.
|
|
@@ -2701,9 +2847,7 @@ class OverlayPositionBuilder {
|
|
|
2701
2847
|
* @param {?=} _platform
|
|
2702
2848
|
* @param {?=} _overlayContainer
|
|
2703
2849
|
*/
|
|
2704
|
-
constructor(_viewportRuler, _document,
|
|
2705
|
-
// @breaking-change 8.0.0 `_platform` and `_overlayContainer` parameters to be made required.
|
|
2706
|
-
_platform, _overlayContainer) {
|
|
2850
|
+
constructor(_viewportRuler, _document, _platform, _overlayContainer) {
|
|
2707
2851
|
this._viewportRuler = _viewportRuler;
|
|
2708
2852
|
this._document = _document;
|
|
2709
2853
|
this._platform = _platform;
|
|
@@ -2751,12 +2895,15 @@ OverlayPositionBuilder.ctorParameters = () => [
|
|
|
2751
2895
|
|
|
2752
2896
|
/**
|
|
2753
2897
|
* @fileoverview added by tsickle
|
|
2754
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
2898
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2755
2899
|
*/
|
|
2756
|
-
/**
|
|
2900
|
+
/**
|
|
2757
2901
|
* Next overlay unique ID.
|
|
2758
|
-
|
|
2902
|
+
* @type {?}
|
|
2903
|
+
*/
|
|
2759
2904
|
let nextUniqueId = 0;
|
|
2905
|
+
// Note that Overlay is *not* scoped to the app root because the ComponentFactoryResolver
|
|
2906
|
+
// it needs is different based on where OverlayModule is imported.
|
|
2760
2907
|
/**
|
|
2761
2908
|
* Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be
|
|
2762
2909
|
* used as a low-level building block for other components. Dialogs, tooltips, menus,
|
|
@@ -2778,9 +2925,7 @@ class Overlay {
|
|
|
2778
2925
|
* @param {?} _directionality
|
|
2779
2926
|
* @param {?=} _location
|
|
2780
2927
|
*/
|
|
2781
|
-
constructor(scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality,
|
|
2782
|
-
// @breaking-change 8.0.0 `_location` parameter to be made required.
|
|
2783
|
-
_location) {
|
|
2928
|
+
constructor(scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality, _location) {
|
|
2784
2929
|
this.scrollStrategies = scrollStrategies;
|
|
2785
2930
|
this._overlayContainer = _overlayContainer;
|
|
2786
2931
|
this._componentFactoryResolver = _componentFactoryResolver;
|
|
@@ -2819,6 +2964,7 @@ class Overlay {
|
|
|
2819
2964
|
}
|
|
2820
2965
|
/**
|
|
2821
2966
|
* Creates the DOM element for an overlay and appends it to the overlay container.
|
|
2967
|
+
* @private
|
|
2822
2968
|
* @param {?} host
|
|
2823
2969
|
* @return {?} Newly-created pane element
|
|
2824
2970
|
*/
|
|
@@ -2833,6 +2979,7 @@ class Overlay {
|
|
|
2833
2979
|
/**
|
|
2834
2980
|
* Creates the host element that wraps around an overlay
|
|
2835
2981
|
* and can be used for advanced positioning.
|
|
2982
|
+
* @private
|
|
2836
2983
|
* @return {?} Newly-create host element.
|
|
2837
2984
|
*/
|
|
2838
2985
|
_createHostElement() {
|
|
@@ -2843,6 +2990,7 @@ class Overlay {
|
|
|
2843
2990
|
}
|
|
2844
2991
|
/**
|
|
2845
2992
|
* Create a DomPortalOutlet into which the overlay content can be loaded.
|
|
2993
|
+
* @private
|
|
2846
2994
|
* @param {?} pane The DOM element to turn into a portal outlet.
|
|
2847
2995
|
* @return {?} A portal outlet for the given DOM element.
|
|
2848
2996
|
*/
|
|
@@ -2874,11 +3022,12 @@ Overlay.ctorParameters = () => [
|
|
|
2874
3022
|
|
|
2875
3023
|
/**
|
|
2876
3024
|
* @fileoverview added by tsickle
|
|
2877
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
3025
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2878
3026
|
*/
|
|
2879
|
-
/**
|
|
3027
|
+
/**
|
|
2880
3028
|
* Default set of positions for the overlay. Follows the behavior of a dropdown.
|
|
2881
|
-
|
|
3029
|
+
* @type {?}
|
|
3030
|
+
*/
|
|
2882
3031
|
const defaultPositionList = [
|
|
2883
3032
|
{
|
|
2884
3033
|
originX: 'start',
|
|
@@ -2905,9 +3054,10 @@ const defaultPositionList = [
|
|
|
2905
3054
|
overlayY: 'top'
|
|
2906
3055
|
}
|
|
2907
3056
|
];
|
|
2908
|
-
/**
|
|
3057
|
+
/**
|
|
2909
3058
|
* Injection token that determines the scroll handling while the connected overlay is open.
|
|
2910
|
-
|
|
3059
|
+
* @type {?}
|
|
3060
|
+
*/
|
|
2911
3061
|
const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY = new InjectionToken('cdk-connected-overlay-scroll-strategy');
|
|
2912
3062
|
/**
|
|
2913
3063
|
* Directive applied to an element to make it usable as an origin for an Overlay using a
|
|
@@ -2936,6 +3086,7 @@ CdkOverlayOrigin.ctorParameters = () => [
|
|
|
2936
3086
|
* Overlay using a FlexibleConnectedPositionStrategy.
|
|
2937
3087
|
*/
|
|
2938
3088
|
class CdkConnectedOverlay {
|
|
3089
|
+
// TODO(jelbourn): inputs for size, scroll behavior, animation, etc.
|
|
2939
3090
|
/**
|
|
2940
3091
|
* @param {?} _overlay
|
|
2941
3092
|
* @param {?} templateRef
|
|
@@ -3084,7 +3235,10 @@ class CdkConnectedOverlay {
|
|
|
3084
3235
|
* @return {?}
|
|
3085
3236
|
*/
|
|
3086
3237
|
ngOnDestroy() {
|
|
3087
|
-
this.
|
|
3238
|
+
if (this._overlayRef) {
|
|
3239
|
+
this._overlayRef.dispose();
|
|
3240
|
+
}
|
|
3241
|
+
this._backdropSubscription.unsubscribe();
|
|
3088
3242
|
}
|
|
3089
3243
|
/**
|
|
3090
3244
|
* @param {?} changes
|
|
@@ -3103,6 +3257,7 @@ class CdkConnectedOverlay {
|
|
|
3103
3257
|
}
|
|
3104
3258
|
/**
|
|
3105
3259
|
* Creates an overlay
|
|
3260
|
+
* @private
|
|
3106
3261
|
* @return {?}
|
|
3107
3262
|
*/
|
|
3108
3263
|
_createOverlay() {
|
|
@@ -3119,6 +3274,7 @@ class CdkConnectedOverlay {
|
|
|
3119
3274
|
}
|
|
3120
3275
|
/**
|
|
3121
3276
|
* Builds the overlay config based on the directive's inputs
|
|
3277
|
+
* @private
|
|
3122
3278
|
* @return {?}
|
|
3123
3279
|
*/
|
|
3124
3280
|
_buildConfig() {
|
|
@@ -3153,6 +3309,7 @@ class CdkConnectedOverlay {
|
|
|
3153
3309
|
}
|
|
3154
3310
|
/**
|
|
3155
3311
|
* Updates the state of a position strategy, based on the values of the directive inputs.
|
|
3312
|
+
* @private
|
|
3156
3313
|
* @param {?} positionStrategy
|
|
3157
3314
|
* @return {?}
|
|
3158
3315
|
*/
|
|
@@ -3177,6 +3334,7 @@ class CdkConnectedOverlay {
|
|
|
3177
3334
|
}
|
|
3178
3335
|
/**
|
|
3179
3336
|
* Returns the position strategy of the overlay to be set on the overlay config
|
|
3337
|
+
* @private
|
|
3180
3338
|
* @return {?}
|
|
3181
3339
|
*/
|
|
3182
3340
|
_createPositionStrategy() {
|
|
@@ -3188,6 +3346,7 @@ class CdkConnectedOverlay {
|
|
|
3188
3346
|
}
|
|
3189
3347
|
/**
|
|
3190
3348
|
* Attaches the overlay and subscribes to backdrop clicks if backdrop exists
|
|
3349
|
+
* @private
|
|
3191
3350
|
* @return {?}
|
|
3192
3351
|
*/
|
|
3193
3352
|
_attachOverlay() {
|
|
@@ -3202,6 +3361,7 @@ class CdkConnectedOverlay {
|
|
|
3202
3361
|
height: this.height,
|
|
3203
3362
|
minHeight: this.minHeight,
|
|
3204
3363
|
});
|
|
3364
|
+
this._overlayRef.getConfig().hasBackdrop = this.hasBackdrop;
|
|
3205
3365
|
}
|
|
3206
3366
|
if (!this._overlayRef.hasAttached()) {
|
|
3207
3367
|
this._overlayRef.attach(this._templatePortal);
|
|
@@ -3212,9 +3372,13 @@ class CdkConnectedOverlay {
|
|
|
3212
3372
|
this.backdropClick.emit(event);
|
|
3213
3373
|
});
|
|
3214
3374
|
}
|
|
3375
|
+
else {
|
|
3376
|
+
this._backdropSubscription.unsubscribe();
|
|
3377
|
+
}
|
|
3215
3378
|
}
|
|
3216
3379
|
/**
|
|
3217
3380
|
* Detaches the overlay and unsubscribes to backdrop clicks if backdrop exists
|
|
3381
|
+
* @private
|
|
3218
3382
|
* @return {?}
|
|
3219
3383
|
*/
|
|
3220
3384
|
_detachOverlay() {
|
|
@@ -3224,16 +3388,6 @@ class CdkConnectedOverlay {
|
|
|
3224
3388
|
}
|
|
3225
3389
|
this._backdropSubscription.unsubscribe();
|
|
3226
3390
|
}
|
|
3227
|
-
/**
|
|
3228
|
-
* Destroys the overlay created by this directive.
|
|
3229
|
-
* @return {?}
|
|
3230
|
-
*/
|
|
3231
|
-
_destroyOverlay() {
|
|
3232
|
-
if (this._overlayRef) {
|
|
3233
|
-
this._overlayRef.dispose();
|
|
3234
|
-
}
|
|
3235
|
-
this._backdropSubscription.unsubscribe();
|
|
3236
|
-
}
|
|
3237
3391
|
}
|
|
3238
3392
|
CdkConnectedOverlay.decorators = [
|
|
3239
3393
|
{ type: Directive, args: [{
|
|
@@ -3282,9 +3436,10 @@ CdkConnectedOverlay.propDecorators = {
|
|
|
3282
3436
|
function CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {
|
|
3283
3437
|
return () => overlay.scrollStrategies.reposition();
|
|
3284
3438
|
}
|
|
3285
|
-
/**
|
|
3439
|
+
/**
|
|
3286
3440
|
* \@docs-private
|
|
3287
|
-
|
|
3441
|
+
* @type {?}
|
|
3442
|
+
*/
|
|
3288
3443
|
const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {
|
|
3289
3444
|
provide: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY,
|
|
3290
3445
|
deps: [Overlay],
|
|
@@ -3293,7 +3448,7 @@ const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {
|
|
|
3293
3448
|
|
|
3294
3449
|
/**
|
|
3295
3450
|
* @fileoverview added by tsickle
|
|
3296
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
3451
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3297
3452
|
*/
|
|
3298
3453
|
class OverlayModule {
|
|
3299
3454
|
}
|
|
@@ -3308,11 +3463,12 @@ OverlayModule.decorators = [
|
|
|
3308
3463
|
],
|
|
3309
3464
|
},] },
|
|
3310
3465
|
];
|
|
3311
|
-
/**
|
|
3466
|
+
/**
|
|
3312
3467
|
* @deprecated Use `OverlayModule` instead.
|
|
3313
3468
|
* \@breaking-change 8.0.0
|
|
3314
3469
|
* \@docs-private
|
|
3315
|
-
|
|
3470
|
+
* @type {?}
|
|
3471
|
+
*/
|
|
3316
3472
|
const OVERLAY_PROVIDERS = [
|
|
3317
3473
|
Overlay,
|
|
3318
3474
|
OverlayPositionBuilder,
|
|
@@ -3324,7 +3480,7 @@ const OVERLAY_PROVIDERS = [
|
|
|
3324
3480
|
|
|
3325
3481
|
/**
|
|
3326
3482
|
* @fileoverview added by tsickle
|
|
3327
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
3483
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3328
3484
|
*/
|
|
3329
3485
|
/**
|
|
3330
3486
|
* Alternative to OverlayContainer that supports correct displaying of overlay elements in
|
|
@@ -3350,6 +3506,7 @@ class FullscreenOverlayContainer extends OverlayContainer {
|
|
|
3350
3506
|
}
|
|
3351
3507
|
}
|
|
3352
3508
|
/**
|
|
3509
|
+
* @protected
|
|
3353
3510
|
* @return {?}
|
|
3354
3511
|
*/
|
|
3355
3512
|
_createContainer() {
|
|
@@ -3358,6 +3515,7 @@ class FullscreenOverlayContainer extends OverlayContainer {
|
|
|
3358
3515
|
this._addFullscreenChangeListener(() => this._adjustParentForFullscreenChange());
|
|
3359
3516
|
}
|
|
3360
3517
|
/**
|
|
3518
|
+
* @private
|
|
3361
3519
|
* @return {?}
|
|
3362
3520
|
*/
|
|
3363
3521
|
_adjustParentForFullscreenChange() {
|
|
@@ -3371,6 +3529,7 @@ class FullscreenOverlayContainer extends OverlayContainer {
|
|
|
3371
3529
|
parent.appendChild(this._containerElement);
|
|
3372
3530
|
}
|
|
3373
3531
|
/**
|
|
3532
|
+
* @private
|
|
3374
3533
|
* @param {?} fn
|
|
3375
3534
|
* @return {?}
|
|
3376
3535
|
*/
|
|
@@ -3386,6 +3545,7 @@ class FullscreenOverlayContainer extends OverlayContainer {
|
|
|
3386
3545
|
}
|
|
3387
3546
|
}
|
|
3388
3547
|
/**
|
|
3548
|
+
* @private
|
|
3389
3549
|
* @return {?}
|
|
3390
3550
|
*/
|
|
3391
3551
|
_getEventName() {
|
|
@@ -3396,10 +3556,10 @@ class FullscreenOverlayContainer extends OverlayContainer {
|
|
|
3396
3556
|
else if (this._document.webkitFullscreenEnabled) {
|
|
3397
3557
|
this._fullScreenEventName = 'webkitfullscreenchange';
|
|
3398
3558
|
}
|
|
3399
|
-
else if ((/** @type {?} */ (this._document)).mozFullScreenEnabled) {
|
|
3559
|
+
else if (((/** @type {?} */ (this._document))).mozFullScreenEnabled) {
|
|
3400
3560
|
this._fullScreenEventName = 'mozfullscreenchange';
|
|
3401
3561
|
}
|
|
3402
|
-
else if ((/** @type {?} */ (this._document)).msFullscreenEnabled) {
|
|
3562
|
+
else if (((/** @type {?} */ (this._document))).msFullscreenEnabled) {
|
|
3403
3563
|
this._fullScreenEventName = 'MSFullscreenChange';
|
|
3404
3564
|
}
|
|
3405
3565
|
}
|
|
@@ -3413,27 +3573,28 @@ class FullscreenOverlayContainer extends OverlayContainer {
|
|
|
3413
3573
|
getFullscreenElement() {
|
|
3414
3574
|
return this._document.fullscreenElement ||
|
|
3415
3575
|
this._document.webkitFullscreenElement ||
|
|
3416
|
-
(/** @type {?} */ (this._document)).mozFullScreenElement ||
|
|
3417
|
-
(/** @type {?} */ (this._document)).msFullscreenElement ||
|
|
3576
|
+
((/** @type {?} */ (this._document))).mozFullScreenElement ||
|
|
3577
|
+
((/** @type {?} */ (this._document))).msFullscreenElement ||
|
|
3418
3578
|
null;
|
|
3419
3579
|
}
|
|
3420
3580
|
}
|
|
3421
3581
|
FullscreenOverlayContainer.decorators = [
|
|
3422
|
-
{ type: Injectable },
|
|
3582
|
+
{ type: Injectable, args: [{ providedIn: 'root' },] },
|
|
3423
3583
|
];
|
|
3424
3584
|
/** @nocollapse */
|
|
3425
3585
|
FullscreenOverlayContainer.ctorParameters = () => [
|
|
3426
3586
|
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
|
|
3427
3587
|
];
|
|
3588
|
+
/** @nocollapse */ FullscreenOverlayContainer.ngInjectableDef = defineInjectable({ factory: function FullscreenOverlayContainer_Factory() { return new FullscreenOverlayContainer(inject(DOCUMENT)); }, token: FullscreenOverlayContainer, providedIn: "root" });
|
|
3428
3589
|
|
|
3429
3590
|
/**
|
|
3430
3591
|
* @fileoverview added by tsickle
|
|
3431
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
3592
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3432
3593
|
*/
|
|
3433
3594
|
|
|
3434
3595
|
/**
|
|
3435
3596
|
* @fileoverview added by tsickle
|
|
3436
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
3597
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3437
3598
|
*/
|
|
3438
3599
|
|
|
3439
3600
|
export { Overlay, OverlayContainer, CdkOverlayOrigin, CdkConnectedOverlay, FullscreenOverlayContainer, OverlayRef, OverlayKeyboardDispatcher, OverlayPositionBuilder, GlobalPositionStrategy, ConnectedPositionStrategy, FlexibleConnectedPositionStrategy, OverlayConfig, validateVerticalPosition, validateHorizontalPosition, ConnectionPositionPair, ScrollingVisibility, ConnectedOverlayPositionChange, ScrollStrategyOptions, RepositionScrollStrategy, CloseScrollStrategy, NoopScrollStrategy, BlockScrollStrategy, OverlayModule, OVERLAY_PROVIDERS, OVERLAY_KEYBOARD_DISPATCHER_PROVIDER as ɵg, OVERLAY_KEYBOARD_DISPATCHER_PROVIDER_FACTORY as ɵf, OVERLAY_CONTAINER_PROVIDER as ɵb, OVERLAY_CONTAINER_PROVIDER_FACTORY as ɵa, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY as ɵc, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER as ɵe, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY as ɵd };
|