@angular/cdk 13.2.0-next.0 → 13.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/a11y/aria-describer/aria-describer.d.ts +33 -6
- package/esm2020/a11y/a11y-module.mjs +4 -4
- package/esm2020/a11y/aria-describer/aria-describer.mjs +75 -52
- package/esm2020/a11y/fake-event-detection.mjs +7 -5
- package/esm2020/a11y/focus-monitor/focus-monitor.mjs +8 -8
- package/esm2020/a11y/focus-trap/configurable-focus-trap-factory.mjs +3 -3
- package/esm2020/a11y/focus-trap/focus-trap-manager.mjs +3 -3
- package/esm2020/a11y/focus-trap/focus-trap.mjs +6 -6
- package/esm2020/a11y/high-contrast-mode/high-contrast-mode-detector.mjs +3 -3
- package/esm2020/a11y/input-modality/input-modality-detector.mjs +3 -3
- package/esm2020/a11y/interactivity-checker/interactivity-checker.mjs +3 -3
- package/esm2020/a11y/live-announcer/live-announcer.mjs +6 -6
- package/esm2020/accordion/accordion-item.mjs +3 -3
- package/esm2020/accordion/accordion-module.mjs +4 -4
- package/esm2020/accordion/accordion.mjs +3 -3
- package/esm2020/bidi/bidi-module.mjs +4 -4
- package/esm2020/bidi/dir.mjs +3 -3
- package/esm2020/bidi/directionality.mjs +3 -3
- package/esm2020/clipboard/clipboard-module.mjs +4 -4
- package/esm2020/clipboard/clipboard.mjs +3 -3
- package/esm2020/clipboard/copy-to-clipboard.mjs +3 -3
- package/esm2020/collections/unique-selection-dispatcher.mjs +3 -3
- package/esm2020/drag-drop/directives/drag-handle.mjs +3 -3
- package/esm2020/drag-drop/directives/drag-placeholder.mjs +3 -3
- package/esm2020/drag-drop/directives/drag-preview.mjs +3 -3
- package/esm2020/drag-drop/directives/drag.mjs +3 -3
- package/esm2020/drag-drop/directives/drop-list-group.mjs +3 -3
- package/esm2020/drag-drop/directives/drop-list.mjs +3 -3
- package/esm2020/drag-drop/drag-drop-module.mjs +4 -4
- package/esm2020/drag-drop/drag-drop-registry.mjs +3 -3
- package/esm2020/drag-drop/drag-drop.mjs +3 -3
- package/esm2020/layout/breakpoints-observer.mjs +4 -4
- package/esm2020/layout/layout-module.mjs +4 -4
- package/esm2020/layout/media-matcher.mjs +3 -3
- package/esm2020/observers/observe-content.mjs +13 -13
- package/esm2020/overlay/dispatchers/base-overlay-dispatcher.mjs +3 -3
- package/esm2020/overlay/dispatchers/overlay-keyboard-dispatcher.mjs +3 -3
- package/esm2020/overlay/dispatchers/overlay-outside-click-dispatcher.mjs +3 -3
- package/esm2020/overlay/fullscreen-overlay-container.mjs +3 -3
- package/esm2020/overlay/overlay-container.mjs +3 -3
- package/esm2020/overlay/overlay-directives.mjs +6 -6
- package/esm2020/overlay/overlay-module.mjs +4 -4
- package/esm2020/overlay/overlay.mjs +3 -3
- package/esm2020/overlay/position/flexible-connected-position-strategy.mjs +31 -17
- package/esm2020/overlay/position/overlay-position-builder.mjs +3 -3
- package/esm2020/overlay/scroll/scroll-strategy-options.mjs +3 -3
- package/esm2020/platform/platform-module.mjs +4 -4
- package/esm2020/platform/platform.mjs +3 -3
- package/esm2020/portal/portal-directives.mjs +16 -16
- package/esm2020/scrolling/fixed-size-virtual-scroll.mjs +3 -3
- package/esm2020/scrolling/scroll-dispatcher.mjs +3 -3
- package/esm2020/scrolling/scrollable.mjs +3 -3
- package/esm2020/scrolling/scrolling-module.mjs +8 -8
- package/esm2020/scrolling/viewport-ruler.mjs +3 -3
- package/esm2020/scrolling/virtual-for-of.mjs +3 -3
- package/esm2020/scrolling/virtual-scroll-viewport.mjs +3 -3
- package/esm2020/stepper/step-header.mjs +3 -3
- package/esm2020/stepper/step-label.mjs +3 -3
- package/esm2020/stepper/stepper-button.mjs +6 -6
- package/esm2020/stepper/stepper-module.mjs +4 -4
- package/esm2020/stepper/stepper.mjs +6 -6
- package/esm2020/table/cell.mjs +23 -28
- package/esm2020/table/coalesced-style-scheduler.mjs +3 -3
- package/esm2020/table/row.mjs +27 -27
- package/esm2020/table/table-module.mjs +4 -4
- package/esm2020/table/table.mjs +56 -28
- package/esm2020/table/text-column.mjs +3 -3
- package/esm2020/testing/harness-environment.mjs +9 -2
- package/esm2020/testing/protractor/protractor-harness-environment.mjs +3 -2
- package/esm2020/testing/selenium-webdriver/selenium-web-driver-harness-environment.mjs +3 -2
- package/esm2020/testing/testbed/testbed-harness-environment.mjs +3 -2
- package/esm2020/text-field/autofill.mjs +6 -6
- package/esm2020/text-field/autosize.mjs +10 -5
- package/esm2020/text-field/text-field-module.mjs +4 -4
- package/esm2020/tree/nested-node.mjs +3 -3
- package/esm2020/tree/node.mjs +3 -3
- package/esm2020/tree/outlet.mjs +3 -3
- package/esm2020/tree/padding.mjs +3 -3
- package/esm2020/tree/toggle.mjs +3 -3
- package/esm2020/tree/tree-module.mjs +4 -4
- package/esm2020/tree/tree.mjs +6 -6
- package/esm2020/version.mjs +1 -1
- package/fesm2015/a11y.mjs +123 -98
- package/fesm2015/a11y.mjs.map +1 -1
- package/fesm2015/accordion.mjs +10 -10
- package/fesm2015/bidi.mjs +10 -10
- package/fesm2015/cdk.mjs +1 -1
- package/fesm2015/cdk.mjs.map +1 -1
- package/fesm2015/clipboard.mjs +10 -10
- package/fesm2015/collections.mjs +3 -3
- package/fesm2015/drag-drop.mjs +28 -28
- package/fesm2015/layout.mjs +10 -10
- package/fesm2015/layout.mjs.map +1 -1
- package/fesm2015/observers.mjs +13 -13
- package/fesm2015/overlay.mjs +64 -50
- package/fesm2015/overlay.mjs.map +1 -1
- package/fesm2015/platform.mjs +7 -7
- package/fesm2015/portal.mjs +16 -16
- package/fesm2015/scrolling.mjs +26 -26
- package/fesm2015/stepper.mjs +22 -22
- package/fesm2015/table.mjs +113 -90
- package/fesm2015/table.mjs.map +1 -1
- package/fesm2015/testing/protractor.mjs +2 -1
- package/fesm2015/testing/protractor.mjs.map +1 -1
- package/fesm2015/testing/selenium-webdriver.mjs +2 -1
- package/fesm2015/testing/selenium-webdriver.mjs.map +1 -1
- package/fesm2015/testing/testbed.mjs +2 -1
- package/fesm2015/testing/testbed.mjs.map +1 -1
- package/fesm2015/testing.mjs +8 -1
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2015/text-field.mjs +19 -14
- package/fesm2015/text-field.mjs.map +1 -1
- package/fesm2015/tree.mjs +25 -25
- package/fesm2020/a11y.mjs +120 -97
- package/fesm2020/a11y.mjs.map +1 -1
- package/fesm2020/accordion.mjs +10 -10
- package/fesm2020/bidi.mjs +10 -10
- package/fesm2020/cdk.mjs +1 -1
- package/fesm2020/cdk.mjs.map +1 -1
- package/fesm2020/clipboard.mjs +10 -10
- package/fesm2020/collections.mjs +3 -3
- package/fesm2020/drag-drop.mjs +28 -28
- package/fesm2020/layout.mjs +10 -10
- package/fesm2020/layout.mjs.map +1 -1
- package/fesm2020/observers.mjs +13 -13
- package/fesm2020/overlay.mjs +64 -50
- package/fesm2020/overlay.mjs.map +1 -1
- package/fesm2020/platform.mjs +7 -7
- package/fesm2020/portal.mjs +16 -16
- package/fesm2020/scrolling.mjs +26 -26
- package/fesm2020/stepper.mjs +22 -22
- package/fesm2020/table.mjs +113 -90
- package/fesm2020/table.mjs.map +1 -1
- package/fesm2020/testing/protractor.mjs +2 -1
- package/fesm2020/testing/protractor.mjs.map +1 -1
- package/fesm2020/testing/selenium-webdriver.mjs +2 -1
- package/fesm2020/testing/selenium-webdriver.mjs.map +1 -1
- package/fesm2020/testing/testbed.mjs +2 -1
- package/fesm2020/testing/testbed.mjs.map +1 -1
- package/fesm2020/testing.mjs +8 -1
- package/fesm2020/testing.mjs.map +1 -1
- package/fesm2020/text-field.mjs +19 -14
- package/fesm2020/text-field.mjs.map +1 -1
- package/fesm2020/tree.mjs +25 -25
- package/overlay/position/flexible-connected-position-strategy.d.ts +4 -2
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-update/migrations/tilde-import-v13/tilde-import-migration.js +5 -4
- package/schematics/ng-update/migrations/tilde-import-v13/tilde-import-migration.mjs +5 -4
- package/schematics/tsconfig.json +1 -0
- package/schematics/utils/html-manipulation.js +3 -1
- package/schematics/utils/html-manipulation.mjs +3 -1
- package/schematics/utils/project-tsconfig-paths.js +2 -2
- package/schematics/utils/project-tsconfig-paths.mjs +2 -2
- package/table/table.d.ts +13 -3
- package/testing/harness-environment.d.ts +3 -1
- package/testing/protractor/protractor-harness-environment.d.ts +2 -1
- package/testing/selenium-webdriver/selenium-web-driver-harness-environment.d.ts +2 -0
- package/testing/testbed/testbed-harness-environment.d.ts +2 -0
package/fesm2020/overlay.mjs
CHANGED
|
@@ -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: "13.
|
|
323
|
-
ScrollStrategyOptions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
324
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
322
|
+
ScrollStrategyOptions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", 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: "13.2.0", ngImport: i0, type: ScrollStrategyOptions, providedIn: 'root' });
|
|
324
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", 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: "13.
|
|
512
|
-
BaseOverlayDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
513
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
511
|
+
BaseOverlayDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BaseOverlayDispatcher, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
512
|
+
BaseOverlayDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BaseOverlayDispatcher, providedIn: 'root' });
|
|
513
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BaseOverlayDispatcher, decorators: [{
|
|
514
514
|
type: Injectable,
|
|
515
515
|
args: [{ providedIn: 'root' }]
|
|
516
516
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -567,9 +567,9 @@ class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
|
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
OverlayKeyboardDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
571
|
-
OverlayKeyboardDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
572
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
570
|
+
OverlayKeyboardDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: OverlayKeyboardDispatcher, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
571
|
+
OverlayKeyboardDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: OverlayKeyboardDispatcher, providedIn: 'root' });
|
|
572
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: OverlayKeyboardDispatcher, decorators: [{
|
|
573
573
|
type: Injectable,
|
|
574
574
|
args: [{ providedIn: 'root' }]
|
|
575
575
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -678,9 +678,9 @@ class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
|
|
|
678
678
|
}
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
|
-
OverlayOutsideClickDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
682
|
-
OverlayOutsideClickDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
683
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
681
|
+
OverlayOutsideClickDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: OverlayOutsideClickDispatcher, deps: [{ token: DOCUMENT }, { token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
682
|
+
OverlayOutsideClickDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: OverlayOutsideClickDispatcher, providedIn: 'root' });
|
|
683
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: OverlayOutsideClickDispatcher, decorators: [{
|
|
684
684
|
type: Injectable,
|
|
685
685
|
args: [{ providedIn: 'root' }]
|
|
686
686
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -754,9 +754,9 @@ class OverlayContainer {
|
|
|
754
754
|
this._containerElement = container;
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
OverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
758
|
-
OverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
759
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
757
|
+
OverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: OverlayContainer, deps: [{ token: DOCUMENT }, { token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
758
|
+
OverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: OverlayContainer, providedIn: 'root' });
|
|
759
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: OverlayContainer, decorators: [{
|
|
760
760
|
type: Injectable,
|
|
761
761
|
args: [{ providedIn: 'root' }]
|
|
762
762
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -1278,15 +1278,17 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1278
1278
|
this._clearPanelClasses();
|
|
1279
1279
|
this._resetOverlayElementStyles();
|
|
1280
1280
|
this._resetBoundingBoxStyles();
|
|
1281
|
-
// We need the bounding rects for the origin and the
|
|
1281
|
+
// We need the bounding rects for the origin, the overlay and the container to determine how to position
|
|
1282
1282
|
// the overlay relative to the origin.
|
|
1283
1283
|
// We use the viewport rect to determine whether a position would go off-screen.
|
|
1284
1284
|
this._viewportRect = this._getNarrowedViewportRect();
|
|
1285
1285
|
this._originRect = this._getOriginRect();
|
|
1286
1286
|
this._overlayRect = this._pane.getBoundingClientRect();
|
|
1287
|
+
this._containerRect = this._overlayContainer.getContainerElement().getBoundingClientRect();
|
|
1287
1288
|
const originRect = this._originRect;
|
|
1288
1289
|
const overlayRect = this._overlayRect;
|
|
1289
1290
|
const viewportRect = this._viewportRect;
|
|
1291
|
+
const containerRect = this._containerRect;
|
|
1290
1292
|
// Positions where the overlay will fit with flexible dimensions.
|
|
1291
1293
|
const flexibleFits = [];
|
|
1292
1294
|
// Fallback if none of the preferred positions fit within the viewport.
|
|
@@ -1295,7 +1297,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1295
1297
|
// If a good fit is found, it will be applied immediately.
|
|
1296
1298
|
for (let pos of this._preferredPositions) {
|
|
1297
1299
|
// Get the exact (x, y) coordinate for the point-of-origin on the origin element.
|
|
1298
|
-
let originPoint = this._getOriginPoint(originRect, pos);
|
|
1300
|
+
let originPoint = this._getOriginPoint(originRect, containerRect, pos);
|
|
1299
1301
|
// From that point-of-origin, get the exact (x, y) coordinate for the top-left corner of the
|
|
1300
1302
|
// overlay in this position. We use the top-left corner for calculations and later translate
|
|
1301
1303
|
// this into an appropriate (top, left, bottom, right) style.
|
|
@@ -1398,14 +1400,21 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1398
1400
|
* allows one to re-align the panel without changing the orientation of the panel.
|
|
1399
1401
|
*/
|
|
1400
1402
|
reapplyLastPosition() {
|
|
1401
|
-
if (
|
|
1403
|
+
if (this._isDisposed || !this._platform.isBrowser) {
|
|
1404
|
+
return;
|
|
1405
|
+
}
|
|
1406
|
+
const lastPosition = this._lastPosition;
|
|
1407
|
+
if (lastPosition) {
|
|
1402
1408
|
this._originRect = this._getOriginRect();
|
|
1403
1409
|
this._overlayRect = this._pane.getBoundingClientRect();
|
|
1404
1410
|
this._viewportRect = this._getNarrowedViewportRect();
|
|
1405
|
-
|
|
1406
|
-
const originPoint = this._getOriginPoint(this._originRect, lastPosition);
|
|
1411
|
+
this._containerRect = this._overlayContainer.getContainerElement().getBoundingClientRect();
|
|
1412
|
+
const originPoint = this._getOriginPoint(this._originRect, this._containerRect, lastPosition);
|
|
1407
1413
|
this._applyPosition(lastPosition, originPoint);
|
|
1408
1414
|
}
|
|
1415
|
+
else {
|
|
1416
|
+
this.apply();
|
|
1417
|
+
}
|
|
1409
1418
|
}
|
|
1410
1419
|
/**
|
|
1411
1420
|
* Sets the list of Scrollable containers that host the origin element so that
|
|
@@ -1505,7 +1514,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1505
1514
|
/**
|
|
1506
1515
|
* Gets the (x, y) coordinate of a connection point on the origin based on a relative position.
|
|
1507
1516
|
*/
|
|
1508
|
-
_getOriginPoint(originRect, pos) {
|
|
1517
|
+
_getOriginPoint(originRect, containerRect, pos) {
|
|
1509
1518
|
let x;
|
|
1510
1519
|
if (pos.originX == 'center') {
|
|
1511
1520
|
// Note: when centering we should always use the `left`
|
|
@@ -1517,6 +1526,11 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1517
1526
|
const endX = this._isRtl() ? originRect.left : originRect.right;
|
|
1518
1527
|
x = pos.originX == 'start' ? startX : endX;
|
|
1519
1528
|
}
|
|
1529
|
+
// When zooming in Safari the container rectangle contains negative values for the position
|
|
1530
|
+
// and we need to re-add them to the calculated coordinates.
|
|
1531
|
+
if (containerRect.left < 0) {
|
|
1532
|
+
x -= containerRect.left;
|
|
1533
|
+
}
|
|
1520
1534
|
let y;
|
|
1521
1535
|
if (pos.originY == 'center') {
|
|
1522
1536
|
y = originRect.top + originRect.height / 2;
|
|
@@ -1524,6 +1538,14 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1524
1538
|
else {
|
|
1525
1539
|
y = pos.originY == 'top' ? originRect.top : originRect.bottom;
|
|
1526
1540
|
}
|
|
1541
|
+
// Normally the containerRect's top value would be zero, however when the overlay is attached to an input
|
|
1542
|
+
// (e.g. in an autocomplete), mobile browsers will shift everything in order to put the input in the middle
|
|
1543
|
+
// of the screen and to make space for the virtual keyboard. We need to account for this offset,
|
|
1544
|
+
// otherwise our positioning will be thrown off.
|
|
1545
|
+
// Additionally, when zooming in Safari this fixes the vertical position.
|
|
1546
|
+
if (containerRect.top < 0) {
|
|
1547
|
+
y -= containerRect.top;
|
|
1548
|
+
}
|
|
1527
1549
|
return { x, y };
|
|
1528
1550
|
}
|
|
1529
1551
|
/**
|
|
@@ -1590,7 +1612,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1590
1612
|
/**
|
|
1591
1613
|
* Whether the overlay can fit within the viewport when it may resize either its width or height.
|
|
1592
1614
|
* @param fit How well the overlay fits in the viewport at some position.
|
|
1593
|
-
* @param point The (x, y) coordinates of the
|
|
1615
|
+
* @param point The (x, y) coordinates of the overlay at some position.
|
|
1594
1616
|
* @param viewport The geometry of the viewport.
|
|
1595
1617
|
*/
|
|
1596
1618
|
_canFitWithFlexibleDimensions(fit, point, viewport) {
|
|
@@ -1611,7 +1633,7 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1611
1633
|
* right and bottom).
|
|
1612
1634
|
*
|
|
1613
1635
|
* @param start Starting point from which the overlay is pushed.
|
|
1614
|
-
* @param
|
|
1636
|
+
* @param rawOverlayRect Dimensions of the overlay.
|
|
1615
1637
|
* @param scrollPosition Current viewport scroll position.
|
|
1616
1638
|
* @returns The point at which to position the overlay after pushing. This is effectively a new
|
|
1617
1639
|
* originPoint.
|
|
@@ -1906,14 +1928,6 @@ class FlexibleConnectedPositionStrategy {
|
|
|
1906
1928
|
if (this._isPushed) {
|
|
1907
1929
|
overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition);
|
|
1908
1930
|
}
|
|
1909
|
-
let virtualKeyboardOffset = this._overlayContainer
|
|
1910
|
-
.getContainerElement()
|
|
1911
|
-
.getBoundingClientRect().top;
|
|
1912
|
-
// Normally this would be zero, however when the overlay is attached to an input (e.g. in an
|
|
1913
|
-
// autocomplete), mobile browsers will shift everything in order to put the input in the middle
|
|
1914
|
-
// of the screen and to make space for the virtual keyboard. We need to account for this offset,
|
|
1915
|
-
// otherwise our positioning will be thrown off.
|
|
1916
|
-
overlayPoint.y -= virtualKeyboardOffset;
|
|
1917
1931
|
// We want to set either `top` or `bottom` based on whether the overlay wants to appear
|
|
1918
1932
|
// above or below the origin and the direction in which the element will expand.
|
|
1919
1933
|
if (position.overlayY === 'bottom') {
|
|
@@ -2349,9 +2363,9 @@ class OverlayPositionBuilder {
|
|
|
2349
2363
|
return new FlexibleConnectedPositionStrategy(origin, this._viewportRuler, this._document, this._platform, this._overlayContainer);
|
|
2350
2364
|
}
|
|
2351
2365
|
}
|
|
2352
|
-
OverlayPositionBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
2353
|
-
OverlayPositionBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
2354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
2366
|
+
OverlayPositionBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: OverlayPositionBuilder, deps: [{ token: i1.ViewportRuler }, { token: DOCUMENT }, { token: i1$1.Platform }, { token: OverlayContainer }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2367
|
+
OverlayPositionBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: OverlayPositionBuilder, providedIn: 'root' });
|
|
2368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: OverlayPositionBuilder, decorators: [{
|
|
2355
2369
|
type: Injectable,
|
|
2356
2370
|
args: [{ providedIn: 'root' }]
|
|
2357
2371
|
}], ctorParameters: function () { return [{ type: i1.ViewportRuler }, { type: undefined, decorators: [{
|
|
@@ -2450,9 +2464,9 @@ class Overlay {
|
|
|
2450
2464
|
return new DomPortalOutlet(pane, this._componentFactoryResolver, this._appRef, this._injector, this._document);
|
|
2451
2465
|
}
|
|
2452
2466
|
}
|
|
2453
|
-
Overlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
2454
|
-
Overlay.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
2455
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
2467
|
+
Overlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", 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 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2468
|
+
Overlay.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: Overlay });
|
|
2469
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: Overlay, decorators: [{
|
|
2456
2470
|
type: Injectable
|
|
2457
2471
|
}], ctorParameters: function () { return [{ type: ScrollStrategyOptions }, { type: OverlayContainer }, { type: i0.ComponentFactoryResolver }, { type: OverlayPositionBuilder }, { type: OverlayKeyboardDispatcher }, { type: i0.Injector }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
2458
2472
|
type: Inject,
|
|
@@ -2506,9 +2520,9 @@ class CdkOverlayOrigin {
|
|
|
2506
2520
|
this.elementRef = elementRef;
|
|
2507
2521
|
}
|
|
2508
2522
|
}
|
|
2509
|
-
CdkOverlayOrigin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
2510
|
-
CdkOverlayOrigin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.
|
|
2511
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
2523
|
+
CdkOverlayOrigin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkOverlayOrigin, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2524
|
+
CdkOverlayOrigin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"], ngImport: i0 });
|
|
2525
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkOverlayOrigin, decorators: [{
|
|
2512
2526
|
type: Directive,
|
|
2513
2527
|
args: [{
|
|
2514
2528
|
selector: '[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]',
|
|
@@ -2773,9 +2787,9 @@ class CdkConnectedOverlay {
|
|
|
2773
2787
|
this._positionSubscription.unsubscribe();
|
|
2774
2788
|
}
|
|
2775
2789
|
}
|
|
2776
|
-
CdkConnectedOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
2777
|
-
CdkConnectedOverlay.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.
|
|
2778
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
2790
|
+
CdkConnectedOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", 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 });
|
|
2791
|
+
CdkConnectedOverlay.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", 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 });
|
|
2792
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkConnectedOverlay, decorators: [{
|
|
2779
2793
|
type: Directive,
|
|
2780
2794
|
args: [{
|
|
2781
2795
|
selector: '[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]',
|
|
@@ -2882,10 +2896,10 @@ const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {
|
|
|
2882
2896
|
*/
|
|
2883
2897
|
class OverlayModule {
|
|
2884
2898
|
}
|
|
2885
|
-
OverlayModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
2886
|
-
OverlayModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
2887
|
-
OverlayModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
2888
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
2899
|
+
OverlayModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: OverlayModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2900
|
+
OverlayModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: OverlayModule, declarations: [CdkConnectedOverlay, CdkOverlayOrigin], imports: [BidiModule, PortalModule, ScrollingModule], exports: [CdkConnectedOverlay, CdkOverlayOrigin, ScrollingModule] });
|
|
2901
|
+
OverlayModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: OverlayModule, providers: [Overlay, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER], imports: [[BidiModule, PortalModule, ScrollingModule], ScrollingModule] });
|
|
2902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: OverlayModule, decorators: [{
|
|
2889
2903
|
type: NgModule,
|
|
2890
2904
|
args: [{
|
|
2891
2905
|
imports: [BidiModule, PortalModule, ScrollingModule],
|
|
@@ -2981,9 +2995,9 @@ class FullscreenOverlayContainer extends OverlayContainer {
|
|
|
2981
2995
|
null);
|
|
2982
2996
|
}
|
|
2983
2997
|
}
|
|
2984
|
-
FullscreenOverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
2985
|
-
FullscreenOverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
2986
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
2998
|
+
FullscreenOverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: FullscreenOverlayContainer, deps: [{ token: DOCUMENT }, { token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2999
|
+
FullscreenOverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: FullscreenOverlayContainer, providedIn: 'root' });
|
|
3000
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: FullscreenOverlayContainer, decorators: [{
|
|
2987
3001
|
type: Injectable,
|
|
2988
3002
|
args: [{ providedIn: 'root' }]
|
|
2989
3003
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|