@angular/cdk 9.1.1 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a11y/focus-monitor/focus-monitor.d.ts +36 -2
- package/a11y/index.metadata.json +1 -1
- package/bundles/cdk-a11y.umd.js +241 -19
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +25 -10
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-clipboard.umd.js +1 -1
- package/bundles/cdk-clipboard.umd.js.map +1 -1
- package/bundles/cdk-clipboard.umd.min.js +1 -1
- package/bundles/cdk-clipboard.umd.min.js.map +1 -1
- package/bundles/cdk-coercion.umd.js +0 -1
- package/bundles/cdk-coercion.umd.js.map +1 -1
- package/bundles/cdk-coercion.umd.min.js.map +1 -1
- package/bundles/cdk-collections.umd.js +203 -6
- package/bundles/cdk-collections.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.min.js +17 -10
- package/bundles/cdk-collections.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +217 -23
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +25 -10
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +210 -12
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +27 -12
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-platform.umd.js +11 -0
- package/bundles/cdk-platform.umd.js.map +1 -1
- package/bundles/cdk-platform.umd.min.js +6 -6
- package/bundles/cdk-platform.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +211 -14
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js +19 -4
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +242 -14
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +14 -6
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +278 -50
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js +29 -7
- package/bundles/cdk-table.umd.min.js.map +1 -1
- package/bundles/cdk-testing-protractor.umd.js +254 -49
- package/bundles/cdk-testing-protractor.umd.js.map +1 -1
- package/bundles/cdk-testing-protractor.umd.min.js +16 -9
- package/bundles/cdk-testing-protractor.umd.min.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.js +257 -54
- package/bundles/cdk-testing-testbed.umd.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.min.js +23 -8
- package/bundles/cdk-testing-testbed.umd.min.js.map +1 -1
- package/bundles/cdk-testing.umd.js +243 -46
- package/bundles/cdk-testing.umd.js.map +1 -1
- package/bundles/cdk-testing.umd.min.js +20 -5
- package/bundles/cdk-testing.umd.min.js.map +1 -1
- package/bundles/cdk-text-field.umd.js +21 -6
- package/bundles/cdk-text-field.umd.js.map +1 -1
- package/bundles/cdk-text-field.umd.min.js +3 -3
- package/bundles/cdk-text-field.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +212 -15
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js +17 -3
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +1 -1
- package/bundles/cdk.umd.js.map +1 -1
- package/bundles/cdk.umd.min.js +1 -1
- package/bundles/cdk.umd.min.js.map +1 -1
- package/coercion/array.d.ts +1 -0
- package/esm2015/a11y/focus-monitor/focus-monitor.js +93 -12
- package/esm2015/a11y/focus-trap/configurable-focus-trap-factory.js +3 -3
- package/esm2015/a11y/focus-trap/focus-trap.js +1 -1
- package/esm2015/a11y/live-announcer/live-announcer.js +1 -1
- package/esm2015/a11y/public-api.js +2 -2
- package/esm2015/bidi/directionality.js +1 -1
- package/esm2015/clipboard/pending-copy.js +3 -3
- package/esm2015/coercion/array.js +1 -2
- package/esm2015/drag-drop/drag-drop.js +1 -1
- package/esm2015/drag-drop/drag-ref.js +7 -5
- package/esm2015/drag-drop/drop-list-ref.js +11 -19
- package/esm2015/layout/breakpoints-observer.js +1 -1
- package/esm2015/overlay/position/flexible-connected-position-strategy.js +3 -2
- package/esm2015/overlay/position/overlay-position-builder.js +1 -1
- package/esm2015/platform/features/shadow-dom.js +16 -1
- package/esm2015/platform/public-api.js +2 -2
- package/esm2015/scrolling/scroll-dispatcher.js +38 -5
- package/esm2015/scrolling/viewport-ruler.js +44 -5
- package/esm2015/table/cell.js +18 -8
- package/esm2015/table/public-api.js +3 -2
- package/esm2015/table/row.js +24 -8
- package/esm2015/table/table.js +26 -12
- package/esm2015/table/text-column.js +3 -26
- package/esm2015/table/tokens.js +44 -0
- package/esm2015/testing/protractor/protractor-element.js +4 -2
- package/esm2015/testing/protractor/protractor-harness-environment.js +13 -8
- package/esm2015/testing/testbed/testbed-harness-environment.js +16 -10
- package/esm2015/text-field/autosize.js +38 -4
- package/esm2015/version.js +1 -1
- package/esm5/a11y/focus-monitor/focus-monitor.js +39 -13
- package/esm5/a11y/focus-trap/configurable-focus-trap-factory.js +3 -3
- package/esm5/a11y/focus-trap/focus-trap.js +1 -1
- package/esm5/a11y/live-announcer/live-announcer.js +1 -1
- package/esm5/bidi/directionality.js +1 -1
- package/esm5/clipboard/pending-copy.js +2 -2
- package/esm5/coercion/array.js +1 -2
- package/esm5/drag-drop/drag-drop.js +1 -1
- package/esm5/drag-drop/drag-ref.js +7 -5
- package/esm5/drag-drop/drop-list-ref.js +9 -14
- package/esm5/layout/breakpoints-observer.js +1 -1
- package/esm5/overlay/position/flexible-connected-position-strategy.js +3 -2
- package/esm5/overlay/position/overlay-position-builder.js +1 -1
- package/esm5/platform/features/shadow-dom.js +11 -1
- package/esm5/scrolling/scroll-dispatcher.js +21 -5
- package/esm5/scrolling/viewport-ruler.js +24 -5
- package/esm5/table/cell.js +13 -8
- package/esm5/table/public-api.js +2 -1
- package/esm5/table/row.js +21 -11
- package/esm5/table/table.js +16 -11
- package/esm5/table/text-column.js +3 -4
- package/esm5/table/tokens.js +16 -0
- package/esm5/testing/protractor/protractor-element.js +4 -2
- package/esm5/testing/protractor/protractor-harness-environment.js +17 -11
- package/esm5/testing/testbed/testbed-harness-environment.js +17 -11
- package/esm5/text-field/autosize.js +20 -4
- package/esm5/version.js +1 -1
- package/fesm2015/a11y.js +89 -11
- package/fesm2015/a11y.js.map +1 -1
- package/fesm2015/cdk.js +1 -1
- package/fesm2015/cdk.js.map +1 -1
- package/fesm2015/clipboard.js +2 -2
- package/fesm2015/clipboard.js.map +1 -1
- package/fesm2015/coercion.js +0 -1
- package/fesm2015/coercion.js.map +1 -1
- package/fesm2015/drag-drop.js +16 -22
- package/fesm2015/drag-drop.js.map +1 -1
- package/fesm2015/overlay.js +2 -1
- package/fesm2015/overlay.js.map +1 -1
- package/fesm2015/platform.js +16 -1
- package/fesm2015/platform.js.map +1 -1
- package/fesm2015/scrolling.js +76 -7
- package/fesm2015/scrolling.js.map +1 -1
- package/fesm2015/table.js +98 -49
- package/fesm2015/table.js.map +1 -1
- package/fesm2015/testing/protractor.js +16 -9
- package/fesm2015/testing/protractor.js.map +1 -1
- package/fesm2015/testing/testbed.js +15 -9
- package/fesm2015/testing/testbed.js.map +1 -1
- package/fesm2015/text-field.js +37 -3
- package/fesm2015/text-field.js.map +1 -1
- package/fesm5/a11y.js +36 -12
- package/fesm5/a11y.js.map +1 -1
- package/fesm5/cdk.js +1 -1
- package/fesm5/cdk.js.map +1 -1
- package/fesm5/clipboard.js +1 -1
- package/fesm5/clipboard.js.map +1 -1
- package/fesm5/coercion.js +0 -1
- package/fesm5/coercion.js.map +1 -1
- package/fesm5/drag-drop.js +14 -17
- package/fesm5/drag-drop.js.map +1 -1
- package/fesm5/overlay.js +2 -1
- package/fesm5/overlay.js.map +1 -1
- package/fesm5/platform.js +11 -1
- package/fesm5/platform.js.map +1 -1
- package/fesm5/scrolling.js +39 -7
- package/fesm5/scrolling.js.map +1 -1
- package/fesm5/table.js +59 -29
- package/fesm5/table.js.map +1 -1
- package/fesm5/testing/protractor.js +20 -12
- package/fesm5/testing/protractor.js.map +1 -1
- package/fesm5/testing/testbed.js +16 -10
- package/fesm5/testing/testbed.js.map +1 -1
- package/fesm5/text-field.js +19 -3
- package/fesm5/text-field.js.map +1 -1
- package/package.json +1 -1
- package/platform/features/shadow-dom.d.ts +2 -0
- package/platform/index.metadata.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/upgrade-rules/class-names-rule.js +3 -1
- package/schematics/utils/ast/ng-module-imports.js +3 -2
- package/scrolling/index.metadata.json +1 -1
- package/scrolling/scroll-dispatcher.d.ts +9 -1
- package/scrolling/viewport-ruler.d.ts +9 -1
- package/table/cell.d.ts +2 -0
- package/table/index.metadata.json +1 -1
- package/table/public-api.d.ts +1 -0
- package/table/row.d.ts +6 -3
- package/table/table.d.ts +2 -0
- package/table/text-column.d.ts +2 -13
- package/table/tokens.d.ts +25 -0
- package/testing/protractor/protractor-harness-environment.d.ts +10 -3
- package/testing/testbed/testbed-harness-environment.d.ts +12 -4
- package/text-field/autosize.d.ts +9 -1
- package/text-field/index.metadata.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["src/cdk/cdk-text-field.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","cdk","textField","platform","core","coercion","rxjs","operators","this","i1","i0","listenerOptions","normalizePassiveListenerOptions","passive","AutofillMonitor","_platform","_ngZone","_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","decorators","type","Injectable","args","providedIn","ctorParameters","Platform","NgZone","ɵprov","ɵɵdefineInjectable","AutofillMonitor_Factory","ɵɵinject","token","CdkAutofill","_elementRef","_autofillMonitor","cdkAutofill","EventEmitter","ngOnInit","subscribe","emit","Directive","selector","ElementRef","propDecorators","Output","CdkTextareaAutosize","_destroyed","_enabled","_previousMinRows","_textareaElement","nativeElement","Object","defineProperty","_minRows","value","coerceNumberProperty","_setMinHeight","enumerable","configurable","_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","parentNode","appendChild","clientHeight","removeChild","ngDoCheck","force","textarea","_previousValue","placeholderText","placeholder","scrollHeight","requestAnimationFrame","_scrollToCaretPosition","setTimeout","undefined","_noopInputHandler","isStopped","document","activeElement","setSelectionRange","selectionStart","selectionEnd","exportAs","host","class","Input","enabled","HostListener","TextFieldModule","NgModule","declarations","imports","PlatformModule"],"mappings":"CAAC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,yBAA0BA,QAAQ,iBAAkBA,QAAQ,yBAA0BA,QAAQ,QAASA,QAAQ,mBACrL,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,0BAA2B,CAAC,UAAW,wBAAyB,gBAAiB,wBAAyB,OAAQ,kBAAmBJ,GAC/JA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,IAAM,GAAIR,EAAOQ,GAAGC,IAAMT,EAAOQ,GAAGC,KAAO,GAAIT,EAAOQ,GAAGC,IAAIC,UAAY,IAAKV,EAAOQ,GAAGC,IAAIE,SAAUX,EAAOQ,GAAGI,KAAMZ,EAAOQ,GAAGC,IAAII,SAAUb,EAAOc,KAAMd,EAAOc,KAAKC,WAHjO,CAIEC,MAAM,SAAWd,EAASe,EAAIC,EAAIL,EAAUC,EAAM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M,CAAC,wBACnC2F,QAAS,CAAC,CAAE7F,KAAM/C,EAAG2I,MAAO1F,KAAM,CAAC,yBACnCgF,kBAAmB,CAAC,CAAElF,KAAM/C,EAAG6I,aAAc5F,KAAM,CAAC,YAEjDuB,EAxO6B,GAkPpCsE,EAAiC,WACjC,SAASA,KAST,OAPAA,EAAgBhG,WAAa,CACzB,CAAEC,KAAM/C,EAAG+I,SAAU9F,KAAM,CAAC,CAChB+F,aAAc,CAACrF,EAAaa,GAC5ByE,QAAS,CAAClJ,EAAGmJ,gBACblK,QAAS,CAAC2E,EAAaa,OAGhCsE,EAVyB;;;;;;;;AAyBpC9J,EAAQoB,gBAAkBA,EAC1BpB,EAAQ2E,YAAcA,EACtB3E,EAAQwF,oBAAsBA,EAC9BxF,EAAQ8J,gBAAkBA,EAE1BhE,OAAOC,eAAe/F,EAAS,aAAc,CAAEiG,OAAO","sourcesContent":["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/platform'), require('@angular/core'), require('@angular/cdk/coercion'), require('rxjs'), require('rxjs/operators')) :\n typeof define === 'function' && define.amd ? define('@angular/cdk/text-field', ['exports', '@angular/cdk/platform', '@angular/core', '@angular/cdk/coercion', 'rxjs', 'rxjs/operators'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.textField = {}), global.ng.cdk.platform, global.ng.core, global.ng.cdk.coercion, global.rxjs, global.rxjs.operators));\n}(this, (function (exports, i1, i0, coercion, rxjs, operators) { 'use strict';\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 /** Options to pass to the animationstart listener. */\n var listenerOptions = i1.normalizePassiveListenerOptions({ passive: true });\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 var AutofillMonitor = /** @class */ (function () {\n function AutofillMonitor(_platform, _ngZone) {\n this._platform = _platform;\n this._ngZone = _ngZone;\n this._monitoredElements = new Map();\n }\n AutofillMonitor.prototype.monitor = function (elementOrRef) {\n var _this = this;\n if (!this._platform.isBrowser) {\n return rxjs.EMPTY;\n }\n var element = coercion.coerceElement(elementOrRef);\n var info = this._monitoredElements.get(element);\n if (info) {\n return info.subject.asObservable();\n }\n var result = new rxjs.Subject();\n var cssClass = 'cdk-text-field-autofilled';\n var listener = (function (event) {\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(function () { return result.next({ target: event.target, isAutofilled: true }); });\n }\n else if (event.animationName === 'cdk-text-field-autofill-end' &&\n element.classList.contains(cssClass)) {\n element.classList.remove(cssClass);\n _this._ngZone.run(function () { return result.next({ target: event.target, isAutofilled: false }); });\n }\n });\n this._ngZone.runOutsideAngular(function () {\n element.addEventListener('animationstart', listener, listenerOptions);\n element.classList.add('cdk-text-field-autofill-monitored');\n });\n this._monitoredElements.set(element, {\n subject: result,\n unlisten: function () {\n element.removeEventListener('animationstart', listener, listenerOptions);\n }\n });\n return result.asObservable();\n };\n AutofillMonitor.prototype.stopMonitoring = function (elementOrRef) {\n var element = coercion.coerceElement(elementOrRef);\n var info = this._monitoredElements.get(element);\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 AutofillMonitor.prototype.ngOnDestroy = function () {\n var _this = this;\n this._monitoredElements.forEach(function (_info, element) { return _this.stopMonitoring(element); });\n };\n AutofillMonitor.decorators = [\n { type: i0.Injectable, args: [{ providedIn: 'root' },] }\n ];\n /** @nocollapse */\n AutofillMonitor.ctorParameters = function () { return [\n { type: i1.Platform },\n { type: i0.NgZone }\n ]; };\n AutofillMonitor.ɵprov = i0.ɵɵdefineInjectable({ factory: function AutofillMonitor_Factory() { return new AutofillMonitor(i0.ɵɵinject(i1.Platform), i0.ɵɵinject(i0.NgZone)); }, token: AutofillMonitor, providedIn: \"root\" });\n return AutofillMonitor;\n }());\n /** A directive that can be used to monitor the autofill state of an input. */\n var CdkAutofill = /** @class */ (function () {\n function CdkAutofill(_elementRef, _autofillMonitor) {\n this._elementRef = _elementRef;\n this._autofillMonitor = _autofillMonitor;\n /** Emits when the autofill state of the element changes. */\n this.cdkAutofill = new i0.EventEmitter();\n }\n CdkAutofill.prototype.ngOnInit = function () {\n var _this = this;\n this._autofillMonitor\n .monitor(this._elementRef)\n .subscribe(function (event) { return _this.cdkAutofill.emit(event); });\n };\n CdkAutofill.prototype.ngOnDestroy = function () {\n this._autofillMonitor.stopMonitoring(this._elementRef);\n };\n CdkAutofill.decorators = [\n { type: i0.Directive, args: [{\n selector: '[cdkAutofill]',\n },] }\n ];\n /** @nocollapse */\n CdkAutofill.ctorParameters = function () { return [\n { type: i0.ElementRef },\n { type: AutofillMonitor }\n ]; };\n CdkAutofill.propDecorators = {\n cdkAutofill: [{ type: i0.Output }]\n };\n return CdkAutofill;\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 /** Directive to automatically resize a textarea to fit its content. */\n var CdkTextareaAutosize = /** @class */ (function () {\n function CdkTextareaAutosize(_elementRef, _platform, _ngZone) {\n this._elementRef = _elementRef;\n this._platform = _platform;\n this._ngZone = _ngZone;\n this._destroyed = new rxjs.Subject();\n this._enabled = true;\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 this._previousMinRows = -1;\n this._textareaElement = this._elementRef.nativeElement;\n }\n Object.defineProperty(CdkTextareaAutosize.prototype, \"minRows\", {\n /** Minimum amount of rows in the textarea. */\n get: function () { return this._minRows; },\n set: function (value) {\n this._minRows = coercion.coerceNumberProperty(value);\n this._setMinHeight();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CdkTextareaAutosize.prototype, \"maxRows\", {\n /** Maximum amount of rows in the textarea. */\n get: function () { return this._maxRows; },\n set: function (value) {\n this._maxRows = coercion.coerceNumberProperty(value);\n this._setMaxHeight();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CdkTextareaAutosize.prototype, \"enabled\", {\n /** Whether autosizing is enabled or not */\n get: function () { return this._enabled; },\n set: function (value) {\n value = coercion.coerceBooleanProperty(value);\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 enumerable: true,\n configurable: true\n });\n /** Sets the minimum height of the textarea as determined by minRows. */\n CdkTextareaAutosize.prototype._setMinHeight = function () {\n var minHeight = this.minRows && this._cachedLineHeight ?\n this.minRows * this._cachedLineHeight + \"px\" : null;\n if (minHeight) {\n this._textareaElement.style.minHeight = minHeight;\n }\n };\n /** Sets the maximum height of the textarea as determined by maxRows. */\n CdkTextareaAutosize.prototype._setMaxHeight = function () {\n var maxHeight = this.maxRows && this._cachedLineHeight ?\n this.maxRows * this._cachedLineHeight + \"px\" : null;\n if (maxHeight) {\n this._textareaElement.style.maxHeight = maxHeight;\n }\n };\n CdkTextareaAutosize.prototype.ngAfterViewInit = function () {\n var _this = this;\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 this.resizeToFitContent();\n this._ngZone.runOutsideAngular(function () {\n rxjs.fromEvent(window, 'resize')\n .pipe(operators.auditTime(16), operators.takeUntil(_this._destroyed))\n .subscribe(function () { return _this.resizeToFitContent(true); });\n });\n }\n };\n CdkTextareaAutosize.prototype.ngOnDestroy = function () {\n this._destroyed.next();\n this._destroyed.complete();\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 CdkTextareaAutosize.prototype._cacheTextareaLineHeight = function () {\n if (this._cachedLineHeight) {\n return;\n }\n // Use a clone element because we have to override some styles.\n var textareaClone = this._textareaElement.cloneNode(false);\n textareaClone.rows = 1;\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 // 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 this._textareaElement.parentNode.appendChild(textareaClone);\n this._cachedLineHeight = textareaClone.clientHeight;\n this._textareaElement.parentNode.removeChild(textareaClone);\n // Min and max heights have to be re-calculated if the cached line height changes\n this._setMinHeight();\n this._setMaxHeight();\n };\n CdkTextareaAutosize.prototype.ngDoCheck = function () {\n if (this._platform.isBrowser) {\n this.resizeToFitContent();\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 CdkTextareaAutosize.prototype.resizeToFitContent = function (force) {\n var _this = this;\n if (force === void 0) { force = false; }\n // If autosizing is disabled, just skip everything else\n if (!this._enabled) {\n return;\n }\n this._cacheTextareaLineHeight();\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 var textarea = this._elementRef.nativeElement;\n var value = textarea.value;\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 var placeholderText = textarea.placeholder;\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 // 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 var height = textarea.scrollHeight - 4;\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 this._ngZone.runOutsideAngular(function () {\n if (typeof requestAnimationFrame !== 'undefined') {\n requestAnimationFrame(function () { return _this._scrollToCaretPosition(textarea); });\n }\n else {\n setTimeout(function () { return _this._scrollToCaretPosition(textarea); });\n }\n });\n this._previousValue = value;\n this._previousMinRows = this._minRows;\n };\n /**\n * Resets the textarea to its original size\n */\n CdkTextareaAutosize.prototype.reset = function () {\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 this._textareaElement.style.height = this._initialHeight;\n }\n };\n // In Ivy the `host` metadata will be merged, whereas in ViewEngine it is overridden. In order\n // to avoid double event listeners, we need to use `HostListener`. Once Ivy is the default, we\n // can move this back into `host`.\n // tslint:disable:no-host-decorator-in-concrete\n CdkTextareaAutosize.prototype._noopInputHandler = function () {\n // no-op handler that ensures we're running change detection on input events.\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 CdkTextareaAutosize.prototype._scrollToCaretPosition = function (textarea) {\n var selectionStart = textarea.selectionStart, selectionEnd = textarea.selectionEnd;\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 CdkTextareaAutosize.decorators = [\n { type: i0.Directive, args: [{\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 },\n },] }\n ];\n /** @nocollapse */\n CdkTextareaAutosize.ctorParameters = function () { return [\n { type: i0.ElementRef },\n { type: i1.Platform },\n { type: i0.NgZone }\n ]; };\n CdkTextareaAutosize.propDecorators = {\n minRows: [{ type: i0.Input, args: ['cdkAutosizeMinRows',] }],\n maxRows: [{ type: i0.Input, args: ['cdkAutosizeMaxRows',] }],\n enabled: [{ type: i0.Input, args: ['cdkTextareaAutosize',] }],\n _noopInputHandler: [{ type: i0.HostListener, args: ['input',] }]\n };\n return CdkTextareaAutosize;\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 var TextFieldModule = /** @class */ (function () {\n function TextFieldModule() {\n }\n TextFieldModule.decorators = [\n { type: i0.NgModule, args: [{\n declarations: [CdkAutofill, CdkTextareaAutosize],\n imports: [i1.PlatformModule],\n exports: [CdkAutofill, CdkTextareaAutosize],\n },] }\n ];\n return TextFieldModule;\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\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.AutofillMonitor = AutofillMonitor;\n exports.CdkAutofill = CdkAutofill;\n exports.CdkTextareaAutosize = CdkTextareaAutosize;\n exports.TextFieldModule = TextFieldModule;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=cdk-text-field.umd.js.map\n"]}
|
|
1
|
+
{"version":3,"sources":["src/cdk/cdk-text-field.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","cdk","textField","platform","core","coercion","rxjs","operators","common","this","i1","i0","listenerOptions","normalizePassiveListenerOptions","passive","AutofillMonitor","_platform","_ngZone","_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","decorators","type","Injectable","args","providedIn","ctorParameters","Platform","NgZone","ɵprov","ɵɵdefineInjectable","AutofillMonitor_Factory","ɵɵinject","token","CdkAutofill","_elementRef","_autofillMonitor","cdkAutofill","EventEmitter","ngOnInit","subscribe","emit","Directive","selector","ElementRef","propDecorators","Output","CdkTextareaAutosize","document","_destroyed","_enabled","_previousMinRows","_document","_textareaElement","nativeElement","Object","defineProperty","_minRows","value","coerceNumberProperty","_setMinHeight","enumerable","configurable","_maxRows","_setMaxHeight","coerceBooleanProperty","resizeToFitContent","reset","minHeight","minRows","_cachedLineHeight","style","maxHeight","maxRows","ngAfterViewInit","_initialHeight","height","window","_getWindow","fromEvent","pipe","auditTime","takeUntil","_cacheTextareaLineHeight","textareaClone","cloneNode","rows","position","visibility","border","padding","overflow","parentNode","appendChild","clientHeight","removeChild","ngDoCheck","force","textarea","_previousValue","placeholderText","placeholder","scrollHeight","requestAnimationFrame","_scrollToCaretPosition","setTimeout","undefined","_noopInputHandler","_getDocument","defaultView","selectionStart","selectionEnd","isStopped","activeElement","setSelectionRange","exportAs","host","class","Optional","Inject","DOCUMENT","Input","enabled","HostListener","TextFieldModule","NgModule","declarations","imports","PlatformModule"],"mappings":"CAAC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,yBAA0BA,QAAQ,iBAAkBA,QAAQ,yBAA0BA,QAAQ,QAASA,QAAQ,kBAAmBA,QAAQ,oBAChN,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,0BAA2B,CAAC,UAAW,wBAAyB,gBAAiB,wBAAyB,OAAQ,iBAAkB,mBAAoBJ,GAClLA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,IAAM,GAAIR,EAAOQ,GAAGC,IAAMT,EAAOQ,GAAGC,KAAO,GAAIT,EAAOQ,GAAGC,IAAIC,UAAY,IAAKV,EAAOQ,GAAGC,IAAIE,SAAUX,EAAOQ,GAAGI,KAAMZ,EAAOQ,GAAGC,IAAII,SAAUb,EAAOc,KAAMd,EAAOc,KAAKC,UAAWf,EAAOQ,GAAGQ,QAHtP,CAIEC,MAAM,SAAWf,EAASgB,EAAIC,EAAIN,EAAUC,EAAMC,EAAWC,GAAU;;;;;;;OAUrE,IAAII,EAAkBF,EAAGG,gCAAgC,CAAEC,SAAS,IAMhEC,EAAiC,WACjC,SAASA,EAAgBC,EAAWC,GAChCR,KAAKO,UAAYA,EACjBP,KAAKQ,QAAUA,EACfR,KAAKS,mBAAqB,IAAIC,IAiElC,OA/DAJ,EAAgBK,UAAUC,QAAU,SAAUC,GAC1C,IAAIC,EAAQd,KACZ,IAAKA,KAAKO,UAAUQ,UAChB,OAAOlB,EAAKmB,MAEhB,IAAIC,EAAUrB,EAASsB,cAAcL,GACjCM,EAAOnB,KAAKS,mBAAmBW,IAAIH,GACvC,GAAIE,EACA,OAAO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C,wBACnCkG,QAAS,CAAC,CAAEpG,KAAM/C,EAAGkJ,MAAOjG,KAAM,CAAC,yBACnCmF,kBAAmB,CAAC,CAAErF,KAAM/C,EAAGoJ,aAAcnG,KAAM,CAAC,YAEjDuB,EAvP6B,GAiQpC6E,EAAiC,WACjC,SAASA,KAST,OAPAA,EAAgBvG,WAAa,CACzB,CAAEC,KAAM/C,EAAGsJ,SAAUrG,KAAM,CAAC,CAChBsG,aAAc,CAAC5F,EAAaa,GAC5BgF,QAAS,CAACzJ,EAAG0J,gBACb1K,QAAS,CAAC4E,EAAaa,OAGhC6E,EAVyB;;;;;;;;AAyBpCtK,EAAQqB,gBAAkBA,EAC1BrB,EAAQ4E,YAAcA,EACtB5E,EAAQyF,oBAAsBA,EAC9BzF,EAAQsK,gBAAkBA,EAE1BrE,OAAOC,eAAelG,EAAS,aAAc,CAAEoG,OAAO","sourcesContent":["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/platform'), require('@angular/core'), require('@angular/cdk/coercion'), require('rxjs'), require('rxjs/operators'), require('@angular/common')) :\n typeof define === 'function' && define.amd ? define('@angular/cdk/text-field', ['exports', '@angular/cdk/platform', '@angular/core', '@angular/cdk/coercion', 'rxjs', 'rxjs/operators', '@angular/common'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.textField = {}), global.ng.cdk.platform, global.ng.core, global.ng.cdk.coercion, global.rxjs, global.rxjs.operators, global.ng.common));\n}(this, (function (exports, i1, i0, coercion, rxjs, operators, common) { 'use strict';\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 /** Options to pass to the animationstart listener. */\n var listenerOptions = i1.normalizePassiveListenerOptions({ passive: true });\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 var AutofillMonitor = /** @class */ (function () {\n function AutofillMonitor(_platform, _ngZone) {\n this._platform = _platform;\n this._ngZone = _ngZone;\n this._monitoredElements = new Map();\n }\n AutofillMonitor.prototype.monitor = function (elementOrRef) {\n var _this = this;\n if (!this._platform.isBrowser) {\n return rxjs.EMPTY;\n }\n var element = coercion.coerceElement(elementOrRef);\n var info = this._monitoredElements.get(element);\n if (info) {\n return info.subject.asObservable();\n }\n var result = new rxjs.Subject();\n var cssClass = 'cdk-text-field-autofilled';\n var listener = (function (event) {\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(function () { return result.next({ target: event.target, isAutofilled: true }); });\n }\n else if (event.animationName === 'cdk-text-field-autofill-end' &&\n element.classList.contains(cssClass)) {\n element.classList.remove(cssClass);\n _this._ngZone.run(function () { return result.next({ target: event.target, isAutofilled: false }); });\n }\n });\n this._ngZone.runOutsideAngular(function () {\n element.addEventListener('animationstart', listener, listenerOptions);\n element.classList.add('cdk-text-field-autofill-monitored');\n });\n this._monitoredElements.set(element, {\n subject: result,\n unlisten: function () {\n element.removeEventListener('animationstart', listener, listenerOptions);\n }\n });\n return result.asObservable();\n };\n AutofillMonitor.prototype.stopMonitoring = function (elementOrRef) {\n var element = coercion.coerceElement(elementOrRef);\n var info = this._monitoredElements.get(element);\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 AutofillMonitor.prototype.ngOnDestroy = function () {\n var _this = this;\n this._monitoredElements.forEach(function (_info, element) { return _this.stopMonitoring(element); });\n };\n AutofillMonitor.decorators = [\n { type: i0.Injectable, args: [{ providedIn: 'root' },] }\n ];\n /** @nocollapse */\n AutofillMonitor.ctorParameters = function () { return [\n { type: i1.Platform },\n { type: i0.NgZone }\n ]; };\n AutofillMonitor.ɵprov = i0.ɵɵdefineInjectable({ factory: function AutofillMonitor_Factory() { return new AutofillMonitor(i0.ɵɵinject(i1.Platform), i0.ɵɵinject(i0.NgZone)); }, token: AutofillMonitor, providedIn: \"root\" });\n return AutofillMonitor;\n }());\n /** A directive that can be used to monitor the autofill state of an input. */\n var CdkAutofill = /** @class */ (function () {\n function CdkAutofill(_elementRef, _autofillMonitor) {\n this._elementRef = _elementRef;\n this._autofillMonitor = _autofillMonitor;\n /** Emits when the autofill state of the element changes. */\n this.cdkAutofill = new i0.EventEmitter();\n }\n CdkAutofill.prototype.ngOnInit = function () {\n var _this = this;\n this._autofillMonitor\n .monitor(this._elementRef)\n .subscribe(function (event) { return _this.cdkAutofill.emit(event); });\n };\n CdkAutofill.prototype.ngOnDestroy = function () {\n this._autofillMonitor.stopMonitoring(this._elementRef);\n };\n CdkAutofill.decorators = [\n { type: i0.Directive, args: [{\n selector: '[cdkAutofill]',\n },] }\n ];\n /** @nocollapse */\n CdkAutofill.ctorParameters = function () { return [\n { type: i0.ElementRef },\n { type: AutofillMonitor }\n ]; };\n CdkAutofill.propDecorators = {\n cdkAutofill: [{ type: i0.Output }]\n };\n return CdkAutofill;\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 /** Directive to automatically resize a textarea to fit its content. */\n var CdkTextareaAutosize = /** @class */ (function () {\n function CdkTextareaAutosize(_elementRef, _platform, _ngZone, \n /** @breaking-change 11.0.0 make document required */\n document) {\n this._elementRef = _elementRef;\n this._platform = _platform;\n this._ngZone = _ngZone;\n this._destroyed = new rxjs.Subject();\n this._enabled = true;\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 this._previousMinRows = -1;\n this._document = document;\n this._textareaElement = this._elementRef.nativeElement;\n }\n Object.defineProperty(CdkTextareaAutosize.prototype, \"minRows\", {\n /** Minimum amount of rows in the textarea. */\n get: function () { return this._minRows; },\n set: function (value) {\n this._minRows = coercion.coerceNumberProperty(value);\n this._setMinHeight();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CdkTextareaAutosize.prototype, \"maxRows\", {\n /** Maximum amount of rows in the textarea. */\n get: function () { return this._maxRows; },\n set: function (value) {\n this._maxRows = coercion.coerceNumberProperty(value);\n this._setMaxHeight();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CdkTextareaAutosize.prototype, \"enabled\", {\n /** Whether autosizing is enabled or not */\n get: function () { return this._enabled; },\n set: function (value) {\n value = coercion.coerceBooleanProperty(value);\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 enumerable: true,\n configurable: true\n });\n /** Sets the minimum height of the textarea as determined by minRows. */\n CdkTextareaAutosize.prototype._setMinHeight = function () {\n var minHeight = this.minRows && this._cachedLineHeight ?\n this.minRows * this._cachedLineHeight + \"px\" : null;\n if (minHeight) {\n this._textareaElement.style.minHeight = minHeight;\n }\n };\n /** Sets the maximum height of the textarea as determined by maxRows. */\n CdkTextareaAutosize.prototype._setMaxHeight = function () {\n var maxHeight = this.maxRows && this._cachedLineHeight ?\n this.maxRows * this._cachedLineHeight + \"px\" : null;\n if (maxHeight) {\n this._textareaElement.style.maxHeight = maxHeight;\n }\n };\n CdkTextareaAutosize.prototype.ngAfterViewInit = function () {\n var _this = this;\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 this.resizeToFitContent();\n this._ngZone.runOutsideAngular(function () {\n var window = _this._getWindow();\n rxjs.fromEvent(window, 'resize')\n .pipe(operators.auditTime(16), operators.takeUntil(_this._destroyed))\n .subscribe(function () { return _this.resizeToFitContent(true); });\n });\n }\n };\n CdkTextareaAutosize.prototype.ngOnDestroy = function () {\n this._destroyed.next();\n this._destroyed.complete();\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 CdkTextareaAutosize.prototype._cacheTextareaLineHeight = function () {\n if (this._cachedLineHeight) {\n return;\n }\n // Use a clone element because we have to override some styles.\n var textareaClone = this._textareaElement.cloneNode(false);\n textareaClone.rows = 1;\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 // 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 this._textareaElement.parentNode.appendChild(textareaClone);\n this._cachedLineHeight = textareaClone.clientHeight;\n this._textareaElement.parentNode.removeChild(textareaClone);\n // Min and max heights have to be re-calculated if the cached line height changes\n this._setMinHeight();\n this._setMaxHeight();\n };\n CdkTextareaAutosize.prototype.ngDoCheck = function () {\n if (this._platform.isBrowser) {\n this.resizeToFitContent();\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 CdkTextareaAutosize.prototype.resizeToFitContent = function (force) {\n var _this = this;\n if (force === void 0) { force = false; }\n // If autosizing is disabled, just skip everything else\n if (!this._enabled) {\n return;\n }\n this._cacheTextareaLineHeight();\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 var textarea = this._elementRef.nativeElement;\n var value = textarea.value;\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 var placeholderText = textarea.placeholder;\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 // 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 var height = textarea.scrollHeight - 4;\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 this._ngZone.runOutsideAngular(function () {\n if (typeof requestAnimationFrame !== 'undefined') {\n requestAnimationFrame(function () { return _this._scrollToCaretPosition(textarea); });\n }\n else {\n setTimeout(function () { return _this._scrollToCaretPosition(textarea); });\n }\n });\n this._previousValue = value;\n this._previousMinRows = this._minRows;\n };\n /**\n * Resets the textarea to its original size\n */\n CdkTextareaAutosize.prototype.reset = function () {\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 this._textareaElement.style.height = this._initialHeight;\n }\n };\n // In Ivy the `host` metadata will be merged, whereas in ViewEngine it is overridden. In order\n // to avoid double event listeners, we need to use `HostListener`. Once Ivy is the default, we\n // can move this back into `host`.\n // tslint:disable:no-host-decorator-in-concrete\n CdkTextareaAutosize.prototype._noopInputHandler = function () {\n // no-op handler that ensures we're running change detection on input events.\n };\n /** Access injected document if available or fallback to global document reference */\n CdkTextareaAutosize.prototype._getDocument = function () {\n return this._document || document;\n };\n /** Use defaultView of injected document if available or fallback to global window reference */\n CdkTextareaAutosize.prototype._getWindow = function () {\n var doc = this._getDocument();\n return doc.defaultView || window;\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 CdkTextareaAutosize.prototype._scrollToCaretPosition = function (textarea) {\n var selectionStart = textarea.selectionStart, selectionEnd = textarea.selectionEnd;\n var document = this._getDocument();\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 CdkTextareaAutosize.decorators = [\n { type: i0.Directive, args: [{\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 },\n },] }\n ];\n /** @nocollapse */\n CdkTextareaAutosize.ctorParameters = function () { return [\n { type: i0.ElementRef },\n { type: i1.Platform },\n { type: i0.NgZone },\n { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [common.DOCUMENT,] }] }\n ]; };\n CdkTextareaAutosize.propDecorators = {\n minRows: [{ type: i0.Input, args: ['cdkAutosizeMinRows',] }],\n maxRows: [{ type: i0.Input, args: ['cdkAutosizeMaxRows',] }],\n enabled: [{ type: i0.Input, args: ['cdkTextareaAutosize',] }],\n _noopInputHandler: [{ type: i0.HostListener, args: ['input',] }]\n };\n return CdkTextareaAutosize;\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 var TextFieldModule = /** @class */ (function () {\n function TextFieldModule() {\n }\n TextFieldModule.decorators = [\n { type: i0.NgModule, args: [{\n declarations: [CdkAutofill, CdkTextareaAutosize],\n imports: [i1.PlatformModule],\n exports: [CdkAutofill, CdkTextareaAutosize],\n },] }\n ];\n return TextFieldModule;\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\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.AutofillMonitor = AutofillMonitor;\n exports.CdkAutofill = CdkAutofill;\n exports.CdkTextareaAutosize = CdkTextareaAutosize;\n exports.TextFieldModule = TextFieldModule;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=cdk-text-field.umd.js.map\n"]}
|
package/bundles/cdk-tree.umd.js
CHANGED
|
@@ -1,8 +1,205 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@angular/cdk/tree', ['exports', '
|
|
4
|
-
(global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.tree = {}), global.
|
|
5
|
-
}(this, (function (exports,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/collections'), require('rxjs'), require('rxjs/operators'), require('@angular/core'), require('@angular/cdk/bidi'), require('@angular/cdk/coercion'), require('@angular/cdk/a11y')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@angular/cdk/tree', ['exports', '@angular/cdk/collections', 'rxjs', 'rxjs/operators', '@angular/core', '@angular/cdk/bidi', '@angular/cdk/coercion', '@angular/cdk/a11y'], factory) :
|
|
4
|
+
(global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.tree = {}), global.ng.cdk.collections, global.rxjs, global.rxjs.operators, global.ng.core, global.ng.cdk.bidi, global.ng.cdk.coercion, global.ng.cdk.a11y));
|
|
5
|
+
}(this, (function (exports, collections, rxjs, operators, core, bidi, coercion, a11y) { 'use strict';
|
|
6
|
+
|
|
7
|
+
/*! *****************************************************************************
|
|
8
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
10
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
11
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
15
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
16
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
17
|
+
|
|
18
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
19
|
+
and limitations under the License.
|
|
20
|
+
***************************************************************************** */
|
|
21
|
+
/* global Reflect, Promise */
|
|
22
|
+
|
|
23
|
+
var extendStatics = function(d, b) {
|
|
24
|
+
extendStatics = Object.setPrototypeOf ||
|
|
25
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
27
|
+
return extendStatics(d, b);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
function __extends(d, b) {
|
|
31
|
+
extendStatics(d, b);
|
|
32
|
+
function __() { this.constructor = d; }
|
|
33
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var __assign = function() {
|
|
37
|
+
__assign = Object.assign || function __assign(t) {
|
|
38
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
39
|
+
s = arguments[i];
|
|
40
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
41
|
+
}
|
|
42
|
+
return t;
|
|
43
|
+
};
|
|
44
|
+
return __assign.apply(this, arguments);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
function __rest(s, e) {
|
|
48
|
+
var t = {};
|
|
49
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
50
|
+
t[p] = s[p];
|
|
51
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
52
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
54
|
+
t[p[i]] = s[p[i]];
|
|
55
|
+
}
|
|
56
|
+
return t;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function __decorate(decorators, target, key, desc) {
|
|
60
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
61
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
62
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
63
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function __param(paramIndex, decorator) {
|
|
67
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function __metadata(metadataKey, metadataValue) {
|
|
71
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
75
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
76
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
77
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
78
|
+
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
79
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function __generator(thisArg, body) {
|
|
84
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
85
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
86
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
87
|
+
function step(op) {
|
|
88
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
89
|
+
while (_) try {
|
|
90
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
91
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
92
|
+
switch (op[0]) {
|
|
93
|
+
case 0: case 1: t = op; break;
|
|
94
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
95
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
96
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
97
|
+
default:
|
|
98
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
99
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
100
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
101
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
102
|
+
if (t[2]) _.ops.pop();
|
|
103
|
+
_.trys.pop(); continue;
|
|
104
|
+
}
|
|
105
|
+
op = body.call(thisArg, _);
|
|
106
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
107
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function __exportStar(m, exports) {
|
|
112
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function __values(o) {
|
|
116
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
|
|
117
|
+
if (m) return m.call(o);
|
|
118
|
+
return {
|
|
119
|
+
next: function () {
|
|
120
|
+
if (o && i >= o.length) o = void 0;
|
|
121
|
+
return { value: o && o[i++], done: !o };
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function __read(o, n) {
|
|
127
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
128
|
+
if (!m) return o;
|
|
129
|
+
var i = m.call(o), r, ar = [], e;
|
|
130
|
+
try {
|
|
131
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
132
|
+
}
|
|
133
|
+
catch (error) { e = { error: error }; }
|
|
134
|
+
finally {
|
|
135
|
+
try {
|
|
136
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
137
|
+
}
|
|
138
|
+
finally { if (e) throw e.error; }
|
|
139
|
+
}
|
|
140
|
+
return ar;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function __spread() {
|
|
144
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
145
|
+
ar = ar.concat(__read(arguments[i]));
|
|
146
|
+
return ar;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function __spreadArrays() {
|
|
150
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
151
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
152
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
153
|
+
r[k] = a[j];
|
|
154
|
+
return r;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
function __await(v) {
|
|
158
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
162
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
163
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
164
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
165
|
+
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
166
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
167
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
168
|
+
function fulfill(value) { resume("next", value); }
|
|
169
|
+
function reject(value) { resume("throw", value); }
|
|
170
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function __asyncDelegator(o) {
|
|
174
|
+
var i, p;
|
|
175
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
176
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function __asyncValues(o) {
|
|
180
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
181
|
+
var m = o[Symbol.asyncIterator], i;
|
|
182
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
183
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
184
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function __makeTemplateObject(cooked, raw) {
|
|
188
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
189
|
+
return cooked;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
function __importStar(mod) {
|
|
193
|
+
if (mod && mod.__esModule) return mod;
|
|
194
|
+
var result = {};
|
|
195
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
196
|
+
result.default = mod;
|
|
197
|
+
return result;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function __importDefault(mod) {
|
|
201
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
202
|
+
}
|
|
6
203
|
|
|
7
204
|
/** Base tree control. It has basic toggle/expand/collapse operations on a single data node. */
|
|
8
205
|
var BaseTreeControl = /** @class */ (function () {
|
|
@@ -40,15 +237,15 @@
|
|
|
40
237
|
BaseTreeControl.prototype.expandDescendants = function (dataNode) {
|
|
41
238
|
var _a;
|
|
42
239
|
var toBeProcessed = [dataNode];
|
|
43
|
-
toBeProcessed.push.apply(toBeProcessed,
|
|
44
|
-
(_a = this.expansionModel).select.apply(_a,
|
|
240
|
+
toBeProcessed.push.apply(toBeProcessed, __spread(this.getDescendants(dataNode)));
|
|
241
|
+
(_a = this.expansionModel).select.apply(_a, __spread(toBeProcessed));
|
|
45
242
|
};
|
|
46
243
|
/** Collapses a subtree rooted at given data node recursively. */
|
|
47
244
|
BaseTreeControl.prototype.collapseDescendants = function (dataNode) {
|
|
48
245
|
var _a;
|
|
49
246
|
var toBeProcessed = [dataNode];
|
|
50
|
-
toBeProcessed.push.apply(toBeProcessed,
|
|
51
|
-
(_a = this.expansionModel).deselect.apply(_a,
|
|
247
|
+
toBeProcessed.push.apply(toBeProcessed, __spread(this.getDescendants(dataNode)));
|
|
248
|
+
(_a = this.expansionModel).deselect.apply(_a, __spread(toBeProcessed));
|
|
52
249
|
};
|
|
53
250
|
return BaseTreeControl;
|
|
54
251
|
}());
|
|
@@ -62,7 +259,7 @@
|
|
|
62
259
|
*/
|
|
63
260
|
/** Flat tree control. Able to expand/collapse a subtree recursively for flattened tree. */
|
|
64
261
|
var FlatTreeControl = /** @class */ (function (_super) {
|
|
65
|
-
|
|
262
|
+
__extends(FlatTreeControl, _super);
|
|
66
263
|
/** Construct with flat tree data node functions getLevel and isExpandable. */
|
|
67
264
|
function FlatTreeControl(getLevel, isExpandable) {
|
|
68
265
|
var _this = _super.call(this) || this;
|
|
@@ -98,14 +295,14 @@
|
|
|
98
295
|
*/
|
|
99
296
|
FlatTreeControl.prototype.expandAll = function () {
|
|
100
297
|
var _a;
|
|
101
|
-
(_a = this.expansionModel).select.apply(_a,
|
|
298
|
+
(_a = this.expansionModel).select.apply(_a, __spread(this.dataNodes));
|
|
102
299
|
};
|
|
103
300
|
return FlatTreeControl;
|
|
104
301
|
}(BaseTreeControl));
|
|
105
302
|
|
|
106
303
|
/** Nested tree control. Able to expand/collapse a subtree recursively for NestedNode type. */
|
|
107
304
|
var NestedTreeControl = /** @class */ (function (_super) {
|
|
108
|
-
|
|
305
|
+
__extends(NestedTreeControl, _super);
|
|
109
306
|
/** Construct with nested tree function getChildren. */
|
|
110
307
|
function NestedTreeControl(getChildren) {
|
|
111
308
|
var _this = _super.call(this) || this;
|
|
@@ -123,9 +320,9 @@
|
|
|
123
320
|
var _this = this;
|
|
124
321
|
this.expansionModel.clear();
|
|
125
322
|
var allNodes = this.dataNodes.reduce(function (accumulator, dataNode) {
|
|
126
|
-
return
|
|
323
|
+
return __spread(accumulator, _this.getDescendants(dataNode), [dataNode]);
|
|
127
324
|
}, []);
|
|
128
|
-
(_a = this.expansionModel).select.apply(_a,
|
|
325
|
+
(_a = this.expansionModel).select.apply(_a, __spread(allNodes));
|
|
129
326
|
};
|
|
130
327
|
/** Gets a list of descendant dataNodes of a subtree rooted at given data node recursively. */
|
|
131
328
|
NestedTreeControl.prototype.getDescendants = function (dataNode) {
|
|
@@ -149,7 +346,7 @@
|
|
|
149
346
|
.subscribe(function (children) {
|
|
150
347
|
var e_1, _a;
|
|
151
348
|
try {
|
|
152
|
-
for (var children_1 =
|
|
349
|
+
for (var children_1 = __values(children), children_1_1 = children_1.next(); !children_1_1.done; children_1_1 = children_1.next()) {
|
|
153
350
|
var child = children_1_1.value;
|
|
154
351
|
_this._getDescendants(descendants, child);
|
|
155
352
|
}
|
|
@@ -612,7 +809,7 @@
|
|
|
612
809
|
* The children of node will be automatically added to `cdkTreeNodeOutlet`.
|
|
613
810
|
*/
|
|
614
811
|
var CdkNestedTreeNode = /** @class */ (function (_super) {
|
|
615
|
-
|
|
812
|
+
__extends(CdkNestedTreeNode, _super);
|
|
616
813
|
function CdkNestedTreeNode(_elementRef, _tree, _differs) {
|
|
617
814
|
var _this = _super.call(this, _elementRef, _tree) || this;
|
|
618
815
|
_this._elementRef = _elementRef;
|