UNPKG

@progress/kendo-angular-grid

Version:

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

52 lines (51 loc) 2.3 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { EventEmitter, OnDestroy, OnInit } from '@angular/core'; import { GridComponent } from '../grid.component'; import { UndoRedoEvent } from './grid-state.models'; import { EditService } from '../editing/edit.service'; import { UndoRedoService } from './undo-redo.service'; import { ChangeNotificationService } from '../data/change-notification.service'; import * as i0 from "@angular/core"; export declare class UndoRedoDirective implements OnInit, OnDestroy { private host; private editService; private undoRedoService; private changeNotification; /** * Determines the maximum number of actions to keep in the undo-redo stack. * @default 10 */ maxStoredStates: number; /** * Fires when undo action is performed. Exposes the state of the grid that will be applied. */ onUndo: EventEmitter<UndoRedoEvent>; /** * Fires when undo action is performed. Exposes the state of the grid that will be applied. */ onRedo: EventEmitter<UndoRedoEvent>; /** * Returns an array of all undo-redo actions that are currently in the stack. */ get undoRedoItems(): UndoRedoEvent[]; private stack; private subs; private addToState; constructor(host: GridComponent, editService: EditService, undoRedoService: UndoRedoService, changeNotification: ChangeNotificationService); ngOnInit(): void; ngOnDestroy(): void; /** * Re-applies the last action, reverted by the `undo` method. */ redo(): void; /** * Reverts the last user action. */ undo(): void; private updateUndoRedoDisabled; static ɵfac: i0.ɵɵFactoryDeclaration<UndoRedoDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<UndoRedoDirective, "[kendoGridUndoRedo]", ["kendoGridUndoRedo"], { "maxStoredStates": { "alias": "maxStoredStates"; "required": false; }; }, { "onUndo": "undo"; "onRedo": "redo"; }, never, never, true, never>; }