@progress/kendo-angular-grid 19.0.0-develop.11 → 19.0.0-develop.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/columns/column-base.d.ts +5 -0
  2. package/columns/span-column.component.d.ts +2 -2
  3. package/directives.d.ts +6 -3
  4. package/esm2022/column-resizing/column-handle.directive.mjs +2 -2
  5. package/esm2022/columns/column-base.mjs +9 -0
  6. package/esm2022/columns/columns-container.mjs +1 -1
  7. package/esm2022/columns/span-column.component.mjs +9 -9
  8. package/esm2022/directives.mjs +9 -2
  9. package/esm2022/grid.component.mjs +106 -41
  10. package/esm2022/grid.module.mjs +11 -2
  11. package/esm2022/index.mjs +5 -0
  12. package/esm2022/package-metadata.mjs +2 -2
  13. package/esm2022/rendering/cell.component.mjs +3 -3
  14. package/esm2022/rendering/header/header.component.mjs +1 -1
  15. package/esm2022/rendering/list.component.mjs +1 -1
  16. package/esm2022/rendering/table-body.component.mjs +1 -1
  17. package/esm2022/state-management/grid-state.models.mjs +26 -0
  18. package/esm2022/state-management/redo-command-tool.mjs +66 -0
  19. package/esm2022/state-management/undo-command-tool.mjs +66 -0
  20. package/esm2022/state-management/undo-redo.directive.mjs +178 -0
  21. package/esm2022/state-management/undo-redo.service.mjs +22 -0
  22. package/esm2022/state-management/undo-redo.stack.mjs +232 -0
  23. package/esm2022/utils.mjs +13 -0
  24. package/fesm2022/progress-kendo-angular-grid.mjs +698 -67
  25. package/grid.component.d.ts +36 -19
  26. package/grid.module.d.ts +5 -2
  27. package/index.d.ts +4 -0
  28. package/package.json +20 -20
  29. package/rendering/cell.component.d.ts +1 -1
  30. package/schematics/ngAdd/index.js +4 -4
  31. package/state-management/grid-state.models.d.ts +58 -0
  32. package/state-management/redo-command-tool.d.ts +38 -0
  33. package/state-management/undo-command-tool.d.ts +38 -0
  34. package/state-management/undo-redo.directive.d.ts +51 -0
  35. package/state-management/undo-redo.service.d.ts +19 -0
  36. package/state-management/undo-redo.stack.d.ts +104 -0
  37. package/utils.d.ts +11 -1
@@ -12,6 +12,8 @@ import { KENDO_GRID_BODY_EXPORTS, KENDO_GRID_COLUMN_MENU_DECLARATIONS, KENDO_GRI
12
12
  import { TableDirective } from './column-resizing/table.directive';
13
13
  import { KENDO_PAGER } from '@progress/kendo-angular-pager';
14
14
  import { KENDO_TOOLBAR } from '@progress/kendo-angular-toolbar';
15
+ import { UndoCommandToolbarDirective } from './state-management/undo-command-tool';
16
+ import { RedoCommandToolbarDirective } from './state-management/redo-command-tool';
15
17
  import * as i0 from "@angular/core";
16
18
  import * as i1 from "./grouping/group-header-template.directive";
17
19
  import * as i2 from "./grouping/group-header-column-template.directive";
@@ -150,6 +152,9 @@ import * as i134 from "./common/clipboard.directive";
150
152
  import * as i135 from "./editing/form/form.component";
151
153
  import * as i136 from "./editing/form/dialog-form.component";
152
154
  import * as i137 from "./editing/form/form-formfield.component";
155
+ import * as i138 from "./state-management/undo-redo.directive";
156
+ import * as i139 from "./state-management/undo-command-tool";
157
+ import * as i140 from "./state-management/redo-command-tool";
153
158
  // IMPORTANT: NgModule export kept for backwards compatibility
154
159
  /**
155
160
  * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
@@ -174,7 +179,9 @@ import * as i137 from "./editing/form/form-formfield.component";
174
179
  */
175
180
  export class GridModule {
176
181
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
177
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: GridModule, imports: [i1.GroupHeaderTemplateDirective, i2.GroupHeaderColumnTemplateDirective, i3.GroupFooterTemplateDirective, i4.GroupHeaderComponent, i5.GroupPanelComponent, i6.ColumnComponent, i7.ColumnGroupComponent, i8.LogicalCellDirective, i9.LogicalRowDirective, i10.FocusableDirective, i11.FooterTemplateDirective, i12.ColGroupComponent, i13.ResizableContainerDirective, i14.TemplateContextDirective, i15.FieldAccessorPipe, i16.DetailTemplateDirective, i17.SpanColumnComponent, i18.LoadingComponent, i19.GridTableDirective, i20.CommandColumnComponent, i21.CheckboxColumnComponent, i22.SelectionCheckboxDirective, i23.CellTemplateDirective, i24.EditTemplateDirective, i25.RowDragHandleTemplateDirective, i26.RowDragHintTemplateDirective, i27.TableBodyComponent, i28.NoRecordsTemplateDirective, i29.CellComponent, i30.EditCommandDirective, i31.CancelCommandDirective, i32.SaveCommandDirective, i33.RemoveCommandDirective, i34.AddCommandDirective, i35.AddCommandToolbarDirective, i36.EditCommandToolbarDirective, i37.SaveCommandToolbarDirective, i38.RemoveCommandToolbarDirective, i39.CancelCommandToolbarDirective, i40.CellLoadingTemplateDirective, i41.LoadingTemplateDirective, i42.RowReorderColumnComponent, i43.SortCommandToolbarDirective, i44.FilterCommandToolbarDirective, i45.HeaderComponent, i46.HeaderTemplateDirective, i47.ColumnHandleDirective, i48.SelectAllCheckboxDirective, i49.FooterComponent, i50.CustomMessagesComponent, i50.PagerFocusableDirective, i50.PagerInfoComponent, i50.PagerInputComponent, i50.PagerNextButtonsComponent, i50.PagerNumericButtonsComponent, i50.PagerPageSizesComponent, i50.PagerPrevButtonsComponent, i50.PagerTemplateDirective, i50.PagerComponent, i50.PagerSpacerComponent, i51.ToolBarComponent, i51.ToolbarCustomMessagesComponent, i51.ToolBarButtonComponent, i51.ToolBarButtonGroupComponent, i51.ToolBarDropDownButtonComponent, i51.ToolBarSeparatorComponent, i51.ToolBarSpacerComponent, i51.ToolBarSplitButtonComponent, i51.ToolBarToolComponent, i52.FilterRowComponent, i53.FilterCellComponent, i54.FilterCellTemplateDirective, i55.StringFilterCellComponent, i56.NumericFilterCellComponent, i57.AutoCompleteFilterCellComponent, i58.BooleanFilterCellComponent, i59.FilterCellHostDirective, i60.FilterCellWrapperComponent, i61.DateFilterCellComponent, i6.ColumnComponent, i7.ColumnGroupComponent, i8.LogicalCellDirective, i9.LogicalRowDirective, i10.FocusableDirective, i11.FooterTemplateDirective, i12.ColGroupComponent, i13.ResizableContainerDirective, i14.TemplateContextDirective, i15.FieldAccessorPipe, i16.DetailTemplateDirective, i17.SpanColumnComponent, i18.LoadingComponent, i19.GridTableDirective, i62.FilterCellOperatorsComponent, i63.ContainsFilterOperatorComponent, i64.DoesNotContainFilterOperatorComponent, i65.EndsWithFilterOperatorComponent, i66.EqualFilterOperatorComponent, i67.IsEmptyFilterOperatorComponent, i68.IsNotEmptyFilterOperatorComponent, i69.IsNotNullFilterOperatorComponent, i70.IsNullFilterOperatorComponent, i71.NotEqualFilterOperatorComponent, i72.StartsWithFilterOperatorComponent, i73.GreaterFilterOperatorComponent, i74.GreaterOrEqualToFilterOperatorComponent, i75.LessFilterOperatorComponent, i76.LessOrEqualToFilterOperatorComponent, i77.AfterFilterOperatorComponent, i78.AfterEqFilterOperatorComponent, i79.BeforeEqFilterOperatorComponent, i80.BeforeFilterOperatorComponent, i81.FilterInputDirective, i6.ColumnComponent, i7.ColumnGroupComponent, i8.LogicalCellDirective, i9.LogicalRowDirective, i10.FocusableDirective, i11.FooterTemplateDirective, i12.ColGroupComponent, i13.ResizableContainerDirective, i14.TemplateContextDirective, i15.FieldAccessorPipe, i16.DetailTemplateDirective, i17.SpanColumnComponent, i18.LoadingComponent, i19.GridTableDirective, i62.FilterCellOperatorsComponent, i63.ContainsFilterOperatorComponent, i64.DoesNotContainFilterOperatorComponent, i65.EndsWithFilterOperatorComponent, i66.EqualFilterOperatorComponent, i67.IsEmptyFilterOperatorComponent, i68.IsNotEmptyFilterOperatorComponent, i69.IsNotNullFilterOperatorComponent, i70.IsNullFilterOperatorComponent, i71.NotEqualFilterOperatorComponent, i72.StartsWithFilterOperatorComponent, i73.GreaterFilterOperatorComponent, i74.GreaterOrEqualToFilterOperatorComponent, i75.LessFilterOperatorComponent, i76.LessOrEqualToFilterOperatorComponent, i77.AfterFilterOperatorComponent, i78.AfterEqFilterOperatorComponent, i79.BeforeEqFilterOperatorComponent, i80.BeforeFilterOperatorComponent, i81.FilterInputDirective, i82.FilterMenuComponent, i83.FilterMenuContainerComponent, i84.FilterMenuInputWrapperComponent, i85.StringFilterMenuInputComponent, i86.StringFilterMenuComponent, i87.FilterMenuTemplateDirective, i88.NumericFilterMenuComponent, i89.NumericFilterMenuInputComponent, i90.DateFilterMenuInputComponent, i91.DateFilterMenuComponent, i92.FilterMenuHostDirective, i93.BooleanFilterMenuComponent, i94.FilterMenuDropDownListDirective, i95.BooleanFilterRadioButtonDirective, i96.ColumnMenuChooserItemCheckedDirective, i97.ColumnListComponent, i98.ColumnChooserComponent, i99.ColumnChooserToolbarDirective, i100.ColumnMenuChooserComponent, i101.ColumnMenuFilterComponent, i102.ColumnMenuItemComponent, i103.ColumnMenuItemContentTemplateDirective, i104.ColumnMenuSortComponent, i105.ColumnMenuComponent, i106.ColumnMenuLockComponent, i107.ColumnMenuTemplateDirective, i108.ColumnMenuContainerComponent, i109.ColumnMenuItemDirective, i110.ColumnMenuStickComponent, i111.ColumnMenuPositionComponent, i112.ColumnMenuAutoSizeColumnComponent, i113.ColumnMenuAutoSizeAllColumnsComponent, i114.GridComponent, i115.ListComponent, i116.ToolbarComponent, i117.LocalizedMessagesDirective, i118.CustomMessagesComponent, i119.DataBindingDirective, i120.ToolbarTemplateDirective, i121.SelectionDirective, i122.TemplateEditingDirective, i123.ReactiveEditingDirective, i124.InCellEditingDirective, i125.ExternalEditingDirective, i126.ExpandDetailsDirective, i127.ExpandGroupDirective, i128.GroupBindingDirective, i129.GridMarqueeDirective, i130.GridSpacerComponent, i131.GridToolbarFocusableDirective, i132.StatusBarComponent, i133.StatusBarTemplateDirective, i134.GridClipboardDirective, i135.FormComponent, i136.DialogFormComponent, i137.FormFormFieldComponent, i51.ToolBarComponent, i51.ToolbarCustomMessagesComponent, i51.ToolBarButtonComponent, i51.ToolBarButtonGroupComponent, i51.ToolBarDropDownButtonComponent, i51.ToolBarSeparatorComponent, i51.ToolBarSpacerComponent, i51.ToolBarSplitButtonComponent, i51.ToolBarToolComponent, TableDirective], exports: [i114.GridComponent, i120.ToolbarTemplateDirective, i116.ToolbarComponent, i130.GridSpacerComponent, i133.StatusBarTemplateDirective, i119.DataBindingDirective, i121.SelectionDirective, i118.CustomMessagesComponent, i128.GroupBindingDirective, i122.TemplateEditingDirective, i123.ReactiveEditingDirective, i124.InCellEditingDirective, i125.ExternalEditingDirective, i126.ExpandDetailsDirective, i127.ExpandGroupDirective, i131.GridToolbarFocusableDirective, i1.GroupHeaderTemplateDirective, i2.GroupHeaderColumnTemplateDirective, i3.GroupFooterTemplateDirective, i4.GroupHeaderComponent, i5.GroupPanelComponent, i6.ColumnComponent, i7.ColumnGroupComponent, i8.LogicalCellDirective, i9.LogicalRowDirective, i10.FocusableDirective, i11.FooterTemplateDirective, i12.ColGroupComponent, i13.ResizableContainerDirective, i14.TemplateContextDirective, i15.FieldAccessorPipe, i16.DetailTemplateDirective, i17.SpanColumnComponent, i18.LoadingComponent, i19.GridTableDirective, i20.CommandColumnComponent, i21.CheckboxColumnComponent, i22.SelectionCheckboxDirective, i23.CellTemplateDirective, i24.EditTemplateDirective, i25.RowDragHandleTemplateDirective, i26.RowDragHintTemplateDirective, i27.TableBodyComponent, i28.NoRecordsTemplateDirective, i29.CellComponent, i30.EditCommandDirective, i31.CancelCommandDirective, i32.SaveCommandDirective, i33.RemoveCommandDirective, i34.AddCommandDirective, i35.AddCommandToolbarDirective, i36.EditCommandToolbarDirective, i37.SaveCommandToolbarDirective, i38.RemoveCommandToolbarDirective, i39.CancelCommandToolbarDirective, i40.CellLoadingTemplateDirective, i41.LoadingTemplateDirective, i42.RowReorderColumnComponent, i43.SortCommandToolbarDirective, i44.FilterCommandToolbarDirective, i45.HeaderComponent, i46.HeaderTemplateDirective, i47.ColumnHandleDirective, i48.SelectAllCheckboxDirective, i52.FilterRowComponent, i53.FilterCellComponent, i54.FilterCellTemplateDirective, i55.StringFilterCellComponent, i56.NumericFilterCellComponent, i57.AutoCompleteFilterCellComponent, i58.BooleanFilterCellComponent, i59.FilterCellHostDirective, i60.FilterCellWrapperComponent, i61.DateFilterCellComponent, i62.FilterCellOperatorsComponent, i63.ContainsFilterOperatorComponent, i64.DoesNotContainFilterOperatorComponent, i65.EndsWithFilterOperatorComponent, i66.EqualFilterOperatorComponent, i67.IsEmptyFilterOperatorComponent, i68.IsNotEmptyFilterOperatorComponent, i69.IsNotNullFilterOperatorComponent, i70.IsNullFilterOperatorComponent, i71.NotEqualFilterOperatorComponent, i72.StartsWithFilterOperatorComponent, i73.GreaterFilterOperatorComponent, i74.GreaterOrEqualToFilterOperatorComponent, i75.LessFilterOperatorComponent, i76.LessOrEqualToFilterOperatorComponent, i77.AfterFilterOperatorComponent, i78.AfterEqFilterOperatorComponent, i79.BeforeEqFilterOperatorComponent, i80.BeforeFilterOperatorComponent, i82.FilterMenuComponent, i83.FilterMenuContainerComponent, i84.FilterMenuInputWrapperComponent, i85.StringFilterMenuInputComponent, i86.StringFilterMenuComponent, i87.FilterMenuTemplateDirective, i88.NumericFilterMenuComponent, i89.NumericFilterMenuInputComponent, i90.DateFilterMenuInputComponent, i91.DateFilterMenuComponent, i92.FilterMenuHostDirective, i93.BooleanFilterMenuComponent, i94.FilterMenuDropDownListDirective, i95.BooleanFilterRadioButtonDirective, i98.ColumnChooserComponent, i99.ColumnChooserToolbarDirective, i101.ColumnMenuFilterComponent, i102.ColumnMenuItemComponent, i103.ColumnMenuItemContentTemplateDirective, i104.ColumnMenuSortComponent, i106.ColumnMenuLockComponent, i110.ColumnMenuStickComponent, i111.ColumnMenuPositionComponent, i100.ColumnMenuChooserComponent, i107.ColumnMenuTemplateDirective, i108.ColumnMenuContainerComponent, i109.ColumnMenuItemDirective, i105.ColumnMenuComponent, i112.ColumnMenuAutoSizeColumnComponent, i113.ColumnMenuAutoSizeAllColumnsComponent, i134.GridClipboardDirective, i51.ToolBarComponent, i51.ToolbarCustomMessagesComponent, i51.ToolBarButtonComponent, i51.ToolBarButtonGroupComponent, i51.ToolBarDropDownButtonComponent, i51.ToolBarSeparatorComponent, i51.ToolBarSpacerComponent, i51.ToolBarSplitButtonComponent, i51.ToolBarToolComponent, i50.CustomMessagesComponent, i50.PagerFocusableDirective, i50.PagerInfoComponent, i50.PagerInputComponent, i50.PagerNextButtonsComponent, i50.PagerNumericButtonsComponent, i50.PagerPageSizesComponent, i50.PagerPrevButtonsComponent, i50.PagerTemplateDirective, i50.PagerComponent, i50.PagerSpacerComponent] });
182
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: GridModule, imports: [i1.GroupHeaderTemplateDirective, i2.GroupHeaderColumnTemplateDirective, i3.GroupFooterTemplateDirective, i4.GroupHeaderComponent, i5.GroupPanelComponent, i6.ColumnComponent, i7.ColumnGroupComponent, i8.LogicalCellDirective, i9.LogicalRowDirective, i10.FocusableDirective, i11.FooterTemplateDirective, i12.ColGroupComponent, i13.ResizableContainerDirective, i14.TemplateContextDirective, i15.FieldAccessorPipe, i16.DetailTemplateDirective, i17.SpanColumnComponent, i18.LoadingComponent, i19.GridTableDirective, i20.CommandColumnComponent, i21.CheckboxColumnComponent, i22.SelectionCheckboxDirective, i23.CellTemplateDirective, i24.EditTemplateDirective, i25.RowDragHandleTemplateDirective, i26.RowDragHintTemplateDirective, i27.TableBodyComponent, i28.NoRecordsTemplateDirective, i29.CellComponent, i30.EditCommandDirective, i31.CancelCommandDirective, i32.SaveCommandDirective, i33.RemoveCommandDirective, i34.AddCommandDirective, i35.AddCommandToolbarDirective, i36.EditCommandToolbarDirective, i37.SaveCommandToolbarDirective, i38.RemoveCommandToolbarDirective, i39.CancelCommandToolbarDirective, i40.CellLoadingTemplateDirective, i41.LoadingTemplateDirective, i42.RowReorderColumnComponent, i43.SortCommandToolbarDirective, i44.FilterCommandToolbarDirective, i45.HeaderComponent, i46.HeaderTemplateDirective, i47.ColumnHandleDirective, i48.SelectAllCheckboxDirective, i49.FooterComponent, i50.CustomMessagesComponent, i50.PagerFocusableDirective, i50.PagerInfoComponent, i50.PagerInputComponent, i50.PagerNextButtonsComponent, i50.PagerNumericButtonsComponent, i50.PagerPageSizesComponent, i50.PagerPrevButtonsComponent, i50.PagerTemplateDirective, i50.PagerComponent, i50.PagerSpacerComponent, i51.ToolBarComponent, i51.ToolbarCustomMessagesComponent, i51.ToolBarButtonComponent, i51.ToolBarButtonGroupComponent, i51.ToolBarDropDownButtonComponent, i51.ToolBarSeparatorComponent, i51.ToolBarSpacerComponent, i51.ToolBarSplitButtonComponent, i51.ToolBarToolComponent, i52.FilterRowComponent, i53.FilterCellComponent, i54.FilterCellTemplateDirective, i55.StringFilterCellComponent, i56.NumericFilterCellComponent, i57.AutoCompleteFilterCellComponent, i58.BooleanFilterCellComponent, i59.FilterCellHostDirective, i60.FilterCellWrapperComponent, i61.DateFilterCellComponent, i6.ColumnComponent, i7.ColumnGroupComponent, i8.LogicalCellDirective, i9.LogicalRowDirective, i10.FocusableDirective, i11.FooterTemplateDirective, i12.ColGroupComponent, i13.ResizableContainerDirective, i14.TemplateContextDirective, i15.FieldAccessorPipe, i16.DetailTemplateDirective, i17.SpanColumnComponent, i18.LoadingComponent, i19.GridTableDirective, i62.FilterCellOperatorsComponent, i63.ContainsFilterOperatorComponent, i64.DoesNotContainFilterOperatorComponent, i65.EndsWithFilterOperatorComponent, i66.EqualFilterOperatorComponent, i67.IsEmptyFilterOperatorComponent, i68.IsNotEmptyFilterOperatorComponent, i69.IsNotNullFilterOperatorComponent, i70.IsNullFilterOperatorComponent, i71.NotEqualFilterOperatorComponent, i72.StartsWithFilterOperatorComponent, i73.GreaterFilterOperatorComponent, i74.GreaterOrEqualToFilterOperatorComponent, i75.LessFilterOperatorComponent, i76.LessOrEqualToFilterOperatorComponent, i77.AfterFilterOperatorComponent, i78.AfterEqFilterOperatorComponent, i79.BeforeEqFilterOperatorComponent, i80.BeforeFilterOperatorComponent, i81.FilterInputDirective, i6.ColumnComponent, i7.ColumnGroupComponent, i8.LogicalCellDirective, i9.LogicalRowDirective, i10.FocusableDirective, i11.FooterTemplateDirective, i12.ColGroupComponent, i13.ResizableContainerDirective, i14.TemplateContextDirective, i15.FieldAccessorPipe, i16.DetailTemplateDirective, i17.SpanColumnComponent, i18.LoadingComponent, i19.GridTableDirective, i62.FilterCellOperatorsComponent, i63.ContainsFilterOperatorComponent, i64.DoesNotContainFilterOperatorComponent, i65.EndsWithFilterOperatorComponent, i66.EqualFilterOperatorComponent, i67.IsEmptyFilterOperatorComponent, i68.IsNotEmptyFilterOperatorComponent, i69.IsNotNullFilterOperatorComponent, i70.IsNullFilterOperatorComponent, i71.NotEqualFilterOperatorComponent, i72.StartsWithFilterOperatorComponent, i73.GreaterFilterOperatorComponent, i74.GreaterOrEqualToFilterOperatorComponent, i75.LessFilterOperatorComponent, i76.LessOrEqualToFilterOperatorComponent, i77.AfterFilterOperatorComponent, i78.AfterEqFilterOperatorComponent, i79.BeforeEqFilterOperatorComponent, i80.BeforeFilterOperatorComponent, i81.FilterInputDirective, i82.FilterMenuComponent, i83.FilterMenuContainerComponent, i84.FilterMenuInputWrapperComponent, i85.StringFilterMenuInputComponent, i86.StringFilterMenuComponent, i87.FilterMenuTemplateDirective, i88.NumericFilterMenuComponent, i89.NumericFilterMenuInputComponent, i90.DateFilterMenuInputComponent, i91.DateFilterMenuComponent, i92.FilterMenuHostDirective, i93.BooleanFilterMenuComponent, i94.FilterMenuDropDownListDirective, i95.BooleanFilterRadioButtonDirective, i96.ColumnMenuChooserItemCheckedDirective, i97.ColumnListComponent, i98.ColumnChooserComponent, i99.ColumnChooserToolbarDirective, i100.ColumnMenuChooserComponent, i101.ColumnMenuFilterComponent, i102.ColumnMenuItemComponent, i103.ColumnMenuItemContentTemplateDirective, i104.ColumnMenuSortComponent, i105.ColumnMenuComponent, i106.ColumnMenuLockComponent, i107.ColumnMenuTemplateDirective, i108.ColumnMenuContainerComponent, i109.ColumnMenuItemDirective, i110.ColumnMenuStickComponent, i111.ColumnMenuPositionComponent, i112.ColumnMenuAutoSizeColumnComponent, i113.ColumnMenuAutoSizeAllColumnsComponent, i114.GridComponent, i115.ListComponent, i116.ToolbarComponent, i117.LocalizedMessagesDirective, i118.CustomMessagesComponent, i119.DataBindingDirective, i120.ToolbarTemplateDirective, i121.SelectionDirective, i122.TemplateEditingDirective, i123.ReactiveEditingDirective, i124.InCellEditingDirective, i125.ExternalEditingDirective, i126.ExpandDetailsDirective, i127.ExpandGroupDirective, i128.GroupBindingDirective, i129.GridMarqueeDirective, i130.GridSpacerComponent, i131.GridToolbarFocusableDirective, i132.StatusBarComponent, i133.StatusBarTemplateDirective, i134.GridClipboardDirective, i135.FormComponent, i136.DialogFormComponent, i137.FormFormFieldComponent, i138.UndoRedoDirective, i51.ToolBarComponent, i51.ToolbarCustomMessagesComponent, i51.ToolBarButtonComponent, i51.ToolBarButtonGroupComponent, i51.ToolBarDropDownButtonComponent, i51.ToolBarSeparatorComponent, i51.ToolBarSpacerComponent, i51.ToolBarSplitButtonComponent, i51.ToolBarToolComponent, TableDirective,
183
+ UndoCommandToolbarDirective,
184
+ RedoCommandToolbarDirective], exports: [i114.GridComponent, i120.ToolbarTemplateDirective, i116.ToolbarComponent, i130.GridSpacerComponent, i133.StatusBarTemplateDirective, i119.DataBindingDirective, i121.SelectionDirective, i118.CustomMessagesComponent, i128.GroupBindingDirective, i122.TemplateEditingDirective, i123.ReactiveEditingDirective, i124.InCellEditingDirective, i125.ExternalEditingDirective, i126.ExpandDetailsDirective, i127.ExpandGroupDirective, i131.GridToolbarFocusableDirective, i1.GroupHeaderTemplateDirective, i2.GroupHeaderColumnTemplateDirective, i3.GroupFooterTemplateDirective, i4.GroupHeaderComponent, i5.GroupPanelComponent, i6.ColumnComponent, i7.ColumnGroupComponent, i8.LogicalCellDirective, i9.LogicalRowDirective, i10.FocusableDirective, i11.FooterTemplateDirective, i12.ColGroupComponent, i13.ResizableContainerDirective, i14.TemplateContextDirective, i15.FieldAccessorPipe, i16.DetailTemplateDirective, i17.SpanColumnComponent, i18.LoadingComponent, i19.GridTableDirective, i20.CommandColumnComponent, i21.CheckboxColumnComponent, i22.SelectionCheckboxDirective, i23.CellTemplateDirective, i24.EditTemplateDirective, i25.RowDragHandleTemplateDirective, i26.RowDragHintTemplateDirective, i27.TableBodyComponent, i28.NoRecordsTemplateDirective, i29.CellComponent, i30.EditCommandDirective, i31.CancelCommandDirective, i32.SaveCommandDirective, i33.RemoveCommandDirective, i34.AddCommandDirective, i35.AddCommandToolbarDirective, i36.EditCommandToolbarDirective, i37.SaveCommandToolbarDirective, i38.RemoveCommandToolbarDirective, i39.CancelCommandToolbarDirective, i40.CellLoadingTemplateDirective, i41.LoadingTemplateDirective, i42.RowReorderColumnComponent, i43.SortCommandToolbarDirective, i44.FilterCommandToolbarDirective, i45.HeaderComponent, i46.HeaderTemplateDirective, i47.ColumnHandleDirective, i48.SelectAllCheckboxDirective, i52.FilterRowComponent, i53.FilterCellComponent, i54.FilterCellTemplateDirective, i55.StringFilterCellComponent, i56.NumericFilterCellComponent, i57.AutoCompleteFilterCellComponent, i58.BooleanFilterCellComponent, i59.FilterCellHostDirective, i60.FilterCellWrapperComponent, i61.DateFilterCellComponent, i62.FilterCellOperatorsComponent, i63.ContainsFilterOperatorComponent, i64.DoesNotContainFilterOperatorComponent, i65.EndsWithFilterOperatorComponent, i66.EqualFilterOperatorComponent, i67.IsEmptyFilterOperatorComponent, i68.IsNotEmptyFilterOperatorComponent, i69.IsNotNullFilterOperatorComponent, i70.IsNullFilterOperatorComponent, i71.NotEqualFilterOperatorComponent, i72.StartsWithFilterOperatorComponent, i73.GreaterFilterOperatorComponent, i74.GreaterOrEqualToFilterOperatorComponent, i75.LessFilterOperatorComponent, i76.LessOrEqualToFilterOperatorComponent, i77.AfterFilterOperatorComponent, i78.AfterEqFilterOperatorComponent, i79.BeforeEqFilterOperatorComponent, i80.BeforeFilterOperatorComponent, i82.FilterMenuComponent, i83.FilterMenuContainerComponent, i84.FilterMenuInputWrapperComponent, i85.StringFilterMenuInputComponent, i86.StringFilterMenuComponent, i87.FilterMenuTemplateDirective, i88.NumericFilterMenuComponent, i89.NumericFilterMenuInputComponent, i90.DateFilterMenuInputComponent, i91.DateFilterMenuComponent, i92.FilterMenuHostDirective, i93.BooleanFilterMenuComponent, i94.FilterMenuDropDownListDirective, i95.BooleanFilterRadioButtonDirective, i98.ColumnChooserComponent, i99.ColumnChooserToolbarDirective, i101.ColumnMenuFilterComponent, i102.ColumnMenuItemComponent, i103.ColumnMenuItemContentTemplateDirective, i104.ColumnMenuSortComponent, i106.ColumnMenuLockComponent, i110.ColumnMenuStickComponent, i111.ColumnMenuPositionComponent, i100.ColumnMenuChooserComponent, i107.ColumnMenuTemplateDirective, i108.ColumnMenuContainerComponent, i109.ColumnMenuItemDirective, i105.ColumnMenuComponent, i112.ColumnMenuAutoSizeColumnComponent, i113.ColumnMenuAutoSizeAllColumnsComponent, i134.GridClipboardDirective, i138.UndoRedoDirective, i139.UndoCommandToolbarDirective, i140.RedoCommandToolbarDirective, i51.ToolBarComponent, i51.ToolbarCustomMessagesComponent, i51.ToolBarButtonComponent, i51.ToolBarButtonGroupComponent, i51.ToolBarDropDownButtonComponent, i51.ToolBarSeparatorComponent, i51.ToolBarSpacerComponent, i51.ToolBarSplitButtonComponent, i51.ToolBarToolComponent, i50.CustomMessagesComponent, i50.PagerFocusableDirective, i50.PagerInfoComponent, i50.PagerInputComponent, i50.PagerNextButtonsComponent, i50.PagerNumericButtonsComponent, i50.PagerPageSizesComponent, i50.PagerPrevButtonsComponent, i50.PagerTemplateDirective, i50.PagerComponent, i50.PagerSpacerComponent] });
178
185
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GridModule, providers: [
179
186
  PopupService,
180
187
  ResizeBatchService,
@@ -208,7 +215,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
208
215
  ...KENDO_GRID_COLUMN_MENU_DECLARATIONS,
209
216
  ...KENDO_GRID_DECLARATIONS,
210
217
  ...KENDO_TOOLBAR,
211
- TableDirective
218
+ TableDirective,
219
+ UndoCommandToolbarDirective,
220
+ RedoCommandToolbarDirective
212
221
  ],
213
222
  providers: [
214
223
  PopupService,
package/esm2022/index.mjs CHANGED
@@ -147,6 +147,11 @@ export { ColumnStickyChangeEvent } from './column-menu/column-sticky-change-even
147
147
  export { SinglePopupService, PopupCloseEvent } from './common/single-popup.service';
148
148
  // Clipboard
149
149
  export { GridClipboardDirective } from './common/clipboard.directive';
150
+ // State
151
+ export * from './state-management/grid-state.models';
152
+ export { UndoRedoDirective } from './state-management/undo-redo.directive';
153
+ export { UndoCommandToolbarDirective } from './state-management/undo-command-tool';
154
+ export { RedoCommandToolbarDirective } from './state-management/redo-command-tool';
150
155
  // addresses error NG3001: Unsupported private class
151
156
  export { ColumnMenuTemplateDirective } from './column-menu/column-menu-template.directive';
152
157
  export { EditCommandDirective } from './editing/edit-command.directive';
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1746798571,
14
- version: '19.0.0-develop.11',
13
+ publishDate: 1747133599,
14
+ version: '19.0.0-develop.13',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -110,7 +110,7 @@ export class CellComponent {
110
110
  get isSpanColumn() {
111
111
  return isSpanColumn(this.column) && !this.column.templateRef;
112
112
  }
113
- get childColumns() {
113
+ get children() {
114
114
  return columnsToRender([this.column]);
115
115
  }
116
116
  get isRowReorderColumn() {
@@ -183,7 +183,7 @@ export class CellComponent {
183
183
  [ngTemplateOutletContext]="templateContext">
184
184
  </ng-template>
185
185
  <ng-container *ngIf="isSpanColumn">
186
- <ng-container *ngFor="let childColumn of childColumns">
186
+ <ng-container *ngFor="let childColumn of children">
187
187
  {{ dataItem | valueOf: childColumn.field: childColumn.format}}
188
188
  </ng-container>
189
189
  </ng-container>
@@ -275,7 +275,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
275
275
  [ngTemplateOutletContext]="templateContext">
276
276
  </ng-template>
277
277
  <ng-container *ngIf="isSpanColumn">
278
- <ng-container *ngFor="let childColumn of childColumns">
278
+ <ng-container *ngFor="let childColumn of children">
279
279
  {{ dataItem | valueOf: childColumn.field: childColumn.format}}
280
280
  </ng-container>
281
281
  </ng-container>
@@ -433,7 +433,7 @@ export class HeaderComponent {
433
433
  const arr = this.dropTargets.toArray();
434
434
  const firstSpan = arr.find(t => t.context.column.parent === parent);
435
435
  const index = arr.indexOf(firstSpan);
436
- const adjust = e.before ? 0 : parent.childColumns.length - 1;
436
+ const adjust = e.before ? 0 : parent.children.length - 1;
437
437
  target = arr[index + adjust];
438
438
  }
439
439
  return mergeObjects(e, { target });
@@ -616,7 +616,7 @@ export class ListComponent {
616
616
  for (let idx = 0; idx < leafColumns.length; idx++) {
617
617
  const column = leafColumns[idx];
618
618
  if (column.isSpanColumn) {
619
- viewportEnd += column.childColumns.length;
619
+ viewportEnd += column.children.length;
620
620
  }
621
621
  }
622
622
  this.navigationService.setColumnViewport(viewportStart, viewportEnd);
@@ -348,7 +348,7 @@ export class TableBodyComponent {
348
348
  }
349
349
  get footerColumns() {
350
350
  const colsToRender = Array.from(this.columns).reduce((cols, col) => {
351
- const newCols = (col instanceof SpanColumnComponent) ? Array.from(col.childColumns) : [col];
351
+ const newCols = (col instanceof SpanColumnComponent) ? Array.from(col.children) : [col];
352
352
  return [...cols, ...newCols];
353
353
  }, []);
354
354
  return colsToRender;
@@ -0,0 +1,26 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { PreventableEvent } from "@progress/kendo-angular-common";
6
+ /**
7
+ * Arguments for the `undo` and `redo` events.
8
+ */
9
+ export class UndoRedoEvent extends PreventableEvent {
10
+ /**
11
+ * The event data of the original action that triggered the state change.
12
+ */
13
+ originalEvent;
14
+ /**
15
+ * The grid state and rendered data at the time of the action.
16
+ */
17
+ gridState;
18
+ /**
19
+ * @hidden
20
+ */
21
+ constructor({ originalEvent, gridState }) {
22
+ super();
23
+ this.originalEvent = originalEvent;
24
+ this.gridState = gridState;
25
+ }
26
+ }
@@ -0,0 +1,66 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Directive } from '@angular/core';
6
+ import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
+ import { Subscription } from 'rxjs';
8
+ import { redoIcon } from '@progress/kendo-svg-icons';
9
+ import { UndoRedoService } from './undo-redo.service';
10
+ import * as i0 from "@angular/core";
11
+ import * as i1 from "./undo-redo.service";
12
+ import * as i2 from "@progress/kendo-angular-toolbar";
13
+ /**
14
+ * Represents the command for triggering the redo action in the Grid.
15
+ * You can apply this directive to any `kendo-toolbar-button` element inside a
16
+ * ToolbarComponent used in the Grid.
17
+ *
18
+ * When the user clicks the toolbar button that is associated with the directive, the
19
+ * [redo]({% slug api_grid_undoredodirective %}#toc-redo) event is triggered.
20
+ *
21
+ * @example
22
+ * ```html-no-run
23
+ * <kendo-grid>
24
+ * <kendo-toolbar>
25
+ * <kendo-toolbar-button kendoGridRedoTool></kendo-toolbar-button>
26
+ * </kendo-toolbar>
27
+ * </kendo-grid>
28
+ * ```
29
+ */
30
+ export class RedoCommandToolbarDirective {
31
+ undoRedoService;
32
+ host;
33
+ subs = new Subscription();
34
+ constructor(undoRedoService, host) {
35
+ this.undoRedoService = undoRedoService;
36
+ this.host = host;
37
+ }
38
+ ngOnInit() {
39
+ this.subs = this.host.click.subscribe(e => this.onClick(e));
40
+ this.host.className = 'k-grid-redo-command';
41
+ this.host.svgIcon = redoIcon;
42
+ this.host.icon = 'redo';
43
+ this.host.text = 'Redo';
44
+ this.host.disabled = true;
45
+ this.subs.add(this.undoRedoService.stackEndReached.subscribe((stackEnd) => this.host.disabled = stackEnd === 'end'));
46
+ }
47
+ ngOnDestroy() {
48
+ this.subs.unsubscribe();
49
+ }
50
+ /**
51
+ * @hidden
52
+ */
53
+ onClick(e) {
54
+ e.preventDefault();
55
+ this.undoRedoService.onRedo.next();
56
+ }
57
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RedoCommandToolbarDirective, deps: [{ token: i1.UndoRedoService }, { token: i2.ToolBarButtonComponent }], target: i0.ɵɵFactoryTarget.Directive });
58
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: RedoCommandToolbarDirective, isStandalone: true, selector: "[kendoGridRedoTool]", ngImport: i0 });
59
+ }
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RedoCommandToolbarDirective, decorators: [{
61
+ type: Directive,
62
+ args: [{
63
+ selector: '[kendoGridRedoTool]',
64
+ standalone: true
65
+ }]
66
+ }], ctorParameters: function () { return [{ type: i1.UndoRedoService }, { type: i2.ToolBarButtonComponent }]; } });
@@ -0,0 +1,66 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Directive } from '@angular/core';
6
+ import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
+ import { Subscription } from 'rxjs';
8
+ import { undoIcon } from '@progress/kendo-svg-icons';
9
+ import { UndoRedoService } from './undo-redo.service';
10
+ import * as i0 from "@angular/core";
11
+ import * as i1 from "./undo-redo.service";
12
+ import * as i2 from "@progress/kendo-angular-toolbar";
13
+ /**
14
+ * Represents the command for triggering the undo action in the Grid.
15
+ * You can apply this directive to any `kendo-toolbar-button` element inside a
16
+ * ToolbarComponent used in the Grid.
17
+ *
18
+ * When the user clicks the toolbar button that is associated with the directive, the
19
+ * [undo]({% slug api_grid_undoredodirective %}#toc-undo) event is triggered.
20
+ *
21
+ * @example
22
+ * ```html-no-run
23
+ * <kendo-grid>
24
+ * <kendo-toolbar>
25
+ * <kendo-toolbar-button kendoGridUndoTool></kendo-toolbar-button>
26
+ * </kendo-toolbar>
27
+ * </kendo-grid>
28
+ * ```
29
+ */
30
+ export class UndoCommandToolbarDirective {
31
+ undoRedoService;
32
+ host;
33
+ subs = new Subscription();
34
+ constructor(undoRedoService, host) {
35
+ this.undoRedoService = undoRedoService;
36
+ this.host = host;
37
+ }
38
+ ngOnInit() {
39
+ this.subs = this.host.click.subscribe(e => this.onClick(e));
40
+ this.host.className = 'k-grid-undo-command';
41
+ this.host.svgIcon = undoIcon;
42
+ this.host.icon = 'undo';
43
+ this.host.text = 'Undo';
44
+ this.host.disabled = true;
45
+ this.subs.add(this.undoRedoService.stackEndReached.subscribe((stackEnd) => this.host.disabled = stackEnd === 'start'));
46
+ }
47
+ ngOnDestroy() {
48
+ this.subs.unsubscribe();
49
+ }
50
+ /**
51
+ * @hidden
52
+ */
53
+ onClick(e) {
54
+ e.preventDefault();
55
+ this.undoRedoService.onUndo.next();
56
+ }
57
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UndoCommandToolbarDirective, deps: [{ token: i1.UndoRedoService }, { token: i2.ToolBarButtonComponent }], target: i0.ɵɵFactoryTarget.Directive });
58
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: UndoCommandToolbarDirective, isStandalone: true, selector: "[kendoGridUndoTool]", ngImport: i0 });
59
+ }
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UndoCommandToolbarDirective, decorators: [{
61
+ type: Directive,
62
+ args: [{
63
+ selector: '[kendoGridUndoTool]',
64
+ standalone: true
65
+ }]
66
+ }], ctorParameters: function () { return [{ type: i1.UndoRedoService }, { type: i2.ToolBarButtonComponent }]; } });
@@ -0,0 +1,178 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Directive, EventEmitter, Input, Output } from '@angular/core';
6
+ import { UndoRedoStack } from './undo-redo.stack';
7
+ import { GridComponent } from '../grid.component';
8
+ import { UndoRedoEvent } from './grid-state.models';
9
+ import { Subscription } from 'rxjs';
10
+ import { EditService } from '../editing/edit.service';
11
+ import { filter, tap } from 'rxjs/operators';
12
+ import { UndoRedoService } from './undo-redo.service';
13
+ import { hasObservers } from '@progress/kendo-angular-common';
14
+ import { ChangeNotificationService } from '../data/change-notification.service';
15
+ import * as i0 from "@angular/core";
16
+ import * as i1 from "../grid.component";
17
+ import * as i2 from "../editing/edit.service";
18
+ import * as i3 from "./undo-redo.service";
19
+ import * as i4 from "../data/change-notification.service";
20
+ export class UndoRedoDirective {
21
+ host;
22
+ editService;
23
+ undoRedoService;
24
+ changeNotification;
25
+ /**
26
+ * Determines the maximum number of actions to keep in the undo-redo stack.
27
+ * @default 10
28
+ */
29
+ maxStoredStates = 10;
30
+ /**
31
+ * Fires when undo action is performed. Exposes the state of the grid that will be applied.
32
+ */
33
+ onUndo = new EventEmitter();
34
+ /**
35
+ * Fires when undo action is performed. Exposes the state of the grid that will be applied.
36
+ */
37
+ onRedo = new EventEmitter();
38
+ /**
39
+ * Returns an array of all undo-redo actions that are currently in the stack.
40
+ */
41
+ get undoRedoItems() {
42
+ return this.stack.toArray();
43
+ }
44
+ stack;
45
+ subs = new Subscription();
46
+ addToState = true;
47
+ constructor(host, editService, undoRedoService, changeNotification) {
48
+ this.host = host;
49
+ this.editService = editService;
50
+ this.undoRedoService = undoRedoService;
51
+ this.changeNotification = changeNotification;
52
+ this.host.undoRedoService = this.undoRedoService;
53
+ }
54
+ ngOnInit() {
55
+ this.stack = new UndoRedoStack(this.maxStoredStates);
56
+ this.stack.add({
57
+ originalEvent: {
58
+ skip: this.host.skip,
59
+ take: this.host.pageSize,
60
+ sort: this.host.sort,
61
+ filter: this.host.filter,
62
+ group: this.host.group
63
+ }, gridState: structuredClone(this.host.currentState)
64
+ });
65
+ this.subs = this.host.gridStateChange.subscribe((state) => {
66
+ if (this.addToState) {
67
+ this.stack.add({
68
+ originalEvent: {
69
+ skip: state.skip,
70
+ take: state.take,
71
+ sort: state.sort,
72
+ filter: state.filter,
73
+ group: state.group
74
+ },
75
+ gridState: structuredClone(state)
76
+ });
77
+ }
78
+ let stackEndPointReached;
79
+ if (this.stack.canUndo) {
80
+ stackEndPointReached = this.stack.canRedo ? false : 'end';
81
+ }
82
+ else {
83
+ stackEndPointReached = 'start';
84
+ }
85
+ this.undoRedoService.stackEndReached.next(stackEndPointReached);
86
+ });
87
+ this.subs.add(this.editService.changes
88
+ .pipe(filter(event => event.action === 'save' || event.action === 'remove'), tap(event => this.undoRedoService.originalEvent = event))
89
+ .subscribe(event => {
90
+ this.stack.add({
91
+ originalEvent: event,
92
+ gridState: structuredClone(this.host.currentState)
93
+ });
94
+ this.addToState = false;
95
+ this.host.gridStateChange.emit(this.stack.current.gridState);
96
+ this.addToState = true;
97
+ this.updateUndoRedoDisabled();
98
+ }));
99
+ this.subs.add(this.changeNotification.changes.subscribe(() => this.stack.current.gridState = this.host.currentState));
100
+ ['Undo', 'Redo'].forEach((action) => {
101
+ this.subs.add(this.undoRedoService[`on${action}`].subscribe(() => {
102
+ if (!this.stack[`can${action}`]) {
103
+ return;
104
+ }
105
+ this.stack[`${action.toLowerCase()}`]();
106
+ if (hasObservers(this[`on${action}`])) {
107
+ const event = new UndoRedoEvent(this.stack.current);
108
+ this[`on${action}`].emit(event);
109
+ if (event.isDefaultPrevented()) {
110
+ return;
111
+ }
112
+ }
113
+ this.updateUndoRedoDisabled();
114
+ this.host.loadState(this.stack.current.gridState);
115
+ }));
116
+ });
117
+ this.subs.add(this.undoRedoService.setState.subscribe((state) => this.stack.add({ originalEvent: 'dataChange', gridState: state })));
118
+ }
119
+ ngOnDestroy() {
120
+ this.stack.clear();
121
+ this.stack = null;
122
+ this.subs.unsubscribe();
123
+ }
124
+ /**
125
+ * Re-applies the last action, reverted by the `undo` method.
126
+ */
127
+ redo() {
128
+ if (this.stack.canRedo) {
129
+ this.stack.redo();
130
+ this.host.loadState(this.stack.current.gridState);
131
+ if (!this.stack.canRedo) {
132
+ this.undoRedoService.stackEndReached.next('end');
133
+ }
134
+ }
135
+ }
136
+ /**
137
+ * Reverts the last user action.
138
+ */
139
+ undo() {
140
+ if (this.stack.canUndo) {
141
+ this.stack.undo();
142
+ this.host.loadState(this.stack.current.gridState);
143
+ if (!this.stack.canUndo) {
144
+ this.undoRedoService.stackEndReached.next('start');
145
+ }
146
+ }
147
+ }
148
+ updateUndoRedoDisabled() {
149
+ if (!this.stack.canRedo) {
150
+ this.undoRedoService.stackEndReached.next('end');
151
+ return;
152
+ }
153
+ if (!this.stack.canUndo) {
154
+ this.undoRedoService.stackEndReached.next('start');
155
+ return;
156
+ }
157
+ this.undoRedoService.stackEndReached.next(false);
158
+ }
159
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UndoRedoDirective, deps: [{ token: i1.GridComponent }, { token: i2.EditService }, { token: i3.UndoRedoService }, { token: i4.ChangeNotificationService }], target: i0.ɵɵFactoryTarget.Directive });
160
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: UndoRedoDirective, isStandalone: true, selector: "[kendoGridUndoRedo]", inputs: { maxStoredStates: "maxStoredStates" }, outputs: { onUndo: "undo", onRedo: "redo" }, providers: [UndoRedoService], exportAs: ["kendoGridUndoRedo"], ngImport: i0 });
161
+ }
162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UndoRedoDirective, decorators: [{
163
+ type: Directive,
164
+ args: [{
165
+ selector: '[kendoGridUndoRedo]',
166
+ standalone: true,
167
+ exportAs: 'kendoGridUndoRedo',
168
+ providers: [UndoRedoService]
169
+ }]
170
+ }], ctorParameters: function () { return [{ type: i1.GridComponent }, { type: i2.EditService }, { type: i3.UndoRedoService }, { type: i4.ChangeNotificationService }]; }, propDecorators: { maxStoredStates: [{
171
+ type: Input
172
+ }], onUndo: [{
173
+ type: Output,
174
+ args: ['undo']
175
+ }], onRedo: [{
176
+ type: Output,
177
+ args: ['redo']
178
+ }] } });
@@ -0,0 +1,22 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Injectable } from '@angular/core';
6
+ import { Subject } from 'rxjs';
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * @hidden
10
+ */
11
+ export class UndoRedoService {
12
+ originalEvent;
13
+ onUndo = new Subject();
14
+ onRedo = new Subject();
15
+ stackEndReached = new Subject();
16
+ setState = new Subject();
17
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UndoRedoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
18
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UndoRedoService });
19
+ }
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UndoRedoService, decorators: [{
21
+ type: Injectable
22
+ }] });