Icard/angular-clarity-master(work.../node_modules/@angular/cdk/fesm2022/scrolling.mjs.map

1 line
114 KiB
Plaintext
Raw Normal View History

2024-07-16 14:55:36 +00:00
{"version":3,"file":"scrolling.mjs","sources":["../../../../../../src/cdk/scrolling/virtual-scroll-strategy.ts","../../../../../../src/cdk/scrolling/fixed-size-virtual-scroll.ts","../../../../../../src/cdk/scrolling/scroll-dispatcher.ts","../../../../../../src/cdk/scrolling/scrollable.ts","../../../../../../src/cdk/scrolling/viewport-ruler.ts","../../../../../../src/cdk/scrolling/virtual-scrollable.ts","../../../../../../src/cdk/scrolling/virtual-scroll-viewport.ts","../../../../../../src/cdk/scrolling/virtual-scroll-viewport.html","../../../../../../src/cdk/scrolling/virtual-for-of.ts","../../../../../../src/cdk/scrolling/virtual-scrollable-element.ts","../../../../../../src/cdk/scrolling/virtual-scrollable-window.ts","../../../../../../src/cdk/scrolling/scrolling-module.ts","../../../../../../src/cdk/scrolling/scrolling_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport type {CdkVirtualScrollViewport} from './virtual-scroll-viewport';\n\n/** The injection token used to specify the virtual scrolling strategy. */\nexport const VIRTUAL_SCROLL_STRATEGY = new InjectionToken<VirtualScrollStrategy>(\n 'VIRTUAL_SCROLL_STRATEGY',\n);\n\n/** A strategy that dictates which items should be rendered in the viewport. */\nexport interface VirtualScrollStrategy {\n /** Emits when the index of the first element visible in the viewport changes. */\n scrolledIndexChange: Observable<number>;\n\n /**\n * Attaches this scroll strategy to a viewport.\n * @param viewport The viewport to attach this strategy to.\n */\n attach(viewport: CdkVirtualScrollViewport): void;\n\n /** Detaches this scroll strategy from the currently attached viewport. */\n detach(): void;\n\n /** Called when the viewport is scrolled (debounced using requestAnimationFrame). */\n onContentScrolled(): void;\n\n /** Called when the length of the data changes. */\n onDataLengthChanged(): void;\n\n /** Called when the range of items rendered in the DOM has changed. */\n onContentRendered(): void;\n\n /** Called when the offset of the rendered items changed. */\n onRenderedOffsetChanged(): void;\n\n /**\n * Scroll to the offset for the given index.\n * @param index The index of the element to scroll to.\n * @param behavior The ScrollBehavior to use when scrolling.\n */\n scrollToIndex(index: number, behavior: ScrollBehavior): void;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {Directive, forwardRef, Input, OnChanges} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\nimport {distinctUntilChanged} from 'rxjs/operators';\nimport {VIRTUAL_SCROLL_STRATEGY, VirtualScrollStrategy} from './virtual-scroll-strategy';\nimport {CdkVirtualScrollViewport} from './virtual-scroll-viewport';\n\n/** Virtual scrolling strategy for lists with items of known fixed size. */\nexport class FixedSizeVirtualScrollStrategy implements VirtualScrollStrategy {\n private readonly _scrolledIndexChange = new Subject<number>();\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n scrolledIndexChange: Observable<number> = this._scrolledIndexChange.pipe(distinctUntilChanged());\n\n /** The attached viewport. */\n private _viewport: CdkVirtualScrollViewport | null = null;\n\n /** The size of the items in the virtually scrolling list. */\n private _itemSize: number;\n\n /** The minimum amount of buffer rendered beyond the viewport (in pixels). */\n private _minBufferPx: number;\n\n /** The number of buffer items to render beyond the edge of the viewport (in pixels). */\n private _maxBufferPx: number;\n\n /