@angular/cdk 18.0.3 → 18.0.5
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.d.ts +2 -1
- package/esm2022/a11y/focus-trap/configurable-focus-trap-factory.mjs +5 -4
- package/esm2022/a11y/focus-trap/configurable-focus-trap.mjs +3 -3
- package/esm2022/a11y/focus-trap/focus-trap.mjs +5 -23
- package/esm2022/overlay/dispatchers/overlay-outside-click-dispatcher.mjs +16 -3
- package/esm2022/version.mjs +1 -1
- package/fesm2022/a11y.mjs +12 -28
- package/fesm2022/a11y.mjs.map +1 -1
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/overlay.mjs +15 -2
- package/fesm2022/overlay.mjs.map +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
package/fesm2022/cdk.mjs
CHANGED
package/fesm2022/cdk.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk.mjs","sources":["../../../../../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('18.0.
|
|
1
|
+
{"version":3,"file":"cdk.mjs","sources":["../../../../../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('18.0.5');\n"],"names":[],"mappings":";;AAUA;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;;;"}
|
package/fesm2022/overlay.mjs
CHANGED
|
@@ -568,8 +568,8 @@ class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
|
|
|
568
568
|
// If it's a click inside the overlay, just break - we should do nothing
|
|
569
569
|
// If it's an outside click (both origin and target of the click) dispatch the mouse event,
|
|
570
570
|
// and proceed with the next overlay
|
|
571
|
-
if (overlayRef.overlayElement
|
|
572
|
-
overlayRef.overlayElement
|
|
571
|
+
if (containsPierceShadowDom(overlayRef.overlayElement, target) ||
|
|
572
|
+
containsPierceShadowDom(overlayRef.overlayElement, origin)) {
|
|
573
573
|
break;
|
|
574
574
|
}
|
|
575
575
|
const outsidePointerEvents = overlayRef._outsidePointerEvents;
|
|
@@ -644,6 +644,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
|
|
|
644
644
|
}] }, { type: i1$1.Platform }, { type: i0.NgZone, decorators: [{
|
|
645
645
|
type: Optional
|
|
646
646
|
}] }] });
|
|
647
|
+
/** Version of `Element.contains` that transcends shadow DOM boundaries. */
|
|
648
|
+
function containsPierceShadowDom(parent, child) {
|
|
649
|
+
const supportsShadowRoot = typeof ShadowRoot !== 'undefined' && ShadowRoot;
|
|
650
|
+
let current = child;
|
|
651
|
+
while (current) {
|
|
652
|
+
if (current === parent) {
|
|
653
|
+
return true;
|
|
654
|
+
}
|
|
655
|
+
current =
|
|
656
|
+
supportsShadowRoot && current instanceof ShadowRoot ? current.host : current.parentNode;
|
|
657
|
+
}
|
|
658
|
+
return false;
|
|
659
|
+
}
|
|
647
660
|
|
|
648
661
|
/** Container inside which all overlays will render. */
|
|
649
662
|
class OverlayContainer {
|