/**----------------------------------------------------------------------------------------- * 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 { ContextService } from '../common/provider.service'; import { LocalDataChangesService } from '../editing/local-data-changes.service'; import * as i0 from "@angular/core"; /** * Represents the directive that manages undo-redo operations in the Grid. * Use this directive to enable undo and redo functionality for user actions in the Grid. * * @example * ```html * * ``` * @remarks * Applied to: {@link GridComponent}. */ export declare class UndoRedoDirective implements OnInit, OnDestroy { private host; private editService; private undoRedoService; private changeNotification; private ctx?; private localDataChangesService?; /** * Sets the maximum number of actions to keep in the undo-redo stack. * @default 10 */ maxStoredStates: number; /** * Defines the property name of the data item unique key that will be used to identify the items when performing undo-redo actions. */ itemIdKey: string | undefined; /** * Fires when you perform the undo action. Provides the Grid state to apply. */ onUndo: EventEmitter; /** * Fires when you perform the redo action. Provides the Grid state to apply. */ onRedo: EventEmitter; /** * Returns all undo-redo actions currently in the stack. */ get undoRedoItems(): UndoRedoEvent[]; private stack; private subs; private addToState; constructor(host: GridComponent, editService: EditService, undoRedoService: UndoRedoService, changeNotification: ChangeNotificationService, ctx?: ContextService, localDataChangesService?: LocalDataChangesService); ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; /** * Re-applies the last action that you reverted with the `undo` method. */ redo(): void; /** * Reverts the last user action that you performed. */ undo(): void; private updateUndoRedoDisabled; private getGridDataItems; private isDataStateChangeEvent; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; }