@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/bundles/cdk-a11y.umd.js
CHANGED
|
@@ -42,7 +42,7 @@ function __extends(d, b) {
|
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* @fileoverview added by tsickle
|
|
45
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
45
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
46
46
|
*/
|
|
47
47
|
|
|
48
48
|
/**
|
|
@@ -61,7 +61,11 @@ var ID_DELIMINATOR = ' ';
|
|
|
61
61
|
function addAriaReferencedId(el, attr, id) {
|
|
62
62
|
/** @type {?} */
|
|
63
63
|
var ids = getAriaReferenceIds(el, attr);
|
|
64
|
-
if (ids.some(
|
|
64
|
+
if (ids.some((/**
|
|
65
|
+
* @param {?} existingId
|
|
66
|
+
* @return {?}
|
|
67
|
+
*/
|
|
68
|
+
function (existingId) { return existingId.trim() == id.trim(); }))) {
|
|
65
69
|
return;
|
|
66
70
|
}
|
|
67
71
|
ids.push(id.trim());
|
|
@@ -79,7 +83,11 @@ function removeAriaReferencedId(el, attr, id) {
|
|
|
79
83
|
/** @type {?} */
|
|
80
84
|
var ids = getAriaReferenceIds(el, attr);
|
|
81
85
|
/** @type {?} */
|
|
82
|
-
var filteredIds = ids.filter(
|
|
86
|
+
var filteredIds = ids.filter((/**
|
|
87
|
+
* @param {?} val
|
|
88
|
+
* @return {?}
|
|
89
|
+
*/
|
|
90
|
+
function (val) { return val != id.trim(); }));
|
|
83
91
|
el.setAttribute(attr, filteredIds.join(ID_DELIMINATOR));
|
|
84
92
|
}
|
|
85
93
|
/**
|
|
@@ -96,7 +104,7 @@ function getAriaReferenceIds(el, attr) {
|
|
|
96
104
|
|
|
97
105
|
/**
|
|
98
106
|
* @fileoverview added by tsickle
|
|
99
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
107
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
100
108
|
*/
|
|
101
109
|
/**
|
|
102
110
|
* ID used for the body container where all messages are appended.
|
|
@@ -333,7 +341,11 @@ var AriaDescriber = /** @class */ (function () {
|
|
|
333
341
|
// Remove all aria-describedby reference IDs that are prefixed by CDK_DESCRIBEDBY_ID_PREFIX
|
|
334
342
|
/** @type {?} */
|
|
335
343
|
var originalReferenceIds = getAriaReferenceIds(element, 'aria-describedby')
|
|
336
|
-
.filter(
|
|
344
|
+
.filter((/**
|
|
345
|
+
* @param {?} id
|
|
346
|
+
* @return {?}
|
|
347
|
+
*/
|
|
348
|
+
function (id) { return id.indexOf(CDK_DESCRIBEDBY_ID_PREFIX) != 0; }));
|
|
337
349
|
element.setAttribute('aria-describedby', originalReferenceIds.join(' '));
|
|
338
350
|
};
|
|
339
351
|
/**
|
|
@@ -466,7 +478,7 @@ var AriaDescriber = /** @class */ (function () {
|
|
|
466
478
|
AriaDescriber.ctorParameters = function () { return [
|
|
467
479
|
{ type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }
|
|
468
480
|
]; };
|
|
469
|
-
/** @nocollapse */ AriaDescriber.ngInjectableDef = core
|
|
481
|
+
/** @nocollapse */ AriaDescriber.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function AriaDescriber_Factory() { return new AriaDescriber(core.ɵɵinject(common.DOCUMENT)); }, token: AriaDescriber, providedIn: "root" });
|
|
470
482
|
return AriaDescriber;
|
|
471
483
|
}());
|
|
472
484
|
/**
|
|
@@ -494,7 +506,7 @@ var ARIA_DESCRIBER_PROVIDER = {
|
|
|
494
506
|
|
|
495
507
|
/**
|
|
496
508
|
* @fileoverview added by tsickle
|
|
497
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
509
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
498
510
|
*/
|
|
499
511
|
/**
|
|
500
512
|
* This class manages keyboard events for selectable lists. If you pass it a query list
|
|
@@ -521,7 +533,11 @@ ListKeyManager = /** @class */ (function () {
|
|
|
521
533
|
* Predicate function that can be used to check whether an item should be skipped
|
|
522
534
|
* by the key manager. By default, disabled items are skipped.
|
|
523
535
|
*/
|
|
524
|
-
this._skipPredicateFn =
|
|
536
|
+
this._skipPredicateFn = (/**
|
|
537
|
+
* @param {?} item
|
|
538
|
+
* @return {?}
|
|
539
|
+
*/
|
|
540
|
+
function (item) { return item.disabled; });
|
|
525
541
|
// Buffer for the letters that the user has pressed when the typeahead option is turned on.
|
|
526
542
|
this._pressedLetters = [];
|
|
527
543
|
/**
|
|
@@ -537,7 +553,11 @@ ListKeyManager = /** @class */ (function () {
|
|
|
537
553
|
// not have access to a QueryList of the items they want to manage (e.g. when the
|
|
538
554
|
// items aren't being collected via `ViewChildren` or `ContentChildren`).
|
|
539
555
|
if (_items instanceof core.QueryList) {
|
|
540
|
-
_items.changes.subscribe(
|
|
556
|
+
_items.changes.subscribe((/**
|
|
557
|
+
* @param {?} newItems
|
|
558
|
+
* @return {?}
|
|
559
|
+
*/
|
|
560
|
+
function (newItems) {
|
|
541
561
|
if (_this._activeItem) {
|
|
542
562
|
/** @type {?} */
|
|
543
563
|
var itemArray = newItems.toArray();
|
|
@@ -547,7 +567,7 @@ ListKeyManager = /** @class */ (function () {
|
|
|
547
567
|
_this._activeItemIndex = newIndex;
|
|
548
568
|
}
|
|
549
569
|
}
|
|
550
|
-
});
|
|
570
|
+
}));
|
|
551
571
|
}
|
|
552
572
|
}
|
|
553
573
|
/**
|
|
@@ -694,14 +714,32 @@ ListKeyManager = /** @class */ (function () {
|
|
|
694
714
|
function (debounceInterval) {
|
|
695
715
|
var _this = this;
|
|
696
716
|
if (debounceInterval === void 0) { debounceInterval = 200; }
|
|
697
|
-
if ((/** @type {?} */ (this))._items.length && (/** @type {?} */ (this))._items.some(
|
|
717
|
+
if ((/** @type {?} */ (this))._items.length && (/** @type {?} */ (this))._items.some((/**
|
|
718
|
+
* @param {?} item
|
|
719
|
+
* @return {?}
|
|
720
|
+
*/
|
|
721
|
+
function (item) { return typeof item.getLabel !== 'function'; }))) {
|
|
698
722
|
throw Error('ListKeyManager items in typeahead mode must implement the `getLabel` method.');
|
|
699
723
|
}
|
|
700
724
|
(/** @type {?} */ (this))._typeaheadSubscription.unsubscribe();
|
|
701
725
|
// Debounce the presses of non-navigational keys, collect the ones that correspond to letters
|
|
702
726
|
// and convert those letters back into a string. Afterwards find the first item that starts
|
|
703
727
|
// with that string and select it.
|
|
704
|
-
(/** @type {?} */ (this))._typeaheadSubscription = (/** @type {?} */ (this))._letterKeyStream.pipe(operators.tap(
|
|
728
|
+
(/** @type {?} */ (this))._typeaheadSubscription = (/** @type {?} */ (this))._letterKeyStream.pipe(operators.tap((/**
|
|
729
|
+
* @param {?} keyCode
|
|
730
|
+
* @return {?}
|
|
731
|
+
*/
|
|
732
|
+
function (keyCode) { return (/** @type {?} */ (_this))._pressedLetters.push(keyCode); })), operators.debounceTime(debounceInterval), operators.filter((/**
|
|
733
|
+
* @return {?}
|
|
734
|
+
*/
|
|
735
|
+
function () { return (/** @type {?} */ (_this))._pressedLetters.length > 0; })), operators.map((/**
|
|
736
|
+
* @return {?}
|
|
737
|
+
*/
|
|
738
|
+
function () { return (/** @type {?} */ (_this))._pressedLetters.join(''); }))).subscribe((/**
|
|
739
|
+
* @param {?} inputString
|
|
740
|
+
* @return {?}
|
|
741
|
+
*/
|
|
742
|
+
function (inputString) {
|
|
705
743
|
/** @type {?} */
|
|
706
744
|
var items = (/** @type {?} */ (_this))._getItemsArray();
|
|
707
745
|
// Start at 1 because we want to start searching at the item immediately
|
|
@@ -718,7 +756,7 @@ ListKeyManager = /** @class */ (function () {
|
|
|
718
756
|
}
|
|
719
757
|
}
|
|
720
758
|
(/** @type {?} */ (_this))._pressedLetters = [];
|
|
721
|
-
});
|
|
759
|
+
}));
|
|
722
760
|
return (/** @type {?} */ (this));
|
|
723
761
|
};
|
|
724
762
|
/**
|
|
@@ -758,9 +796,13 @@ ListKeyManager = /** @class */ (function () {
|
|
|
758
796
|
/** @type {?} */
|
|
759
797
|
var modifiers = ['altKey', 'ctrlKey', 'metaKey', 'shiftKey'];
|
|
760
798
|
/** @type {?} */
|
|
761
|
-
var isModifierAllowed = modifiers.every(
|
|
799
|
+
var isModifierAllowed = modifiers.every((/**
|
|
800
|
+
* @param {?} modifier
|
|
801
|
+
* @return {?}
|
|
802
|
+
*/
|
|
803
|
+
function (modifier) {
|
|
762
804
|
return !event[modifier] || _this._allowedModifierKeys.indexOf(modifier) > -1;
|
|
763
|
-
});
|
|
805
|
+
}));
|
|
764
806
|
switch (keyCode) {
|
|
765
807
|
case keycodes.TAB:
|
|
766
808
|
this.tabOut.next();
|
|
@@ -1069,7 +1111,7 @@ ListKeyManager = /** @class */ (function () {
|
|
|
1069
1111
|
|
|
1070
1112
|
/**
|
|
1071
1113
|
* @fileoverview added by tsickle
|
|
1072
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1114
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1073
1115
|
*/
|
|
1074
1116
|
/**
|
|
1075
1117
|
* @template T
|
|
@@ -1104,7 +1146,7 @@ ActiveDescendantKeyManager = /** @class */ (function (_super) {
|
|
|
1104
1146
|
|
|
1105
1147
|
/**
|
|
1106
1148
|
* @fileoverview added by tsickle
|
|
1107
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1149
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1108
1150
|
*/
|
|
1109
1151
|
/**
|
|
1110
1152
|
* @template T
|
|
@@ -1160,7 +1202,7 @@ FocusKeyManager = /** @class */ (function (_super) {
|
|
|
1160
1202
|
|
|
1161
1203
|
/**
|
|
1162
1204
|
* @fileoverview added by tsickle
|
|
1163
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1205
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1164
1206
|
*/
|
|
1165
1207
|
// The InteractivityChecker leans heavily on the ally.js accessibility utilities.
|
|
1166
1208
|
// Methods like `isTabbable` are only covering specific edge-cases for the browsers which are
|
|
@@ -1341,7 +1383,7 @@ var InteractivityChecker = /** @class */ (function () {
|
|
|
1341
1383
|
InteractivityChecker.ctorParameters = function () { return [
|
|
1342
1384
|
{ type: platform.Platform }
|
|
1343
1385
|
]; };
|
|
1344
|
-
/** @nocollapse */ InteractivityChecker.ngInjectableDef = core
|
|
1386
|
+
/** @nocollapse */ InteractivityChecker.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function InteractivityChecker_Factory() { return new InteractivityChecker(core.ɵɵinject(platform.Platform)); }, token: InteractivityChecker, providedIn: "root" });
|
|
1345
1387
|
return InteractivityChecker;
|
|
1346
1388
|
}());
|
|
1347
1389
|
/**
|
|
@@ -1490,7 +1532,7 @@ function getWindow(node) {
|
|
|
1490
1532
|
|
|
1491
1533
|
/**
|
|
1492
1534
|
* @fileoverview added by tsickle
|
|
1493
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1535
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1494
1536
|
*/
|
|
1495
1537
|
/**
|
|
1496
1538
|
* Class that allows for trapping focus within a DOM element.
|
|
@@ -1508,16 +1550,22 @@ var /**
|
|
|
1508
1550
|
*/
|
|
1509
1551
|
FocusTrap = /** @class */ (function () {
|
|
1510
1552
|
function FocusTrap(_element, _checker, _ngZone, _document, deferAnchors) {
|
|
1511
|
-
if (deferAnchors === void 0) { deferAnchors = false; }
|
|
1512
1553
|
var _this = this;
|
|
1554
|
+
if (deferAnchors === void 0) { deferAnchors = false; }
|
|
1513
1555
|
this._element = _element;
|
|
1514
1556
|
this._checker = _checker;
|
|
1515
1557
|
this._ngZone = _ngZone;
|
|
1516
1558
|
this._document = _document;
|
|
1517
1559
|
this._hasAttached = false;
|
|
1518
1560
|
// Event listeners for the anchors. Need to be regular functions so that we can unbind them later.
|
|
1519
|
-
this.startAnchorListener =
|
|
1520
|
-
|
|
1561
|
+
this.startAnchorListener = (/**
|
|
1562
|
+
* @return {?}
|
|
1563
|
+
*/
|
|
1564
|
+
function () { return _this.focusLastTabbableElement(); });
|
|
1565
|
+
this.endAnchorListener = (/**
|
|
1566
|
+
* @return {?}
|
|
1567
|
+
*/
|
|
1568
|
+
function () { return _this.focusFirstTabbableElement(); });
|
|
1521
1569
|
this._enabled = true;
|
|
1522
1570
|
if (!deferAnchors) {
|
|
1523
1571
|
this.attachAnchors();
|
|
@@ -1596,7 +1644,10 @@ FocusTrap = /** @class */ (function () {
|
|
|
1596
1644
|
if (this._hasAttached) {
|
|
1597
1645
|
return true;
|
|
1598
1646
|
}
|
|
1599
|
-
this._ngZone.runOutsideAngular(
|
|
1647
|
+
this._ngZone.runOutsideAngular((/**
|
|
1648
|
+
* @return {?}
|
|
1649
|
+
*/
|
|
1650
|
+
function () {
|
|
1600
1651
|
if (!_this._startAnchor) {
|
|
1601
1652
|
_this._startAnchor = _this._createAnchor();
|
|
1602
1653
|
(/** @type {?} */ (_this._startAnchor)).addEventListener('focus', _this.startAnchorListener);
|
|
@@ -1605,7 +1656,7 @@ FocusTrap = /** @class */ (function () {
|
|
|
1605
1656
|
_this._endAnchor = _this._createAnchor();
|
|
1606
1657
|
(/** @type {?} */ (_this._endAnchor)).addEventListener('focus', _this.endAnchorListener);
|
|
1607
1658
|
}
|
|
1608
|
-
});
|
|
1659
|
+
}));
|
|
1609
1660
|
if (this._element.parentNode) {
|
|
1610
1661
|
this._element.parentNode.insertBefore((/** @type {?} */ (this._startAnchor)), this._element);
|
|
1611
1662
|
this._element.parentNode.insertBefore((/** @type {?} */ (this._endAnchor)), this._element.nextSibling);
|
|
@@ -1633,9 +1684,16 @@ FocusTrap = /** @class */ (function () {
|
|
|
1633
1684
|
*/
|
|
1634
1685
|
function () {
|
|
1635
1686
|
var _this = this;
|
|
1636
|
-
return new Promise(
|
|
1637
|
-
|
|
1638
|
-
|
|
1687
|
+
return new Promise((/**
|
|
1688
|
+
* @param {?} resolve
|
|
1689
|
+
* @return {?}
|
|
1690
|
+
*/
|
|
1691
|
+
function (resolve) {
|
|
1692
|
+
_this._executeOnStable((/**
|
|
1693
|
+
* @return {?}
|
|
1694
|
+
*/
|
|
1695
|
+
function () { return resolve(_this.focusInitialElement()); }));
|
|
1696
|
+
}));
|
|
1639
1697
|
};
|
|
1640
1698
|
/**
|
|
1641
1699
|
* Waits for the zone to stabilize, then focuses
|
|
@@ -1657,9 +1715,16 @@ FocusTrap = /** @class */ (function () {
|
|
|
1657
1715
|
*/
|
|
1658
1716
|
function () {
|
|
1659
1717
|
var _this = this;
|
|
1660
|
-
return new Promise(
|
|
1661
|
-
|
|
1662
|
-
|
|
1718
|
+
return new Promise((/**
|
|
1719
|
+
* @param {?} resolve
|
|
1720
|
+
* @return {?}
|
|
1721
|
+
*/
|
|
1722
|
+
function (resolve) {
|
|
1723
|
+
_this._executeOnStable((/**
|
|
1724
|
+
* @return {?}
|
|
1725
|
+
*/
|
|
1726
|
+
function () { return resolve(_this.focusFirstTabbableElement()); }));
|
|
1727
|
+
}));
|
|
1663
1728
|
};
|
|
1664
1729
|
/**
|
|
1665
1730
|
* Waits for the zone to stabilize, then focuses
|
|
@@ -1681,9 +1746,16 @@ FocusTrap = /** @class */ (function () {
|
|
|
1681
1746
|
*/
|
|
1682
1747
|
function () {
|
|
1683
1748
|
var _this = this;
|
|
1684
|
-
return new Promise(
|
|
1685
|
-
|
|
1686
|
-
|
|
1749
|
+
return new Promise((/**
|
|
1750
|
+
* @param {?} resolve
|
|
1751
|
+
* @return {?}
|
|
1752
|
+
*/
|
|
1753
|
+
function (resolve) {
|
|
1754
|
+
_this._executeOnStable((/**
|
|
1755
|
+
* @return {?}
|
|
1756
|
+
*/
|
|
1757
|
+
function () { return resolve(_this.focusLastTabbableElement()); }));
|
|
1758
|
+
}));
|
|
1687
1759
|
};
|
|
1688
1760
|
/**
|
|
1689
1761
|
* Get the specified boundary element of the trapped region.
|
|
@@ -1988,7 +2060,7 @@ var FocusTrapFactory = /** @class */ (function () {
|
|
|
1988
2060
|
{ type: core.NgZone },
|
|
1989
2061
|
{ type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }
|
|
1990
2062
|
]; };
|
|
1991
|
-
/** @nocollapse */ FocusTrapFactory.ngInjectableDef = core
|
|
2063
|
+
/** @nocollapse */ FocusTrapFactory.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function FocusTrapFactory_Factory() { return new FocusTrapFactory(core.ɵɵinject(InteractivityChecker), core.ɵɵinject(core.NgZone), core.ɵɵinject(common.DOCUMENT)); }, token: FocusTrapFactory, providedIn: "root" });
|
|
1992
2064
|
return FocusTrapFactory;
|
|
1993
2065
|
}());
|
|
1994
2066
|
/**
|
|
@@ -2099,7 +2171,7 @@ var CdkTrapFocus = /** @class */ (function () {
|
|
|
2099
2171
|
|
|
2100
2172
|
/**
|
|
2101
2173
|
* @fileoverview added by tsickle
|
|
2102
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2174
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2103
2175
|
*/
|
|
2104
2176
|
/** @type {?} */
|
|
2105
2177
|
var LIVE_ANNOUNCER_ELEMENT_TOKEN = new core.InjectionToken('liveAnnouncerElement', {
|
|
@@ -2121,7 +2193,7 @@ var LIVE_ANNOUNCER_DEFAULT_OPTIONS = new core.InjectionToken('LIVE_ANNOUNCER_DEF
|
|
|
2121
2193
|
|
|
2122
2194
|
/**
|
|
2123
2195
|
* @fileoverview added by tsickle
|
|
2124
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2196
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2125
2197
|
*/
|
|
2126
2198
|
var LiveAnnouncer = /** @class */ (function () {
|
|
2127
2199
|
function LiveAnnouncer(elementToken, _ngZone, _document, _defaultOptions) {
|
|
@@ -2177,18 +2249,31 @@ var LiveAnnouncer = /** @class */ (function () {
|
|
|
2177
2249
|
// - With Chrome and IE11 with NVDA or JAWS, a repeated (identical) message won't be read a
|
|
2178
2250
|
// second time without clearing and then using a non-zero delay.
|
|
2179
2251
|
// (using JAWS 17 at time of this writing).
|
|
2180
|
-
return this._ngZone.runOutsideAngular(
|
|
2181
|
-
|
|
2252
|
+
return this._ngZone.runOutsideAngular((/**
|
|
2253
|
+
* @return {?}
|
|
2254
|
+
*/
|
|
2255
|
+
function () {
|
|
2256
|
+
return new Promise((/**
|
|
2257
|
+
* @param {?} resolve
|
|
2258
|
+
* @return {?}
|
|
2259
|
+
*/
|
|
2260
|
+
function (resolve) {
|
|
2182
2261
|
clearTimeout(_this._previousTimeout);
|
|
2183
|
-
_this._previousTimeout = setTimeout(
|
|
2262
|
+
_this._previousTimeout = setTimeout((/**
|
|
2263
|
+
* @return {?}
|
|
2264
|
+
*/
|
|
2265
|
+
function () {
|
|
2184
2266
|
_this._liveElement.textContent = message;
|
|
2185
2267
|
resolve();
|
|
2186
2268
|
if (typeof duration === 'number') {
|
|
2187
|
-
_this._previousTimeout = setTimeout(
|
|
2269
|
+
_this._previousTimeout = setTimeout((/**
|
|
2270
|
+
* @return {?}
|
|
2271
|
+
*/
|
|
2272
|
+
function () { return _this.clear(); }), duration);
|
|
2188
2273
|
}
|
|
2189
|
-
}, 100);
|
|
2190
|
-
});
|
|
2191
|
-
});
|
|
2274
|
+
}), 100);
|
|
2275
|
+
}));
|
|
2276
|
+
}));
|
|
2192
2277
|
};
|
|
2193
2278
|
/**
|
|
2194
2279
|
* Clears the current text from the announcer element. Can be used to prevent
|
|
@@ -2261,7 +2346,7 @@ var LiveAnnouncer = /** @class */ (function () {
|
|
|
2261
2346
|
{ type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
|
|
2262
2347
|
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [LIVE_ANNOUNCER_DEFAULT_OPTIONS,] }] }
|
|
2263
2348
|
]; };
|
|
2264
|
-
/** @nocollapse */ LiveAnnouncer.ngInjectableDef = core
|
|
2349
|
+
/** @nocollapse */ LiveAnnouncer.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function LiveAnnouncer_Factory() { return new LiveAnnouncer(core.ɵɵinject(LIVE_ANNOUNCER_ELEMENT_TOKEN, 8), core.ɵɵinject(core.NgZone), core.ɵɵinject(common.DOCUMENT), core.ɵɵinject(LIVE_ANNOUNCER_DEFAULT_OPTIONS, 8)); }, token: LiveAnnouncer, providedIn: "root" });
|
|
2265
2350
|
return LiveAnnouncer;
|
|
2266
2351
|
}());
|
|
2267
2352
|
/**
|
|
@@ -2297,10 +2382,16 @@ var CdkAriaLive = /** @class */ (function () {
|
|
|
2297
2382
|
}
|
|
2298
2383
|
}
|
|
2299
2384
|
else if (!this._subscription) {
|
|
2300
|
-
this._subscription = this._ngZone.runOutsideAngular(
|
|
2385
|
+
this._subscription = this._ngZone.runOutsideAngular((/**
|
|
2386
|
+
* @return {?}
|
|
2387
|
+
*/
|
|
2388
|
+
function () {
|
|
2301
2389
|
return _this._contentObserver
|
|
2302
2390
|
.observe(_this._elementRef)
|
|
2303
|
-
.subscribe(
|
|
2391
|
+
.subscribe((/**
|
|
2392
|
+
* @return {?}
|
|
2393
|
+
*/
|
|
2394
|
+
function () {
|
|
2304
2395
|
// Note that we use textContent here, rather than innerText, in order to avoid a reflow.
|
|
2305
2396
|
/** @type {?} */
|
|
2306
2397
|
var elementText = _this._elementRef.nativeElement.textContent;
|
|
@@ -2310,8 +2401,8 @@ var CdkAriaLive = /** @class */ (function () {
|
|
|
2310
2401
|
_this._liveAnnouncer.announce(elementText, _this._politeness);
|
|
2311
2402
|
_this._previousAnnouncedText = elementText;
|
|
2312
2403
|
}
|
|
2313
|
-
});
|
|
2314
|
-
});
|
|
2404
|
+
}));
|
|
2405
|
+
}));
|
|
2315
2406
|
}
|
|
2316
2407
|
},
|
|
2317
2408
|
enumerable: true,
|
|
@@ -2375,7 +2466,7 @@ var LIVE_ANNOUNCER_PROVIDER = {
|
|
|
2375
2466
|
|
|
2376
2467
|
/**
|
|
2377
2468
|
* @fileoverview added by tsickle
|
|
2378
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2469
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2379
2470
|
*/
|
|
2380
2471
|
// This is the value used by AngularJS Material. Through trial and error (on iPhone 6S) they found
|
|
2381
2472
|
// that a value of around 650ms seems appropriate.
|
|
@@ -2383,7 +2474,7 @@ var LIVE_ANNOUNCER_PROVIDER = {
|
|
|
2383
2474
|
var TOUCH_BUFFER_MS = 650;
|
|
2384
2475
|
/**
|
|
2385
2476
|
* Event listener options that enable capturing and also
|
|
2386
|
-
* mark the
|
|
2477
|
+
* mark the listener as passive if the browser supports it.
|
|
2387
2478
|
* @type {?}
|
|
2388
2479
|
*/
|
|
2389
2480
|
var captureEventListenerOptions = platform.normalizePassiveListenerOptions({
|
|
@@ -2418,27 +2509,37 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2418
2509
|
* Event listener for `keydown` events on the document.
|
|
2419
2510
|
* Needs to be an arrow function in order to preserve the context when it gets bound.
|
|
2420
2511
|
*/
|
|
2421
|
-
this._documentKeydownListener =
|
|
2512
|
+
this._documentKeydownListener = (/**
|
|
2513
|
+
* @return {?}
|
|
2514
|
+
*/
|
|
2515
|
+
function () {
|
|
2422
2516
|
// On keydown record the origin and clear any touch event that may be in progress.
|
|
2423
2517
|
_this._lastTouchTarget = null;
|
|
2424
2518
|
_this._setOriginForCurrentEventQueue('keyboard');
|
|
2425
|
-
};
|
|
2519
|
+
});
|
|
2426
2520
|
/**
|
|
2427
2521
|
* Event listener for `mousedown` events on the document.
|
|
2428
2522
|
* Needs to be an arrow function in order to preserve the context when it gets bound.
|
|
2429
2523
|
*/
|
|
2430
|
-
this._documentMousedownListener =
|
|
2524
|
+
this._documentMousedownListener = (/**
|
|
2525
|
+
* @return {?}
|
|
2526
|
+
*/
|
|
2527
|
+
function () {
|
|
2431
2528
|
// On mousedown record the origin only if there is not touch
|
|
2432
2529
|
// target, since a mousedown can happen as a result of a touch event.
|
|
2433
2530
|
if (!_this._lastTouchTarget) {
|
|
2434
2531
|
_this._setOriginForCurrentEventQueue('mouse');
|
|
2435
2532
|
}
|
|
2436
|
-
};
|
|
2533
|
+
});
|
|
2437
2534
|
/**
|
|
2438
2535
|
* Event listener for `touchstart` events on the document.
|
|
2439
2536
|
* Needs to be an arrow function in order to preserve the context when it gets bound.
|
|
2440
2537
|
*/
|
|
2441
|
-
this._documentTouchstartListener =
|
|
2538
|
+
this._documentTouchstartListener = (/**
|
|
2539
|
+
* @param {?} event
|
|
2540
|
+
* @return {?}
|
|
2541
|
+
*/
|
|
2542
|
+
function (event) {
|
|
2442
2543
|
// When the touchstart event fires the focus event is not yet in the event queue. This means
|
|
2443
2544
|
// we can't rely on the trick used above (setting timeout of 1ms). Instead we wait 650ms to
|
|
2444
2545
|
// see if a focus happens.
|
|
@@ -2446,18 +2547,27 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2446
2547
|
clearTimeout(_this._touchTimeoutId);
|
|
2447
2548
|
}
|
|
2448
2549
|
_this._lastTouchTarget = event.target;
|
|
2449
|
-
_this._touchTimeoutId = setTimeout(
|
|
2450
|
-
|
|
2550
|
+
_this._touchTimeoutId = setTimeout((/**
|
|
2551
|
+
* @return {?}
|
|
2552
|
+
*/
|
|
2553
|
+
function () { return _this._lastTouchTarget = null; }), TOUCH_BUFFER_MS);
|
|
2554
|
+
});
|
|
2451
2555
|
/**
|
|
2452
2556
|
* Event listener for `focus` events on the window.
|
|
2453
2557
|
* Needs to be an arrow function in order to preserve the context when it gets bound.
|
|
2454
2558
|
*/
|
|
2455
|
-
this._windowFocusListener =
|
|
2559
|
+
this._windowFocusListener = (/**
|
|
2560
|
+
* @return {?}
|
|
2561
|
+
*/
|
|
2562
|
+
function () {
|
|
2456
2563
|
// Make a note of when the window regains focus, so we can
|
|
2457
2564
|
// restore the origin info for the focused element.
|
|
2458
2565
|
_this._windowFocused = true;
|
|
2459
|
-
_this._windowFocusTimeoutId = setTimeout(
|
|
2460
|
-
|
|
2566
|
+
_this._windowFocusTimeoutId = setTimeout((/**
|
|
2567
|
+
* @return {?}
|
|
2568
|
+
*/
|
|
2569
|
+
function () { return _this._windowFocused = false; }));
|
|
2570
|
+
});
|
|
2461
2571
|
}
|
|
2462
2572
|
/**
|
|
2463
2573
|
* @param {?} element
|
|
@@ -2488,7 +2598,10 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2488
2598
|
// Create monitored element info.
|
|
2489
2599
|
/** @type {?} */
|
|
2490
2600
|
var info = {
|
|
2491
|
-
unlisten:
|
|
2601
|
+
unlisten: (/**
|
|
2602
|
+
* @return {?}
|
|
2603
|
+
*/
|
|
2604
|
+
function () { }),
|
|
2492
2605
|
checkChildren: checkChildren,
|
|
2493
2606
|
subject: new rxjs.Subject()
|
|
2494
2607
|
};
|
|
@@ -2496,18 +2609,32 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2496
2609
|
this._incrementMonitoredElementCount();
|
|
2497
2610
|
// Start listening. We need to listen in capture phase since focus events don't bubble.
|
|
2498
2611
|
/** @type {?} */
|
|
2499
|
-
var focusListener =
|
|
2612
|
+
var focusListener = (/**
|
|
2613
|
+
* @param {?} event
|
|
2614
|
+
* @return {?}
|
|
2615
|
+
*/
|
|
2616
|
+
function (event) { return _this._onFocus(event, nativeElement); });
|
|
2500
2617
|
/** @type {?} */
|
|
2501
|
-
var blurListener =
|
|
2502
|
-
|
|
2618
|
+
var blurListener = (/**
|
|
2619
|
+
* @param {?} event
|
|
2620
|
+
* @return {?}
|
|
2621
|
+
*/
|
|
2622
|
+
function (event) { return _this._onBlur(event, nativeElement); });
|
|
2623
|
+
this._ngZone.runOutsideAngular((/**
|
|
2624
|
+
* @return {?}
|
|
2625
|
+
*/
|
|
2626
|
+
function () {
|
|
2503
2627
|
nativeElement.addEventListener('focus', focusListener, true);
|
|
2504
2628
|
nativeElement.addEventListener('blur', blurListener, true);
|
|
2505
|
-
});
|
|
2629
|
+
}));
|
|
2506
2630
|
// Create an unlisten function for later.
|
|
2507
|
-
info.unlisten =
|
|
2631
|
+
info.unlisten = (/**
|
|
2632
|
+
* @return {?}
|
|
2633
|
+
*/
|
|
2634
|
+
function () {
|
|
2508
2635
|
nativeElement.removeEventListener('focus', focusListener, true);
|
|
2509
2636
|
nativeElement.removeEventListener('blur', blurListener, true);
|
|
2510
|
-
};
|
|
2637
|
+
});
|
|
2511
2638
|
return info.subject.asObservable();
|
|
2512
2639
|
};
|
|
2513
2640
|
/**
|
|
@@ -2561,7 +2688,12 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2561
2688
|
*/
|
|
2562
2689
|
function () {
|
|
2563
2690
|
var _this = this;
|
|
2564
|
-
this._elementInfo.forEach(
|
|
2691
|
+
this._elementInfo.forEach((/**
|
|
2692
|
+
* @param {?} _info
|
|
2693
|
+
* @param {?} element
|
|
2694
|
+
* @return {?}
|
|
2695
|
+
*/
|
|
2696
|
+
function (_info, element) { return _this.stopMonitoring(element); }));
|
|
2565
2697
|
};
|
|
2566
2698
|
/**
|
|
2567
2699
|
* @private
|
|
@@ -2633,13 +2765,19 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2633
2765
|
*/
|
|
2634
2766
|
function (origin) {
|
|
2635
2767
|
var _this = this;
|
|
2636
|
-
this._ngZone.runOutsideAngular(
|
|
2768
|
+
this._ngZone.runOutsideAngular((/**
|
|
2769
|
+
* @return {?}
|
|
2770
|
+
*/
|
|
2771
|
+
function () {
|
|
2637
2772
|
_this._origin = origin;
|
|
2638
2773
|
// Sometimes the focus origin won't be valid in Firefox because Firefox seems to focus *one*
|
|
2639
2774
|
// tick after the interaction event fired. To ensure the focus origin is always correct,
|
|
2640
2775
|
// the focus origin will be determined at the beginning of the next tick.
|
|
2641
|
-
_this._originTimeoutId = setTimeout(
|
|
2642
|
-
|
|
2776
|
+
_this._originTimeoutId = setTimeout((/**
|
|
2777
|
+
* @return {?}
|
|
2778
|
+
*/
|
|
2779
|
+
function () { return _this._origin = null; }), 1);
|
|
2780
|
+
}));
|
|
2643
2781
|
};
|
|
2644
2782
|
/**
|
|
2645
2783
|
* Checks whether the given focus event was caused by a touchstart event.
|
|
@@ -2781,7 +2919,10 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2781
2919
|
* @return {?}
|
|
2782
2920
|
*/
|
|
2783
2921
|
function (subject, origin) {
|
|
2784
|
-
this._ngZone.run(
|
|
2922
|
+
this._ngZone.run((/**
|
|
2923
|
+
* @return {?}
|
|
2924
|
+
*/
|
|
2925
|
+
function () { return subject.next(origin); }));
|
|
2785
2926
|
};
|
|
2786
2927
|
/**
|
|
2787
2928
|
* @private
|
|
@@ -2797,12 +2938,15 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2797
2938
|
if (++this._monitoredElementCount == 1 && this._platform.isBrowser) {
|
|
2798
2939
|
// Note: we listen to events in the capture phase so we
|
|
2799
2940
|
// can detect them even if the user stops propagation.
|
|
2800
|
-
this._ngZone.runOutsideAngular(
|
|
2941
|
+
this._ngZone.runOutsideAngular((/**
|
|
2942
|
+
* @return {?}
|
|
2943
|
+
*/
|
|
2944
|
+
function () {
|
|
2801
2945
|
document.addEventListener('keydown', _this._documentKeydownListener, captureEventListenerOptions);
|
|
2802
2946
|
document.addEventListener('mousedown', _this._documentMousedownListener, captureEventListenerOptions);
|
|
2803
2947
|
document.addEventListener('touchstart', _this._documentTouchstartListener, captureEventListenerOptions);
|
|
2804
2948
|
window.addEventListener('focus', _this._windowFocusListener);
|
|
2805
|
-
});
|
|
2949
|
+
}));
|
|
2806
2950
|
}
|
|
2807
2951
|
};
|
|
2808
2952
|
/**
|
|
@@ -2834,7 +2978,7 @@ var FocusMonitor = /** @class */ (function () {
|
|
|
2834
2978
|
{ type: core.NgZone },
|
|
2835
2979
|
{ type: platform.Platform }
|
|
2836
2980
|
]; };
|
|
2837
|
-
/** @nocollapse */ FocusMonitor.ngInjectableDef = core
|
|
2981
|
+
/** @nocollapse */ FocusMonitor.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function FocusMonitor_Factory() { return new FocusMonitor(core.ɵɵinject(core.NgZone), core.ɵɵinject(platform.Platform)); }, token: FocusMonitor, providedIn: "root" });
|
|
2838
2982
|
return FocusMonitor;
|
|
2839
2983
|
}());
|
|
2840
2984
|
/**
|
|
@@ -2853,7 +2997,11 @@ var CdkMonitorFocus = /** @class */ (function () {
|
|
|
2853
2997
|
this._focusMonitor = _focusMonitor;
|
|
2854
2998
|
this.cdkFocusChange = new core.EventEmitter();
|
|
2855
2999
|
this._monitorSubscription = this._focusMonitor.monitor(this._elementRef, this._elementRef.nativeElement.hasAttribute('cdkMonitorSubtreeFocus'))
|
|
2856
|
-
.subscribe(
|
|
3000
|
+
.subscribe((/**
|
|
3001
|
+
* @param {?} origin
|
|
3002
|
+
* @return {?}
|
|
3003
|
+
*/
|
|
3004
|
+
function (origin) { return _this.cdkFocusChange.emit(origin); }));
|
|
2857
3005
|
}
|
|
2858
3006
|
/**
|
|
2859
3007
|
* @return {?}
|
|
@@ -2903,7 +3051,7 @@ var FOCUS_MONITOR_PROVIDER = {
|
|
|
2903
3051
|
|
|
2904
3052
|
/**
|
|
2905
3053
|
* @fileoverview added by tsickle
|
|
2906
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3054
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2907
3055
|
*/
|
|
2908
3056
|
|
|
2909
3057
|
/**
|
|
@@ -2921,7 +3069,7 @@ function isFakeMousedownFromScreenReader(event) {
|
|
|
2921
3069
|
|
|
2922
3070
|
/**
|
|
2923
3071
|
* @fileoverview added by tsickle
|
|
2924
|
-
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3072
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2925
3073
|
*/
|
|
2926
3074
|
var A11yModule = /** @class */ (function () {
|
|
2927
3075
|
function A11yModule() {
|