@angular/cdk 10.2.3 → 10.2.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/bundles/cdk-a11y.umd.js +7 -6
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +2 -2
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-collections.umd.js +1 -3
- package/bundles/cdk-collections.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +20 -4
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +19 -19
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +2 -2
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +1 -1
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk.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/index.metadata.json +1 -1
- package/collections/view-repeater.d.ts +1 -3
- package/drag-drop/drag-styling.d.ts +7 -0
- package/esm2015/a11y/focus-monitor/focus-monitor.js +6 -5
- package/esm2015/a11y/live-announcer/live-announcer.js +3 -3
- package/esm2015/collections/view-repeater.js +2 -4
- package/esm2015/drag-drop/clone-node.js +5 -2
- package/esm2015/drag-drop/drag-ref.js +6 -5
- package/esm2015/drag-drop/drag-styling.js +13 -1
- package/esm2015/scrolling/virtual-for-of.js +3 -3
- package/esm2015/version.js +1 -1
- package/fesm2015/a11y.js +7 -6
- package/fesm2015/a11y.js.map +1 -1
- package/fesm2015/cdk.js +1 -1
- package/fesm2015/cdk.js.map +1 -1
- package/fesm2015/collections.js +1 -3
- package/fesm2015/collections.js.map +1 -1
- package/fesm2015/drag-drop.js +20 -4
- package/fesm2015/drag-drop.js.map +1 -1
- package/fesm2015/scrolling.js +2 -2
- package/fesm2015/scrolling.js.map +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/data/css-selectors.d.ts +6 -3
- package/schematics/ng-update/data/css-selectors.js +1 -1
- package/schematics/ng-update/data/input-names.d.ts +2 -2
- package/schematics/ng-update/data/input-names.js +13 -13
- package/schematics/ng-update/data/output-names.d.ts +2 -2
- package/schematics/ng-update/data/output-names.js +2 -2
- package/schematics/ng-update/data/property-names.d.ts +2 -2
- package/schematics/ng-update/data/property-names.js +19 -19
- package/schematics/ng-update/migrations/class-inheritance.js +3 -3
- package/schematics/ng-update/migrations/css-selectors.d.ts +3 -2
- package/schematics/ng-update/migrations/css-selectors.js +4 -4
- package/schematics/ng-update/migrations/input-names.js +6 -6
- package/schematics/ng-update/migrations/output-names.js +6 -6
- package/schematics/ng-update/migrations/property-names.js +2 -2
|
@@ -79,7 +79,7 @@ var D=function(){function e(e,t,n,r,o){this._checker=e,this._ngZone=t,this._focu
|
|
|
79
79
|
* Use of this source code is governed by an MIT-style license that can be
|
|
80
80
|
* found in the LICENSE file at https://angular.io/license
|
|
81
81
|
*/
|
|
82
|
-
var S=new n.InjectionToken("liveAnnouncerElement",{providedIn:"root",factory:R});function R(){return null}var P=new n.InjectionToken("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),B=function(){function e(e,t,n,r){this._ngZone=t,this._defaultOptions=r,this._document=n,this._liveElement=e||this._createLiveElement()}return e.prototype.announce=function(e){for(var t,n=this,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var i,s,c=this._defaultOptions;return 1===r.length&&"number"==typeof r[0]?s=r[0]:(i=(t=m(r,2))[0],s=t[1]),this.clear(),clearTimeout(this._previousTimeout),i||(i=c&&c.politeness?c.politeness:"polite"),null==s&&c&&(s=c.duration),this._liveElement.setAttribute("aria-live",i),this._ngZone.runOutsideAngular((function(){return new Promise((function(t){clearTimeout(n._previousTimeout),n._previousTimeout=setTimeout((function(){n._liveElement.textContent=e,t(),"number"==typeof s&&(n._previousTimeout=setTimeout((function(){return n.clear()}),s))}),100)}))}))},e.prototype.clear=function(){this._liveElement&&(this._liveElement.textContent="")},e.prototype.ngOnDestroy=function(){clearTimeout(this._previousTimeout),this._liveElement&&this._liveElement.parentNode&&(this._liveElement.parentNode.removeChild(this._liveElement),this._liveElement=null)},e.prototype._createLiveElement=function(){for(var e=this._document.getElementsByClassName("cdk-live-announcer-element"),t=this._document.createElement("div"),n=0;n<e.length;n++)e[n].parentNode.removeChild(e[n]);return t.classList.add("cdk-live-announcer-element"),t.classList.add("cdk-visually-hidden"),t.setAttribute("aria-atomic","true"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),t},e}();B.ɵprov=n.ɵɵdefineInjectable({factory:function e(){return new B(n.ɵɵinject(S,8),n.ɵɵinject(n.NgZone),n.ɵɵinject(t.DOCUMENT),n.ɵɵinject(P,8))},token:B,providedIn:"root"}),B.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],B.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[S]}]},{type:n.NgZone},{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[P]}]}]};var U=function(){function e(e,t,n,r){this._elementRef=e,this._liveAnnouncer=t,this._contentObserver=n,this._ngZone=r,this._politeness="
|
|
82
|
+
var S=new n.InjectionToken("liveAnnouncerElement",{providedIn:"root",factory:R});function R(){return null}var P=new n.InjectionToken("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),B=function(){function e(e,t,n,r){this._ngZone=t,this._defaultOptions=r,this._document=n,this._liveElement=e||this._createLiveElement()}return e.prototype.announce=function(e){for(var t,n=this,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var i,s,c=this._defaultOptions;return 1===r.length&&"number"==typeof r[0]?s=r[0]:(i=(t=m(r,2))[0],s=t[1]),this.clear(),clearTimeout(this._previousTimeout),i||(i=c&&c.politeness?c.politeness:"polite"),null==s&&c&&(s=c.duration),this._liveElement.setAttribute("aria-live",i),this._ngZone.runOutsideAngular((function(){return new Promise((function(t){clearTimeout(n._previousTimeout),n._previousTimeout=setTimeout((function(){n._liveElement.textContent=e,t(),"number"==typeof s&&(n._previousTimeout=setTimeout((function(){return n.clear()}),s))}),100)}))}))},e.prototype.clear=function(){this._liveElement&&(this._liveElement.textContent="")},e.prototype.ngOnDestroy=function(){clearTimeout(this._previousTimeout),this._liveElement&&this._liveElement.parentNode&&(this._liveElement.parentNode.removeChild(this._liveElement),this._liveElement=null)},e.prototype._createLiveElement=function(){for(var e=this._document.getElementsByClassName("cdk-live-announcer-element"),t=this._document.createElement("div"),n=0;n<e.length;n++)e[n].parentNode.removeChild(e[n]);return t.classList.add("cdk-live-announcer-element"),t.classList.add("cdk-visually-hidden"),t.setAttribute("aria-atomic","true"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),t},e}();B.ɵprov=n.ɵɵdefineInjectable({factory:function e(){return new B(n.ɵɵinject(S,8),n.ɵɵinject(n.NgZone),n.ɵɵinject(t.DOCUMENT),n.ɵɵinject(P,8))},token:B,providedIn:"root"}),B.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],B.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[S]}]},{type:n.NgZone},{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[P]}]}]};var U=function(){function e(e,t,n,r){this._elementRef=e,this._liveAnnouncer=t,this._contentObserver=n,this._ngZone=r,this._politeness="polite"}return Object.defineProperty(e.prototype,"politeness",{get:function(){return this._politeness},set:function(e){var t=this;this._politeness="off"===e||"assertive"===e?e:"polite","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.textContent;e!==t._previousAnnouncedText&&(t._liveAnnouncer.announce(e,t._politeness),t._previousAnnouncedText=e)}))})))},enumerable:!1,configurable:!0}),e.prototype.ngOnDestroy=function(){this._subscription&&this._subscription.unsubscribe()},e}();
|
|
83
83
|
/**
|
|
84
84
|
* @license
|
|
85
85
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -94,7 +94,7 @@ function Z(e){return 0===e.buttons}
|
|
|
94
94
|
*
|
|
95
95
|
* Use of this source code is governed by an MIT-style license that can be
|
|
96
96
|
* found in the LICENSE file at https://angular.io/license
|
|
97
|
-
*/U.decorators=[{type:n.Directive,args:[{selector:"[cdkAriaLive]",exportAs:"cdkAriaLive"}]}],U.ctorParameters=function(){return[{type:n.ElementRef},{type:B},{type:a.ContentObserver},{type:n.NgZone}]},U.propDecorators={politeness:[{type:n.Input,args:["cdkAriaLive"]}]};var K=new n.InjectionToken("cdk-focus-monitor-default-options"),W=r.normalizePassiveListenerOptions({passive:!0,capture:!0}),V=function(){function e(e,t,n,r){var o=this;this._ngZone=e,this._platform=t,this._origin=null,this._windowFocused=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._documentKeydownListener=function(){o._lastTouchTarget=null,o._setOriginForCurrentEventQueue("keyboard")},this._documentMousedownListener=function(e){if(!o._lastTouchTarget){var t=Z(e)?"keyboard":"mouse";o._setOriginForCurrentEventQueue(t)}},this._documentTouchstartListener=function(e){null!=o._touchTimeoutId&&clearTimeout(o._touchTimeoutId),o._lastTouchTarget=H(e),o._touchTimeoutId=setTimeout((function(){return o._lastTouchTarget=null}),650)},this._windowFocusListener=function(){o._windowFocused=!0,o._windowFocusTimeoutId=setTimeout((function(){return o._windowFocused=!1}))},this._rootNodeFocusAndBlurListener=function(e){for(var t=H(e),n="focus"===e.type?o._onFocus:o._onBlur,r=t;r;r=r.parentElement)n.call(o,e,r)},this._document=n,this._detectionMode=(null==r?void 0:r.detectionMode)||0}return e.prototype.monitor=function(e,t){
|
|
97
|
+
*/U.decorators=[{type:n.Directive,args:[{selector:"[cdkAriaLive]",exportAs:"cdkAriaLive"}]}],U.ctorParameters=function(){return[{type:n.ElementRef},{type:B},{type:a.ContentObserver},{type:n.NgZone}]},U.propDecorators={politeness:[{type:n.Input,args:["cdkAriaLive"]}]};var K=new n.InjectionToken("cdk-focus-monitor-default-options"),W=r.normalizePassiveListenerOptions({passive:!0,capture:!0}),V=function(){function e(e,t,n,r){var o=this;this._ngZone=e,this._platform=t,this._origin=null,this._windowFocused=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._documentKeydownListener=function(){o._lastTouchTarget=null,o._setOriginForCurrentEventQueue("keyboard")},this._documentMousedownListener=function(e){if(!o._lastTouchTarget){var t=Z(e)?"keyboard":"mouse";o._setOriginForCurrentEventQueue(t)}},this._documentTouchstartListener=function(e){null!=o._touchTimeoutId&&clearTimeout(o._touchTimeoutId),o._lastTouchTarget=H(e),o._touchTimeoutId=setTimeout((function(){return o._lastTouchTarget=null}),650)},this._windowFocusListener=function(){o._windowFocused=!0,o._windowFocusTimeoutId=setTimeout((function(){return o._windowFocused=!1}))},this._rootNodeFocusAndBlurListener=function(e){for(var t=H(e),n="focus"===e.type?o._onFocus:o._onBlur,r=t;r;r=r.parentElement)n.call(o,e,r)},this._document=n,this._detectionMode=(null==r?void 0:r.detectionMode)||0}return e.prototype.monitor=function(e,t){void 0===t&&(t=!1);var n=c.coerceElement(e);if(!this._platform.isBrowser||1!==n.nodeType)return o.of(null);var i=r._getShadowRoot(n)||this._getDocument(),s=this._elementInfo.get(n);if(s)return t&&(s.checkChildren=!0),s.subject;var a={checkChildren:t,subject:new o.Subject,rootNode:i};return this._elementInfo.set(n,a),this._registerGlobalListeners(a),a.subject},e.prototype.stopMonitoring=function(e){var t=c.coerceElement(e),n=this._elementInfo.get(t);n&&(n.subject.complete(),this._setClasses(t),this._elementInfo.delete(t),this._removeGlobalListeners(n))},e.prototype.focusVia=function(e,t,n){var r=c.coerceElement(e);this._setOriginForCurrentEventQueue(t),"function"==typeof r.focus&&r.focus(n)},e.prototype.ngOnDestroy=function(){var e=this;this._elementInfo.forEach((function(t,n){return e.stopMonitoring(n)}))},e.prototype._getDocument=function(){return this._document||document},e.prototype._getWindow=function(){return this._getDocument().defaultView||window},e.prototype._toggleClass=function(e,t,n){n?e.classList.add(t):e.classList.remove(t)},e.prototype._getFocusOrigin=function(e){return this._origin?this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(e)?"touch":"program"},e.prototype._setClasses=function(e,t){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,0===t._detectionMode&&(t._originTimeoutId=setTimeout((function(){return t._origin=null}),1))}))},e.prototype._wasCausedByTouch=function(e){var t=H(e);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===H(e))){var r=this._getFocusOrigin(e);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._registerGlobalListeners=function(e){var t=this;if(this._platform.isBrowser){var n=e.rootNode,r=this._rootNodeFocusListenerCount.get(n)||0;r||this._ngZone.runOutsideAngular((function(){n.addEventListener("focus",t._rootNodeFocusAndBlurListener,W),n.addEventListener("blur",t._rootNodeFocusAndBlurListener,W)})),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&this._ngZone.runOutsideAngular((function(){var e=t._getDocument(),n=t._getWindow();e.addEventListener("keydown",t._documentKeydownListener,W),e.addEventListener("mousedown",t._documentMousedownListener,W),e.addEventListener("touchstart",t._documentTouchstartListener,W),n.addEventListener("focus",t._windowFocusListener)}))}},e.prototype._removeGlobalListeners=function(e){var t=e.rootNode;if(this._rootNodeFocusListenerCount.has(t)){var n=this._rootNodeFocusListenerCount.get(t);n>1?this._rootNodeFocusListenerCount.set(t,n-1):(t.removeEventListener("focus",this._rootNodeFocusAndBlurListener,W),t.removeEventListener("blur",this._rootNodeFocusAndBlurListener,W),this._rootNodeFocusListenerCount.delete(t))}if(!--this._monitoredElementCount){var r=this._getDocument(),o=this._getWindow();r.removeEventListener("keydown",this._documentKeydownListener,W),r.removeEventListener("mousedown",this._documentMousedownListener,W),r.removeEventListener("touchstart",this._documentTouchstartListener,W),o.removeEventListener("focus",this._windowFocusListener),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId)}},e}();function H(e){return e.composedPath?e.composedPath()[0]:e.target}V.ɵprov=n.ɵɵdefineInjectable({factory:function e(){return new V(n.ɵɵinject(n.NgZone),n.ɵɵinject(r.Platform),n.ɵɵinject(t.DOCUMENT,8),n.ɵɵinject(K,8))},token:V,providedIn:"root"}),V.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],V.ctorParameters=function(){return[{type:n.NgZone},{type:r.Platform},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[t.DOCUMENT]}]},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[K]}]}]};var q=function(){function e(e,t){this._elementRef=e,this._focusMonitor=t,this.cdkFocusChange=new n.EventEmitter}return e.prototype.ngAfterViewInit=function(){var e=this,t=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(t,1===t.nodeType&&t.hasAttribute("cdkMonitorSubtreeFocus")).subscribe((function(t){return e.cdkFocusChange.emit(t)}))},e.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()},e}();q.decorators=[{type:n.Directive,args:[{selector:"[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]"}]}],q.ctorParameters=function(){return[{type:n.ElementRef},{type:V}]},q.propDecorators={cdkFocusChange:[{type:n.Output}]};
|
|
98
98
|
/**
|
|
99
99
|
* @license
|
|
100
100
|
* Copyright Google LLC All Rights Reserved.
|