@angular/cdk 8.0.0-beta.2 → 8.0.0
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/README.md +2 -2
- package/_overlay.scss +4 -4
- package/bundles/cdk-a11y.umd.js +227 -79
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +1 -1
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-accordion.umd.js +20 -8
- package/bundles/cdk-accordion.umd.js.map +1 -1
- package/bundles/cdk-accordion.umd.min.js.map +1 -1
- package/bundles/cdk-bidi.umd.js +5 -5
- package/bundles/cdk-bidi.umd.min.js +1 -1
- package/bundles/cdk-bidi.umd.min.js.map +1 -1
- package/bundles/cdk-coercion.umd.js +5 -5
- package/bundles/cdk-collections.umd.js +38 -15
- package/bundles/cdk-collections.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.min.js +1 -1
- package/bundles/cdk-collections.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +571 -180
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +2 -2
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-keycodes.umd.js +7 -3
- package/bundles/cdk-keycodes.umd.js.map +1 -1
- package/bundles/cdk-keycodes.umd.min.js.map +1 -1
- package/bundles/cdk-layout.umd.js +83 -30
- package/bundles/cdk-layout.umd.js.map +1 -1
- package/bundles/cdk-layout.umd.min.js +1 -1
- package/bundles/cdk-layout.umd.min.js.map +1 -1
- package/bundles/cdk-observers.umd.js +30 -11
- package/bundles/cdk-observers.umd.js.map +1 -1
- package/bundles/cdk-observers.umd.min.js +1 -1
- package/bundles/cdk-observers.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +229 -108
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +2 -2
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-platform.umd.js +17 -10
- package/bundles/cdk-platform.umd.js.map +1 -1
- package/bundles/cdk-platform.umd.min.js +1 -1
- package/bundles/cdk-platform.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +32 -13
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +184 -62
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +1 -1
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-stepper.umd.js +30 -12
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +384 -74
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js +1 -1
- package/bundles/cdk-table.umd.min.js.map +1 -1
- package/bundles/cdk-text-field.umd.js +61 -21
- package/bundles/cdk-text-field.umd.js.map +1 -1
- package/bundles/cdk-text-field.umd.min.js +1 -1
- package/bundles/cdk-text-field.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +85 -29
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +2 -2
- package/bundles/cdk.umd.js.map +1 -1
- package/bundles/cdk.umd.min.js +1 -1
- package/bundles/cdk.umd.min.js.map +1 -1
- package/drag-drop/typings/directives/drag.d.ts +11 -2
- package/drag-drop/typings/drag-events.d.ts +17 -0
- package/drag-drop/typings/drag-ref.d.ts +9 -5
- package/drag-drop/typings/drop-list-ref.d.ts +9 -3
- package/drag-drop/typings/index.metadata.json +1 -1
- package/esm2015/a11y.js +229 -81
- package/esm2015/a11y.js.map +1 -1
- package/esm2015/accordion.js +22 -10
- package/esm2015/accordion.js.map +1 -1
- package/esm2015/bidi.js +8 -8
- package/esm2015/cdk.js +4 -4
- package/esm2015/cdk.js.map +1 -1
- package/esm2015/coercion.js +7 -7
- package/esm2015/collections.js +41 -18
- package/esm2015/collections.js.map +1 -1
- package/esm2015/drag-drop.js +540 -181
- package/esm2015/drag-drop.js.map +1 -1
- package/esm2015/keycodes.js +9 -5
- package/esm2015/keycodes.js.map +1 -1
- package/esm2015/layout.js +89 -36
- package/esm2015/layout.js.map +1 -1
- package/esm2015/observers.js +33 -14
- package/esm2015/observers.js.map +1 -1
- package/esm2015/overlay.js +232 -110
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/platform.js +20 -13
- package/esm2015/platform.js.map +1 -1
- package/esm2015/portal.js +34 -15
- package/esm2015/portal.js.map +1 -1
- package/esm2015/scrolling.js +180 -58
- package/esm2015/scrolling.js.map +1 -1
- package/esm2015/stepper.js +32 -14
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +369 -69
- package/esm2015/table.js.map +1 -1
- package/esm2015/text-field.js +64 -24
- package/esm2015/text-field.js.map +1 -1
- package/esm2015/tree.js +86 -30
- package/esm2015/tree.js.map +1 -1
- package/esm5/a11y.es5.js +230 -82
- package/esm5/a11y.es5.js.map +1 -1
- package/esm5/accordion.es5.js +22 -10
- package/esm5/accordion.es5.js.map +1 -1
- package/esm5/bidi.es5.js +8 -8
- package/esm5/cdk.es5.js +4 -4
- package/esm5/cdk.es5.js.map +1 -1
- package/esm5/coercion.es5.js +7 -7
- package/esm5/collections.es5.js +42 -19
- package/esm5/collections.es5.js.map +1 -1
- package/esm5/drag-drop.es5.js +574 -183
- package/esm5/drag-drop.es5.js.map +1 -1
- package/esm5/keycodes.es5.js +9 -5
- package/esm5/keycodes.es5.js.map +1 -1
- package/esm5/layout.es5.js +86 -33
- package/esm5/layout.es5.js.map +1 -1
- package/esm5/observers.es5.js +33 -14
- package/esm5/observers.es5.js.map +1 -1
- package/esm5/overlay.es5.js +232 -111
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/platform.es5.js +20 -13
- package/esm5/platform.es5.js.map +1 -1
- package/esm5/portal.es5.js +34 -15
- package/esm5/portal.es5.js.map +1 -1
- package/esm5/scrolling.es5.js +187 -65
- package/esm5/scrolling.es5.js.map +1 -1
- package/esm5/stepper.es5.js +32 -14
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +386 -72
- package/esm5/table.es5.js.map +1 -1
- package/esm5/text-field.es5.js +64 -24
- package/esm5/text-field.es5.js.map +1 -1
- package/esm5/tree.es5.js +87 -31
- package/esm5/tree.es5.js.map +1 -1
- package/layout/typings/breakpoints-observer.d.ts +3 -3
- package/layout/typings/index.metadata.json +1 -1
- package/layout/typings/media-matcher.d.ts +2 -2
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/position/flexible-connected-position-strategy.d.ts +1 -3
- package/package.json +8 -8
- package/portal/typings/portal.d.ts +2 -2
- package/schematics/ng-update/data/attribute-selectors.js +1 -1
- package/schematics/ng-update/data/attribute-selectors.js.map +1 -1
- package/schematics/ng-update/data/class-names.js +3 -3
- package/schematics/ng-update/data/class-names.js.map +1 -1
- package/schematics/ng-update/data/constructor-checks.js +1 -1
- package/schematics/ng-update/data/constructor-checks.js.map +1 -1
- package/schematics/ng-update/data/input-names.js +1 -1
- package/schematics/ng-update/data/input-names.js.map +1 -1
- package/schematics/ng-update/data/method-call-checks.js +1 -1
- package/schematics/ng-update/data/method-call-checks.js.map +1 -1
- package/schematics/ng-update/data/property-names.js +4 -4
- package/schematics/ng-update/data/property-names.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js +1 -1
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js.map +1 -1
- package/schematics/tsconfig.tsbuildinfo +5811 -0
- package/schematics/utils/ast.d.ts +1 -1
- package/schematics/utils/build-component.js +1 -1
- package/schematics/utils/build-component.js.map +1 -1
- package/schematics/utils/get-project.d.ts +1 -1
- package/schematics/utils/project-main-file.d.ts +1 -1
- package/schematics/utils/project-style-file.d.ts +1 -1
- package/schematics/utils/project-targets.d.ts +1 -1
- package/schematics/utils/schematic-options.d.ts +1 -1
- package/table/typings/cell.d.ts +3 -2
- package/table/typings/index.metadata.json +1 -1
- package/table/typings/public-api.d.ts +1 -0
- package/table/typings/row.d.ts +5 -4
- package/table/typings/sticky-styler.d.ts +5 -5
- package/table/typings/table-errors.d.ts +10 -0
- package/table/typings/text-column.d.ts +80 -0
- package/typings/drag-drop/directives/drag.d.ts +11 -2
- package/typings/drag-drop/drag-events.d.ts +17 -0
- package/typings/drag-drop/drag-ref.d.ts +9 -5
- package/typings/drag-drop/drop-list-ref.d.ts +9 -3
- package/typings/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/drag-drop/directives/drag.d.ts +11 -2
- package/typings/esm5/drag-drop/drag-events.d.ts +17 -0
- package/typings/esm5/drag-drop/drag-ref.d.ts +9 -5
- package/typings/esm5/drag-drop/drop-list-ref.d.ts +9 -3
- package/typings/esm5/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/layout/breakpoints-observer.d.ts +3 -3
- package/typings/esm5/layout/index.metadata.json +1 -1
- package/typings/esm5/layout/media-matcher.d.ts +2 -2
- package/typings/esm5/overlay/index.metadata.json +1 -1
- package/typings/esm5/overlay/position/flexible-connected-position-strategy.d.ts +1 -3
- package/typings/esm5/portal/portal.d.ts +2 -2
- package/typings/esm5/table/cell.d.ts +3 -2
- package/typings/esm5/table/index.metadata.json +1 -1
- package/typings/esm5/table/public-api.d.ts +1 -0
- package/typings/esm5/table/row.d.ts +5 -4
- package/typings/esm5/table/sticky-styler.d.ts +5 -5
- package/typings/esm5/table/table-errors.d.ts +10 -0
- package/typings/esm5/table/text-column.d.ts +80 -0
- package/typings/index.metadata.json +1 -1
- package/typings/layout/breakpoints-observer.d.ts +3 -3
- package/typings/layout/index.metadata.json +1 -1
- package/typings/layout/media-matcher.d.ts +2 -2
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/position/flexible-connected-position-strategy.d.ts +1 -3
- package/typings/portal/portal.d.ts +2 -2
- package/typings/schematics/utils/ast.d.ts +1 -1
- package/typings/schematics/utils/get-project.d.ts +1 -1
- package/typings/schematics/utils/project-main-file.d.ts +1 -1
- package/typings/schematics/utils/project-style-file.d.ts +1 -1
- package/typings/schematics/utils/project-targets.d.ts +1 -1
- package/typings/schematics/utils/schematic-options.d.ts +1 -1
- package/typings/table/cell.d.ts +3 -2
- package/typings/table/index.metadata.json +1 -1
- package/typings/table/public-api.d.ts +1 -0
- package/typings/table/row.d.ts +5 -4
- package/typings/table/sticky-styler.d.ts +5 -5
- package/typings/table/table-errors.d.ts +10 -0
- package/typings/table/text-column.d.ts +80 -0
package/esm5/a11y.es5.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
9
|
-
import { Inject, Injectable, Optional, SkipSelf, QueryList, Directive, ElementRef, Input, NgZone, isDevMode, InjectionToken, EventEmitter, Output, NgModule,
|
|
9
|
+
import { Inject, Injectable, Optional, SkipSelf, QueryList, Directive, ElementRef, Input, NgZone, isDevMode, InjectionToken, EventEmitter, Output, NgModule, ɵɵdefineInjectable, ɵɵinject } from '@angular/core';
|
|
10
10
|
import { Subject, Subscription, of } from 'rxjs';
|
|
11
11
|
import { UP_ARROW, DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW, TAB, A, Z, ZERO, NINE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
12
12
|
import { debounceTime, filter, map, tap, take } from 'rxjs/operators';
|
|
@@ -17,7 +17,7 @@ import { ContentObserver, ObserversModule } from '@angular/cdk/observers';
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* @fileoverview added by tsickle
|
|
20
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
20
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -36,7 +36,11 @@ var ID_DELIMINATOR = ' ';
|
|
|
36
36
|
function addAriaReferencedId(el, attr, id) {
|
|
37
37
|
/** @type {?} */
|
|
38
38
|
var ids = getAriaReferenceIds(el, attr);
|
|
39
|
-
if (ids.some(
|
|
39
|
+
if (ids.some((/**
|
|
40
|
+
* @param {?} existingId
|
|
41
|
+
* @return {?}
|
|
42
|
+
*/
|
|
43
|
+
function (existingId) { return existingId.trim() == id.trim(); }))) {
|
|
40
44
|
return;
|
|
41
45
|
}
|
|
42
46
|
ids.push(id.trim());
|
|
@@ -54,7 +58,11 @@ function removeAriaReferencedId(el, attr, id) {
|
|
|
54
58
|
/** @type {?} */
|
|
55
59
|
var ids = getAriaReferenceIds(el, attr);
|
|
56
60
|
/** @type {?} */
|
|
57
|
-
var filteredIds = ids.filter(
|
|
61
|
+
var filteredIds = ids.filter((/**
|
|
62
|
+
* @param {?} val
|
|
63
|
+
* @return {?}
|
|
64
|
+
*/
|
|
65
|
+
function (val) { return val != id.trim(); }));
|
|
58
66
|
el.setAttribute(attr, filteredIds.join(ID_DELIMINATOR));
|
|
59
67
|
}
|
|
60
68
|
/**
|
|
@@ -71,7 +79,7 @@ function getAriaReferenceIds(el, attr) {
|
|
|
71
79
|
|
|
72
80
|
/**
|
|
73
81
|
* @fileoverview added by tsickle
|
|
74
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
82
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
75
83
|
*/
|
|
76
84
|
/**
|
|
77
85
|
* ID used for the body container where all messages are appended.
|
|
@@ -308,7 +316,11 @@ var AriaDescriber = /** @class */ (function () {
|
|
|
308
316
|
// Remove all aria-describedby reference IDs that are prefixed by CDK_DESCRIBEDBY_ID_PREFIX
|
|
309
317
|
/** @type {?} */
|
|
310
318
|
var originalReferenceIds = getAriaReferenceIds(element, 'aria-describedby')
|
|
311
|
-
.filter(
|
|
319
|
+
.filter((/**
|
|
320
|
+
* @param {?} id
|
|
321
|
+
* @return {?}
|
|
322
|
+
*/
|
|
323
|
+
function (id) { return id.indexOf(CDK_DESCRIBEDBY_ID_PREFIX) != 0; }));
|
|
312
324
|
element.setAttribute('aria-describedby', originalReferenceIds.join(' '));
|
|
313
325
|
};
|
|
314
326
|
/**
|
|
@@ -441,7 +453,7 @@ var AriaDescriber = /** @class */ (function () {
|
|
|
441
453
|
AriaDescriber.ctorParameters = function () { return [
|
|
442
454
|
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
|
|
443
455
|
]; };
|
|
444
|
-
/** @nocollapse */ AriaDescriber.ngInjectableDef =
|
|
456
|
+
/** @nocollapse */ AriaDescriber.ngInjectableDef = ɵɵdefineInjectable({ factory: function AriaDescriber_Factory() { return new AriaDescriber(ɵɵinject(DOCUMENT)); }, token: AriaDescriber, providedIn: "root" });
|
|
445
457
|
return AriaDescriber;
|
|
446
458
|
}());
|
|
447
459
|
/**
|
|
@@ -469,7 +481,7 @@ var ARIA_DESCRIBER_PROVIDER = {
|
|
|
469
481
|
|
|
470
482
|
/**
|
|
471
483
|
* @fileoverview added by tsickle
|
|
472
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
484
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
473
485
|
*/
|
|
474
486
|
/**
|
|
475
487
|
* This class manages keyboard events for selectable lists. If you pass it a query list
|
|
@@ -496,7 +508,11 @@ ListKeyManager = /** @class */ (function () {
|
|
|
496
508
|
* Predicate function that can be used to check whether an item should be skipped
|
|
497
509
|
* by the key manager. By default, disabled items are skipped.
|
|
498
510
|
*/
|
|
499
|
-
this._skipPredicateFn =
|
|
511
|
+
this._skipPredicateFn = (/**
|
|
512
|
+
* @param {?} item
|
|
513
|
+
* @return {?}
|
|
514
|
+
*/
|
|
515
|
+
function (item) { return item.disabled; });
|
|
500
516
|
// Buffer for the letters that the user has pressed when the typeahead option is turned on.
|
|
501
517
|
this._pressedLetters = [];
|
|
502
518
|
/**
|
|
@@ -512,7 +528,11 @@ ListKeyManager = /** @class */ (function () {
|
|
|
512
528
|
// not have access to a QueryList of the items they want to manage (e.g. when the
|
|
513
529
|
// items aren't being collected via `ViewChildren` or `ContentChildren`).
|
|
514
530
|
if (_items instanceof QueryList) {
|
|
515
|
-
_items.changes.subscribe(
|
|
531
|
+
_items.changes.subscribe((/**
|
|
532
|
+
* @param {?} newItems
|
|
533
|
+
* @return {?}
|
|
534
|
+
*/
|
|
535
|
+
function (newItems) {
|
|
516
536
|
if (_this._activeItem) {
|
|
517
537
|
/** @type {?} */
|
|
518
538
|
var itemArray = newItems.toArray();
|
|
@@ -522,7 +542,7 @@ ListKeyManager = /** @class */ (function () {
|
|
|
522
542
|
_this._activeItemIndex = newIndex;
|
|
523
543
|
}
|
|
524
544
|
}
|
|
525
|
-
});
|
|
545
|
+
}));
|
|
526
546
|
}
|
|
527
547
|
}
|
|
528
548
|
/**
|
|
@@ -669,14 +689,32 @@ ListKeyManager = /** @class */ (function () {
|
|
|
669
689
|
function (debounceInterval) {
|
|
670
690
|
var _this = this;
|
|
671
691
|
if (debounceInterval === void 0) { debounceInterval = 200; }
|
|
672
|
-
if ((/** @type {?} */ (this))._items.length && (/** @type {?} */ (this))._items.some(
|
|
692
|
+
if ((/** @type {?} */ (this))._items.length && (/** @type {?} */ (this))._items.some((/**
|
|
693
|
+
* @param {?} item
|
|
694
|
+
* @return {?}
|
|
695
|
+
*/
|
|
696
|
+
function (item) { return typeof item.getLabel !== 'function'; }))) {
|
|
673
697
|
throw Error('ListKeyManager items in typeahead mode must implement the `getLabel` method.');
|
|
674
698
|
}
|
|
675
699
|
(/** @type {?} */ (this))._typeaheadSubscription.unsubscribe();
|
|
676
700
|
// Debounce the presses of non-navigational keys, collect the ones that correspond to letters
|
|
677
701
|
// and convert those letters back into a string. Afterwards find the first item that starts
|
|
678
702
|
// with that string and select it.
|
|
679
|
-
(/** @type {?} */ (this))._typeaheadSubscription = (/** @type {?} */ (this))._letterKeyStream.pipe(tap(
|
|
703
|
+
(/** @type {?} */ (this))._typeaheadSubscription = (/** @type {?} */ (this))._letterKeyStream.pipe(tap((/**
|
|
704
|
+
* @param {?} keyCode
|
|
705
|
+
* @return {?}
|
|
706
|
+
*/
|
|
707
|
+
function (keyCode) { return (/** @type {?} */ (_this))._pressedLetters.push(keyCode); })), debounceTime(debounceInterval), filter((/**
|
|
708
|
+
* @return {?}
|
|
709
|
+
*/
|
|
710
|
+
function () { return (/** @type {?} */ (_this))._pressedLetters.length > 0; })), map((/**
|
|
711
|
+
* @return {?}
|
|
712
|
+
*/
|
|
713
|
+
function () { return (/** @type {?} */ (_this))._pressedLetters.join(''); }))).subscribe((/**
|
|
714
|
+
* @param {?} inputString
|
|
715
|
+
* @return {?}
|
|
716
|
+
*/
|
|
717
|
+
function (inputString) {
|
|
680
718
|
/** @type {?} */
|
|
681
719
|
var items = (/** @type {?} */ (_this))._getItemsArray();
|
|
682
720
|
// Start at 1 because we want to start searching at the item immediately
|
|
@@ -693,7 +731,7 @@ ListKeyManager = /** @class */ (function () {
|
|
|
693
731
|
}
|
|
694
732
|
}
|
|
695
733
|
(/** @type {?} */ (_this))._pressedLetters = [];
|
|
696
|
-
});
|
|
734
|
+
}));
|
|
697
735
|
return (/** @type {?} */ (this));
|
|
698
736
|
};
|
|
699
737
|
/**
|
|
@@ -733,9 +771,13 @@ ListKeyManager = /** @class */ (function () {
|
|
|
733
771
|
/** @type {?} */
|
|
734
772
|
var modifiers = ['altKey', 'ctrlKey', 'metaKey', 'shiftKey'];
|
|
735
773
|
/** @type {?} */
|
|
736
|
-
var isModifierAllowed = modifiers.every(
|
|
774
|
+
var isModifierAllowed = modifiers.every((/**
|
|
775
|
+
* @param {?} modifier
|
|
776
|
+
* @return {?}
|
|
777
|
+
*/
|
|
778
|
+
function (modifier) {
|
|
737
779
|
return !event[modifier] || _this._allowedModifierKeys.indexOf(modifier) > -1;
|
|
738
|
-
});
|
|
780
|
+
}));
|
|
739
781
|
switch (keyCode) {
|
|
740
782
|
case TAB:
|
|
741
783
|
this.tabOut.next();
|
|
@@ -1044,7 +1086,7 @@ ListKeyManager = /** @class */ (function () {
|
|
|
1044
1086
|
|
|
1045
1087
|
/**
|
|
1046
1088
|
* @fileoverview added by tsickle
|
|
1047
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1089
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1048
1090
|
*/
|
|
1049
1091
|
/**
|
|
1050
1092
|
* @template T
|
|
@@ -1079,7 +1121,7 @@ ActiveDescendantKeyManager = /** @class */ (function (_super) {
|
|
|
1079
1121
|
|
|
1080
1122
|
/**
|
|
1081
1123
|
* @fileoverview added by tsickle
|
|
1082
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1124
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1083
1125
|
*/
|
|
1084
1126
|
/**
|
|
1085
1127
|
* @template T
|
|
@@ -1135,7 +1177,7 @@ FocusKeyManager = /** @class */ (function (_super) {
|
|
|
1135
1177
|
|
|
1136
1178
|
/**
|
|
1137
1179
|
* @fileoverview added by tsickle
|
|
1138
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1180
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1139
1181
|
*/
|
|
1140
1182
|
// The InteractivityChecker leans heavily on the ally.js accessibility utilities.
|
|
1141
1183
|
// Methods like `isTabbable` are only covering specific edge-cases for the browsers which are
|
|
@@ -1316,7 +1358,7 @@ var InteractivityChecker = /** @class */ (function () {
|
|
|
1316
1358
|
InteractivityChecker.ctorParameters = function () { return [
|
|
1317
1359
|
{ type: Platform }
|
|
1318
1360
|
]; };
|
|
1319
|
-
/** @nocollapse */ InteractivityChecker.ngInjectableDef =
|
|
1361
|
+
/** @nocollapse */ InteractivityChecker.ngInjectableDef = ɵɵdefineInjectable({ factory: function InteractivityChecker_Factory() { return new InteractivityChecker(ɵɵinject(Platform)); }, token: InteractivityChecker, providedIn: "root" });
|
|
1320
1362
|
return InteractivityChecker;
|
|
1321
1363
|
}());
|
|
1322
1364
|
/**
|
|
@@ -1465,7 +1507,7 @@ function getWindow(node) {
|
|
|
1465
1507
|
|
|
1466
1508
|
/**
|
|
1467
1509
|
* @fileoverview added by tsickle
|
|
1468
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1510
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1469
1511
|
*/
|
|
1470
1512
|
/**
|
|
1471
1513
|
* Class that allows for trapping focus within a DOM element.
|
|
@@ -1483,16 +1525,22 @@ var /**
|
|
|
1483
1525
|
*/
|
|
1484
1526
|
FocusTrap = /** @class */ (function () {
|
|
1485
1527
|
function FocusTrap(_element, _checker, _ngZone, _document, deferAnchors) {
|
|
1486
|
-
if (deferAnchors === void 0) { deferAnchors = false; }
|
|
1487
1528
|
var _this = this;
|
|
1529
|
+
if (deferAnchors === void 0) { deferAnchors = false; }
|
|
1488
1530
|
this._element = _element;
|
|
1489
1531
|
this._checker = _checker;
|
|
1490
1532
|
this._ngZone = _ngZone;
|
|
1491
1533
|
this._document = _document;
|
|
1492
1534
|
this._hasAttached = false;
|
|
1493
1535
|
// Event listeners for the anchors. Need to be regular functions so that we can unbind them later.
|
|
1494
|
-
this.startAnchorListener =
|
|
1495
|
-
|
|
1536
|
+
this.startAnchorListener = (/**
|
|
1537
|
+
* @return {?}
|
|
1538
|
+
*/
|
|
1539
|
+
function () { return _this.focusLastTabbableElement(); });
|
|
1540
|
+
this.endAnchorListener = (/**
|
|
1541
|
+
* @return {?}
|
|
1542
|
+
*/
|
|
1543
|
+
function () { return _this.focusFirstTabbableElement(); });
|
|
1496
1544
|
this._enabled = true;
|
|
1497
1545
|
if (!deferAnchors) {
|
|
1498
1546
|
this.attachAnchors();
|
|
@@ -1571,7 +1619,10 @@ FocusTrap = /** @class */ (function () {
|
|
|
1571
1619
|
if (this._hasAttached) {
|
|
1572
1620
|
return true;
|
|
1573
1621
|
}
|
|
1574
|
-
this._ngZone.runOutsideAngular(
|
|
1622
|
+
this._ngZone.runOutsideAngular((/**
|
|
1623
|
+
* @return {?}
|
|
1624
|
+
*/
|
|
1625
|
+
function () {
|
|
1575
1626
|
if (!_this._startAnchor) {
|
|
1576
1627
|
_this._startAnchor = _this._createAnchor();
|
|
1577
1628
|
(/** @type {?} */ (_this._startAnchor)).addEventListener('focus', _this.startAnchorListener);
|
|
@@ -1580,7 +1631,7 @@ FocusTrap = /** @class */ (function () {
|
|
|
1580
1631
|
_this._endAnchor = _this._createAnchor();
|
|
1581
1632
|
(/** @type {?} */ (_this._endAnchor)).addEventListener('focus', _this.endAnchorListener);
|
|
1582
1633
|
}
|
|
1583
|
-
});
|
|
1634
|
+
}));
|
|
1584
1635
|
if (this._element.parentNode) {
|
|
1585
1636
|
this._element.parentNode.insertBefore((/** @type {?} */ (this._startAnchor)), this._element);
|
|
1586
1637
|
this._element.parentNode.insertBefore((/** @type {?} */ (this._endAnchor)), this._element.nextSibling);
|
|
@@ -1608,9 +1659,16 @@ FocusTrap = /** @class */ (function () {
|
|
|
1608
1659
|
*/
|
|
1609
1660
|
function () {
|
|
1610
1661
|
var _this = this;
|
|
1611
|
-
return new Promise(
|
|
1612
|
-
|
|
1613
|
-
|
|
1662
|
+
return new Promise((/**
|
|
1663
|
+
* @param {?} resolve
|
|
1664
|
+
* @return {?}
|
|
1665
|
+
*/
|
|
1666
|
+
function (resolve) {
|
|
1667
|
+
_this._executeOnStable((/**
|
|
1668
|
+
* @return {?}
|
|
1669
|
+
*/
|
|
1670
|
+
function () { return resolve(_this.focusInitialElement()); }));
|
|
1671
|
+
}));
|
|
1614
1672
|
};
|
|
1615
1673
|
/**
|
|
1616
1674
|
* Waits for the zone to stabilize, then focuses
|
|
@@ -1632,9 +1690,16 @@ FocusTrap = /** @class */ (function () {
|
|
|
1632
1690
|
*/
|
|
1633
1691
|
function () {
|
|
1634
1692
|
var _this = this;
|
|
1635
|
-
return new Promise(
|
|
1636
|
-
|
|
1637
|
-
|
|
1693
|
+
return new Promise((/**
|
|
1694
|
+
* @param {?} resolve
|
|
1695
|
+
* @return {?}
|
|
1696
|
+
*/
|
|
1697
|
+
function (resolve) {
|
|
1698
|
+
_this._executeOnStable((/**
|
|
1699
|
+
* @return {?}
|
|
1700
|
+
*/
|
|
1701
|
+
function () { return resolve(_this.focusFirstTabbableElement()); }));
|
|
1702
|
+
}));
|
|
1638
1703
|
};
|
|
1639
1704
|
/**
|
|
1640
1705
|
* Waits for the zone to stabilize, then focuses
|
|
@@ -1656,9 +1721,16 @@ FocusTrap = /** @class */ (function () {
|
|
|
1656
1721
|
*/
|
|
1657
1722
|
function () {
|
|
1658
1723
|
var _this = this;
|
|
1659
|
-
return new Promise(
|
|
1660
|
-
|
|
1661
|
-
|
|
1724
|
+
return new Promise((/**
|
|
1725
|
+
* @param {?} resolve
|
|
1726
|
+
* @return {?}
|
|
1727
|
+
*/
|
|
1728
|
+
function (resolve) {
|
|
1729
|
+
_this._executeOnStable((/**
|
|
1730
|
+
* @return {?}
|
|
1731
|
+
*/
|
|
1732
|
+
function () { return resolve(_this.focusLastTabbableElement()); }));
|
|
1733
|
+
}));
|
|
1662
1734
|
};
|
|
1663
1735
|
/**
|
|
1664
1736
|
* Get the specified boundary element of the trapped region.
|
|
@@ -1963,7 +2035,7 @@ var FocusTrapFactory = /** @class */ (function () {
|
|
|
1963
2035
|
{ type: NgZone },
|
|
1964
2036
|
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
|
|
1965
2037
|
]; };
|
|
1966
|
-
/** @nocollapse */ FocusTrapFactory.ngInjectableDef =
|
|
2038
|
+
/** @nocollapse */ FocusTrapFactory.ngInjectableDef = ɵɵdefineInjectable({ factory: function FocusTrapFactory_Factory() { return new FocusTrapFactory(ɵɵinject(InteractivityChecker), ɵɵinject(NgZone), ɵɵinject(DOCUMENT)); }, token: FocusTrapFactory, providedIn: "root" });
|
|
1967
2039
|
return FocusTrapFactory;
|
|
1968
2040
|
}());
|
|
1969
2041
|
/**
|
|
@@ -2074,7 +2146,7 @@ var CdkTrapFocus = /** @class */ (function () {
|
|
|
2074
2146
|
|
|
2075
2147
|
/**
|
|
2076
2148
|
* @fileoverview added by tsickle
|
|
2077
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2149
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2078
2150
|
*/
|
|
2079
2151
|
/** @type {?} */
|
|
2080
2152
|
var LIVE_ANNOUNCER_ELEMENT_TOKEN = new InjectionToken('liveAnnouncerElement', {
|
|
@@ -2096,7 +2168,7 @@ var LIVE_ANNOUNCER_DEFAULT_OPTIONS = new InjectionToken('LIVE_ANNOUNCER_DEFAULT_
|
|
|
2096
2168
|
|
|
2097
2169
|
/**
|
|
2098
2170
|
* @fileoverview added by tsickle
|
|
2099
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2171
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2100
2172
|
*/
|
|
2101
2173
|
var LiveAnnouncer = /** @class */ (function () {
|
|
2102
2174
|
function LiveAnnouncer(elementToken, _ngZone, _document, _defaultOptions) {
|
|
@@ -2152,18 +2224,31 @@ var LiveAnnouncer = /** @class */ (function () {
|
|
|
2152
2224
|
// - With Chrome and IE11 with NVDA or JAWS, a repeated (identical) message won't be read a
|
|
2153
2225
|
// second time without clearing and then using a non-zero delay.
|
|
2154
2226
|
// (using JAWS 17 at time of this writing).
|
|
2155
|
-
return this._ngZone.runOutsideAngular(
|
|
2156
|
-
|
|
2227
|
+
return this._ngZone.runOutsideAngular((/**
|
|
2228
|
+
* @return {?}
|
|
2229
|
+
*/
|
|
2230
|
+
function () {
|
|
2231
|
+
return new Promise((/**
|
|
2232
|
+
* @param {?} resolve
|
|
2233
|
+
* @return {?}
|
|
2234
|
+
*/
|
|
2235
|
+
function (resolve) {
|
|
2157
2236
|
clearTimeout(_this._previousTimeout);
|
|
2158
|
-
_this._previousTimeout = setTimeout(
|
|
2237
|
+
_this._previousTimeout = setTimeout((/**
|
|
2238
|
+
* @return {?}
|
|
2239
|
+
*/
|
|
2240
|
+
function () {
|
|
2159
2241
|
_this._liveElement.textContent = message;
|
|
2160
2242
|
resolve();
|
|
2161
2243
|
if (typeof duration === 'number') {
|
|
2162
|
-
_this._previousTimeout = setTimeout(
|
|
2244
|
+
_this._previousTimeout = setTimeout((/**
|
|
2245
|
+
* @return {?}
|
|
2246
|
+
*/
|
|
2247
|
+
function () { return _this.clear(); }), duration);
|
|
2163
2248
|
}
|
|
2164
|
-
}, 100);
|
|
2165
|
-
});
|
|
2166
|
-
});
|
|
2249
|
+
}), 100);
|
|
2250
|
+
}));
|
|
2251
|
+
}));
|
|
2167
2252
|
};
|
|
2168
2253
|
/**
|
|
2169
2254
|
* Clears the current text from the announcer element. Can be used to prevent
|
|
@@ -2236,7 +2321,7 @@ var LiveAnnouncer = /** @class */ (function () {
|
|
|
2236
2321
|
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
2237
2322
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [LIVE_ANNOUNCER_DEFAULT_OPTIONS,] }] }
|
|
2238
2323
|
]; };
|
|
2239
|
-
/** @nocollapse */ LiveAnnouncer.ngInjectableDef =
|
|
2324
|
+
/** @nocollapse */ LiveAnnouncer.ngInjectableDef = ɵɵdefineInjectable({ factory: function LiveAnnouncer_Factory() { return new LiveAnnouncer(ɵɵinject(LIVE_ANNOUNCER_ELEMENT_TOKEN, 8), ɵɵinject(NgZone), ɵɵinject(DOCUMENT), ɵɵinject(LIVE_ANNOUNCER_DEFAULT_OPTIONS, 8)); }, token: LiveAnnouncer, providedIn: "root" });
|
|
2240
2325
|
return LiveAnnouncer;
|
|
2241
2326
|
}());
|
|
2242
2327
|
/**
|
|
@@ -2272,10 +2357,16 @@ var CdkAriaLive = /** @class */ (function () {
|
|
|
2272
2357
|
}
|
|
2273
2358
|
}
|
|
2274
2359
|
else if (!this._subscription) {
|
|
2275
|
-
this._subscription = this._ngZone.runOutsideAngular(
|
|
2360
|
+
this._subscription = this._ngZone.runOutsideAngular((/**
|
|
2361
|
+
* @return {?}
|
|
2362
|
+
*/
|
|
2363
|
+
function () {
|
|
2276
2364
|
return _this._contentObserver
|
|
2277
2365
|
.observe(_this._elementRef)
|
|
2278
|
-
.subscribe(
|
|
2366
|
+
.subscribe((/**
|
|
2367
|
+
* @return {?}
|
|
2368
|
+
*/
|
|
2369
|
+
function () {
|
|
2279
2370
|
// Note that we use textContent here, rather than innerText, in order to avoid a reflow.
|
|
2280
2371
|
/** @type {?} */
|
|
2281
2372
|
var elementText = _this._elementRef.nativeElement.textContent;
|
|
@@ -2285,8 +2376,8 @@ var CdkAriaLive = /** @class */ (function () {
|
|
|
2285
2376
|
_this._liveAnnouncer.announce(elementText, _this._politeness);
|
|
2286
2377
|
_this._previousAnnouncedText = elementText;
|
|
2287
2378
|
}
|
|
2288
|
-
});
|
|
2289
|
-
});
|
|
2379
|
+
}));
|
|
2380
|
+
}));
|
|
2290
2381
|
}
|
|
2291
2382
|
},
|
|
2292
2383
|
enumerable: true,
|
|
@@ -2350,7 +2441,7 @@ var LIVE_ANNOUNCER_PROVIDER = {
|
|
|
2350
2441
|
|
|
2351
2442
|
/**
|
|
2352
2443
|
* @fileoverview added by tsickle
|
|
2353
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2444
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2354
2445
|
*/
|
|
2355
2446
|
// This is the value used by AngularJS Material. Through trial and error (on iPhone 6S) they found
|
|
2356
2447
|
// that a value of around 650ms seems appropriate.
|
|
@@ -2358,7 +2449,7 @@ var LIVE_ANNOUNCER_PROVIDER = {
|
|
|
2358
2449
|
var TOUCH_BUFFER_MS = 650;
|
|
2359
2450
|
/**
|
|
2360
2451
|
* Event listener options that enable capturing and also
|
|
2361
|
-
* mark the
|
|
2452
|
+
* mark the listener as passive if the browser supports it.
|
|
2362
2453
|
* @type {?}
|
|
2363
2454
|
*/
|
|
2364
2455
|
var captureEventListenerOptions = normalizePassiveListenerOptions({
|
|
@@ -2393,27 +2484,37 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2393
2484
|
* Event listener for `keydown` events on the document.
|
|
2394
2485
|
* Needs to be an arrow function in order to preserve the context when it gets bound.
|
|
2395
2486
|
*/
|
|
2396
|
-
this._documentKeydownListener =
|
|
2487
|
+
this._documentKeydownListener = (/**
|
|
2488
|
+
* @return {?}
|
|
2489
|
+
*/
|
|
2490
|
+
function () {
|
|
2397
2491
|
// On keydown record the origin and clear any touch event that may be in progress.
|
|
2398
2492
|
_this._lastTouchTarget = null;
|
|
2399
2493
|
_this._setOriginForCurrentEventQueue('keyboard');
|
|
2400
|
-
};
|
|
2494
|
+
});
|
|
2401
2495
|
/**
|
|
2402
2496
|
* Event listener for `mousedown` events on the document.
|
|
2403
2497
|
* Needs to be an arrow function in order to preserve the context when it gets bound.
|
|
2404
2498
|
*/
|
|
2405
|
-
this._documentMousedownListener =
|
|
2499
|
+
this._documentMousedownListener = (/**
|
|
2500
|
+
* @return {?}
|
|
2501
|
+
*/
|
|
2502
|
+
function () {
|
|
2406
2503
|
// On mousedown record the origin only if there is not touch
|
|
2407
2504
|
// target, since a mousedown can happen as a result of a touch event.
|
|
2408
2505
|
if (!_this._lastTouchTarget) {
|
|
2409
2506
|
_this._setOriginForCurrentEventQueue('mouse');
|
|
2410
2507
|
}
|
|
2411
|
-
};
|
|
2508
|
+
});
|
|
2412
2509
|
/**
|
|
2413
2510
|
* Event listener for `touchstart` events on the document.
|
|
2414
2511
|
* Needs to be an arrow function in order to preserve the context when it gets bound.
|
|
2415
2512
|
*/
|
|
2416
|
-
this._documentTouchstartListener =
|
|
2513
|
+
this._documentTouchstartListener = (/**
|
|
2514
|
+
* @param {?} event
|
|
2515
|
+
* @return {?}
|
|
2516
|
+
*/
|
|
2517
|
+
function (event) {
|
|
2417
2518
|
// When the touchstart event fires the focus event is not yet in the event queue. This means
|
|
2418
2519
|
// we can't rely on the trick used above (setting timeout of 1ms). Instead we wait 650ms to
|
|
2419
2520
|
// see if a focus happens.
|
|
@@ -2421,18 +2522,27 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2421
2522
|
clearTimeout(_this._touchTimeoutId);
|
|
2422
2523
|
}
|
|
2423
2524
|
_this._lastTouchTarget = event.target;
|
|
2424
|
-
_this._touchTimeoutId = setTimeout(
|
|
2425
|
-
|
|
2525
|
+
_this._touchTimeoutId = setTimeout((/**
|
|
2526
|
+
* @return {?}
|
|
2527
|
+
*/
|
|
2528
|
+
function () { return _this._lastTouchTarget = null; }), TOUCH_BUFFER_MS);
|
|
2529
|
+
});
|
|
2426
2530
|
/**
|
|
2427
2531
|
* Event listener for `focus` events on the window.
|
|
2428
2532
|
* Needs to be an arrow function in order to preserve the context when it gets bound.
|
|
2429
2533
|
*/
|
|
2430
|
-
this._windowFocusListener =
|
|
2534
|
+
this._windowFocusListener = (/**
|
|
2535
|
+
* @return {?}
|
|
2536
|
+
*/
|
|
2537
|
+
function () {
|
|
2431
2538
|
// Make a note of when the window regains focus, so we can
|
|
2432
2539
|
// restore the origin info for the focused element.
|
|
2433
2540
|
_this._windowFocused = true;
|
|
2434
|
-
_this._windowFocusTimeoutId = setTimeout(
|
|
2435
|
-
|
|
2541
|
+
_this._windowFocusTimeoutId = setTimeout((/**
|
|
2542
|
+
* @return {?}
|
|
2543
|
+
*/
|
|
2544
|
+
function () { return _this._windowFocused = false; }));
|
|
2545
|
+
});
|
|
2436
2546
|
}
|
|
2437
2547
|
/**
|
|
2438
2548
|
* @param {?} element
|
|
@@ -2463,7 +2573,10 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2463
2573
|
// Create monitored element info.
|
|
2464
2574
|
/** @type {?} */
|
|
2465
2575
|
var info = {
|
|
2466
|
-
unlisten:
|
|
2576
|
+
unlisten: (/**
|
|
2577
|
+
* @return {?}
|
|
2578
|
+
*/
|
|
2579
|
+
function () { }),
|
|
2467
2580
|
checkChildren: checkChildren,
|
|
2468
2581
|
subject: new Subject()
|
|
2469
2582
|
};
|
|
@@ -2471,18 +2584,32 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2471
2584
|
this._incrementMonitoredElementCount();
|
|
2472
2585
|
// Start listening. We need to listen in capture phase since focus events don't bubble.
|
|
2473
2586
|
/** @type {?} */
|
|
2474
|
-
var focusListener =
|
|
2587
|
+
var focusListener = (/**
|
|
2588
|
+
* @param {?} event
|
|
2589
|
+
* @return {?}
|
|
2590
|
+
*/
|
|
2591
|
+
function (event) { return _this._onFocus(event, nativeElement); });
|
|
2475
2592
|
/** @type {?} */
|
|
2476
|
-
var blurListener =
|
|
2477
|
-
|
|
2593
|
+
var blurListener = (/**
|
|
2594
|
+
* @param {?} event
|
|
2595
|
+
* @return {?}
|
|
2596
|
+
*/
|
|
2597
|
+
function (event) { return _this._onBlur(event, nativeElement); });
|
|
2598
|
+
this._ngZone.runOutsideAngular((/**
|
|
2599
|
+
* @return {?}
|
|
2600
|
+
*/
|
|
2601
|
+
function () {
|
|
2478
2602
|
nativeElement.addEventListener('focus', focusListener, true);
|
|
2479
2603
|
nativeElement.addEventListener('blur', blurListener, true);
|
|
2480
|
-
});
|
|
2604
|
+
}));
|
|
2481
2605
|
// Create an unlisten function for later.
|
|
2482
|
-
info.unlisten =
|
|
2606
|
+
info.unlisten = (/**
|
|
2607
|
+
* @return {?}
|
|
2608
|
+
*/
|
|
2609
|
+
function () {
|
|
2483
2610
|
nativeElement.removeEventListener('focus', focusListener, true);
|
|
2484
2611
|
nativeElement.removeEventListener('blur', blurListener, true);
|
|
2485
|
-
};
|
|
2612
|
+
});
|
|
2486
2613
|
return info.subject.asObservable();
|
|
2487
2614
|
};
|
|
2488
2615
|
/**
|
|
@@ -2536,7 +2663,12 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2536
2663
|
*/
|
|
2537
2664
|
function () {
|
|
2538
2665
|
var _this = this;
|
|
2539
|
-
this._elementInfo.forEach(
|
|
2666
|
+
this._elementInfo.forEach((/**
|
|
2667
|
+
* @param {?} _info
|
|
2668
|
+
* @param {?} element
|
|
2669
|
+
* @return {?}
|
|
2670
|
+
*/
|
|
2671
|
+
function (_info, element) { return _this.stopMonitoring(element); }));
|
|
2540
2672
|
};
|
|
2541
2673
|
/**
|
|
2542
2674
|
* @private
|
|
@@ -2608,13 +2740,19 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2608
2740
|
*/
|
|
2609
2741
|
function (origin) {
|
|
2610
2742
|
var _this = this;
|
|
2611
|
-
this._ngZone.runOutsideAngular(
|
|
2743
|
+
this._ngZone.runOutsideAngular((/**
|
|
2744
|
+
* @return {?}
|
|
2745
|
+
*/
|
|
2746
|
+
function () {
|
|
2612
2747
|
_this._origin = origin;
|
|
2613
2748
|
// Sometimes the focus origin won't be valid in Firefox because Firefox seems to focus *one*
|
|
2614
2749
|
// tick after the interaction event fired. To ensure the focus origin is always correct,
|
|
2615
2750
|
// the focus origin will be determined at the beginning of the next tick.
|
|
2616
|
-
_this._originTimeoutId = setTimeout(
|
|
2617
|
-
|
|
2751
|
+
_this._originTimeoutId = setTimeout((/**
|
|
2752
|
+
* @return {?}
|
|
2753
|
+
*/
|
|
2754
|
+
function () { return _this._origin = null; }), 1);
|
|
2755
|
+
}));
|
|
2618
2756
|
};
|
|
2619
2757
|
/**
|
|
2620
2758
|
* Checks whether the given focus event was caused by a touchstart event.
|
|
@@ -2756,7 +2894,10 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2756
2894
|
* @return {?}
|
|
2757
2895
|
*/
|
|
2758
2896
|
function (subject, origin) {
|
|
2759
|
-
this._ngZone.run(
|
|
2897
|
+
this._ngZone.run((/**
|
|
2898
|
+
* @return {?}
|
|
2899
|
+
*/
|
|
2900
|
+
function () { return subject.next(origin); }));
|
|
2760
2901
|
};
|
|
2761
2902
|
/**
|
|
2762
2903
|
* @private
|
|
@@ -2772,12 +2913,15 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2772
2913
|
if (++this._monitoredElementCount == 1 && this._platform.isBrowser) {
|
|
2773
2914
|
// Note: we listen to events in the capture phase so we
|
|
2774
2915
|
// can detect them even if the user stops propagation.
|
|
2775
|
-
this._ngZone.runOutsideAngular(
|
|
2916
|
+
this._ngZone.runOutsideAngular((/**
|
|
2917
|
+
* @return {?}
|
|
2918
|
+
*/
|
|
2919
|
+
function () {
|
|
2776
2920
|
document.addEventListener('keydown', _this._documentKeydownListener, captureEventListenerOptions);
|
|
2777
2921
|
document.addEventListener('mousedown', _this._documentMousedownListener, captureEventListenerOptions);
|
|
2778
2922
|
document.addEventListener('touchstart', _this._documentTouchstartListener, captureEventListenerOptions);
|
|
2779
2923
|
window.addEventListener('focus', _this._windowFocusListener);
|
|
2780
|
-
});
|
|
2924
|
+
}));
|
|
2781
2925
|
}
|
|
2782
2926
|
};
|
|
2783
2927
|
/**
|
|
@@ -2809,7 +2953,7 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2809
2953
|
{ type: NgZone },
|
|
2810
2954
|
{ type: Platform }
|
|
2811
2955
|
]; };
|
|
2812
|
-
/** @nocollapse */ FocusMonitor.ngInjectableDef =
|
|
2956
|
+
/** @nocollapse */ FocusMonitor.ngInjectableDef = ɵɵdefineInjectable({ factory: function FocusMonitor_Factory() { return new FocusMonitor(ɵɵinject(NgZone), ɵɵinject(Platform)); }, token: FocusMonitor, providedIn: "root" });
|
|
2813
2957
|
return FocusMonitor;
|
|
2814
2958
|
}());
|
|
2815
2959
|
/**
|
|
@@ -2828,7 +2972,11 @@ var CdkMonitorFocus = /** @class */ (function () {
|
|
|
2828
2972
|
this._focusMonitor = _focusMonitor;
|
|
2829
2973
|
this.cdkFocusChange = new EventEmitter();
|
|
2830
2974
|
this._monitorSubscription = this._focusMonitor.monitor(this._elementRef, this._elementRef.nativeElement.hasAttribute('cdkMonitorSubtreeFocus'))
|
|
2831
|
-
.subscribe(
|
|
2975
|
+
.subscribe((/**
|
|
2976
|
+
* @param {?} origin
|
|
2977
|
+
* @return {?}
|
|
2978
|
+
*/
|
|
2979
|
+
function (origin) { return _this.cdkFocusChange.emit(origin); }));
|
|
2832
2980
|
}
|
|
2833
2981
|
/**
|
|
2834
2982
|
* @return {?}
|
|
@@ -2878,7 +3026,7 @@ var FOCUS_MONITOR_PROVIDER = {
|
|
|
2878
3026
|
|
|
2879
3027
|
/**
|
|
2880
3028
|
* @fileoverview added by tsickle
|
|
2881
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3029
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2882
3030
|
*/
|
|
2883
3031
|
|
|
2884
3032
|
/**
|
|
@@ -2896,7 +3044,7 @@ function isFakeMousedownFromScreenReader(event) {
|
|
|
2896
3044
|
|
|
2897
3045
|
/**
|
|
2898
3046
|
* @fileoverview added by tsickle
|
|
2899
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3047
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2900
3048
|
*/
|
|
2901
3049
|
var A11yModule = /** @class */ (function () {
|
|
2902
3050
|
function A11yModule() {
|
|
@@ -2913,12 +3061,12 @@ var A11yModule = /** @class */ (function () {
|
|
|
2913
3061
|
|
|
2914
3062
|
/**
|
|
2915
3063
|
* @fileoverview added by tsickle
|
|
2916
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3064
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2917
3065
|
*/
|
|
2918
3066
|
|
|
2919
3067
|
/**
|
|
2920
3068
|
* @fileoverview added by tsickle
|
|
2921
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3069
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2922
3070
|
*/
|
|
2923
3071
|
|
|
2924
3072
|
export { ARIA_DESCRIBER_PROVIDER_FACTORY, MESSAGES_CONTAINER_ID, CDK_DESCRIBEDBY_ID_PREFIX, CDK_DESCRIBEDBY_HOST_ATTRIBUTE, AriaDescriber, ARIA_DESCRIBER_PROVIDER, ActiveDescendantKeyManager, FocusKeyManager, ListKeyManager, FocusTrap, FocusTrapFactory, CdkTrapFocus, InteractivityChecker, LIVE_ANNOUNCER_PROVIDER_FACTORY, LiveAnnouncer, CdkAriaLive, LIVE_ANNOUNCER_PROVIDER, LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY, LIVE_ANNOUNCER_ELEMENT_TOKEN, LIVE_ANNOUNCER_DEFAULT_OPTIONS, FOCUS_MONITOR_PROVIDER_FACTORY, TOUCH_BUFFER_MS, FocusMonitor, CdkMonitorFocus, FOCUS_MONITOR_PROVIDER, isFakeMousedownFromScreenReader, A11yModule };
|