@angular/cdk 10.1.2 → 10.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/cdk-a11y.umd.js +425 -373
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +34 -10
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-accordion.umd.js +40 -40
- package/bundles/cdk-accordion.umd.js.map +1 -1
- package/bundles/cdk-accordion.umd.min.js +10 -2
- package/bundles/cdk-accordion.umd.min.js.map +1 -1
- package/bundles/cdk-bidi.umd.js +25 -25
- package/bundles/cdk-bidi.umd.js.map +1 -1
- package/bundles/cdk-bidi.umd.min.js +5 -4
- package/bundles/cdk-bidi.umd.min.js.map +1 -1
- package/bundles/cdk-clipboard.umd.js +31 -31
- package/bundles/cdk-clipboard.umd.js.map +1 -1
- package/bundles/cdk-clipboard.umd.min.js +10 -2
- package/bundles/cdk-clipboard.umd.min.js.map +1 -1
- package/bundles/cdk-coercion.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.js +303 -237
- package/bundles/cdk-collections.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.min.js +3 -9
- package/bundles/cdk-collections.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +484 -425
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +68 -5
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-keycodes.umd.js.map +1 -1
- package/bundles/cdk-layout.umd.js +18 -18
- package/bundles/cdk-layout.umd.js.map +1 -1
- package/bundles/cdk-layout.umd.min.js +6 -5
- package/bundles/cdk-layout.umd.min.js.map +1 -1
- package/bundles/cdk-observers.umd.js +34 -34
- package/bundles/cdk-observers.umd.js.map +1 -1
- package/bundles/cdk-observers.umd.min.js +2 -2
- package/bundles/cdk-observers.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +442 -383
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +57 -11
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-platform.umd.js +10 -10
- package/bundles/cdk-platform.umd.js.map +1 -1
- package/bundles/cdk-platform.umd.min.js +3 -10
- package/bundles/cdk-platform.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +351 -299
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js +4 -5
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +432 -378
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +20 -19
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-stepper.umd.js +117 -117
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.min.js +11 -2
- package/bundles/cdk-stepper.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +684 -588
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js +7 -14
- package/bundles/cdk-table.umd.min.js.map +1 -1
- package/bundles/cdk-testing-protractor.umd.js +300 -241
- package/bundles/cdk-testing-protractor.umd.js.map +1 -1
- package/bundles/cdk-testing-protractor.umd.min.js +2 -9
- package/bundles/cdk-testing-protractor.umd.min.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.js +301 -256
- package/bundles/cdk-testing-testbed.umd.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.min.js +7 -30
- package/bundles/cdk-testing-testbed.umd.min.js.map +1 -1
- package/bundles/cdk-testing.umd.js +326 -270
- package/bundles/cdk-testing.umd.js.map +1 -1
- package/bundles/cdk-testing.umd.min.js +1 -16
- package/bundles/cdk-testing.umd.min.js.map +1 -1
- package/bundles/cdk-text-field.umd.js +51 -51
- package/bundles/cdk-text-field.umd.js.map +1 -1
- package/bundles/cdk-text-field.umd.min.js +10 -2
- package/bundles/cdk-text-field.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +443 -394
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js +28 -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/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/bidi/directionality.js +1 -1
- package/esm2015/overlay/position/flexible-connected-position-strategy.js +3 -3
- package/esm2015/scrolling/scrolling-module.js +4 -1
- package/esm2015/table/cell.js +18 -3
- package/esm2015/table/coalesced-style-scheduler.js +21 -10
- package/esm2015/table/sticky-styler.js +21 -7
- package/esm2015/table/table.js +8 -2
- package/esm2015/tree/tree.js +9 -23
- package/esm2015/version.js +1 -1
- package/fesm2015/cdk.js +1 -1
- package/fesm2015/cdk.js.map +1 -1
- package/fesm2015/overlay.js +2 -2
- package/fesm2015/overlay.js.map +1 -1
- package/fesm2015/scrolling.js +3 -0
- package/fesm2015/scrolling.js.map +1 -1
- package/fesm2015/table.js +65 -19
- package/fesm2015/table.js.map +1 -1
- package/fesm2015/tree.js +7 -21
- package/fesm2015/tree.js.map +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/scrolling/index.metadata.json +1 -1
- package/scrolling/scrolling-module.d.ts +3 -0
- package/table/cell.d.ts +13 -0
- package/table/coalesced-style-scheduler.d.ts +1 -0
- package/table/index.metadata.json +1 -1
- package/table/sticky-styler.d.ts +5 -1
- package/table/table.d.ts +6 -0
- package/tree/index.metadata.json +1 -1
- package/tree/tree.d.ts +2 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["src/cdk/cdk-observers.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","cdk","observers","coercion","core","rxjs","operators","this","i0","MutationObserverFactory","prototype","create","callback","MutationObserver","ɵprov","ɵɵdefineInjectable","MutationObserverFactory_Factory","token","providedIn","decorators","type","Injectable","args","ContentObserver","_mutationObserverFactory","_observedElements","Map","ngOnDestroy","_this","forEach","_","element","_cleanupObserver","observe","elementOrRef","coerceElement","Observable","observer","subscription","_observeElement","subscribe","unsubscribe","_unobserveElement","has","get","count","stream_1","Subject","mutations","next","characterData","childList","subtree","set","stream","_a","disconnect","complete","delete","ContentObserver_Factory","ɵɵinject","ctorParameters","CdkObserveContent","_contentObserver","_elementRef","_ngZone","event","EventEmitter","_disabled","_currentSubscription","Object","defineProperty","value","coerceBooleanProperty","_unsubscribe","_subscribe","enumerable","configurable","_debounce","coerceNumberProperty","ngAfterContentInit","disabled","runOutsideAngular","debounce","pipe","debounceTime","Directive","selector","exportAs","ElementRef","NgZone","propDecorators","Output","Input","ObserversModule","NgModule","declarations","providers"],"mappings":"CAAC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,yBAA0BA,QAAQ,iBAAkBA,QAAQ,QAASA,QAAQ,mBACnJ,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,yBAA0B,CAAC,UAAW,wBAAyB,gBAAiB,OAAQ,kBAAmBJ,GACrIA,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,EAAOa,KAAMb,EAAOa,KAAKC,WAHzM,CAIEC,MAAM,SAAWb,EAASS,EAAUK,EAAIH,EAAMC,GAAa;;;;;;;OAazD,IAAIG,EAAyC,WACzC,SAASA,KAST,OAPAA,EAA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F,OAGrBqF,EAVyB;;;;;;;;AAyBpCpG,EAAQoE,kBAAoBA,EAC5BpE,EAAQ6B,gBAAkBA,EAC1B7B,EAAQe,wBAA0BA,EAClCf,EAAQoG,gBAAkBA,EAE1BxB,OAAOC,eAAe7E,EAAS,aAAc,CAAE8E,OAAO","sourcesContent":["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/coercion'), require('@angular/core'), require('rxjs'), require('rxjs/operators')) :\n typeof define === 'function' && define.amd ? define('@angular/cdk/observers', ['exports', '@angular/cdk/coercion', '@angular/core', 'rxjs', 'rxjs/operators'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.observers = {}), global.ng.cdk.coercion, global.ng.core, global.rxjs, global.rxjs.operators));\n}(this, (function (exports, coercion, i0, 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 /**\n * Factory that creates a new MutationObserver and allows us to stub it out in unit tests.\n * @docs-private\n */\n var MutationObserverFactory = /** @class */ (function () {\n function MutationObserverFactory() {\n }\n MutationObserverFactory.prototype.create = function (callback) {\n return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback);\n };\n MutationObserverFactory.ɵprov = i0.ɵɵdefineInjectable({ factory: function MutationObserverFactory_Factory() { return new MutationObserverFactory(); }, token: MutationObserverFactory, providedIn: \"root\" });\n MutationObserverFactory.decorators = [\n { type: i0.Injectable, args: [{ providedIn: 'root' },] }\n ];\n return MutationObserverFactory;\n }());\n /** An injectable service that allows watching elements for changes to their content. */\n var ContentObserver = /** @class */ (function () {\n function ContentObserver(_mutationObserverFactory) {\n this._mutationObserverFactory = _mutationObserverFactory;\n /** Keeps track of the existing MutationObservers so they can be reused. */\n this._observedElements = new Map();\n }\n ContentObserver.prototype.ngOnDestroy = function () {\n var _this = this;\n this._observedElements.forEach(function (_, element) { return _this._cleanupObserver(element); });\n };\n ContentObserver.prototype.observe = function (elementOrRef) {\n var _this = this;\n var element = coercion.coerceElement(elementOrRef);\n return new rxjs.Observable(function (observer) {\n var stream = _this._observeElement(element);\n var subscription = stream.subscribe(observer);\n return function () {\n subscription.unsubscribe();\n _this._unobserveElement(element);\n };\n });\n };\n /**\n * Observes the given element by using the existing MutationObserver if available, or creating a\n * new one if not.\n */\n ContentObserver.prototype._observeElement = function (element) {\n if (!this._observedElements.has(element)) {\n var stream_1 = new rxjs.Subject();\n var observer = this._mutationObserverFactory.create(function (mutations) { return stream_1.next(mutations); });\n if (observer) {\n observer.observe(element, {\n characterData: true,\n childList: true,\n subtree: true\n });\n }\n this._observedElements.set(element, { observer: observer, stream: stream_1, count: 1 });\n }\n else {\n this._observedElements.get(element).count++;\n }\n return this._observedElements.get(element).stream;\n };\n /**\n * Un-observes the given element and cleans up the underlying MutationObserver if nobody else is\n * observing this element.\n */\n ContentObserver.prototype._unobserveElement = function (element) {\n if (this._observedElements.has(element)) {\n this._observedElements.get(element).count--;\n if (!this._observedElements.get(element).count) {\n this._cleanupObserver(element);\n }\n }\n };\n /** Clean up the underlying MutationObserver for the specified element. */\n ContentObserver.prototype._cleanupObserver = function (element) {\n if (this._observedElements.has(element)) {\n var _a = this._observedElements.get(element), observer = _a.observer, stream = _a.stream;\n if (observer) {\n observer.disconnect();\n }\n stream.complete();\n this._observedElements.delete(element);\n }\n };\n ContentObserver.ɵprov = i0.ɵɵdefineInjectable({ factory: function ContentObserver_Factory() { return new ContentObserver(i0.ɵɵinject(MutationObserverFactory)); }, token: ContentObserver, providedIn: \"root\" });\n ContentObserver.decorators = [\n { type: i0.Injectable, args: [{ providedIn: 'root' },] }\n ];\n ContentObserver.ctorParameters = function () { return [\n { type: MutationObserverFactory }\n ]; };\n return ContentObserver;\n }());\n /**\n * Directive that triggers a callback whenever the content of\n * its associated element has changed.\n */\n var CdkObserveContent = /** @class */ (function () {\n function CdkObserveContent(_contentObserver, _elementRef, _ngZone) {\n this._contentObserver = _contentObserver;\n this._elementRef = _elementRef;\n this._ngZone = _ngZone;\n /** Event emitted for each change in the element's content. */\n this.event = new i0.EventEmitter();\n this._disabled = false;\n this._currentSubscription = null;\n }\n Object.defineProperty(CdkObserveContent.prototype, \"disabled\", {\n /**\n * Whether observing content is disabled. This option can be used\n * to disconnect the underlying MutationObserver until it is needed.\n */\n get: function () { return this._disabled; },\n set: function (value) {\n this._disabled = coercion.coerceBooleanProperty(value);\n this._disabled ? this._unsubscribe() : this._subscribe();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CdkObserveContent.prototype, \"debounce\", {\n /** Debounce interval for emitting the changes. */\n get: function () { return this._debounce; },\n set: function (value) {\n this._debounce = coercion.coerceNumberProperty(value);\n this._subscribe();\n },\n enumerable: false,\n configurable: true\n });\n CdkObserveContent.prototype.ngAfterContentInit = function () {\n if (!this._currentSubscription && !this.disabled) {\n this._subscribe();\n }\n };\n CdkObserveContent.prototype.ngOnDestroy = function () {\n this._unsubscribe();\n };\n CdkObserveContent.prototype._subscribe = function () {\n var _this = this;\n this._unsubscribe();\n var stream = this._contentObserver.observe(this._elementRef);\n // TODO(mmalerba): We shouldn't be emitting on this @Output() outside the zone.\n // Consider brining it back inside the zone next time we're making breaking changes.\n // Bringing it back inside can cause things like infinite change detection loops and changed\n // after checked errors if people's code isn't handling it properly.\n this._ngZone.runOutsideAngular(function () {\n _this._currentSubscription =\n (_this.debounce ? stream.pipe(operators.debounceTime(_this.debounce)) : stream).subscribe(_this.event);\n });\n };\n CdkObserveContent.prototype._unsubscribe = function () {\n if (this._currentSubscription) {\n this._currentSubscription.unsubscribe();\n }\n };\n CdkObserveContent.decorators = [\n { type: i0.Directive, args: [{\n selector: '[cdkObserveContent]',\n exportAs: 'cdkObserveContent',\n },] }\n ];\n CdkObserveContent.ctorParameters = function () { return [\n { type: ContentObserver },\n { type: i0.ElementRef },\n { type: i0.NgZone }\n ]; };\n CdkObserveContent.propDecorators = {\n event: [{ type: i0.Output, args: ['cdkObserveContent',] }],\n disabled: [{ type: i0.Input, args: ['cdkObserveContentDisabled',] }],\n debounce: [{ type: i0.Input }]\n };\n return CdkObserveContent;\n }());\n var ObserversModule = /** @class */ (function () {\n function ObserversModule() {\n }\n ObserversModule.decorators = [\n { type: i0.NgModule, args: [{\n exports: [CdkObserveContent],\n declarations: [CdkObserveContent],\n providers: [MutationObserverFactory]\n },] }\n ];\n return ObserversModule;\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.CdkObserveContent = CdkObserveContent;\n exports.ContentObserver = ContentObserver;\n exports.MutationObserverFactory = MutationObserverFactory;\n exports.ObserversModule = ObserversModule;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=cdk-observers.umd.js.map\n"]}
|
|
1
|
+
{"version":3,"sources":["src/cdk/cdk-observers.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","cdk","observers","coercion","core","rxjs","operators","this","i0","MutationObserverFactory","prototype","create","callback","MutationObserver","ɵprov","ɵɵdefineInjectable","MutationObserverFactory_Factory","token","providedIn","decorators","type","Injectable","args","ContentObserver","_mutationObserverFactory","_observedElements","Map","ngOnDestroy","_this","forEach","_","element","_cleanupObserver","observe","elementOrRef","coerceElement","Observable","observer","subscription","_observeElement","subscribe","unsubscribe","_unobserveElement","has","get","count","stream_1","Subject","mutations","next","characterData","childList","subtree","set","stream","_a","disconnect","complete","delete","ContentObserver_Factory","ɵɵinject","ctorParameters","ObserversModule","CdkObserveContent","_contentObserver","_elementRef","_ngZone","event","EventEmitter","_disabled","_currentSubscription","Object","defineProperty","value","coerceBooleanProperty","_unsubscribe","_subscribe","enumerable","configurable","_debounce","coerceNumberProperty","ngAfterContentInit","disabled","runOutsideAngular","debounce","pipe","debounceTime","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AUiE,aAAe,WACnCpE,KAAK+D,sBACL/D,KAAK+D,qBAAqB7B,eAG3BsB,EA3D2B,GA6DtCA,EAAkB5C,WAAa,CAC3B,CAAEC,KAAMZ,EAAG+E,UAAWjE,KAAM,CAAC,CACjBkE,SAAU,sBACVC,SAAU,wBAG1B1B,EAAkBF,eAAiB,WAAc,MAAO,CACpD,CAAEzC,KAAMG,GACR,CAAEH,KAAMZ,EAAGkF,YACX,CAAEtE,KAAMZ,EAAGmF,UAEf5B,EAAkB6B,eAAiB,CAC/BzB,MAAO,CAAC,CAAE/C,KAAMZ,EAAGqF,OAAQvE,KAAM,CAAC,uBAClC4D,SAAU,CAAC,CAAE9D,KAAMZ,EAAGsF,MAAOxE,KAAM,CAAC,+BACpC8D,SAAU,CAAC,CAAEhE,KAAMZ,EAAGsF,UAEtBhC,EACA,SAASA,OAIG3C,WAAa,CACzB,CAAEC,KAAMZ,EAAGuF,SAAUzE,KAAM,CAAC,CAChB5B,QAAS,CAACqE,GACViC,aAAc,CAACjC,GACfkC,UAAW,CAACxF;;;;;;;;AAgB5Bf,EAAQqE,kBAAoBA,EAC5BrE,EAAQ6B,gBAAkBA,EAC1B7B,EAAQe,wBAA0BA,EAClCf,EAAQoE,gBAAkBA,EAE1BS,OAAOC,eAAe9E,EAAS,aAAc,CAAE+E,OAAO","sourcesContent":["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/coercion'), require('@angular/core'), require('rxjs'), require('rxjs/operators')) :\n typeof define === 'function' && define.amd ? define('@angular/cdk/observers', ['exports', '@angular/cdk/coercion', '@angular/core', 'rxjs', 'rxjs/operators'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.observers = {}), global.ng.cdk.coercion, global.ng.core, global.rxjs, global.rxjs.operators));\n}(this, (function (exports, coercion, i0, 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 /**\n * Factory that creates a new MutationObserver and allows us to stub it out in unit tests.\n * @docs-private\n */\n var MutationObserverFactory = /** @class */ (function () {\n function MutationObserverFactory() {\n }\n MutationObserverFactory.prototype.create = function (callback) {\n return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback);\n };\n return MutationObserverFactory;\n }());\n MutationObserverFactory.ɵprov = i0.ɵɵdefineInjectable({ factory: function MutationObserverFactory_Factory() { return new MutationObserverFactory(); }, token: MutationObserverFactory, providedIn: \"root\" });\n MutationObserverFactory.decorators = [\n { type: i0.Injectable, args: [{ providedIn: 'root' },] }\n ];\n /** An injectable service that allows watching elements for changes to their content. */\n var ContentObserver = /** @class */ (function () {\n function ContentObserver(_mutationObserverFactory) {\n this._mutationObserverFactory = _mutationObserverFactory;\n /** Keeps track of the existing MutationObservers so they can be reused. */\n this._observedElements = new Map();\n }\n ContentObserver.prototype.ngOnDestroy = function () {\n var _this = this;\n this._observedElements.forEach(function (_, element) { return _this._cleanupObserver(element); });\n };\n ContentObserver.prototype.observe = function (elementOrRef) {\n var _this = this;\n var element = coercion.coerceElement(elementOrRef);\n return new rxjs.Observable(function (observer) {\n var stream = _this._observeElement(element);\n var subscription = stream.subscribe(observer);\n return function () {\n subscription.unsubscribe();\n _this._unobserveElement(element);\n };\n });\n };\n /**\n * Observes the given element by using the existing MutationObserver if available, or creating a\n * new one if not.\n */\n ContentObserver.prototype._observeElement = function (element) {\n if (!this._observedElements.has(element)) {\n var stream_1 = new rxjs.Subject();\n var observer = this._mutationObserverFactory.create(function (mutations) { return stream_1.next(mutations); });\n if (observer) {\n observer.observe(element, {\n characterData: true,\n childList: true,\n subtree: true\n });\n }\n this._observedElements.set(element, { observer: observer, stream: stream_1, count: 1 });\n }\n else {\n this._observedElements.get(element).count++;\n }\n return this._observedElements.get(element).stream;\n };\n /**\n * Un-observes the given element and cleans up the underlying MutationObserver if nobody else is\n * observing this element.\n */\n ContentObserver.prototype._unobserveElement = function (element) {\n if (this._observedElements.has(element)) {\n this._observedElements.get(element).count--;\n if (!this._observedElements.get(element).count) {\n this._cleanupObserver(element);\n }\n }\n };\n /** Clean up the underlying MutationObserver for the specified element. */\n ContentObserver.prototype._cleanupObserver = function (element) {\n if (this._observedElements.has(element)) {\n var _a = this._observedElements.get(element), observer = _a.observer, stream = _a.stream;\n if (observer) {\n observer.disconnect();\n }\n stream.complete();\n this._observedElements.delete(element);\n }\n };\n return ContentObserver;\n }());\n ContentObserver.ɵprov = i0.ɵɵdefineInjectable({ factory: function ContentObserver_Factory() { return new ContentObserver(i0.ɵɵinject(MutationObserverFactory)); }, token: ContentObserver, providedIn: \"root\" });\n ContentObserver.decorators = [\n { type: i0.Injectable, args: [{ providedIn: 'root' },] }\n ];\n ContentObserver.ctorParameters = function () { return [\n { type: MutationObserverFactory }\n ]; };\n /**\n * Directive that triggers a callback whenever the content of\n * its associated element has changed.\n */\n var CdkObserveContent = /** @class */ (function () {\n function CdkObserveContent(_contentObserver, _elementRef, _ngZone) {\n this._contentObserver = _contentObserver;\n this._elementRef = _elementRef;\n this._ngZone = _ngZone;\n /** Event emitted for each change in the element's content. */\n this.event = new i0.EventEmitter();\n this._disabled = false;\n this._currentSubscription = null;\n }\n Object.defineProperty(CdkObserveContent.prototype, \"disabled\", {\n /**\n * Whether observing content is disabled. This option can be used\n * to disconnect the underlying MutationObserver until it is needed.\n */\n get: function () { return this._disabled; },\n set: function (value) {\n this._disabled = coercion.coerceBooleanProperty(value);\n this._disabled ? this._unsubscribe() : this._subscribe();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CdkObserveContent.prototype, \"debounce\", {\n /** Debounce interval for emitting the changes. */\n get: function () { return this._debounce; },\n set: function (value) {\n this._debounce = coercion.coerceNumberProperty(value);\n this._subscribe();\n },\n enumerable: false,\n configurable: true\n });\n CdkObserveContent.prototype.ngAfterContentInit = function () {\n if (!this._currentSubscription && !this.disabled) {\n this._subscribe();\n }\n };\n CdkObserveContent.prototype.ngOnDestroy = function () {\n this._unsubscribe();\n };\n CdkObserveContent.prototype._subscribe = function () {\n var _this = this;\n this._unsubscribe();\n var stream = this._contentObserver.observe(this._elementRef);\n // TODO(mmalerba): We shouldn't be emitting on this @Output() outside the zone.\n // Consider brining it back inside the zone next time we're making breaking changes.\n // Bringing it back inside can cause things like infinite change detection loops and changed\n // after checked errors if people's code isn't handling it properly.\n this._ngZone.runOutsideAngular(function () {\n _this._currentSubscription =\n (_this.debounce ? stream.pipe(operators.debounceTime(_this.debounce)) : stream).subscribe(_this.event);\n });\n };\n CdkObserveContent.prototype._unsubscribe = function () {\n if (this._currentSubscription) {\n this._currentSubscription.unsubscribe();\n }\n };\n return CdkObserveContent;\n }());\n CdkObserveContent.decorators = [\n { type: i0.Directive, args: [{\n selector: '[cdkObserveContent]',\n exportAs: 'cdkObserveContent',\n },] }\n ];\n CdkObserveContent.ctorParameters = function () { return [\n { type: ContentObserver },\n { type: i0.ElementRef },\n { type: i0.NgZone }\n ]; };\n CdkObserveContent.propDecorators = {\n event: [{ type: i0.Output, args: ['cdkObserveContent',] }],\n disabled: [{ type: i0.Input, args: ['cdkObserveContentDisabled',] }],\n debounce: [{ type: i0.Input }]\n };\n var ObserversModule = /** @class */ (function () {\n function ObserversModule() {\n }\n return ObserversModule;\n }());\n ObserversModule.decorators = [\n { type: i0.NgModule, args: [{\n exports: [CdkObserveContent],\n declarations: [CdkObserveContent],\n providers: [MutationObserverFactory]\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\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.CdkObserveContent = CdkObserveContent;\n exports.ContentObserver = ContentObserver;\n exports.MutationObserverFactory = MutationObserverFactory;\n exports.ObserversModule = ObserversModule;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=cdk-observers.umd.js.map\n"]}
|