@angular/cdk 11.0.0-rc.4 → 11.0.3
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/focus-trap/focus-trap.d.ts +8 -8
- package/a11y/index.metadata.json +1 -1
- package/bundles/cdk-a11y.umd.js +18 -13
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +7 -7
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-coercion.umd.js +5 -5
- package/bundles/cdk-coercion.umd.js.map +1 -1
- package/bundles/cdk-coercion.umd.min.js.map +1 -1
- package/bundles/cdk-collections.umd.js +5 -5
- 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 +43 -11
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +8 -8
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-observers.umd.js +3 -4
- 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 +5 -5
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +1 -1
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +5 -5
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js +1 -1
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +5 -5
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +2 -2
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +5 -5
- 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-testing-protractor.umd.js +5 -5
- package/bundles/cdk-testing-protractor.umd.js.map +1 -1
- package/bundles/cdk-testing-protractor.umd.min.js +1 -1
- package/bundles/cdk-testing-protractor.umd.min.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.js +5 -5
- package/bundles/cdk-testing-testbed.umd.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.min.js +1 -1
- package/bundles/cdk-testing-testbed.umd.min.js.map +1 -1
- package/bundles/cdk-testing.umd.js +5 -5
- package/bundles/cdk-testing.umd.js.map +1 -1
- package/bundles/cdk-testing.umd.min.js +1 -1
- package/bundles/cdk-testing.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +5 -5
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js +2 -2
- 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/drag-drop/drag-ref.d.ts +13 -0
- package/drag-drop/index.metadata.json +1 -1
- package/esm2015/a11y/focus-trap/focus-trap.js +14 -9
- package/esm2015/drag-drop/drag-ref.js +39 -8
- package/esm2015/observers/observe-content.js +3 -4
- package/esm2015/version.js +1 -1
- package/fesm2015/a11y.js +13 -8
- package/fesm2015/a11y.js.map +1 -1
- package/fesm2015/cdk.js +1 -1
- package/fesm2015/cdk.js.map +1 -1
- package/fesm2015/drag-drop.js +37 -6
- package/fesm2015/drag-drop.js.map +1 -1
- package/fesm2015/observers.js +2 -3
- package/fesm2015/observers.js.map +1 -1
- package/observers/index.metadata.json +1 -1
- package/observers/observe-content.d.ts +2 -2
- package/package.json +3 -3
- package/schematics/migration.json +5 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/devkit-file-system.d.ts +1 -0
- package/schematics/ng-update/devkit-file-system.js +20 -13
- package/schematics/ng-update/index.d.ts +2 -0
- package/schematics/ng-update/index.js +7 -2
- package/schematics/update-tool/target-version.d.ts +2 -1
- package/schematics/update-tool/target-version.js +2 -1
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
28
28
|
PERFORMANCE OF THIS SOFTWARE.
|
|
29
29
|
***************************************************************************** */
|
|
30
|
-
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)
|
|
30
|
+
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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function _(e,t){function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}
|
|
31
31
|
/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -35,28 +35,28 @@ var f=function(e,t){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Arr
|
|
|
35
35
|
* Use of this source code is governed by an MIT-style license that can be
|
|
36
36
|
* found in the LICENSE file at https://angular.io/license
|
|
37
37
|
*/
|
|
38
|
-
var g=function(){function e(e){var t=this;this._items=e,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new o.Subject,this._typeaheadSubscription=o.Subscription.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._skipPredicateFn=function(e){return e.disabled},this._pressedLetters=[],this.tabOut=new o.Subject,this.change=new o.Subject,e instanceof n.QueryList&&e.changes.subscribe((function(e){if(t._activeItem){var n=e.toArray().indexOf(t._activeItem);n>-1&&n!==t._activeItemIndex&&(t._activeItemIndex=n)}}))}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.withAllowedModifierKeys=function(e){return this._allowedModifierKeys=e,this},e.prototype.withTypeAhead=function(e){var t=this;return void 0===e&&(e=200),this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(s.tap((function(e){return t._pressedLetters.push(e)})),s.debounceTime(e),s.filter((function(){return t._pressedLetters.length>0})),s.map((function(){return t._pressedLetters.join("")}))).subscribe((function(e){for(var n=t._getItemsArray(),r=1;r<n.length+1;r++){var o=(t._activeItemIndex+r)%n.length,i=n[o];if(!t._skipPredicateFn(i)&&0===i.getLabel().toUpperCase().trim().indexOf(e)){t.setActiveItem(o);break}}t._pressedLetters=[]})),this},e.prototype.withHomeAndEnd=function(e){return void 0===e&&(e=!0),this._homeAndEnd=e,this},e.prototype.setActiveItem=function(e){var t=this._activeItem;this.updateActiveItem(e),this._activeItem!==t&&this.change.next(this._activeItemIndex)},e.prototype.onKeydown=function(e){var t=this,n=e.keyCode,r=["altKey","ctrlKey","metaKey","shiftKey"].every((function(n){return!e[n]||t._allowedModifierKeys.indexOf(n)>-1}));switch(n){case i.TAB:return void this.tabOut.next();case i.DOWN_ARROW:if(this._vertical&&r){this.setNextItemActive();break}return;case i.UP_ARROW:if(this._vertical&&r){this.setPreviousItemActive();break}return;case i.RIGHT_ARROW:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case i.LEFT_ARROW:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case i.HOME:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case i.END:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;default:return void((r||i.hasModifierKey(e,"shiftKey"))&&(e.key&&1===e.key.length?this._letterKeyStream.next(e.key.toLocaleUpperCase()):(n>=i.A&&n<=i.Z||n>=i.ZERO&&n<=i.NINE)&&this._letterKeyStream.next(String.fromCharCode(n))))}this._pressedLetters=[],e.preventDefault()},Object.defineProperty(e.prototype,"activeItemIndex",{get:function(){return this._activeItemIndex},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeItem",{get:function(){return this._activeItem},enumerable:!1,configurable:!0}),e.prototype.isTyping=function(){return this._pressedLetters.length>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),r=t[n];this._activeItem=null==r?null:r,this._activeItemIndex=n},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;if(!this._skipPredicateFn(t[r]))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(!n[e+=t])return;this.setActiveItem(e)}},e.prototype._getItemsArray=function(){return this._items instanceof n.QueryList?this._items.toArray():this._items},e}(),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),t.prototype.setActiveItem=function(t){this.activeItem&&this.activeItem.setInactiveStyles(),e.prototype.setActiveItem.call(this,t),this.activeItem&&this.activeItem.setActiveStyles()},t}(g),b=function(e){function t(){var t=e.apply(this,y(arguments))||this;return t._origin="program",t}return _(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}(g),I=function I(){this.ignoreVisibility=!1},
|
|
38
|
+
var g=function(){function e(e){var t=this;this._items=e,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new o.Subject,this._typeaheadSubscription=o.Subscription.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._skipPredicateFn=function(e){return e.disabled},this._pressedLetters=[],this.tabOut=new o.Subject,this.change=new o.Subject,e instanceof n.QueryList&&e.changes.subscribe((function(e){if(t._activeItem){var n=e.toArray().indexOf(t._activeItem);n>-1&&n!==t._activeItemIndex&&(t._activeItemIndex=n)}}))}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.withAllowedModifierKeys=function(e){return this._allowedModifierKeys=e,this},e.prototype.withTypeAhead=function(e){var t=this;return void 0===e&&(e=200),this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(s.tap((function(e){return t._pressedLetters.push(e)})),s.debounceTime(e),s.filter((function(){return t._pressedLetters.length>0})),s.map((function(){return t._pressedLetters.join("")}))).subscribe((function(e){for(var n=t._getItemsArray(),r=1;r<n.length+1;r++){var o=(t._activeItemIndex+r)%n.length,i=n[o];if(!t._skipPredicateFn(i)&&0===i.getLabel().toUpperCase().trim().indexOf(e)){t.setActiveItem(o);break}}t._pressedLetters=[]})),this},e.prototype.withHomeAndEnd=function(e){return void 0===e&&(e=!0),this._homeAndEnd=e,this},e.prototype.setActiveItem=function(e){var t=this._activeItem;this.updateActiveItem(e),this._activeItem!==t&&this.change.next(this._activeItemIndex)},e.prototype.onKeydown=function(e){var t=this,n=e.keyCode,r=["altKey","ctrlKey","metaKey","shiftKey"].every((function(n){return!e[n]||t._allowedModifierKeys.indexOf(n)>-1}));switch(n){case i.TAB:return void this.tabOut.next();case i.DOWN_ARROW:if(this._vertical&&r){this.setNextItemActive();break}return;case i.UP_ARROW:if(this._vertical&&r){this.setPreviousItemActive();break}return;case i.RIGHT_ARROW:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case i.LEFT_ARROW:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case i.HOME:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case i.END:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;default:return void((r||i.hasModifierKey(e,"shiftKey"))&&(e.key&&1===e.key.length?this._letterKeyStream.next(e.key.toLocaleUpperCase()):(n>=i.A&&n<=i.Z||n>=i.ZERO&&n<=i.NINE)&&this._letterKeyStream.next(String.fromCharCode(n))))}this._pressedLetters=[],e.preventDefault()},Object.defineProperty(e.prototype,"activeItemIndex",{get:function(){return this._activeItemIndex},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeItem",{get:function(){return this._activeItem},enumerable:!1,configurable:!0}),e.prototype.isTyping=function(){return this._pressedLetters.length>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),r=t[n];this._activeItem=null==r?null:r,this._activeItemIndex=n},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;if(!this._skipPredicateFn(t[r]))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(!n[e+=t])return;this.setActiveItem(e)}},e.prototype._getItemsArray=function(){return this._items instanceof n.QueryList?this._items.toArray():this._items},e}(),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),t.prototype.setActiveItem=function(t){this.activeItem&&this.activeItem.setInactiveStyles(),e.prototype.setActiveItem.call(this,t),this.activeItem&&this.activeItem.setActiveStyles()},t}(g),b=function(e){function t(){var t=e.apply(this,y(arguments))||this;return t._origin="program",t}return _(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}(g),I=function I(){this.ignoreVisibility=!1},E=function(){function e(e){this._platform=e}return e.prototype.isDisabled=function(e){return e.hasAttribute("disabled")},e.prototype.isVisible=function(e){return function t(e){return!!(e.offsetWidth||e.offsetHeight||"function"==typeof e.getClientRects&&e.getClientRects().length)}(e)&&"visible"===getComputedStyle(e).visibility},e.prototype.isTabbable=function(e){if(!this._platform.isBrowser)return!1;var t=function r(e){try{return e.frameElement}catch(e){return null}}(function n(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}
|
|
39
39
|
/**
|
|
40
40
|
* @license
|
|
41
41
|
* Copyright Google LLC All Rights Reserved.
|
|
42
42
|
*
|
|
43
43
|
* Use of this source code is governed by an MIT-style license that can be
|
|
44
44
|
* found in the LICENSE file at https://angular.io/license
|
|
45
|
-
*/(e));if(t){if(-1===T(t))return!1;if(!this.isVisible(t))return!1}var o=e.nodeName.toLowerCase(),i=T(e);return e.hasAttribute("contenteditable")?-1!==i:"iframe"!==o&&"object"!==o&&!(this._platform.WEBKIT&&this._platform.IOS&&!function s(e){var t=e.nodeName.toLowerCase(),n="input"===t&&e.type;return"text"===n||"password"===n||"select"===t||"textarea"===t}(e))&&("audio"===o?!!e.hasAttribute("controls")&&-1!==i:"video"===o?-1!==i&&(null!==i||this._platform.FIREFOX||e.hasAttribute("controls")):e.tabIndex>=0)},e.prototype.isFocusable=function(e,t){return function n(e){return!function t(e){return function t(e){return"input"==e.nodeName.toLowerCase()}(e)&&"hidden"==e.type}(e)&&(function n(e){var t=e.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(e)||function r(e){return function t(e){return"a"==e.nodeName.toLowerCase()}(e)&&e.hasAttribute("href")}(e)||e.hasAttribute("contenteditable")||
|
|
45
|
+
*/(e));if(t){if(-1===T(t))return!1;if(!this.isVisible(t))return!1}var o=e.nodeName.toLowerCase(),i=T(e);return e.hasAttribute("contenteditable")?-1!==i:"iframe"!==o&&"object"!==o&&!(this._platform.WEBKIT&&this._platform.IOS&&!function s(e){var t=e.nodeName.toLowerCase(),n="input"===t&&e.type;return"text"===n||"password"===n||"select"===t||"textarea"===t}(e))&&("audio"===o?!!e.hasAttribute("controls")&&-1!==i:"video"===o?-1!==i&&(null!==i||this._platform.FIREFOX||e.hasAttribute("controls")):e.tabIndex>=0)},e.prototype.isFocusable=function(e,t){return function n(e){return!function t(e){return function t(e){return"input"==e.nodeName.toLowerCase()}(e)&&"hidden"==e.type}(e)&&(function n(e){var t=e.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(e)||function r(e){return function t(e){return"a"==e.nodeName.toLowerCase()}(e)&&e.hasAttribute("href")}(e)||e.hasAttribute("contenteditable")||A(e))}(e)&&!this.isDisabled(e)&&((null==t?void 0:t.ignoreVisibility)||this.isVisible(e))},e}();function A(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 T(e){if(!A(e))return null;var t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}E.ɵprov=n.ɵɵdefineInjectable({factory:function e(){return new E(n.ɵɵinject(r.Platform))},token:E,providedIn:"root"}),E.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],E.ctorParameters=function(){return[{type:r.Platform}]};var k=function(){function e(e,t,n,r,o){var i=this;void 0===o&&(o=!1),this._element=e,this._checker=t,this._ngZone=n,this._document=r,this._hasAttached=!1,this.startAnchorListener=function(){return i.focusLastTabbableElement()},this.endAnchorListener=function(){return i.focusFirstTabbableElement()},this._enabled=!0,o||this.attachAnchors()}return Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){var e=this._startAnchor,t=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),t&&(t.removeEventListener("focus",this.endAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),this._startAnchor=this._endAnchor=null,this._hasAttached=!1},e.prototype.attachAnchors=function(){var e=this;return!!this._hasAttached||(this._ngZone.runOutsideAngular((function(){e._startAnchor||(e._startAnchor=e._createAnchor(),e._startAnchor.addEventListener("focus",e.startAnchorListener)),e._endAnchor||(e._endAnchor=e._createAnchor(),e._endAnchor.addEventListener("focus",e.endAnchorListener))})),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 8.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 8.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]");if(e){if(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 8.0.0",e),!this._checker.isFocusable(e)){var t=this._getFirstTabbableElement(e);return null==t||t.focus(),!!t}return e.focus(),!0}return 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 this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e},e.prototype._toggleAnchorTabIndex=function(e,t){e?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")},e.prototype.toggleAnchors=function(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))},e.prototype._executeOnStable=function(e){this._ngZone.isStable?e():this._ngZone.onStable.pipe(s.take(1)).subscribe(e)},e}(),C=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 k(e,this._checker,this._ngZone,this._document,t)},e}();C.ɵprov=n.ɵɵdefineInjectable({factory:function e(){return new C(n.ɵɵinject(E),n.ɵɵinject(n.NgZone),n.ɵɵinject(t.DOCUMENT))},token:C,providedIn:"root"}),C.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],C.ctorParameters=function(){return[{type:E},{type:n.NgZone},{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]}]};var 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:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoCapture",{get:function(){return this._autoCapture},set:function(e){this._autoCapture=c.coerceBooleanProperty(e)},enumerable:!1,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._captureFocus()},e.prototype.ngDoCheck=function(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()},e.prototype.ngOnChanges=function(e){var t=e.autoCapture;t&&!t.firstChange&&this.autoCapture&&this.focusTrap.hasAttached()&&this._captureFocus()},e.prototype._captureFocus=function(){this._previouslyFocusedElement=this._document.activeElement,this.focusTrap.focusInitialElementWhenReady()},e}();w.decorators=[{type:n.Directive,args:[{selector:"[cdkTrapFocus]",exportAs:"cdkTrapFocus"}]}],w.ctorParameters=function(){return[{type:n.ElementRef},{type:C},{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]}]},w.propDecorators={enabled:[{type:n.Input,args:["cdkTrapFocus"]}],autoCapture:[{type:n.Input,args:["cdkTrapFocusAutoCapture"]}]};var F=function(e){function t(t,n,r,o,i,s,c){var a=e.call(this,t,n,r,o,c.defer)||this;return a._focusTrapManager=i,a._inertStrategy=s,a._focusTrapManager.register(a),a}return _(t,e),Object.defineProperty(t.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e,this._enabled?this._focusTrapManager.register(this):this._focusTrapManager.deregister(this)},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){this._focusTrapManager.deregister(this),e.prototype.destroy.call(this)},t.prototype._enable=function(){this._inertStrategy.preventFocus(this),this.toggleAnchors(!0)},t.prototype._disable=function(){this._inertStrategy.allowFocus(this),this.toggleAnchors(!1)},t}(k),O="undefined"!=typeof Element&&!!Element.prototype.closest;
|
|
46
46
|
/**
|
|
47
47
|
* @license
|
|
48
48
|
* Copyright Google LLC All Rights Reserved.
|
|
49
49
|
*
|
|
50
50
|
* Use of this source code is governed by an MIT-style license that can be
|
|
51
51
|
* found in the LICENSE file at https://angular.io/license
|
|
52
|
-
*/function
|
|
52
|
+
*/function N(e,t){return e.matches?e.matches(t):e.msMatchesSelector(t)}
|
|
53
53
|
/**
|
|
54
54
|
* @license
|
|
55
55
|
* Copyright Google LLC All Rights Reserved.
|
|
56
56
|
*
|
|
57
57
|
* Use of this source code is governed by an MIT-style license that can be
|
|
58
58
|
* found in the LICENSE file at https://angular.io/license
|
|
59
|
-
*/var L=function(){function e(){this._listener=null}return e.prototype.preventFocus=function(e){var t=this;this._listener&&e._document.removeEventListener("focus",this._listener,!0),this._listener=function(n){return t._trapFocus(e,n)},e._ngZone.runOutsideAngular((function(){e._document.addEventListener("focus",t._listener,!0)}))},e.prototype.allowFocus=function(e){this._listener&&(e._document.removeEventListener("focus",this._listener,!0),this._listener=null)},e.prototype._trapFocus=function(e,t){var n=t.target,r=e._element;r.contains(n)||null!==function o(e,t){if(!(e instanceof Node))return null;for(var n=e;null!=n&&!(n instanceof Element);)n=n.parentNode;return n&&(
|
|
59
|
+
*/var L=function(){function e(){this._listener=null}return e.prototype.preventFocus=function(e){var t=this;this._listener&&e._document.removeEventListener("focus",this._listener,!0),this._listener=function(n){return t._trapFocus(e,n)},e._ngZone.runOutsideAngular((function(){e._document.addEventListener("focus",t._listener,!0)}))},e.prototype.allowFocus=function(e){this._listener&&(e._document.removeEventListener("focus",this._listener,!0),this._listener=null)},e.prototype._trapFocus=function(e,t){var n=t.target,r=e._element;r.contains(n)||null!==function o(e,t){if(!(e instanceof Node))return null;for(var n=e;null!=n&&!(n instanceof Element);)n=n.parentNode;return n&&(O?n.closest(t):function r(e,t){for(var n=e;null!=n&&!(n instanceof Element&&N(n,t));)n=n.parentNode;return n||null}(n,t))}(n,"div.cdk-overlay-pane")||setTimeout((function(){e.enabled&&!r.contains(e._document.activeElement)&&e.focusFirstTabbableElement()}))},e}(),M=function M(){this.defer=!1},j=new n.InjectionToken("FOCUS_TRAP_INERT_STRATEGY"),x=function(){function e(){this._focusTrapStack=[]}return e.prototype.register=function(e){this._focusTrapStack=this._focusTrapStack.filter((function(t){return t!==e}));var t=this._focusTrapStack;t.length&&t[t.length-1]._disable(),t.push(e),e._enable()},e.prototype.deregister=function(e){e._disable();var t=this._focusTrapStack,n=t.indexOf(e);-1!==n&&(t.splice(n,1),t.length&&t[t.length-1]._enable())},e}();
|
|
60
60
|
/**
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -71,7 +71,7 @@ var g=function(){function e(e){var t=this;this._items=e,this._activeItemIndex=-1
|
|
|
71
71
|
* Use of this source code is governed by an MIT-style license that can be
|
|
72
72
|
* found in the LICENSE file at https://angular.io/license
|
|
73
73
|
*/
|
|
74
|
-
var D=function(){function e(e,t,n,r,o){this._checker=e,this._ngZone=t,this._focusTrapManager=n,this._document=r,this._inertStrategy=o||new L}return e.prototype.create=function(e,t){var n;return void 0===t&&(t=new M),"boolean"==typeof t?(n=new M).defer=t:n=t,new F(e,this._checker,this._ngZone,this._document,this._focusTrapManager,this._inertStrategy,n)},e}();D.ɵprov=n.ɵɵdefineInjectable({factory:function e(){return new D(n.ɵɵinject(
|
|
74
|
+
var D=function(){function e(e,t,n,r,o){this._checker=e,this._ngZone=t,this._focusTrapManager=n,this._document=r,this._inertStrategy=o||new L}return e.prototype.create=function(e,t){var n;return void 0===t&&(t=new M),"boolean"==typeof t?(n=new M).defer=t:n=t,new F(e,this._checker,this._ngZone,this._document,this._focusTrapManager,this._inertStrategy,n)},e}();D.ɵprov=n.ɵɵdefineInjectable({factory:function e(){return new D(n.ɵɵinject(E),n.ɵɵinject(n.NgZone),n.ɵɵinject(x),n.ɵɵinject(t.DOCUMENT),n.ɵɵinject(j,8))},token:D,providedIn:"root"}),D.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],D.ctorParameters=function(){return[{type:E},{type:n.NgZone},{type:x},{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[j]}]}]};
|
|
75
75
|
/**
|
|
76
76
|
* @license
|
|
77
77
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -110,4 +110,4 @@ var G,z=function(){function e(e,t){this._platform=e,this._document=t}return e.pr
|
|
|
110
110
|
* Use of this source code is governed by an MIT-style license that can be
|
|
111
111
|
* found in the LICENSE file at https://angular.io/license
|
|
112
112
|
*/
|
|
113
|
-
e.A11yModule=G,e.ActiveDescendantKeyManager=v,e.AriaDescriber=p,e.CDK_DESCRIBEDBY_HOST_ATTRIBUTE="cdk-describedby-host",e.CDK_DESCRIBEDBY_ID_PREFIX="cdk-describedby-message",e.CdkAriaLive=U,e.CdkMonitorFocus=q,e.CdkTrapFocus=w,e.ConfigurableFocusTrap=F,e.ConfigurableFocusTrapFactory=D,e.EventListenerFocusTrapInertStrategy=L,e.FOCUS_MONITOR_DEFAULT_OPTIONS=K,e.FOCUS_TRAP_INERT_STRATEGY=j,e.FocusKeyManager=b,e.FocusMonitor=V,e.FocusTrap=k,e.FocusTrapFactory=C,e.HighContrastModeDetector=z,e.InteractivityChecker=
|
|
113
|
+
e.A11yModule=G,e.ActiveDescendantKeyManager=v,e.AriaDescriber=p,e.CDK_DESCRIBEDBY_HOST_ATTRIBUTE="cdk-describedby-host",e.CDK_DESCRIBEDBY_ID_PREFIX="cdk-describedby-message",e.CdkAriaLive=U,e.CdkMonitorFocus=q,e.CdkTrapFocus=w,e.ConfigurableFocusTrap=F,e.ConfigurableFocusTrapFactory=D,e.EventListenerFocusTrapInertStrategy=L,e.FOCUS_MONITOR_DEFAULT_OPTIONS=K,e.FOCUS_TRAP_INERT_STRATEGY=j,e.FocusKeyManager=b,e.FocusMonitor=V,e.FocusTrap=k,e.FocusTrapFactory=C,e.HighContrastModeDetector=z,e.InteractivityChecker=E,e.IsFocusableConfig=I,e.LIVE_ANNOUNCER_DEFAULT_OPTIONS=P,e.LIVE_ANNOUNCER_ELEMENT_TOKEN=S,e.LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY=R,e.ListKeyManager=g,e.LiveAnnouncer=B,e.MESSAGES_CONTAINER_ID="cdk-describedby-message-container",e.TOUCH_BUFFER_MS=650,e.isFakeMousedownFromScreenReader=Z,e.ɵangular_material_src_cdk_a11y_a11y_a=x,e.ɵangular_material_src_cdk_a11y_a11y_b=M,Object.defineProperty(e,"__esModule",{value:!0})}));
|