UNPKG

@progress/kendo-angular-grid

Version:

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

73 lines (72 loc) 3.02 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { AfterViewInit, ElementRef, OnDestroy, Renderer2 } from '@angular/core'; import { FocusableElement } from './focusable-element.interface'; import { CellContext } from '../rendering/common/cell-context'; import { ContextService } from '../common/provider.service'; import * as i0 from "@angular/core"; /** * A directive that controls how focusable elements receive * focus in a navigable Grid. [See example]({% slug keyboard_navigation_grid %}). * * @example * ```html * <kendo-grid [data]="data" [navigable]="true"> * <kendo-grid-column> * <ng-template kendoGridCellTemplate let-dataItem> * <!-- The first focusable element is focused when you press Enter on the cell. --> * <input type="text" kendoGridFocusable [value]="dataItem.ProductName" style="margin-right: 8px;" /> * <button kendoGridFocusable>Update</button> * </ng-template> * </kendo-grid-column> * </kendo-grid> * ``` * @remarks * Applied to: {@link ButtonComponent}, {@link TextBoxComponent}, {@link NumericTextBoxComponent}, {@link DateInputComponent}, {@link DatePickerComponent}, {@link DateTimePicker}, {@link TextAreaComponent}, {@link ColorPickerComponent}, {@link DropDownListComponent}, {@link ComboBoxComponent}, {@link AutoCompleteComponent}. */ export declare class FocusableDirective implements FocusableElement, AfterViewInit, OnDestroy { private cellContext; private hostElement; private renderer; private ctx; private active; private group; private element; private _enabled; /** * @hidden */ set enabled(value: any); get enabled(): any; constructor(cellContext: CellContext, hostElement: ElementRef, renderer: Renderer2, ctx: ContextService); ngAfterViewInit(): void; ngOnDestroy(): void; /** * @hidden */ toggle(active: boolean): void; /** * @hidden */ canFocus(): boolean; /** * @hidden */ isNavigable(): boolean; /** * @hidden */ focus(): void; /** * @hidden */ hasFocus(): boolean; /** * @hidden */ registerElement(element: FocusableElement): void; static ɵfac: i0.ɵɵFactoryDeclaration<FocusableDirective, [{ optional: true; skipSelf: true; }, null, null, null]>; static ɵdir: i0.ɵɵDirectiveDeclaration<FocusableDirective, "[kendoGridFocusable], [kendoGridEditCommand], [kendoGridRemoveCommand], [kendoGridSaveCommand], [kendoGridCancelCommand], [kendoGridSelectionCheckbox] ", never, { "enabled": { "alias": "kendoGridFocusable"; "required": false; }; }, {}, never, never, true, never>; }