/**----------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { NgZone, OnDestroy } from '@angular/core'; import { Subject } from 'rxjs'; import { GridItem } from '../../data/grid-item.interface'; import { StickyGroupItem } from './models'; import { RowHeightService } from '../../scrolling/row-height.service'; import * as i0 from "@angular/core"; /** * @hidden * Parameters for the sticky groups update cycle. */ export interface StickyGroupsUpdateParams { container: HTMLElement; tbody: HTMLElement; flatData: GridItem[]; stickyHeaderEl: HTMLElement | null; stickyFooterEl: HTMLElement | null; enableHeaders: boolean; enableFooters: boolean; rowHeight?: number; skipOffset?: number; rowHeightService?: RowHeightService; } /** * @hidden * Manages sticky group header and footer state for the Grid. * Computes which groups to pin on each scroll frame and applies DOM transforms * for the push effect. Runs outside Angular zone for performance. */ export declare class StickyGroupsService implements OnDestroy { private ngZone; headerItems$: Subject; footerItems$: Subject; scrollToFooter$: Subject; scrollToRow$: Subject; scrollAndToggle$: Subject; stickyHeaderItems: StickyGroupItem[]; stickyFooterItems: StickyGroupItem[]; pendingScrollToFooter: number | null; /** * When set, after the scroll-to-group completes and the view settles, * the sticky container should focus the real grid row for this group. */ pendingFocusGroupIndex: string | null; focusReady$: Subject<{ groupIndex: string; flatIndex: number; }>; /** * When set, the real grid body should scroll until the target row is * rendered, then focus the corresponding cell. */ pendingFocusRow: { flatIndex: number; colIndex: number; } | null; /** * When true, the next update() call is skipped. Used when programmatically * scrolling to top so stale DOM measurements don't re-show the overlay. */ suppressNextUpdate: boolean; private headerPushOffsets; private footerPushOffsets; private groupRangeMap; private lastFlatDataRef; constructor(ngZone: NgZone); ngOnDestroy(): void; /** * Requests the list component to scroll to the group header and then * toggle it. Called from sticky overlay click — uses pre-collapse data. */ scrollAndToggle(groupIndex: string): void; /** * Requests the grid to scroll so the real footer row at the given flat index * becomes visible at the bottom of the viewport. */ requestScrollToFooter(flatIndex: number): void; /** * Consumes (returns and clears) any pending scroll-to-footer request. */ consumeScrollToFooter(): number | null; /** * Requests the real grid body to render the row at the given flat index, * then focus the corresponding cell. */ requestScrollToRow(flatIndex: number, colIndex: number): void; /** * Consumes and clears the pending scroll-to-row request. */ consumeScrollToRow(): { flatIndex: number; colIndex: number; } | null; /** * Clears cached group range map so it is rebuilt on next update. */ invalidateRangeMap(): void; /** * Main update cycle. Called on every scroll event, outside Angular zone. * Computes which headers/footers should be sticky, applies push transforms, * and emits changes only when the set of sticky items changes. */ update(params: StickyGroupsUpdateParams): void; /** * Applies pending push transforms after Angular re-renders overlay content. * Called from the overlay component's AfterViewChecked hook. */ applyPendingHeaderTransforms(containerEl: HTMLElement): void; applyPendingFooterTransforms(containerEl: HTMLElement): void; /** * Clears all sticky state and resets overlays. */ clear(): void; /** * Adjusts the container scrollTop so the focused row is not hidden * behind the sticky header or footer overlays. * Intended to be called only from the keyboard navigation path, * outside Angular zone. */ adjustScrollForFocusedCell(containerEl: HTMLElement, stickyHeaderEl: HTMLElement | null, stickyFooterEl: HTMLElement | null): void; /** * Sets marginBlockEnd on the sticky footer overlay when the container * has a horizontal scrollbar, so the footer does not overlap the scrollbar. */ adjustStickyFooterForScrollbar(container: HTMLElement, stickyFooterEl: HTMLElement | null): void; private clearAll; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }