@angular/cdk 14.0.0-next.0 → 14.0.0-next.11
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/aria-describer/aria-describer.d.ts +33 -6
- 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 +75 -52
- 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 +21 -3
- 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 +29 -5
- 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 +146 -118
- 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 +202 -99
- package/fesm2015/overlay.mjs.map +1 -1
- package/fesm2015/platform.mjs +7 -7
- package/fesm2015/platform.mjs.map +1 -1
- package/fesm2015/portal.mjs +58 -24
- 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 +142 -116
- 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 +202 -99
- package/fesm2020/overlay.mjs.map +1 -1
- package/fesm2020/platform.mjs +7 -7
- package/fesm2020/platform.mjs.map +1 -1
- package/fesm2020/portal.mjs +58 -24
- 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 -11
- 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/html-manipulation.js +3 -1
- package/schematics/utils/html-manipulation.mjs +3 -1
- 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/table.d.ts +2 -6
- 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/{protractor/index.d.ts → test-element-errors.d.ts} +5 -1
- 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/esm2020/testing/protractor/index.mjs +0 -9
- package/esm2020/testing/protractor/protractor-element.mjs +0 -234
- package/esm2020/testing/protractor/protractor-harness-environment.mjs +0 -72
- package/esm2020/testing/protractor/public-api.mjs +0 -10
- package/fesm2015/testing/protractor.mjs +0 -355
- package/fesm2015/testing/protractor.mjs.map +0 -1
- package/fesm2020/testing/protractor.mjs +0 -322
- package/fesm2020/testing/protractor.mjs.map +0 -1
- package/testing/protractor/package.json +0 -9
- package/testing/protractor/protractor-element.d.ts +0 -90
- package/testing/protractor/protractor-harness-environment.d.ts +0 -50
- package/testing/protractor/public-api.d.ts +0 -9
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.13", 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.13", ngImport: i0, type: ScrollStrategyOptions, providedIn: 'root' });
|
|
324
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.13", 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.13", 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.13", ngImport: i0, type: BaseOverlayDispatcher, providedIn: 'root' });
|
|
513
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.13", 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-rc.1", ng
|
|
|
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.13", 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.13", ngImport: i0, type: OverlayKeyboardDispatcher, providedIn: 'root' });
|
|
588
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.13", 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-rc.1", ng
|
|
|
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.13", 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.13", ngImport: i0, type: OverlayOutsideClickDispatcher, providedIn: 'root' });
|
|
720
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.13", 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.13", 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.13", ngImport: i0, type: OverlayContainer, providedIn: 'root' });
|
|
798
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.13", 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-rc.1", ng
|
|
|
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
|
|
|
@@ -1400,15 +1445,21 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1400
1445
|
* allows one to re-align the panel without changing the orientation of the panel.
|
|
1401
1446
|
*/
|
|
1402
1447
|
reapplyLastPosition() {
|
|
1403
|
-
if (
|
|
1448
|
+
if (this._isDisposed || !this._platform.isBrowser) {
|
|
1449
|
+
return;
|
|
1450
|
+
}
|
|
1451
|
+
const lastPosition = this._lastPosition;
|
|
1452
|
+
if (lastPosition) {
|
|
1404
1453
|
this._originRect = this._getOriginRect();
|
|
1405
1454
|
this._overlayRect = this._pane.getBoundingClientRect();
|
|
1406
1455
|
this._viewportRect = this._getNarrowedViewportRect();
|
|
1407
1456
|
this._containerRect = this._overlayContainer.getContainerElement().getBoundingClientRect();
|
|
1408
|
-
const lastPosition = this._lastPosition || this._preferredPositions[0];
|
|
1409
1457
|
const originPoint = this._getOriginPoint(this._originRect, this._containerRect, lastPosition);
|
|
1410
1458
|
this._applyPosition(lastPosition, originPoint);
|
|
1411
1459
|
}
|
|
1460
|
+
else {
|
|
1461
|
+
this.apply();
|
|
1462
|
+
}
|
|
1412
1463
|
}
|
|
1413
1464
|
/**
|
|
1414
1465
|
* Sets the list of Scrollable containers that host the origin element so that
|
|
@@ -2124,6 +2175,18 @@ function getRoundedBoundingClientRect(clientRect) {
|
|
|
2124
2175
|
height: Math.floor(clientRect.height),
|
|
2125
2176
|
};
|
|
2126
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
|
+
];
|
|
2127
2190
|
|
|
2128
2191
|
/**
|
|
2129
2192
|
* @license
|
|
@@ -2145,12 +2208,12 @@ class GlobalPositionStrategy {
|
|
|
2145
2208
|
this._cssPosition = 'static';
|
|
2146
2209
|
this._topOffset = '';
|
|
2147
2210
|
this._bottomOffset = '';
|
|
2148
|
-
this._leftOffset = '';
|
|
2149
|
-
this._rightOffset = '';
|
|
2150
2211
|
this._alignItems = '';
|
|
2151
|
-
this.
|
|
2212
|
+
this._xPosition = '';
|
|
2213
|
+
this._xOffset = '';
|
|
2152
2214
|
this._width = '';
|
|
2153
2215
|
this._height = '';
|
|
2216
|
+
this._isDisposed = false;
|
|
2154
2217
|
}
|
|
2155
2218
|
attach(overlayRef) {
|
|
2156
2219
|
const config = overlayRef.getConfig();
|
|
@@ -2179,9 +2242,8 @@ class GlobalPositionStrategy {
|
|
|
2179
2242
|
* @param value New left offset.
|
|
2180
2243
|
*/
|
|
2181
2244
|
left(value = '') {
|
|
2182
|
-
this.
|
|
2183
|
-
this.
|
|
2184
|
-
this._justifyContent = 'flex-start';
|
|
2245
|
+
this._xOffset = value;
|
|
2246
|
+
this._xPosition = 'left';
|
|
2185
2247
|
return this;
|
|
2186
2248
|
}
|
|
2187
2249
|
/**
|
|
@@ -2199,9 +2261,28 @@ class GlobalPositionStrategy {
|
|
|
2199
2261
|
* @param value New right offset.
|
|
2200
2262
|
*/
|
|
2201
2263
|
right(value = '') {
|
|
2202
|
-
this.
|
|
2203
|
-
this.
|
|
2204
|
-
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';
|
|
2205
2286
|
return this;
|
|
2206
2287
|
}
|
|
2207
2288
|
/**
|
|
@@ -2242,7 +2323,7 @@ class GlobalPositionStrategy {
|
|
|
2242
2323
|
*/
|
|
2243
2324
|
centerHorizontally(offset = '') {
|
|
2244
2325
|
this.left(offset);
|
|
2245
|
-
this.
|
|
2326
|
+
this._xPosition = 'center';
|
|
2246
2327
|
return this;
|
|
2247
2328
|
}
|
|
2248
2329
|
/**
|
|
@@ -2275,32 +2356,48 @@ class GlobalPositionStrategy {
|
|
|
2275
2356
|
(!maxWidth || maxWidth === '100%' || maxWidth === '100vw');
|
|
2276
2357
|
const shouldBeFlushVertically = (height === '100%' || height === '100vh') &&
|
|
2277
2358
|
(!maxHeight || maxHeight === '100%' || maxHeight === '100vh');
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
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 = '';
|
|
2283
2365
|
if (shouldBeFlushHorizontally) {
|
|
2284
|
-
|
|
2285
|
-
}
|
|
2286
|
-
else if (
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2366
|
+
justifyContent = 'flex-start';
|
|
2367
|
+
}
|
|
2368
|
+
else if (xPosition === 'center') {
|
|
2369
|
+
justifyContent = 'center';
|
|
2370
|
+
if (isRtl) {
|
|
2371
|
+
marginRight = xOffset;
|
|
2372
|
+
}
|
|
2373
|
+
else {
|
|
2374
|
+
marginLeft = xOffset;
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
else if (isRtl) {
|
|
2378
|
+
if (xPosition === 'left' || xPosition === 'end') {
|
|
2379
|
+
justifyContent = 'flex-end';
|
|
2380
|
+
marginLeft = xOffset;
|
|
2296
2381
|
}
|
|
2297
|
-
else if (
|
|
2298
|
-
|
|
2382
|
+
else if (xPosition === 'right' || xPosition === 'start') {
|
|
2383
|
+
justifyContent = 'flex-start';
|
|
2384
|
+
marginRight = xOffset;
|
|
2299
2385
|
}
|
|
2300
2386
|
}
|
|
2301
|
-
else {
|
|
2302
|
-
|
|
2387
|
+
else if (xPosition === 'left' || xPosition === 'start') {
|
|
2388
|
+
justifyContent = 'flex-start';
|
|
2389
|
+
marginLeft = xOffset;
|
|
2303
2390
|
}
|
|
2391
|
+
else if (xPosition === 'right' || xPosition === 'end') {
|
|
2392
|
+
justifyContent = 'flex-end';
|
|
2393
|
+
marginRight = xOffset;
|
|
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;
|
|
2304
2401
|
parentStyles.alignItems = shouldBeFlushVertically ? 'flex-start' : this._alignItems;
|
|
2305
2402
|
}
|
|
2306
2403
|
/**
|
|
@@ -2357,9 +2454,9 @@ class OverlayPositionBuilder {
|
|
|
2357
2454
|
return new FlexibleConnectedPositionStrategy(origin, this._viewportRuler, this._document, this._platform, this._overlayContainer);
|
|
2358
2455
|
}
|
|
2359
2456
|
}
|
|
2360
|
-
OverlayPositionBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2361
|
-
OverlayPositionBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2362
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2457
|
+
OverlayPositionBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.13", 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.13", ngImport: i0, type: OverlayPositionBuilder, providedIn: 'root' });
|
|
2459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.13", ngImport: i0, type: OverlayPositionBuilder, decorators: [{
|
|
2363
2460
|
type: Injectable,
|
|
2364
2461
|
args: [{ providedIn: 'root' }]
|
|
2365
2462
|
}], ctorParameters: function () { return [{ type: i1.ViewportRuler }, { type: undefined, decorators: [{
|
|
@@ -2389,7 +2486,7 @@ let nextUniqueId = 0;
|
|
|
2389
2486
|
class Overlay {
|
|
2390
2487
|
constructor(
|
|
2391
2488
|
/** Scrolling strategies that can be used when creating an overlay. */
|
|
2392
|
-
scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality, _location, _outsideClickDispatcher) {
|
|
2489
|
+
scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality, _location, _outsideClickDispatcher, _animationsModuleType) {
|
|
2393
2490
|
this.scrollStrategies = scrollStrategies;
|
|
2394
2491
|
this._overlayContainer = _overlayContainer;
|
|
2395
2492
|
this._componentFactoryResolver = _componentFactoryResolver;
|
|
@@ -2401,6 +2498,7 @@ class Overlay {
|
|
|
2401
2498
|
this._directionality = _directionality;
|
|
2402
2499
|
this._location = _location;
|
|
2403
2500
|
this._outsideClickDispatcher = _outsideClickDispatcher;
|
|
2501
|
+
this._animationsModuleType = _animationsModuleType;
|
|
2404
2502
|
}
|
|
2405
2503
|
/**
|
|
2406
2504
|
* Creates an overlay.
|
|
@@ -2413,7 +2511,7 @@ class Overlay {
|
|
|
2413
2511
|
const portalOutlet = this._createPortalOutlet(pane);
|
|
2414
2512
|
const overlayConfig = new OverlayConfig(config);
|
|
2415
2513
|
overlayConfig.direction = overlayConfig.direction || this._directionality.value;
|
|
2416
|
-
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');
|
|
2417
2515
|
}
|
|
2418
2516
|
/**
|
|
2419
2517
|
* Gets a position builder that can be used, via fluent API,
|
|
@@ -2458,14 +2556,19 @@ class Overlay {
|
|
|
2458
2556
|
return new DomPortalOutlet(pane, this._componentFactoryResolver, this._appRef, this._injector, this._document);
|
|
2459
2557
|
}
|
|
2460
2558
|
}
|
|
2461
|
-
Overlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2462
|
-
Overlay.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2463
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2559
|
+
Overlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.13", 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.13", ngImport: i0, type: Overlay });
|
|
2561
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.13", ngImport: i0, type: Overlay, decorators: [{
|
|
2464
2562
|
type: Injectable
|
|
2465
2563
|
}], ctorParameters: function () { return [{ type: ScrollStrategyOptions }, { type: OverlayContainer }, { type: i0.ComponentFactoryResolver }, { type: OverlayPositionBuilder }, { type: OverlayKeyboardDispatcher }, { type: i0.Injector }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
2466
2564
|
type: Inject,
|
|
2467
2565
|
args: [DOCUMENT]
|
|
2468
|
-
}] }, { 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
|
+
}] }]; } });
|
|
2469
2572
|
|
|
2470
2573
|
/**
|
|
2471
2574
|
* @license
|
|
@@ -2514,9 +2617,9 @@ class CdkOverlayOrigin {
|
|
|
2514
2617
|
this.elementRef = elementRef;
|
|
2515
2618
|
}
|
|
2516
2619
|
}
|
|
2517
|
-
CdkOverlayOrigin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2518
|
-
CdkOverlayOrigin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
2519
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2620
|
+
CdkOverlayOrigin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.13", 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.13", 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.13", ngImport: i0, type: CdkOverlayOrigin, decorators: [{
|
|
2520
2623
|
type: Directive,
|
|
2521
2624
|
args: [{
|
|
2522
2625
|
selector: '[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]',
|
|
@@ -2781,9 +2884,9 @@ class CdkConnectedOverlay {
|
|
|
2781
2884
|
this._positionSubscription.unsubscribe();
|
|
2782
2885
|
}
|
|
2783
2886
|
}
|
|
2784
|
-
CdkConnectedOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2785
|
-
CdkConnectedOverlay.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
2786
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2887
|
+
CdkConnectedOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.13", 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.13", 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.13", ngImport: i0, type: CdkConnectedOverlay, decorators: [{
|
|
2787
2890
|
type: Directive,
|
|
2788
2891
|
args: [{
|
|
2789
2892
|
selector: '[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]',
|
|
@@ -2890,10 +2993,10 @@ const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {
|
|
|
2890
2993
|
*/
|
|
2891
2994
|
class OverlayModule {
|
|
2892
2995
|
}
|
|
2893
|
-
OverlayModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2894
|
-
OverlayModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
2895
|
-
OverlayModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2896
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2996
|
+
OverlayModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.13", ngImport: i0, type: OverlayModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2997
|
+
OverlayModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "14.0.0-next.13", 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.13", 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.13", ngImport: i0, type: OverlayModule, decorators: [{
|
|
2897
3000
|
type: NgModule,
|
|
2898
3001
|
args: [{
|
|
2899
3002
|
imports: [BidiModule, PortalModule, ScrollingModule],
|
|
@@ -2989,9 +3092,9 @@ class FullscreenOverlayContainer extends OverlayContainer {
|
|
|
2989
3092
|
null);
|
|
2990
3093
|
}
|
|
2991
3094
|
}
|
|
2992
|
-
FullscreenOverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2993
|
-
FullscreenOverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2994
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3095
|
+
FullscreenOverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.13", 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.13", ngImport: i0, type: FullscreenOverlayContainer, providedIn: 'root' });
|
|
3097
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.13", ngImport: i0, type: FullscreenOverlayContainer, decorators: [{
|
|
2995
3098
|
type: Injectable,
|
|
2996
3099
|
args: [{ providedIn: 'root' }]
|
|
2997
3100
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -3019,5 +3122,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0-rc.1", ng
|
|
|
3019
3122
|
* Generated bundle index. Do not edit.
|
|
3020
3123
|
*/
|
|
3021
3124
|
|
|
3022
|
-
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 };
|
|
3023
3126
|
//# sourceMappingURL=overlay.mjs.map
|