@angular/cdk 14.0.0-rc.1 → 14.0.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/esm2020/a11y/aria-describer/aria-describer.mjs +7 -6
- package/esm2020/version.mjs +1 -1
- package/fesm2015/a11y.mjs +6 -5
- package/fesm2015/a11y.mjs.map +1 -1
- package/fesm2015/cdk.mjs +1 -1
- package/fesm2015/cdk.mjs.map +1 -1
- package/fesm2020/a11y.mjs +6 -5
- package/fesm2020/a11y.mjs.map +1 -1
- package/fesm2020/cdk.mjs +1 -1
- package/fesm2020/cdk.mjs.map +1 -1
- package/package.json +3 -3
- 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/schema.json +3 -0
- package/schematics/ng-update/devkit-file-system.js +8 -5
- package/schematics/ng-update/devkit-file-system.mjs +8 -5
- 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/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/fesm2015/cdk.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { Version } from '@angular/core';
|
|
|
8
8
|
* found in the LICENSE file at https://angular.io/license
|
|
9
9
|
*/
|
|
10
10
|
/** Current version of the Angular Component Development Kit. */
|
|
11
|
-
const VERSION = new Version('14.0.
|
|
11
|
+
const VERSION = new Version('14.0.1');
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
package/fesm2015/cdk.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk.mjs","sources":["../../../../../../src/cdk/version.ts","../../../../../../src/cdk/public-api.ts","../../../../../../src/cdk/index.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('14.0.
|
|
1
|
+
{"version":3,"file":"cdk.mjs","sources":["../../../../../../src/cdk/version.ts","../../../../../../src/cdk/public-api.ts","../../../../../../src/cdk/index.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('14.0.1');\n","/**\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\nexport * from './version';\n","/**\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\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;AAMG;AAIH;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;ACXtD;;;;;;AAMG;;ACNH;;;;;;AAMG;;;;"}
|
package/fesm2020/a11y.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DOCUMENT } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Injectable, Inject, QueryList, Directive, Input, InjectionToken, Optional, EventEmitter, Output, NgModule } from '@angular/core';
|
|
3
|
+
import { inject, APP_ID, Injectable, Inject, QueryList, Directive, Input, InjectionToken, Optional, EventEmitter, Output, NgModule } from '@angular/core';
|
|
4
4
|
import * as i1 from '@angular/cdk/platform';
|
|
5
5
|
import { _getFocusedElementPierceShadowDom, normalizePassiveListenerOptions, _getEventTarget, _getShadowRoot } from '@angular/cdk/platform';
|
|
6
6
|
import { Subject, Subscription, BehaviorSubject, of } from 'rxjs';
|
|
@@ -101,6 +101,7 @@ class AriaDescriber {
|
|
|
101
101
|
/** Unique ID for the service. */
|
|
102
102
|
this._id = `${nextId++}`;
|
|
103
103
|
this._document = _document;
|
|
104
|
+
this._id = inject(APP_ID) + '-' + nextId++;
|
|
104
105
|
}
|
|
105
106
|
describe(hostElement, message, role) {
|
|
106
107
|
if (!this._canBeDescribed(hostElement, message)) {
|
|
@@ -109,7 +110,7 @@ class AriaDescriber {
|
|
|
109
110
|
const key = getKey(message, role);
|
|
110
111
|
if (typeof message !== 'string') {
|
|
111
112
|
// We need to ensure that the element has an ID.
|
|
112
|
-
setMessageId(message);
|
|
113
|
+
setMessageId(message, this._id);
|
|
113
114
|
this._messageRegistry.set(key, { messageElement: message, referenceCount: 0 });
|
|
114
115
|
}
|
|
115
116
|
else if (!this._messageRegistry.has(key)) {
|
|
@@ -157,7 +158,7 @@ class AriaDescriber {
|
|
|
157
158
|
*/
|
|
158
159
|
_createMessageElement(message, role) {
|
|
159
160
|
const messageElement = this._document.createElement('div');
|
|
160
|
-
setMessageId(messageElement);
|
|
161
|
+
setMessageId(messageElement, this._id);
|
|
161
162
|
messageElement.textContent = message;
|
|
162
163
|
if (role) {
|
|
163
164
|
messageElement.setAttribute('role', role);
|
|
@@ -273,9 +274,9 @@ function getKey(message, role) {
|
|
|
273
274
|
return typeof message === 'string' ? `${role || ''}/${message}` : message;
|
|
274
275
|
}
|
|
275
276
|
/** Assigns a unique ID to an element, if it doesn't have one already. */
|
|
276
|
-
function setMessageId(element) {
|
|
277
|
+
function setMessageId(element, serviceId) {
|
|
277
278
|
if (!element.id) {
|
|
278
|
-
element.id = `${CDK_DESCRIBEDBY_ID_PREFIX}-${nextId++}`;
|
|
279
|
+
element.id = `${CDK_DESCRIBEDBY_ID_PREFIX}-${serviceId}-${nextId++}`;
|
|
279
280
|
}
|
|
280
281
|
}
|
|
281
282
|
|