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