@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/fesm2020/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, Optional, ElementRef, 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, _getEventTarget, _isTestEnvironment } from '@angular/cdk/platform';
|
|
@@ -319,9 +319,9 @@ class ScrollStrategyOptions {
|
|
|
319
319
|
this._document = document;
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
-
ScrollStrategyOptions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
323
|
-
ScrollStrategyOptions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
324
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
322
|
+
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 });
|
|
323
|
+
ScrollStrategyOptions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: ScrollStrategyOptions, providedIn: 'root' });
|
|
324
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: ScrollStrategyOptions, decorators: [{
|
|
325
325
|
type: Injectable,
|
|
326
326
|
args: [{ providedIn: 'root' }]
|
|
327
327
|
}], ctorParameters: function () { return [{ type: i1.ScrollDispatcher }, { type: i1.ViewportRuler }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
@@ -508,9 +508,9 @@ class BaseOverlayDispatcher {
|
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
BaseOverlayDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
512
|
-
BaseOverlayDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
513
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
511
|
+
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 });
|
|
512
|
+
BaseOverlayDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: BaseOverlayDispatcher, providedIn: 'root' });
|
|
513
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: BaseOverlayDispatcher, decorators: [{
|
|
514
514
|
type: Injectable,
|
|
515
515
|
args: [{ providedIn: 'root' }]
|
|
516
516
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -531,8 +531,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
531
531
|
* on event target and order of overlay opens.
|
|
532
532
|
*/
|
|
533
533
|
class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
|
|
534
|
-
constructor(document
|
|
534
|
+
constructor(document,
|
|
535
|
+
/** @breaking-change 14.0.0 _ngZone will be required. */
|
|
536
|
+
_ngZone) {
|
|
535
537
|
super(document);
|
|
538
|
+
this._ngZone = _ngZone;
|
|
536
539
|
/** Keyboard event listener that will be attached to the body. */
|
|
537
540
|
this._keydownListener = (event) => {
|
|
538
541
|
const overlays = this._attachedOverlays;
|
|
@@ -544,7 +547,14 @@ class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
|
|
|
544
547
|
// because we don't want overlays that don't handle keyboard events to block the ones below
|
|
545
548
|
// them that do.
|
|
546
549
|
if (overlays[i]._keydownEvents.observers.length > 0) {
|
|
547
|
-
overlays[i]._keydownEvents
|
|
550
|
+
const keydownEvents = overlays[i]._keydownEvents;
|
|
551
|
+
/** @breaking-change 14.0.0 _ngZone will be required. */
|
|
552
|
+
if (this._ngZone) {
|
|
553
|
+
this._ngZone.run(() => keydownEvents.next(event));
|
|
554
|
+
}
|
|
555
|
+
else {
|
|
556
|
+
keydownEvents.next(event);
|
|
557
|
+
}
|
|
548
558
|
break;
|
|
549
559
|
}
|
|
550
560
|
}
|
|
@@ -555,7 +565,13 @@ class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
|
|
|
555
565
|
super.add(overlayRef);
|
|
556
566
|
// Lazily start dispatcher once first overlay is added
|
|
557
567
|
if (!this._isAttached) {
|
|
558
|
-
|
|
568
|
+
/** @breaking-change 14.0.0 _ngZone will be required. */
|
|
569
|
+
if (this._ngZone) {
|
|
570
|
+
this._ngZone.runOutsideAngular(() => this._document.body.addEventListener('keydown', this._keydownListener));
|
|
571
|
+
}
|
|
572
|
+
else {
|
|
573
|
+
this._document.body.addEventListener('keydown', this._keydownListener);
|
|
574
|
+
}
|
|
559
575
|
this._isAttached = true;
|
|
560
576
|
}
|
|
561
577
|
}
|
|
@@ -567,14 +583,16 @@ class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
|
|
|
567
583
|
}
|
|
568
584
|
}
|
|
569
585
|
}
|
|
570
|
-
OverlayKeyboardDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
571
|
-
OverlayKeyboardDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
572
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
586
|
+
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 });
|
|
587
|
+
OverlayKeyboardDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayKeyboardDispatcher, providedIn: 'root' });
|
|
588
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayKeyboardDispatcher, decorators: [{
|
|
573
589
|
type: Injectable,
|
|
574
590
|
args: [{ providedIn: 'root' }]
|
|
575
591
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
576
592
|
type: Inject,
|
|
577
593
|
args: [DOCUMENT]
|
|
594
|
+
}] }, { type: i0.NgZone, decorators: [{
|
|
595
|
+
type: Optional
|
|
578
596
|
}] }]; } });
|
|
579
597
|
|
|
580
598
|
/**
|
|
@@ -590,9 +608,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
590
608
|
* on event target and order of overlay opens.
|
|
591
609
|
*/
|
|
592
610
|
class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
|
|
593
|
-
constructor(document, _platform
|
|
611
|
+
constructor(document, _platform,
|
|
612
|
+
/** @breaking-change 14.0.0 _ngZone will be required. */
|
|
613
|
+
_ngZone) {
|
|
594
614
|
super(document);
|
|
595
615
|
this._platform = _platform;
|
|
616
|
+
this._ngZone = _ngZone;
|
|
596
617
|
this._cursorStyleIsSet = false;
|
|
597
618
|
/** Store pointerdown event target to track origin of click. */
|
|
598
619
|
this._pointerDownListener = (event) => {
|
|
@@ -633,7 +654,14 @@ class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
|
|
|
633
654
|
overlayRef.overlayElement.contains(origin)) {
|
|
634
655
|
break;
|
|
635
656
|
}
|
|
636
|
-
overlayRef._outsidePointerEvents
|
|
657
|
+
const outsidePointerEvents = overlayRef._outsidePointerEvents;
|
|
658
|
+
/** @breaking-change 14.0.0 _ngZone will be required. */
|
|
659
|
+
if (this._ngZone) {
|
|
660
|
+
this._ngZone.run(() => outsidePointerEvents.next(event));
|
|
661
|
+
}
|
|
662
|
+
else {
|
|
663
|
+
outsidePointerEvents.next(event);
|
|
664
|
+
}
|
|
637
665
|
}
|
|
638
666
|
};
|
|
639
667
|
}
|
|
@@ -648,10 +676,13 @@ class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
|
|
|
648
676
|
// https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
|
|
649
677
|
if (!this._isAttached) {
|
|
650
678
|
const body = this._document.body;
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
679
|
+
/** @breaking-change 14.0.0 _ngZone will be required. */
|
|
680
|
+
if (this._ngZone) {
|
|
681
|
+
this._ngZone.runOutsideAngular(() => this._addEventListeners(body));
|
|
682
|
+
}
|
|
683
|
+
else {
|
|
684
|
+
this._addEventListeners(body);
|
|
685
|
+
}
|
|
655
686
|
// click event is not fired on iOS. To make element "clickable" we are
|
|
656
687
|
// setting the cursor to pointer
|
|
657
688
|
if (this._platform.IOS && !this._cursorStyleIsSet) {
|
|
@@ -677,16 +708,24 @@ class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
|
|
|
677
708
|
this._isAttached = false;
|
|
678
709
|
}
|
|
679
710
|
}
|
|
711
|
+
_addEventListeners(body) {
|
|
712
|
+
body.addEventListener('pointerdown', this._pointerDownListener, true);
|
|
713
|
+
body.addEventListener('click', this._clickListener, true);
|
|
714
|
+
body.addEventListener('auxclick', this._clickListener, true);
|
|
715
|
+
body.addEventListener('contextmenu', this._clickListener, true);
|
|
716
|
+
}
|
|
680
717
|
}
|
|
681
|
-
OverlayOutsideClickDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
682
|
-
OverlayOutsideClickDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
683
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
718
|
+
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 });
|
|
719
|
+
OverlayOutsideClickDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayOutsideClickDispatcher, providedIn: 'root' });
|
|
720
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayOutsideClickDispatcher, decorators: [{
|
|
684
721
|
type: Injectable,
|
|
685
722
|
args: [{ providedIn: 'root' }]
|
|
686
723
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
687
724
|
type: Inject,
|
|
688
725
|
args: [DOCUMENT]
|
|
689
|
-
}] }, { type: i1$1.Platform }
|
|
726
|
+
}] }, { type: i1$1.Platform }, { type: i0.NgZone, decorators: [{
|
|
727
|
+
type: Optional
|
|
728
|
+
}] }]; } });
|
|
690
729
|
|
|
691
730
|
/**
|
|
692
731
|
* @license
|
|
@@ -754,9 +793,9 @@ class OverlayContainer {
|
|
|
754
793
|
this._containerElement = container;
|
|
755
794
|
}
|
|
756
795
|
}
|
|
757
|
-
OverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
758
|
-
OverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
759
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
796
|
+
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 });
|
|
797
|
+
OverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayContainer, providedIn: 'root' });
|
|
798
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayContainer, decorators: [{
|
|
760
799
|
type: Injectable,
|
|
761
800
|
args: [{ providedIn: 'root' }]
|
|
762
801
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -776,7 +815,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
776
815
|
* Used to manipulate or dispose of said overlay.
|
|
777
816
|
*/
|
|
778
817
|
class OverlayRef {
|
|
779
|
-
constructor(_portalOutlet, _host, _pane, _config, _ngZone, _keyboardDispatcher, _document, _location, _outsideClickDispatcher) {
|
|
818
|
+
constructor(_portalOutlet, _host, _pane, _config, _ngZone, _keyboardDispatcher, _document, _location, _outsideClickDispatcher, _animationsDisabled = false) {
|
|
780
819
|
this._portalOutlet = _portalOutlet;
|
|
781
820
|
this._host = _host;
|
|
782
821
|
this._pane = _pane;
|
|
@@ -786,12 +825,16 @@ class OverlayRef {
|
|
|
786
825
|
this._document = _document;
|
|
787
826
|
this._location = _location;
|
|
788
827
|
this._outsideClickDispatcher = _outsideClickDispatcher;
|
|
828
|
+
this._animationsDisabled = _animationsDisabled;
|
|
789
829
|
this._backdropElement = null;
|
|
790
830
|
this._backdropClick = new Subject();
|
|
791
831
|
this._attachments = new Subject();
|
|
792
832
|
this._detachments = new Subject();
|
|
793
833
|
this._locationChanges = Subscription.EMPTY;
|
|
794
834
|
this._backdropClickHandler = (event) => this._backdropClick.next(event);
|
|
835
|
+
this._backdropTransitionendHandler = (event) => {
|
|
836
|
+
this._disposeBackdrop(event.target);
|
|
837
|
+
};
|
|
795
838
|
/** Stream of keydown events dispatched to this overlay. */
|
|
796
839
|
this._keydownEvents = new Subject();
|
|
797
840
|
/** Stream of mouse outside events dispatched to this overlay. */
|
|
@@ -1039,6 +1082,9 @@ class OverlayRef {
|
|
|
1039
1082
|
const showingClass = 'cdk-overlay-backdrop-showing';
|
|
1040
1083
|
this._backdropElement = this._document.createElement('div');
|
|
1041
1084
|
this._backdropElement.classList.add('cdk-overlay-backdrop');
|
|
1085
|
+
if (this._animationsDisabled) {
|
|
1086
|
+
this._backdropElement.classList.add('cdk-overlay-backdrop-noop-animation');
|
|
1087
|
+
}
|
|
1042
1088
|
if (this._config.backdropClass) {
|
|
1043
1089
|
this._toggleClasses(this._backdropElement, this._config.backdropClass, true);
|
|
1044
1090
|
}
|
|
@@ -1049,7 +1095,7 @@ class OverlayRef {
|
|
|
1049
1095
|
// action desired when such a click occurs (usually closing the overlay).
|
|
1050
1096
|
this._backdropElement.addEventListener('click', this._backdropClickHandler);
|
|
1051
1097
|
// Add class to fade-in the backdrop after one frame.
|
|
1052
|
-
if (typeof requestAnimationFrame !== 'undefined') {
|
|
1098
|
+
if (!this._animationsDisabled && typeof requestAnimationFrame !== 'undefined') {
|
|
1053
1099
|
this._ngZone.runOutsideAngular(() => {
|
|
1054
1100
|
requestAnimationFrame(() => {
|
|
1055
1101
|
if (this._backdropElement) {
|
|
@@ -1080,22 +1126,13 @@ class OverlayRef {
|
|
|
1080
1126
|
if (!backdropToDetach) {
|
|
1081
1127
|
return;
|
|
1082
1128
|
}
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
backdropToDetach.removeEventListener('click', this._backdropClickHandler);
|
|
1088
|
-
backdropToDetach.removeEventListener('transitionend', finishDetach);
|
|
1089
|
-
this._disposeBackdrop(backdropToDetach);
|
|
1090
|
-
}
|
|
1091
|
-
if (this._config.backdropClass) {
|
|
1092
|
-
this._toggleClasses(backdropToDetach, this._config.backdropClass, false);
|
|
1093
|
-
}
|
|
1094
|
-
clearTimeout(timeoutId);
|
|
1095
|
-
};
|
|
1129
|
+
if (this._animationsDisabled) {
|
|
1130
|
+
this._disposeBackdrop(backdropToDetach);
|
|
1131
|
+
return;
|
|
1132
|
+
}
|
|
1096
1133
|
backdropToDetach.classList.remove('cdk-overlay-backdrop-showing');
|
|
1097
1134
|
this._ngZone.runOutsideAngular(() => {
|
|
1098
|
-
backdropToDetach.addEventListener('transitionend',
|
|
1135
|
+
backdropToDetach.addEventListener('transitionend', this._backdropTransitionendHandler);
|
|
1099
1136
|
});
|
|
1100
1137
|
// If the backdrop doesn't have a transition, the `transitionend` event won't fire.
|
|
1101
1138
|
// In this case we make it unclickable and we try to remove it after a delay.
|
|
@@ -1103,7 +1140,9 @@ class OverlayRef {
|
|
|
1103
1140
|
// Run this outside the Angular zone because there's nothing that Angular cares about.
|
|
1104
1141
|
// If it were to run inside the Angular zone, every test that used Overlay would have to be
|
|
1105
1142
|
// either async or fakeAsync.
|
|
1106
|
-
|
|
1143
|
+
this._backdropTimeout = this._ngZone.runOutsideAngular(() => setTimeout(() => {
|
|
1144
|
+
this._disposeBackdrop(backdropToDetach);
|
|
1145
|
+
}, 500));
|
|
1107
1146
|
}
|
|
1108
1147
|
/** Toggles a single CSS class or an array of classes on an element. */
|
|
1109
1148
|
_toggleClasses(element, cssClasses, isAdd) {
|
|
@@ -1152,6 +1191,8 @@ class OverlayRef {
|
|
|
1152
1191
|
/** Removes a backdrop element from the DOM. */
|
|
1153
1192
|
_disposeBackdrop(backdrop) {
|
|
1154
1193
|
if (backdrop) {
|
|
1194
|
+
backdrop.removeEventListener('click', this._backdropClickHandler);
|
|
1195
|
+
backdrop.removeEventListener('transitionend', this._backdropTransitionendHandler);
|
|
1155
1196
|
backdrop.remove();
|
|
1156
1197
|
// It is possible that a new portal has been attached to this overlay since we started
|
|
1157
1198
|
// removing the backdrop. If that is the case, only clear the backdrop reference if it
|
|
@@ -1160,6 +1201,10 @@ class OverlayRef {
|
|
|
1160
1201
|
this._backdropElement = null;
|
|
1161
1202
|
}
|
|
1162
1203
|
}
|
|
1204
|
+
if (this._backdropTimeout) {
|
|
1205
|
+
clearTimeout(this._backdropTimeout);
|
|
1206
|
+
this._backdropTimeout = undefined;
|
|
1207
|
+
}
|
|
1163
1208
|
}
|
|
1164
1209
|
}
|
|
1165
1210
|
|
|
@@ -2130,6 +2175,18 @@ function getRoundedBoundingClientRect(clientRect) {
|
|
|
2130
2175
|
height: Math.floor(clientRect.height),
|
|
2131
2176
|
};
|
|
2132
2177
|
}
|
|
2178
|
+
const STANDARD_DROPDOWN_BELOW_POSITIONS = [
|
|
2179
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
2180
|
+
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
|
|
2181
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },
|
|
2182
|
+
{ originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' },
|
|
2183
|
+
];
|
|
2184
|
+
const STANDARD_DROPDOWN_ADJACENT_POSITIONS = [
|
|
2185
|
+
{ originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top' },
|
|
2186
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom' },
|
|
2187
|
+
{ originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top' },
|
|
2188
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom' },
|
|
2189
|
+
];
|
|
2133
2190
|
|
|
2134
2191
|
/**
|
|
2135
2192
|
* @license
|
|
@@ -2151,12 +2208,12 @@ class GlobalPositionStrategy {
|
|
|
2151
2208
|
this._cssPosition = 'static';
|
|
2152
2209
|
this._topOffset = '';
|
|
2153
2210
|
this._bottomOffset = '';
|
|
2154
|
-
this._leftOffset = '';
|
|
2155
|
-
this._rightOffset = '';
|
|
2156
2211
|
this._alignItems = '';
|
|
2157
|
-
this.
|
|
2212
|
+
this._xPosition = '';
|
|
2213
|
+
this._xOffset = '';
|
|
2158
2214
|
this._width = '';
|
|
2159
2215
|
this._height = '';
|
|
2216
|
+
this._isDisposed = false;
|
|
2160
2217
|
}
|
|
2161
2218
|
attach(overlayRef) {
|
|
2162
2219
|
const config = overlayRef.getConfig();
|
|
@@ -2185,9 +2242,8 @@ class GlobalPositionStrategy {
|
|
|
2185
2242
|
* @param value New left offset.
|
|
2186
2243
|
*/
|
|
2187
2244
|
left(value = '') {
|
|
2188
|
-
this.
|
|
2189
|
-
this.
|
|
2190
|
-
this._justifyContent = 'flex-start';
|
|
2245
|
+
this._xOffset = value;
|
|
2246
|
+
this._xPosition = 'left';
|
|
2191
2247
|
return this;
|
|
2192
2248
|
}
|
|
2193
2249
|
/**
|
|
@@ -2205,9 +2261,28 @@ class GlobalPositionStrategy {
|
|
|
2205
2261
|
* @param value New right offset.
|
|
2206
2262
|
*/
|
|
2207
2263
|
right(value = '') {
|
|
2208
|
-
this.
|
|
2209
|
-
this.
|
|
2210
|
-
this
|
|
2264
|
+
this._xOffset = value;
|
|
2265
|
+
this._xPosition = 'right';
|
|
2266
|
+
return this;
|
|
2267
|
+
}
|
|
2268
|
+
/**
|
|
2269
|
+
* Sets the overlay to the start of the viewport, depending on the overlay direction.
|
|
2270
|
+
* This will be to the left in LTR layouts and to the right in RTL.
|
|
2271
|
+
* @param offset Offset from the edge of the screen.
|
|
2272
|
+
*/
|
|
2273
|
+
start(value = '') {
|
|
2274
|
+
this._xOffset = value;
|
|
2275
|
+
this._xPosition = 'start';
|
|
2276
|
+
return this;
|
|
2277
|
+
}
|
|
2278
|
+
/**
|
|
2279
|
+
* Sets the overlay to the end of the viewport, depending on the overlay direction.
|
|
2280
|
+
* This will be to the right in LTR layouts and to the left in RTL.
|
|
2281
|
+
* @param offset Offset from the edge of the screen.
|
|
2282
|
+
*/
|
|
2283
|
+
end(value = '') {
|
|
2284
|
+
this._xOffset = value;
|
|
2285
|
+
this._xPosition = 'end';
|
|
2211
2286
|
return this;
|
|
2212
2287
|
}
|
|
2213
2288
|
/**
|
|
@@ -2248,7 +2323,7 @@ class GlobalPositionStrategy {
|
|
|
2248
2323
|
*/
|
|
2249
2324
|
centerHorizontally(offset = '') {
|
|
2250
2325
|
this.left(offset);
|
|
2251
|
-
this.
|
|
2326
|
+
this._xPosition = 'center';
|
|
2252
2327
|
return this;
|
|
2253
2328
|
}
|
|
2254
2329
|
/**
|
|
@@ -2281,32 +2356,48 @@ class GlobalPositionStrategy {
|
|
|
2281
2356
|
(!maxWidth || maxWidth === '100%' || maxWidth === '100vw');
|
|
2282
2357
|
const shouldBeFlushVertically = (height === '100%' || height === '100vh') &&
|
|
2283
2358
|
(!maxHeight || maxHeight === '100%' || maxHeight === '100vh');
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2359
|
+
const xPosition = this._xPosition;
|
|
2360
|
+
const xOffset = this._xOffset;
|
|
2361
|
+
const isRtl = this._overlayRef.getConfig().direction === 'rtl';
|
|
2362
|
+
let marginLeft = '';
|
|
2363
|
+
let marginRight = '';
|
|
2364
|
+
let justifyContent = '';
|
|
2289
2365
|
if (shouldBeFlushHorizontally) {
|
|
2290
|
-
|
|
2291
|
-
}
|
|
2292
|
-
else if (
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
// In RTL the browser will invert `flex-start` and `flex-end` automatically, but we
|
|
2297
|
-
// don't want that because our positioning is explicitly `left` and `right`, hence
|
|
2298
|
-
// why we do another inversion to ensure that the overlay stays in the same position.
|
|
2299
|
-
// TODO: reconsider this if we add `start` and `end` methods.
|
|
2300
|
-
if (this._justifyContent === 'flex-start') {
|
|
2301
|
-
parentStyles.justifyContent = 'flex-end';
|
|
2366
|
+
justifyContent = 'flex-start';
|
|
2367
|
+
}
|
|
2368
|
+
else if (xPosition === 'center') {
|
|
2369
|
+
justifyContent = 'center';
|
|
2370
|
+
if (isRtl) {
|
|
2371
|
+
marginRight = xOffset;
|
|
2302
2372
|
}
|
|
2303
|
-
else
|
|
2304
|
-
|
|
2373
|
+
else {
|
|
2374
|
+
marginLeft = xOffset;
|
|
2305
2375
|
}
|
|
2306
2376
|
}
|
|
2307
|
-
else {
|
|
2308
|
-
|
|
2377
|
+
else if (isRtl) {
|
|
2378
|
+
if (xPosition === 'left' || xPosition === 'end') {
|
|
2379
|
+
justifyContent = 'flex-end';
|
|
2380
|
+
marginLeft = xOffset;
|
|
2381
|
+
}
|
|
2382
|
+
else if (xPosition === 'right' || xPosition === 'start') {
|
|
2383
|
+
justifyContent = 'flex-start';
|
|
2384
|
+
marginRight = xOffset;
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
else if (xPosition === 'left' || xPosition === 'start') {
|
|
2388
|
+
justifyContent = 'flex-start';
|
|
2389
|
+
marginLeft = xOffset;
|
|
2390
|
+
}
|
|
2391
|
+
else if (xPosition === 'right' || xPosition === 'end') {
|
|
2392
|
+
justifyContent = 'flex-end';
|
|
2393
|
+
marginRight = xOffset;
|
|
2309
2394
|
}
|
|
2395
|
+
styles.position = this._cssPosition;
|
|
2396
|
+
styles.marginLeft = shouldBeFlushHorizontally ? '0' : marginLeft;
|
|
2397
|
+
styles.marginTop = shouldBeFlushVertically ? '0' : this._topOffset;
|
|
2398
|
+
styles.marginBottom = this._bottomOffset;
|
|
2399
|
+
styles.marginRight = shouldBeFlushHorizontally ? '0' : marginRight;
|
|
2400
|
+
parentStyles.justifyContent = justifyContent;
|
|
2310
2401
|
parentStyles.alignItems = shouldBeFlushVertically ? 'flex-start' : this._alignItems;
|
|
2311
2402
|
}
|
|
2312
2403
|
/**
|
|
@@ -2363,9 +2454,9 @@ class OverlayPositionBuilder {
|
|
|
2363
2454
|
return new FlexibleConnectedPositionStrategy(origin, this._viewportRuler, this._document, this._platform, this._overlayContainer);
|
|
2364
2455
|
}
|
|
2365
2456
|
}
|
|
2366
|
-
OverlayPositionBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2367
|
-
OverlayPositionBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2368
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2457
|
+
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 });
|
|
2458
|
+
OverlayPositionBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayPositionBuilder, providedIn: 'root' });
|
|
2459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayPositionBuilder, decorators: [{
|
|
2369
2460
|
type: Injectable,
|
|
2370
2461
|
args: [{ providedIn: 'root' }]
|
|
2371
2462
|
}], ctorParameters: function () { return [{ type: i1.ViewportRuler }, { type: undefined, decorators: [{
|
|
@@ -2395,7 +2486,7 @@ let nextUniqueId = 0;
|
|
|
2395
2486
|
class Overlay {
|
|
2396
2487
|
constructor(
|
|
2397
2488
|
/** Scrolling strategies that can be used when creating an overlay. */
|
|
2398
|
-
scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality, _location, _outsideClickDispatcher) {
|
|
2489
|
+
scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality, _location, _outsideClickDispatcher, _animationsModuleType) {
|
|
2399
2490
|
this.scrollStrategies = scrollStrategies;
|
|
2400
2491
|
this._overlayContainer = _overlayContainer;
|
|
2401
2492
|
this._componentFactoryResolver = _componentFactoryResolver;
|
|
@@ -2407,6 +2498,7 @@ class Overlay {
|
|
|
2407
2498
|
this._directionality = _directionality;
|
|
2408
2499
|
this._location = _location;
|
|
2409
2500
|
this._outsideClickDispatcher = _outsideClickDispatcher;
|
|
2501
|
+
this._animationsModuleType = _animationsModuleType;
|
|
2410
2502
|
}
|
|
2411
2503
|
/**
|
|
2412
2504
|
* Creates an overlay.
|
|
@@ -2419,7 +2511,7 @@ class Overlay {
|
|
|
2419
2511
|
const portalOutlet = this._createPortalOutlet(pane);
|
|
2420
2512
|
const overlayConfig = new OverlayConfig(config);
|
|
2421
2513
|
overlayConfig.direction = overlayConfig.direction || this._directionality.value;
|
|
2422
|
-
return new OverlayRef(portalOutlet, host, pane, overlayConfig, this._ngZone, this._keyboardDispatcher, this._document, this._location, this._outsideClickDispatcher);
|
|
2514
|
+
return new OverlayRef(portalOutlet, host, pane, overlayConfig, this._ngZone, this._keyboardDispatcher, this._document, this._location, this._outsideClickDispatcher, this._animationsModuleType === 'NoopAnimations');
|
|
2423
2515
|
}
|
|
2424
2516
|
/**
|
|
2425
2517
|
* Gets a position builder that can be used, via fluent API,
|
|
@@ -2464,14 +2556,19 @@ class Overlay {
|
|
|
2464
2556
|
return new DomPortalOutlet(pane, this._componentFactoryResolver, this._appRef, this._injector, this._document);
|
|
2465
2557
|
}
|
|
2466
2558
|
}
|
|
2467
|
-
Overlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2468
|
-
Overlay.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2559
|
+
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 });
|
|
2560
|
+
Overlay.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: Overlay });
|
|
2561
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: Overlay, decorators: [{
|
|
2470
2562
|
type: Injectable
|
|
2471
2563
|
}], ctorParameters: function () { return [{ type: ScrollStrategyOptions }, { type: OverlayContainer }, { type: i0.ComponentFactoryResolver }, { type: OverlayPositionBuilder }, { type: OverlayKeyboardDispatcher }, { type: i0.Injector }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
2472
2564
|
type: Inject,
|
|
2473
2565
|
args: [DOCUMENT]
|
|
2474
|
-
}] }, { type: i5.Directionality }, { type: i6.Location }, { type: OverlayOutsideClickDispatcher }
|
|
2566
|
+
}] }, { type: i5.Directionality }, { type: i6.Location }, { type: OverlayOutsideClickDispatcher }, { type: undefined, decorators: [{
|
|
2567
|
+
type: Inject,
|
|
2568
|
+
args: [ANIMATION_MODULE_TYPE]
|
|
2569
|
+
}, {
|
|
2570
|
+
type: Optional
|
|
2571
|
+
}] }]; } });
|
|
2475
2572
|
|
|
2476
2573
|
/**
|
|
2477
2574
|
* @license
|
|
@@ -2520,9 +2617,9 @@ class CdkOverlayOrigin {
|
|
|
2520
2617
|
this.elementRef = elementRef;
|
|
2521
2618
|
}
|
|
2522
2619
|
}
|
|
2523
|
-
CdkOverlayOrigin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2524
|
-
CdkOverlayOrigin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
2525
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2620
|
+
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 });
|
|
2621
|
+
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 });
|
|
2622
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: CdkOverlayOrigin, decorators: [{
|
|
2526
2623
|
type: Directive,
|
|
2527
2624
|
args: [{
|
|
2528
2625
|
selector: '[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]',
|
|
@@ -2787,9 +2884,9 @@ class CdkConnectedOverlay {
|
|
|
2787
2884
|
this._positionSubscription.unsubscribe();
|
|
2788
2885
|
}
|
|
2789
2886
|
}
|
|
2790
|
-
CdkConnectedOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2791
|
-
CdkConnectedOverlay.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
2792
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2887
|
+
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 });
|
|
2888
|
+
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 });
|
|
2889
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: CdkConnectedOverlay, decorators: [{
|
|
2793
2890
|
type: Directive,
|
|
2794
2891
|
args: [{
|
|
2795
2892
|
selector: '[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]',
|
|
@@ -2896,10 +2993,10 @@ const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {
|
|
|
2896
2993
|
*/
|
|
2897
2994
|
class OverlayModule {
|
|
2898
2995
|
}
|
|
2899
|
-
OverlayModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2900
|
-
OverlayModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
2901
|
-
OverlayModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2902
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2996
|
+
OverlayModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2997
|
+
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] });
|
|
2998
|
+
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] });
|
|
2999
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: OverlayModule, decorators: [{
|
|
2903
3000
|
type: NgModule,
|
|
2904
3001
|
args: [{
|
|
2905
3002
|
imports: [BidiModule, PortalModule, ScrollingModule],
|
|
@@ -2995,9 +3092,9 @@ class FullscreenOverlayContainer extends OverlayContainer {
|
|
|
2995
3092
|
null);
|
|
2996
3093
|
}
|
|
2997
3094
|
}
|
|
2998
|
-
FullscreenOverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2999
|
-
FullscreenOverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3000
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3095
|
+
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 });
|
|
3096
|
+
FullscreenOverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: FullscreenOverlayContainer, providedIn: 'root' });
|
|
3097
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: FullscreenOverlayContainer, decorators: [{
|
|
3001
3098
|
type: Injectable,
|
|
3002
3099
|
args: [{ providedIn: 'root' }]
|
|
3003
3100
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -3025,5 +3122,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
3025
3122
|
* Generated bundle index. Do not edit.
|
|
3026
3123
|
*/
|
|
3027
3124
|
|
|
3028
|
-
export { BlockScrollStrategy, CdkConnectedOverlay, CdkOverlayOrigin, CloseScrollStrategy, ConnectedOverlayPositionChange, ConnectionPositionPair, FlexibleConnectedPositionStrategy, FullscreenOverlayContainer, GlobalPositionStrategy, NoopScrollStrategy, Overlay, OverlayConfig, OverlayContainer, OverlayKeyboardDispatcher, OverlayModule, OverlayOutsideClickDispatcher, OverlayPositionBuilder, OverlayRef, RepositionScrollStrategy, ScrollStrategyOptions, ScrollingVisibility, validateHorizontalPosition, validateVerticalPosition };
|
|
3125
|
+
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 };
|
|
3029
3126
|
//# sourceMappingURL=overlay.mjs.map
|