@angular/cdk 14.0.0-next.1 → 14.0.0-next.10
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/a11y/_index.scss +11 -0
- package/a11y/a11y-module.d.ts +2 -3
- package/a11y/live-announcer/live-announcer.d.ts +5 -1
- package/a11y-prebuilt.css +1 -1
- package/drag-drop/drag-events.d.ts +8 -0
- package/drag-drop/drag-ref.d.ts +11 -1
- package/drag-drop/drop-list-ref.d.ts +5 -1
- package/drag-drop/parent-position-tracker.d.ts +11 -3
- package/esm2020/a11y/a11y-module.mjs +6 -7
- package/esm2020/a11y/aria-describer/aria-describer.mjs +4 -4
- package/esm2020/a11y/focus-monitor/focus-monitor.mjs +13 -11
- package/esm2020/a11y/focus-trap/configurable-focus-trap-factory.mjs +4 -4
- package/esm2020/a11y/focus-trap/focus-trap-manager.mjs +4 -4
- package/esm2020/a11y/focus-trap/focus-trap.mjs +7 -7
- package/esm2020/a11y/high-contrast-mode/high-contrast-mode-detector.mjs +7 -12
- package/esm2020/a11y/input-modality/input-modality-detector.mjs +4 -4
- package/esm2020/a11y/interactivity-checker/interactivity-checker.mjs +4 -4
- package/esm2020/a11y/live-announcer/live-announcer.mjs +26 -18
- package/esm2020/accordion/accordion-item.mjs +4 -4
- package/esm2020/accordion/accordion-module.mjs +5 -5
- package/esm2020/accordion/accordion.mjs +4 -4
- package/esm2020/bidi/bidi-module.mjs +5 -5
- package/esm2020/bidi/dir.mjs +4 -4
- package/esm2020/bidi/directionality.mjs +4 -4
- package/esm2020/clipboard/clipboard-module.mjs +5 -5
- package/esm2020/clipboard/clipboard.mjs +4 -4
- package/esm2020/clipboard/copy-to-clipboard.mjs +4 -4
- package/esm2020/collections/unique-selection-dispatcher.mjs +4 -4
- package/esm2020/drag-drop/directives/drag-handle.mjs +4 -4
- package/esm2020/drag-drop/directives/drag-placeholder.mjs +4 -4
- package/esm2020/drag-drop/directives/drag-preview.mjs +4 -4
- package/esm2020/drag-drop/directives/drag.mjs +26 -24
- package/esm2020/drag-drop/directives/drop-list-group.mjs +4 -4
- package/esm2020/drag-drop/directives/drop-list.mjs +14 -13
- package/esm2020/drag-drop/drag-drop-module.mjs +5 -5
- package/esm2020/drag-drop/drag-drop-registry.mjs +4 -4
- package/esm2020/drag-drop/drag-drop.mjs +4 -4
- package/esm2020/drag-drop/drag-events.mjs +1 -1
- package/esm2020/drag-drop/drag-ref.mjs +48 -24
- package/esm2020/drag-drop/drop-list-ref.mjs +7 -3
- package/esm2020/drag-drop/parent-position-tracker.mjs +13 -5
- package/esm2020/layout/breakpoints-observer.mjs +4 -4
- package/esm2020/layout/layout-module.mjs +5 -5
- package/esm2020/layout/media-matcher.mjs +4 -4
- package/esm2020/observers/observe-content.mjs +14 -14
- package/esm2020/overlay/dispatchers/base-overlay-dispatcher.mjs +4 -4
- package/esm2020/overlay/dispatchers/overlay-keyboard-dispatcher.mjs +26 -8
- package/esm2020/overlay/dispatchers/overlay-outside-click-dispatcher.mjs +33 -12
- package/esm2020/overlay/fullscreen-overlay-container.mjs +4 -4
- package/esm2020/overlay/overlay-container.mjs +4 -4
- package/esm2020/overlay/overlay-directives.mjs +7 -7
- package/esm2020/overlay/overlay-module.mjs +5 -5
- package/esm2020/overlay/overlay-ref.mjs +24 -18
- package/esm2020/overlay/overlay.mjs +14 -8
- package/esm2020/overlay/position/flexible-connected-position-strategy.mjs +13 -1
- package/esm2020/overlay/position/global-position-strategy.mjs +64 -30
- package/esm2020/overlay/position/overlay-position-builder.mjs +4 -4
- package/esm2020/overlay/public-api.mjs +2 -2
- package/esm2020/overlay/scroll/scroll-strategy-options.mjs +4 -4
- package/esm2020/platform/platform-module.mjs +5 -5
- package/esm2020/platform/platform.mjs +4 -4
- package/esm2020/portal/dom-portal-outlet.mjs +24 -4
- package/esm2020/portal/portal-directives.mjs +20 -18
- package/esm2020/portal/portal.mjs +12 -3
- package/esm2020/scrolling/fixed-size-virtual-scroll.mjs +4 -4
- package/esm2020/scrolling/scroll-dispatcher.mjs +4 -4
- package/esm2020/scrolling/scrollable.mjs +4 -4
- package/esm2020/scrolling/scrolling-module.mjs +10 -11
- package/esm2020/scrolling/viewport-ruler.mjs +4 -4
- package/esm2020/scrolling/virtual-for-of.mjs +7 -5
- package/esm2020/scrolling/virtual-scroll-viewport.mjs +8 -6
- package/esm2020/stepper/step-header.mjs +4 -4
- package/esm2020/stepper/step-label.mjs +4 -4
- package/esm2020/stepper/stepper-button.mjs +7 -7
- package/esm2020/stepper/stepper-module.mjs +5 -5
- package/esm2020/stepper/stepper.mjs +9 -22
- package/esm2020/table/cell.mjs +22 -22
- package/esm2020/table/coalesced-style-scheduler.mjs +4 -4
- package/esm2020/table/row.mjs +28 -28
- package/esm2020/table/table-module.mjs +5 -5
- package/esm2020/table/table.mjs +21 -21
- package/esm2020/table/text-column.mjs +4 -4
- package/esm2020/testing/component-harness.mjs +7 -1
- package/esm2020/testing/harness-environment.mjs +12 -1
- package/esm2020/testing/public-api.mjs +2 -1
- package/esm2020/testing/selenium-webdriver/selenium-web-driver-element.mjs +8 -3
- package/esm2020/testing/test-element-errors.mjs +15 -0
- package/esm2020/testing/test-element.mjs +1 -1
- package/esm2020/testing/testbed/fake-events/type-in-element.mjs +13 -4
- package/esm2020/testing/testbed/unit-test-element.mjs +21 -5
- package/esm2020/text-field/autofill.mjs +7 -7
- package/esm2020/text-field/autosize.mjs +4 -4
- package/esm2020/text-field/text-field-module.mjs +5 -7
- package/esm2020/tree/nested-node.mjs +4 -4
- package/esm2020/tree/node.mjs +4 -4
- package/esm2020/tree/outlet.mjs +4 -4
- package/esm2020/tree/padding.mjs +4 -4
- package/esm2020/tree/toggle.mjs +4 -4
- package/esm2020/tree/tree-module.mjs +5 -5
- package/esm2020/tree/tree.mjs +7 -7
- package/esm2020/version.mjs +1 -1
- package/fesm2015/a11y.mjs +71 -66
- package/fesm2015/a11y.mjs.map +1 -1
- package/fesm2015/accordion.mjs +10 -10
- package/fesm2015/accordion.mjs.map +1 -1
- package/fesm2015/bidi.mjs +10 -10
- package/fesm2015/bidi.mjs.map +1 -1
- package/fesm2015/cdk.mjs +1 -1
- package/fesm2015/cdk.mjs.map +1 -1
- package/fesm2015/clipboard.mjs +10 -10
- package/fesm2015/clipboard.mjs.map +1 -1
- package/fesm2015/coercion.mjs.map +1 -1
- package/fesm2015/collections.mjs +3 -3
- package/fesm2015/collections.mjs.map +1 -1
- package/fesm2015/drag-drop.mjs +126 -86
- package/fesm2015/drag-drop.mjs.map +1 -1
- package/fesm2015/keycodes.mjs.map +1 -1
- package/fesm2015/layout.mjs +10 -10
- package/fesm2015/layout.mjs.map +1 -1
- package/fesm2015/observers.mjs +13 -13
- package/fesm2015/observers.mjs.map +1 -1
- package/fesm2015/overlay.mjs +194 -97
- package/fesm2015/overlay.mjs.map +1 -1
- package/fesm2015/platform.mjs +7 -7
- package/fesm2015/platform.mjs.map +1 -1
- package/fesm2015/portal.mjs +53 -23
- package/fesm2015/portal.mjs.map +1 -1
- package/fesm2015/scrolling.mjs +35 -31
- package/fesm2015/scrolling.mjs.map +1 -1
- package/fesm2015/stepper.mjs +24 -37
- package/fesm2015/stepper.mjs.map +1 -1
- package/fesm2015/table.mjs +78 -78
- package/fesm2015/table.mjs.map +1 -1
- package/fesm2015/testing/selenium-webdriver.mjs +7 -2
- package/fesm2015/testing/selenium-webdriver.mjs.map +1 -1
- package/fesm2015/testing/testbed.mjs +32 -8
- package/fesm2015/testing/testbed.mjs.map +1 -1
- package/fesm2015/testing.mjs +39 -1
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2015/text-field.mjs +14 -15
- package/fesm2015/text-field.mjs.map +1 -1
- package/fesm2015/tree.mjs +25 -25
- package/fesm2015/tree.mjs.map +1 -1
- package/fesm2020/a11y.mjs +70 -65
- package/fesm2020/a11y.mjs.map +1 -1
- package/fesm2020/accordion.mjs +10 -10
- package/fesm2020/accordion.mjs.map +1 -1
- package/fesm2020/bidi.mjs +10 -10
- package/fesm2020/bidi.mjs.map +1 -1
- package/fesm2020/cdk.mjs +1 -1
- package/fesm2020/cdk.mjs.map +1 -1
- package/fesm2020/clipboard.mjs +10 -10
- package/fesm2020/clipboard.mjs.map +1 -1
- package/fesm2020/coercion.mjs.map +1 -1
- package/fesm2020/collections.mjs +3 -3
- package/fesm2020/collections.mjs.map +1 -1
- package/fesm2020/drag-drop.mjs +125 -86
- package/fesm2020/drag-drop.mjs.map +1 -1
- package/fesm2020/keycodes.mjs.map +1 -1
- package/fesm2020/layout.mjs +10 -10
- package/fesm2020/layout.mjs.map +1 -1
- package/fesm2020/observers.mjs +13 -13
- package/fesm2020/observers.mjs.map +1 -1
- package/fesm2020/overlay.mjs +194 -97
- package/fesm2020/overlay.mjs.map +1 -1
- package/fesm2020/platform.mjs +7 -7
- package/fesm2020/platform.mjs.map +1 -1
- package/fesm2020/portal.mjs +53 -23
- package/fesm2020/portal.mjs.map +1 -1
- package/fesm2020/scrolling.mjs +35 -31
- package/fesm2020/scrolling.mjs.map +1 -1
- package/fesm2020/stepper.mjs +24 -37
- package/fesm2020/stepper.mjs.map +1 -1
- package/fesm2020/table.mjs +78 -78
- package/fesm2020/table.mjs.map +1 -1
- package/fesm2020/testing/selenium-webdriver.mjs +7 -2
- package/fesm2020/testing/selenium-webdriver.mjs.map +1 -1
- package/fesm2020/testing/testbed.mjs +32 -8
- package/fesm2020/testing/testbed.mjs.map +1 -1
- package/fesm2020/testing.mjs +33 -1
- package/fesm2020/testing.mjs.map +1 -1
- package/fesm2020/text-field.mjs +14 -15
- package/fesm2020/text-field.mjs.map +1 -1
- package/fesm2020/tree.mjs +25 -25
- package/fesm2020/tree.mjs.map +1 -1
- package/overlay/_index.scss +11 -1
- package/overlay/dispatchers/overlay-keyboard-dispatcher.d.ts +7 -2
- package/overlay/dispatchers/overlay-outside-click-dispatcher.d.ts +8 -2
- package/overlay/overlay-ref.d.ts +4 -1
- package/overlay/overlay.d.ts +3 -2
- package/overlay/position/flexible-connected-position-strategy.d.ts +2 -0
- package/overlay/position/global-position-strategy.d.ts +14 -3
- package/overlay/public-api.d.ts +1 -1
- package/overlay-prebuilt.css +1 -1
- package/package.json +3 -3
- package/portal/dom-portal-outlet.d.ts +17 -6
- package/portal/portal.d.ts +12 -2
- package/schematics/collection.json +2 -1
- package/schematics/index.js +6 -2
- package/schematics/index.mjs +6 -2
- package/schematics/migration.json +5 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/drag-drop/index.js +5 -14
- package/schematics/ng-generate/drag-drop/index.mjs +5 -14
- package/schematics/ng-generate/drag-drop/schema.json +1 -1
- package/schematics/ng-update/data/constructor-checks.js +7 -1
- package/schematics/ng-update/data/constructor-checks.mjs +7 -1
- package/schematics/ng-update/data/index.js +6 -2
- package/schematics/ng-update/data/index.mjs +6 -2
- package/schematics/ng-update/devkit-migration-rule.js +5 -14
- package/schematics/ng-update/devkit-migration-rule.mjs +5 -14
- package/schematics/ng-update/devkit-migration.js +1 -1
- package/schematics/ng-update/devkit-migration.mjs +1 -1
- package/schematics/ng-update/html-parsing/elements.js +2 -3
- package/schematics/ng-update/html-parsing/elements.mjs +2 -3
- package/schematics/ng-update/index.d.ts +2 -0
- package/schematics/ng-update/index.js +7 -2
- package/schematics/ng-update/index.mjs +7 -2
- package/schematics/ng-update/migrations/symbol-removal.js +2 -3
- package/schematics/ng-update/migrations/symbol-removal.mjs +2 -3
- package/schematics/ng-update/public-api.js +6 -2
- package/schematics/ng-update/public-api.mjs +6 -2
- package/schematics/tsconfig.json +2 -10
- package/schematics/update-tool/public-api.js +6 -2
- package/schematics/update-tool/public-api.mjs +6 -2
- package/schematics/update-tool/target-version.d.ts +2 -1
- package/schematics/update-tool/target-version.js +2 -1
- package/schematics/update-tool/target-version.mjs +2 -1
- package/schematics/utils/ast.js +11 -22
- package/schematics/utils/ast.mjs +11 -22
- package/schematics/utils/build-component.js +10 -15
- package/schematics/utils/build-component.mjs +10 -15
- package/schematics/utils/get-project.d.ts +1 -1
- package/schematics/utils/get-project.js +7 -2
- package/schematics/utils/get-project.mjs +7 -2
- package/schematics/utils/index.js +6 -2
- package/schematics/utils/index.mjs +6 -2
- package/schematics/utils/project-index-file.js +2 -2
- package/schematics/utils/project-index-file.mjs +2 -2
- package/schematics/utils/project-targets.js +3 -4
- package/schematics/utils/project-targets.mjs +3 -4
- package/schematics/utils/project-tsconfig-paths.js +16 -28
- package/schematics/utils/project-tsconfig-paths.mjs +16 -28
- package/scrolling/scrolling-module.d.ts +1 -2
- package/stepper/stepper.d.ts +3 -12
- package/table/text-column.d.ts +1 -1
- package/testing/component-harness.d.ts +18 -0
- package/testing/harness-environment.d.ts +2 -0
- package/testing/public-api.d.ts +1 -0
- package/testing/test-element-errors.d.ts +12 -0
- package/testing/test-element.d.ts +4 -2
- package/testing/testbed/fake-events/type-in-element.d.ts +2 -2
- package/testing/testbed/unit-test-element.d.ts +4 -1
- package/text-field/text-field-module.d.ts +1 -2
- package/text-field-prebuilt.css +1 -1
package/fesm2015/overlay.mjs
CHANGED
|
@@ -4,7 +4,7 @@ export { CdkScrollable, ScrollDispatcher, ViewportRuler } from '@angular/cdk/scr
|
|
|
4
4
|
import * as i6 from '@angular/common';
|
|
5
5
|
import { DOCUMENT } from '@angular/common';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
|
-
import { Injectable, Inject, ElementRef, ApplicationRef, InjectionToken, Directive, EventEmitter,
|
|
7
|
+
import { Injectable, Inject, ElementRef, Optional, ApplicationRef, ANIMATION_MODULE_TYPE, InjectionToken, Directive, EventEmitter, Input, Output, NgModule } from '@angular/core';
|
|
8
8
|
import { coerceCssPixelValue, coerceArray, coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
9
9
|
import * as i1$1 from '@angular/cdk/platform';
|
|
10
10
|
import { supportsScrollBehavior, _isTestEnvironment, _getEventTarget } from '@angular/cdk/platform';
|
|
@@ -312,9 +312,9 @@ class ScrollStrategyOptions {
|
|
|
312
312
|
this._document = document;
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
ScrollStrategyOptions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
316
|
-
ScrollStrategyOptions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
317
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
315
|
+
ScrollStrategyOptions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: ScrollStrategyOptions, deps: [{ token: i1.ScrollDispatcher }, { token: i1.ViewportRuler }, { token: i0.NgZone }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
316
|
+
ScrollStrategyOptions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: ScrollStrategyOptions, providedIn: 'root' });
|
|
317
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: ScrollStrategyOptions, decorators: [{
|
|
318
318
|
type: Injectable,
|
|
319
319
|
args: [{ providedIn: 'root' }]
|
|
320
320
|
}], ctorParameters: function () {
|
|
@@ -476,7 +476,7 @@ function validateHorizontalPosition(property, value) {
|
|
|
476
476
|
* Used to manipulate or dispose of said overlay.
|
|
477
477
|
*/
|
|
478
478
|
class OverlayRef {
|
|
479
|
-
constructor(_portalOutlet, _host, _pane, _config, _ngZone, _keyboardDispatcher, _document, _location, _outsideClickDispatcher) {
|
|
479
|
+
constructor(_portalOutlet, _host, _pane, _config, _ngZone, _keyboardDispatcher, _document, _location, _outsideClickDispatcher, _animationsDisabled = false) {
|
|
480
480
|
this._portalOutlet = _portalOutlet;
|
|
481
481
|
this._host = _host;
|
|
482
482
|
this._pane = _pane;
|
|
@@ -486,12 +486,16 @@ class OverlayRef {
|
|
|
486
486
|
this._document = _document;
|
|
487
487
|
this._location = _location;
|
|
488
488
|
this._outsideClickDispatcher = _outsideClickDispatcher;
|
|
489
|
+
this._animationsDisabled = _animationsDisabled;
|
|
489
490
|
this._backdropElement = null;
|
|
490
491
|
this._backdropClick = new Subject();
|
|
491
492
|
this._attachments = new Subject();
|
|
492
493
|
this._detachments = new Subject();
|
|
493
494
|
this._locationChanges = Subscription.EMPTY;
|
|
494
495
|
this._backdropClickHandler = (event) => this._backdropClick.next(event);
|
|
496
|
+
this._backdropTransitionendHandler = (event) => {
|
|
497
|
+
this._disposeBackdrop(event.target);
|
|
498
|
+
};
|
|
495
499
|
/** Stream of keydown events dispatched to this overlay. */
|
|
496
500
|
this._keydownEvents = new Subject();
|
|
497
501
|
/** Stream of mouse outside events dispatched to this overlay. */
|
|
@@ -740,6 +744,9 @@ class OverlayRef {
|
|
|
740
744
|
const showingClass = 'cdk-overlay-backdrop-showing';
|
|
741
745
|
this._backdropElement = this._document.createElement('div');
|
|
742
746
|
this._backdropElement.classList.add('cdk-overlay-backdrop');
|
|
747
|
+
if (this._animationsDisabled) {
|
|
748
|
+
this._backdropElement.classList.add('cdk-overlay-backdrop-noop-animation');
|
|
749
|
+
}
|
|
743
750
|
if (this._config.backdropClass) {
|
|
744
751
|
this._toggleClasses(this._backdropElement, this._config.backdropClass, true);
|
|
745
752
|
}
|
|
@@ -750,7 +757,7 @@ class OverlayRef {
|
|
|
750
757
|
// action desired when such a click occurs (usually closing the overlay).
|
|
751
758
|
this._backdropElement.addEventListener('click', this._backdropClickHandler);
|
|
752
759
|
// Add class to fade-in the backdrop after one frame.
|
|
753
|
-
if (typeof requestAnimationFrame !== 'undefined') {
|
|
760
|
+
if (!this._animationsDisabled && typeof requestAnimationFrame !== 'undefined') {
|
|
754
761
|
this._ngZone.runOutsideAngular(() => {
|
|
755
762
|
requestAnimationFrame(() => {
|
|
756
763
|
if (this._backdropElement) {
|
|
@@ -781,22 +788,13 @@ class OverlayRef {
|
|
|
781
788
|
if (!backdropToDetach) {
|
|
782
789
|
return;
|
|
783
790
|
}
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
backdropToDetach.removeEventListener('click', this._backdropClickHandler);
|
|
789
|
-
backdropToDetach.removeEventListener('transitionend', finishDetach);
|
|
790
|
-
this._disposeBackdrop(backdropToDetach);
|
|
791
|
-
}
|
|
792
|
-
if (this._config.backdropClass) {
|
|
793
|
-
this._toggleClasses(backdropToDetach, this._config.backdropClass, false);
|
|
794
|
-
}
|
|
795
|
-
clearTimeout(timeoutId);
|
|
796
|
-
};
|
|
791
|
+
if (this._animationsDisabled) {
|
|
792
|
+
this._disposeBackdrop(backdropToDetach);
|
|
793
|
+
return;
|
|
794
|
+
}
|
|
797
795
|
backdropToDetach.classList.remove('cdk-overlay-backdrop-showing');
|
|
798
796
|
this._ngZone.runOutsideAngular(() => {
|
|
799
|
-
backdropToDetach.addEventListener('transitionend',
|
|
797
|
+
backdropToDetach.addEventListener('transitionend', this._backdropTransitionendHandler);
|
|
800
798
|
});
|
|
801
799
|
// If the backdrop doesn't have a transition, the `transitionend` event won't fire.
|
|
802
800
|
// In this case we make it unclickable and we try to remove it after a delay.
|
|
@@ -804,7 +802,9 @@ class OverlayRef {
|
|
|
804
802
|
// Run this outside the Angular zone because there's nothing that Angular cares about.
|
|
805
803
|
// If it were to run inside the Angular zone, every test that used Overlay would have to be
|
|
806
804
|
// either async or fakeAsync.
|
|
807
|
-
|
|
805
|
+
this._backdropTimeout = this._ngZone.runOutsideAngular(() => setTimeout(() => {
|
|
806
|
+
this._disposeBackdrop(backdropToDetach);
|
|
807
|
+
}, 500));
|
|
808
808
|
}
|
|
809
809
|
/** Toggles a single CSS class or an array of classes on an element. */
|
|
810
810
|
_toggleClasses(element, cssClasses, isAdd) {
|
|
@@ -853,6 +853,8 @@ class OverlayRef {
|
|
|
853
853
|
/** Removes a backdrop element from the DOM. */
|
|
854
854
|
_disposeBackdrop(backdrop) {
|
|
855
855
|
if (backdrop) {
|
|
856
|
+
backdrop.removeEventListener('click', this._backdropClickHandler);
|
|
857
|
+
backdrop.removeEventListener('transitionend', this._backdropTransitionendHandler);
|
|
856
858
|
backdrop.remove();
|
|
857
859
|
// It is possible that a new portal has been attached to this overlay since we started
|
|
858
860
|
// removing the backdrop. If that is the case, only clear the backdrop reference if it
|
|
@@ -861,6 +863,10 @@ class OverlayRef {
|
|
|
861
863
|
this._backdropElement = null;
|
|
862
864
|
}
|
|
863
865
|
}
|
|
866
|
+
if (this._backdropTimeout) {
|
|
867
|
+
clearTimeout(this._backdropTimeout);
|
|
868
|
+
this._backdropTimeout = undefined;
|
|
869
|
+
}
|
|
864
870
|
}
|
|
865
871
|
}
|
|
866
872
|
|
|
@@ -931,9 +937,9 @@ class OverlayContainer {
|
|
|
931
937
|
this._containerElement = container;
|
|
932
938
|
}
|
|
933
939
|
}
|
|
934
|
-
OverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
935
|
-
OverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
936
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
940
|
+
OverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayContainer, deps: [{ token: DOCUMENT }, { token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
941
|
+
OverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayContainer, providedIn: 'root' });
|
|
942
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayContainer, decorators: [{
|
|
937
943
|
type: Injectable,
|
|
938
944
|
args: [{ providedIn: 'root' }]
|
|
939
945
|
}], ctorParameters: function () {
|
|
@@ -1910,6 +1916,18 @@ function getRoundedBoundingClientRect(clientRect) {
|
|
|
1910
1916
|
height: Math.floor(clientRect.height),
|
|
1911
1917
|
};
|
|
1912
1918
|
}
|
|
1919
|
+
const STANDARD_DROPDOWN_BELOW_POSITIONS = [
|
|
1920
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
1921
|
+
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
|
|
1922
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },
|
|
1923
|
+
{ originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' },
|
|
1924
|
+
];
|
|
1925
|
+
const STANDARD_DROPDOWN_ADJACENT_POSITIONS = [
|
|
1926
|
+
{ originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top' },
|
|
1927
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom' },
|
|
1928
|
+
{ originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top' },
|
|
1929
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom' },
|
|
1930
|
+
];
|
|
1913
1931
|
|
|
1914
1932
|
/**
|
|
1915
1933
|
* @license
|
|
@@ -1931,12 +1949,12 @@ class GlobalPositionStrategy {
|
|
|
1931
1949
|
this._cssPosition = 'static';
|
|
1932
1950
|
this._topOffset = '';
|
|
1933
1951
|
this._bottomOffset = '';
|
|
1934
|
-
this._leftOffset = '';
|
|
1935
|
-
this._rightOffset = '';
|
|
1936
1952
|
this._alignItems = '';
|
|
1937
|
-
this.
|
|
1953
|
+
this._xPosition = '';
|
|
1954
|
+
this._xOffset = '';
|
|
1938
1955
|
this._width = '';
|
|
1939
1956
|
this._height = '';
|
|
1957
|
+
this._isDisposed = false;
|
|
1940
1958
|
}
|
|
1941
1959
|
attach(overlayRef) {
|
|
1942
1960
|
const config = overlayRef.getConfig();
|
|
@@ -1965,9 +1983,8 @@ class GlobalPositionStrategy {
|
|
|
1965
1983
|
* @param value New left offset.
|
|
1966
1984
|
*/
|
|
1967
1985
|
left(value = '') {
|
|
1968
|
-
this.
|
|
1969
|
-
this.
|
|
1970
|
-
this._justifyContent = 'flex-start';
|
|
1986
|
+
this._xOffset = value;
|
|
1987
|
+
this._xPosition = 'left';
|
|
1971
1988
|
return this;
|
|
1972
1989
|
}
|
|
1973
1990
|
/**
|
|
@@ -1985,9 +2002,28 @@ class GlobalPositionStrategy {
|
|
|
1985
2002
|
* @param value New right offset.
|
|
1986
2003
|
*/
|
|
1987
2004
|
right(value = '') {
|
|
1988
|
-
this.
|
|
1989
|
-
this.
|
|
1990
|
-
this
|
|
2005
|
+
this._xOffset = value;
|
|
2006
|
+
this._xPosition = 'right';
|
|
2007
|
+
return this;
|
|
2008
|
+
}
|
|
2009
|
+
/**
|
|
2010
|
+
* Sets the overlay to the start of the viewport, depending on the overlay direction.
|
|
2011
|
+
* This will be to the left in LTR layouts and to the right in RTL.
|
|
2012
|
+
* @param offset Offset from the edge of the screen.
|
|
2013
|
+
*/
|
|
2014
|
+
start(value = '') {
|
|
2015
|
+
this._xOffset = value;
|
|
2016
|
+
this._xPosition = 'start';
|
|
2017
|
+
return this;
|
|
2018
|
+
}
|
|
2019
|
+
/**
|
|
2020
|
+
* Sets the overlay to the end of the viewport, depending on the overlay direction.
|
|
2021
|
+
* This will be to the right in LTR layouts and to the left in RTL.
|
|
2022
|
+
* @param offset Offset from the edge of the screen.
|
|
2023
|
+
*/
|
|
2024
|
+
end(value = '') {
|
|
2025
|
+
this._xOffset = value;
|
|
2026
|
+
this._xPosition = 'end';
|
|
1991
2027
|
return this;
|
|
1992
2028
|
}
|
|
1993
2029
|
/**
|
|
@@ -2028,7 +2064,7 @@ class GlobalPositionStrategy {
|
|
|
2028
2064
|
*/
|
|
2029
2065
|
centerHorizontally(offset = '') {
|
|
2030
2066
|
this.left(offset);
|
|
2031
|
-
this.
|
|
2067
|
+
this._xPosition = 'center';
|
|
2032
2068
|
return this;
|
|
2033
2069
|
}
|
|
2034
2070
|
/**
|
|
@@ -2061,32 +2097,48 @@ class GlobalPositionStrategy {
|
|
|
2061
2097
|
(!maxWidth || maxWidth === '100%' || maxWidth === '100vw');
|
|
2062
2098
|
const shouldBeFlushVertically = (height === '100%' || height === '100vh') &&
|
|
2063
2099
|
(!maxHeight || maxHeight === '100%' || maxHeight === '100vh');
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2100
|
+
const xPosition = this._xPosition;
|
|
2101
|
+
const xOffset = this._xOffset;
|
|
2102
|
+
const isRtl = this._overlayRef.getConfig().direction === 'rtl';
|
|
2103
|
+
let marginLeft = '';
|
|
2104
|
+
let marginRight = '';
|
|
2105
|
+
let justifyContent = '';
|
|
2069
2106
|
if (shouldBeFlushHorizontally) {
|
|
2070
|
-
|
|
2071
|
-
}
|
|
2072
|
-
else if (
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
// In RTL the browser will invert `flex-start` and `flex-end` automatically, but we
|
|
2077
|
-
// don't want that because our positioning is explicitly `left` and `right`, hence
|
|
2078
|
-
// why we do another inversion to ensure that the overlay stays in the same position.
|
|
2079
|
-
// TODO: reconsider this if we add `start` and `end` methods.
|
|
2080
|
-
if (this._justifyContent === 'flex-start') {
|
|
2081
|
-
parentStyles.justifyContent = 'flex-end';
|
|
2107
|
+
justifyContent = 'flex-start';
|
|
2108
|
+
}
|
|
2109
|
+
else if (xPosition === 'center') {
|
|
2110
|
+
justifyContent = 'center';
|
|
2111
|
+
if (isRtl) {
|
|
2112
|
+
marginRight = xOffset;
|
|
2082
2113
|
}
|
|
2083
|
-
else
|
|
2084
|
-
|
|
2114
|
+
else {
|
|
2115
|
+
marginLeft = xOffset;
|
|
2085
2116
|
}
|
|
2086
2117
|
}
|
|
2087
|
-
else {
|
|
2088
|
-
|
|
2118
|
+
else if (isRtl) {
|
|
2119
|
+
if (xPosition === 'left' || xPosition === 'end') {
|
|
2120
|
+
justifyContent = 'flex-end';
|
|
2121
|
+
marginLeft = xOffset;
|
|
2122
|
+
}
|
|
2123
|
+
else if (xPosition === 'right' || xPosition === 'start') {
|
|
2124
|
+
justifyContent = 'flex-start';
|
|
2125
|
+
marginRight = xOffset;
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
else if (xPosition === 'left' || xPosition === 'start') {
|
|
2129
|
+
justifyContent = 'flex-start';
|
|
2130
|
+
marginLeft = xOffset;
|
|
2089
2131
|
}
|
|
2132
|
+
else if (xPosition === 'right' || xPosition === 'end') {
|
|
2133
|
+
justifyContent = 'flex-end';
|
|
2134
|
+
marginRight = xOffset;
|
|
2135
|
+
}
|
|
2136
|
+
styles.position = this._cssPosition;
|
|
2137
|
+
styles.marginLeft = shouldBeFlushHorizontally ? '0' : marginLeft;
|
|
2138
|
+
styles.marginTop = shouldBeFlushVertically ? '0' : this._topOffset;
|
|
2139
|
+
styles.marginBottom = this._bottomOffset;
|
|
2140
|
+
styles.marginRight = shouldBeFlushHorizontally ? '0' : marginRight;
|
|
2141
|
+
parentStyles.justifyContent = justifyContent;
|
|
2090
2142
|
parentStyles.alignItems = shouldBeFlushVertically ? 'flex-start' : this._alignItems;
|
|
2091
2143
|
}
|
|
2092
2144
|
/**
|
|
@@ -2136,9 +2188,9 @@ class OverlayPositionBuilder {
|
|
|
2136
2188
|
return new FlexibleConnectedPositionStrategy(origin, this._viewportRuler, this._document, this._platform, this._overlayContainer);
|
|
2137
2189
|
}
|
|
2138
2190
|
}
|
|
2139
|
-
OverlayPositionBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2140
|
-
OverlayPositionBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2191
|
+
OverlayPositionBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayPositionBuilder, deps: [{ token: i1.ViewportRuler }, { token: DOCUMENT }, { token: i1$1.Platform }, { token: OverlayContainer }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2192
|
+
OverlayPositionBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayPositionBuilder, providedIn: 'root' });
|
|
2193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayPositionBuilder, decorators: [{
|
|
2142
2194
|
type: Injectable,
|
|
2143
2195
|
args: [{ providedIn: 'root' }]
|
|
2144
2196
|
}], ctorParameters: function () {
|
|
@@ -2187,9 +2239,9 @@ class BaseOverlayDispatcher {
|
|
|
2187
2239
|
}
|
|
2188
2240
|
}
|
|
2189
2241
|
}
|
|
2190
|
-
BaseOverlayDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2191
|
-
BaseOverlayDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2192
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2242
|
+
BaseOverlayDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: BaseOverlayDispatcher, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2243
|
+
BaseOverlayDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: BaseOverlayDispatcher, providedIn: 'root' });
|
|
2244
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: BaseOverlayDispatcher, decorators: [{
|
|
2193
2245
|
type: Injectable,
|
|
2194
2246
|
args: [{ providedIn: 'root' }]
|
|
2195
2247
|
}], ctorParameters: function () {
|
|
@@ -2212,8 +2264,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
2212
2264
|
* on event target and order of overlay opens.
|
|
2213
2265
|
*/
|
|
2214
2266
|
class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
|
|
2215
|
-
constructor(document
|
|
2267
|
+
constructor(document,
|
|
2268
|
+
/** @breaking-change 14.0.0 _ngZone will be required. */
|
|
2269
|
+
_ngZone) {
|
|
2216
2270
|
super(document);
|
|
2271
|
+
this._ngZone = _ngZone;
|
|
2217
2272
|
/** Keyboard event listener that will be attached to the body. */
|
|
2218
2273
|
this._keydownListener = (event) => {
|
|
2219
2274
|
const overlays = this._attachedOverlays;
|
|
@@ -2225,7 +2280,14 @@ class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
|
|
|
2225
2280
|
// because we don't want overlays that don't handle keyboard events to block the ones below
|
|
2226
2281
|
// them that do.
|
|
2227
2282
|
if (overlays[i]._keydownEvents.observers.length > 0) {
|
|
2228
|
-
overlays[i]._keydownEvents
|
|
2283
|
+
const keydownEvents = overlays[i]._keydownEvents;
|
|
2284
|
+
/** @breaking-change 14.0.0 _ngZone will be required. */
|
|
2285
|
+
if (this._ngZone) {
|
|
2286
|
+
this._ngZone.run(() => keydownEvents.next(event));
|
|
2287
|
+
}
|
|
2288
|
+
else {
|
|
2289
|
+
keydownEvents.next(event);
|
|
2290
|
+
}
|
|
2229
2291
|
break;
|
|
2230
2292
|
}
|
|
2231
2293
|
}
|
|
@@ -2236,7 +2298,13 @@ class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
|
|
|
2236
2298
|
super.add(overlayRef);
|
|
2237
2299
|
// Lazily start dispatcher once first overlay is added
|
|
2238
2300
|
if (!this._isAttached) {
|
|
2239
|
-
|
|
2301
|
+
/** @breaking-change 14.0.0 _ngZone will be required. */
|
|
2302
|
+
if (this._ngZone) {
|
|
2303
|
+
this._ngZone.runOutsideAngular(() => this._document.body.addEventListener('keydown', this._keydownListener));
|
|
2304
|
+
}
|
|
2305
|
+
else {
|
|
2306
|
+
this._document.body.addEventListener('keydown', this._keydownListener);
|
|
2307
|
+
}
|
|
2240
2308
|
this._isAttached = true;
|
|
2241
2309
|
}
|
|
2242
2310
|
}
|
|
@@ -2248,15 +2316,17 @@ class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
|
|
|
2248
2316
|
}
|
|
2249
2317
|
}
|
|
2250
2318
|
}
|
|
2251
|
-
OverlayKeyboardDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2252
|
-
OverlayKeyboardDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2253
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2319
|
+
OverlayKeyboardDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayKeyboardDispatcher, deps: [{ token: DOCUMENT }, { token: i0.NgZone, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2320
|
+
OverlayKeyboardDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayKeyboardDispatcher, providedIn: 'root' });
|
|
2321
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayKeyboardDispatcher, decorators: [{
|
|
2254
2322
|
type: Injectable,
|
|
2255
2323
|
args: [{ providedIn: 'root' }]
|
|
2256
2324
|
}], ctorParameters: function () {
|
|
2257
2325
|
return [{ type: undefined, decorators: [{
|
|
2258
2326
|
type: Inject,
|
|
2259
2327
|
args: [DOCUMENT]
|
|
2328
|
+
}] }, { type: i0.NgZone, decorators: [{
|
|
2329
|
+
type: Optional
|
|
2260
2330
|
}] }];
|
|
2261
2331
|
} });
|
|
2262
2332
|
|
|
@@ -2273,9 +2343,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
2273
2343
|
* on event target and order of overlay opens.
|
|
2274
2344
|
*/
|
|
2275
2345
|
class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
|
|
2276
|
-
constructor(document, _platform
|
|
2346
|
+
constructor(document, _platform,
|
|
2347
|
+
/** @breaking-change 14.0.0 _ngZone will be required. */
|
|
2348
|
+
_ngZone) {
|
|
2277
2349
|
super(document);
|
|
2278
2350
|
this._platform = _platform;
|
|
2351
|
+
this._ngZone = _ngZone;
|
|
2279
2352
|
this._cursorStyleIsSet = false;
|
|
2280
2353
|
/** Store pointerdown event target to track origin of click. */
|
|
2281
2354
|
this._pointerDownListener = (event) => {
|
|
@@ -2316,7 +2389,14 @@ class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
|
|
|
2316
2389
|
overlayRef.overlayElement.contains(origin)) {
|
|
2317
2390
|
break;
|
|
2318
2391
|
}
|
|
2319
|
-
overlayRef._outsidePointerEvents
|
|
2392
|
+
const outsidePointerEvents = overlayRef._outsidePointerEvents;
|
|
2393
|
+
/** @breaking-change 14.0.0 _ngZone will be required. */
|
|
2394
|
+
if (this._ngZone) {
|
|
2395
|
+
this._ngZone.run(() => outsidePointerEvents.next(event));
|
|
2396
|
+
}
|
|
2397
|
+
else {
|
|
2398
|
+
outsidePointerEvents.next(event);
|
|
2399
|
+
}
|
|
2320
2400
|
}
|
|
2321
2401
|
};
|
|
2322
2402
|
}
|
|
@@ -2331,10 +2411,13 @@ class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
|
|
|
2331
2411
|
// https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
|
|
2332
2412
|
if (!this._isAttached) {
|
|
2333
2413
|
const body = this._document.body;
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2414
|
+
/** @breaking-change 14.0.0 _ngZone will be required. */
|
|
2415
|
+
if (this._ngZone) {
|
|
2416
|
+
this._ngZone.runOutsideAngular(() => this._addEventListeners(body));
|
|
2417
|
+
}
|
|
2418
|
+
else {
|
|
2419
|
+
this._addEventListeners(body);
|
|
2420
|
+
}
|
|
2338
2421
|
// click event is not fired on iOS. To make element "clickable" we are
|
|
2339
2422
|
// setting the cursor to pointer
|
|
2340
2423
|
if (this._platform.IOS && !this._cursorStyleIsSet) {
|
|
@@ -2360,17 +2443,25 @@ class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
|
|
|
2360
2443
|
this._isAttached = false;
|
|
2361
2444
|
}
|
|
2362
2445
|
}
|
|
2446
|
+
_addEventListeners(body) {
|
|
2447
|
+
body.addEventListener('pointerdown', this._pointerDownListener, true);
|
|
2448
|
+
body.addEventListener('click', this._clickListener, true);
|
|
2449
|
+
body.addEventListener('auxclick', this._clickListener, true);
|
|
2450
|
+
body.addEventListener('contextmenu', this._clickListener, true);
|
|
2451
|
+
}
|
|
2363
2452
|
}
|
|
2364
|
-
OverlayOutsideClickDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2365
|
-
OverlayOutsideClickDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2366
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2453
|
+
OverlayOutsideClickDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayOutsideClickDispatcher, deps: [{ token: DOCUMENT }, { token: i1$1.Platform }, { token: i0.NgZone, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2454
|
+
OverlayOutsideClickDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayOutsideClickDispatcher, providedIn: 'root' });
|
|
2455
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayOutsideClickDispatcher, decorators: [{
|
|
2367
2456
|
type: Injectable,
|
|
2368
2457
|
args: [{ providedIn: 'root' }]
|
|
2369
2458
|
}], ctorParameters: function () {
|
|
2370
2459
|
return [{ type: undefined, decorators: [{
|
|
2371
2460
|
type: Inject,
|
|
2372
2461
|
args: [DOCUMENT]
|
|
2373
|
-
}] }, { type: i1$1.Platform }
|
|
2462
|
+
}] }, { type: i1$1.Platform }, { type: i0.NgZone, decorators: [{
|
|
2463
|
+
type: Optional
|
|
2464
|
+
}] }];
|
|
2374
2465
|
} });
|
|
2375
2466
|
|
|
2376
2467
|
/** Next overlay unique ID. */
|
|
@@ -2388,7 +2479,7 @@ let nextUniqueId = 0;
|
|
|
2388
2479
|
class Overlay {
|
|
2389
2480
|
constructor(
|
|
2390
2481
|
/** Scrolling strategies that can be used when creating an overlay. */
|
|
2391
|
-
scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality, _location, _outsideClickDispatcher) {
|
|
2482
|
+
scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality, _location, _outsideClickDispatcher, _animationsModuleType) {
|
|
2392
2483
|
this.scrollStrategies = scrollStrategies;
|
|
2393
2484
|
this._overlayContainer = _overlayContainer;
|
|
2394
2485
|
this._componentFactoryResolver = _componentFactoryResolver;
|
|
@@ -2400,6 +2491,7 @@ class Overlay {
|
|
|
2400
2491
|
this._directionality = _directionality;
|
|
2401
2492
|
this._location = _location;
|
|
2402
2493
|
this._outsideClickDispatcher = _outsideClickDispatcher;
|
|
2494
|
+
this._animationsModuleType = _animationsModuleType;
|
|
2403
2495
|
}
|
|
2404
2496
|
/**
|
|
2405
2497
|
* Creates an overlay.
|
|
@@ -2412,7 +2504,7 @@ class Overlay {
|
|
|
2412
2504
|
const portalOutlet = this._createPortalOutlet(pane);
|
|
2413
2505
|
const overlayConfig = new OverlayConfig(config);
|
|
2414
2506
|
overlayConfig.direction = overlayConfig.direction || this._directionality.value;
|
|
2415
|
-
return new OverlayRef(portalOutlet, host, pane, overlayConfig, this._ngZone, this._keyboardDispatcher, this._document, this._location, this._outsideClickDispatcher);
|
|
2507
|
+
return new OverlayRef(portalOutlet, host, pane, overlayConfig, this._ngZone, this._keyboardDispatcher, this._document, this._location, this._outsideClickDispatcher, this._animationsModuleType === 'NoopAnimations');
|
|
2416
2508
|
}
|
|
2417
2509
|
/**
|
|
2418
2510
|
* Gets a position builder that can be used, via fluent API,
|
|
@@ -2457,15 +2549,20 @@ class Overlay {
|
|
|
2457
2549
|
return new DomPortalOutlet(pane, this._componentFactoryResolver, this._appRef, this._injector, this._document);
|
|
2458
2550
|
}
|
|
2459
2551
|
}
|
|
2460
|
-
Overlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2461
|
-
Overlay.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2462
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2552
|
+
Overlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: Overlay, deps: [{ token: ScrollStrategyOptions }, { token: OverlayContainer }, { token: i0.ComponentFactoryResolver }, { token: OverlayPositionBuilder }, { token: OverlayKeyboardDispatcher }, { token: i0.Injector }, { token: i0.NgZone }, { token: DOCUMENT }, { token: i5.Directionality }, { token: i6.Location }, { token: OverlayOutsideClickDispatcher }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2553
|
+
Overlay.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: Overlay });
|
|
2554
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: Overlay, decorators: [{
|
|
2463
2555
|
type: Injectable
|
|
2464
2556
|
}], ctorParameters: function () {
|
|
2465
2557
|
return [{ type: ScrollStrategyOptions }, { type: OverlayContainer }, { type: i0.ComponentFactoryResolver }, { type: OverlayPositionBuilder }, { type: OverlayKeyboardDispatcher }, { type: i0.Injector }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
2466
2558
|
type: Inject,
|
|
2467
2559
|
args: [DOCUMENT]
|
|
2468
|
-
}] }, { type: i5.Directionality }, { type: i6.Location }, { type: OverlayOutsideClickDispatcher }
|
|
2560
|
+
}] }, { type: i5.Directionality }, { type: i6.Location }, { type: OverlayOutsideClickDispatcher }, { type: undefined, decorators: [{
|
|
2561
|
+
type: Inject,
|
|
2562
|
+
args: [ANIMATION_MODULE_TYPE]
|
|
2563
|
+
}, {
|
|
2564
|
+
type: Optional
|
|
2565
|
+
}] }];
|
|
2469
2566
|
} });
|
|
2470
2567
|
|
|
2471
2568
|
/** Default set of positions for the overlay. Follows the behavior of a dropdown. */
|
|
@@ -2508,9 +2605,9 @@ class CdkOverlayOrigin {
|
|
|
2508
2605
|
this.elementRef = elementRef;
|
|
2509
2606
|
}
|
|
2510
2607
|
}
|
|
2511
|
-
CdkOverlayOrigin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2512
|
-
CdkOverlayOrigin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
2513
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2608
|
+
CdkOverlayOrigin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: CdkOverlayOrigin, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2609
|
+
CdkOverlayOrigin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.9", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"], ngImport: i0 });
|
|
2610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: CdkOverlayOrigin, decorators: [{
|
|
2514
2611
|
type: Directive,
|
|
2515
2612
|
args: [{
|
|
2516
2613
|
selector: '[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]',
|
|
@@ -2775,9 +2872,9 @@ class CdkConnectedOverlay {
|
|
|
2775
2872
|
this._positionSubscription.unsubscribe();
|
|
2776
2873
|
}
|
|
2777
2874
|
}
|
|
2778
|
-
CdkConnectedOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2779
|
-
CdkConnectedOverlay.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
2780
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2875
|
+
CdkConnectedOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: CdkConnectedOverlay, deps: [{ token: Overlay }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY }, { token: i5.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2876
|
+
CdkConnectedOverlay.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.9", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: { origin: ["cdkConnectedOverlayOrigin", "origin"], positions: ["cdkConnectedOverlayPositions", "positions"], positionStrategy: ["cdkConnectedOverlayPositionStrategy", "positionStrategy"], offsetX: ["cdkConnectedOverlayOffsetX", "offsetX"], offsetY: ["cdkConnectedOverlayOffsetY", "offsetY"], width: ["cdkConnectedOverlayWidth", "width"], height: ["cdkConnectedOverlayHeight", "height"], minWidth: ["cdkConnectedOverlayMinWidth", "minWidth"], minHeight: ["cdkConnectedOverlayMinHeight", "minHeight"], backdropClass: ["cdkConnectedOverlayBackdropClass", "backdropClass"], panelClass: ["cdkConnectedOverlayPanelClass", "panelClass"], viewportMargin: ["cdkConnectedOverlayViewportMargin", "viewportMargin"], scrollStrategy: ["cdkConnectedOverlayScrollStrategy", "scrollStrategy"], open: ["cdkConnectedOverlayOpen", "open"], disableClose: ["cdkConnectedOverlayDisableClose", "disableClose"], transformOriginSelector: ["cdkConnectedOverlayTransformOriginOn", "transformOriginSelector"], hasBackdrop: ["cdkConnectedOverlayHasBackdrop", "hasBackdrop"], lockPosition: ["cdkConnectedOverlayLockPosition", "lockPosition"], flexibleDimensions: ["cdkConnectedOverlayFlexibleDimensions", "flexibleDimensions"], growAfterOpen: ["cdkConnectedOverlayGrowAfterOpen", "growAfterOpen"], push: ["cdkConnectedOverlayPush", "push"] }, outputs: { backdropClick: "backdropClick", positionChange: "positionChange", attach: "attach", detach: "detach", overlayKeydown: "overlayKeydown", overlayOutsideClick: "overlayOutsideClick" }, exportAs: ["cdkConnectedOverlay"], usesOnChanges: true, ngImport: i0 });
|
|
2877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: CdkConnectedOverlay, decorators: [{
|
|
2781
2878
|
type: Directive,
|
|
2782
2879
|
args: [{
|
|
2783
2880
|
selector: '[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]',
|
|
@@ -2886,10 +2983,10 @@ const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {
|
|
|
2886
2983
|
*/
|
|
2887
2984
|
class OverlayModule {
|
|
2888
2985
|
}
|
|
2889
|
-
OverlayModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2890
|
-
OverlayModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
2891
|
-
OverlayModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2892
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2986
|
+
OverlayModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2987
|
+
OverlayModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayModule, declarations: [CdkConnectedOverlay, CdkOverlayOrigin], imports: [BidiModule, PortalModule, ScrollingModule], exports: [CdkConnectedOverlay, CdkOverlayOrigin, ScrollingModule] });
|
|
2988
|
+
OverlayModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayModule, providers: [Overlay, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER], imports: [[BidiModule, PortalModule, ScrollingModule], ScrollingModule] });
|
|
2989
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayModule, decorators: [{
|
|
2893
2990
|
type: NgModule,
|
|
2894
2991
|
args: [{
|
|
2895
2992
|
imports: [BidiModule, PortalModule, ScrollingModule],
|
|
@@ -2985,9 +3082,9 @@ class FullscreenOverlayContainer extends OverlayContainer {
|
|
|
2985
3082
|
null);
|
|
2986
3083
|
}
|
|
2987
3084
|
}
|
|
2988
|
-
FullscreenOverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2989
|
-
FullscreenOverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2990
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3085
|
+
FullscreenOverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: FullscreenOverlayContainer, deps: [{ token: DOCUMENT }, { token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3086
|
+
FullscreenOverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: FullscreenOverlayContainer, providedIn: 'root' });
|
|
3087
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: FullscreenOverlayContainer, decorators: [{
|
|
2991
3088
|
type: Injectable,
|
|
2992
3089
|
args: [{ providedIn: 'root' }]
|
|
2993
3090
|
}], ctorParameters: function () {
|
|
@@ -3017,5 +3114,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
3017
3114
|
* Generated bundle index. Do not edit.
|
|
3018
3115
|
*/
|
|
3019
3116
|
|
|
3020
|
-
export { BlockScrollStrategy, CdkConnectedOverlay, CdkOverlayOrigin, CloseScrollStrategy, ConnectedOverlayPositionChange, ConnectionPositionPair, FlexibleConnectedPositionStrategy, FullscreenOverlayContainer, GlobalPositionStrategy, NoopScrollStrategy, Overlay, OverlayConfig, OverlayContainer, OverlayKeyboardDispatcher, OverlayModule, OverlayOutsideClickDispatcher, OverlayPositionBuilder, OverlayRef, RepositionScrollStrategy, ScrollStrategyOptions, ScrollingVisibility, validateHorizontalPosition, validateVerticalPosition };
|
|
3117
|
+
export { BlockScrollStrategy, CdkConnectedOverlay, CdkOverlayOrigin, CloseScrollStrategy, ConnectedOverlayPositionChange, ConnectionPositionPair, FlexibleConnectedPositionStrategy, FullscreenOverlayContainer, GlobalPositionStrategy, NoopScrollStrategy, Overlay, OverlayConfig, OverlayContainer, OverlayKeyboardDispatcher, OverlayModule, OverlayOutsideClickDispatcher, OverlayPositionBuilder, OverlayRef, RepositionScrollStrategy, STANDARD_DROPDOWN_ADJACENT_POSITIONS, STANDARD_DROPDOWN_BELOW_POSITIONS, ScrollStrategyOptions, ScrollingVisibility, validateHorizontalPosition, validateVerticalPosition };
|
|
3021
3118
|
//# sourceMappingURL=overlay.mjs.map
|