/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { Directionality } from '@angular/cdk/bidi'; import { Directive, ElementRef, NgZone, Optional } from '@angular/core'; import { ScrollDispatcher } from './scroll-dispatcher'; import { CdkVirtualScrollable, VIRTUAL_SCROLLABLE } from './virtual-scrollable'; import * as i0 from "@angular/core"; import * as i1 from "./scroll-dispatcher"; import * as i2 from "@angular/cdk/bidi"; /** * Provides a virtual scrollable for the element it is attached to. */ export class CdkVirtualScrollableElement extends CdkVirtualScrollable { constructor(elementRef, scrollDispatcher, ngZone, dir) { super(elementRef, scrollDispatcher, ngZone, dir); } measureBoundingClientRectWithScrollOffset(from) { return (this.getElementRef().nativeElement.getBoundingClientRect()[from] - this.measureScrollOffset(from)); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkVirtualScrollableElement, deps: [{ token: i0.ElementRef }, { token: i1.ScrollDispatcher }, { token: i0.NgZone }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: CdkVirtualScrollableElement, isStandalone: true, selector: "[cdkVirtualScrollingElement]", host: { classAttribute: "cdk-virtual-scrollable" }, providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableElement }], usesInheritance: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkVirtualScrollableElement, decorators: [{ type: Directive, args: [{ selector: '[cdkVirtualScrollingElement]', providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableElement }], standalone: true, host: { 'class': 'cdk-virtual-scrollable', }, }] }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.ScrollDispatcher }, { type: i0.NgZone }, { type: i2.Directionality, decorators: [{ type: Optional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