@angular/cdk 6.4.6 → 6.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a11y/typings/focus-monitor/focus-monitor.d.ts +1 -1
- package/a11y/typings/focus-trap/focus-trap.d.ts +1 -1
- package/a11y/typings/index.metadata.json +1 -1
- package/accordion/typings/accordion.d.ts +6 -1
- package/accordion/typings/index.metadata.json +1 -1
- package/bundles/cdk-a11y.umd.js +9 -7
- 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 +28 -4
- package/bundles/cdk-accordion.umd.js.map +1 -1
- package/bundles/cdk-accordion.umd.min.js +1 -1
- package/bundles/cdk-accordion.umd.min.js.map +1 -1
- package/bundles/cdk-collections.umd.js +9 -3
- 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-observers.umd.js +5 -10
- 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.map +1 -1
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +1 -1
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-stepper.umd.js +36 -6
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.min.js +1 -1
- package/bundles/cdk-stepper.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +29 -9
- 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 +12 -23
- 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.map +1 -1
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +1 -1
- 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/collections/typings/index.metadata.json +1 -1
- package/collections/typings/selection.d.ts +6 -0
- package/esm2015/a11y.js +10 -4
- package/esm2015/a11y.js.map +1 -1
- package/esm2015/accordion.js +18 -1
- package/esm2015/accordion.js.map +1 -1
- package/esm2015/cdk.js +1 -1
- package/esm2015/cdk.js.map +1 -1
- package/esm2015/collections.js +9 -3
- package/esm2015/collections.js.map +1 -1
- package/esm2015/observers.js +4 -4
- package/esm2015/observers.js.map +1 -1
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/scrolling.js +1 -1
- package/esm2015/scrolling.js.map +1 -1
- package/esm2015/stepper.js +32 -4
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +30 -8
- package/esm2015/table.js.map +1 -1
- package/esm2015/text-field.js +9 -9
- package/esm2015/text-field.js.map +1 -1
- package/esm2015/tree.js.map +1 -1
- package/esm5/a11y.es5.js +9 -7
- package/esm5/a11y.es5.js.map +1 -1
- package/esm5/accordion.es5.js +25 -1
- package/esm5/accordion.es5.js.map +1 -1
- package/esm5/cdk.es5.js +1 -1
- package/esm5/cdk.es5.js.map +1 -1
- package/esm5/collections.es5.js +9 -3
- package/esm5/collections.es5.js.map +1 -1
- package/esm5/observers.es5.js +5 -10
- package/esm5/observers.es5.js.map +1 -1
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/scrolling.es5.js +1 -1
- package/esm5/scrolling.es5.js.map +1 -1
- package/esm5/stepper.es5.js +34 -4
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +28 -7
- package/esm5/table.es5.js.map +1 -1
- package/esm5/text-field.es5.js +12 -23
- package/esm5/text-field.es5.js.map +1 -1
- package/esm5/tree.es5.js.map +1 -1
- package/observers/typings/index.metadata.json +1 -1
- package/observers/typings/observe-content.d.ts +6 -1
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/position/connected-position-strategy.d.ts +1 -1
- package/package.json +3 -3
- package/stepper/typings/index.metadata.json +1 -1
- package/stepper/typings/stepper.d.ts +10 -2
- package/table/typings/index.metadata.json +1 -1
- package/table/typings/sticky-styler.d.ts +3 -1
- package/table/typings/table.d.ts +10 -1
- package/text-field/typings/autofill.d.ts +13 -2
- package/text-field/typings/autosize.d.ts +1 -1
- package/text-field/typings/index.metadata.json +1 -1
- package/tree/typings/index.metadata.json +1 -1
- package/tree/typings/nested-node.d.ts +2 -2
- package/tree/typings/padding.d.ts +1 -1
- package/tree/typings/tree.d.ts +2 -2
- package/typings/a11y/focus-monitor/focus-monitor.d.ts +1 -1
- package/typings/a11y/focus-trap/focus-trap.d.ts +1 -1
- package/typings/a11y/index.metadata.json +1 -1
- package/typings/accordion/accordion.d.ts +6 -1
- package/typings/accordion/index.metadata.json +1 -1
- package/typings/collections/index.metadata.json +1 -1
- package/typings/collections/selection.d.ts +6 -0
- package/typings/esm5/a11y/focus-monitor/focus-monitor.d.ts +1 -1
- package/typings/esm5/a11y/focus-trap/focus-trap.d.ts +1 -1
- package/typings/esm5/a11y/index.metadata.json +1 -1
- package/typings/esm5/accordion/accordion.d.ts +6 -1
- package/typings/esm5/accordion/index.metadata.json +1 -1
- package/typings/esm5/collections/index.metadata.json +1 -1
- package/typings/esm5/collections/selection.d.ts +6 -0
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/observers/index.metadata.json +1 -1
- package/typings/esm5/observers/observe-content.d.ts +6 -1
- package/typings/esm5/overlay/index.metadata.json +1 -1
- package/typings/esm5/overlay/position/connected-position-strategy.d.ts +1 -1
- package/typings/esm5/stepper/index.metadata.json +1 -1
- package/typings/esm5/stepper/stepper.d.ts +10 -2
- package/typings/esm5/table/index.metadata.json +1 -1
- package/typings/esm5/table/sticky-styler.d.ts +3 -1
- package/typings/esm5/table/table.d.ts +10 -1
- package/typings/esm5/text-field/autofill.d.ts +13 -2
- package/typings/esm5/text-field/autosize.d.ts +1 -1
- package/typings/esm5/text-field/index.metadata.json +1 -1
- package/typings/esm5/tree/index.metadata.json +1 -1
- package/typings/esm5/tree/nested-node.d.ts +2 -2
- package/typings/esm5/tree/padding.d.ts +1 -1
- package/typings/esm5/tree/tree.d.ts +2 -2
- package/typings/index.metadata.json +1 -1
- package/typings/observers/index.metadata.json +1 -1
- package/typings/observers/observe-content.d.ts +6 -1
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/position/connected-position-strategy.d.ts +1 -1
- package/typings/stepper/index.metadata.json +1 -1
- package/typings/stepper/stepper.d.ts +10 -2
- package/typings/table/index.metadata.json +1 -1
- package/typings/table/sticky-styler.d.ts +3 -1
- package/typings/table/table.d.ts +10 -1
- package/typings/text-field/autofill.d.ts +13 -2
- package/typings/text-field/autosize.d.ts +1 -1
- package/typings/text-field/index.metadata.json +1 -1
- package/typings/tree/index.metadata.json +1 -1
- package/typings/tree/nested-node.d.ts +2 -2
- package/typings/tree/padding.d.ts +1 -1
- package/typings/tree/tree.d.ts +2 -2
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("rxjs"),require("@angular/cdk/keycodes"),require("rxjs/operators"),require("@angular/cdk/platform"),require("@angular/cdk/coercion"),require("@angular/cdk/observers")):"function"==typeof define&&define.amd?define("@angular/cdk/a11y",["exports","@angular/common","@angular/core","rxjs","@angular/cdk/keycodes","rxjs/operators","@angular/cdk/platform","@angular/cdk/coercion","@angular/cdk/observers"],t):t((e.ng=e.ng||{},e.ng.cdk=e.ng.cdk||{},e.ng.cdk.a11y={}),e.ng.common,e.ng.core,e.rxjs,e.ng.cdk.keycodes,e.rxjs.operators,e.ng.cdk.platform,e.ng.cdk.coercion,e.ng.cdk.observers)}(this,function(e,t,n,r,i,o,s,c,a){"use strict";function u(e,t){function n(){this.constructor=e}F(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function d(e,t,n){var r=h(e,t);r.some(function(e){return e.trim()==n.trim()})||(r.push(n.trim()),e.setAttribute(t,r.join(L)))}function l(e,t,n){var r=h(e,t),i=r.filter(function(e){return e!=n.trim()});e.setAttribute(t,i.join(L))}function h(e,t){return(e.getAttribute(t)||"").match(/\S+/g)||[]}function p(e,t){return e||new x(t)}function f(e){try{return e.frameElement}catch(e){return null}}function _(e){return!!(e.offsetWidth||e.offsetHeight||"function"==typeof e.getClientRects&&e.getClientRects().length)}function m(e){var t=e.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}function b(e){return y(e)&&"hidden"==e.type}function v(e){return g(e)&&e.hasAttribute("href")}function y(e){return"input"==e.nodeName.toLowerCase()}function g(e){return"a"==e.nodeName.toLowerCase()}function I(e){if(!e.hasAttribute("tabindex")||void 0===e.tabIndex)return!1;var t=e.getAttribute("tabindex");return"-32768"!=t&&!(!t||isNaN(parseInt(t,10)))}function E(e){if(!I(e))return null;var t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}function A(e){var t=e.nodeName.toLowerCase(),n="input"===t&&e.type;return"text"===n||"password"===n||"select"===t||"textarea"===t}function k(e){return!b(e)&&(m(e)||v(e)||e.hasAttribute("contenteditable")||I(e))}function T(e){return e.ownerDocument.defaultView||window}function C(){return null}function O(e,t,n){return e||new q(t,n)}function N(e,t,n){return e||new z(t,n)}function w(e){return 0===e.buttons}var F=function(e,t){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},L=" ",R=0,D=new Map,M=null,x=function(){function e(e){this._document=e}return e.prototype.describe=function(e,t){this._canBeDescribed(e,t)&&(D.has(t)||this._createMessageElement(t),this._isElementDescribedByMessage(e,t)||this._addMessageReference(e,t))},e.prototype.removeDescription=function(e,t){if(this._canBeDescribed(e,t)){this._isElementDescribedByMessage(e,t)&&this._removeMessageReference(e,t);var n=D.get(t);n&&0===n.referenceCount&&this._deleteMessageElement(t),M&&0===M.childNodes.length&&this._deleteMessagesContainer()}},e.prototype.ngOnDestroy=function(){for(var e=this._document.querySelectorAll("[cdk-describedby-host]"),t=0;t<e.length;t++)this._removeCdkDescribedByReferenceIds(e[t]),e[t].removeAttribute("cdk-describedby-host");M&&this._deleteMessagesContainer(),D.clear()},e.prototype._createMessageElement=function(e){var t=this._document.createElement("div");t.setAttribute("id","cdk-describedby-message-"+R++),t.appendChild(this._document.createTextNode(e)),this._createMessagesContainer(),M.appendChild(t),D.set(e,{messageElement:t,referenceCount:0})},e.prototype._deleteMessageElement=function(e){var t=D.get(e),n=t&&t.messageElement;M&&n&&M.removeChild(n),D.delete(e)},e.prototype._createMessagesContainer=function(){if(!M){var e=this._document.getElementById("cdk-describedby-message-container");e&&e.parentNode.removeChild(e),M=this._document.createElement("div"),M.id="cdk-describedby-message-container",M.setAttribute("aria-hidden","true"),M.style.display="none",this._document.body.appendChild(M)}},e.prototype._deleteMessagesContainer=function(){M&&M.parentNode&&(M.parentNode.removeChild(M),M=null)},e.prototype._removeCdkDescribedByReferenceIds=function(e){var t=h(e,"aria-describedby").filter(function(e){return 0!=e.indexOf("cdk-describedby-message")});e.setAttribute("aria-describedby",t.join(" "))},e.prototype._addMessageReference=function(e,t){var n=D.get(t);d(e,"aria-describedby",n.messageElement.id),e.setAttribute("cdk-describedby-host",""),n.referenceCount++},e.prototype._removeMessageReference=function(e,t){var n=D.get(t);n.referenceCount--,l(e,"aria-describedby",n.messageElement.id),e.removeAttribute("cdk-describedby-host")},e.prototype._isElementDescribedByMessage=function(e,t){var n=h(e,"aria-describedby"),r=D.get(t),i=r&&r.messageElement.id;return!!i&&-1!=n.indexOf(i)},e.prototype._canBeDescribed=function(e,t){return e.nodeType===this._document.ELEMENT_NODE&&null!=t&&!!(""+t).trim()},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]}]},e.ngInjectableDef=n.defineInjectable({factory:function(){return new e(n.inject(t.DOCUMENT))},token:e,providedIn:"root"}),e}(),j={provide:x,deps:[[new n.Optional,new n.SkipSelf,x],t.DOCUMENT],useFactory:p},P=function(){function e(e){var t=this;this._items=e,this._activeItemIndex=-1,this._wrap=!1,this._letterKeyStream=new r.Subject,this._typeaheadSubscription=r.Subscription.EMPTY,this._vertical=!0,this._skipPredicateFn=function(e){return e.disabled},this._pressedLetters=[],this.tabOut=new r.Subject,this.change=new r.Subject,e instanceof n.QueryList&&e.changes.subscribe(function(e){if(t._activeItem){var n=e.toArray(),r=n.indexOf(t._activeItem);r>-1&&r!==t._activeItemIndex&&(t._activeItemIndex=r)}})}return e.prototype.skipPredicate=function(e){return this._skipPredicateFn=e,this},e.prototype.withWrap=function(e){return void 0===e&&(e=!0),this._wrap=e,this},e.prototype.withVerticalOrientation=function(e){return void 0===e&&(e=!0),this._vertical=e,this},e.prototype.withHorizontalOrientation=function(e){return this._horizontal=e,this},e.prototype.withTypeAhead=function(e){var t=this;if(void 0===e&&(e=200),this._items.length&&this._items.some(function(e){return"function"!=typeof e.getLabel}))throw Error("ListKeyManager items in typeahead mode must implement the `getLabel` method.");return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(o.tap(function(e){return t._pressedLetters.push(e)}),o.debounceTime(e),o.filter(function(){return t._pressedLetters.length>0}),o.map(function(){return t._pressedLetters.join("")})).subscribe(function(e){for(var n=t._getItemsArray(),r=1;r<n.length+1;r++){var i=(t._activeItemIndex+r)%n.length,o=n[i];if(!t._skipPredicateFn(o)&&0===o.getLabel().toUpperCase().trim().indexOf(e)){t.setActiveItem(i);break}}t._pressedLetters=[]}),this},e.prototype.setActiveItem=function(e){var t=this._activeItemIndex;this.updateActiveItem(e),this._activeItemIndex!==t&&this.change.next(this._activeItemIndex)},e.prototype.onKeydown=function(e){var t=e.keyCode;switch(t){case i.TAB:return void this.tabOut.next();case i.DOWN_ARROW:if(this._vertical){this.setNextItemActive();break}return;case i.UP_ARROW:if(this._vertical){this.setPreviousItemActive();break}return;case i.RIGHT_ARROW:if("ltr"===this._horizontal){this.setNextItemActive();break}if("rtl"===this._horizontal){this.setPreviousItemActive();break}return;case i.LEFT_ARROW:if("ltr"===this._horizontal){this.setPreviousItemActive();break}if("rtl"===this._horizontal){this.setNextItemActive();break}return;default:return void(e.key&&1===e.key.length?this._letterKeyStream.next(e.key.toLocaleUpperCase()):(t>=i.A&&t<=i.Z||t>=i.ZERO&&t<=i.NINE)&&this._letterKeyStream.next(String.fromCharCode(t)))}this._pressedLetters=[],e.preventDefault()},Object.defineProperty(e.prototype,"activeItemIndex",{get:function(){return this._activeItemIndex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeItem",{get:function(){return this._activeItem},enumerable:!0,configurable:!0}),e.prototype.setFirstItemActive=function(){this._setActiveItemByIndex(0,1)},e.prototype.setLastItemActive=function(){this._setActiveItemByIndex(this._items.length-1,-1)},e.prototype.setNextItemActive=function(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)},e.prototype.setPreviousItemActive=function(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)},e.prototype.updateActiveItem=function(e){var t=this._getItemsArray(),n="number"==typeof e?e:t.indexOf(e);this._activeItemIndex=n,this._activeItem=t[n]},e.prototype.updateActiveItemIndex=function(e){this.updateActiveItem(e)},e.prototype._setActiveItemByDelta=function(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)},e.prototype._setActiveInWrapMode=function(e){for(var t=this._getItemsArray(),n=1;n<=t.length;n++){var r=(this._activeItemIndex+e*n+t.length)%t.length,i=t[r];if(!this._skipPredicateFn(i))return void this.setActiveItem(r)}},e.prototype._setActiveInDefaultMode=function(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)},e.prototype._setActiveItemByIndex=function(e,t){var n=this._getItemsArray();if(n[e]){for(;this._skipPredicateFn(n[e]);)if(e+=t,!n[e])return;this.setActiveItem(e)}},e.prototype._getItemsArray=function(){return this._items instanceof n.QueryList?this._items.toArray():this._items},e}(),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.setActiveItem=function(t){this.activeItem&&this.activeItem.setInactiveStyles(),e.prototype.setActiveItem.call(this,t),this.activeItem&&this.activeItem.setActiveStyles()},t}(P),B=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._origin="program",t}return u(t,e),t.prototype.setFocusOrigin=function(e){return this._origin=e,this},t.prototype.setActiveItem=function(t){e.prototype.setActiveItem.call(this,t),this.activeItem&&this.activeItem.focus(this._origin)},t}(P),K=function(){function e(e){this._platform=e}return e.prototype.isDisabled=function(e){return e.hasAttribute("disabled")},e.prototype.isVisible=function(e){return _(e)&&"visible"===getComputedStyle(e).visibility},e.prototype.isTabbable=function(e){if(!this._platform.isBrowser)return!1;var t=f(T(e));if(t){var n=t&&t.nodeName.toLowerCase();if(-1===E(t))return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&"object"===n)return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&!this.isVisible(t))return!1}var r=e.nodeName.toLowerCase(),i=E(e);if(e.hasAttribute("contenteditable"))return-1!==i;if("iframe"===r)return!1;if("audio"===r){if(!e.hasAttribute("controls"))return!1;if(this._platform.BLINK)return!0}if("video"===r){if(!e.hasAttribute("controls")&&this._platform.TRIDENT)return!1;if(this._platform.BLINK||this._platform.FIREFOX)return!0}return("object"!==r||!this._platform.BLINK&&!this._platform.WEBKIT)&&(!(this._platform.WEBKIT&&this._platform.IOS&&!A(e))&&e.tabIndex>=0)},e.prototype.isFocusable=function(e){return k(e)&&!this.isDisabled(e)&&this.isVisible(e)},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:s.Platform}]},e.ngInjectableDef=n.defineInjectable({factory:function(){return new e(n.inject(s.Platform))},token:e,providedIn:"root"}),e}(),U=function(){function e(e,t,n,r,i){void 0===i&&(i=!1),this._element=e,this._checker=t,this._ngZone=n,this._document=r,this._hasAttached=!1,this._enabled=!0,i||this.attachAnchors()}return Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._startAnchor.tabIndex=this._endAnchor.tabIndex=this._enabled?0:-1)},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this._startAnchor&&this._startAnchor.parentNode&&this._startAnchor.parentNode.removeChild(this._startAnchor),this._endAnchor&&this._endAnchor.parentNode&&this._endAnchor.parentNode.removeChild(this._endAnchor),this._startAnchor=this._endAnchor=null},e.prototype.attachAnchors=function(){var e=this;return!!this._hasAttached||(this._ngZone.runOutsideAngular(function(){e._startAnchor||(e._startAnchor=e._createAnchor(),e._startAnchor.addEventListener("focus",function(){return e.focusLastTabbableElement()})),e._endAnchor||(e._endAnchor=e._createAnchor(),e._endAnchor.addEventListener("focus",function(){return e.focusFirstTabbableElement()}))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)},e.prototype.focusInitialElementWhenReady=function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusInitialElement())})})},e.prototype.focusFirstTabbableElementWhenReady=function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusFirstTabbableElement())})})},e.prototype.focusLastTabbableElementWhenReady=function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusLastTabbableElement())})})},e.prototype._getRegionBoundary=function(e){for(var t=this._element.querySelectorAll("[cdk-focus-region-"+e+"], [cdkFocusRegion"+e+"], [cdk-focus-"+e+"]"),n=0;n<t.length;n++)t[n].hasAttribute("cdk-focus-"+e)?console.warn("Found use of deprecated attribute 'cdk-focus-"+e+"', use 'cdkFocusRegion"+e+"' instead. The deprecated attribute will be removed in 7.0.0.",t[n]):t[n].hasAttribute("cdk-focus-region-"+e)&&console.warn("Found use of deprecated attribute 'cdk-focus-region-"+e+"', use 'cdkFocusRegion"+e+"' instead. The deprecated attribute will be removed in 7.0.0.",t[n]);return"start"==e?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)},e.prototype.focusInitialElement=function(){var e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");return e?(e.hasAttribute("cdk-focus-initial")&&console.warn("Found use of deprecated attribute 'cdk-focus-initial', use 'cdkFocusInitial' instead. The deprecated attribute will be removed in 7.0.0",e),e.focus(),!0):this.focusFirstTabbableElement()},e.prototype.focusFirstTabbableElement=function(){var e=this._getRegionBoundary("start");return e&&e.focus(),!!e},e.prototype.focusLastTabbableElement=function(){var e=this._getRegionBoundary("end");return e&&e.focus(),!!e},e.prototype.hasAttached=function(){return this._hasAttached},e.prototype._getFirstTabbableElement=function(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;for(var t=e.children||e.childNodes,n=0;n<t.length;n++){var r=t[n].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(t[n]):null;if(r)return r}return null},e.prototype._getLastTabbableElement=function(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;for(var t=e.children||e.childNodes,n=t.length-1;n>=0;n--){var r=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(r)return r}return null},e.prototype._createAnchor=function(){var e=this._document.createElement("div");return e.tabIndex=this._enabled?0:-1,e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e},e.prototype._executeOnStable=function(e){this._ngZone.isStable?e():this._ngZone.onStable.asObservable().pipe(o.take(1)).subscribe(e)},e}(),Z=function(){function e(e,t,n){this._checker=e,this._ngZone=t,this._document=n}return e.prototype.create=function(e,t){return void 0===t&&(t=!1),new U(e,this._checker,this._ngZone,this._document,t)},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:K},{type:n.NgZone},{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]}]},e.ngInjectableDef=n.defineInjectable({factory:function(){return new e(n.inject(K),n.inject(n.NgZone),n.inject(t.DOCUMENT))},token:e,providedIn:"root"}),e}(),W=function(){function e(e,t,n){this._elementRef=e,this._focusTrapFactory=t,this._previouslyFocusedElement=null,this._document=n,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}return Object.defineProperty(e.prototype,"enabled",{get:function(){return this.focusTrap.enabled},set:function(e){this.focusTrap.enabled=c.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autoCapture",{get:function(){return this._autoCapture},set:function(e){this._autoCapture=c.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)},e.prototype.ngAfterContentInit=function(){this.focusTrap.attachAnchors(),this.autoCapture&&(this._previouslyFocusedElement=this._document.activeElement,this.focusTrap.focusInitialElementWhenReady())},e.prototype.ngDoCheck=function(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()},e.decorators=[{type:n.Directive,args:[{selector:"[cdkTrapFocus]",exportAs:"cdkTrapFocus"}]}],e.ctorParameters=function(){return[{type:n.ElementRef},{type:Z},{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]}]},e.propDecorators={enabled:[{type:n.Input,args:["cdkTrapFocus"]}],autoCapture:[{type:n.Input,args:["cdkTrapFocusAutoCapture"]}]},e}(),V=new n.InjectionToken("liveAnnouncerElement",{providedIn:"root",factory:C}),q=function(){function e(e,t){this._document=t,this._liveElement=e||this._createLiveElement()}return e.prototype.announce=function(e,t){var n=this;return void 0===t&&(t="polite"),this._liveElement.textContent="",this._liveElement.setAttribute("aria-live",t),new Promise(function(t){setTimeout(function(){n._liveElement.textContent=e,t()},100)})},e.prototype.ngOnDestroy=function(){this._liveElement&&this._liveElement.parentNode&&this._liveElement.parentNode.removeChild(this._liveElement)},e.prototype._createLiveElement=function(){for(var e=this._document.getElementsByClassName("cdk-live-announcer-element"),t=0;t<e.length;t++)e[t].parentNode.removeChild(e[t]);var n=this._document.createElement("div");return n.classList.add("cdk-live-announcer-element"),n.classList.add("cdk-visually-hidden"),n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live","polite"),this._document.body.appendChild(n),n},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[V]}]},{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]}]},e.ngInjectableDef=n.defineInjectable({factory:function(){return new e(n.inject(V,8),n.inject(t.DOCUMENT))},token:e,providedIn:"root"}),e}(),G=function(){function e(e,t,n,r){this._elementRef=e,this._liveAnnouncer=t,this._contentObserver=n,this._ngZone=r,this._politeness="off"}return Object.defineProperty(e.prototype,"politeness",{get:function(){return this._politeness},set:function(e){var t=this;this._politeness="polite"===e||"assertive"===e?e:"off","off"===this._politeness?this._subscription&&(this._subscription.unsubscribe(),this._subscription=null):this._subscription||(this._subscription=this._ngZone.runOutsideAngular(function(){return t._contentObserver.observe(t._elementRef.nativeElement).subscribe(function(){return t._liveAnnouncer.announce(t._elementRef.nativeElement.innerText,t._politeness)})}))},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this._subscription&&this._subscription.unsubscribe()},e.decorators=[{type:n.Directive,args:[{selector:"[cdkAriaLive]",exportAs:"cdkAriaLive"}]}],e.ctorParameters=function(){return[{type:n.ElementRef},{type:q},{type:a.ContentObserver},{type:n.NgZone}]},e.propDecorators={politeness:[{type:n.Input,args:["cdkAriaLive"]}]},e}(),Y={provide:q,deps:[[new n.Optional,new n.SkipSelf,q],[new n.Optional,new n.Inject(V)],t.DOCUMENT],useFactory:O},z=function(){function e(e,t){this._ngZone=e,this._platform=t,this._origin=null,this._windowFocused=!1,this._elementInfo=new Map,this._unregisterGlobalListeners=function(){},this._monitoredElementCount=0}return e.prototype.monitor=function(e,t){var n=this;if(void 0===t&&(t=!1),!this._platform.isBrowser)return r.of(null);if(this._elementInfo.has(e)){var i=this._elementInfo.get(e);return i.checkChildren=t,i.subject.asObservable()}var o={unlisten:function(){},checkChildren:t,subject:new r.Subject};this._elementInfo.set(e,o),this._incrementMonitoredElementCount();var s=function(t){return n._onFocus(t,e)},c=function(t){return n._onBlur(t,e)};return this._ngZone.runOutsideAngular(function(){e.addEventListener("focus",s,!0),e.addEventListener("blur",c,!0)}),o.unlisten=function(){e.removeEventListener("focus",s,!0),e.removeEventListener("blur",c,!0)},o.subject.asObservable()},e.prototype.stopMonitoring=function(e){var t=this._elementInfo.get(e);t&&(t.unlisten(),t.subject.complete(),this._setClasses(e),this._elementInfo.delete(e),this._decrementMonitoredElementCount())},e.prototype.focusVia=function(e,t,n){this._setOriginForCurrentEventQueue(t),"function"==typeof e.focus&&e.focus(n)},e.prototype.ngOnDestroy=function(){var e=this;this._elementInfo.forEach(function(t,n){return e.stopMonitoring(n)})},e.prototype._registerGlobalListeners=function(){var e=this;if(this._platform.isBrowser){var t=function(){e._lastTouchTarget=null,e._setOriginForCurrentEventQueue("keyboard")},n=function(){e._lastTouchTarget||e._setOriginForCurrentEventQueue("mouse")},r=function(t){null!=e._touchTimeoutId&&clearTimeout(e._touchTimeoutId),e._lastTouchTarget=t.target,e._touchTimeoutId=setTimeout(function(){return e._lastTouchTarget=null},650)},i=function(){e._windowFocused=!0,e._windowFocusTimeoutId=setTimeout(function(){return e._windowFocused=!1})};this._ngZone.runOutsideAngular(function(){document.addEventListener("keydown",t,!0),document.addEventListener("mousedown",n,!0),document.addEventListener("touchstart",r,!s.supportsPassiveEventListeners()||{passive:!0,capture:!0}),window.addEventListener("focus",i)}),this._unregisterGlobalListeners=function(){document.removeEventListener("keydown",t,!0),document.removeEventListener("mousedown",n,!0),document.removeEventListener("touchstart",r,!s.supportsPassiveEventListeners()||{passive:!0,capture:!0}),window.removeEventListener("focus",i),clearTimeout(e._windowFocusTimeoutId),clearTimeout(e._touchTimeoutId),clearTimeout(e._originTimeoutId)}}},e.prototype._toggleClass=function(e,t,n){n?e.classList.add(t):e.classList.remove(t)},e.prototype._setClasses=function(e,t){this._elementInfo.get(e)&&(this._toggleClass(e,"cdk-focused",!!t),this._toggleClass(e,"cdk-touch-focused","touch"===t),this._toggleClass(e,"cdk-keyboard-focused","keyboard"===t),this._toggleClass(e,"cdk-mouse-focused","mouse"===t),this._toggleClass(e,"cdk-program-focused","program"===t))},e.prototype._setOriginForCurrentEventQueue=function(e){var t=this;this._ngZone.runOutsideAngular(function(){t._origin=e,t._originTimeoutId=setTimeout(function(){return t._origin=null},1)})},e.prototype._wasCausedByTouch=function(e){var t=e.target;return this._lastTouchTarget instanceof Node&&t instanceof Node&&(t===this._lastTouchTarget||t.contains(this._lastTouchTarget))},e.prototype._onFocus=function(e,t){var n=this._elementInfo.get(t);if(n&&(n.checkChildren||t===e.target)){var r=this._origin;r||(r=this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(e)?"touch":"program"),this._setClasses(t,r),this._emitOrigin(n.subject,r),this._lastFocusOrigin=r}},e.prototype._onBlur=function(e,t){var n=this._elementInfo.get(t);!n||n.checkChildren&&e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||(this._setClasses(t),this._emitOrigin(n.subject,null))},e.prototype._emitOrigin=function(e,t){this._ngZone.run(function(){return e.next(t)})},e.prototype._incrementMonitoredElementCount=function(){1==++this._monitoredElementCount&&this._registerGlobalListeners()},e.prototype._decrementMonitoredElementCount=function(){--this._monitoredElementCount||(this._unregisterGlobalListeners(),this._unregisterGlobalListeners=function(){})},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:n.NgZone},{type:s.Platform}]},e.ngInjectableDef=n.defineInjectable({factory:function(){return new e(n.inject(n.NgZone),n.inject(s.Platform))},token:e,providedIn:"root"}),e}(),Q=function(){function e(e,t){var r=this;this._elementRef=e,this._focusMonitor=t,this.cdkFocusChange=new n.EventEmitter,this._monitorSubscription=this._focusMonitor.monitor(this._elementRef.nativeElement,this._elementRef.nativeElement.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(function(e){return r.cdkFocusChange.emit(e)})}return e.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef.nativeElement),this._monitorSubscription.unsubscribe()},e.decorators=[{type:n.Directive,args:[{selector:"[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef},{type:z}]},e.propDecorators={cdkFocusChange:[{type:n.Output}]},e}(),H={provide:z,deps:[[new n.Optional,new n.SkipSelf,z],n.NgZone,s.Platform],useFactory:N},X=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{imports:[t.CommonModule,s.PlatformModule,a.ObserversModule],declarations:[G,W,Q],exports:[G,W,Q]}]}],e}();e.MESSAGES_CONTAINER_ID="cdk-describedby-message-container",e.CDK_DESCRIBEDBY_ID_PREFIX="cdk-describedby-message",e.CDK_DESCRIBEDBY_HOST_ATTRIBUTE="cdk-describedby-host",e.AriaDescriber=x,e.ARIA_DESCRIBER_PROVIDER_FACTORY=p,e.ARIA_DESCRIBER_PROVIDER=j,e.ActiveDescendantKeyManager=S,e.FocusKeyManager=B,e.ListKeyManager=P,e.FocusTrap=U,e.FocusTrapFactory=Z,e.CdkTrapFocus=W,e.InteractivityChecker=K,e.LiveAnnouncer=q,e.CdkAriaLive=G,e.LIVE_ANNOUNCER_PROVIDER_FACTORY=O,e.LIVE_ANNOUNCER_PROVIDER=Y,e.LIVE_ANNOUNCER_ELEMENT_TOKEN=V,e.LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY=C,e.TOUCH_BUFFER_MS=650,e.FocusMonitor=z,e.CdkMonitorFocus=Q,e.FOCUS_MONITOR_PROVIDER_FACTORY=N,e.FOCUS_MONITOR_PROVIDER=H,e.isFakeMousedownFromScreenReader=w,e.A11yModule=X,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
8
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("rxjs"),require("@angular/cdk/keycodes"),require("rxjs/operators"),require("@angular/cdk/platform"),require("@angular/cdk/coercion"),require("@angular/cdk/observers")):"function"==typeof define&&define.amd?define("@angular/cdk/a11y",["exports","@angular/common","@angular/core","rxjs","@angular/cdk/keycodes","rxjs/operators","@angular/cdk/platform","@angular/cdk/coercion","@angular/cdk/observers"],t):t((e.ng=e.ng||{},e.ng.cdk=e.ng.cdk||{},e.ng.cdk.a11y={}),e.ng.common,e.ng.core,e.rxjs,e.ng.cdk.keycodes,e.rxjs.operators,e.ng.cdk.platform,e.ng.cdk.coercion,e.ng.cdk.observers)}(this,function(e,t,n,r,i,o,s,c,a){"use strict";function u(e,t){function n(){this.constructor=e}F(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function d(e,t,n){var r=h(e,t);r.some(function(e){return e.trim()==n.trim()})||(r.push(n.trim()),e.setAttribute(t,r.join(L)))}function l(e,t,n){var r=h(e,t),i=r.filter(function(e){return e!=n.trim()});e.setAttribute(t,i.join(L))}function h(e,t){return(e.getAttribute(t)||"").match(/\S+/g)||[]}function p(e,t){return e||new x(t)}function f(e){try{return e.frameElement}catch(e){return null}}function _(e){return!!(e.offsetWidth||e.offsetHeight||"function"==typeof e.getClientRects&&e.getClientRects().length)}function m(e){var t=e.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}function b(e){return y(e)&&"hidden"==e.type}function v(e){return g(e)&&e.hasAttribute("href")}function y(e){return"input"==e.nodeName.toLowerCase()}function g(e){return"a"==e.nodeName.toLowerCase()}function I(e){if(!e.hasAttribute("tabindex")||void 0===e.tabIndex)return!1;var t=e.getAttribute("tabindex");return"-32768"!=t&&!(!t||isNaN(parseInt(t,10)))}function E(e){if(!I(e))return null;var t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}function A(e){var t=e.nodeName.toLowerCase(),n="input"===t&&e.type;return"text"===n||"password"===n||"select"===t||"textarea"===t}function k(e){return!b(e)&&(m(e)||v(e)||e.hasAttribute("contenteditable")||I(e))}function T(e){return e.ownerDocument.defaultView||window}function C(){return null}function O(e,t,n){return e||new q(t,n)}function N(e,t,n){return e||new z(t,n)}function w(e){return 0===e.buttons}var F=function(e,t){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},L=" ",R=0,D=new Map,M=null,x=function(){function e(e){this._document=e}return e.prototype.describe=function(e,t){this._canBeDescribed(e,t)&&(D.has(t)||this._createMessageElement(t),this._isElementDescribedByMessage(e,t)||this._addMessageReference(e,t))},e.prototype.removeDescription=function(e,t){if(this._canBeDescribed(e,t)){this._isElementDescribedByMessage(e,t)&&this._removeMessageReference(e,t);var n=D.get(t);n&&0===n.referenceCount&&this._deleteMessageElement(t),M&&0===M.childNodes.length&&this._deleteMessagesContainer()}},e.prototype.ngOnDestroy=function(){for(var e=this._document.querySelectorAll("[cdk-describedby-host]"),t=0;t<e.length;t++)this._removeCdkDescribedByReferenceIds(e[t]),e[t].removeAttribute("cdk-describedby-host");M&&this._deleteMessagesContainer(),D.clear()},e.prototype._createMessageElement=function(e){var t=this._document.createElement("div");t.setAttribute("id","cdk-describedby-message-"+R++),t.appendChild(this._document.createTextNode(e)),this._createMessagesContainer(),M.appendChild(t),D.set(e,{messageElement:t,referenceCount:0})},e.prototype._deleteMessageElement=function(e){var t=D.get(e),n=t&&t.messageElement;M&&n&&M.removeChild(n),D.delete(e)},e.prototype._createMessagesContainer=function(){if(!M){var e=this._document.getElementById("cdk-describedby-message-container");e&&e.parentNode.removeChild(e),M=this._document.createElement("div"),M.id="cdk-describedby-message-container",M.setAttribute("aria-hidden","true"),M.style.display="none",this._document.body.appendChild(M)}},e.prototype._deleteMessagesContainer=function(){M&&M.parentNode&&(M.parentNode.removeChild(M),M=null)},e.prototype._removeCdkDescribedByReferenceIds=function(e){var t=h(e,"aria-describedby").filter(function(e){return 0!=e.indexOf("cdk-describedby-message")});e.setAttribute("aria-describedby",t.join(" "))},e.prototype._addMessageReference=function(e,t){var n=D.get(t);d(e,"aria-describedby",n.messageElement.id),e.setAttribute("cdk-describedby-host",""),n.referenceCount++},e.prototype._removeMessageReference=function(e,t){var n=D.get(t);n.referenceCount--,l(e,"aria-describedby",n.messageElement.id),e.removeAttribute("cdk-describedby-host")},e.prototype._isElementDescribedByMessage=function(e,t){var n=h(e,"aria-describedby"),r=D.get(t),i=r&&r.messageElement.id;return!!i&&-1!=n.indexOf(i)},e.prototype._canBeDescribed=function(e,t){return e.nodeType===this._document.ELEMENT_NODE&&null!=t&&!!(""+t).trim()},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]}]},e.ngInjectableDef=n.defineInjectable({factory:function(){return new e(n.inject(t.DOCUMENT))},token:e,providedIn:"root"}),e}(),j={provide:x,deps:[[new n.Optional,new n.SkipSelf,x],t.DOCUMENT],useFactory:p},P=function(){function e(e){var t=this;this._items=e,this._activeItemIndex=-1,this._wrap=!1,this._letterKeyStream=new r.Subject,this._typeaheadSubscription=r.Subscription.EMPTY,this._vertical=!0,this._skipPredicateFn=function(e){return e.disabled},this._pressedLetters=[],this.tabOut=new r.Subject,this.change=new r.Subject,e instanceof n.QueryList&&e.changes.subscribe(function(e){if(t._activeItem){var n=e.toArray(),r=n.indexOf(t._activeItem);r>-1&&r!==t._activeItemIndex&&(t._activeItemIndex=r)}})}return e.prototype.skipPredicate=function(e){return this._skipPredicateFn=e,this},e.prototype.withWrap=function(e){return void 0===e&&(e=!0),this._wrap=e,this},e.prototype.withVerticalOrientation=function(e){return void 0===e&&(e=!0),this._vertical=e,this},e.prototype.withHorizontalOrientation=function(e){return this._horizontal=e,this},e.prototype.withTypeAhead=function(e){var t=this;if(void 0===e&&(e=200),this._items.length&&this._items.some(function(e){return"function"!=typeof e.getLabel}))throw Error("ListKeyManager items in typeahead mode must implement the `getLabel` method.");return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(o.tap(function(e){return t._pressedLetters.push(e)}),o.debounceTime(e),o.filter(function(){return t._pressedLetters.length>0}),o.map(function(){return t._pressedLetters.join("")})).subscribe(function(e){for(var n=t._getItemsArray(),r=1;r<n.length+1;r++){var i=(t._activeItemIndex+r)%n.length,o=n[i];if(!t._skipPredicateFn(o)&&0===o.getLabel().toUpperCase().trim().indexOf(e)){t.setActiveItem(i);break}}t._pressedLetters=[]}),this},e.prototype.setActiveItem=function(e){var t=this._activeItemIndex;this.updateActiveItem(e),this._activeItemIndex!==t&&this.change.next(this._activeItemIndex)},e.prototype.onKeydown=function(e){var t=e.keyCode;switch(t){case i.TAB:return void this.tabOut.next();case i.DOWN_ARROW:if(this._vertical){this.setNextItemActive();break}return;case i.UP_ARROW:if(this._vertical){this.setPreviousItemActive();break}return;case i.RIGHT_ARROW:if("ltr"===this._horizontal){this.setNextItemActive();break}if("rtl"===this._horizontal){this.setPreviousItemActive();break}return;case i.LEFT_ARROW:if("ltr"===this._horizontal){this.setPreviousItemActive();break}if("rtl"===this._horizontal){this.setNextItemActive();break}return;default:return void(e.key&&1===e.key.length?this._letterKeyStream.next(e.key.toLocaleUpperCase()):(t>=i.A&&t<=i.Z||t>=i.ZERO&&t<=i.NINE)&&this._letterKeyStream.next(String.fromCharCode(t)))}this._pressedLetters=[],e.preventDefault()},Object.defineProperty(e.prototype,"activeItemIndex",{get:function(){return this._activeItemIndex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeItem",{get:function(){return this._activeItem},enumerable:!0,configurable:!0}),e.prototype.setFirstItemActive=function(){this._setActiveItemByIndex(0,1)},e.prototype.setLastItemActive=function(){this._setActiveItemByIndex(this._items.length-1,-1)},e.prototype.setNextItemActive=function(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)},e.prototype.setPreviousItemActive=function(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)},e.prototype.updateActiveItem=function(e){var t=this._getItemsArray(),n="number"==typeof e?e:t.indexOf(e);this._activeItemIndex=n,this._activeItem=t[n]},e.prototype.updateActiveItemIndex=function(e){this.updateActiveItem(e)},e.prototype._setActiveItemByDelta=function(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)},e.prototype._setActiveInWrapMode=function(e){for(var t=this._getItemsArray(),n=1;n<=t.length;n++){var r=(this._activeItemIndex+e*n+t.length)%t.length,i=t[r];if(!this._skipPredicateFn(i))return void this.setActiveItem(r)}},e.prototype._setActiveInDefaultMode=function(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)},e.prototype._setActiveItemByIndex=function(e,t){var n=this._getItemsArray();if(n[e]){for(;this._skipPredicateFn(n[e]);)if(e+=t,!n[e])return;this.setActiveItem(e)}},e.prototype._getItemsArray=function(){return this._items instanceof n.QueryList?this._items.toArray():this._items},e}(),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.setActiveItem=function(t){this.activeItem&&this.activeItem.setInactiveStyles(),e.prototype.setActiveItem.call(this,t),this.activeItem&&this.activeItem.setActiveStyles()},t}(P),B=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._origin="program",t}return u(t,e),t.prototype.setFocusOrigin=function(e){return this._origin=e,this},t.prototype.setActiveItem=function(t){e.prototype.setActiveItem.call(this,t),this.activeItem&&this.activeItem.focus(this._origin)},t}(P),K=function(){function e(e){this._platform=e}return e.prototype.isDisabled=function(e){return e.hasAttribute("disabled")},e.prototype.isVisible=function(e){return _(e)&&"visible"===getComputedStyle(e).visibility},e.prototype.isTabbable=function(e){if(!this._platform.isBrowser)return!1;var t=f(T(e));if(t){var n=t&&t.nodeName.toLowerCase();if(-1===E(t))return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&"object"===n)return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&!this.isVisible(t))return!1}var r=e.nodeName.toLowerCase(),i=E(e);if(e.hasAttribute("contenteditable"))return-1!==i;if("iframe"===r)return!1;if("audio"===r){if(!e.hasAttribute("controls"))return!1;if(this._platform.BLINK)return!0}if("video"===r){if(!e.hasAttribute("controls")&&this._platform.TRIDENT)return!1;if(this._platform.BLINK||this._platform.FIREFOX)return!0}return("object"!==r||!this._platform.BLINK&&!this._platform.WEBKIT)&&(!(this._platform.WEBKIT&&this._platform.IOS&&!A(e))&&e.tabIndex>=0)},e.prototype.isFocusable=function(e){return k(e)&&!this.isDisabled(e)&&this.isVisible(e)},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:s.Platform}]},e.ngInjectableDef=n.defineInjectable({factory:function(){return new e(n.inject(s.Platform))},token:e,providedIn:"root"}),e}(),U=function(){function e(e,t,n,r,i){void 0===i&&(i=!1),this._element=e,this._checker=t,this._ngZone=n,this._document=r,this._hasAttached=!1,this._enabled=!0,i||this.attachAnchors()}return Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._startAnchor.tabIndex=this._endAnchor.tabIndex=this._enabled?0:-1)},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this._startAnchor&&this._startAnchor.parentNode&&this._startAnchor.parentNode.removeChild(this._startAnchor),this._endAnchor&&this._endAnchor.parentNode&&this._endAnchor.parentNode.removeChild(this._endAnchor),this._startAnchor=this._endAnchor=null},e.prototype.attachAnchors=function(){var e=this;return!!this._hasAttached||(this._ngZone.runOutsideAngular(function(){e._startAnchor||(e._startAnchor=e._createAnchor(),e._startAnchor.addEventListener("focus",function(){return e.focusLastTabbableElement()})),e._endAnchor||(e._endAnchor=e._createAnchor(),e._endAnchor.addEventListener("focus",function(){return e.focusFirstTabbableElement()}))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)},e.prototype.focusInitialElementWhenReady=function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusInitialElement())})})},e.prototype.focusFirstTabbableElementWhenReady=function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusFirstTabbableElement())})})},e.prototype.focusLastTabbableElementWhenReady=function(){var e=this;return new Promise(function(t){e._executeOnStable(function(){return t(e.focusLastTabbableElement())})})},e.prototype._getRegionBoundary=function(e){for(var t=this._element.querySelectorAll("[cdk-focus-region-"+e+"], [cdkFocusRegion"+e+"], [cdk-focus-"+e+"]"),n=0;n<t.length;n++)t[n].hasAttribute("cdk-focus-"+e)?console.warn("Found use of deprecated attribute 'cdk-focus-"+e+"', use 'cdkFocusRegion"+e+"' instead. The deprecated attribute will be removed in 7.0.0.",t[n]):t[n].hasAttribute("cdk-focus-region-"+e)&&console.warn("Found use of deprecated attribute 'cdk-focus-region-"+e+"', use 'cdkFocusRegion"+e+"' instead. The deprecated attribute will be removed in 7.0.0.",t[n]);return"start"==e?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)},e.prototype.focusInitialElement=function(){var e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");return e?(e.hasAttribute("cdk-focus-initial")&&console.warn("Found use of deprecated attribute 'cdk-focus-initial', use 'cdkFocusInitial' instead. The deprecated attribute will be removed in 7.0.0",e),e.focus(),!0):this.focusFirstTabbableElement()},e.prototype.focusFirstTabbableElement=function(){var e=this._getRegionBoundary("start");return e&&e.focus(),!!e},e.prototype.focusLastTabbableElement=function(){var e=this._getRegionBoundary("end");return e&&e.focus(),!!e},e.prototype.hasAttached=function(){return this._hasAttached},e.prototype._getFirstTabbableElement=function(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;for(var t=e.children||e.childNodes,n=0;n<t.length;n++){var r=t[n].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(t[n]):null;if(r)return r}return null},e.prototype._getLastTabbableElement=function(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;for(var t=e.children||e.childNodes,n=t.length-1;n>=0;n--){var r=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(r)return r}return null},e.prototype._createAnchor=function(){var e=this._document.createElement("div");return e.tabIndex=this._enabled?0:-1,e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e},e.prototype._executeOnStable=function(e){this._ngZone.isStable?e():this._ngZone.onStable.asObservable().pipe(o.take(1)).subscribe(e)},e}(),Z=function(){function e(e,t,n){this._checker=e,this._ngZone=t,this._document=n}return e.prototype.create=function(e,t){return void 0===t&&(t=!1),new U(e,this._checker,this._ngZone,this._document,t)},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:K},{type:n.NgZone},{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]}]},e.ngInjectableDef=n.defineInjectable({factory:function(){return new e(n.inject(K),n.inject(n.NgZone),n.inject(t.DOCUMENT))},token:e,providedIn:"root"}),e}(),W=function(){function e(e,t,n){this._elementRef=e,this._focusTrapFactory=t,this._previouslyFocusedElement=null,this._document=n,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}return Object.defineProperty(e.prototype,"enabled",{get:function(){return this.focusTrap.enabled},set:function(e){this.focusTrap.enabled=c.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autoCapture",{get:function(){return this._autoCapture},set:function(e){this._autoCapture=c.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)},e.prototype.ngAfterContentInit=function(){this.focusTrap.attachAnchors(),this.autoCapture&&(this._previouslyFocusedElement=this._document.activeElement,this.focusTrap.focusInitialElementWhenReady())},e.prototype.ngDoCheck=function(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()},e.decorators=[{type:n.Directive,args:[{selector:"[cdkTrapFocus]",exportAs:"cdkTrapFocus"}]}],e.ctorParameters=function(){return[{type:n.ElementRef},{type:Z},{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]}]},e.propDecorators={enabled:[{type:n.Input,args:["cdkTrapFocus"]}],autoCapture:[{type:n.Input,args:["cdkTrapFocusAutoCapture"]}]},e}(),V=new n.InjectionToken("liveAnnouncerElement",{providedIn:"root",factory:C}),q=function(){function e(e,t){this._document=t,this._liveElement=e||this._createLiveElement()}return e.prototype.announce=function(e,t){var n=this;return void 0===t&&(t="polite"),this._liveElement.textContent="",this._liveElement.setAttribute("aria-live",t),new Promise(function(t){setTimeout(function(){n._liveElement.textContent=e,t()},100)})},e.prototype.ngOnDestroy=function(){this._liveElement&&this._liveElement.parentNode&&this._liveElement.parentNode.removeChild(this._liveElement)},e.prototype._createLiveElement=function(){for(var e=this._document.getElementsByClassName("cdk-live-announcer-element"),t=0;t<e.length;t++)e[t].parentNode.removeChild(e[t]);var n=this._document.createElement("div");return n.classList.add("cdk-live-announcer-element"),n.classList.add("cdk-visually-hidden"),n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live","polite"),this._document.body.appendChild(n),n},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[V]}]},{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]}]},e.ngInjectableDef=n.defineInjectable({factory:function(){return new e(n.inject(V,8),n.inject(t.DOCUMENT))},token:e,providedIn:"root"}),e}(),G=function(){function e(e,t,n,r){this._elementRef=e,this._liveAnnouncer=t,this._contentObserver=n,this._ngZone=r,this._politeness="off"}return Object.defineProperty(e.prototype,"politeness",{get:function(){return this._politeness},set:function(e){var t=this;this._politeness="polite"===e||"assertive"===e?e:"off","off"===this._politeness?this._subscription&&(this._subscription.unsubscribe(),this._subscription=null):this._subscription||(this._subscription=this._ngZone.runOutsideAngular(function(){return t._contentObserver.observe(t._elementRef).subscribe(function(){var e=t._elementRef.nativeElement;t._liveAnnouncer.announce(e.textContent,t._politeness)})}))},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this._subscription&&this._subscription.unsubscribe()},e.decorators=[{type:n.Directive,args:[{selector:"[cdkAriaLive]",exportAs:"cdkAriaLive"}]}],e.ctorParameters=function(){return[{type:n.ElementRef},{type:q},{type:a.ContentObserver},{type:n.NgZone}]},e.propDecorators={politeness:[{type:n.Input,args:["cdkAriaLive"]}]},e}(),Y={provide:q,deps:[[new n.Optional,new n.SkipSelf,q],[new n.Optional,new n.Inject(V)],t.DOCUMENT],useFactory:O},z=function(){function e(e,t){this._ngZone=e,this._platform=t,this._origin=null,this._windowFocused=!1,this._elementInfo=new Map,this._unregisterGlobalListeners=function(){},this._monitoredElementCount=0}return e.prototype.monitor=function(e,t){var n=this;if(void 0===t&&(t=!1),!this._platform.isBrowser)return r.of(null);if(this._elementInfo.has(e)){var i=this._elementInfo.get(e);return i.checkChildren=t,i.subject.asObservable()}var o={unlisten:function(){},checkChildren:t,subject:new r.Subject};this._elementInfo.set(e,o),this._incrementMonitoredElementCount();var s=function(t){return n._onFocus(t,e)},c=function(t){return n._onBlur(t,e)};return this._ngZone.runOutsideAngular(function(){e.addEventListener("focus",s,!0),e.addEventListener("blur",c,!0)}),o.unlisten=function(){e.removeEventListener("focus",s,!0),e.removeEventListener("blur",c,!0)},o.subject.asObservable()},e.prototype.stopMonitoring=function(e){var t=this._elementInfo.get(e);t&&(t.unlisten(),t.subject.complete(),this._setClasses(e),this._elementInfo.delete(e),this._decrementMonitoredElementCount())},e.prototype.focusVia=function(e,t,n){this._setOriginForCurrentEventQueue(t),"function"==typeof e.focus&&e.focus(n)},e.prototype.ngOnDestroy=function(){var e=this;this._elementInfo.forEach(function(t,n){return e.stopMonitoring(n)})},e.prototype._registerGlobalListeners=function(){var e=this;if(this._platform.isBrowser){var t=function(){e._lastTouchTarget=null,e._setOriginForCurrentEventQueue("keyboard")},n=function(){e._lastTouchTarget||e._setOriginForCurrentEventQueue("mouse")},r=function(t){null!=e._touchTimeoutId&&clearTimeout(e._touchTimeoutId),e._lastTouchTarget=t.target,e._touchTimeoutId=setTimeout(function(){return e._lastTouchTarget=null},650)},i=function(){e._windowFocused=!0,e._windowFocusTimeoutId=setTimeout(function(){return e._windowFocused=!1})};this._ngZone.runOutsideAngular(function(){document.addEventListener("keydown",t,!0),document.addEventListener("mousedown",n,!0),document.addEventListener("touchstart",r,!s.supportsPassiveEventListeners()||{passive:!0,capture:!0}),window.addEventListener("focus",i)}),this._unregisterGlobalListeners=function(){document.removeEventListener("keydown",t,!0),document.removeEventListener("mousedown",n,!0),document.removeEventListener("touchstart",r,!s.supportsPassiveEventListeners()||{passive:!0,capture:!0}),window.removeEventListener("focus",i),clearTimeout(e._windowFocusTimeoutId),clearTimeout(e._touchTimeoutId),clearTimeout(e._originTimeoutId)}}},e.prototype._toggleClass=function(e,t,n){n?e.classList.add(t):e.classList.remove(t)},e.prototype._setClasses=function(e,t){this._elementInfo.get(e)&&(this._toggleClass(e,"cdk-focused",!!t),this._toggleClass(e,"cdk-touch-focused","touch"===t),this._toggleClass(e,"cdk-keyboard-focused","keyboard"===t),this._toggleClass(e,"cdk-mouse-focused","mouse"===t),this._toggleClass(e,"cdk-program-focused","program"===t))},e.prototype._setOriginForCurrentEventQueue=function(e){var t=this;this._ngZone.runOutsideAngular(function(){t._origin=e,t._originTimeoutId=setTimeout(function(){return t._origin=null},1)})},e.prototype._wasCausedByTouch=function(e){var t=e.target;return this._lastTouchTarget instanceof Node&&t instanceof Node&&(t===this._lastTouchTarget||t.contains(this._lastTouchTarget))},e.prototype._onFocus=function(e,t){var n=this._elementInfo.get(t);if(n&&(n.checkChildren||t===e.target)){var r=this._origin;r||(r=this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(e)?"touch":"program"),this._setClasses(t,r),this._emitOrigin(n.subject,r),this._lastFocusOrigin=r}},e.prototype._onBlur=function(e,t){var n=this._elementInfo.get(t);!n||n.checkChildren&&e.relatedTarget instanceof Node&&t.contains(e.relatedTarget)||(this._setClasses(t),this._emitOrigin(n.subject,null))},e.prototype._emitOrigin=function(e,t){this._ngZone.run(function(){return e.next(t)})},e.prototype._incrementMonitoredElementCount=function(){1==++this._monitoredElementCount&&this._registerGlobalListeners()},e.prototype._decrementMonitoredElementCount=function(){--this._monitoredElementCount||(this._unregisterGlobalListeners(),this._unregisterGlobalListeners=function(){})},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:n.NgZone},{type:s.Platform}]},e.ngInjectableDef=n.defineInjectable({factory:function(){return new e(n.inject(n.NgZone),n.inject(s.Platform))},token:e,providedIn:"root"}),e}(),Q=function(){function e(e,t){var r=this;this._elementRef=e,this._focusMonitor=t,this.cdkFocusChange=new n.EventEmitter,this._monitorSubscription=this._focusMonitor.monitor(this._elementRef.nativeElement,this._elementRef.nativeElement.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(function(e){return r.cdkFocusChange.emit(e)})}return e.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef.nativeElement),this._monitorSubscription.unsubscribe()},e.decorators=[{type:n.Directive,args:[{selector:"[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef},{type:z}]},e.propDecorators={cdkFocusChange:[{type:n.Output}]},e}(),H={provide:z,deps:[[new n.Optional,new n.SkipSelf,z],n.NgZone,s.Platform],useFactory:N},X=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{imports:[t.CommonModule,s.PlatformModule,a.ObserversModule],declarations:[G,W,Q],exports:[G,W,Q]}]}],e}();e.MESSAGES_CONTAINER_ID="cdk-describedby-message-container",e.CDK_DESCRIBEDBY_ID_PREFIX="cdk-describedby-message",e.CDK_DESCRIBEDBY_HOST_ATTRIBUTE="cdk-describedby-host",e.AriaDescriber=x,e.ARIA_DESCRIBER_PROVIDER_FACTORY=p,e.ARIA_DESCRIBER_PROVIDER=j,e.ActiveDescendantKeyManager=S,e.FocusKeyManager=B,e.ListKeyManager=P,e.FocusTrap=U,e.FocusTrapFactory=Z,e.CdkTrapFocus=W,e.InteractivityChecker=K,e.LiveAnnouncer=q,e.CdkAriaLive=G,e.LIVE_ANNOUNCER_PROVIDER_FACTORY=O,e.LIVE_ANNOUNCER_PROVIDER=Y,e.LIVE_ANNOUNCER_ELEMENT_TOKEN=V,e.LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY=C,e.TOUCH_BUFFER_MS=650,e.FocusMonitor=z,e.CdkMonitorFocus=Q,e.FOCUS_MONITOR_PROVIDER_FACTORY=N,e.FOCUS_MONITOR_PROVIDER=H,e.isFakeMousedownFromScreenReader=w,e.A11yModule=X,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
9
9
|
//# sourceMappingURL=cdk-a11y.umd.min.js.map
|