@angular/cdk 7.2.1 → 7.2.2
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/index.metadata.json +1 -1
- package/bundles/cdk-a11y.umd.js +2 -1
- 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-drag-drop.umd.js +274 -126
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +2 -2
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-observers.umd.js +1 -1
- 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 +13 -12
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +2 -2
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +3 -3
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +9 -6
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +1 -1
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-stepper.umd.js +23 -11
- 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 +8 -4
- 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 +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.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/typings/directives/drag-handle.d.ts +6 -2
- package/drag-drop/typings/directives/drag.d.ts +3 -2
- package/drag-drop/typings/directives/drop-list.d.ts +2 -5
- package/drag-drop/typings/drag-ref.d.ts +27 -19
- package/drag-drop/typings/drop-list-ref.d.ts +28 -14
- package/drag-drop/typings/index.metadata.json +1 -1
- package/esm2015/a11y.js +2 -1
- package/esm2015/a11y.js.map +1 -1
- package/esm2015/cdk.js +1 -1
- package/esm2015/cdk.js.map +1 -1
- package/esm2015/drag-drop.js +192 -108
- package/esm2015/drag-drop.js.map +1 -1
- package/esm2015/observers.js +1 -1
- package/esm2015/observers.js.map +1 -1
- package/esm2015/overlay.js +11 -10
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/portal.js +1 -1
- package/esm2015/portal.js.map +1 -1
- package/esm2015/scrolling.js +9 -6
- package/esm2015/scrolling.js.map +1 -1
- package/esm2015/stepper.js +18 -11
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +8 -4
- package/esm2015/table.js.map +1 -1
- package/esm5/a11y.es5.js +2 -1
- package/esm5/a11y.es5.js.map +1 -1
- package/esm5/cdk.es5.js +1 -1
- package/esm5/cdk.es5.js.map +1 -1
- package/esm5/drag-drop.es5.js +276 -128
- package/esm5/drag-drop.es5.js.map +1 -1
- package/esm5/observers.es5.js +1 -1
- package/esm5/observers.es5.js.map +1 -1
- package/esm5/overlay.es5.js +13 -12
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/portal.es5.js +3 -3
- package/esm5/portal.es5.js.map +1 -1
- package/esm5/scrolling.es5.js +9 -6
- package/esm5/scrolling.es5.js.map +1 -1
- package/esm5/stepper.es5.js +23 -11
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +8 -4
- package/esm5/table.es5.js.map +1 -1
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/overlay-ref.d.ts +1 -1
- package/package.json +3 -3
- package/portal/typings/portal.d.ts +1 -1
- package/schematics/migration.json +5 -0
- package/schematics/ng-update/index.d.ts +2 -0
- package/schematics/ng-update/index.js +5 -0
- package/schematics/ng-update/index.js.map +1 -1
- package/schematics/ng-update/target-version.d.ts +7 -1
- package/schematics/ng-update/target-version.js +10 -0
- package/schematics/ng-update/target-version.js.map +1 -1
- package/stepper/typings/index.metadata.json +1 -1
- package/stepper/typings/stepper.d.ts +7 -1
- package/typings/a11y/index.metadata.json +1 -1
- package/typings/drag-drop/directives/drag-handle.d.ts +6 -2
- package/typings/drag-drop/directives/drag.d.ts +3 -2
- package/typings/drag-drop/directives/drop-list.d.ts +2 -5
- package/typings/drag-drop/drag-ref.d.ts +27 -19
- package/typings/drag-drop/drop-list-ref.d.ts +28 -14
- package/typings/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/a11y/index.metadata.json +1 -1
- package/typings/esm5/drag-drop/directives/drag-handle.d.ts +6 -2
- package/typings/esm5/drag-drop/directives/drag.d.ts +3 -2
- package/typings/esm5/drag-drop/directives/drop-list.d.ts +2 -5
- package/typings/esm5/drag-drop/drag-ref.d.ts +27 -19
- package/typings/esm5/drag-drop/drop-list-ref.d.ts +28 -14
- package/typings/esm5/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/overlay/index.metadata.json +1 -1
- package/typings/esm5/overlay/overlay-ref.d.ts +1 -1
- package/typings/esm5/portal/portal.d.ts +1 -1
- package/typings/esm5/stepper/index.metadata.json +1 -1
- package/typings/esm5/stepper/stepper.d.ts +7 -1
- package/typings/index.metadata.json +1 -1
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/overlay-ref.d.ts +1 -1
- package/typings/portal/portal.d.ts +1 -1
- package/typings/schematics/ng-update/index.d.ts +2 -0
- package/typings/schematics/ng-update/target-version.d.ts +7 -1
- package/typings/stepper/index.metadata.json +1 -1
- package/typings/stepper/stepper.d.ts +7 -1
|
@@ -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/cdk/platform"),require("@angular/core"),require("@angular/cdk/coercion"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@angular/cdk/
|
|
8
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/cdk/platform"),require("@angular/core"),require("@angular/cdk/coercion"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@angular/cdk/text-field",["exports","@angular/cdk/platform","@angular/core","@angular/cdk/coercion","rxjs","rxjs/operators"],t):t((e.ng=e.ng||{},e.ng.cdk=e.ng.cdk||{},e.ng.cdk.textField={}),e.ng.cdk.platform,e.ng.core,e.ng.cdk.coercion,e.rxjs,e.rxjs.operators)}(this,function(e,t,i,n,o,r){"use strict";var s=t.normalizePassiveListenerOptions({passive:!0}),a=function(){function e(e,t){this._platform=e,this._ngZone=t,this._monitoredElements=new Map}return e.prototype.monitor=function(e){var t=this;if(!this._platform.isBrowser)return o.EMPTY;var i=n.coerceElement(e),r=this._monitoredElements.get(i);if(r)return r.subject.asObservable();var a=new o.Subject,l="cdk-text-field-autofilled",c=function(e){"cdk-text-field-autofill-start"!==e.animationName||i.classList.contains(l)?"cdk-text-field-autofill-end"===e.animationName&&i.classList.contains(l)&&(i.classList.remove(l),t._ngZone.run(function(){return a.next({target:e.target,isAutofilled:!1})})):(i.classList.add(l),t._ngZone.run(function(){return a.next({target:e.target,isAutofilled:!0})}))};return this._ngZone.runOutsideAngular(function(){i.addEventListener("animationstart",c,s),i.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(i,{subject:a,unlisten:function(){i.removeEventListener("animationstart",c,s)}}),a.asObservable()},e.prototype.stopMonitoring=function(e){var t=n.coerceElement(e),i=this._monitoredElements.get(t);i&&(i.unlisten(),i.subject.complete(),t.classList.remove("cdk-text-field-autofill-monitored"),t.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(t))},e.prototype.ngOnDestroy=function(){var e=this;this._monitoredElements.forEach(function(t,i){return e.stopMonitoring(i)})},e.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:t.Platform},{type:i.NgZone}]},e.ngInjectableDef=i.defineInjectable({factory:function(){return new e(i.inject(t.Platform),i.inject(i.NgZone))},token:e,providedIn:"root"}),e}(),l=function(){function e(e,t){this._elementRef=e,this._autofillMonitor=t,this.cdkAutofill=new i.EventEmitter}return e.prototype.ngOnInit=function(){var e=this;this._autofillMonitor.monitor(this._elementRef).subscribe(function(t){return e.cdkAutofill.emit(t)})},e.prototype.ngOnDestroy=function(){this._autofillMonitor.stopMonitoring(this._elementRef)},e.decorators=[{type:i.Directive,args:[{selector:"[cdkAutofill]"}]}],e.ctorParameters=function(){return[{type:i.ElementRef},{type:a}]},e.propDecorators={cdkAutofill:[{type:i.Output}]},e}(),c=function(){function e(e,t,i){this._elementRef=e,this._platform=t,this._ngZone=i,this._destroyed=new o.Subject,this._enabled=!0,this._previousMinRows=-1,this._textareaElement=this._elementRef.nativeElement}return Object.defineProperty(e.prototype,"minRows",{get:function(){return this._minRows},set:function(e){this._minRows=e,this._setMinHeight()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxRows",{get:function(){return this._maxRows},set:function(e){this._maxRows=e,this._setMaxHeight()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){e=n.coerceBooleanProperty(e),this._enabled!==e&&((this._enabled=e)?this.resizeToFitContent(!0):this.reset())},enumerable:!0,configurable:!0}),e.prototype._setMinHeight=function(){var e=this.minRows&&this._cachedLineHeight?this.minRows*this._cachedLineHeight+"px":null;e&&(this._textareaElement.style.minHeight=e)},e.prototype._setMaxHeight=function(){var e=this.maxRows&&this._cachedLineHeight?this.maxRows*this._cachedLineHeight+"px":null;e&&(this._textareaElement.style.maxHeight=e)},e.prototype.ngAfterViewInit=function(){var e=this;this._platform.isBrowser&&(this._initialHeight=this._textareaElement.style.height,this.resizeToFitContent(),this._ngZone.runOutsideAngular(function(){o.fromEvent(window,"resize").pipe(r.auditTime(16),r.takeUntil(e._destroyed)).subscribe(function(){return e.resizeToFitContent(!0)})}))},e.prototype.ngOnDestroy=function(){this._destroyed.next(),this._destroyed.complete()},e.prototype._cacheTextareaLineHeight=function(){if(!this._cachedLineHeight){var e=this._textareaElement.cloneNode(!1);e.rows=1,e.style.position="absolute",e.style.visibility="hidden",e.style.border="none",e.style.padding="0",e.style.height="",e.style.minHeight="",e.style.maxHeight="",e.style.overflow="hidden",this._textareaElement.parentNode.appendChild(e),this._cachedLineHeight=e.clientHeight,this._textareaElement.parentNode.removeChild(e),this._setMinHeight(),this._setMaxHeight()}},e.prototype.ngDoCheck=function(){this._platform.isBrowser&&this.resizeToFitContent()},e.prototype.resizeToFitContent=function(e){var t=this;if(void 0===e&&(e=!1),this._enabled&&(this._cacheTextareaLineHeight(),this._cachedLineHeight)){var i=this._elementRef.nativeElement,n=i.value;if(e||this._minRows!==this._previousMinRows||n!==this._previousValue){var o=i.placeholder;i.classList.add("cdk-textarea-autosize-measuring"),i.placeholder="";var r=i.scrollHeight-4;i.style.height=r+"px",i.classList.remove("cdk-textarea-autosize-measuring"),i.placeholder=o,this._ngZone.runOutsideAngular(function(){"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(function(){return t._scrollToCaretPosition(i)}):setTimeout(function(){return t._scrollToCaretPosition(i)})}),this._previousValue=n,this._previousMinRows=this._minRows}}},e.prototype.reset=function(){void 0!==this._initialHeight&&(this._textareaElement.style.height=this._initialHeight)},e.prototype._noopInputHandler=function(){},e.prototype._scrollToCaretPosition=function(e){var t=e.selectionStart,i=e.selectionEnd;this._destroyed.isStopped||document.activeElement!==e||e.setSelectionRange(t,i)},e.decorators=[{type:i.Directive,args:[{selector:"textarea[cdkTextareaAutosize]",exportAs:"cdkTextareaAutosize",host:{class:"cdk-textarea-autosize",rows:"1","(input)":"_noopInputHandler()"}}]}],e.ctorParameters=function(){return[{type:i.ElementRef},{type:t.Platform},{type:i.NgZone}]},e.propDecorators={minRows:[{type:i.Input,args:["cdkAutosizeMinRows"]}],maxRows:[{type:i.Input,args:["cdkAutosizeMaxRows"]}],enabled:[{type:i.Input,args:["cdkTextareaAutosize"]}]},e}(),u=function(){function e(){}return e.decorators=[{type:i.NgModule,args:[{declarations:[l,c],imports:[t.PlatformModule],exports:[l,c]}]}],e}();e.AutofillMonitor=a,e.CdkAutofill=l,e.CdkTextareaAutosize=c,e.TextFieldModule=u,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
9
9
|
//# sourceMappingURL=cdk-text-field.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk-text-field.umd.min.js","sources":["../../src/cdk/text-field/autofill.ts","../../src/cdk/text-field/autosize.ts","../../src/cdk/text-field/text-field-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Platform, normalizePassiveListenerOptions} from '@angular/cdk/platform';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n Injectable,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {EMPTY, Observable, Subject} from 'rxjs';\n\n\n/** An event that is emitted when the autofill state of an input changes. */\nexport type AutofillEvent = {\n /** The element whose autofill state changes. */\n target: Element;\n /** Whether the element is currently autofilled. */\n isAutofilled: boolean;\n};\n\n\n/** Used to track info about currently monitored elements. */\ntype MonitoredElementInfo = {\n subject: Subject<AutofillEvent>;\n unlisten: () => void;\n};\n\n\n/** Options to pass to the animationstart listener. */\nconst listenerOptions = normalizePassiveListenerOptions({passive: true});\n\n\n/**\n * An injectable service that can be used to monitor the autofill state of an input.\n * Based on the following blog post:\n * https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7\n */\n@Injectable({providedIn: 'root'})\nexport class AutofillMonitor implements OnDestroy {\n private _monitoredElements = new Map<Element, MonitoredElementInfo>();\n\n constructor(private _platform: Platform, private _ngZone: NgZone) {}\n\n /**\n * Monitor for changes in the autofill state of the given input element.\n * @param element The element to monitor.\n * @return A stream of autofill state changes.\n */\n monitor(element: Element): Observable<AutofillEvent>;\n\n /**\n * Monitor for changes in the autofill state of the given input element.\n * @param element The element to monitor.\n * @return A stream of autofill state changes.\n */\n monitor(element: ElementRef<Element>): Observable<AutofillEvent>;\n\n monitor(elementOrRef: Element | ElementRef<Element>): Observable<AutofillEvent> {\n if (!this._platform.isBrowser) {\n return EMPTY;\n }\n\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n\n if (info) {\n return info.subject.asObservable();\n }\n\n const result = new Subject<AutofillEvent>();\n const cssClass = 'cdk-text-field-autofilled';\n const listener = ((event: AnimationEvent) => {\n // Animation events fire on initial element render, we check for the presence of the autofill\n // CSS class to make sure this is a real change in state, not just the initial render before\n // we fire off events.\n if (event.animationName === 'cdk-text-field-autofill-start' &&\n !element.classList.contains(cssClass)) {\n element.classList.add(cssClass);\n this._ngZone.run(() => result.next({target: event.target as Element, isAutofilled: true}));\n } else if (event.animationName === 'cdk-text-field-autofill-end' &&\n element.classList.contains(cssClass)) {\n element.classList.remove(cssClass);\n this._ngZone.run(() => result.next({target: event.target as Element, isAutofilled: false}));\n }\n }) as EventListenerOrEventListenerObject;\n\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('animationstart', listener, listenerOptions);\n element.classList.add('cdk-text-field-autofill-monitored');\n });\n\n this._monitoredElements.set(element, {\n subject: result,\n unlisten: () => {\n element.removeEventListener('animationstart', listener, listenerOptions);\n }\n });\n\n return result.asObservable();\n }\n\n /**\n * Stop monitoring the autofill state of the given input element.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: Element): void;\n\n /**\n * Stop monitoring the autofill state of the given input element.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: ElementRef<Element>): void;\n\n stopMonitoring(elementOrRef: Element | ElementRef<Element>): void {\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n\n if (info) {\n info.unlisten();\n info.subject.complete();\n element.classList.remove('cdk-text-field-autofill-monitored');\n element.classList.remove('cdk-text-field-autofilled');\n this._monitoredElements.delete(element);\n }\n }\n\n ngOnDestroy() {\n this._monitoredElements.forEach((_info, element) => this.stopMonitoring(element));\n }\n}\n\n\n/** A directive that can be used to monitor the autofill state of an input. */\n@Directive({\n selector: '[cdkAutofill]',\n})\nexport class CdkAutofill implements OnDestroy, OnInit {\n /** Emits when the autofill state of the element changes. */\n @Output() cdkAutofill: EventEmitter<AutofillEvent> = new EventEmitter<AutofillEvent>();\n\n constructor(private _elementRef: ElementRef<HTMLElement>,\n private _autofillMonitor: AutofillMonitor) {}\n\n ngOnInit() {\n this._autofillMonitor\n .monitor(this._elementRef)\n .subscribe(event => this.cdkAutofill.emit(event));\n }\n\n ngOnDestroy() {\n this._autofillMonitor.stopMonitoring(this._elementRef);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n Input,\n AfterViewInit,\n DoCheck,\n OnDestroy,\n NgZone,\n} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {auditTime, takeUntil} from 'rxjs/operators';\nimport {fromEvent, Subject} from 'rxjs';\n\n\n/** Directive to automatically resize a textarea to fit its content. */\n@Directive({\n selector: 'textarea[cdkTextareaAutosize]',\n exportAs: 'cdkTextareaAutosize',\n host: {\n 'class': 'cdk-textarea-autosize',\n // Textarea elements that have the directive applied should have a single row by default.\n // Browsers normally show two rows by default and therefore this limits the minRows binding.\n 'rows': '1',\n '(input)': '_noopInputHandler()',\n },\n})\nexport class CdkTextareaAutosize implements AfterViewInit, DoCheck, OnDestroy {\n /** Keep track of the previous textarea value to avoid resizing when the value hasn't changed. */\n private _previousValue?: string;\n private _initialHeight: string | null;\n private readonly _destroyed = new Subject<void>();\n\n private _minRows: number;\n private _maxRows: number;\n private _enabled: boolean = true;\n\n /**\n * Value of minRows as of last resize. If the minRows has decreased, the\n * height of the textarea needs to be recomputed to reflect the new minimum. The maxHeight\n * does not have the same problem because it does not affect the textarea's scrollHeight.\n */\n private _previousMinRows: number = -1;\n\n private _textareaElement: HTMLTextAreaElement;\n\n /** Minimum amount of rows in the textarea. */\n @Input('cdkAutosizeMinRows')\n get minRows(): number { return this._minRows; }\n set minRows(value: number) {\n this._minRows = value;\n this._setMinHeight();\n }\n\n /** Maximum amount of rows in the textarea. */\n @Input('cdkAutosizeMaxRows')\n get maxRows(): number { return this._maxRows; }\n set maxRows(value: number) {\n this._maxRows = value;\n this._setMaxHeight();\n }\n\n /** Whether autosizing is enabled or not */\n @Input('cdkTextareaAutosize')\n get enabled(): boolean { return this._enabled; }\n set enabled(value: boolean) {\n value = coerceBooleanProperty(value);\n\n // Only act if the actual value changed. This specifically helps to not run\n // resizeToFitContent too early (i.e. before ngAfterViewInit)\n if (this._enabled !== value) {\n (this._enabled = value) ? this.resizeToFitContent(true) : this.reset();\n }\n }\n\n /** Cached height of a textarea with a single row. */\n private _cachedLineHeight: number;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _platform: Platform,\n private _ngZone: NgZone) {\n this._textareaElement = this._elementRef.nativeElement as HTMLTextAreaElement;\n }\n\n /** Sets the minimum height of the textarea as determined by minRows. */\n _setMinHeight(): void {\n const minHeight = this.minRows && this._cachedLineHeight ?\n `${this.minRows * this._cachedLineHeight}px` : null;\n\n if (minHeight) {\n this._textareaElement.style.minHeight = minHeight;\n }\n }\n\n /** Sets the maximum height of the textarea as determined by maxRows. */\n _setMaxHeight(): void {\n const maxHeight = this.maxRows && this._cachedLineHeight ?\n `${this.maxRows * this._cachedLineHeight}px` : null;\n\n if (maxHeight) {\n this._textareaElement.style.maxHeight = maxHeight;\n }\n }\n\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n // Remember the height which we started with in case autosizing is disabled\n this._initialHeight = this._textareaElement.style.height;\n\n this.resizeToFitContent();\n\n this._ngZone.runOutsideAngular(() => {\n fromEvent(window, 'resize')\n .pipe(auditTime(16), takeUntil(this._destroyed))\n .subscribe(() => this.resizeToFitContent(true));\n });\n }\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /**\n * Cache the height of a single-row textarea if it has not already been cached.\n *\n * We need to know how large a single \"row\" of a textarea is in order to apply minRows and\n * maxRows. For the initial version, we will assume that the height of a single line in the\n * textarea does not ever change.\n */\n private _cacheTextareaLineHeight(): void {\n if (this._cachedLineHeight) {\n return;\n }\n\n // Use a clone element because we have to override some styles.\n let textareaClone = this._textareaElement.cloneNode(false) as HTMLTextAreaElement;\n textareaClone.rows = 1;\n\n // Use `position: absolute` so that this doesn't cause a browser layout and use\n // `visibility: hidden` so that nothing is rendered. Clear any other styles that\n // would affect the height.\n textareaClone.style.position = 'absolute';\n textareaClone.style.visibility = 'hidden';\n textareaClone.style.border = 'none';\n textareaClone.style.padding = '0';\n textareaClone.style.height = '';\n textareaClone.style.minHeight = '';\n textareaClone.style.maxHeight = '';\n\n // In Firefox it happens that textarea elements are always bigger than the specified amount\n // of rows. This is because Firefox tries to add extra space for the horizontal scrollbar.\n // As a workaround that removes the extra space for the scrollbar, we can just set overflow\n // to hidden. This ensures that there is no invalid calculation of the line height.\n // See Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=33654\n textareaClone.style.overflow = 'hidden';\n\n this._textareaElement.parentNode!.appendChild(textareaClone);\n this._cachedLineHeight = textareaClone.clientHeight;\n this._textareaElement.parentNode!.removeChild(textareaClone);\n\n // Min and max heights have to be re-calculated if the cached line height changes\n this._setMinHeight();\n this._setMaxHeight();\n }\n\n ngDoCheck() {\n if (this._platform.isBrowser) {\n this.resizeToFitContent();\n }\n }\n\n /**\n * Resize the textarea to fit its content.\n * @param force Whether to force a height recalculation. By default the height will be\n * recalculated only if the value changed since the last call.\n */\n resizeToFitContent(force: boolean = false) {\n // If autosizing is disabled, just skip everything else\n if (!this._enabled) {\n return;\n }\n\n this._cacheTextareaLineHeight();\n\n // If we haven't determined the line-height yet, we know we're still hidden and there's no point\n // in checking the height of the textarea.\n if (!this._cachedLineHeight) {\n return;\n }\n\n const textarea = this._elementRef.nativeElement as HTMLTextAreaElement;\n const value = textarea.value;\n\n // Only resize if the value or minRows have changed since these calculations can be expensive.\n if (!force && this._minRows === this._previousMinRows && value === this._previousValue) {\n return;\n }\n\n const placeholderText = textarea.placeholder;\n\n // Reset the textarea height to auto in order to shrink back to its default size.\n // Also temporarily force overflow:hidden, so scroll bars do not interfere with calculations.\n // Long placeholders that are wider than the textarea width may lead to a bigger scrollHeight\n // value. To ensure that the scrollHeight is not bigger than the content, the placeholders\n // need to be removed temporarily.\n textarea.classList.add('cdk-textarea-autosize-measuring');\n textarea.placeholder = '';\n\n // The cdk-textarea-autosize-measuring class includes a 2px padding to workaround an issue with\n // Chrome, so we account for that extra space here by subtracting 4 (2px top + 2px bottom).\n const height = textarea.scrollHeight - 4;\n\n // Use the scrollHeight to know how large the textarea *would* be if fit its entire value.\n textarea.style.height = `${height}px`;\n textarea.classList.remove('cdk-textarea-autosize-measuring');\n textarea.placeholder = placeholderText;\n\n this._ngZone.runOutsideAngular(() => {\n if (typeof requestAnimationFrame !== 'undefined') {\n requestAnimationFrame(() => this._scrollToCaretPosition(textarea));\n } else {\n setTimeout(() => this._scrollToCaretPosition(textarea));\n }\n });\n\n this._previousValue = value;\n this._previousMinRows = this._minRows;\n }\n\n /**\n * Resets the textarea to it's original size\n */\n reset() {\n // Do not try to change the textarea, if the initialHeight has not been determined yet\n // This might potentially remove styles when reset() is called before ngAfterViewInit\n if (this._initialHeight === undefined) {\n return;\n }\n this._textareaElement.style.height = this._initialHeight;\n }\n\n _noopInputHandler() {\n // no-op handler that ensures we're running change detection on input events.\n }\n\n /**\n * Scrolls a textarea to the caret position. On Firefox resizing the textarea will\n * prevent it from scrolling to the caret position. We need to re-set the selection\n * in order for it to scroll to the proper position.\n */\n private _scrollToCaretPosition(textarea: HTMLTextAreaElement) {\n const {selectionStart, selectionEnd} = textarea;\n\n // IE will throw an \"Unspecified error\" if we try to set the selection range after the\n // element has been removed from the DOM. Assert that the directive hasn't been destroyed\n // between the time we requested the animation frame and when it was executed.\n // Also note that we have to assert that the textarea is focused before we set the\n // selection range. Setting the selection range on a non-focused textarea will cause\n // it to receive focus on IE and Edge.\n if (!this._destroyed.isStopped && document.activeElement === textarea) {\n textarea.setSelectionRange(selectionStart, selectionEnd);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {PlatformModule} from '@angular/cdk/platform';\nimport {NgModule} from '@angular/core';\nimport {CdkAutofill} from './autofill';\nimport {CdkTextareaAutosize} from './autosize';\n\n\n@NgModule({\n declarations: [CdkAutofill, CdkTextareaAutosize],\n imports: [PlatformModule],\n exports: [CdkAutofill, CdkTextareaAutosize],\n})\nexport class TextFieldModule {}\n"],"names":["listenerOptions","normalizePassiveListenerOptions","passive","AutofillMonitor","_platform","_ngZone","this","_monitoredElements","Map","prototype","monitor","elementOrRef","_this","isBrowser","EMPTY","element","coerceElement","info","get","subject","asObservable","result","Subject","cssClass","listener","event","animationName","classList","contains","remove","run","next","target","isAutofilled","add","runOutsideAngular","addEventListener","set","unlisten","removeEventListener","stopMonitoring","complete","delete","ngOnDestroy","forEach","_info","type","Injectable","args","providedIn","Platform","NgZone","CdkAutofill","_elementRef","_autofillMonitor","cdkAutofill","EventEmitter","ngOnInit","subscribe","emit","Directive","selector","ElementRef","Output","CdkTextareaAutosize","_destroyed","_enabled","_previousMinRows","_textareaElement","Object","defineProperty","_minRows","value","_setMinHeight","_maxRows","_setMaxHeight","coerceBooleanProperty","resizeToFitContent","reset","minHeight","minRows","_cachedLineHeight","style","maxHeight","maxRows","ngAfterViewInit","_initialHeight","height","fromEvent","window","pipe","auditTime","takeUntil","_cacheTextareaLineHeight","textareaClone","cloneNode","rows","position","visibility","border","padding","overflow","appendChild","clientHeight","removeChild","ngDoCheck","force","textarea","_previousValue","placeholderText","placeholder","scrollHeight","requestAnimationFrame","_scrollToCaretPosition","setTimeout","undefined","_noopInputHandler","selectionStart","selectionEnd","isStopped","document","activeElement","setSelectionRange","exportAs","host","class","(input)","Input","enabled","TextFieldModule","NgModule","declarations","imports","PlatformModule","exports"],"mappings":";;;;;;;8iBAwCA,IAAMA,GAAkBC,EAAAA,iCAAiCC,SAAS,IAQlEC,EAAA,WAIE,QAAFA,GAAsBC,EAA6BC,GAA7BC,KAAtBF,UAAsBA,EAA6BE,KAAnDD,QAAmDA,EAFzCC,KAAVC,mBAA+B,GAAIC,KAlDnC,MAoEEL,GAAFM,UAAAC,QAAE,SAAQC,GAAR,GAAFC,GAAAN,IACI,KAAKA,KAAKF,UAAUS,UAClB,MAAOC,GAAAA,KAGb,IAAUC,GAAUC,EAAAA,cAAcL,GACxBM,EAAOX,KAAKC,mBAAmBW,IAAIH,EAEzC,IAAIE,EACF,MAAOA,GAAKE,QAAQC,cAG1B,IAAUC,GAAS,GAAIC,GAAAA,QACbC,EAAW,4BACXC,EAAQ,SAAKC,GAIW,kCAAxBA,EAAMC,eACLX,EAAQY,UAAUC,SAASL,GAGG,gCAAxBE,EAAMC,eACbX,EAAQY,UAAUC,SAASL,KAC7BR,EAAQY,UAAUE,OAAON,GACzBX,EAAKP,QAAQyB,IAAI,WAAM,MAAAT,GAAOU,MAAMC,OAAQP,EAAY,OAA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/cdk/text-field/autofill.ts","../../src/cdk/text-field/autosize.ts","../../src/cdk/text-field/text-field-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Platform, normalizePassiveListenerOptions} from '@angular/cdk/platform';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n Injectable,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {EMPTY, Observable, Subject} from 'rxjs';\n\n\n/** An event that is emitted when the autofill state of an input changes. */\nexport type AutofillEvent = {\n /** The element whose autofill state changes. */\n target: Element;\n /** Whether the element is currently autofilled. */\n isAutofilled: boolean;\n};\n\n\n/** Used to track info about currently monitored elements. */\ntype MonitoredElementInfo = {\n subject: Subject<AutofillEvent>;\n unlisten: () => void;\n};\n\n\n/** Options to pass to the animationstart listener. */\nconst listenerOptions = normalizePassiveListenerOptions({passive: true});\n\n\n/**\n * An injectable service that can be used to monitor the autofill state of an input.\n * Based on the following blog post:\n * https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7\n */\n@Injectable({providedIn: 'root'})\nexport class AutofillMonitor implements OnDestroy {\n private _monitoredElements = new Map<Element, MonitoredElementInfo>();\n\n constructor(private _platform: Platform, private _ngZone: NgZone) {}\n\n /**\n * Monitor for changes in the autofill state of the given input element.\n * @param element The element to monitor.\n * @return A stream of autofill state changes.\n */\n monitor(element: Element): Observable<AutofillEvent>;\n\n /**\n * Monitor for changes in the autofill state of the given input element.\n * @param element The element to monitor.\n * @return A stream of autofill state changes.\n */\n monitor(element: ElementRef<Element>): Observable<AutofillEvent>;\n\n monitor(elementOrRef: Element | ElementRef<Element>): Observable<AutofillEvent> {\n if (!this._platform.isBrowser) {\n return EMPTY;\n }\n\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n\n if (info) {\n return info.subject.asObservable();\n }\n\n const result = new Subject<AutofillEvent>();\n const cssClass = 'cdk-text-field-autofilled';\n const listener = ((event: AnimationEvent) => {\n // Animation events fire on initial element render, we check for the presence of the autofill\n // CSS class to make sure this is a real change in state, not just the initial render before\n // we fire off events.\n if (event.animationName === 'cdk-text-field-autofill-start' &&\n !element.classList.contains(cssClass)) {\n element.classList.add(cssClass);\n this._ngZone.run(() => result.next({target: event.target as Element, isAutofilled: true}));\n } else if (event.animationName === 'cdk-text-field-autofill-end' &&\n element.classList.contains(cssClass)) {\n element.classList.remove(cssClass);\n this._ngZone.run(() => result.next({target: event.target as Element, isAutofilled: false}));\n }\n }) as EventListenerOrEventListenerObject;\n\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('animationstart', listener, listenerOptions);\n element.classList.add('cdk-text-field-autofill-monitored');\n });\n\n this._monitoredElements.set(element, {\n subject: result,\n unlisten: () => {\n element.removeEventListener('animationstart', listener, listenerOptions);\n }\n });\n\n return result.asObservable();\n }\n\n /**\n * Stop monitoring the autofill state of the given input element.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: Element): void;\n\n /**\n * Stop monitoring the autofill state of the given input element.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: ElementRef<Element>): void;\n\n stopMonitoring(elementOrRef: Element | ElementRef<Element>): void {\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n\n if (info) {\n info.unlisten();\n info.subject.complete();\n element.classList.remove('cdk-text-field-autofill-monitored');\n element.classList.remove('cdk-text-field-autofilled');\n this._monitoredElements.delete(element);\n }\n }\n\n ngOnDestroy() {\n this._monitoredElements.forEach((_info, element) => this.stopMonitoring(element));\n }\n}\n\n\n/** A directive that can be used to monitor the autofill state of an input. */\n@Directive({\n selector: '[cdkAutofill]',\n})\nexport class CdkAutofill implements OnDestroy, OnInit {\n /** Emits when the autofill state of the element changes. */\n @Output() cdkAutofill: EventEmitter<AutofillEvent> = new EventEmitter<AutofillEvent>();\n\n constructor(private _elementRef: ElementRef<HTMLElement>,\n private _autofillMonitor: AutofillMonitor) {}\n\n ngOnInit() {\n this._autofillMonitor\n .monitor(this._elementRef)\n .subscribe(event => this.cdkAutofill.emit(event));\n }\n\n ngOnDestroy() {\n this._autofillMonitor.stopMonitoring(this._elementRef);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n Directive,\n ElementRef,\n Input,\n AfterViewInit,\n DoCheck,\n OnDestroy,\n NgZone,\n} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {auditTime, takeUntil} from 'rxjs/operators';\nimport {fromEvent, Subject} from 'rxjs';\n\n\n/** Directive to automatically resize a textarea to fit its content. */\n@Directive({\n selector: 'textarea[cdkTextareaAutosize]',\n exportAs: 'cdkTextareaAutosize',\n host: {\n 'class': 'cdk-textarea-autosize',\n // Textarea elements that have the directive applied should have a single row by default.\n // Browsers normally show two rows by default and therefore this limits the minRows binding.\n 'rows': '1',\n '(input)': '_noopInputHandler()',\n },\n})\nexport class CdkTextareaAutosize implements AfterViewInit, DoCheck, OnDestroy {\n /** Keep track of the previous textarea value to avoid resizing when the value hasn't changed. */\n private _previousValue?: string;\n private _initialHeight: string | null;\n private readonly _destroyed = new Subject<void>();\n\n private _minRows: number;\n private _maxRows: number;\n private _enabled: boolean = true;\n\n /**\n * Value of minRows as of last resize. If the minRows has decreased, the\n * height of the textarea needs to be recomputed to reflect the new minimum. The maxHeight\n * does not have the same problem because it does not affect the textarea's scrollHeight.\n */\n private _previousMinRows: number = -1;\n\n private _textareaElement: HTMLTextAreaElement;\n\n /** Minimum amount of rows in the textarea. */\n @Input('cdkAutosizeMinRows')\n get minRows(): number { return this._minRows; }\n set minRows(value: number) {\n this._minRows = value;\n this._setMinHeight();\n }\n\n /** Maximum amount of rows in the textarea. */\n @Input('cdkAutosizeMaxRows')\n get maxRows(): number { return this._maxRows; }\n set maxRows(value: number) {\n this._maxRows = value;\n this._setMaxHeight();\n }\n\n /** Whether autosizing is enabled or not */\n @Input('cdkTextareaAutosize')\n get enabled(): boolean { return this._enabled; }\n set enabled(value: boolean) {\n value = coerceBooleanProperty(value);\n\n // Only act if the actual value changed. This specifically helps to not run\n // resizeToFitContent too early (i.e. before ngAfterViewInit)\n if (this._enabled !== value) {\n (this._enabled = value) ? this.resizeToFitContent(true) : this.reset();\n }\n }\n\n /** Cached height of a textarea with a single row. */\n private _cachedLineHeight: number;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _platform: Platform,\n private _ngZone: NgZone) {\n this._textareaElement = this._elementRef.nativeElement as HTMLTextAreaElement;\n }\n\n /** Sets the minimum height of the textarea as determined by minRows. */\n _setMinHeight(): void {\n const minHeight = this.minRows && this._cachedLineHeight ?\n `${this.minRows * this._cachedLineHeight}px` : null;\n\n if (minHeight) {\n this._textareaElement.style.minHeight = minHeight;\n }\n }\n\n /** Sets the maximum height of the textarea as determined by maxRows. */\n _setMaxHeight(): void {\n const maxHeight = this.maxRows && this._cachedLineHeight ?\n `${this.maxRows * this._cachedLineHeight}px` : null;\n\n if (maxHeight) {\n this._textareaElement.style.maxHeight = maxHeight;\n }\n }\n\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n // Remember the height which we started with in case autosizing is disabled\n this._initialHeight = this._textareaElement.style.height;\n\n this.resizeToFitContent();\n\n this._ngZone.runOutsideAngular(() => {\n fromEvent(window, 'resize')\n .pipe(auditTime(16), takeUntil(this._destroyed))\n .subscribe(() => this.resizeToFitContent(true));\n });\n }\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /**\n * Cache the height of a single-row textarea if it has not already been cached.\n *\n * We need to know how large a single \"row\" of a textarea is in order to apply minRows and\n * maxRows. For the initial version, we will assume that the height of a single line in the\n * textarea does not ever change.\n */\n private _cacheTextareaLineHeight(): void {\n if (this._cachedLineHeight) {\n return;\n }\n\n // Use a clone element because we have to override some styles.\n let textareaClone = this._textareaElement.cloneNode(false) as HTMLTextAreaElement;\n textareaClone.rows = 1;\n\n // Use `position: absolute` so that this doesn't cause a browser layout and use\n // `visibility: hidden` so that nothing is rendered. Clear any other styles that\n // would affect the height.\n textareaClone.style.position = 'absolute';\n textareaClone.style.visibility = 'hidden';\n textareaClone.style.border = 'none';\n textareaClone.style.padding = '0';\n textareaClone.style.height = '';\n textareaClone.style.minHeight = '';\n textareaClone.style.maxHeight = '';\n\n // In Firefox it happens that textarea elements are always bigger than the specified amount\n // of rows. This is because Firefox tries to add extra space for the horizontal scrollbar.\n // As a workaround that removes the extra space for the scrollbar, we can just set overflow\n // to hidden. This ensures that there is no invalid calculation of the line height.\n // See Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=33654\n textareaClone.style.overflow = 'hidden';\n\n this._textareaElement.parentNode!.appendChild(textareaClone);\n this._cachedLineHeight = textareaClone.clientHeight;\n this._textareaElement.parentNode!.removeChild(textareaClone);\n\n // Min and max heights have to be re-calculated if the cached line height changes\n this._setMinHeight();\n this._setMaxHeight();\n }\n\n ngDoCheck() {\n if (this._platform.isBrowser) {\n this.resizeToFitContent();\n }\n }\n\n /**\n * Resize the textarea to fit its content.\n * @param force Whether to force a height recalculation. By default the height will be\n * recalculated only if the value changed since the last call.\n */\n resizeToFitContent(force: boolean = false) {\n // If autosizing is disabled, just skip everything else\n if (!this._enabled) {\n return;\n }\n\n this._cacheTextareaLineHeight();\n\n // If we haven't determined the line-height yet, we know we're still hidden and there's no point\n // in checking the height of the textarea.\n if (!this._cachedLineHeight) {\n return;\n }\n\n const textarea = this._elementRef.nativeElement as HTMLTextAreaElement;\n const value = textarea.value;\n\n // Only resize if the value or minRows have changed since these calculations can be expensive.\n if (!force && this._minRows === this._previousMinRows && value === this._previousValue) {\n return;\n }\n\n const placeholderText = textarea.placeholder;\n\n // Reset the textarea height to auto in order to shrink back to its default size.\n // Also temporarily force overflow:hidden, so scroll bars do not interfere with calculations.\n // Long placeholders that are wider than the textarea width may lead to a bigger scrollHeight\n // value. To ensure that the scrollHeight is not bigger than the content, the placeholders\n // need to be removed temporarily.\n textarea.classList.add('cdk-textarea-autosize-measuring');\n textarea.placeholder = '';\n\n // The cdk-textarea-autosize-measuring class includes a 2px padding to workaround an issue with\n // Chrome, so we account for that extra space here by subtracting 4 (2px top + 2px bottom).\n const height = textarea.scrollHeight - 4;\n\n // Use the scrollHeight to know how large the textarea *would* be if fit its entire value.\n textarea.style.height = `${height}px`;\n textarea.classList.remove('cdk-textarea-autosize-measuring');\n textarea.placeholder = placeholderText;\n\n this._ngZone.runOutsideAngular(() => {\n if (typeof requestAnimationFrame !== 'undefined') {\n requestAnimationFrame(() => this._scrollToCaretPosition(textarea));\n } else {\n setTimeout(() => this._scrollToCaretPosition(textarea));\n }\n });\n\n this._previousValue = value;\n this._previousMinRows = this._minRows;\n }\n\n /**\n * Resets the textarea to it's original size\n */\n reset() {\n // Do not try to change the textarea, if the initialHeight has not been determined yet\n // This might potentially remove styles when reset() is called before ngAfterViewInit\n if (this._initialHeight === undefined) {\n return;\n }\n this._textareaElement.style.height = this._initialHeight;\n }\n\n _noopInputHandler() {\n // no-op handler that ensures we're running change detection on input events.\n }\n\n /**\n * Scrolls a textarea to the caret position. On Firefox resizing the textarea will\n * prevent it from scrolling to the caret position. We need to re-set the selection\n * in order for it to scroll to the proper position.\n */\n private _scrollToCaretPosition(textarea: HTMLTextAreaElement) {\n const {selectionStart, selectionEnd} = textarea;\n\n // IE will throw an \"Unspecified error\" if we try to set the selection range after the\n // element has been removed from the DOM. Assert that the directive hasn't been destroyed\n // between the time we requested the animation frame and when it was executed.\n // Also note that we have to assert that the textarea is focused before we set the\n // selection range. Setting the selection range on a non-focused textarea will cause\n // it to receive focus on IE and Edge.\n if (!this._destroyed.isStopped && document.activeElement === textarea) {\n textarea.setSelectionRange(selectionStart, selectionEnd);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {PlatformModule} from '@angular/cdk/platform';\nimport {NgModule} from '@angular/core';\nimport {CdkAutofill} from './autofill';\nimport {CdkTextareaAutosize} from './autosize';\n\n\n@NgModule({\n declarations: [CdkAutofill, CdkTextareaAutosize],\n imports: [PlatformModule],\n exports: [CdkAutofill, CdkTextareaAutosize],\n})\nexport class TextFieldModule {}\n"],"names":["listenerOptions","normalizePassiveListenerOptions","passive","AutofillMonitor","_platform","_ngZone","this","_monitoredElements","Map","prototype","monitor","elementOrRef","_this","isBrowser","EMPTY","element","coerceElement","info","get","subject","asObservable","result","Subject","cssClass","listener","event","animationName","classList","contains","remove","run","next","target","isAutofilled","add","runOutsideAngular","addEventListener","set","unlisten","removeEventListener","stopMonitoring","complete","delete","ngOnDestroy","forEach","_info","type","Injectable","args","providedIn","Platform","NgZone","CdkAutofill","_elementRef","_autofillMonitor","cdkAutofill","EventEmitter","ngOnInit","subscribe","emit","Directive","selector","ElementRef","Output","CdkTextareaAutosize","_destroyed","_enabled","_previousMinRows","_textareaElement","Object","defineProperty","_minRows","value","_setMinHeight","_maxRows","_setMaxHeight","coerceBooleanProperty","resizeToFitContent","reset","minHeight","minRows","_cachedLineHeight","style","maxHeight","maxRows","ngAfterViewInit","_initialHeight","height","fromEvent","window","pipe","auditTime","takeUntil","_cacheTextareaLineHeight","textareaClone","cloneNode","rows","position","visibility","border","padding","overflow","appendChild","clientHeight","removeChild","ngDoCheck","force","textarea","_previousValue","placeholderText","placeholder","scrollHeight","requestAnimationFrame","_scrollToCaretPosition","setTimeout","undefined","_noopInputHandler","selectionStart","selectionEnd","isStopped","document","activeElement","setSelectionRange","exportAs","host","class","(input)","Input","enabled","TextFieldModule","NgModule","declarations","imports","PlatformModule","exports"],"mappings":";;;;;;;+iBAwCA,IAAMA,GAAkBC,EAAAA,iCAAiCC,SAAS,IAQlEC,EAAA,WAIE,QAAFA,GA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,WAAaC,SAASC,gBAAkBd,GAC3DA,EAASe,kBAAkBL,EAAgBC,mBAvPjDxE,KAACc,EAAAA,UAADZ,OACEa,SAAU,gCACV8D,SAAU,sBACVC,MACEC,MAAS,wBAGT7B,KAAQ,IACR8B,UAAW,+DArBfhF,KAAEgB,EAAAA,aAOFhB,KAAQI,EAAAA,WAFRJ,KAAEK,EAAAA,4BAuCF6B,UAAAlC,KAAGiF,EAAAA,MAAH/E,MAAS,wBAQToC,UAAAtC,KAAGiF,EAAAA,MAAH/E,MAAS,wBAQTgF,UAAAlF,KAAGiF,EAAAA,MAAH/E,MAAS,0BA2MTgB,KCpQAiE,EAAA,WAAA,QAAAA,MAK8B,sBAL9BnF,KAACoF,EAAAA,SAADlF,OACEmF,cAAe/E,EAAaY,GAC5BoE,SAAUC,EAAAA,gBACVC,SAAUlF,EAAaY,OAEzBiE"}
|
package/bundles/cdk.umd.js
CHANGED
package/bundles/cdk.umd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk.umd.js","sources":["../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('7.2.
|
|
1
|
+
{"version":3,"file":"cdk.umd.js","sources":["../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('7.2.2');\n"],"names":["Version"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAWA,AAAA,IAAa,OAAO,GAAG,IAAIA,YAAO,CAAC,mBAAmB,CAAC;;;;;;;;;;;;"}
|
package/bundles/cdk.umd.min.js
CHANGED
|
@@ -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,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("@angular/cdk",["exports","@angular/core"],n):n((e.ng=e.ng||{},e.ng.cdk={}),e.ng.core)}(this,function(e,n){"use strict";var o=new n.Version("7.2.
|
|
8
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("@angular/cdk",["exports","@angular/core"],n):n((e.ng=e.ng||{},e.ng.cdk={}),e.ng.core)}(this,function(e,n){"use strict";var o=new n.Version("7.2.2");e.VERSION=o,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
9
9
|
//# sourceMappingURL=cdk.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk.umd.min.js","sources":["../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('7.2.
|
|
1
|
+
{"version":3,"file":"cdk.umd.min.js","sources":["../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('7.2.2');\n"],"names":["VERSION","Version"],"mappings":";;;;;;;4QAWA,IAAaA,GAAU,GAAIC,GAAAA,QAAQ"}
|
|
@@ -5,14 +5,18 @@
|
|
|
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
|
-
import { ElementRef } from '@angular/core';
|
|
8
|
+
import { ElementRef, OnDestroy } from '@angular/core';
|
|
9
|
+
import { Subject } from 'rxjs';
|
|
9
10
|
/** Handle that can be used to drag and CdkDrag instance. */
|
|
10
|
-
export declare class CdkDragHandle {
|
|
11
|
+
export declare class CdkDragHandle implements OnDestroy {
|
|
11
12
|
element: ElementRef<HTMLElement>;
|
|
12
13
|
/** Closest parent draggable instance. */
|
|
13
14
|
_parentDrag: {} | undefined;
|
|
15
|
+
/** Emits when the state of the handle has changed. */
|
|
16
|
+
_stateChanges: Subject<CdkDragHandle>;
|
|
14
17
|
/** Whether starting to drag through this handle is disabled. */
|
|
15
18
|
disabled: boolean;
|
|
16
19
|
private _disabled;
|
|
17
20
|
constructor(element: ElementRef<HTMLElement>, parentDrag?: any);
|
|
21
|
+
ngOnDestroy(): void;
|
|
18
22
|
}
|
|
@@ -34,8 +34,7 @@ export declare class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDes
|
|
|
34
34
|
private _dragDropRegistry;
|
|
35
35
|
private _config;
|
|
36
36
|
private _dir;
|
|
37
|
-
|
|
38
|
-
private _rootElementInitSubscription;
|
|
37
|
+
private _destroyed;
|
|
39
38
|
/** Reference to the underlying drag instance. */
|
|
40
39
|
_dragRef: DragRef<CdkDrag<T>>;
|
|
41
40
|
/** Elements that can be used to drag the draggable item. */
|
|
@@ -101,6 +100,8 @@ export declare class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDes
|
|
|
101
100
|
private _updateRootElement;
|
|
102
101
|
/** Gets the boundary element, based on the `boundaryElementSelector`. */
|
|
103
102
|
private _getBoundaryElement;
|
|
103
|
+
/** Syncs the inputs of the CdkDrag with the options of the underlying DragRef. */
|
|
104
|
+
private _syncInputs;
|
|
104
105
|
/**
|
|
105
106
|
* Proxies the events from a DragRef to events that
|
|
106
107
|
* match the interfaces of the CdkDrag outputs.
|
|
@@ -127,9 +127,6 @@ export declare class CdkDropList<T = any> implements CdkDropListContainer, OnDes
|
|
|
127
127
|
_isOverContainer(x: number, y: number): boolean;
|
|
128
128
|
/** Syncs the inputs of the CdkDropList with the options of the underlying DropListRef. */
|
|
129
129
|
private _syncInputs;
|
|
130
|
-
/**
|
|
131
|
-
|
|
132
|
-
* match the interfaces of the CdkDropList outputs.
|
|
133
|
-
*/
|
|
134
|
-
private _proxyEvents;
|
|
130
|
+
/** Handles events from the underlying DropListRef. */
|
|
131
|
+
private _handleEvents;
|
|
135
132
|
}
|
|
@@ -24,17 +24,6 @@ export interface DragRefConfig {
|
|
|
24
24
|
*/
|
|
25
25
|
pointerDirectionChangeThreshold: number;
|
|
26
26
|
}
|
|
27
|
-
/**
|
|
28
|
-
* Template that can be used to create a drag helper element (e.g. a preview or a placeholder).
|
|
29
|
-
*/
|
|
30
|
-
interface DragHelperTemplate<T = any> {
|
|
31
|
-
templateRef: TemplateRef<T>;
|
|
32
|
-
data: T;
|
|
33
|
-
}
|
|
34
|
-
interface DragHandle {
|
|
35
|
-
element: ElementRef<HTMLElement>;
|
|
36
|
-
disabled: boolean;
|
|
37
|
-
}
|
|
38
27
|
/**
|
|
39
28
|
* Internal compile-time-only representation of a `DragRef`.
|
|
40
29
|
* Used to avoid circular import issues between the `DragRef` and the `DropListRef`.
|
|
@@ -135,11 +124,13 @@ export declare class DragRef<T = any> {
|
|
|
135
124
|
/** Cached dimensions of the boundary element. */
|
|
136
125
|
private _boundaryRect?;
|
|
137
126
|
/** Element that will be used as a template to create the draggable item's preview. */
|
|
138
|
-
private _previewTemplate
|
|
127
|
+
private _previewTemplate?;
|
|
139
128
|
/** Template for placeholder element rendered to show where a draggable would be dropped. */
|
|
140
|
-
private _placeholderTemplate
|
|
129
|
+
private _placeholderTemplate?;
|
|
141
130
|
/** Elements that can be used to drag the draggable item. */
|
|
142
131
|
private _handles;
|
|
132
|
+
/** Registered handles that are currently disabled. */
|
|
133
|
+
private _disabledHandles;
|
|
143
134
|
/** Axis along which dragging is locked. */
|
|
144
135
|
lockAxis: 'x' | 'y';
|
|
145
136
|
/** Whether starting to drag this element is disabled. */
|
|
@@ -207,11 +198,19 @@ export declare class DragRef<T = any> {
|
|
|
207
198
|
/** Returns the root draggable element. */
|
|
208
199
|
getRootElement(): HTMLElement;
|
|
209
200
|
/** Registers the handles that can be used to drag the element. */
|
|
210
|
-
withHandles(handles:
|
|
211
|
-
/**
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
201
|
+
withHandles(handles: (HTMLElement | ElementRef<HTMLElement>)[]): this;
|
|
202
|
+
/**
|
|
203
|
+
* Registers the template that should be used for the drag preview.
|
|
204
|
+
* @param template Template that from which to stamp out the preview.
|
|
205
|
+
* @param context Variables to add to the template's context.
|
|
206
|
+
*/
|
|
207
|
+
withPreviewTemplate(template: TemplateRef<any> | null, context?: any): this;
|
|
208
|
+
/**
|
|
209
|
+
* Registers the template that should be used for the drag placeholder.
|
|
210
|
+
* @param template Template that from which to stamp out the placeholder.
|
|
211
|
+
* @param context Variables to add to the template's context.
|
|
212
|
+
*/
|
|
213
|
+
withPlaceholderTemplate(template: TemplateRef<any> | null, context?: any): this;
|
|
215
214
|
/**
|
|
216
215
|
* Sets an alternate drag root element. The root element is the element that will be moved as
|
|
217
216
|
* the user is dragging. Passing an alternate root element is useful when trying to enable
|
|
@@ -228,6 +227,16 @@ export declare class DragRef<T = any> {
|
|
|
228
227
|
isDragging(): boolean;
|
|
229
228
|
/** Resets a standalone drag item to its initial position. */
|
|
230
229
|
reset(): void;
|
|
230
|
+
/**
|
|
231
|
+
* Sets a handle as disabled. While a handle is disabled, it'll capture and interrupt dragging.
|
|
232
|
+
* @param handle Handle element that should be disabled.
|
|
233
|
+
*/
|
|
234
|
+
disableHandle(handle: HTMLElement): void;
|
|
235
|
+
/**
|
|
236
|
+
* Enables a handle, if it has been disabled.
|
|
237
|
+
* @param handle Handle element to be enabled.
|
|
238
|
+
*/
|
|
239
|
+
enableHandle(handle: HTMLElement): void;
|
|
231
240
|
/** Unsubscribes from the global subscriptions. */
|
|
232
241
|
private _removeSubscriptions;
|
|
233
242
|
/** Destroys the preview element and its ViewRef. */
|
|
@@ -285,4 +294,3 @@ export declare class DragRef<T = any> {
|
|
|
285
294
|
/** Removes the manually-added event listeners from the root element. */
|
|
286
295
|
private _removeRootElementListeners;
|
|
287
296
|
}
|
|
288
|
-
export {};
|
|
@@ -78,8 +78,10 @@ export declare class DropListRef<T = any> {
|
|
|
78
78
|
data: T;
|
|
79
79
|
/** Whether an item in the list is being dragged. */
|
|
80
80
|
private _isDragging;
|
|
81
|
-
/** Cache of the dimensions of all the items
|
|
82
|
-
private
|
|
81
|
+
/** Cache of the dimensions of all the items inside the container. */
|
|
82
|
+
private _itemPositions;
|
|
83
|
+
/** Cached `ClientRect` of the drop list. */
|
|
84
|
+
private _clientRect;
|
|
83
85
|
/**
|
|
84
86
|
* Draggable items that are currently active inside the container. Includes the items
|
|
85
87
|
* from `_draggables`, as well as any items that have been dragged in, but haven't
|
|
@@ -91,15 +93,13 @@ export declare class DropListRef<T = any> {
|
|
|
91
93
|
* well as what direction the pointer was moving in when the swap occured.
|
|
92
94
|
*/
|
|
93
95
|
private _previousSwap;
|
|
94
|
-
/**
|
|
95
|
-
* Draggable items in the container.
|
|
96
|
-
* TODO(crisbeto): support arrays.
|
|
97
|
-
*/
|
|
96
|
+
/** Draggable items in the container. */
|
|
98
97
|
private _draggables;
|
|
98
|
+
/** Drop lists that are connected to the current one. */
|
|
99
99
|
private _siblings;
|
|
100
100
|
/** Direction in which the list is oriented. */
|
|
101
101
|
private _orientation;
|
|
102
|
-
/**
|
|
102
|
+
/** Connected siblings that currently have a dragged item. */
|
|
103
103
|
private _activeSiblings;
|
|
104
104
|
constructor(element: ElementRef<HTMLElement>, _dragDropRegistry: DragDropRegistry<DragRef, DropListRef>, _document: any, _dir?: Directionality | undefined);
|
|
105
105
|
/** Removes the drop list functionality from the DOM element. */
|
|
@@ -166,13 +166,10 @@ export declare class DropListRef<T = any> {
|
|
|
166
166
|
x: number;
|
|
167
167
|
y: number;
|
|
168
168
|
}): void;
|
|
169
|
+
/** Caches the position of the drop list. */
|
|
170
|
+
private _cacheOwnPosition;
|
|
169
171
|
/** Refreshes the position cache of the items and sibling containers. */
|
|
170
|
-
private
|
|
171
|
-
/**
|
|
172
|
-
* Toggles whether the list can receive the item that is currently being dragged.
|
|
173
|
-
* Usually called by a sibling that initiated the dragging.
|
|
174
|
-
*/
|
|
175
|
-
_toggleIsReceiving(isDragging: boolean): void;
|
|
172
|
+
private _cacheItemPositions;
|
|
176
173
|
/** Resets the container to its initial state. */
|
|
177
174
|
private _reset;
|
|
178
175
|
/**
|
|
@@ -216,5 +213,22 @@ export declare class DropListRef<T = any> {
|
|
|
216
213
|
* @param x Position of the item along the X axis.
|
|
217
214
|
* @param y Position of the item along the Y axis.
|
|
218
215
|
*/
|
|
219
|
-
_getSiblingContainerFromPosition(item: DragRef, x: number, y: number): DropListRef |
|
|
216
|
+
_getSiblingContainerFromPosition(item: DragRef, x: number, y: number): DropListRef | undefined;
|
|
217
|
+
/**
|
|
218
|
+
* Checks whether the drop list can receive the passed-in item.
|
|
219
|
+
* @param item Item that is being dragged into the list.
|
|
220
|
+
* @param x Position of the item along the X axis.
|
|
221
|
+
* @param y Position of the item along the Y axis.
|
|
222
|
+
*/
|
|
223
|
+
_canReceive(item: DragRef, x: number, y: number): boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Called by one of the connected drop lists when a dragging sequence has started.
|
|
226
|
+
* @param sibling Sibling in which dragging has started.
|
|
227
|
+
*/
|
|
228
|
+
_startReceiving(sibling: DropListRef): void;
|
|
229
|
+
/**
|
|
230
|
+
* Called by a connected drop list when dragging has stopped.
|
|
231
|
+
* @param sibling Sibling whose dragging has stopped.
|
|
232
|
+
*/
|
|
233
|
+
_stopReceiving(sibling: DropListRef): void;
|
|
220
234
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"CdkDragConfig":{"__symbolic":"interface"},"CdkDropListContainer":{"__symbolic":"interface"},"CDK_DROP_LIST":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":82,"character":33},"arguments":["CDK_DROP_LIST"]},"CDK_DROP_LIST_CONTAINER":{"__symbolic":"reference","name":"CDK_DROP_LIST"},"CdkDragStart":{"__symbolic":"interface"},"CdkDragRelease":{"__symbolic":"interface"},"CdkDragEnd":{"__symbolic":"interface"},"CdkDragEnter":{"__symbolic":"interface"},"CdkDragExit":{"__symbolic":"interface"},"CdkDragDrop":{"__symbolic":"interface"},"CdkDragMove":{"__symbolic":"interface"},"CdkDragSortEvent":{"__symbolic":"interface"},"moveItemInArray":{"__symbolic":"function"},"transferArrayItem":{"__symbolic":"function"},"copyArrayItem":{"__symbolic":"function"},"DragDropModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":16,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"CdkDropList"},{"__symbolic":"reference","name":"CdkDropListGroup"},{"__symbolic":"reference","name":"CdkDrag"},{"__symbolic":"reference","name":"CdkDragHandle"},{"__symbolic":"reference","name":"CdkDragPreview"},{"__symbolic":"reference","name":"CdkDragPlaceholder"}],"exports":[{"__symbolic":"reference","name":"CdkDropList"},{"__symbolic":"reference","name":"CdkDropListGroup"},{"__symbolic":"reference","name":"CdkDrag"},{"__symbolic":"reference","name":"CdkDragHandle"},{"__symbolic":"reference","name":"CdkDragPreview"},{"__symbolic":"reference","name":"CdkDragPlaceholder"}]}]}],"members":{}},"DragDropRegistry":{"__symbolic":"class","arity":2,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":27,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":60,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":60,"character":12}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":59,"character":21},{"__symbolic":"reference","name":"any"}]}],"registerDropContainer":[{"__symbolic":"method"}],"registerDragItem":[{"__symbolic":"method"}],"removeDropContainer":[{"__symbolic":"method"}],"removeDragItem":[{"__symbolic":"method"}],"startDragging":[{"__symbolic":"method"}],"stopDragging":[{"__symbolic":"method"}],"isDragging":[{"__symbolic":"method"}],"getDropContainer":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_clearGlobalListeners":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"CdkDropListInternal":{"__symbolic":"interface"},"CdkDropList":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":49,"character":1},"arguments":[{"selector":"[cdkDropList], cdk-drop-list","exportAs":"cdkDropList","providers":[{"provide":{"__symbolic":"reference","name":"CdkDropListGroup"},"useValue":{"__symbolic":"reference","name":"undefined"}},{"provide":{"__symbolic":"reference","name":"CDK_DROP_LIST_CONTAINER"},"useExisting":{"__symbolic":"reference","name":"CdkDropList"}}],"host":{"class":"cdk-drop-list","[id]":"id","[class.cdk-drop-list-dragging]":"_dropListRef.isDragging()","[class.cdk-drop-list-receiving]":"_dropListRef.isReceiving()","$quoted$":["class","[id]","[class.cdk-drop-list-dragging]","[class.cdk-drop-list-receiving]"]}}]}],"members":{"_draggables":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":72,"character":3},"arguments":[{"__symbolic":"reference","name":"CdkDrag"}]}]}],"connectedTo":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":79,"character":3},"arguments":["cdkDropListConnectedTo"]}]}],"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":83,"character":3},"arguments":["cdkDropListData"]}]}],"orientation":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":86,"character":3},"arguments":["cdkDropListOrientation"]}]}],"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":92,"character":3}}]}],"lockAxis":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":95,"character":3},"arguments":["cdkDropListLockAxis"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":98,"character":3},"arguments":["cdkDropListDisabled"]}]}],"enterPredicate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":111,"character":3},"arguments":["cdkDropListEnterPredicate"]}]}],"dropped":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":115,"character":3},"arguments":["cdkDropListDropped"]}]}],"entered":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":121,"character":3},"arguments":["cdkDropListEntered"]}]}],"exited":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":128,"character":3},"arguments":["cdkDropListExited"]}]}],"sorted":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":132,"character":3},"arguments":["cdkDropListSorted"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":139,"character":5}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":140,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf","line":140,"character":17}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":142,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":142,"character":17},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":142,"character":24}]}]],"parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":136,"character":31,"context":{"typeName":"HTMLElement"},"module":"./directives/drop-list"}]},{"__symbolic":"reference","name":"DragDropRegistry"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":138,"character":32},{"__symbolic":"reference","module":"@angular/cdk/bidi","name":"Directionality","line":139,"character":22},{"__symbolic":"reference","name":"CdkDropListGroup"},{"__symbolic":"reference","name":"any"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"start":[{"__symbolic":"method"}],"drop":[{"__symbolic":"method"}],"enter":[{"__symbolic":"method"}],"exit":[{"__symbolic":"method"}],"getItemIndex":[{"__symbolic":"method"}],"_sortItem":[{"__symbolic":"method"}],"_getSiblingContainerFromPosition":[{"__symbolic":"method"}],"_isOverContainer":[{"__symbolic":"method"}],"_syncInputs":[{"__symbolic":"method"}],"_proxyEvents":[{"__symbolic":"method"}]},"statics":{"_dropLists":[]}},"CdkDropListGroup":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":17,"character":1},"arguments":[{"selector":"[cdkDropListGroup]","exportAs":"cdkDropListGroup"}]}],"members":{"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":3},"arguments":["cdkDropListGroupDisabled"]}]}],"ngOnDestroy":[{"__symbolic":"method"}]}},"CDK_DRAG_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":54,"character":35},"arguments":["CDK_DRAG_CONFIG",{"providedIn":"root","factory":{"__symbolic":"reference","name":"CDK_DRAG_CONFIG_FACTORY"}}]},"CDK_DRAG_CONFIG_FACTORY":{"__symbolic":"function","parameters":[],"value":{"dragStartThreshold":5,"pointerDirectionChangeThreshold":5}},"CdkDrag":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":65,"character":1},"arguments":[{"selector":"[cdkDrag]","exportAs":"cdkDrag","host":{"class":"cdk-drag","[class.cdk-drag-dragging]":"_dragRef.isDragging()","$quoted$":["class","[class.cdk-drag-dragging]"]},"providers":[{"provide":{"__symbolic":"reference","name":"ɵa"},"useExisting":{"__symbolic":"reference","name":"CdkDrag"}}]}]}],"members":{"_handles":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":82,"character":3},"arguments":[{"__symbolic":"reference","name":"CdkDragHandle"},{"descendants":true}]}]}],"_previewTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":85,"character":3},"arguments":[{"__symbolic":"reference","name":"CdkDragPreview"}]}]}],"_placeholderTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":88,"character":3},"arguments":[{"__symbolic":"reference","name":"CdkDragPlaceholder"}]}]}],"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":91,"character":3},"arguments":["cdkDragData"]}]}],"lockAxis":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":94,"character":3},"arguments":["cdkDragLockAxis"]}]}],"rootElementSelector":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":101,"character":3},"arguments":["cdkDragRootElement"]}]}],"boundaryElementSelector":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":108,"character":3},"arguments":["cdkDragBoundary"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":111,"character":3},"arguments":["cdkDragDisabled"]}]}],"started":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":122,"character":3},"arguments":["cdkDragStarted"]}]}],"released":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":125,"character":3},"arguments":["cdkDragReleased"]}]}],"ended":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":129,"character":3},"arguments":["cdkDragEnded"]}]}],"entered":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":132,"character":3},"arguments":["cdkDragEntered"]}]}],"exited":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":136,"character":3},"arguments":["cdkDragExited"]}]}],"dropped":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":140,"character":3},"arguments":["cdkDragDropped"]}]}],"moved":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":147,"character":3},"arguments":["cdkDragMoved"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":165,"character":5},"arguments":[{"__symbolic":"reference","name":"CDK_DROP_LIST"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":165,"character":28}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf","line":165,"character":40}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":167,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":167,"character":12}]}],null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":172,"character":5},"arguments":[{"__symbolic":"reference","name":"CDK_DRAG_CONFIG"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":173,"character":5}}]],"parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":163,"character":31,"context":{"typeName":"HTMLElement"},"module":"./directives/drag"}]},{"__symbolic":"reference","name":"CdkDropListInternal"},{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":168,"character":21},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":169,"character":31},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"ViewportRuler","line":170,"character":28},{"__symbolic":"reference","name":"DragDropRegistry"},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","module":"@angular/cdk/bidi","name":"Directionality","line":173,"character":30}]}],"getPlaceholderElement":[{"__symbolic":"method"}],"getRootElement":[{"__symbolic":"method"}],"reset":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_updateRootElement":[{"__symbolic":"method"}],"_getBoundaryElement":[{"__symbolic":"method"}],"_proxyEvents":[{"__symbolic":"method"}]}},"CdkDragHandle":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":14,"character":1},"arguments":[{"selector":"[cdkDragHandle]","host":{"class":"cdk-drag-handle","$quoted$":["class"]}}]}],"members":{"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":25,"character":3},"arguments":["cdkDragHandleDisabled"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":34,"character":5},"arguments":[{"__symbolic":"reference","name":"ɵa"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":34,"character":30}}]],"parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":33,"character":31,"context":{"typeName":"HTMLElement"},"module":"./directives/drag-handle"}]},{"__symbolic":"reference","name":"any"}]}]}},"CdkDragPreview":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":14,"character":1},"arguments":[{"selector":"ng-template[cdkDragPreview]"}]}],"members":{"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TemplateRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":20,"character":46,"context":{"typeName":"T"},"module":"./directives/drag-preview"}]}]}]}},"CdkDragPlaceholder":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":14,"character":1},"arguments":[{"selector":"ng-template[cdkDragPlaceholder]"}]}],"members":{"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TemplateRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":20,"character":46,"context":{"typeName":"T"},"module":"./directives/drag-placeholder"}]}]}]}},"ɵa":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":16,"character":35},"arguments":["CDK_DRAG_PARENT"]},"ɵb":{"__symbolic":"interface"}},"origins":{"CdkDragConfig":"./public-api","CdkDropListContainer":"./drop-list-container","CDK_DROP_LIST":"./drop-list-container","CDK_DROP_LIST_CONTAINER":"./drop-list-container","CdkDragStart":"./drag-events","CdkDragRelease":"./drag-events","CdkDragEnd":"./drag-events","CdkDragEnter":"./drag-events","CdkDragExit":"./drag-events","CdkDragDrop":"./drag-events","CdkDragMove":"./drag-events","CdkDragSortEvent":"./drag-events","moveItemInArray":"./drag-utils","transferArrayItem":"./drag-utils","copyArrayItem":"./drag-utils","DragDropModule":"./drag-drop-module","DragDropRegistry":"./drag-drop-registry","CdkDropListInternal":"./directives/drop-list","CdkDropList":"./directives/drop-list","CdkDropListGroup":"./directives/drop-list-group","CDK_DRAG_CONFIG":"./directives/drag","CDK_DRAG_CONFIG_FACTORY":"./directives/drag","CdkDrag":"./directives/drag","CdkDragHandle":"./directives/drag-handle","CdkDragPreview":"./directives/drag-preview","CdkDragPlaceholder":"./directives/drag-placeholder","ɵa":"./drag-parent","ɵb":"./drag-ref"},"importAs":"@angular/cdk/drag-drop"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"CdkDragConfig":{"__symbolic":"interface"},"CdkDropListContainer":{"__symbolic":"interface"},"CDK_DROP_LIST":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":82,"character":33},"arguments":["CDK_DROP_LIST"]},"CDK_DROP_LIST_CONTAINER":{"__symbolic":"reference","name":"CDK_DROP_LIST"},"CdkDragStart":{"__symbolic":"interface"},"CdkDragRelease":{"__symbolic":"interface"},"CdkDragEnd":{"__symbolic":"interface"},"CdkDragEnter":{"__symbolic":"interface"},"CdkDragExit":{"__symbolic":"interface"},"CdkDragDrop":{"__symbolic":"interface"},"CdkDragMove":{"__symbolic":"interface"},"CdkDragSortEvent":{"__symbolic":"interface"},"moveItemInArray":{"__symbolic":"function"},"transferArrayItem":{"__symbolic":"function"},"copyArrayItem":{"__symbolic":"function"},"DragDropModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":16,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"CdkDropList"},{"__symbolic":"reference","name":"CdkDropListGroup"},{"__symbolic":"reference","name":"CdkDrag"},{"__symbolic":"reference","name":"CdkDragHandle"},{"__symbolic":"reference","name":"CdkDragPreview"},{"__symbolic":"reference","name":"CdkDragPlaceholder"}],"exports":[{"__symbolic":"reference","name":"CdkDropList"},{"__symbolic":"reference","name":"CdkDropListGroup"},{"__symbolic":"reference","name":"CdkDrag"},{"__symbolic":"reference","name":"CdkDragHandle"},{"__symbolic":"reference","name":"CdkDragPreview"},{"__symbolic":"reference","name":"CdkDragPlaceholder"}]}]}],"members":{}},"DragDropRegistry":{"__symbolic":"class","arity":2,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":27,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":60,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":60,"character":12}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":59,"character":21},{"__symbolic":"reference","name":"any"}]}],"registerDropContainer":[{"__symbolic":"method"}],"registerDragItem":[{"__symbolic":"method"}],"removeDropContainer":[{"__symbolic":"method"}],"removeDragItem":[{"__symbolic":"method"}],"startDragging":[{"__symbolic":"method"}],"stopDragging":[{"__symbolic":"method"}],"isDragging":[{"__symbolic":"method"}],"getDropContainer":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_clearGlobalListeners":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"CdkDropListInternal":{"__symbolic":"interface"},"CdkDropList":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":49,"character":1},"arguments":[{"selector":"[cdkDropList], cdk-drop-list","exportAs":"cdkDropList","providers":[{"provide":{"__symbolic":"reference","name":"CdkDropListGroup"},"useValue":{"__symbolic":"reference","name":"undefined"}},{"provide":{"__symbolic":"reference","name":"CDK_DROP_LIST_CONTAINER"},"useExisting":{"__symbolic":"reference","name":"CdkDropList"}}],"host":{"class":"cdk-drop-list","[id]":"id","[class.cdk-drop-list-dragging]":"_dropListRef.isDragging()","[class.cdk-drop-list-receiving]":"_dropListRef.isReceiving()","$quoted$":["class","[id]","[class.cdk-drop-list-dragging]","[class.cdk-drop-list-receiving]"]}}]}],"members":{"_draggables":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":72,"character":3},"arguments":[{"__symbolic":"reference","name":"CdkDrag"}]}]}],"connectedTo":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":79,"character":3},"arguments":["cdkDropListConnectedTo"]}]}],"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":83,"character":3},"arguments":["cdkDropListData"]}]}],"orientation":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":86,"character":3},"arguments":["cdkDropListOrientation"]}]}],"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":92,"character":3}}]}],"lockAxis":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":95,"character":3},"arguments":["cdkDropListLockAxis"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":98,"character":3},"arguments":["cdkDropListDisabled"]}]}],"enterPredicate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":111,"character":3},"arguments":["cdkDropListEnterPredicate"]}]}],"dropped":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":115,"character":3},"arguments":["cdkDropListDropped"]}]}],"entered":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":121,"character":3},"arguments":["cdkDropListEntered"]}]}],"exited":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":128,"character":3},"arguments":["cdkDropListExited"]}]}],"sorted":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":132,"character":3},"arguments":["cdkDropListSorted"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":139,"character":5}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":140,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf","line":140,"character":17}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":142,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":142,"character":17},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":142,"character":24}]}]],"parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":136,"character":31,"context":{"typeName":"HTMLElement"},"module":"./directives/drop-list"}]},{"__symbolic":"reference","name":"DragDropRegistry"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":138,"character":32},{"__symbolic":"reference","module":"@angular/cdk/bidi","name":"Directionality","line":139,"character":22},{"__symbolic":"reference","name":"CdkDropListGroup"},{"__symbolic":"reference","name":"any"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"start":[{"__symbolic":"method"}],"drop":[{"__symbolic":"method"}],"enter":[{"__symbolic":"method"}],"exit":[{"__symbolic":"method"}],"getItemIndex":[{"__symbolic":"method"}],"_sortItem":[{"__symbolic":"method"}],"_getSiblingContainerFromPosition":[{"__symbolic":"method"}],"_isOverContainer":[{"__symbolic":"method"}],"_syncInputs":[{"__symbolic":"method"}],"_handleEvents":[{"__symbolic":"method"}]},"statics":{"_dropLists":[]}},"CdkDropListGroup":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":17,"character":1},"arguments":[{"selector":"[cdkDropListGroup]","exportAs":"cdkDropListGroup"}]}],"members":{"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":3},"arguments":["cdkDropListGroupDisabled"]}]}],"ngOnDestroy":[{"__symbolic":"method"}]}},"CDK_DRAG_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":54,"character":35},"arguments":["CDK_DRAG_CONFIG",{"providedIn":"root","factory":{"__symbolic":"reference","name":"CDK_DRAG_CONFIG_FACTORY"}}]},"CDK_DRAG_CONFIG_FACTORY":{"__symbolic":"function","parameters":[],"value":{"dragStartThreshold":5,"pointerDirectionChangeThreshold":5}},"CdkDrag":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":65,"character":1},"arguments":[{"selector":"[cdkDrag]","exportAs":"cdkDrag","host":{"class":"cdk-drag","[class.cdk-drag-dragging]":"_dragRef.isDragging()","$quoted$":["class","[class.cdk-drag-dragging]"]},"providers":[{"provide":{"__symbolic":"reference","name":"ɵa"},"useExisting":{"__symbolic":"reference","name":"CdkDrag"}}]}]}],"members":{"_handles":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChildren","line":81,"character":3},"arguments":[{"__symbolic":"reference","name":"CdkDragHandle"},{"descendants":true}]}]}],"_previewTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":84,"character":3},"arguments":[{"__symbolic":"reference","name":"CdkDragPreview"}]}]}],"_placeholderTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":87,"character":3},"arguments":[{"__symbolic":"reference","name":"CdkDragPlaceholder"}]}]}],"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":90,"character":3},"arguments":["cdkDragData"]}]}],"lockAxis":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":93,"character":3},"arguments":["cdkDragLockAxis"]}]}],"rootElementSelector":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":100,"character":3},"arguments":["cdkDragRootElement"]}]}],"boundaryElementSelector":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":107,"character":3},"arguments":["cdkDragBoundary"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":110,"character":3},"arguments":["cdkDragDisabled"]}]}],"started":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":121,"character":3},"arguments":["cdkDragStarted"]}]}],"released":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":124,"character":3},"arguments":["cdkDragReleased"]}]}],"ended":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":128,"character":3},"arguments":["cdkDragEnded"]}]}],"entered":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":131,"character":3},"arguments":["cdkDragEntered"]}]}],"exited":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":135,"character":3},"arguments":["cdkDragExited"]}]}],"dropped":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":139,"character":3},"arguments":["cdkDragDropped"]}]}],"moved":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":146,"character":3},"arguments":["cdkDragMoved"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":164,"character":5},"arguments":[{"__symbolic":"reference","name":"CDK_DROP_LIST"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":164,"character":28}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf","line":164,"character":40}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":166,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":166,"character":12}]}],null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":171,"character":5},"arguments":[{"__symbolic":"reference","name":"CDK_DRAG_CONFIG"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":172,"character":5}}]],"parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":162,"character":31,"context":{"typeName":"HTMLElement"},"module":"./directives/drag"}]},{"__symbolic":"reference","name":"CdkDropListInternal"},{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":167,"character":21},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":168,"character":31},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"ViewportRuler","line":169,"character":28},{"__symbolic":"reference","name":"DragDropRegistry"},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","module":"@angular/cdk/bidi","name":"Directionality","line":172,"character":30}]}],"getPlaceholderElement":[{"__symbolic":"method"}],"getRootElement":[{"__symbolic":"method"}],"reset":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_updateRootElement":[{"__symbolic":"method"}],"_getBoundaryElement":[{"__symbolic":"method"}],"_syncInputs":[{"__symbolic":"method"}],"_proxyEvents":[{"__symbolic":"method"}]}},"CdkDragHandle":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":15,"character":1},"arguments":[{"selector":"[cdkDragHandle]","host":{"class":"cdk-drag-handle","$quoted$":["class"]}}]}],"members":{"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":29,"character":3},"arguments":["cdkDragHandleDisabled"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":39,"character":5},"arguments":[{"__symbolic":"reference","name":"ɵa"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":39,"character":30}}]],"parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":38,"character":31,"context":{"typeName":"HTMLElement"},"module":"./directives/drag-handle"}]},{"__symbolic":"reference","name":"any"}]}],"ngOnDestroy":[{"__symbolic":"method"}]}},"CdkDragPreview":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":14,"character":1},"arguments":[{"selector":"ng-template[cdkDragPreview]"}]}],"members":{"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TemplateRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":20,"character":46,"context":{"typeName":"T"},"module":"./directives/drag-preview"}]}]}]}},"CdkDragPlaceholder":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":14,"character":1},"arguments":[{"selector":"ng-template[cdkDragPlaceholder]"}]}],"members":{"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TemplateRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":20,"character":46,"context":{"typeName":"T"},"module":"./directives/drag-placeholder"}]}]}]}},"ɵa":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":16,"character":35},"arguments":["CDK_DRAG_PARENT"]},"ɵb":{"__symbolic":"interface"}},"origins":{"CdkDragConfig":"./public-api","CdkDropListContainer":"./drop-list-container","CDK_DROP_LIST":"./drop-list-container","CDK_DROP_LIST_CONTAINER":"./drop-list-container","CdkDragStart":"./drag-events","CdkDragRelease":"./drag-events","CdkDragEnd":"./drag-events","CdkDragEnter":"./drag-events","CdkDragExit":"./drag-events","CdkDragDrop":"./drag-events","CdkDragMove":"./drag-events","CdkDragSortEvent":"./drag-events","moveItemInArray":"./drag-utils","transferArrayItem":"./drag-utils","copyArrayItem":"./drag-utils","DragDropModule":"./drag-drop-module","DragDropRegistry":"./drag-drop-registry","CdkDropListInternal":"./directives/drop-list","CdkDropList":"./directives/drop-list","CdkDropListGroup":"./directives/drop-list-group","CDK_DRAG_CONFIG":"./directives/drag","CDK_DRAG_CONFIG_FACTORY":"./directives/drag","CdkDrag":"./directives/drag","CdkDragHandle":"./directives/drag-handle","CdkDragPreview":"./directives/drag-preview","CdkDragPlaceholder":"./directives/drag-placeholder","ɵa":"./drag-parent","ɵb":"./drag-ref"},"importAs":"@angular/cdk/drag-drop"}
|
package/esm2015/a11y.js
CHANGED
|
@@ -823,7 +823,7 @@ class InteractivityChecker {
|
|
|
823
823
|
* @return {?} Whether the element is tabbable.
|
|
824
824
|
*/
|
|
825
825
|
isTabbable(element) {
|
|
826
|
-
// Nothing is tabbable on the
|
|
826
|
+
// Nothing is tabbable on the server 😎
|
|
827
827
|
if (!this._platform.isBrowser) {
|
|
828
828
|
return false;
|
|
829
829
|
}
|
|
@@ -1332,6 +1332,7 @@ class FocusTrap {
|
|
|
1332
1332
|
this._toggleAnchorTabIndex(this._enabled, anchor);
|
|
1333
1333
|
anchor.classList.add('cdk-visually-hidden');
|
|
1334
1334
|
anchor.classList.add('cdk-focus-trap-anchor');
|
|
1335
|
+
anchor.setAttribute('aria-hidden', 'true');
|
|
1335
1336
|
return anchor;
|
|
1336
1337
|
}
|
|
1337
1338
|
/**
|