import { AfterContentInit, AfterViewInit, ElementRef, EventEmitter, NgZone, OnDestroy, QueryList, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core'; import { ClrCommonStringsService } from '../../utils/i18n/common-strings.service'; import { ClrDatagridColumn } from './datagrid-column'; import { ClrDatagridItems } from './datagrid-items'; import { ClrDatagridPlaceholder } from './datagrid-placeholder'; import { ClrDatagridRow } from './datagrid-row'; import { ClrDatagridVirtualScrollDirective } from './datagrid-virtual-scroll.directive'; import { SelectionType } from './enums/selection-type'; import { ClrDatagridStateInterface } from './interfaces/state.interface'; import { DetailService } from './providers/detail.service'; import { DisplayModeService } from './providers/display-mode.service'; import { ExpandableRowsCount } from './providers/global-expandable-rows'; import { ClrDatagridItemsTrackByFunction, Items } from './providers/items'; import { Page } from './providers/page'; import { RowActionService } from './providers/row-action-service'; import { Selection } from './providers/selection'; import { StateProvider } from './providers/state.provider'; import { DatagridRenderOrganizer } from './render/render-organizer'; import { CellCoordinates, KeyNavigationGridController } from './utils/key-navigation-grid.controller'; import * as i0 from "@angular/core"; export declare class ClrDatagrid implements AfterContentInit, AfterViewInit, OnDestroy { private organizer; items: Items; expandableRows: ExpandableRowsCount; selection: Selection; rowActionService: RowActionService; private stateProvider; private displayMode; private renderer; detailService: DetailService; private document; el: ElementRef; private page; commonStrings: ClrCommonStringsService; keyNavigation: KeyNavigationGridController; private zone; loadingMoreItems: boolean; clrDgSingleSelectionAriaLabel: string; clrDgSingleActionableAriaLabel: string; clrDetailExpandableAriaLabel: string; clrDgDisablePageFocus: boolean; selectedChanged: EventEmitter; singleSelectedChanged: EventEmitter; /** * Output emitted whenever the data needs to be refreshed, based on user action or external ones */ refresh: EventEmitter>; /** * The application can provide custom select all logic. */ customSelectAllEnabled: boolean; customSelectAll: EventEmitter; /** * Expose virtual scroll directive for applications to access its public methods */ _virtualScroll: QueryList>; /** * We grab the smart iterator from projected content */ iterator: ClrDatagridItems; /** * Custom placeholder detection */ placeholder: ClrDatagridPlaceholder; /** * Hideable Column data source / detection. */ columns: QueryList>; /** * When the datagrid is user-managed without the smart iterator, we get the items displayed * by querying the projected content. This is needed to keep track of the models currently * displayed, typically for selection. */ rows: QueryList>; datagrid: ElementRef; datagridTable: ElementRef; datagridHeader: ElementRef; contentWrapper: ElementRef; scrollableColumns: ViewContainerRef; _projectedDisplayColumns: ViewContainerRef; _projectedCalculationColumns: ViewContainerRef; _displayedRows: ViewContainerRef; _calculationRows: ViewContainerRef; _fixedColumnTemplate: TemplateRef; stickyHeaders: QueryList; selectAllId: string; activeCellCoords: CellCoordinates; SELECTION_TYPE: typeof SelectionType; private selectAllCheckbox; /** * Subscriptions to all the services and queries changes */ private _subscriptions; private _virtualScrollSubscriptions; constructor(organizer: DatagridRenderOrganizer, items: Items, expandableRows: ExpandableRowsCount, selection: Selection, rowActionService: RowActionService, stateProvider: StateProvider, displayMode: DisplayModeService, renderer: Renderer2, detailService: DetailService, document: any, el: ElementRef, page: Page, commonStrings: ClrCommonStringsService, keyNavigation: KeyNavigationGridController, zone: NgZone); /** * Freezes the datagrid while data is loading */ get loading(): boolean; set loading(value: boolean); /** * Array of all selected items */ set selected(value: T[] | undefined); /** * Selected item in single-select mode */ set singleSelected(value: T); set clrDgPreserveSelection(state: boolean); /** * @deprecated since 2.0, remove in 3.0 * * Selection/Deselection on row click mode */ set rowSelectionMode(value: boolean); set trackBy(value: ClrDatagridItemsTrackByFunction); /** * Indicates if all currently displayed items are selected */ get allSelected(): boolean; set allSelected(value: boolean); get virtualScroll(): ClrDatagridVirtualScrollDirective; ngAfterContentInit(): void; /** * Our setup happens in the view of some of our components, so we wait for it to be done before starting */ ngAfterViewInit(): void; ngOnDestroy(): void; toggleAllSelected($event: any): void; resize(): void; /** * Checks the state of detail panel and if it's opened then * find the matching row and trigger the detail panel */ updateDetailState(): void; /** * Public method to re-trigger the computation of displayed items manually */ dataChanged(): void; private toggleVirtualScrollSubscriptions; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "clr-datagrid", never, { "loadingMoreItems": "clrLoadingMoreItems"; "clrDgSingleSelectionAriaLabel": "clrDgSingleSelectionAriaLabel"; "clrDgSingleActionableAriaLabel": "clrDgSingleActionableAriaLabel"; "clrDetailExpandableAriaLabel": "clrDetailExpandableAriaLabel"; "clrDgDisablePageFocus": "clrDgDisablePageFocus"; "customSelectAllEnabled": "clrDgCustomSelectAllEnabled"; "loading": "clrDgLoading"; "selected": "clrDgSelected"; "singleSelected": "clrDgSingleSelected"; "clrDgPreserveSelection": "clrDgPreserveSelection"; "rowSelectionMode": "clrDgRowSelection"; "trackBy": "clrDgItemsTrackBy"; }, { "selectedChanged": "clrDgSelectedChange"; "singleSelectedChanged": "clrDgSingleSelectedChange"; "refresh": "clrDgRefresh"; "customSelectAll": "clrDgCustomSelectAll"; }, ["iterator", "placeholder", "_virtualScroll", "columns", "rows"], ["clr-dg-action-bar", "clr-dg-placeholder", "clr-dg-footer", "[clrIfDetail],clr-dg-detail"], false, never>; }