@ahmedhfarag/ngx-virtual-scroller 4.0.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ahmedfharag-ngx-virtual-scroller.mjs","sources":["../../src/virtual-scroller.ts","../../src/ahmedfharag-ngx-virtual-scroller.ts"],"sourcesContent":["import {\n\tChangeDetectorRef,\n\tComponent,\n\tContentChild,\n\tElementRef,\n\tEventEmitter,\n\tInject,\n\tInput,\n\tNgZone,\n\tOnChanges,\n\tOnDestroy,\n\tOnInit,\n\tOptional,\n\tOutput,\n\tRenderer2,\n\tViewChild,\n } from '@angular/core';\n \n import { PLATFORM_ID } from '@angular/core';\n import { isPlatformServer } from '@angular/common';\n import { CommonModule } from '@angular/common';\n import * as tween from '@tweenjs/tween.js';\n \n export interface VirtualScrollerDefaultOptions {\n\tcheckResizeInterval: number;\n\tmodifyOverflowStyleOfParentScroll: boolean;\n\tresizeBypassRefreshThreshold: number;\n\tscrollAnimationTime: number;\n\tscrollDebounceTime: number;\n\tscrollThrottlingTime: number;\n\tscrollbarHeight?: number;\n\tscrollbarWidth?: number;\n\tstripedTable: boolean;\n }\n \n export function VIRTUAL_SCROLLER_DEFAULT_OPTIONS_FACTORY(): VirtualScrollerDefaultOptions {\n\treturn {\n\t checkResizeInterval: 1000,\n\t modifyOverflowStyleOfParentScroll: true,\n\t resizeBypassRefreshThreshold: 5,\n\t scrollAnimationTime: 750,\n\t scrollDebounceTime: 0,\n\t scrollThrottlingTime: 0,\n\t stripedTable: false\n\t};\n }\n \n export interface WrapGroupDimensions {\n\tmaxChildSizePerWrapGroup: WrapGroupDimension[];\n\tnumberOfKnownWrapGroupChildSizes: number;\n\tsumOfKnownWrapGroupChildHeights: number;\n\tsumOfKnownWrapGroupChildWidths: number;\n }\n \n export interface WrapGroupDimension {\n\tchildHeight: number;\n\tchildWidth: number;\n\titems: any[];\n }\n \n export interface IDimensions {\n\tchildHeight: number;\n\tchildWidth: number;\n\titemCount: number;\n\titemsPerPage: number;\n\titemsPerWrapGroup: number;\n\tmaxScrollPosition: number;\n\tpageCount_fractional: number;\n\tscrollLength: number;\n\tviewportLength: number;\n\twrapGroupsPerPage: number;\n }\n \n export interface IPageInfo {\n\tendIndex: number;\n\tendIndexWithBuffer: number;\n\tmaxScrollPosition: number;\n\tscrollEndPosition: number;\n\tscrollStartPosition: number;\n\tstartIndex: number;\n\tstartIndexWithBuffer: number;\n }\n \n export interface IViewport extends IPageInfo {\n\tpadding: number;\n\tscrollLength: number;\n }\n \n @Component({\n\tselector: 'virtual-scroller,[virtualScroller]',\n\tstandalone: true,\n\timports: [CommonModule],\n\texportAs: 'virtualScroller',\n\ttemplate: `\n\t <div class=\"total-padding\" #invisiblePadding></div>\n\t <div class=\"scrollable-content\" #content>\n\t\t<ng-content></ng-content>\n\t </div>\n\t`,\n\thost: {\n\t '[class.horizontal]': 'horizontal',\n\t '[class.vertical]': '!horizontal',\n\t '[class.selfScroll]': '!parentScroll',\n\t '[class.rtl]': 'RTL'\n\t},\n\tstyles: [`\n\t :host {\n\t\tposition: relative;\n\t\tdisplay: block;\n\t\t-webkit-overflow-scrolling: touch;\n\t }\n \n\t :host.horizontal.selfScroll {\n\t\toverflow-y: visible;\n\t\toverflow-x: auto;\n\t }\n \n\t :host.horizontal.selfScroll.rtl {\n\t\ttransform: scaleX(-1);\n\t }\n \n\t :host.vertical.selfScroll {\n\t\toverflow-y: auto;\n\t\toverflow-x: visible;\n\t }\n \n\t .scrollable-content {\n\t\ttop: 0;\n\t\tleft: 0;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tmax-width: 100vw;\n\t\tmax-height: 100vh;\n\t\tposition: absolute;\n\t }\n \n\t .scrollable-content ::ng-deep > * {\n\t\tbox-sizing: border-box;\n\t }\n \n\t :host.horizontal {\n\t\twhite-space: nowrap;\n\t }\n \n\t :host.horizontal .scrollable-content {\n\t\tdisplay: flex;\n\t }\n \n\t :host.horizontal .scrollable-content ::ng-deep > * {\n\t\tflex-shrink: 0;\n\t\tflex-grow: 0;\n\t\twhite-space: initial;\n\t }\n \n\t :host.horizontal.rtl .scrollable-content ::ng-deep > * {\n\t\ttransform: scaleX(-1);\n\t }\n \n\t .total-padding {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\theight: 1px;\n\t\twidth: 1px;\n\t\ttransform-origin: 0 0;\n\t\topacity: 0;\n\t }\n \n\t :host.horizontal .total-padding {\n\t\theight: 100%;\n\t }\n\t`]\n })\nexport class VirtualScrollerComponent implements OnInit, OnChanges, OnDestroy {\n\tpublic viewPortItems: any[];\n\tpublic window = window;\n\n\tpublic get viewPortInfo(): IPageInfo {\n\t\tlet pageInfo: IViewport = this.previousViewPort || <any>{};\n\t\treturn {\n\t\t\tstartIndex: pageInfo.startIndex || 0,\n\t\t\tendIndex: pageInfo.endIndex || 0,\n\t\t\tscrollStartPosition: pageInfo.scrollStartPosition || 0,\n\t\t\tscrollEndPosition: pageInfo.scrollEndPosition || 0,\n\t\t\tmaxScrollPosition: pageInfo.maxScrollPosition || 0,\n\t\t\tstartIndexWithBuffer: pageInfo.startIndexWithBuffer || 0,\n\t\t\tendIndexWithBuffer: pageInfo.endIndexWithBuffer || 0\n\t\t};\n\t}\n\n\t@Input()\n\tpublic executeRefreshOutsideAngularZone: boolean = false;\n\n\tprotected _enableUnequalChildrenSizes: boolean = false;\n\t@Input()\n\tpublic get enableUnequalChildrenSizes(): boolean {\n\t\treturn this._enableUnequalChildrenSizes;\n\t}\n\tpublic set enableUnequalChildrenSizes(value: boolean) {\n\t\tif (this._enableUnequalChildrenSizes === value) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._enableUnequalChildrenSizes = value;\n\t\tthis.minMeasuredChildWidth = undefined;\n\t\tthis.minMeasuredChildHeight = undefined;\n\t}\n\n\t@Input()\n\tpublic RTL: boolean = false;\n\n\t@Input()\n\tpublic useMarginInsteadOfTranslate: boolean = false;\n\n\t@Input()\n\tpublic modifyOverflowStyleOfParentScroll: boolean;\n\n\t@Input()\n\tpublic stripedTable: boolean;\n\n\t@Input()\n\tpublic scrollbarWidth: number;\n\n\t@Input()\n\tpublic scrollbarHeight: number;\n\n\t@Input()\n\tpublic childWidth: number;\n\n\t@Input()\n\tpublic childHeight: number;\n\n\t@Input()\n\tpublic ssrChildWidth: number;\n\n\t@Input()\n\tpublic ssrChildHeight: number;\n\n\t@Input()\n\tpublic ssrViewportWidth: number = 1920;\n\n\t@Input()\n\tpublic ssrViewportHeight: number = 1080;\n\n\tprotected _bufferAmount: number;\n\t@Input()\n\tpublic get bufferAmount(): number {\n\t\tif (typeof (this._bufferAmount) === 'number' && this._bufferAmount >= 0) {\n\t\t\treturn this._bufferAmount;\n\t\t} else {\n\t\t\treturn this.enableUnequalChildrenSizes ? 5 : 0;\n\t\t}\n\t}\n\tpublic set bufferAmount(value: number) {\n\t\tthis._bufferAmount = value;\n\t}\n\n\t@Input()\n\tpublic scrollAnimationTime: number;\n\n\t@Input()\n\tpublic resizeBypassRefreshThreshold: number;\n\n\tprotected _scrollThrottlingTime: number;\n\t@Input()\n\tpublic get scrollThrottlingTime(): number {\n\t\treturn this._scrollThrottlingTime;\n\t}\n\tpublic set scrollThrottlingTime(value: number) {\n\t\tthis._scrollThrottlingTime = value;\n\t\tthis.updateOnScrollFunction();\n\t}\n\n\tprotected _scrollDebounceTime: number;\n\t@Input()\n\tpublic get scrollDebounceTime(): number {\n\t\treturn this._scrollDebounceTime;\n\t}\n\tpublic set scrollDebounceTime(value: number) {\n\t\tthis._scrollDebounceTime = value;\n\t\tthis.updateOnScrollFunction();\n\t}\n\n\tprotected onScroll: () => void;\n\tprotected updateOnScrollFunction(): void {\n\t\tif (this.scrollDebounceTime) {\n\t\t\tthis.onScroll = <any>this.debounce(() => {\n\t\t\t\tthis.refresh_internal(false);\n\t\t\t}, this.scrollDebounceTime);\n\t\t}\n\t\telse if (this.scrollThrottlingTime) {\n\t\t\tthis.onScroll = <any>this.throttleTrailing(() => {\n\t\t\t\tthis.refresh_internal(false);\n\t\t\t}, this.scrollThrottlingTime);\n\t\t}\n\t\telse {\n\t\t\tthis.onScroll = () => {\n\t\t\t\tthis.refresh_internal(false);\n\t\t\t};\n\t\t}\n\t}\n\n\tprotected checkScrollElementResizedTimer: number;\n\tprotected _checkResizeInterval: number;\n\t@Input()\n\tpublic get checkResizeInterval(): number {\n\t\treturn this._checkResizeInterval;\n\t}\n\tpublic set checkResizeInterval(value: number) {\n\t\tif (this._checkResizeInterval === value) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._checkResizeInterval = value;\n\t\tthis.addScrollEventHandlers();\n\t}\n\n\tprotected _items: any[] = [];\n\t@Input()\n\tpublic get items(): any[] {\n\t\treturn this._items;\n\t}\n\tpublic set items(value: any[]) {\n\t\tif (value === this._items) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._items = value || [];\n\t\tthis.refresh_internal(true);\n\t}\n\n\t@Input()\n\tpublic compareItems: (item1: any, item2: any) => boolean = (item1: any, item2: any) => item1 === item2;\n\n\tprotected _horizontal: boolean;\n\t@Input()\n\tpublic get horizontal(): boolean {\n\t\treturn this._horizontal;\n\t}\n\tpublic set horizontal(value: boolean) {\n\t\tthis._horizontal = value;\n\t\tthis.updateDirection();\n\t}\n\n\tprotected revertParentOverscroll(): void {\n\t\tconst scrollElement = this.getScrollElement();\n\t\tif (scrollElement && this.oldParentScrollOverflow) {\n\t\t\tscrollElement.style['overflow-y'] = this.oldParentScrollOverflow.y;\n\t\t\tscrollElement.style['overflow-x'] = this.oldParentScrollOverflow.x;\n\t\t}\n\n\t\tthis.oldParentScrollOverflow = undefined;\n\t}\n\n\tprotected oldParentScrollOverflow: { x: string, y: string };\n\tprotected _parentScroll: Element | Window;\n\t@Input()\n\tpublic get parentScroll(): Element | Window {\n\t\treturn this._parentScroll;\n\t}\n\tpublic set parentScroll(value: Element | Window) {\n\t\tif (this._parentScroll === value) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.revertParentOverscroll();\n\t\tthis._parentScroll = value;\n\t\tthis.addScrollEventHandlers();\n\n\t\tconst scrollElement = this.getScrollElement();\n\t\tif (this.modifyOverflowStyleOfParentScroll && scrollElement !== this.element.nativeElement) {\n\t\t\tthis.oldParentScrollOverflow = { x: scrollElement.style['overflow-x'], y: scrollElement.style['overflow-y'] };\n\t\t\tscrollElement.style['overflow-y'] = this.horizontal ? 'visible' : 'auto';\n\t\t\tscrollElement.style['overflow-x'] = this.horizontal ? 'auto' : 'visible';\n\t\t}\n\t}\n\n\t@Output()\n\tpublic vsUpdate: EventEmitter<any[]> = new EventEmitter<any[]>();\n\n\t@Output()\n\tpublic vsChange: EventEmitter<IPageInfo> = new EventEmitter<IPageInfo>();\n\n\t@Output()\n\tpublic vsStart: EventEmitter<IPageInfo> = new EventEmitter<IPageInfo>();\n\n\t@Output()\n\tpublic vsEnd: EventEmitter<IPageInfo> = new EventEmitter<IPageInfo>();\n\n\t@ViewChild('content', { read: ElementRef, static: true })\n\tprotected contentElementRef: ElementRef;\n\n\t@ViewChild('invisiblePadding', { read: ElementRef, static: true })\n\tprotected invisiblePaddingElementRef: ElementRef;\n\n\t@ContentChild('header', { read: ElementRef, static: false })\n\tprotected headerElementRef: ElementRef;\n\n\t@ContentChild('container', { read: ElementRef, static: false })\n\tprotected containerElementRef: ElementRef;\n\n\tpublic ngOnInit(): void {\n\t\tthis.addScrollEventHandlers();\n\t}\n\n\tpublic ngOnDestroy(): void {\n\t\tthis.removeScrollEventHandlers();\n\t\tthis.revertParentOverscroll();\n\t}\n\n\tpublic ngOnChanges(changes: any): void {\n\t\tlet indexLengthChanged = this.cachedItemsLength !== this.items.length;\n\t\tthis.cachedItemsLength = this.items.length;\n\n\t\tconst firstRun: boolean = !changes.items || !changes.items.previousValue || changes.items.previousValue.length === 0;\n\t\tthis.refresh_internal(indexLengthChanged || firstRun);\n\t}\n\n\tpublic ngDoCheck(): void {\n\t\tif (this.cachedItemsLength !== this.items.length) {\n\t\t\tthis.cachedItemsLength = this.items.length;\n\t\t\tthis.refresh_internal(true);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.previousViewPort && this.viewPortItems && this.viewPortItems.length > 0) {\n\t\t\tlet itemsArrayChanged = false;\n\t\t\tfor (let i = 0; i < this.viewPortItems.length; ++i) {\n\t\t\t\tif (!this.compareItems(this.items[this.previousViewPort.startIndexWithBuffer + i], this.viewPortItems[i])) {\n\t\t\t\t\titemsArrayChanged = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (itemsArrayChanged) {\n\t\t\t\tthis.refresh_internal(true);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic refresh(): void {\n\t\tthis.refresh_internal(true);\n\t}\n\n\tpublic invalidateAllCachedMeasurements(): void {\n\t\tthis.wrapGroupDimensions = {\n\t\t\tmaxChildSizePerWrapGroup: [],\n\t\t\tnumberOfKnownWrapGroupChildSizes: 0,\n\t\t\tsumOfKnownWrapGroupChildWidths: 0,\n\t\t\tsumOfKnownWrapGroupChildHeights: 0\n\t\t};\n\n\t\tthis.minMeasuredChildWidth = undefined;\n\t\tthis.minMeasuredChildHeight = undefined;\n\n\t\tthis.refresh_internal(false);\n\t}\n\n\tpublic invalidateCachedMeasurementForItem(item: any): void {\n\t\tif (this.enableUnequalChildrenSizes) {\n\t\t\tlet index = this.items && this.items.indexOf(item);\n\t\t\tif (index >= 0) {\n\t\t\t\tthis.invalidateCachedMeasurementAtIndex(index);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.minMeasuredChildWidth = undefined;\n\t\t\tthis.minMeasuredChildHeight = undefined;\n\t\t}\n\n\t\tthis.refresh_internal(false);\n\t}\n\n\tpublic invalidateCachedMeasurementAtIndex(index: number): void {\n\t\tif (this.enableUnequalChildrenSizes) {\n\t\t\tlet cachedMeasurement = this.wrapGroupDimensions.maxChildSizePerWrapGroup[index];\n\t\t\tif (cachedMeasurement) {\n\t\t\t\tthis.wrapGroupDimensions.maxChildSizePerWrapGroup[index] = undefined;\n\t\t\t\t--this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;\n\t\t\t\tthis.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths -= cachedMeasurement.childWidth || 0;\n\t\t\t\tthis.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights -= cachedMeasurement.childHeight || 0;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.minMeasuredChildWidth = undefined;\n\t\t\tthis.minMeasuredChildHeight = undefined;\n\t\t}\n\n\t\tthis.refresh_internal(false);\n\t}\n\n\tpublic scrollInto(item: any, alignToBeginning: boolean = true, additionalOffset: number = 0, animationMilliseconds: number = undefined, animationCompletedCallback: () => void = undefined): void {\n\t\tlet index: number = this.items.indexOf(item);\n\t\tif (index === -1) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.scrollToIndex(index, alignToBeginning, additionalOffset, animationMilliseconds, animationCompletedCallback);\n\t}\n\n\tpublic scrollToIndex(index: number, alignToBeginning: boolean = true, additionalOffset: number = 0, animationMilliseconds: number = undefined, animationCompletedCallback: () => void = undefined): void {\n\t\tlet maxRetries: number = 5;\n\n\t\tlet retryIfNeeded = () => {\n\t\t\t--maxRetries;\n\t\t\tif (maxRetries <= 0) {\n\t\t\t\tif (animationCompletedCallback) {\n\t\t\t\t\tanimationCompletedCallback();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet dimensions = this.calculateDimensions();\n\t\t\tlet desiredStartIndex = Math.min(Math.max(index, 0), dimensions.itemCount - 1);\n\t\t\tif (this.previousViewPort.startIndex === desiredStartIndex) {\n\t\t\t\tif (animationCompletedCallback) {\n\t\t\t\t\tanimationCompletedCallback();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.scrollToIndex_internal(index, alignToBeginning, additionalOffset, 0, retryIfNeeded);\n\t\t};\n\n\t\tthis.scrollToIndex_internal(index, alignToBeginning, additionalOffset, animationMilliseconds, retryIfNeeded);\n\t}\n\n\tprotected scrollToIndex_internal(index: number, alignToBeginning: boolean = true, additionalOffset: number = 0, animationMilliseconds: number = undefined, animationCompletedCallback: () => void = undefined): void {\n\t\tanimationMilliseconds = animationMilliseconds === undefined ? this.scrollAnimationTime : animationMilliseconds;\n\n\t\tlet dimensions = this.calculateDimensions();\n\t\tlet scroll = this.calculatePadding(index, dimensions) + additionalOffset;\n\t\tif (!alignToBeginning) {\n\t\t\tscroll -= dimensions.wrapGroupsPerPage * dimensions[this._childScrollDim];\n\t\t}\n\n\t\tthis.scrollToPosition(scroll, animationMilliseconds, animationCompletedCallback);\n\t}\n\n\tpublic scrollToPosition(scrollPosition: number, animationMilliseconds: number = undefined, animationCompletedCallback: () => void = undefined): void {\n\t\tscrollPosition += this.getElementsOffset();\n\n\t\tanimationMilliseconds = animationMilliseconds === undefined ? this.scrollAnimationTime : animationMilliseconds;\n\n\t\tlet scrollElement = this.getScrollElement();\n\n\t\tlet animationRequest: number;\n\n\t\tif (this.currentTween) {\n\t\t\tthis.currentTween.stop();\n\t\t\tthis.currentTween = undefined;\n\t\t}\n\n\t\tif (!animationMilliseconds) {\n\t\t\tthis.renderer.setProperty(scrollElement, this._scrollType, scrollPosition);\n\t\t\tthis.refresh_internal(false, animationCompletedCallback);\n\t\t\treturn;\n\t\t}\n\n\t\tconst tweenConfigObj = { scrollPosition: scrollElement[this._scrollType] };\n\n\t\tlet newTween = new tween.Tween(tweenConfigObj)\n\t\t\t.to({ scrollPosition }, animationMilliseconds)\n\t\t\t.easing(tween.Easing.Quadratic.Out)\n\t\t\t.onUpdate((data) => {\n\t\t\t\tif (isNaN(data.scrollPosition)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.renderer.setProperty(scrollElement, this._scrollType, data.scrollPosition);\n\t\t\t\tthis.refresh_internal(false);\n\t\t\t})\n\t\t\t.onStop(() => {\n\t\t\t\tcancelAnimationFrame(animationRequest);\n\t\t\t})\n\t\t\t.start();\n\n\t\tconst animate = (time?: number) => {\n\t\t\tif (!newTween[\"isPlaying\"]()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tnewTween.update(time);\n\t\t\tif (tweenConfigObj.scrollPosition === scrollPosition) {\n\t\t\t\tthis.refresh_internal(false, animationCompletedCallback);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.zone.runOutsideAngular(() => {\n\t\t\t\tanimationRequest = requestAnimationFrame(animate);\n\t\t\t});\n\t\t};\n\n\t\tanimate();\n\t\tthis.currentTween = newTween;\n\t}\n\n\tprotected isAngularUniversalSSR: boolean;\n\n\tconstructor(\n\t\tprotected readonly element: ElementRef,\n\t\tprotected readonly renderer: Renderer2,\n\t\tprotected readonly zone: NgZone,\n\t\tprotected changeDetectorRef: ChangeDetectorRef,\n\t\t@Inject(PLATFORM_ID) platformId: Object,\n\t\t@Optional() @Inject('virtual-scroller-default-options')\n\t\toptions: VirtualScrollerDefaultOptions\n\t) {\n\n\t\tthis.isAngularUniversalSSR = isPlatformServer(platformId);\n\n\t\tthis.checkResizeInterval = options.checkResizeInterval;\n\t\tthis.modifyOverflowStyleOfParentScroll = options.modifyOverflowStyleOfParentScroll;\n\t\tthis.resizeBypassRefreshThreshold = options.resizeBypassRefreshThreshold;\n\t\tthis.scrollAnimationTime = options.scrollAnimationTime;\n\t\tthis.scrollDebounceTime = options.scrollDebounceTime;\n\t\tthis.scrollThrottlingTime = options.scrollThrottlingTime;\n\t\tthis.scrollbarHeight = options.scrollbarHeight;\n\t\tthis.scrollbarWidth = options.scrollbarWidth;\n\t\tthis.stripedTable = options.stripedTable;\n\n\t\tthis.horizontal = false;\n\t\tthis.resetWrapGroupDimensions();\n\t}\n\n\tprotected getElementSize(element: HTMLElement): DOMRect {\n\t\tconst result = element.getBoundingClientRect();\n\t\tconst styles = getComputedStyle(element);\n\t\tconst marginTop = parseInt(styles['margin-top'], 10) || 0;\n\t\tconst marginBottom = parseInt(styles['margin-bottom'], 10) || 0;\n\t\tconst marginLeft = parseInt(styles['margin-left'], 10) || 0;\n\t\tconst marginRight = parseInt(styles['margin-right'], 10) || 0;\n\t \n\t\treturn {\n\t\t x: result.left,\n\t\t y: result.top,\n\t\t top: result.top + marginTop,\n\t\t bottom: result.bottom + marginBottom,\n\t\t left: result.left + marginLeft,\n\t\t right: result.right + marginRight,\n\t\t width: result.width + marginLeft + marginRight,\n\t\t height: result.height + marginTop + marginBottom,\n\t\t toJSON: () => null\n\t\t} as DOMRect;\n\t }\n\n\tprotected previousScrollBoundingRect: ClientRect;\n\tprotected checkScrollElementResized(): void {\n\t\tlet boundingRect = this.getElementSize(this.getScrollElement());\n\n\t\tlet sizeChanged: boolean;\n\t\tif (!this.previousScrollBoundingRect) {\n\t\t\tsizeChanged = true;\n\t\t} else {\n\t\t\tlet widthChange = Math.abs(boundingRect.width - this.previousScrollBoundingRect.width);\n\t\t\tlet heightChange = Math.abs(boundingRect.height - this.previousScrollBoundingRect.height);\n\t\t\tsizeChanged = widthChange > this.resizeBypassRefreshThreshold || heightChange > this.resizeBypassRefreshThreshold;\n\t\t}\n\n\t\tif (sizeChanged) {\n\t\t\tthis.previousScrollBoundingRect = boundingRect;\n\t\t\tif (boundingRect.width > 0 && boundingRect.height > 0) {\n\t\t\t\tthis.refresh_internal(false);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected _invisiblePaddingProperty;\n\tprotected _offsetType;\n\tprotected _scrollType;\n\tprotected _pageOffsetType;\n\tprotected _childScrollDim;\n\tprotected _translateDir;\n\tprotected _marginDir;\n\tprotected updateDirection(): void {\n\t\tif (this.horizontal) {\n\t\t\tthis._childScrollDim = 'childWidth';\n\t\t\tthis._invisiblePaddingProperty = 'scaleX';\n\t\t\tthis._marginDir = 'margin-left';\n\t\t\tthis._offsetType = 'offsetLeft';\n\t\t\tthis._pageOffsetType = 'pageXOffset';\n\t\t\tthis._scrollType = 'scrollLeft';\n\t\t\tthis._translateDir = 'translateX';\n\t\t}\n\t\telse {\n\t\t\tthis._childScrollDim = 'childHeight';\n\t\t\tthis._invisiblePaddingProperty = 'scaleY';\n\t\t\tthis._marginDir = 'margin-top';\n\t\t\tthis._offsetType = 'offsetTop';\n\t\t\tthis._pageOffsetType = 'pageYOffset';\n\t\t\tthis._scrollType = 'scrollTop';\n\t\t\tthis._translateDir = 'translateY';\n\t\t}\n\t}\n\n\tprotected debounce(func: Function, wait: number): Function {\n\t\tconst throttled = this.throttleTrailing(func, wait);\n\t\tconst result = function () {\n\t\t\tthrottled['cancel']();\n\t\t\tthrottled.apply(this, arguments);\n\t\t};\n\t\tresult['cancel'] = function () {\n\t\t\tthrottled['cancel']();\n\t\t};\n\n\t\treturn result;\n\t}\n\n\tprotected throttleTrailing(func: Function, wait: number): Function {\n\t\tlet timeout = undefined;\n\t\tlet _arguments = arguments;\n\t\tconst result = function () {\n\t\t\tconst _this = this;\n\t\t\t_arguments = arguments\n\n\t\t\tif (timeout) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (wait <= 0) {\n\t\t\t\tfunc.apply(_this, _arguments);\n\t\t\t} else {\n\t\t\t\ttimeout = setTimeout(function () {\n\t\t\t\t\ttimeout = undefined;\n\t\t\t\t\tfunc.apply(_this, _arguments);\n\t\t\t\t}, wait);\n\t\t\t}\n\t\t};\n\t\tresult['cancel'] = function () {\n\t\t\tif (timeout) {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t\ttimeout = undefined;\n\t\t\t}\n\t\t};\n\n\t\treturn result;\n\t}\n\n\tprotected calculatedScrollbarWidth: number = 0;\n\tprotected calculatedScrollbarHeight: number = 0;\n\n\tprotected padding: number = 0;\n\tprotected previousViewPort: IViewport = <any>{};\n\tprotected currentTween: tween.Tween;\n\tprotected cachedItemsLength: number;\n\n\tprotected disposeScrollHandler: () => void | undefined;\n\tprotected disposeResizeHandler: () => void | undefined;\n\n\tprotected refresh_internal(itemsArrayModified: boolean, refreshCompletedCallback: () => void = undefined, maxRunTimes: number = 2): void {\n\t\t//note: maxRunTimes is to force it to keep recalculating if the previous iteration caused a re-render (different sliced items in viewport or scrollPosition changed).\n\t\t//The default of 2x max will probably be accurate enough without causing too large a performance bottleneck\n\t\t//The code would typically quit out on the 2nd iteration anyways. The main time it'd think more than 2 runs would be necessary would be for vastly different sized child items or if this is the 1st time the items array was initialized.\n\t\t//Without maxRunTimes, If the user is actively scrolling this code would become an infinite loop until they stopped scrolling. This would be okay, except each scroll event would start an additional infinte loop. We want to short-circuit it to prevent this.\n\n\t\tif (itemsArrayModified && this.previousViewPort && this.previousViewPort.scrollStartPosition > 0) {\n\t\t//if items were prepended, scroll forward to keep same items visible\n\t\t\tlet oldViewPort = this.previousViewPort;\n\t\t\tlet oldViewPortItems = this.viewPortItems;\n\n\t\t\tlet oldRefreshCompletedCallback = refreshCompletedCallback;\n\t\t\trefreshCompletedCallback = () => {\n\t\t\t\tlet scrollLengthDelta = this.previousViewPort.scrollLength - oldViewPort.scrollLength;\n\t\t\t\tif (scrollLengthDelta > 0 && this.viewPortItems) {\n\t\t\t\t\tlet oldStartItem = oldViewPortItems[0];\n\t\t\t\t\tlet oldStartItemIndex = this.items.findIndex(x => this.compareItems(oldStartItem, x));\n\t\t\t\t\tif (oldStartItemIndex > this.previousViewPort.startIndexWithBuffer) {\n\t\t\t\t\t\tlet itemOrderChanged = false;\n\t\t\t\t\t\tfor (let i = 1; i < this.viewPortItems.length; ++i) {\n\t\t\t\t\t\t\tif (!this.compareItems(this.items[oldStartItemIndex + i], oldViewPortItems[i])) {\n\t\t\t\t\t\t\t\titemOrderChanged = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!itemOrderChanged) {\n\t\t\t\t\t\t\tthis.scrollToPosition(this.previousViewPort.scrollStartPosition + scrollLengthDelta , 0, oldRefreshCompletedCallback);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (oldRefreshCompletedCallback) {\n\t\t\t\t\toldRefreshCompletedCallback();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tthis.zone.runOutsideAngular(() => {\n\t\t\trequestAnimationFrame(() => {\n\n\t\t\t\tif (itemsArrayModified) {\n\t\t\t\t\tthis.resetWrapGroupDimensions();\n\t\t\t\t}\n\t\t\t\tlet viewport = this.calculateViewport();\n\n\t\t\t\tlet startChanged = itemsArrayModified || viewport.startIndex !== this.previousViewPort.startIndex;\n\t\t\t\tlet endChanged = itemsArrayModified || viewport.endIndex !== this.previousViewPort.endIndex;\n\t\t\t\tlet scrollLengthChanged = viewport.scrollLength !== this.previousViewPort.scrollLength;\n\t\t\t\tlet paddingChanged = viewport.padding !== this.previousViewPort.padding;\n\t\t\t\tlet scrollPositionChanged = viewport.scrollStartPosition !== this.previousViewPort.scrollStartPosition || viewport.scrollEndPosition !== this.previousViewPort.scrollEndPosition || viewport.maxScrollPosition !== this.previousViewPort.maxScrollPosition;\n\n\t\t\t\tthis.previousViewPort = viewport;\n\n\t\t\t\tif (scrollLengthChanged) {\n \t\t\t\t\tthis.renderer.setStyle(this.invisiblePaddingElementRef.nativeElement, 'transform', `${this._invisiblePaddingProperty}(${viewport.scrollLength})`);\n \t\t\t\t\tthis.renderer.setStyle(this.invisiblePaddingElementRef.nativeElement, 'webkitTransform', `${this._invisiblePaddingProperty}(${viewport.scrollLength})`);\n\t\t\t\t}\n\n\t\t\t\tif (paddingChanged) {\n\t\t\t\t\tif (this.useMarginInsteadOfTranslate) {\n\t\t\t\t\t\tthis.renderer.setStyle(this.contentElementRef.nativeElement, this._marginDir, `${viewport.padding}px`);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.renderer.setStyle(this.contentElementRef.nativeElement, 'transform', `${this._translateDir}(${viewport.padding}px)`);\n\t\t\t\t\t\tthis.renderer.setStyle(this.contentElementRef.nativeElement, 'webkitTransform', `${this._translateDir}(${viewport.padding}px)`);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (this.headerElementRef) {\n\t\t\t\t\tlet scrollPosition = this.getScrollElement()[this._scrollType];\n\t\t\t\t\tlet containerOffset = this.getElementsOffset();\n\t\t\t\t\tlet offset = Math.max(scrollPosition - viewport.padding - containerOffset + this.headerElementRef.nativeElement.clientHeight, 0);\n\t\t\t\t\tthis.renderer.setStyle(this.headerElementRef.nativeElement, 'transform', `${this._translateDir}(${offset}px)`);\n\t\t\t\t\tthis.renderer.setStyle(this.headerElementRef.nativeElement, 'webkitTransform', `${this._translateDir}(${offset}px)`);\n\t\t\t\t}\n\n\t\t\t\tconst changeEventArg: IPageInfo = (startChanged || endChanged) ? {\n\t\t\t\t\tstartIndex: viewport.startIndex,\n\t\t\t\t\tendIndex: viewport.endIndex,\n\t\t\t\t\tscrollStartPosition: viewport.scrollStartPosition,\n\t\t\t\t\tscrollEndPosition: viewport.scrollEndPosition,\n\t\t\t\t\tstartIndexWithBuffer: viewport.startIndexWithBuffer,\n\t\t\t\t\tendIndexWithBuffer: viewport.endIndexWithBuffer,\n\t\t\t\t\tmaxScrollPosition: viewport.maxScrollPosition\n\t\t\t\t} : undefined;\n\n\n\t\t\t\tif (startChanged || endChanged || scrollPositionChanged) {\n\t\t\t\t\tconst handleChanged = () => {\n\t\t\t\t\t\t// update the scroll list to trigger re-render of components in viewport\n\t\t\t\t\t\tthis.viewPortItems = viewport.startIndexWithBuffer >= 0 && viewport.endIndexWithBuffer >= 0 ? this.items.slice(viewport.startIndexWithBuffer, viewport.endIndexWithBuffer + 1) : [];\n\t\t\t\t\t\tthis.vsUpdate.emit(this.viewPortItems);\n\n\t\t\t\t\t\tif (startChanged) {\n\t\t\t\t\t\t\tthis.vsStart.emit(changeEventArg);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (endChanged) {\n\t\t\t\t\t\t\tthis.vsEnd.emit(changeEventArg);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (startChanged || endChanged) {\n\t\t\t\t\t\t\tthis.changeDetectorRef.markForCheck();\n\t\t\t\t\t\t\tthis.vsChange.emit(changeEventArg);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (maxRunTimes > 0) {\n\t\t\t\t\t\t\tthis.refresh_internal(false, refreshCompletedCallback, maxRunTimes - 1);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (refreshCompletedCallback) {\n\t\t\t\t\t\t\trefreshCompletedCallback();\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\n\t\t\t\t\tif (this.executeRefreshOutsideAngularZone) {\n\t\t\t\t\t\thandleChanged();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.zone.run(handleChanged);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (maxRunTimes > 0 && (scrollLengthChanged || paddingChanged)) {\n\t\t\t\t\t\tthis.refresh_internal(false, refreshCompletedCallback, maxRunTimes - 1);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (refreshCompletedCallback) {\n\t\t\t\t\t\trefreshCompletedCallback();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\tprotected getScrollElement(): HTMLElement {\n\t\treturn this.parentScroll instanceof Window ? document.scrollingElement || document.documentElement || document.body : this.parentScroll || this.element.nativeElement;\n\t}\n\n\tprotected addScrollEventHandlers(): void {\n\t\tif (this.isAngularUniversalSSR) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet scrollElement = this.getScrollElement();\n\n\t\tthis.removeScrollEventHandlers();\n\n\t\tthis.zone.runOutsideAngular(() => {\n\t\t\tif (this.parentScroll instanceof Window) {\n\t\t\t\tthis.disposeScrollHandler = this.renderer.listen('window', 'scroll', this.onScroll);\n\t\t\t\tthis.disposeResizeHandler = this.renderer.listen('window', 'resize', this.onScroll);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.disposeScrollHandler = this.renderer.listen(scrollElement, 'scroll', this.onScroll);\n\t\t\t\tif (this._checkResizeInterval > 0) {\n\t\t\t\t\tthis.checkScrollElementResizedTimer = <any>setInterval(() => { this.checkScrollElementResized(); }, this._checkResizeInterval);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected removeScrollEventHandlers(): void {\n\t\tif (this.checkScrollElementResizedTimer) {\n\t\t\tclearInterval(this.checkScrollElementResizedTimer);\n\t\t}\n\n\t\tif (this.disposeScrollHandler) {\n\t\t\tthis.disposeScrollHandler();\n\t\t\tthis.disposeScrollHandler = undefined;\n\t\t}\n\n\t\tif (this.disposeResizeHandler) {\n\t\t\tthis.disposeResizeHandler();\n\t\t\tthis.disposeResizeHandler = undefined;\n\t\t}\n\t}\n\n\tprotected getElementsOffset(): number {\n\t\tif (this.isAngularUniversalSSR) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tlet offset = 0;\n\n\t\tif (this.containerElementRef && this.containerElementRef.nativeElement) {\n\t\t\toffset += this.containerElementRef.nativeElement[this._offsetType];\n\t\t}\n\n\t\tif (this.parentScroll) {\n\t\t\tlet scrollElement = this.getScrollElement();\n\t\t\tlet elementClientRect = this.getElementSize(this.element.nativeElement);\n\t\t\tlet scrollClientRect = this.getElementSize(scrollElement);\n\t\t\tif (this.horizontal) {\n\t\t\t\toffset += elementClientRect.left - scrollClientRect.left;\n\t\t\t}\n\t\t\telse {\n\t\t\t\toffset += elementClientRect.top - scrollClientRect.top;\n\t\t\t}\n\n\t\t\tif (!(this.parentScroll instanceof Window)) {\n\t\t\t\toffset += scrollElement[this._scrollType];\n\t\t\t}\n\t\t}\n\n\t\treturn offset;\n\t}\n\n\tprotected countItemsPerWrapGroup(): number {\n\t\tif (this.isAngularUniversalSSR) {\n\t\t\treturn Math.round(this.horizontal ? this.ssrViewportHeight / this.ssrChildHeight : this.ssrViewportWidth / this.ssrChildWidth);\n\t\t}\n\n\t\tlet propertyName = this.horizontal ? 'offsetLeft' : 'offsetTop';\n\t\tlet children = ((this.containerElementRef && this.containerElementRef.nativeElement) || this.contentElementRef.nativeElement).children;\n\n\t\tlet childrenLength = children ? children.length : 0;\n\t\tif (childrenLength === 0) {\n\t\t\treturn 1;\n\t\t}\n\n\t\tlet firstOffset = children[0][propertyName];\n\t\tlet result = 1;\n\t\twhile (result < childrenLength && firstOffset === children[result][propertyName]) {\n\t\t\t++result;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprotected getScrollStartPosition(): number {\n\t\tlet windowScrollValue = undefined;\n\t\tif (this.parentScroll instanceof Window) {\n\t\t\twindowScrollValue = window[this._pageOffsetType];\n\t\t}\n\n\t\treturn windowScrollValue || this.getScrollElement()[this._scrollType] || 0;\n\t}\n\n\tprotected minMeasuredChildWidth: number;\n\tprotected minMeasuredChildHeight: number;\n\n\tprotected wrapGroupDimensions: WrapGroupDimensions;\n\n\tprotected resetWrapGroupDimensions(): void {\n\t\tconst oldWrapGroupDimensions = this.wrapGroupDimensions;\n\t\tthis.invalidateAllCachedMeasurements();\n\n\t\tif (!this.enableUnequalChildrenSizes || !oldWrapGroupDimensions || oldWrapGroupDimensions.numberOfKnownWrapGroupChildSizes === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst itemsPerWrapGroup: number = this.countItemsPerWrapGroup();\n\t\tfor (let wrapGroupIndex = 0; wrapGroupIndex < oldWrapGroupDimensions.maxChildSizePerWrapGroup.length; ++wrapGroupIndex) {\n\t\t\tconst oldWrapGroupDimension: WrapGroupDimension = oldWrapGroupDimensions.maxChildSizePerWrapGroup[wrapGroupIndex];\n\t\t\tif (!oldWrapGroupDimension || !oldWrapGroupDimension.items || !oldWrapGroupDimension.items.length) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (oldWrapGroupDimension.items.length !== itemsPerWrapGroup) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet itemsChanged = false;\n\t\t\tlet arrayStartIndex = itemsPerWrapGroup * wrapGroupIndex;\n\t\t\tfor (let i = 0; i < itemsPerWrapGroup; ++i) {\n\t\t\t\tif (!this.compareItems(oldWrapGroupDimension.items[i], this.items[arrayStartIndex + i])) {\n\t\t\t\t\titemsChanged = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!itemsChanged) {\n\t\t\t\t++this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;\n\t\t\t\tthis.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths += oldWrapGroupDimension.childWidth || 0;\n\t\t\t\tthis.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights += oldWrapGroupDimension.childHeight || 0;\n\t\t\t\tthis.wrapGroupDimensions.maxChildSizePerWrapGroup[wrapGroupIndex] = oldWrapGroupDimension;\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected calculateDimensions(): IDimensions {\n\t\tlet scrollElement = this.getScrollElement();\n\n\t\tconst maxCalculatedScrollBarSize: number = 25; // Note: Formula to auto-calculate doesn't work for ParentScroll, so we default to this if not set by consuming application\n\t\tthis.calculatedScrollbarHeight = Math.max(Math.min(scrollElement.offsetHeight - scrollElement.clientHeight, maxCalculatedScrollBarSize), this.calculatedScrollbarHeight);\n\t\tthis.calculatedScrollbarWidth = Math.max(Math.min(scrollElement.offsetWidth - scrollElement.clientWidth, maxCalculatedScrollBarSize), this.calculatedScrollbarWidth);\n\n\t\tlet viewportWidth = scrollElement.offsetWidth - (this.scrollbarWidth || this.calculatedScrollbarWidth || (this.horizontal ? 0 : maxCalculatedScrollBarSize));\n\t\tlet viewportHeight = scrollElement.offsetHeight - (this.scrollbarHeight || this.calculatedScrollbarHeight || (this.horizontal ? maxCalculatedScrollBarSize : 0));\n\n\t\tlet content = (this.containerElementRef && this.containerElementRef.nativeElement) || this.contentElementRef.nativeElement;\n\n\t\tlet itemsPerWrapGroup = this.countItemsPerWrapGroup();\n\t\tlet wrapGroupsPerPage;\n\n\t\tlet defaultChildWidth;\n\t\tlet defaultChildHeight;\n\n\t\tif (this.isAngularUniversalSSR) {\n\t\t\tviewportWidth = this.ssrViewportWidth;\n\t\t\tviewportHeight = this.ssrViewportHeight;\n\t\t\tdefaultChildWidth = this.ssrChildWidth;\n\t\t\tdefaultChildHeight = this.ssrChildHeight;\n\t\t\tlet itemsPerRow = Math.max(Math.ceil(viewportWidth / defaultChildWidth), 1);\n\t\t\tlet itemsPerCol = Math.max(Math.ceil(viewportHeight / defaultChildHeight), 1);\n\t\t\twrapGroupsPerPage = this.horizontal ? itemsPerRow : itemsPerCol;\n\t\t}\n\t\telse if (!this.enableUnequalChildrenSizes) {\n\t\t\tif (content.children.length > 0) {\n\t\t\t\tif (!this.childWidth || !this.childHeight) {\n\t\t\t\t\tif (!this.minMeasuredChildWidth && viewportWidth > 0) {\n\t\t\t\t\t\tthis.minMeasuredChildWidth = viewportWidth;\n\t\t\t\t\t}\n\t\t\t\t\tif (!this.minMeasuredChildHeight && viewportHeight > 0) {\n\t\t\t\t\t\tthis.minMeasuredChildHeight = viewportHeight;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlet child = content.children[0];\n\t\t\t\tlet clientRect = this.getElementSize(child);\n\t\t\t\tthis.minMeasuredChildWidth = Math.min(this.minMeasuredChildWidth, clientRect.width);\n\t\t\t\tthis.minMeasuredChildHeight = Math.min(this.minMeasuredChildHeight, clientRect.height);\n\t\t\t}\n\n\t\t\tdefaultChildWidth = this.childWidth || this.minMeasuredChildWidth || viewportWidth;\n\t\t\tdefaultChildHeight = this.childHeight || this.minMeasuredChildHeight || viewportHeight;\n\t\t\tlet itemsPerRow = Math.max(Math.ceil(viewportWidth / defaultChildWidth), 1);\n\t\t\tlet itemsPerCol = Math.max(Math.ceil(viewportHeight / defaultChildHeight), 1);\n\t\t\twrapGroupsPerPage = this.horizontal ? itemsPerRow : itemsPerCol;\n\t\t} else {\n\t\t\tlet scrollOffset = scrollElement[this._scrollType] - (this.previousViewPort ? this.previousViewPort.padding : 0);\n\n\t\t\tlet arrayStartIndex = this.previousViewPort.startIndexWithBuffer || 0;\n\t\t\tlet wrapGroupIndex = Math.ceil(arrayStartIndex / itemsPerWrapGroup);\n\n\t\t\tlet maxWidthForWrapGroup = 0;\n\t\t\tlet maxHeightForWrapGroup = 0;\n\t\t\tlet sumOfVisibleMaxWidths = 0;\n\t\t\tlet sumOfVisibleMaxHeights = 0;\n\t\t\twrapGroupsPerPage = 0;\n\n\t\t\tfor (let i = 0; i < content.children.length; ++i) {\n\t\t\t\t++arrayStartIndex;\n\t\t\t\tlet child = content.children[i];\n\t\t\t\tlet clientRect = this.getElementSize(child);\n\n\t\t\t\tmaxWidthForWrapGroup = Math.max(maxWidthForWrapGroup, clientRect.width);\n\t\t\t\tmaxHeightForWrapGroup = Math.max(maxHeightForWrapGroup, clientRect.height);\n\n\t\t\t\tif (arrayStartIndex % itemsPerWrapGroup === 0) {\n\t\t\t\t\tlet oldValue = this.wrapGroupDimensions.maxChildSizePerWrapGroup[wrapGroupIndex];\n\t\t\t\t\tif (oldValue) {\n\t\t\t\t\t\t--this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;\n\t\t\t\t\t\tthis.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths -= oldValue.childWidth || 0;\n\t\t\t\t\t\tthis.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights -= oldValue.childHeight || 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t++this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;\n\t\t\t\t\tconst items = this.items.slice(arrayStartIndex - itemsPerWrapGroup, arrayStartIndex);\n\t\t\t\t\tthis.wrapGroupDimensions.maxChildSizePerWrapGroup[wrapGroupIndex] = {\n\t\t\t\t\t\tchildWidth: maxWidthForWrapGroup,\n\t\t\t\t\t\tchildHeight: maxHeightForWrapGroup,\n\t\t\t\t\t\titems: items\n\t\t\t\t\t};\n\t\t\t\t\tthis.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths += maxWidthForWrapGroup;\n\t\t\t\t\tthis.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights += maxHeightForWrapGroup;\n\n\t\t\t\t\tif (this.horizontal) {\n\t\t\t\t\t\tlet maxVisibleWidthForWrapGroup = Math.min(maxWidthForWrapGroup, Math.max(viewportWidth - sumOfVisibleMaxWidths, 0));\n\t\t\t\t\t\tif (scrollOffset > 0) {\n\t\t\t\t\t\t\tlet scrollOffsetToRemove = Math.min(scrollOffset, maxVisibleWidthForWrapGroup);\n\t\t\t\t\t\t\tmaxVisibleWidthForWrapGroup -= scrollOffsetToRemove;\n\t\t\t\t\t\t\tscrollOffset -= scrollOffsetToRemove;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsumOfVisibleMaxWidths += maxVisibleWidthForWrapGroup;\n\t\t\t\t\t\tif (maxVisibleWidthForWrapGroup > 0 && viewportWidth >= sumOfVisibleMaxWidths) {\n\t\t\t\t\t\t\t++wrapGroupsPerPage;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlet maxVisibleHeightForWrapGroup = Math.min(maxHeightForWrapGroup, Math.max(viewportHeight - sumOfVisibleMaxHeights, 0));\n\t\t\t\t\t\tif (scrollOffset > 0) {\n\t\t\t\t\t\t\tlet scrollOffsetToRemove = Math.min(scrollOffset, maxVisibleHeightForWrapGroup);\n\t\t\t\t\t\t\tmaxVisibleHeightForWrapGroup -= scrollOffsetToRemove;\n\t\t\t\t\t\t\tscrollOffset -= scrollOffsetToRemove;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsumOfVisibleMaxHeights += maxVisibleHeightForWrapGroup;\n\t\t\t\t\t\tif (maxVisibleHeightForWrapGroup > 0 && viewportHeight >= sumOfVisibleMaxHeights) {\n\t\t\t\t\t\t\t++wrapGroupsPerPage;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t++wrapGroupIndex;\n\n\t\t\t\t\tmaxWidthForWrapGroup = 0;\n\t\t\t\t\tmaxHeightForWrapGroup = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet averageChildWidth = this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths / this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;\n\t\t\tlet averageChildHeight = this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights / this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;\n\t\t\tdefaultChildWidth = this.childWidth || averageChildWidth || viewportWidth;\n\t\t\tdefaultChildHeight = this.childHeight || averageChildHeight || viewportHeight;\n\n\t\t\tif (this.horizontal) {\n\t\t\t\tif (viewportWidth > sumOfVisibleMaxWidths) {\n\t\t\t\t\twrapGroupsPerPage += Math.ceil((viewportWidth - sumOfVisibleMaxWidths) / defaultChildWidth);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (viewportHeight > sumOfVisibleMaxHeights) {\n\t\t\t\t\twrapGroupsPerPage += Math.ceil((viewportHeight - sumOfVisibleMaxHeights) / defaultChildHeight);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlet itemCount = this.items.length;\n\t\tlet itemsPerPage = itemsPerWrapGroup * wrapGroupsPerPage;\n\t\tlet pageCount_fractional = itemCount / itemsPerPage;\n\t\tlet numberOfWrapGroups = Math.ceil(itemCount / itemsPerWrapGroup);\n\n\t\tlet scrollLength = 0;\n\n\t\tlet defaultScrollLengthPerWrapGroup = this.horizontal ? defaultChildWidth : defaultChildHeight;\n\t\tif (this.enableUnequalChildrenSizes) {\n\t\t\tlet numUnknownChildSizes = 0;\n\t\t\tfor (let i = 0; i < numberOfWrapGroups; ++i) {\n\t\t\t\tlet childSize = this.wrapGroupDimensions.maxChildSizePerWrapGroup[i] && this.wrapGroupDimensions.maxChildSizePerWrapGroup[i][this._childScrollDim];\n\t\t\t\tif (childSize) {\n\t\t\t\t\tscrollLength += childSize;\n\t\t\t\t} else {\n\t\t\t\t\t++numUnknownChildSizes;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tscrollLength += Math.round(numUnknownChildSizes * defaultScrollLengthPerWrapGroup);\n\t\t} else {\n\t\t\tscrollLength = numberOfWrapGroups * defaultScrollLengthPerWrapGroup;\n\t\t}\n\n\t\tif (this.headerElementRef) {\n\t\t\tscrollLength += this.headerElementRef.nativeElement.clientHeight;\n\t\t}\n\n\t\tlet viewportLength = this.horizontal ? viewportWidth : viewportHeight;\n\t\tlet maxScrollPosition = Math.max(scrollLength - viewportLength, 0);\n\n\t\treturn {\n\t\t\tchildHeight: defaultChildHeight,\n\t\t\tchildWidth: defaultChildWidth,\n\t\t\titemCount: itemCount,\n\t\t\titemsPerPage: itemsPerPage,\n\t\t\titemsPerWrapGroup: itemsPerWrapGroup,\n\t\t\tmaxScrollPosition: maxScrollPosition,\n\t\t\tpageCount_fractional: pageCount_fractional,\n\t\t\tscrollLength: scrollLength,\n\t\t\tviewportLength: viewportLength,\n\t\t\twrapGroupsPerPage: wrapGroupsPerPage,\n\t\t};\n\t}\n\n\tprotected cachedPageSize: number = 0;\n\tprotected previousScrollNumberElements: number = 0;\n\n\tprotected calculatePadding(arrayStartIndexWithBuffer: number, dimensions: IDimensions): number {\n\t\tif (dimensions.itemCount === 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tlet defaultScrollLengthPerWrapGroup = dimensions[this._childScrollDim];\n\t\tlet startingWrapGroupIndex = Math.floor(arrayStartIndexWithBuffer / dimensions.itemsPerWrapGroup) || 0;\n\n\t\tif (!this.enableUnequalChildrenSizes) {\n\t\t\treturn defaultScrollLengthPerWrapGroup * startingWrapGroupIndex;\n\t\t}\n\n\t\tlet numUnknownChildSizes = 0;\n\t\tlet result = 0;\n\t\tfor (let i = 0; i < startingWrapGroupIndex; ++i) {\n\t\t\tlet childSize = this.wrapGroupDimensions.maxChildSizePerWrapGroup[i] && this.wrapGroupDimensions.maxChildSizePerWrapGroup[i][this._childScrollDim];\n\t\t\tif (childSize) {\n\t\t\t\tresult += childSize;\n\t\t\t} else {\n\t\t\t\t++numUnknownChildSizes;\n\t\t\t}\n\t\t}\n\t\tresult += Math.round(numUnknownChildSizes * defaultScrollLengthPerWrapGroup);\n\n\t\treturn result;\n\t}\n\n\tprotected calculatePageInfo(scrollPosition: number, dimensions: IDimensions): IPageInfo {\n\t\tlet scrollPercentage = 0;\n\t\tif (this.enableUnequalChildrenSizes) {\n\t\t\tconst numberOfWrapGroups = Math.ceil(dimensions.itemCount / dimensions.itemsPerWrapGroup);\n\t\t\tlet totalScrolledLength = 0;\n\t\t\tlet defaultScrollLengthPerWrapGroup = dimensions[this._childScrollDim];\n\t\t\tfor (let i = 0; i < numberOfWrapGroups; ++i) {\n\t\t\t\tlet childSize = this.wrapGroupDimensions.maxChildSizePerWrapGroup[i] && this.wrapGroupDimensions.maxChildSizePerWrapGroup[i][this._childScrollDim];\n\t\t\t\tif (childSize) {\n\t\t\t\t\ttotalScrolledLength += childSize;\n\t\t\t\t} else {\n\t\t\t\t\ttotalScrolledLength += defaultScrollLengthPerWrapGroup;\n\t\t\t\t}\n\n\t\t\t\tif (scrollPosition < totalScrolledLength) {\n\t\t\t\t\tscrollPercentage = i / numberOfWrapGroups;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tscrollPercentage = scrollPosition / dimensions.scrollLength;\n\t\t}\n\n\t\tlet startingArrayIndex_fractional = Math.min(Math.max(scrollPercentage * dimensions.pageCount_fractional, 0), dimensions.pageCount_fractional) * dimensions.itemsPerPage;\n\n\t\tlet maxStart = dimensions.itemCount - dimensions.itemsPerPage - 1;\n\t\tlet arrayStartIndex = Math.min(Math.floor(startingArrayIndex_fractional), maxStart);\n\t\tarrayStartIndex -= arrayStartIndex % dimensions.itemsPerWrapGroup; // round down to start of wrapGroup\n\n\t\tif (this.stripedTable) {\n\t\t\tlet bufferBoundary = 2 * dimensions.itemsPerWrapGroup;\n\t\t\tif (arrayStartIndex % bufferBoundary !== 0) {\n\t\t\t\tarrayStartIndex = Math.max(arrayStartIndex - arrayStartIndex % bufferBoundary, 0);\n\t\t\t}\n\t\t}\n\n\t\tlet arrayEndIndex = Math.ceil(startingArrayIndex_fractional) + dimensions.itemsPerPage - 1;\n\t\tlet endIndexWithinWrapGroup = (arrayEndIndex + 1) % dimensions.itemsPerWrapGroup;\n\t\tif (endIndexWithinWrapGroup > 0) {\n\t\t\tarrayEndIndex += dimensions.itemsPerWrapGroup - endIndexWithinWrapGroup; // round up to end of wrapGroup\n\t\t}\n\n\t\tif (isNaN(arrayStartIndex)) {\n\t\t\tarrayStartIndex = 0;\n\t\t}\n\t\tif (isNaN(arrayEndIndex)) {\n\t\t\tarrayEndIndex = 0;\n\t\t}\n\n\t\tarrayStartIndex = Math.min(Math.max(arrayStartIndex, 0), dimensions.itemCount - 1);\n\t\tarrayEndIndex = Math.min(Math.max(arrayEndIndex, 0), dimensions.itemCount - 1);\n\n\t\tlet bufferSize = this.bufferAmount * dimensions.itemsPerWrapGroup;\n\t\tlet startIndexWithBuffer = Math.min(Math.max(arrayStartIndex - bufferSize, 0), dimensions.itemCount - 1);\n\t\tlet endIndexWithBuffer = Math.min(Math.max(arrayEndIndex + bufferSize, 0), dimensions.itemCount - 1);\n\n\t\treturn {\n\t\t\tstartIndex: arrayStartIndex,\n\t\t\tendIndex: arrayEndIndex,\n\t\t\tstartIndexWithBuffer: startIndexWithBuffer,\n\t\t\tendIndexWithBuffer: endIndexWithBuffer,\n\t\t\tscrollStartPosition: scrollPosition,\n\t\t\tscrollEndPosition: scrollPosition + dimensions.viewportLength,\n\t\t\tmaxScrollPosition: dimensions.maxScrollPosition\n\t\t};\n\t}\n\n\tprotected calculateViewport(): IViewport {\n\t\tlet dimensions = this.calculateDimensions();\n\t\tlet offset = this.getElementsOffset();\n\n\t\tlet scrollStartPosition = this.getScrollStartPosition();\n\t\tif (scrollStartPosition > (dimensions.scrollLength + offset) && !(this.parentScroll instanceof Window)) {\n\t\t\tscrollStartPosition = dimensions.scrollLength;\n\t\t} else {\n\t\t\tscrollStartPosition -= offset;\n\t\t}\n\t\tscrollStartPosition = Math.max(0, scrollStartPosition);\n\n\t\tlet pageInfo = this.calculatePageInfo(scrollStartPosition, dimensions);\n\t\tlet newPadding = this.calculatePadding(pageInfo.startIndexWithBuffer, dimensions);\n\t\tlet newScrollLength = dimensions.scrollLength;\n\n\t\treturn {\n\t\t\tstartIndex: pageInfo.startIndex,\n\t\t\tendIndex: pageInfo.endIndex,\n\t\t\tstartIndexWithBuffer: pageInfo.startIndexWithBuffer,\n\t\t\tendIndexWithBuffer: pageInfo.endIndexWithBuffer,\n\t\t\tpadding: Math.round(newPadding),\n\t\t\tscrollLength: Math.round(newScrollLength),\n\t\t\tscrollStartPosition: pageInfo.scrollStartPosition,\n\t\t\tscrollEndPosition: pageInfo.scrollEndPosition,\n\t\t\tmaxScrollPosition: pageInfo.maxScrollPosition\n\t\t};\n\t}\n}\n\n\nexport class VirtualScrollerModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './virtual-scroller';\n"],"names":[],"mappings":";;;;;SAmCkB,wCAAwC,GAAA;IACzD,OAAO;AACL,QAAA,mBAAmB,EAAE,IAAI;AACzB,QAAA,iCAAiC,EAAE,IAAI;AACvC,QAAA,4BAA4B,EAAE,CAAC;AAC/B,QAAA,mBAAmB,EAAE,GAAG;AACxB,QAAA,kBAAkB,EAAE,CAAC;AACrB,QAAA,oBAAoB,EAAE,CAAC;AACvB,QAAA,YAAY,EAAE;KACf;AACA;MAgIW,wBAAwB,CAAA;AAuahB,IAAA,OAAA;AACA,IAAA,QAAA;AACA,IAAA,IAAA;AACT,IAAA,iBAAA;AAzaJ,IAAA,aAAa;IACb,MAAM,GAAG,MAAM;AAEtB,IAAA,IAAW,YAAY,GAAA;AACtB,QAAA,IAAI,QAAQ,GAAc,IAAI,CAAC,gBAAgB,IAAS,EAAE;QAC1D,OAAO;AACN,YAAA,UAAU,EAAE,QAAQ,CAAC,UAAU,IAAI,CAAC;AACpC,YAAA,QAAQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,CAAC;AAChC,YAAA,mBAAmB,EAAE,QA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lD,qBAAqB,CAAA;AAAI;;AC3zCtC;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@ahmedfharag/ngx-virtual-scroller" />
5
+ export * from './virtual-scroller';
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "./node_modules/ng-packagr/package.schema.json",
3
+ "name": "@ahmedhfarag/ngx-virtual-scroller",
4
+ "version": "4.0.3",
5
+ "description": "Angular module for virtual -infinite- list. Supports horizontal/vertical, variable heights, & multi-column",
6
+ "main": "dist/virtual-scroller.js",
7
+ "types": "dist/virtual-scroller.d.ts",
8
+ "sideEffects": true,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/rintoj/ngx-virtual-scroller.git"
12
+ },
13
+ "keywords": [
14
+ "virtual scroll",
15
+ "scroll",
16
+ "ngx",
17
+ "angular"
18
+ ],
19
+ "license": "MIT",
20
+ "peerDependencies": {
21
+ "@angular/core": "^19.1.0"
22
+ },
23
+ "module": "fesm2022/ahmedfharag-ngx-virtual-scroller.mjs",
24
+ "typings": "index.d.ts",
25
+ "exports": {
26
+ "./package.json": {
27
+ "default": "./package.json"
28
+ },
29
+ ".": {
30
+ "types": "./index.d.ts",
31
+ "default": "./fesm2022/ahmedfharag-ngx-virtual-scroller.mjs"
32
+ }
33
+ },
34
+ "dependencies": {
35
+ "tslib": "^2.3.0"
36
+ },
37
+ "scripts": {
38
+ "test": "npm whoami"
39
+ },
40
+ "author": "Ahmedhfarag",
41
+ "bugs": {
42
+ "url": "https://github.com/rintoj/ngx-virtual-scroller/issues"
43
+ },
44
+ "homepage": "https://github.com/rintoj/ngx-virtual-scroller#readme"
45
+ }
@@ -0,0 +1,172 @@
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnChanges, OnDestroy, OnInit, Renderer2 } from '@angular/core';
2
+ import * as tween from '@tweenjs/tween.js';
3
+ import * as i0 from "@angular/core";
4
+ export interface VirtualScrollerDefaultOptions {
5
+ checkResizeInterval: number;
6
+ modifyOverflowStyleOfParentScroll: boolean;
7
+ resizeBypassRefreshThreshold: number;
8
+ scrollAnimationTime: number;
9
+ scrollDebounceTime: number;
10
+ scrollThrottlingTime: number;
11
+ scrollbarHeight?: number;
12
+ scrollbarWidth?: number;
13
+ stripedTable: boolean;
14
+ }
15
+ export declare function VIRTUAL_SCROLLER_DEFAULT_OPTIONS_FACTORY(): VirtualScrollerDefaultOptions;
16
+ export interface WrapGroupDimensions {
17
+ maxChildSizePerWrapGroup: WrapGroupDimension[];
18
+ numberOfKnownWrapGroupChildSizes: number;
19
+ sumOfKnownWrapGroupChildHeights: number;
20
+ sumOfKnownWrapGroupChildWidths: number;
21
+ }
22
+ export interface WrapGroupDimension {
23
+ childHeight: number;
24
+ childWidth: number;
25
+ items: any[];
26
+ }
27
+ export interface IDimensions {
28
+ childHeight: number;
29
+ childWidth: number;
30
+ itemCount: number;
31
+ itemsPerPage: number;
32
+ itemsPerWrapGroup: number;
33
+ maxScrollPosition: number;
34
+ pageCount_fractional: number;
35
+ scrollLength: number;
36
+ viewportLength: number;
37
+ wrapGroupsPerPage: number;
38
+ }
39
+ export interface IPageInfo {
40
+ endIndex: number;
41
+ endIndexWithBuffer: number;
42
+ maxScrollPosition: number;
43
+ scrollEndPosition: number;
44
+ scrollStartPosition: number;
45
+ startIndex: number;
46
+ startIndexWithBuffer: number;
47
+ }
48
+ export interface IViewport extends IPageInfo {
49
+ padding: number;
50
+ scrollLength: number;
51
+ }
52
+ export declare class VirtualScrollerComponent implements OnInit, OnChanges, OnDestroy {
53
+ protected readonly element: ElementRef;
54
+ protected readonly renderer: Renderer2;
55
+ protected readonly zone: NgZone;
56
+ protected changeDetectorRef: ChangeDetectorRef;
57
+ viewPortItems: any[];
58
+ window: Window & typeof globalThis;
59
+ get viewPortInfo(): IPageInfo;
60
+ executeRefreshOutsideAngularZone: boolean;
61
+ protected _enableUnequalChildrenSizes: boolean;
62
+ get enableUnequalChildrenSizes(): boolean;
63
+ set enableUnequalChildrenSizes(value: boolean);
64
+ RTL: boolean;
65
+ useMarginInsteadOfTranslate: boolean;
66
+ modifyOverflowStyleOfParentScroll: boolean;
67
+ stripedTable: boolean;
68
+ scrollbarWidth: number;
69
+ scrollbarHeight: number;
70
+ childWidth: number;
71
+ childHeight: number;
72
+ ssrChildWidth: number;
73
+ ssrChildHeight: number;
74
+ ssrViewportWidth: number;
75
+ ssrViewportHeight: number;
76
+ protected _bufferAmount: number;
77
+ get bufferAmount(): number;
78
+ set bufferAmount(value: number);
79
+ scrollAnimationTime: number;
80
+ resizeBypassRefreshThreshold: number;
81
+ protected _scrollThrottlingTime: number;
82
+ get scrollThrottlingTime(): number;
83
+ set scrollThrottlingTime(value: number);
84
+ protected _scrollDebounceTime: number;
85
+ get scrollDebounceTime(): number;
86
+ set scrollDebounceTime(value: number);
87
+ protected onScroll: () => void;
88
+ protected updateOnScrollFunction(): void;
89
+ protected checkScrollElementResizedTimer: number;
90
+ protected _checkResizeInterval: number;
91
+ get checkResizeInterval(): number;
92
+ set checkResizeInterval(value: number);
93
+ protected _items: any[];
94
+ get items(): any[];
95
+ set items(value: any[]);
96
+ compareItems: (item1: any, item2: any) => boolean;
97
+ protected _horizontal: boolean;
98
+ get horizontal(): boolean;
99
+ set horizontal(value: boolean);
100
+ protected revertParentOverscroll(): void;
101
+ protected oldParentScrollOverflow: {
102
+ x: string;
103
+ y: string;
104
+ };
105
+ protected _parentScroll: Element | Window;
106
+ get parentScroll(): Element | Window;
107
+ set parentScroll(value: Element | Window);
108
+ vsUpdate: EventEmitter<any[]>;
109
+ vsChange: EventEmitter<IPageInfo>;
110
+ vsStart: EventEmitter<IPageInfo>;
111
+ vsEnd: EventEmitter<IPageInfo>;
112
+ protected contentElementRef: ElementRef;
113
+ protected invisiblePaddingElementRef: ElementRef;
114
+ protected headerElementRef: ElementRef;
115
+ protected containerElementRef: ElementRef;
116
+ ngOnInit(): void;
117
+ ngOnDestroy(): void;
118
+ ngOnChanges(changes: any): void;
119
+ ngDoCheck(): void;
120
+ refresh(): void;
121
+ invalidateAllCachedMeasurements(): void;
122
+ invalidateCachedMeasurementForItem(item: any): void;
123
+ invalidateCachedMeasurementAtIndex(index: number): void;
124
+ scrollInto(item: any, alignToBeginning?: boolean, additionalOffset?: number, animationMilliseconds?: number, animationCompletedCallback?: () => void): void;
125
+ scrollToIndex(index: number, alignToBeginning?: boolean, additionalOffset?: number, animationMilliseconds?: number, animationCompletedCallback?: () => void): void;
126
+ protected scrollToIndex_internal(index: number, alignToBeginning?: boolean, additionalOffset?: number, animationMilliseconds?: number, animationCompletedCallback?: () => void): void;
127
+ scrollToPosition(scrollPosition: number, animationMilliseconds?: number, animationCompletedCallback?: () => void): void;
128
+ protected isAngularUniversalSSR: boolean;
129
+ constructor(element: ElementRef, renderer: Renderer2, zone: NgZone, changeDetectorRef: ChangeDetectorRef, platformId: Object, options: VirtualScrollerDefaultOptions);
130
+ protected getElementSize(element: HTMLElement): DOMRect;
131
+ protected previousScrollBoundingRect: ClientRect;
132
+ protected checkScrollElementResized(): void;
133
+ protected _invisiblePaddingProperty: any;
134
+ protected _offsetType: any;
135
+ protected _scrollType: any;
136
+ protected _pageOffsetType: any;
137
+ protected _childScrollDim: any;
138
+ protected _translateDir: any;
139
+ protected _marginDir: any;
140
+ protected updateDirection(): void;
141
+ protected debounce(func: Function, wait: number): Function;
142
+ protected throttleTrailing(func: Function, wait: number): Function;
143
+ protected calculatedScrollbarWidth: number;
144
+ protected calculatedScrollbarHeight: number;
145
+ protected padding: number;
146
+ protected previousViewPort: IViewport;
147
+ protected currentTween: tween.Tween;
148
+ protected cachedItemsLength: number;
149
+ protected disposeScrollHandler: () => void | undefined;
150
+ protected disposeResizeHandler: () => void | undefined;
151
+ protected refresh_internal(itemsArrayModified: boolean, refreshCompletedCallback?: () => void, maxRunTimes?: number): void;
152
+ protected getScrollElement(): HTMLElement;
153
+ protected addScrollEventHandlers(): void;
154
+ protected removeScrollEventHandlers(): void;
155
+ protected getElementsOffset(): number;
156
+ protected countItemsPerWrapGroup(): number;
157
+ protected getScrollStartPosition(): number;
158
+ protected minMeasuredChildWidth: number;
159
+ protected minMeasuredChildHeight: number;
160
+ protected wrapGroupDimensions: WrapGroupDimensions;
161
+ protected resetWrapGroupDimensions(): void;
162
+ protected calculateDimensions(): IDimensions;
163
+ protected cachedPageSize: number;
164
+ protected previousScrollNumberElements: number;
165
+ protected calculatePadding(arrayStartIndexWithBuffer: number, dimensions: IDimensions): number;
166
+ protected calculatePageInfo(scrollPosition: number, dimensions: IDimensions): IPageInfo;
167
+ protected calculateViewport(): IViewport;
168
+ static ɵfac: i0.ɵɵFactoryDeclaration<VirtualScrollerComponent, [null, null, null, null, null, { optional: true; }]>;
169
+ static ɵcmp: i0.ɵɵComponentDeclaration<VirtualScrollerComponent, "virtual-scroller,[virtualScroller]", ["virtualScroller"], { "executeRefreshOutsideAngularZone": { "alias": "executeRefreshOutsideAngularZone"; "required": false; }; "enableUnequalChildrenSizes": { "alias": "enableUnequalChildrenSizes"; "required": false; }; "RTL": { "alias": "RTL"; "required": false; }; "useMarginInsteadOfTranslate": { "alias": "useMarginInsteadOfTranslate"; "required": false; }; "modifyOverflowStyleOfParentScroll": { "alias": "modifyOverflowStyleOfParentScroll"; "required": false; }; "stripedTable": { "alias": "stripedTable"; "required": false; }; "scrollbarWidth": { "alias": "scrollbarWidth"; "required": false; }; "scrollbarHeight": { "alias": "scrollbarHeight"; "required": false; }; "childWidth": { "alias": "childWidth"; "required": false; }; "childHeight": { "alias": "childHeight"; "required": false; }; "ssrChildWidth": { "alias": "ssrChildWidth"; "required": false; }; "ssrChildHeight": { "alias": "ssrChildHeight"; "required": false; }; "ssrViewportWidth": { "alias": "ssrViewportWidth"; "required": false; }; "ssrViewportHeight": { "alias": "ssrViewportHeight"; "required": false; }; "bufferAmount": { "alias": "bufferAmount"; "required": false; }; "scrollAnimationTime": { "alias": "scrollAnimationTime"; "required": false; }; "resizeBypassRefreshThreshold": { "alias": "resizeBypassRefreshThreshold"; "required": false; }; "scrollThrottlingTime": { "alias": "scrollThrottlingTime"; "required": false; }; "scrollDebounceTime": { "alias": "scrollDebounceTime"; "required": false; }; "checkResizeInterval": { "alias": "checkResizeInterval"; "required": false; }; "items": { "alias": "items"; "required": false; }; "compareItems": { "alias": "compareItems"; "required": false; }; "horizontal": { "alias": "horizontal"; "required": false; }; "parentScroll": { "alias": "parentScroll"; "required": false; }; }, { "vsUpdate": "vsUpdate"; "vsChange": "vsChange"; "vsStart": "vsStart"; "vsEnd": "vsEnd"; }, ["headerElementRef", "containerElementRef"], ["*"], true, never>;
170
+ }
171
+ export declare class VirtualScrollerModule {
172
+ }