UNPKG

@progress/kendo-angular-grid

Version:

Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.

1,020 lines (1,019 loc) 44.8 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { SelectionDirective } from './selection/selection.directive'; import { CellSelectedFn, GridSelectionItem, SelectableSettings, SelectionEvent } from './selection/types'; import { AfterContentInit, AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, Renderer2, QueryList, SimpleChange, NgZone, ChangeDetectorRef, TemplateRef, TrackByFunction, ViewContainerRef } from '@angular/core'; import { FormGroup } from '@angular/forms'; import { SortDescriptor, GroupDescriptor, CompositeFilterDescriptor } from '@progress/kendo-data-query'; import { DetailTemplateDirective } from './rendering/details/detail-template.directive'; import { ScrollMode } from './scrolling/scrollmode'; import { SortSettings } from './columns/sort-settings'; import { PagerSettings } from './common/pager-settings'; import { BrowserSupportService } from './layout/browser-support.service'; import { GridDataResult, DataCollection } from './data/data.collection'; import { SelectionService } from './selection/selection.service'; import { EditService } from './editing/edit.service'; import { PageChangeEvent, DataStateChangeEvent } from './data/change-event-args.interface'; import { DetailsService } from './rendering/details/details.service'; import { DetailExpandEvent } from './rendering/details/detail-expand-event'; import { DetailCollapseEvent } from './rendering/details/detail-collapse-event'; import { GroupsService } from './grouping/groups.service'; import { ColumnsContainer } from './columns/columns-container'; import { GroupInfoService } from './grouping/group-info.service'; import { GroupableSettings } from './grouping/group-settings'; import { ChangeNotificationService } from './data/change-notification.service'; import { NoRecordsTemplateDirective } from './rendering/no-records-template.directive'; import { ColumnBase } from './columns/column-base'; import { LocalizationService } from '@progress/kendo-angular-l10n'; import { FilterService } from './filtering/filter.service'; import { PDFService } from './pdf/pdf.service'; import { PDFExportEvent } from './pdf/pdf-export-event'; import { ResponsiveService } from "./layout/responsive.service"; import { ExcelService } from './excel/excel.service'; import { ExcelExportEvent } from './excel/excel-export-event'; import { ColumnList } from './columns/column-list'; import { RowClassFn, RowSelectedFn, RowStickyFn, RowSelectableFn } from './rendering/common/row-class'; import { ToolbarTemplateDirective } from "./rendering/toolbar/toolbar-template.directive"; import { EditEvent } from "./editing/edit-event-args.interface"; import { RemoveEvent } from "./editing/remove-event-args.interface"; import { SaveEvent } from "./editing/save-event-args.interface"; import { CancelEvent } from "./editing/cancel-event-args.interface"; import { AddEvent } from "./editing/add-event-args.interface"; import { CellCloseEvent } from './editing/cell-close-event'; import { EditRowOptions } from './editing/edit-row-options.interface'; import { CellClickEvent } from './common/cell-click-event-args.interface'; import { ScrollSyncService } from "./scrolling/scroll-sync.service"; import { DomEventsService } from './common/dom-events.service'; import { ColumnResizingService } from "./column-resizing/column-resizing.service"; import { ColumnResizeArgs, ResizeMode } from './column-resizing/column-resize.interface'; import { FilterableSettings } from './filtering/filterable'; import { ColumnReorderService } from './dragdrop/column-reorder.service'; import { ColumnReorderEvent } from './dragdrop/column-reorder-event'; import { ColumnReorderConfig } from './dragdrop/column-reorder-config'; import { NavigationService } from './navigation/navigation.service'; import { NavigationCell } from './navigation/navigation-cell.interface'; import { NavigationRow } from './navigation/navigation-row.interface'; import { ColumnInfoService } from "./common/column-info.service"; import { ScrollRequestService, ScrollRequest, ScrollToItemRequest } from './scrolling/scroll-request.service'; import { SortService } from './common/sort.service'; import { ColumnMenuTemplateDirective } from './column-menu/column-menu-template.directive'; import { ColumnMenuSettings } from './column-menu/column-menu-settings.interface'; import { ColumnVisibilityChangeEvent } from './column-menu/column-visibility-change-event'; import { ColumnLockedChangeEvent } from './column-menu/column-locked-change-event'; import { ScrollBottomEvent } from './scrolling/scroll-bottom-event'; import { ContentScrollEvent } from './scrolling/content-scroll-event'; import { GridItem } from './data/grid-item.interface'; import { RowArgs } from './rendering/common/row-args'; import { CellSelectionService } from './selection/cell-selection.service'; import { ColumnStickyChangeEvent } from './column-menu/column-sticky-change-event'; import { GroupRowArgs } from './grouping/group-rows-args.interface'; import { CellLoadingTemplateDirective } from './rendering/cell-loading.template.directive'; import { ContextService } from './common/provider.service'; import { LoadingTemplateDirective } from './rendering/loading-template.directive'; import { GridNavigableSettings } from './navigation/navigable-settings'; import { GridSize } from './common/size-options'; import { SizingOptionsService } from './layout/sizing-options.service'; import { RowReorderEvent } from './row-reordering/types'; import { DragTargetContainerDirective, DragTargetDataFn, DropTargetContainerDirective } from '@progress/kendo-angular-utils'; import { RowReorderService } from './row-reordering/row-reorder.service'; import { StatusBarTemplateDirective } from './aggregates/status-bar-template.directive'; import { ListComponent } from './rendering/list.component'; import { PagerTemplateDirective } from '@progress/kendo-angular-pager'; import { GridResizableSettings } from './common/resizable-settings'; import { GridState } from './state-management/grid-state.models'; import { UndoRedoService } from './state-management/undo-redo.service'; import { AdaptiveGridService } from './common/adaptiveness.service'; import { AdaptiveMode } from './adaptiveness/adaptive-mode'; import { AdaptiveRendererComponent } from './adaptiveness/adaptive-renderer.component'; import { DataMappingService } from './data/data-mapping.service'; import { AIAssistantToolbarDirective } from './rendering/toolbar/tools/ai-assistant/ai-tool.directive'; import { DataLayoutMode, DataLayoutModeSettings } from './common/data-layout-mode'; import { GridColSize } from './common/grid-col-size'; import * as i0 from "@angular/core"; /** * Represents the Kendo UI for Angular Data Grid component. * * Use the `kendo-grid` component to display and manage tabular data. * * @example * ```html * <kendo-grid [data]="gridData"></kendo-grid> * ``` * * @remarks * Supported children components are: * {@link CheckboxColumnComponent}, * {@link ColumnChooserComponent}, * {@link ColumnComponent}, * {@link ColumnGroupComponent}, * {@link ColumnMenuAutoSizeAllColumnsComponent}, * {@link ColumnMenuAutoSizeColumnComponent}, * {@link ColumnMenuChooserComponent}, * {@link ColumnMenuComponent}, * {@link ColumnMenuFilterComponent}, * {@link ColumnMenuItemComponent}, * {@link ColumnMenuLockComponent}, * {@link ColumnMenuPositionComponent}, * {@link ColumnMenuSortComponent}, * {@link ColumnMenuStickComponent}, * {@link CommandColumnComponent}, * {@link CustomMessagesComponent}, * {@link ExcelComponent}, * {@link GridSpacerComponent}, * {@link PDFComponent}, * {@link RowReorderColumnComponent}, * {@link SpanColumnComponent}, * {@link ToolBarComponent}. */ export declare class GridComponent implements AfterContentInit, AfterViewInit, OnDestroy, OnChanges, OnInit { private supportService; selectionService: SelectionService; cellSelectionService: CellSelectionService; wrapper: ElementRef; private groupInfoService; groupsService: GroupsService; private changeNotification; private detailsService; private editService; private filterService; private pdfService; private responsiveService; private renderer; private excelService; private ngZone; private scrollSyncService; private domEvents; private columnResizingService; private changeDetectorRef; private columnReorderService; private columnInfoService; private navigationService; private sortService; private scrollRequestService; private localization; private ctx; private sizingService; adaptiveGridService: AdaptiveGridService; rowReorderService: RowReorderService; private dataMappingService; /** * Sets the data of the Grid. If you provide an array, the Grid gets the total count automatically. * ([more information and example]({% slug binding_grid %})). */ set data(value: Array<any> | GridDataResult | null); get data(): Array<any> | GridDataResult | null; get hintText(): string; /** * @hidden */ get customHintTemplate(): TemplateRef<any>; /** * @hidden */ get hintContext(): any; /** * Defines the page size used by the Grid pager. * Required for the [`paging`]({% slug paging_grid %}) feature. */ pageSize: number | null | undefined; /** * Defines the height in pixels for the Grid when `scrollable` is set. * You can also set the height using `style.height` with units like `px`, `%`, `em`, or `rem`. */ height: number; /** * Sets the `style.height` attribute of each Grid data or group header/footer row (`tr`) element in the DOM in pixels. * If some row cells have content that requires more space, the row automatically expands to fit the content. */ rowHeight: number; /** * Enables or disables adaptive mode. Adaptive rendering is off by default. * * @default 'none' */ adaptiveMode: AdaptiveMode; /** * Sets the `style.height` attribute of each Grid detail row (`tr.k-detail-row`) element in the DOM in pixels. * If the detail row has content that requires more space, the row automatically expands to fit the content. */ detailRowHeight: number; /** * Defines the number of records to skip in the pager. * Required for the [`paging`]({% slug paging_grid %}) feature. */ get skip(): number | null | undefined; set skip(value: number | null | undefined); /** * Defines the scroll mode for the Grid. * * @default 'scrollable' */ scrollable: ScrollMode; /** * Enables the selection feature of the Grid. The `selectable` property can be set to `true`, `false`, or an object with additional settings. * [See example](slug:grid_row_selection). * * @default false */ selectable: SelectableSettings | boolean; /** * Sets the descriptors for sorting the data ([see example]({% slug sorting_grid %})). */ set sort(value: Array<SortDescriptor> | null | undefined); get sort(): Array<SortDescriptor> | null | undefined; /** * Specifies the sizing for Grid elements like tables, buttons, and inputs. * * @default 'medium' */ set size(size: GridSize); get size(): GridSize; /** * A function that defines how to track changes for the data rows. * By default, the Grid tracks changes by the index of the data item. * Edited rows are tracked by reference. * [See example](slug:track_changes_grid). */ trackBy: TrackByFunction<GridItem>; /** * Sets the filter descriptor for the data ([see examples]({% slug filtering_grid %})). */ filter: CompositeFilterDescriptor | null | undefined; /** * Sets the descriptors for grouping the data ([see example]({% slug grouping_grid %})). */ set group(value: Array<GroupDescriptor> | null | undefined); get group(): Array<GroupDescriptor> | null | undefined; /** * If `true`, renders only columns in the current viewport. * * @default false */ virtualColumns: boolean; /** * @hidden */ get showStatusBar(): boolean; /** * @hidden */ get showTopToolbar(): boolean; /** * @hidden */ get showBottomToolbar(): boolean; /** * @hidden */ get isLocked(): boolean; /** * @hidden */ get showTopPager(): boolean; /** * @hidden */ get showBottomPager(): boolean; /** * @hidden */ get hasPager(): boolean; /** * @hidden */ get showGroupPanel(): boolean; /** * @hidden */ get groupableEmptyText(): string; /** * @hidden */ get marqueeSelection(): boolean; /** * @hidden */ get isAdaptiveModeEnabled(): boolean; /** * @hidden * * The `isOpen` property is used to determine if a Grid Popup or ActionSheet is open. */ get isOpen(): boolean; /** * @hidden */ get isActionSheetExpanded(): boolean; /** * @hidden */ gridData: DragTargetDataFn; /** * Enables the [filtering](slug:filtering_grid) feature of the Grid for columns with a `field` option. * * @default false */ filterable: FilterableSettings; /** * Enables [sorting]({% slug sorting_grid %}) feature of the Grid for columns with a `field` option. * @default false */ sortable: SortSettings; /** * Configures the Grid pager ([see example](slug:paging_grid_settings)). * @default false */ pageable: PagerSettings | boolean; get normalizedPageableSettings(): any; /** * If `true`, allows grouping by dragging column headers ([see example]({% slug grouping_grid %})). * * @default false */ groupable: GroupableSettings | boolean; /** * Determines if the Grid can be resized. * * @default false */ gridResizable: GridResizableSettings | boolean; /** * Enables row reordering feature of the Grid ([see example]({% slug reordering_rows_grid %})). * * @default false */ set rowReorderable(value: boolean); get rowReorderable(): boolean; /** * By default, navigation is enabled. To disable, set to `false`. * To enable navigation for specific sections, provide a [`GridNavigableSection`](slug:api_grid_gridnavigablesection). */ set navigable(value: GridNavigableSettings); get navigable(): GridNavigableSettings; /** * If `true`, resizes columns during initialization to fit headers and content. * Columns with `autoSize` set to `false` are excluded. * [See example](slug:resizing_columns_grid). * * @default false */ autoSize: boolean; /** * Sets a function to apply custom CSS classes to each data row ([see example](slug:styling_grid_rows)). */ set rowClass(fn: RowClassFn); get rowClass(): RowClassFn; /** * Sets a function to determine if a data row is sticky (always visible after scrolling). */ set rowSticky(fn: RowStickyFn); get rowSticky(): RowStickyFn; /** * Sets a function to determine if a data row is selected ([see example]({% slug grid_selection_custom %}#toc-setting-the-selected-rows)). */ set rowSelected(fn: RowSelectedFn); get rowSelected(): RowSelectedFn; /** * Sets a function to determine if a data row is selectable. */ set isRowSelectable(fn: RowSelectableFn); get isRowSelectable(): RowSelectableFn; /** * Sets a function to determine if a data cell is selected. * The function returns an object with `selected` and `item` properties ([see example]({% slug grid_selection_custom %}#toc-setting-the-selected-cells)). */ set cellSelected(fn: CellSelectedFn); get cellSelected(): CellSelectedFn; /** * Returns the currently focused cell (if any). */ get activeCell(): NavigationCell; /** * Returns the currently focused row (if any). */ get activeRow(): NavigationRow; /** * Returns the current Grid selection. * * @hidden */ get selection(): GridSelectionItem[]; /** * Gets the current `GridState`, including data operations and column state. * Use this to store and restore the Grid state. */ get currentState(): GridState; /** * If `true`, allows resizing columns by dragging header cell edges ([see example]({% slug resizing_columns_grid %})). * * @default false */ resizable: boolean | ResizeMode; /** * If `true`, allows reordering columns by dragging header cells ([see example]({% slug reordering_columns_grid %})). * * @default false */ reorderable: boolean; /** * If `true`, displays the Grid loading indicator ([see example]({% slug binding_grid %})). * * @default false */ set loading(value: boolean); get loading(): boolean; /** * If `true`, displays the column menu for columns ([see example]({% slug columnmenu_grid %})). * * @default false */ columnMenu: boolean | ColumnMenuSettings; /** * If `true`, hides the Grid header. The header is visible by default. * The header includes column headers and the [filter row](slug:filter_row). * * @default false */ hideHeader: boolean; /** * Specifies if the currently inactive toolbar tools will be visible. Applicable when the toolbar is configured using the `<kendo-toolbar>` component. By default, such tools are hidden. * * @default false */ showInactiveTools: boolean; /** * Sets a function to determine if a specific row is expanded. */ set isDetailExpanded(callback: (args: RowArgs) => boolean); get isDetailExpanded(): (args: RowArgs) => boolean; /** * Sets a function to determine if a specific group row is expanded. */ set isGroupExpanded(callback: (args: GroupRowArgs) => boolean); get isGroupExpanded(): (args: GroupRowArgs) => boolean; /** * Sets the Grid data layout display mode. * * @default 'columns' */ dataLayoutMode: DataLayoutMode | DataLayoutModeSettings; /** * Fires when the Grid data is filtered through the UI and the filter descriptor changes. */ filterChange: EventEmitter<CompositeFilterDescriptor>; /** * Fires when the page is changed through the UI ([see example]({% slug paging_grid %})). */ pageChange: EventEmitter<PageChangeEvent>; /** * Fires when the Grid data is grouped through the UI and the group descriptors change ([see example]({% slug grouping_grid %})). */ groupChange: EventEmitter<Array<GroupDescriptor>>; /** * Fires when the Grid data is sorted through the UI and the sort descriptors change ([see example]({% slug sorting_grid %})). */ sortChange: EventEmitter<Array<SortDescriptor>>; /** * Fires when the Grid selection changes through the UI. */ selectionChange: EventEmitter<SelectionEvent>; /** * Fires when a row is reordered through the UI. */ rowReorder: EventEmitter<RowReorderEvent>; /** * Fires when the data state of the Grid is changed. */ dataStateChange: EventEmitter<DataStateChangeEvent>; /** * Fires when the data or columns state of the Grid is changed. */ gridStateChange: EventEmitter<GridState>; /** * Fires when a group is expanded through the UI. */ groupExpand: EventEmitter<GroupRowArgs>; /** * Fires when a group is collapsed through the UI. */ groupCollapse: EventEmitter<GroupRowArgs>; /** * Fires when a detail row is expanded through the UI. */ detailExpand: EventEmitter<DetailExpandEvent>; /** * Fires when a detail row is collapsed through the UI. */ detailCollapse: EventEmitter<DetailCollapseEvent>; /** * Fires when a row enters edit mode ([see example](slug:inline_editing_grid#editing-records-1)). */ edit: EventEmitter<EditEvent>; /** * Fires when editing is canceled by clicking the **Cancel** command button ([see example]({% slug inline_editing_grid %}#toc-canceling-editing-1)). */ cancel: EventEmitter<CancelEvent>; /** * Fires when a row is saved by clicking the **Save** command button ([see example]({% slug inline_editing_grid %}#toc-saving-records-1)). */ save: EventEmitter<SaveEvent>; /** * Fires when a row is removed by clicking the **Remove** command button ([see example]({% slug inline_editing_grid %}#toc-removing-records-1)). */ remove: EventEmitter<RemoveEvent>; /** * Fires when a new row is added by clicking the **Add** command button ([see example]({% slug inline_editing_grid %}#toc-adding-records-1)). */ add: EventEmitter<AddEvent>; /** * Fires when a cell edit is closed ([see example](slug:editing_incell_grid)). */ cellClose: EventEmitter<CellCloseEvent>; /** * Fires when a cell is clicked ([see example](slug:editing_incell_grid)). */ cellClick: EventEmitter<CellClickEvent>; /** * Fires when the PDF export command is triggered. */ pdfExport: EventEmitter<PDFExportEvent>; /** * Fires when the Excel export command is triggered. */ excelExport: EventEmitter<ExcelExportEvent>; /** * Fires when columns are resized. */ columnResize: EventEmitter<Array<ColumnResizeArgs>>; /** * Fires when columns are reordered. */ columnReorder: EventEmitter<ColumnReorderEvent>; /** * Fires when column visibility changes. */ columnVisibilityChange: EventEmitter<ColumnVisibilityChangeEvent>; /** * Fires when columns are locked or unlocked. */ columnLockedChange: EventEmitter<ColumnLockedChangeEvent>; /** * Fires when columns are made sticky or unsticky. */ columnStickyChange: EventEmitter<ColumnStickyChangeEvent>; /** * Fires when the last record is scrolled into view ([see example]({% slug scrollmmodes_grid %}#toc-endless-scrolling)). */ scrollBottom: EventEmitter<ScrollBottomEvent>; /** * Fires when the grid content is scrolled. * The event is triggered outside the Angular zone for performance. Enter the Angular zone if you make changes that require change detection. */ contentScroll: EventEmitter<ContentScrollEvent>; /** * A query list of all declared columns. */ columns: QueryList<ColumnBase>; get dir(): string; hostClass: boolean; get sizeSmallClass(): boolean; get sizeMediumClass(): boolean; get stackedClass(): boolean; get lockedClasses(): boolean; get virtualClasses(): boolean; get noScrollbarClass(): boolean; get isResizable(): boolean; get minWidth(): string; get maxWidth(): string; get minHeight(): string; get maxHeight(): string; detailTemplateChildren: QueryList<DetailTemplateDirective>; get detailTemplate(): DetailTemplateDirective; set detailTemplate(detailTemplate: DetailTemplateDirective); cellLoadingTemplateChildren: QueryList<CellLoadingTemplateDirective>; get cellLoadingTemplate(): CellLoadingTemplateDirective; set cellLoadingTemplate(cellLoadingTemplate: CellLoadingTemplateDirective); loadingTemplateChildren: QueryList<LoadingTemplateDirective>; get loadingTemplate(): LoadingTemplateDirective; set loadingTemplate(loadingTemplate: CellLoadingTemplateDirective); statusBarTemplateChildren: QueryList<StatusBarTemplateDirective>; get statusBarTemplate(): StatusBarTemplateDirective; set statusBarTemplate(statusBarTemplate: StatusBarTemplateDirective); noRecordsTemplateChildren: QueryList<NoRecordsTemplateDirective>; get noRecordsTemplate(): NoRecordsTemplateDirective; set noRecordsTemplate(customNoRecordsTemplate: NoRecordsTemplateDirective); pagerTemplateChildren: QueryList<PagerTemplateDirective>; get pagerTemplate(): PagerTemplateDirective; set pagerTemplate(customPagerTemplate: PagerTemplateDirective); toolbarTemplateChildren: QueryList<ToolbarTemplateDirective>; get toolbarTemplate(): ToolbarTemplateDirective; set toolbarTemplate(customToolbarTemplate: ToolbarTemplateDirective); columnMenuTemplates: QueryList<ColumnMenuTemplateDirective>; aiAssistantToolbarTool: AIAssistantToolbarDirective; lockedHeader: any; header: any; footer: QueryList<any>; ariaRoot: ElementRef; dragTargetContainer: DragTargetContainerDirective; dropTargetContainer: DropTargetContainerDirective; dialogContainer: ViewContainerRef; windowContainer: ViewContainerRef; adaptiveRenderer: AdaptiveRendererComponent; listComponent: ListComponent; get scrollbarWidth(): number; get showPagerInput(): boolean; set showPagerInput(value: boolean); get showPagerPageText(): boolean; set showPagerPageText(value: boolean); get showPagerItemsText(): boolean; set showPagerItemsText(value: boolean); get headerPadding(): any; columnMenuOptions: any; columnList: ColumnList; selectionDirective: boolean | SelectionDirective; ariaRootId: string; showLicenseWatermark: boolean; /** * @hidden */ licenseMessage?: string; columnsContainer: ColumnsContainer; view: DataCollection; get hasGroupFooters(): boolean; get showFooter(): boolean; get showGroupFooters(): boolean; get ariaRowCount(): number; get ariaColCount(): number; get navigation(): NavigationService; /** * @hidden */ get flatData(): Array<any>; private shouldGenerateColumns; private direction; private notifyTimeout; private _sort; private _group; private _skip; private _data; private cachedWindowWidth; private defaultSelection; private _rowSelected; private _isRowSelectable; private _cellSelected; private _customDetailTemplate; private _cellLoadingTemplate; private _loadingTemplate; private _statusBarTemplate; private _customNoRecordsTemplate; private _customPagerTemplate; private _customToolbarTemplate; private _rowReorderable; private leafViewportColumns; private viewportColumns; private _navigable; private _size; private _loading; private _showPagerInput; private _showPagerPageText; private _showPagerItemsText; get isVirtual(): boolean; get isScrollable(): boolean; /** * @hidden */ get isStacked(): boolean; get visibleColumns(): QueryList<ColumnBase>; get lockedColumns(): QueryList<ColumnBase>; get nonLockedColumns(): QueryList<ColumnBase>; get lockedLeafColumns(): QueryList<ColumnBase>; get stickyColumns(): Array<ColumnBase>; get nonLockedLeafColumns(): QueryList<ColumnBase>; get leafColumns(): QueryList<ColumnBase>; get totalColumnLevels(): number; get headerColumns(): any; get headerLeafColumns(): any; get lockedWidth(): number; get nonLockedWidth(): number; get selectableSettings(): SelectableSettings; get columnMenuTemplate(): TemplateRef<any>; get totalCount(): number; /** * @hidden */ getDefaultSelectors(type: string): string; /** * @hidden */ getHintSettings(type: string): any; /** * @hidden */ blockArrowSelection: boolean; undoRedoService: UndoRedoService; rowsToRender: Array<GridItem & { showDetailRow?: boolean; cells?: any[]; isExpanded?: boolean; }>; private selectionSubscription; private stateChangeSubscription; private groupExpandCollapseSubscription; private editServiceSubscription; private detailsServiceSubscription; private filterSubscription; private sortSubscription; private columnsChangeSubscription; private pdfSubscription; private excelSubscription; private columnsContainerChangeSubscription; private cellClickSubscription; private footerChangeSubscription; private columnResizingSubscription; private columnReorderSubscription; private detachElementEventHandlers; private localizationSubscription; private columnVisibilityChangeSubscription; private columnLockedChangeSubscription; private columnStickyChangeSubscription; private focusElementSubscription; private columnRangeChangeSubscription; private rowReorderSubscription; private rtl; private _rowSticky; constructor(supportService: BrowserSupportService, selectionService: SelectionService, cellSelectionService: CellSelectionService, wrapper: ElementRef, groupInfoService: GroupInfoService, groupsService: GroupsService, changeNotification: ChangeNotificationService, detailsService: DetailsService, editService: EditService, filterService: FilterService, pdfService: PDFService, responsiveService: ResponsiveService, renderer: Renderer2, excelService: ExcelService, ngZone: NgZone, scrollSyncService: ScrollSyncService, domEvents: DomEventsService, columnResizingService: ColumnResizingService, changeDetectorRef: ChangeDetectorRef, columnReorderService: ColumnReorderService, columnInfoService: ColumnInfoService, navigationService: NavigationService, sortService: SortService, scrollRequestService: ScrollRequestService, localization: LocalizationService, ctx: ContextService, sizingService: SizingOptionsService, adaptiveGridService: AdaptiveGridService, rowReorderService: RowReorderService, dataMappingService: DataMappingService); /** * Expands the master row at the specified data row index ([see example]({% slug hierarchy_grid %})). * * This method is for backwards compatibility with legacy versions that track expanded state by row index. * For new development, use the [`kendoGridDetailsExpandBy` directive]({% slug api_grid_expanddetailsdirective %}) * or provide an `isDetailExpanded` callback. See [Controlling the Expanded State]({% slug master_detail_expanded_state_grid %}) for examples. * * @param index The data row index of the master row. */ expandRow(index: number): void; /** * Collapses the master row at the specified data row index ([see example]({% slug hierarchy_grid %})). * * This method is for backwards compatibility with legacy versions that track expanded state by row index. * For new development, use the [`kendoGridDetailsExpandBy` directive]({% slug api_grid_expanddetailsdirective %}) * or provide an `isDetailExpanded` callback. See [Controlling the Expanded State]({% slug master_detail_expanded_state_grid %}) for examples. * * @param index The data row index of the master row. */ collapseRow(index: number): void; /** * Expands a group header at the given hierarchical index, such as `0_1` for the second inner group of the first master group. * * This method is for backwards compatibility with legacy versions that track expanded group state by hierarchical group index. * If the Grid is pageable, the group indexes are offset by the current Grid [skip]({% slug api_grid_gridcomponent %}#toc-skip). * * @param {string} index The underscore-separated hierarchical index of the group. */ expandGroup(index: string): void; /** * Collapses a group header at the given hierarchical index, such as `0_1` for the second inner group of the first master group. * * This method is for backwards compatibility with legacy versions that track expanded group state by hierarchical group index. * If the Grid is pageable, the group indexes are offset by the current Grid [skip]({% slug api_grid_gridcomponent %}#toc-skip). * * @param {string} index The underscore-separated hierarchical index of the group. */ collapseGroup(index: string): void; /** * @hidden */ resetGroupsState(): void; /** * @hidden */ onDataChange(): void; ngDoCheck(): void; ngOnChanges(changes: { [propertyName: string]: SimpleChange; }): void; ngAfterContentInit(): void; ngAfterViewInit(): void; ngAfterContentChecked(): void; ngOnInit(): void; ngOnDestroy(): void; /** * @hidden */ onResize(): void; /** * @hidden */ attachScrollSync(): void; /** * @hidden */ get ariaLabel(): string; /** * @hidden */ messageFor: (token: string) => string; /** * Switches the specified table row to edit mode ([see example]({% slug inline_editing_grid %}#toc-editing-records-1)). * * @param rowIndex The data row index to switch to edit mode. * @param group The [`FormGroup`](link:site.data.urls.angular['formgroupapi']) that describes the edit form. * @param options Additional options to configure the focus target when the editor opens. */ editRow(rowIndex: number, group?: FormGroup, options?: EditRowOptions): void; /** * @hidden */ handleReorderEvents(ev: any, evType: string): void; /** * Closes the editor for the specified row ([see example]({% slug inline_editing_grid %}#toc-canceling-editing-1)). * * @param {number} index The row index to switch out of edit mode. If you do not provide an index, the new item editor closes. */ closeRow(index?: number): void; /** * Creates a new row editor ([see example]({% slug inline_editing_grid %}#toc-adding-records-1)). * * @param {FormGroup} group The [`FormGroup`](link:site.data.urls.angular['formgroupapi']) that describes the edit form. If you pass a data item, the method builds the `FormGroup` from the data item fields. */ addRow(group: any): void; /** * Puts the specified cell in edit mode ([see example](slug:editing_incell_grid)). * * @param {number} rowIndex The data row index to switch to edit mode. * @param {number|string|any} column The leaf column index, field name, or column instance to edit. * @param {FormGroup} group The [`FormGroup`](link:site.data.urls.angular['formgroupapi']) that describes the edit form. */ editCell(rowIndex: number, column: number | string | any, group?: any): void; /** * Closes the current cell in edit mode and fires the [`cellClose`]({% slug api_grid_gridcomponent %}#toc-cellclose) event. * * @returns {boolean} `true` if the cell closed. Returns `false` if the [`cellClose`]({% slug api_grid_gridcomponent %}#toc-cellclose) event was prevented. */ closeCell(): boolean; /** * Closes the current cell in edit mode. */ cancelCell(): void; /** * Returns `true` if a row or cell is currently edited. * * @returns {boolean} `true` if a row or cell is currently edited. */ isEditing(): boolean; /** * Returns `true` if a cell is currently edited. * * @returns {boolean} `true` if a cell is currently being edited. */ isEditingCell(): boolean; /** * Initiates the PDF export ([see example]({% slug pdfexport_grid %})). */ saveAsPDF(): void; /** * Exports the Grid element to a Drawing [Group]({% slug api_kendo-drawing_group %}) using the `kendo-grid-pdf` component options * ([see example]({% slug pdfexport_grid %}#toc-exporting-multiple-grids-to-the-same-pdf)). * * @returns {Promise} A promise that resolves with the Drawing `Group`. */ drawPDF(): Promise<any>; /** * Initiates the Excel export ([see example]({% slug excelexport_grid %})). */ saveAsExcel(): void; /** * Applies the given `GridState` object to the Grid. */ loadState(state: GridState): void; private traverseColumns; /** * Applies the minimum possible width for the specified column so the whole text fits without wrapping. * This method expects the Grid to be [`resizable`](slug:resizing_columns_grid). Run this method after the Grid is populated with data. * [See example](slug:resizing_columns_grid#toc-auto-fitting-the-content) */ autoFitColumn(column: ColumnBase): void; /** * Adjusts the width of the specified columns to fit the entire content, including headers, without wrapping. * If you do not specify columns, `autoFitColumns` applies to all columns. Run this method after the Grid is populated with data. * [See example](slug:resizing_columns_grid#toc-auto-fitting-the-content) */ autoFitColumns(columns?: Array<ColumnBase> | QueryList<ColumnBase>): void; /** * @hidden */ notifyPageChange(source: string, event: any): void; /** * @hidden */ handlePagerVisibilityChange(prop: string, ev: any): void; /** * @hidden */ notifyScrollBottom(): void; /** * @hidden */ focusEditElement(containerSelector: string): void; /** * Focuses the last active or the first cell of the Grid. * * @returns {NavigationCell} The focused cell. */ focus(): NavigationCell; /** * Focuses the cell with the specified row and column index. * * The row index is based on the logical structure of the Grid and does not correspond to the data item index. * Header rows are included, starting at index 0. * Group headers and footers are included. * The row indexing is absolute and does not change with paging. * * If the Grid is configured for scrolling, including virtual scrolling, the scroll position will be updated. * If the row is not present on the current page, the method will have no effect. * * @param rowIndex The logical row index to focus. The top header row has an index 0. * @param colIndex The column index to focus. * @returns {NavigationCell} The focused cell. * */ focusCell(rowIndex: number, colIndex: number): NavigationCell; /** * Focuses the next cell, optionally wrapping to the next row. * * @param wrap A Boolean value which indicates if the focus will move to the next row. Defaults to `true`. * @returns {NavigationCell} The focused cell. If the focus is already on the last cell, returns `null`. */ focusNextCell(wrap?: boolean): NavigationCell; /** * Focuses the previous cell. Optionally wraps to the previous row. * * @param wrap - A Boolean value which indicates if the focus will move to the next row. Defaults to `true`. * @returns {NavigationCell} The focused cell. If the focus is already on the first cell, returns `null`. */ focusPrevCell(wrap?: boolean): NavigationCell; /** * Scrolls to the specified row and column ([see example](slug:scrollmmodes_grid#toc-scrolling-to-a-specific-row-and-column)). */ scrollTo(request: ScrollRequest): void; /** * Scrolls to the specified data item and column ([see example](slug:scrollmmodes_grid#toc-scrolling-to-a-specific-item)). */ scrollToItem(request: ScrollToItemRequest): void; /** * Changes the position of the specified column. * The reordering of columns operates only on the level inferred by the source column. * For this method to work, the `source` column must be visible. * * @param {ColumnBase} source The column to move. * @param {number} destIndex The new position of the column. * @param {ColumnReorderConfig} options Additional options. */ reorderColumn(source: ColumnBase, destIndex: number, options?: ColumnReorderConfig): void; /** * @hidden */ updateNavigationMetadata(): void; private reorder; private updateColumnIndices; private updateIndicesForLevel; private allColumnsForLevel; private initSelectionService; private setEditFocus; private columnInstance; private verifySettings; private autoGenerateColumns; /** * @hidden */ stackedColumns: { columns: GridColSize[]; areDefault: boolean; }; private generateStackedColumns; private attachStateChangesEmitter; private attachEditHandlers; private emitCRUDEvent; private attachDomEventHandlers; private attachElementEventHandlers; private matchesMedia; private resizeCheck; private emitPDFExportEvent; private syncHeaderHeight; private columnsContainerChange; private handleColumnResize; private notifyResize; private assertNavigable; private _rowClass; private navigationMetadata; private applyAutoSize; private onColumnRangeChange; private toggleDetailRowLegacy; private toggleGroupRowLegacy; private shouldResetSelection; private notifyReorderContainers; static ɵfac: i0.ɵɵFactoryDeclaration<GridComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<GridComponent, "kendo-grid", ["kendoGrid"], { "data": { "alias": "data"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "height": { "alias": "height"; "required": false; }; "rowHeight": { "alias": "rowHeight"; "required": false; }; "adaptiveMode": { "alias": "adaptiveMode"; "required": false; }; "detailRowHeight": { "alias": "detailRowHeight"; "required": false; }; "skip": { "alias": "skip"; "required": false; }; "scrollable": { "alias": "scrollable"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "sort": { "alias": "sort"; "required": false; }; "size": { "alias": "size"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "group": { "alias": "group"; "required": false; }; "virtualColumns": { "alias": "virtualColumns"; "required": false; }; "filterable": { "alias": "filterable"; "required": false; }; "sortable": { "alias": "sortable"; "required": false; }; "pageable": { "alias": "pageable"; "required": false; }; "groupable": { "alias": "groupable"; "required": false; }; "gridResizable": { "alias": "gridResizable"; "required": false; }; "rowReorderable": { "alias": "rowReorderable"; "required": false; }; "navigable": { "alias": "navigable"; "required": false; }; "autoSize": { "alias": "autoSize"; "required": false; }; "rowClass": { "alias": "rowClass"; "required": false; }; "rowSticky": { "alias": "rowSticky"; "required": false; }; "rowSelected": { "alias": "rowSelected"; "required": false; }; "isRowSelectable": { "alias": "isRowSelectable"; "required": false; }; "cellSelected": { "alias": "cellSelected"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "reorderable": { "alias": "reorderable"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "columnMenu": { "alias": "columnMenu"; "required": false; }; "hideHeader": { "alias": "hideHeader"; "required": false; }; "showInactiveTools": { "alias": "showInactiveTools"; "required": false; }; "isDetailExpanded": { "alias": "isDetailExpanded"; "required": false; }; "isGroupExpanded": { "alias": "isGroupExpanded"; "required": false; }; "dataLayoutMode": { "alias": "dataLayoutMode"; "required": false; }; }, { "filterChange": "filterChange"; "pageChange": "pageChange"; "groupChange": "groupChange"; "sortChange": "sortChange"; "selectionChange": "selectionChange"; "rowReorder": "rowReorder"; "dataStateChange": "dataStateChange"; "gridStateChange": "gridStateChange"; "groupExpand": "groupExpand"; "groupCollapse": "groupCollapse"; "detailExpand": "detailExpand"; "detailCollapse": "detailCollapse"; "edit": "edit"; "cancel": "cancel"; "save": "save"; "remove": "remove"; "add": "add"; "cellClose": "cellClose"; "cellClick": "cellClick"; "pdfExport": "pdfExport"; "excelExport": "excelExport"; "columnResize": "columnResize"; "columnReorder": "columnReorder"; "columnVisibilityChange": "columnVisibilityChange"; "columnLockedChange": "columnLockedChange"; "columnStickyChange": "columnStickyChange"; "scrollBottom": "scrollBottom"; "contentScroll": "contentScroll"; }, ["aiAssistantToolbarTool", "columns", "detailTemplateChildren", "cellLoadingTemplateChildren", "loadingTemplateChildren", "statusBarTemplateChildren", "noRecordsTemplateChildren", "pagerTemplateChildren", "toolbarTemplateChildren", "columnMenuTemplates"], ["kendo-toolbar"], true, never>; }