@angular/cdk 13.2.0-next.1 → 13.2.2
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/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 +6 -6
- 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 +9 -3
- 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 +6 -4
- 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 +21 -21
- 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 +35 -24
- package/esm2020/table/text-column.mjs +3 -3
- package/esm2020/testing/protractor/protractor-harness-environment.mjs +3 -2
- package/esm2020/text-field/autofill.mjs +6 -6
- package/esm2020/text-field/autosize.mjs +3 -3
- 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 +122 -97
- 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 +42 -36
- package/fesm2015/overlay.mjs.map +1 -1
- package/fesm2015/platform.mjs +7 -7
- package/fesm2015/portal.mjs +16 -16
- package/fesm2015/scrolling.mjs +28 -26
- package/fesm2015/scrolling.mjs.map +1 -1
- package/fesm2015/stepper.mjs +22 -22
- package/fesm2015/table.mjs +92 -81
- package/fesm2015/table.mjs.map +1 -1
- package/fesm2015/testing/protractor.mjs +2 -1
- package/fesm2015/testing/protractor.mjs.map +1 -1
- package/fesm2015/text-field.mjs +13 -13
- package/fesm2015/tree.mjs +25 -25
- package/fesm2020/a11y.mjs +119 -96
- 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 +42 -36
- package/fesm2020/overlay.mjs.map +1 -1
- package/fesm2020/platform.mjs +7 -7
- package/fesm2020/portal.mjs +16 -16
- package/fesm2020/scrolling.mjs +28 -26
- package/fesm2020/scrolling.mjs.map +1 -1
- package/fesm2020/stepper.mjs +22 -22
- package/fesm2020/table.mjs +92 -81
- package/fesm2020/table.mjs.map +1 -1
- package/fesm2020/testing/protractor.mjs +2 -1
- package/fesm2020/testing/protractor.mjs.map +1 -1
- package/fesm2020/text-field.mjs +13 -13
- package/fesm2020/tree.mjs +25 -25
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/drag-drop/schema.json +1 -1
- package/schematics/ng-update/devkit-migration.js +1 -1
- package/schematics/ng-update/devkit-migration.mjs +1 -1
- package/schematics/tsconfig.json +3 -10
- 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 +2 -2
- package/testing/protractor/protractor-harness-environment.d.ts +2 -1
package/fesm2015/a11y.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { DOCUMENT } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { Injectable, Inject, QueryList, Directive, Input, InjectionToken, Optional, EventEmitter, Output, NgModule } from '@angular/core';
|
|
4
|
+
import * as i1 from '@angular/cdk/platform';
|
|
5
|
+
import { _getFocusedElementPierceShadowDom, normalizePassiveListenerOptions, _getEventTarget, _getShadowRoot, PlatformModule } from '@angular/cdk/platform';
|
|
4
6
|
import { Subject, Subscription, BehaviorSubject, of } from 'rxjs';
|
|
5
7
|
import { hasModifierKey, A, Z, ZERO, NINE, END, HOME, LEFT_ARROW, RIGHT_ARROW, UP_ARROW, DOWN_ARROW, TAB, ALT, CONTROL, MAC_META, META, SHIFT } from '@angular/cdk/keycodes';
|
|
6
8
|
import { tap, debounceTime, filter, map, take, skip, distinctUntilChanged, takeUntil } from 'rxjs/operators';
|
|
7
9
|
import { coerceBooleanProperty, coerceElement } from '@angular/cdk/coercion';
|
|
8
|
-
import * as i1 from '@angular/cdk/platform';
|
|
9
|
-
import { _getFocusedElementPierceShadowDom, normalizePassiveListenerOptions, _getEventTarget, _getShadowRoot, PlatformModule } from '@angular/cdk/platform';
|
|
10
10
|
import * as i1$1 from '@angular/cdk/observers';
|
|
11
11
|
import { ObserversModule } from '@angular/cdk/observers';
|
|
12
12
|
|
|
@@ -61,25 +61,45 @@ function getAriaReferenceIds(el, attr) {
|
|
|
61
61
|
* Use of this source code is governed by an MIT-style license that can be
|
|
62
62
|
* found in the LICENSE file at https://angular.io/license
|
|
63
63
|
*/
|
|
64
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* ID used for the body container where all messages are appended.
|
|
66
|
+
* @deprecated No longer being used. To be removed.
|
|
67
|
+
* @breaking-change 14.0.0
|
|
68
|
+
*/
|
|
65
69
|
const MESSAGES_CONTAINER_ID = 'cdk-describedby-message-container';
|
|
66
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* ID prefix used for each created message element.
|
|
72
|
+
* @deprecated To be turned into a private variable.
|
|
73
|
+
* @breaking-change 14.0.0
|
|
74
|
+
*/
|
|
67
75
|
const CDK_DESCRIBEDBY_ID_PREFIX = 'cdk-describedby-message';
|
|
68
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* Attribute given to each host element that is described by a message element.
|
|
78
|
+
* @deprecated To be turned into a private variable.
|
|
79
|
+
* @breaking-change 14.0.0
|
|
80
|
+
*/
|
|
69
81
|
const CDK_DESCRIBEDBY_HOST_ATTRIBUTE = 'cdk-describedby-host';
|
|
70
82
|
/** Global incremental identifier for each registered message element. */
|
|
71
83
|
let nextId = 0;
|
|
72
|
-
/** Global map of all registered message elements that have been placed into the document. */
|
|
73
|
-
const messageRegistry = new Map();
|
|
74
|
-
/** Container for all registered messages. */
|
|
75
|
-
let messagesContainer = null;
|
|
76
84
|
/**
|
|
77
85
|
* Utility that creates visually hidden elements with a message content. Useful for elements that
|
|
78
86
|
* want to use aria-describedby to further describe themselves without adding additional visual
|
|
79
87
|
* content.
|
|
80
88
|
*/
|
|
81
89
|
class AriaDescriber {
|
|
82
|
-
constructor(_document
|
|
90
|
+
constructor(_document,
|
|
91
|
+
/**
|
|
92
|
+
* @deprecated To be turned into a required parameter.
|
|
93
|
+
* @breaking-change 14.0.0
|
|
94
|
+
*/
|
|
95
|
+
_platform) {
|
|
96
|
+
this._platform = _platform;
|
|
97
|
+
/** Map of all registered message elements that have been placed into the document. */
|
|
98
|
+
this._messageRegistry = new Map();
|
|
99
|
+
/** Container for all registered messages. */
|
|
100
|
+
this._messagesContainer = null;
|
|
101
|
+
/** Unique ID for the service. */
|
|
102
|
+
this._id = `${nextId++}`;
|
|
83
103
|
this._document = _document;
|
|
84
104
|
}
|
|
85
105
|
describe(hostElement, message, role) {
|
|
@@ -90,9 +110,9 @@ class AriaDescriber {
|
|
|
90
110
|
if (typeof message !== 'string') {
|
|
91
111
|
// We need to ensure that the element has an ID.
|
|
92
112
|
setMessageId(message);
|
|
93
|
-
|
|
113
|
+
this._messageRegistry.set(key, { messageElement: message, referenceCount: 0 });
|
|
94
114
|
}
|
|
95
|
-
else if (!
|
|
115
|
+
else if (!this._messageRegistry.has(key)) {
|
|
96
116
|
this._createMessageElement(message, role);
|
|
97
117
|
}
|
|
98
118
|
if (!this._isElementDescribedByMessage(hostElement, key)) {
|
|
@@ -100,6 +120,7 @@ class AriaDescriber {
|
|
|
100
120
|
}
|
|
101
121
|
}
|
|
102
122
|
removeDescription(hostElement, message, role) {
|
|
123
|
+
var _a;
|
|
103
124
|
if (!message || !this._isElementNode(hostElement)) {
|
|
104
125
|
return;
|
|
105
126
|
}
|
|
@@ -110,26 +131,27 @@ class AriaDescriber {
|
|
|
110
131
|
// If the message is a string, it means that it's one that we created for the
|
|
111
132
|
// consumer so we can remove it safely, otherwise we should leave it in place.
|
|
112
133
|
if (typeof message === 'string') {
|
|
113
|
-
const registeredMessage =
|
|
134
|
+
const registeredMessage = this._messageRegistry.get(key);
|
|
114
135
|
if (registeredMessage && registeredMessage.referenceCount === 0) {
|
|
115
136
|
this._deleteMessageElement(key);
|
|
116
137
|
}
|
|
117
138
|
}
|
|
118
|
-
if (
|
|
119
|
-
this.
|
|
139
|
+
if (((_a = this._messagesContainer) === null || _a === void 0 ? void 0 : _a.childNodes.length) === 0) {
|
|
140
|
+
this._messagesContainer.remove();
|
|
141
|
+
this._messagesContainer = null;
|
|
120
142
|
}
|
|
121
143
|
}
|
|
122
144
|
/** Unregisters all created message elements and removes the message container. */
|
|
123
145
|
ngOnDestroy() {
|
|
124
|
-
|
|
146
|
+
var _a;
|
|
147
|
+
const describedElements = this._document.querySelectorAll(`[${CDK_DESCRIBEDBY_HOST_ATTRIBUTE}="${this._id}"]`);
|
|
125
148
|
for (let i = 0; i < describedElements.length; i++) {
|
|
126
149
|
this._removeCdkDescribedByReferenceIds(describedElements[i]);
|
|
127
150
|
describedElements[i].removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);
|
|
128
151
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
messageRegistry.clear();
|
|
152
|
+
(_a = this._messagesContainer) === null || _a === void 0 ? void 0 : _a.remove();
|
|
153
|
+
this._messagesContainer = null;
|
|
154
|
+
this._messageRegistry.clear();
|
|
133
155
|
}
|
|
134
156
|
/**
|
|
135
157
|
* Creates a new element in the visually hidden message container element with the message
|
|
@@ -143,44 +165,45 @@ class AriaDescriber {
|
|
|
143
165
|
messageElement.setAttribute('role', role);
|
|
144
166
|
}
|
|
145
167
|
this._createMessagesContainer();
|
|
146
|
-
|
|
147
|
-
|
|
168
|
+
this._messagesContainer.appendChild(messageElement);
|
|
169
|
+
this._messageRegistry.set(getKey(message, role), { messageElement, referenceCount: 0 });
|
|
148
170
|
}
|
|
149
171
|
/** Deletes the message element from the global messages container. */
|
|
150
172
|
_deleteMessageElement(key) {
|
|
151
|
-
var _a;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
messageRegistry.delete(key);
|
|
173
|
+
var _a, _b;
|
|
174
|
+
(_b = (_a = this._messageRegistry.get(key)) === null || _a === void 0 ? void 0 : _a.messageElement) === null || _b === void 0 ? void 0 : _b.remove();
|
|
175
|
+
this._messageRegistry.delete(key);
|
|
155
176
|
}
|
|
156
177
|
/** Creates the global container for all aria-describedby messages. */
|
|
157
178
|
_createMessagesContainer() {
|
|
158
|
-
if (
|
|
159
|
-
|
|
179
|
+
if (this._messagesContainer) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
const containerClassName = 'cdk-describedby-message-container';
|
|
183
|
+
const serverContainers = this._document.querySelectorAll(`.${containerClassName}[platform="server"]`);
|
|
184
|
+
for (let i = 0; i < serverContainers.length; i++) {
|
|
160
185
|
// When going from the server to the client, we may end up in a situation where there's
|
|
161
186
|
// already a container on the page, but we don't have a reference to it. Clear the
|
|
162
187
|
// old container so we don't get duplicates. Doing this, instead of emptying the previous
|
|
163
188
|
// container, should be slightly faster.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
messagesContainer = null;
|
|
183
|
-
}
|
|
189
|
+
serverContainers[i].remove();
|
|
190
|
+
}
|
|
191
|
+
const messagesContainer = this._document.createElement('div');
|
|
192
|
+
// We add `visibility: hidden` in order to prevent text in this container from
|
|
193
|
+
// being searchable by the browser's Ctrl + F functionality.
|
|
194
|
+
// Screen-readers will still read the description for elements with aria-describedby even
|
|
195
|
+
// when the description element is not visible.
|
|
196
|
+
messagesContainer.style.visibility = 'hidden';
|
|
197
|
+
// Even though we use `visibility: hidden`, we still apply `cdk-visually-hidden` so that
|
|
198
|
+
// the description element doesn't impact page layout.
|
|
199
|
+
messagesContainer.classList.add(containerClassName);
|
|
200
|
+
messagesContainer.classList.add('cdk-visually-hidden');
|
|
201
|
+
// @breaking-change 14.0.0 Remove null check for `_platform`.
|
|
202
|
+
if (this._platform && !this._platform.isBrowser) {
|
|
203
|
+
messagesContainer.setAttribute('platform', 'server');
|
|
204
|
+
}
|
|
205
|
+
this._document.body.appendChild(messagesContainer);
|
|
206
|
+
this._messagesContainer = messagesContainer;
|
|
184
207
|
}
|
|
185
208
|
/** Removes all cdk-describedby messages that are hosted through the element. */
|
|
186
209
|
_removeCdkDescribedByReferenceIds(element) {
|
|
@@ -193,11 +216,11 @@ class AriaDescriber {
|
|
|
193
216
|
* message's reference count.
|
|
194
217
|
*/
|
|
195
218
|
_addMessageReference(element, key) {
|
|
196
|
-
const registeredMessage =
|
|
219
|
+
const registeredMessage = this._messageRegistry.get(key);
|
|
197
220
|
// Add the aria-describedby reference and set the
|
|
198
221
|
// describedby_host attribute to mark the element.
|
|
199
222
|
addAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);
|
|
200
|
-
element.setAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE,
|
|
223
|
+
element.setAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE, this._id);
|
|
201
224
|
registeredMessage.referenceCount++;
|
|
202
225
|
}
|
|
203
226
|
/**
|
|
@@ -205,7 +228,7 @@ class AriaDescriber {
|
|
|
205
228
|
* and decrements the registered message's reference count.
|
|
206
229
|
*/
|
|
207
230
|
_removeMessageReference(element, key) {
|
|
208
|
-
const registeredMessage =
|
|
231
|
+
const registeredMessage = this._messageRegistry.get(key);
|
|
209
232
|
registeredMessage.referenceCount--;
|
|
210
233
|
removeAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);
|
|
211
234
|
element.removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);
|
|
@@ -213,7 +236,7 @@ class AriaDescriber {
|
|
|
213
236
|
/** Returns true if the element has been described by the provided message ID. */
|
|
214
237
|
_isElementDescribedByMessage(element, key) {
|
|
215
238
|
const referenceIds = getAriaReferenceIds(element, 'aria-describedby');
|
|
216
|
-
const registeredMessage =
|
|
239
|
+
const registeredMessage = this._messageRegistry.get(key);
|
|
217
240
|
const messageId = registeredMessage && registeredMessage.messageElement.id;
|
|
218
241
|
return !!messageId && referenceIds.indexOf(messageId) != -1;
|
|
219
242
|
}
|
|
@@ -239,16 +262,16 @@ class AriaDescriber {
|
|
|
239
262
|
return element.nodeType === this._document.ELEMENT_NODE;
|
|
240
263
|
}
|
|
241
264
|
}
|
|
242
|
-
AriaDescriber.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
243
|
-
AriaDescriber.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
244
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
265
|
+
AriaDescriber.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AriaDescriber, deps: [{ token: DOCUMENT }, { token: i1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
266
|
+
AriaDescriber.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AriaDescriber, providedIn: 'root' });
|
|
267
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AriaDescriber, decorators: [{
|
|
245
268
|
type: Injectable,
|
|
246
269
|
args: [{ providedIn: 'root' }]
|
|
247
270
|
}], ctorParameters: function () {
|
|
248
271
|
return [{ type: undefined, decorators: [{
|
|
249
272
|
type: Inject,
|
|
250
273
|
args: [DOCUMENT]
|
|
251
|
-
}] }];
|
|
274
|
+
}] }, { type: i1.Platform }];
|
|
252
275
|
} });
|
|
253
276
|
/** Gets a key that can be used to look messages up in the registry. */
|
|
254
277
|
function getKey(message, role) {
|
|
@@ -752,9 +775,9 @@ class InteractivityChecker {
|
|
|
752
775
|
((config === null || config === void 0 ? void 0 : config.ignoreVisibility) || this.isVisible(element)));
|
|
753
776
|
}
|
|
754
777
|
}
|
|
755
|
-
InteractivityChecker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
756
|
-
InteractivityChecker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
757
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
778
|
+
InteractivityChecker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: InteractivityChecker, deps: [{ token: i1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
779
|
+
InteractivityChecker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: InteractivityChecker, providedIn: 'root' });
|
|
780
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: InteractivityChecker, decorators: [{
|
|
758
781
|
type: Injectable,
|
|
759
782
|
args: [{ providedIn: 'root' }]
|
|
760
783
|
}], ctorParameters: function () { return [{ type: i1.Platform }]; } });
|
|
@@ -1153,9 +1176,9 @@ class FocusTrapFactory {
|
|
|
1153
1176
|
return new FocusTrap(element, this._checker, this._ngZone, this._document, deferCaptureElements);
|
|
1154
1177
|
}
|
|
1155
1178
|
}
|
|
1156
|
-
FocusTrapFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
1157
|
-
FocusTrapFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
1158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
1179
|
+
FocusTrapFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: FocusTrapFactory, deps: [{ token: InteractivityChecker }, { token: i0.NgZone }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1180
|
+
FocusTrapFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: FocusTrapFactory, providedIn: 'root' });
|
|
1181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: FocusTrapFactory, decorators: [{
|
|
1159
1182
|
type: Injectable,
|
|
1160
1183
|
args: [{ providedIn: 'root' }]
|
|
1161
1184
|
}], ctorParameters: function () {
|
|
@@ -1229,9 +1252,9 @@ class CdkTrapFocus {
|
|
|
1229
1252
|
this.focusTrap.focusInitialElementWhenReady();
|
|
1230
1253
|
}
|
|
1231
1254
|
}
|
|
1232
|
-
CdkTrapFocus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
1233
|
-
CdkTrapFocus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.
|
|
1234
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
1255
|
+
CdkTrapFocus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTrapFocus, deps: [{ token: i0.ElementRef }, { token: FocusTrapFactory }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1256
|
+
CdkTrapFocus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: { enabled: ["cdkTrapFocus", "enabled"], autoCapture: ["cdkTrapFocusAutoCapture", "autoCapture"] }, exportAs: ["cdkTrapFocus"], usesOnChanges: true, ngImport: i0 });
|
|
1257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkTrapFocus, decorators: [{
|
|
1235
1258
|
type: Directive,
|
|
1236
1259
|
args: [{
|
|
1237
1260
|
selector: '[cdkTrapFocus]',
|
|
@@ -1416,9 +1439,9 @@ class FocusTrapManager {
|
|
|
1416
1439
|
}
|
|
1417
1440
|
}
|
|
1418
1441
|
}
|
|
1419
|
-
FocusTrapManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
1420
|
-
FocusTrapManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
1421
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
1442
|
+
FocusTrapManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: FocusTrapManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1443
|
+
FocusTrapManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: FocusTrapManager, providedIn: 'root' });
|
|
1444
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: FocusTrapManager, decorators: [{
|
|
1422
1445
|
type: Injectable,
|
|
1423
1446
|
args: [{ providedIn: 'root' }]
|
|
1424
1447
|
}] });
|
|
@@ -1451,9 +1474,9 @@ class ConfigurableFocusTrapFactory {
|
|
|
1451
1474
|
return new ConfigurableFocusTrap(element, this._checker, this._ngZone, this._document, this._focusTrapManager, this._inertStrategy, configObject);
|
|
1452
1475
|
}
|
|
1453
1476
|
}
|
|
1454
|
-
ConfigurableFocusTrapFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
1455
|
-
ConfigurableFocusTrapFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
1456
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
1477
|
+
ConfigurableFocusTrapFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: ConfigurableFocusTrapFactory, deps: [{ token: InteractivityChecker }, { token: i0.NgZone }, { token: FocusTrapManager }, { token: DOCUMENT }, { token: FOCUS_TRAP_INERT_STRATEGY, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1478
|
+
ConfigurableFocusTrapFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: ConfigurableFocusTrapFactory, providedIn: 'root' });
|
|
1479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: ConfigurableFocusTrapFactory, decorators: [{
|
|
1457
1480
|
type: Injectable,
|
|
1458
1481
|
args: [{ providedIn: 'root' }]
|
|
1459
1482
|
}], ctorParameters: function () {
|
|
@@ -1479,10 +1502,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
|
|
|
1479
1502
|
function isFakeMousedownFromScreenReader(event) {
|
|
1480
1503
|
// Some screen readers will dispatch a fake `mousedown` event when pressing enter or space on
|
|
1481
1504
|
// a clickable element. We can distinguish these events when both `offsetX` and `offsetY` are
|
|
1482
|
-
// zero
|
|
1483
|
-
//
|
|
1484
|
-
//
|
|
1485
|
-
|
|
1505
|
+
// zero or `event.buttons` is zero, depending on the browser:
|
|
1506
|
+
// - `event.buttons` works on Firefox, but fails on Chrome.
|
|
1507
|
+
// - `offsetX` and `offsetY` work on Chrome, but fail on Firefox.
|
|
1508
|
+
// Note that there's an edge case where the user could click the 0x0 spot of the
|
|
1509
|
+
// screen themselves, but that is unlikely to contain interactive elements.
|
|
1510
|
+
return event.buttons === 0 || (event.offsetX === 0 && event.offsetY === 0);
|
|
1486
1511
|
}
|
|
1487
1512
|
/** Gets whether an event could be a faked `touchstart` event dispatched by a screen reader. */
|
|
1488
1513
|
function isFakeTouchstartFromScreenReader(event) {
|
|
@@ -1647,9 +1672,9 @@ class InputModalityDetector {
|
|
|
1647
1672
|
}
|
|
1648
1673
|
}
|
|
1649
1674
|
}
|
|
1650
|
-
InputModalityDetector.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
1651
|
-
InputModalityDetector.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
1652
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
1675
|
+
InputModalityDetector.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: InputModalityDetector, deps: [{ token: i1.Platform }, { token: i0.NgZone }, { token: DOCUMENT }, { token: INPUT_MODALITY_DETECTOR_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1676
|
+
InputModalityDetector.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: InputModalityDetector, providedIn: 'root' });
|
|
1677
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: InputModalityDetector, decorators: [{
|
|
1653
1678
|
type: Injectable,
|
|
1654
1679
|
args: [{ providedIn: 'root' }]
|
|
1655
1680
|
}], ctorParameters: function () {
|
|
@@ -1763,9 +1788,9 @@ class LiveAnnouncer {
|
|
|
1763
1788
|
return liveEl;
|
|
1764
1789
|
}
|
|
1765
1790
|
}
|
|
1766
|
-
LiveAnnouncer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
1767
|
-
LiveAnnouncer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
1768
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
1791
|
+
LiveAnnouncer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: LiveAnnouncer, deps: [{ token: LIVE_ANNOUNCER_ELEMENT_TOKEN, optional: true }, { token: i0.NgZone }, { token: DOCUMENT }, { token: LIVE_ANNOUNCER_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1792
|
+
LiveAnnouncer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: LiveAnnouncer, providedIn: 'root' });
|
|
1793
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: LiveAnnouncer, decorators: [{
|
|
1769
1794
|
type: Injectable,
|
|
1770
1795
|
args: [{ providedIn: 'root' }]
|
|
1771
1796
|
}], ctorParameters: function () {
|
|
@@ -1829,9 +1854,9 @@ class CdkAriaLive {
|
|
|
1829
1854
|
}
|
|
1830
1855
|
}
|
|
1831
1856
|
}
|
|
1832
|
-
CdkAriaLive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
1833
|
-
CdkAriaLive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.
|
|
1834
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
1857
|
+
CdkAriaLive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkAriaLive, deps: [{ token: i0.ElementRef }, { token: LiveAnnouncer }, { token: i1$1.ContentObserver }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1858
|
+
CdkAriaLive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkAriaLive, selector: "[cdkAriaLive]", inputs: { politeness: ["cdkAriaLive", "politeness"] }, exportAs: ["cdkAriaLive"], ngImport: i0 });
|
|
1859
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkAriaLive, decorators: [{
|
|
1835
1860
|
type: Directive,
|
|
1836
1861
|
args: [{
|
|
1837
1862
|
selector: '[cdkAriaLive]',
|
|
@@ -2177,9 +2202,9 @@ class FocusMonitor {
|
|
|
2177
2202
|
return results;
|
|
2178
2203
|
}
|
|
2179
2204
|
}
|
|
2180
|
-
FocusMonitor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
2181
|
-
FocusMonitor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
2182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
2205
|
+
FocusMonitor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: FocusMonitor, deps: [{ token: i0.NgZone }, { token: i1.Platform }, { token: InputModalityDetector }, { token: DOCUMENT, optional: true }, { token: FOCUS_MONITOR_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2206
|
+
FocusMonitor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: FocusMonitor, providedIn: 'root' });
|
|
2207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: FocusMonitor, decorators: [{
|
|
2183
2208
|
type: Injectable,
|
|
2184
2209
|
args: [{ providedIn: 'root' }]
|
|
2185
2210
|
}], ctorParameters: function () {
|
|
@@ -2223,9 +2248,9 @@ class CdkMonitorFocus {
|
|
|
2223
2248
|
}
|
|
2224
2249
|
}
|
|
2225
2250
|
}
|
|
2226
|
-
CdkMonitorFocus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
2227
|
-
CdkMonitorFocus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.
|
|
2228
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
2251
|
+
CdkMonitorFocus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMonitorFocus, deps: [{ token: i0.ElementRef }, { token: FocusMonitor }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2252
|
+
CdkMonitorFocus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: { cdkFocusChange: "cdkFocusChange" }, ngImport: i0 });
|
|
2253
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: CdkMonitorFocus, decorators: [{
|
|
2229
2254
|
type: Directive,
|
|
2230
2255
|
args: [{
|
|
2231
2256
|
selector: '[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]',
|
|
@@ -2307,9 +2332,9 @@ class HighContrastModeDetector {
|
|
|
2307
2332
|
}
|
|
2308
2333
|
}
|
|
2309
2334
|
}
|
|
2310
|
-
HighContrastModeDetector.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
2311
|
-
HighContrastModeDetector.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
2312
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
2335
|
+
HighContrastModeDetector.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: HighContrastModeDetector, deps: [{ token: i1.Platform }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2336
|
+
HighContrastModeDetector.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: HighContrastModeDetector, providedIn: 'root' });
|
|
2337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: HighContrastModeDetector, decorators: [{
|
|
2313
2338
|
type: Injectable,
|
|
2314
2339
|
args: [{ providedIn: 'root' }]
|
|
2315
2340
|
}], ctorParameters: function () {
|
|
@@ -2331,10 +2356,10 @@ class A11yModule {
|
|
|
2331
2356
|
highContrastModeDetector._applyBodyHighContrastModeCssClasses();
|
|
2332
2357
|
}
|
|
2333
2358
|
}
|
|
2334
|
-
A11yModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
2335
|
-
A11yModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
2336
|
-
A11yModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
2337
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
2359
|
+
A11yModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: A11yModule, deps: [{ token: HighContrastModeDetector }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2360
|
+
A11yModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: A11yModule, declarations: [CdkAriaLive, CdkTrapFocus, CdkMonitorFocus], imports: [PlatformModule, ObserversModule], exports: [CdkAriaLive, CdkTrapFocus, CdkMonitorFocus] });
|
|
2361
|
+
A11yModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: A11yModule, imports: [[PlatformModule, ObserversModule]] });
|
|
2362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: A11yModule, decorators: [{
|
|
2338
2363
|
type: NgModule,
|
|
2339
2364
|
args: [{
|
|
2340
2365
|
imports: [PlatformModule, ObserversModule],
|