You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
159 KiB
8 lines
159 KiB
8 months ago
|
{
|
||
|
"version": 3,
|
||
|
"sources": ["../../../../../node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-cdk-resize-observer.mjs", "../../../../../node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-tabs.mjs"],
|
||
|
"sourcesContent": ["import * as i0 from '@angular/core';\nimport { Injectable, EventEmitter, Directive, Output, Input, NgModule } from '@angular/core';\nimport { __decorate } from 'tslib';\nimport { InputBoolean } from 'ng-zorro-antd/core/util';\nimport { coerceElement } from '@angular/cdk/coercion';\nimport { Observable, Subject } from 'rxjs';\n\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://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n/**\n * Factory that creates a new ResizeObserver and allows us to stub it out in unit tests.\n */\nclass NzResizeObserverFactory {\n create(callback) {\n return typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(callback);\n }\n static {\n this.ɵfac = function NzResizeObserverFactory_Factory(t) {\n return new (t || NzResizeObserverFactory)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: NzResizeObserverFactory,\n factory: NzResizeObserverFactory.ɵfac,\n providedIn: 'root'\n });\n }\n}\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(NzResizeObserverFactory, [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], null, null);\n})();\n/** An injectable service that allows watching elements for changes to their content. */\nclass NzResizeObserver {\n constructor(nzResizeObserverFactory) {\n this.nzResizeObserverFactory = nzResizeObserverFactory;\n /** Keeps track of the existing ResizeObservers so they can be reused. */\n this.observedElements = new Map();\n }\n ngOnDestroy() {\n this.observedElements.forEach((_, element) => this.cleanupObserver(element));\n }\n observe(elementOrRef) {\n const element = coerceElement(elementOrRef);\n return new Observable(observer => {\n const stream = this.observeElement(element);\n const subscription = stream.subscribe(observer);\n return () => {\n subscription.unsubscribe();\n this.unobserveElement(element);\n };\n });\n }\n /**\n * Observes the given element by using the existing ResizeObserver if available, or creating a\n * new one if not.\n */\n observeElement(element) {\n if (!this.observedElements.has(element)) {\n const stream = new Subject();\n const observer = this.nzResizeObserverFactory.create(mutations => stream.next(mutations));\n if (observer) {\n observer.observe(element);\n }\n this.observedElements.set(element, {\n observer,\n stream,\n 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 ResizeObserver if nobody else is\n * observing this element.\n */\n unobserveElement(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 ResizeObserver for the specified element. */\n cleanupObserver(element) {\n if (this.observedElements.has(element)) {\n const {\n observer,\n stream\n } = this.observedElements.get(element);\n if (observer) {\n observer.disconnect();\n }\n stream.complete();\n this.observedElements.delete(element);\n }\n }\n static {\n this.ɵfac = function NzResizeObserver_Factory(t) {\n return new (t || NzResizeObserver)(i0.ɵɵinject(NzResizeObserverFactory));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: NzResizeObserver,\n factory: NzResizeObserver.ɵfac,\n providedIn: 'root'\n });\n }\n}\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(NzResizeObserver, [{\n type: Injectable,\n args: [{\n providedIn:
|
||
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAM,2BAAN,MAAM,yBAAwB;AAAA,EAC5B,OAAO,U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