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

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 +105 -40
  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 +697 -66
  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
@@ -6,12 +6,12 @@ import * as i0 from '@angular/core';
6
6
  import { EventEmitter, Injectable, SecurityContext, InjectionToken, Optional, Inject, Directive, SkipSelf, Input, isDevMode, QueryList, Component, ContentChildren, ContentChild, forwardRef, Host, Output, HostBinding, Pipe, TemplateRef, ChangeDetectionStrategy, ViewChildren, ViewChild, Self, NgZone, HostListener, ViewContainerRef, ViewEncapsulation, inject, ElementRef, Injector, NgModule } from '@angular/core';
7
7
  import { merge, of, Subject, zip as zip$1, from, Subscription, interval, fromEvent, Observable, BehaviorSubject } from 'rxjs';
8
8
  import * as i1$3 from '@progress/kendo-angular-common';
9
- import { isDocumentAvailable, Keys, isPresent as isPresent$1, anyChanged, TemplateContextDirective, DraggableDirective, EventsOutsideAngularDirective, isChanged as isChanged$1, KendoInput, guid, closest as closest$1, hasObservers, ResizeSensorComponent, isFocusable as isFocusable$1, shouldShowValidationUI, WatermarkOverlayComponent, ResizeBatchService } from '@progress/kendo-angular-common';
9
+ import { isDocumentAvailable, Keys, isPresent as isPresent$1, anyChanged, TemplateContextDirective, DraggableDirective, EventsOutsideAngularDirective, isChanged as isChanged$1, KendoInput, guid, closest as closest$1, hasObservers, ResizeSensorComponent, isFocusable as isFocusable$1, shouldShowValidationUI, WatermarkOverlayComponent, PreventableEvent as PreventableEvent$1, ResizeBatchService } from '@progress/kendo-angular-common';
10
10
  import * as i1 from '@angular/platform-browser';
11
11
  import * as i1$1 from '@progress/kendo-angular-icons';
12
12
  import { IconWrapperComponent, IconsService, KENDO_ICONS } from '@progress/kendo-angular-icons';
13
- import { plusIcon, cancelIcon, lockIcon, unlockIcon, caretAltDownIcon, caretAltRightIcon, caretAltLeftIcon, arrowLeftIcon, arrowRightIcon, sortDescSmallIcon, sortAscSmallIcon, filterClearIcon, filterIcon, checkIcon, arrowRotateCcwIcon, columnsIcon, pencilIcon, saveIcon, trashIcon, fileExcelIcon, filePdfIcon, chevronUpIcon, chevronDownIcon, displayInlineFlexIcon, maxWidthIcon, stickIcon, unstickIcon, setColumnPositionIcon, slidersIcon, moreVerticalIcon, reorderIcon, minusIcon, insertMiddleIcon, xIcon, arrowsSwapIcon } from '@progress/kendo-svg-icons';
14
- import { switchMap, take, map, filter, takeUntil, switchMapTo, delay, tap, throttleTime, debounceTime, distinctUntilChanged, skip, auditTime, bufferCount } from 'rxjs/operators';
13
+ import { plusIcon, cancelIcon, lockIcon, unlockIcon, caretAltDownIcon, caretAltRightIcon, caretAltLeftIcon, arrowLeftIcon, arrowRightIcon, sortDescSmallIcon, sortAscSmallIcon, filterClearIcon, filterIcon, checkIcon, arrowRotateCcwIcon, columnsIcon, pencilIcon, saveIcon, trashIcon, fileExcelIcon, filePdfIcon, chevronUpIcon, chevronDownIcon, displayInlineFlexIcon, maxWidthIcon, stickIcon, unstickIcon, setColumnPositionIcon, slidersIcon, moreVerticalIcon, reorderIcon, minusIcon, insertMiddleIcon, xIcon, undoIcon, redoIcon, arrowsSwapIcon } from '@progress/kendo-svg-icons';
14
+ import { switchMap, take, map, filter, takeUntil, switchMapTo, delay, tap, throttleTime, debounceTime, distinctUntilChanged, skip, auditTime, bufferCount, flatMap } from 'rxjs/operators';
15
15
  import * as i1$2 from '@progress/kendo-angular-l10n';
16
16
  import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
17
17
  import * as i50 from '@progress/kendo-angular-pager';
@@ -457,6 +457,19 @@ const replaceMessagePlaceholder = (message, name, value) => (message ?? '').repl
457
457
  * @hidden
458
458
  */
459
459
  const recursiveFlatMap = (item) => isGroupResult(item) ? item.items.flatMap(recursiveFlatMap) : [{ ...item }];
460
+ const mapColumnItemState = (c) => ({ id: c.id, width: c.width, hidden: c.hidden, locked: c.locked, sticky: c.sticky, orderIndex: c.orderIndex });
461
+ /**
462
+ * @hidden
463
+ */
464
+ const updateColumnFromState = (columnState, c) => {
465
+ Object.keys(columnState).forEach((key) => c[key] = columnState[key]);
466
+ };
467
+ /**
468
+ * @hidden
469
+ */
470
+ const recursiveColumnsFlatMap = (item) => (item.isColumnGroup || item.isSpanColumn) ?
471
+ [mapColumnItemState(item), ...item.children.toArray().flatMap(recursiveColumnsFlatMap)] :
472
+ [mapColumnItemState(item)];
460
473
  /**
461
474
  * @hidden
462
475
  */
@@ -2155,6 +2168,7 @@ const isCheckboxColumn = column => column.isCheckboxColumn;
2155
2168
  */
2156
2169
  const isRowReorderColumn = column => column.isRowReorderColumn;
2157
2170
  const isColumnContainer = column => column.isColumnGroup || isSpanColumn(column);
2171
+ let columnId = 0;
2158
2172
  /**
2159
2173
  * The base class for the column components of the Grid.
2160
2174
  */
@@ -2431,6 +2445,12 @@ class ColumnBase {
2431
2445
  return this.parent ? this.parent.isLocked : this.locked;
2432
2446
  }
2433
2447
  _width;
2448
+ /**
2449
+ * @hidden
2450
+ */
2451
+ get id() {
2452
+ return this._id;
2453
+ }
2434
2454
  /**
2435
2455
  * @hidden
2436
2456
  */
@@ -2475,6 +2495,7 @@ class ColumnBase {
2475
2495
  get isVisible() {
2476
2496
  return !this.hidden && this.matchesMedia;
2477
2497
  }
2498
+ _id;
2478
2499
  /**
2479
2500
  * @hidden
2480
2501
  */
@@ -2484,6 +2505,7 @@ class ColumnBase {
2484
2505
  if (parent && idService && parent.idService.gridId() === idService.gridId() && !isColumnContainer(parent)) {
2485
2506
  throw new Error(ColumnConfigurationErrorMessages.columnNested);
2486
2507
  }
2508
+ this._id = `k-grid-column-${columnId++}`;
2487
2509
  }
2488
2510
  ngAfterViewInit() {
2489
2511
  this.initialMaxResizableWidth = this.maxResizableWidth;
@@ -2965,7 +2987,7 @@ class SpanColumnComponent extends ColumnBase {
2965
2987
  /**
2966
2988
  * @hidden
2967
2989
  */
2968
- childColumns = new QueryList();
2990
+ children = new QueryList();
2969
2991
  /**
2970
2992
  * @hidden
2971
2993
  */
@@ -3008,13 +3030,13 @@ class SpanColumnComponent extends ColumnBase {
3008
3030
  set width(_value) {
3009
3031
  }
3010
3032
  get width() {
3011
- return this.childColumns.reduce((total, column) => total + column.width, 0);
3033
+ return this.children.reduce((total, column) => total + column.width, 0);
3012
3034
  }
3013
3035
  /**
3014
3036
  * @hidden
3015
3037
  */
3016
3038
  get leafIndex() {
3017
- return this.childColumns.first.leafIndex;
3039
+ return this.children.first.leafIndex;
3018
3040
  }
3019
3041
  _editable = true;
3020
3042
  constructor(parent, idService) {
@@ -3041,7 +3063,7 @@ class SpanColumnComponent extends ColumnBase {
3041
3063
  * @hidden
3042
3064
  */
3043
3065
  get colspan() {
3044
- return this.childColumns.filter(c => c.isVisible).length;
3066
+ return this.children.filter(c => c.isVisible).length;
3045
3067
  }
3046
3068
  /**
3047
3069
  * Toggles the locked (frozen) state of the columns ([see example](slug:locked_columns_grid)).
@@ -3051,13 +3073,13 @@ class SpanColumnComponent extends ColumnBase {
3051
3073
  this._locked = value;
3052
3074
  }
3053
3075
  get locked() {
3054
- return this._locked || this.childColumns.some(c => c.locked);
3076
+ return this._locked || this.children.some(c => c.locked);
3055
3077
  }
3056
3078
  get childrenArray() {
3057
- return this.childColumns.toArray();
3079
+ return this.children.toArray();
3058
3080
  }
3059
3081
  get hasChildren() {
3060
- return this.childColumns.length > 0;
3082
+ return this.children.length > 0;
3061
3083
  }
3062
3084
  /**
3063
3085
  * @hidden
@@ -3073,7 +3095,7 @@ class SpanColumnComponent extends ColumnBase {
3073
3095
  provide: ColumnBase,
3074
3096
  useExisting: forwardRef(() => SpanColumnComponent)
3075
3097
  }
3076
- ], queries: [{ propertyName: "template", predicate: CellTemplateDirective }, { propertyName: "editTemplate", predicate: EditTemplateDirective }, { propertyName: "childColumns", predicate: ColumnComponent }], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
3098
+ ], queries: [{ propertyName: "template", predicate: CellTemplateDirective }, { propertyName: "editTemplate", predicate: EditTemplateDirective }, { propertyName: "children", predicate: ColumnComponent }], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
3077
3099
  }
3078
3100
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SpanColumnComponent, decorators: [{
3079
3101
  type: Component,
@@ -3102,7 +3124,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3102
3124
  }], editTemplate: [{
3103
3125
  type: ContentChildren,
3104
3126
  args: [EditTemplateDirective, { descendants: false }]
3105
- }], childColumns: [{
3127
+ }], children: [{
3106
3128
  type: ContentChildren,
3107
3129
  args: [ColumnComponent]
3108
3130
  }], editable: [{
@@ -4805,7 +4827,7 @@ class ColumnsContainer {
4805
4827
  unlockedWidth += column.width || 0;
4806
4828
  }
4807
4829
  if (column.isSpanColumn) {
4808
- column.childColumns.forEach(c => {
4830
+ column.children.forEach(c => {
4809
4831
  c.leafIndex = leafIndex++;
4810
4832
  });
4811
4833
  }
@@ -15043,7 +15065,7 @@ const indexOf = (target, list) => {
15043
15065
  break;
15044
15066
  }
15045
15067
  if ((ignore-- <= 0) && isParentSpanColumn) {
15046
- ignore = current.parent.childColumns.length - 1;
15068
+ ignore = current.parent.children.length - 1;
15047
15069
  skip += ignore;
15048
15070
  }
15049
15071
  index++;
@@ -15095,7 +15117,7 @@ class ColumnHandleDirective {
15095
15117
  const currentLeafs = leafColumns([this.column]).filter(column => isTruthy(column.resizable));
15096
15118
  const columnInfo = currentLeafs.map(column => {
15097
15119
  const isParentSpan = isInSpanColumn(column);
15098
- const isLastInSpan = isParentSpan ? column.parent.childColumns.last === column : false;
15120
+ const isLastInSpan = isParentSpan ? column.parent.children.last === column : false;
15099
15121
  const index = indexOf(column, allLeafs);
15100
15122
  return {
15101
15123
  column,
@@ -16930,7 +16952,7 @@ class HeaderComponent {
16930
16952
  const arr = this.dropTargets.toArray();
16931
16953
  const firstSpan = arr.find(t => t.context.column.parent === parent);
16932
16954
  const index = arr.indexOf(firstSpan);
16933
- const adjust = e.before ? 0 : parent.childColumns.length - 1;
16955
+ const adjust = e.before ? 0 : parent.children.length - 1;
16934
16956
  target = arr[index + adjust];
16935
16957
  }
16936
16958
  return mergeObjects(e, { target });
@@ -18105,7 +18127,7 @@ class CellComponent {
18105
18127
  get isSpanColumn() {
18106
18128
  return isSpanColumn(this.column) && !this.column.templateRef;
18107
18129
  }
18108
- get childColumns() {
18130
+ get children() {
18109
18131
  return columnsToRender([this.column]);
18110
18132
  }
18111
18133
  get isRowReorderColumn() {
@@ -18178,7 +18200,7 @@ class CellComponent {
18178
18200
  [ngTemplateOutletContext]="templateContext">
18179
18201
  </ng-template>
18180
18202
  <ng-container *ngIf="isSpanColumn">
18181
- <ng-container *ngFor="let childColumn of childColumns">
18203
+ <ng-container *ngFor="let childColumn of children">
18182
18204
  {{ dataItem | valueOf: childColumn.field: childColumn.format}}
18183
18205
  </ng-container>
18184
18206
  </ng-container>
@@ -18270,7 +18292,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
18270
18292
  [ngTemplateOutletContext]="templateContext">
18271
18293
  </ng-template>
18272
18294
  <ng-container *ngIf="isSpanColumn">
18273
- <ng-container *ngFor="let childColumn of childColumns">
18295
+ <ng-container *ngFor="let childColumn of children">
18274
18296
  {{ dataItem | valueOf: childColumn.field: childColumn.format}}
18275
18297
  </ng-container>
18276
18298
  </ng-container>
@@ -18711,7 +18733,7 @@ class TableBodyComponent {
18711
18733
  }
18712
18734
  get footerColumns() {
18713
18735
  const colsToRender = Array.from(this.columns).reduce((cols, col) => {
18714
- const newCols = (col instanceof SpanColumnComponent) ? Array.from(col.childColumns) : [col];
18736
+ const newCols = (col instanceof SpanColumnComponent) ? Array.from(col.children) : [col];
18715
18737
  return [...cols, ...newCols];
18716
18738
  }, []);
18717
18739
  return colsToRender;
@@ -20104,8 +20126,8 @@ const packageMetadata = {
20104
20126
  productName: 'Kendo UI for Angular',
20105
20127
  productCode: 'KENDOUIANGULAR',
20106
20128
  productCodes: ['KENDOUIANGULAR'],
20107
- publishDate: 1746798571,
20108
- version: '19.0.0-develop.11',
20129
+ publishDate: 1747069795,
20130
+ version: '19.0.0-develop.12',
20109
20131
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
20110
20132
  };
20111
20133
 
@@ -22694,7 +22716,7 @@ class ListComponent {
22694
22716
  for (let idx = 0; idx < leafColumns.length; idx++) {
22695
22717
  const column = leafColumns[idx];
22696
22718
  if (column.isSpanColumn) {
22697
- viewportEnd += column.childColumns.length;
22719
+ viewportEnd += column.children.length;
22698
22720
  }
22699
22721
  }
22700
22722
  this.navigationService.setColumnViewport(viewportStart, viewportEnd);
@@ -24389,6 +24411,21 @@ class GridComponent {
24389
24411
  this.defaultSelection ? this.defaultSelection.stateToArray() : this.selectionDirective.stateToArray() :
24390
24412
  [];
24391
24413
  }
24414
+ /**
24415
+ * The current Grid `GridState` objects. Contains the information about data operations and column state, required
24416
+ * to store and restore the Grid state.
24417
+ */
24418
+ get currentState() {
24419
+ return {
24420
+ filter: this.filter,
24421
+ group: this.group,
24422
+ sort: this.sort,
24423
+ skip: this.skip,
24424
+ take: this.pageSize,
24425
+ columnsState: this.columns.toArray().flatMap(recursiveColumnsFlatMap),
24426
+ currentData: structuredClone(this.data)
24427
+ };
24428
+ }
24392
24429
  /**
24393
24430
  * If set to `true`, the user can resize columns by dragging the edges (resize handles) of their header cells
24394
24431
  * ([see example]({% slug resizing_columns_grid %})).
@@ -24433,6 +24470,25 @@ class GridComponent {
24433
24470
  * @default false
24434
24471
  */
24435
24472
  showInactiveTools = false;
24473
+ /**
24474
+ * A function which determines if a specific row is expanded.
24475
+ */
24476
+ set isDetailExpanded(callback) {
24477
+ this.detailsService.userCallback = callback;
24478
+ }
24479
+ get isDetailExpanded() {
24480
+ return this.detailsService.userCallback;
24481
+ }
24482
+ /**
24483
+ * A function which determines if a specific group row is expanded.
24484
+ */
24485
+ set isGroupExpanded(callback) {
24486
+ this.groupsService.userCallback = callback;
24487
+ this.groupable = isPresent(callback);
24488
+ }
24489
+ get isGroupExpanded() {
24490
+ return this.groupsService.userCallback;
24491
+ }
24436
24492
  /**
24437
24493
  * Fires when the Grid filter is modified through the UI.
24438
24494
  * You have to handle the event yourself and filter the data.
@@ -24465,6 +24521,10 @@ class GridComponent {
24465
24521
  * Fires when the data state of the Grid is changed.
24466
24522
  */
24467
24523
  dataStateChange = new EventEmitter();
24524
+ /**
24525
+ * Fires when the data or columns state of the Grid is changed.
24526
+ */
24527
+ gridStateChange = new EventEmitter();
24468
24528
  /**
24469
24529
  * Fires when the user expands a group header.
24470
24530
  */
@@ -24711,6 +24771,12 @@ class GridComponent {
24711
24771
  get navigation() {
24712
24772
  return this.navigationService;
24713
24773
  }
24774
+ /**
24775
+ * @hidden
24776
+ */
24777
+ get flatData() {
24778
+ return isArray(this.data) ? this.data : this.data.data;
24779
+ }
24714
24780
  shouldGenerateColumns = true;
24715
24781
  direction;
24716
24782
  notifyTimeout = null;
@@ -24821,6 +24887,7 @@ class GridComponent {
24821
24887
  * @hidden
24822
24888
  */
24823
24889
  blockArrowSelection = false;
24890
+ undoRedoService;
24824
24891
  selectionSubscription;
24825
24892
  stateChangeSubscription;
24826
24893
  groupExpandCollapseSubscription;
@@ -24992,6 +25059,7 @@ class GridComponent {
24992
25059
  }
24993
25060
  this.initSelectionService();
24994
25061
  this.updateNavigationMetadata();
25062
+ this.currentState.currentData = this.data;
24995
25063
  }
24996
25064
  ngOnChanges(changes) {
24997
25065
  if (isChanged$1("data", changes)) {
@@ -25201,6 +25269,12 @@ class GridComponent {
25201
25269
  const target = isNaN(columnIndex) ? row : `${row} td[data-kendo-grid-column-index="${columnIndex}"]`;
25202
25270
  this.focusEditElement(target);
25203
25271
  }
25272
+ /**
25273
+ * @hidden
25274
+ */
25275
+ handleReorderEvents(ev, evType) {
25276
+ this.rowReorderService[evType](ev);
25277
+ }
25204
25278
  /**
25205
25279
  * Closes the editor for a given row ([see example]({% slug inline_editing_grid %}#toc-canceling-editing-1)).
25206
25280
  *
@@ -25294,6 +25368,42 @@ class GridComponent {
25294
25368
  saveAsExcel() {
25295
25369
  this.excelService.save(this);
25296
25370
  }
25371
+ /**
25372
+ * Applies the provided `GridState` object to the Grid.
25373
+ */
25374
+ loadState(state) {
25375
+ this.traverseColumns(this.columns, (column) => {
25376
+ const columnState = state.columnsState.find((col) => col.id === column.id);
25377
+ if (columnState) {
25378
+ column.width = columnState.width;
25379
+ column.hidden = columnState.hidden;
25380
+ column.locked = columnState.locked;
25381
+ column.sticky = columnState.sticky;
25382
+ column.orderIndex = columnState.orderIndex;
25383
+ }
25384
+ });
25385
+ this.columns.reset(this.columns.toArray());
25386
+ this.columnsContainer.refresh();
25387
+ this.sort = state.sort;
25388
+ this.group = state.group;
25389
+ this.filter = state.filter;
25390
+ this.group = state.group;
25391
+ this.skip = state.skip;
25392
+ this.pageSize = state.take;
25393
+ this.data = state.currentData;
25394
+ this.changeNotification.notify();
25395
+ this.changeDetectorRef.detectChanges();
25396
+ }
25397
+ traverseColumns(columns, callback) {
25398
+ columns.forEach((column) => {
25399
+ if (column.isColumnGroup || column.isSpanColumn) {
25400
+ this.traverseColumns(column.children, callback);
25401
+ }
25402
+ else {
25403
+ callback(column);
25404
+ }
25405
+ });
25406
+ }
25297
25407
  /**
25298
25408
  * Applies the minimum possible width for the specified column,
25299
25409
  * so that the whole text fits without wrapping. This method expects the Grid
@@ -25444,7 +25554,7 @@ class GridComponent {
25444
25554
  return;
25445
25555
  }
25446
25556
  if (isSpanColumnComponent(target) && !options.before) {
25447
- target = target.childColumns.last;
25557
+ target = target.children.last;
25448
25558
  }
25449
25559
  this.reorder({
25450
25560
  before: options.before,
@@ -25452,37 +25562,6 @@ class GridComponent {
25452
25562
  target: target
25453
25563
  });
25454
25564
  }
25455
- /**
25456
- * A function which determines if a specific row is expanded.
25457
- */
25458
- set isDetailExpanded(callback) {
25459
- this.detailsService.userCallback = callback;
25460
- }
25461
- get isDetailExpanded() {
25462
- return this.detailsService.userCallback;
25463
- }
25464
- /**
25465
- * A function which determines if a specific group row is expanded.
25466
- */
25467
- set isGroupExpanded(callback) {
25468
- this.groupsService.userCallback = callback;
25469
- this.groupable = isPresent(callback);
25470
- }
25471
- get isGroupExpanded() {
25472
- return this.groupsService.userCallback;
25473
- }
25474
- /**
25475
- * @hidden
25476
- */
25477
- handleReorderEvents(ev, evType) {
25478
- this.rowReorderService[evType](ev);
25479
- }
25480
- /**
25481
- * @hidden
25482
- */
25483
- get flatData() {
25484
- return isArray(this.data) ? this.data : this.data.data;
25485
- }
25486
25565
  /**
25487
25566
  * @hidden
25488
25567
  */
@@ -25536,7 +25615,7 @@ class GridComponent {
25536
25615
  let toSkip = 1;
25537
25616
  // Possible only when called from the API.
25538
25617
  if (source.isSpanColumn) {
25539
- toSkip += source.childColumns.length;
25618
+ toSkip += source.children.length;
25540
25619
  }
25541
25620
  let i = 0;
25542
25621
  while (i < expandedColumns.length) {
@@ -25732,7 +25811,13 @@ class GridComponent {
25732
25811
  this.blockArrowSelection = true;
25733
25812
  }
25734
25813
  this.dataStateChange.emit(x);
25814
+ this.gridStateChange.emit({ ...x, columnsState: this.currentState.columnsState, currentData: this.currentState.currentData });
25815
+ if (this.undoRedoService) {
25816
+ this.undoRedoService.originalEvent = x;
25817
+ }
25735
25818
  });
25819
+ this.stateChangeSubscription.add(merge(this.columnReorder, this.columnResize, this.columnVisibilityChange, this.columnLockedChange, this.columnStickyChange).pipe(flatMap(() => this.ngZone.onStable.pipe(take(1))))
25820
+ .subscribe(() => this.ngZone.run(() => this.gridStateChange.emit(this.currentState))));
25736
25821
  }
25737
25822
  attachEditHandlers() {
25738
25823
  if (!this.editService) {
@@ -26026,7 +26111,7 @@ class GridComponent {
26026
26111
  this.dropTargetContainer?.notify();
26027
26112
  }
26028
26113
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GridComponent, deps: [{ token: BrowserSupportService }, { token: SelectionService }, { token: CellSelectionService }, { token: i0.ElementRef }, { token: GroupInfoService }, { token: GroupsService }, { token: ChangeNotificationService }, { token: DetailsService }, { token: EditService }, { token: FilterService }, { token: PDFService }, { token: ResponsiveService }, { token: i0.Renderer2 }, { token: ExcelService }, { token: i0.NgZone }, { token: ScrollSyncService }, { token: DomEventsService }, { token: ColumnResizingService }, { token: i0.ChangeDetectorRef }, { token: ColumnReorderService }, { token: ColumnInfoService }, { token: NavigationService }, { token: SortService }, { token: ScrollRequestService }, { token: i1$2.LocalizationService }, { token: ContextService }, { token: SizingOptionsService }, { token: RowReorderService }], target: i0.ɵɵFactoryTarget.Component });
26029
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GridComponent, isStandalone: true, selector: "kendo-grid", inputs: { data: "data", pageSize: "pageSize", height: "height", rowHeight: "rowHeight", detailRowHeight: "detailRowHeight", skip: "skip", scrollable: "scrollable", selectable: "selectable", sort: "sort", size: "size", trackBy: "trackBy", filter: "filter", group: "group", virtualColumns: "virtualColumns", filterable: "filterable", sortable: "sortable", pageable: "pageable", groupable: "groupable", gridResizable: "gridResizable", rowReorderable: "rowReorderable", navigable: "navigable", navigatable: "navigatable", autoSize: "autoSize", rowClass: "rowClass", rowSticky: "rowSticky", rowSelected: "rowSelected", isRowSelectable: "isRowSelectable", cellSelected: "cellSelected", resizable: "resizable", reorderable: "reorderable", loading: "loading", columnMenu: "columnMenu", hideHeader: "hideHeader", showInactiveTools: "showInactiveTools", isDetailExpanded: "isDetailExpanded", isGroupExpanded: "isGroupExpanded" }, outputs: { filterChange: "filterChange", pageChange: "pageChange", groupChange: "groupChange", sortChange: "sortChange", selectionChange: "selectionChange", rowReorder: "rowReorder", dataStateChange: "dataStateChange", 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" }, host: { properties: { "attr.dir": "this.dir", "class.k-grid": "this.hostClass", "class.k-grid-sm": "this.sizeSmallClass", "class.k-grid-md": "this.sizeMediumClass", "class.k-grid-lockedcolumns": "this.lockedClasses", "class.k-grid-virtual": "this.virtualClasses", "class.k-grid-no-scrollbar": "this.noScrollbarClass", "class.k-grid-resizable": "this.isResizable", "style.minWidth": "this.minWidth", "style.maxWidth": "this.maxWidth", "style.minHeight": "this.minHeight", "style.maxHeight": "this.maxHeight" } }, providers: [
26114
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GridComponent, isStandalone: true, selector: "kendo-grid", inputs: { data: "data", pageSize: "pageSize", height: "height", rowHeight: "rowHeight", detailRowHeight: "detailRowHeight", skip: "skip", scrollable: "scrollable", selectable: "selectable", sort: "sort", size: "size", trackBy: "trackBy", filter: "filter", group: "group", virtualColumns: "virtualColumns", filterable: "filterable", sortable: "sortable", pageable: "pageable", groupable: "groupable", gridResizable: "gridResizable", rowReorderable: "rowReorderable", navigable: "navigable", navigatable: "navigatable", autoSize: "autoSize", rowClass: "rowClass", rowSticky: "rowSticky", rowSelected: "rowSelected", isRowSelectable: "isRowSelectable", cellSelected: "cellSelected", resizable: "resizable", reorderable: "reorderable", loading: "loading", columnMenu: "columnMenu", hideHeader: "hideHeader", showInactiveTools: "showInactiveTools", isDetailExpanded: "isDetailExpanded", isGroupExpanded: "isGroupExpanded" }, outputs: { 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" }, host: { properties: { "attr.dir": "this.dir", "class.k-grid": "this.hostClass", "class.k-grid-sm": "this.sizeSmallClass", "class.k-grid-md": "this.sizeMediumClass", "class.k-grid-lockedcolumns": "this.lockedClasses", "class.k-grid-virtual": "this.virtualClasses", "class.k-grid-no-scrollbar": "this.noScrollbarClass", "class.k-grid-resizable": "this.isResizable", "style.minWidth": "this.minWidth", "style.maxWidth": "this.maxWidth", "style.minHeight": "this.minHeight", "style.maxHeight": "this.maxHeight" } }, providers: [
26030
26115
  BrowserSupportService,
26031
26116
  LocalizationService,
26032
26117
  ColumnInfoService,
@@ -27633,6 +27718,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
27633
27718
  type: Input
27634
27719
  }], showInactiveTools: [{
27635
27720
  type: Input
27721
+ }], isDetailExpanded: [{
27722
+ type: Input
27723
+ }], isGroupExpanded: [{
27724
+ type: Input
27636
27725
  }], filterChange: [{
27637
27726
  type: Output
27638
27727
  }], pageChange: [{
@@ -27647,6 +27736,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
27647
27736
  type: Output
27648
27737
  }], dataStateChange: [{
27649
27738
  type: Output
27739
+ }], gridStateChange: [{
27740
+ type: Output
27650
27741
  }], groupExpand: [{
27651
27742
  type: Output
27652
27743
  }], groupCollapse: [{
@@ -27771,10 +27862,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
27771
27862
  }], dialogContainer: [{
27772
27863
  type: ViewChild,
27773
27864
  args: ['dialogContainer', { read: ViewContainerRef }]
27774
- }], isDetailExpanded: [{
27775
- type: Input
27776
- }], isGroupExpanded: [{
27777
- type: Input
27778
27865
  }] } });
27779
27866
 
27780
27867
  /**
@@ -30029,6 +30116,542 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
30029
30116
  }]
30030
30117
  }], ctorParameters: function () { return [{ type: EditService }, { type: i51.ToolBarButtonComponent }, { type: ContextService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; } });
30031
30118
 
30119
+ /**
30120
+ * @hidden
30121
+ * A linked-list based implementation of an undo-redo stack.
30122
+ * Maintains a chain of states that can be navigated forward and backward.
30123
+ */
30124
+ class UndoRedoStack {
30125
+ maxSize;
30126
+ /** The current active node in the undo-redo history */
30127
+ currentNode = null;
30128
+ /** The root node of the stack (first state) */
30129
+ rootNode = null;
30130
+ /** Track the size of the stack */
30131
+ _size = 0;
30132
+ /**
30133
+ * Creates a new UndoRedoStack.
30134
+ * @param maxSize Optional maximum number of states to maintain (unlimited if not provided)
30135
+ */
30136
+ constructor(maxSize = -1) {
30137
+ this.maxSize = maxSize;
30138
+ }
30139
+ /**
30140
+ * Gets the current number of states in the stack
30141
+ */
30142
+ get size() {
30143
+ return this._size;
30144
+ }
30145
+ /**
30146
+ * Gets the current active state
30147
+ */
30148
+ get current() {
30149
+ return this.currentNode ? this.currentNode.state : null;
30150
+ }
30151
+ /**
30152
+ * Checks if undo is available (if there's a previous state)
30153
+ */
30154
+ get canUndo() {
30155
+ return isPresent$1(this.currentNode?.previous);
30156
+ }
30157
+ /**
30158
+ * Checks if redo is available (if there's a next state)
30159
+ */
30160
+ get canRedo() {
30161
+ return isPresent$1(this.currentNode?.next);
30162
+ }
30163
+ /**
30164
+ * Adds a new state to the undo-redo stack
30165
+ * @param state The state to add
30166
+ * @param id Optional identifier for the state
30167
+ * @returns The newly created node
30168
+ */
30169
+ add(state, id) {
30170
+ const newNode = {
30171
+ state,
30172
+ previous: this.currentNode,
30173
+ next: null,
30174
+ id
30175
+ };
30176
+ // If we have a current node, update its next reference
30177
+ if (this.currentNode) {
30178
+ // If we're adding after a node that already had a "next",
30179
+ // we need to discard that branch of history
30180
+ if (this.currentNode.next) {
30181
+ this.truncateForward(this.currentNode);
30182
+ }
30183
+ this.currentNode.next = newNode;
30184
+ }
30185
+ else {
30186
+ // This is the first node
30187
+ this.rootNode = newNode;
30188
+ }
30189
+ this.currentNode = newNode;
30190
+ this._size++;
30191
+ // If we've exceeded the max size, remove oldest nodes
30192
+ this.enforceMaxSize();
30193
+ return newNode;
30194
+ }
30195
+ /**
30196
+ * Finds a node by its identifier
30197
+ * @param id The identifier to search for
30198
+ * @returns The found node or null if not found
30199
+ */
30200
+ find(id) {
30201
+ if (!this.rootNode) {
30202
+ return null;
30203
+ }
30204
+ let node = this.rootNode;
30205
+ while (node) {
30206
+ if (node.id === id) {
30207
+ return node;
30208
+ }
30209
+ node = node.next;
30210
+ }
30211
+ return null;
30212
+ }
30213
+ /**
30214
+ * Removes a node by its identifier
30215
+ * @param id The identifier of the node to remove
30216
+ * @returns True if the node was found and removed, false otherwise
30217
+ */
30218
+ remove(id) {
30219
+ const nodeToRemove = this.find(id);
30220
+ if (!nodeToRemove) {
30221
+ return false;
30222
+ }
30223
+ // Handle removal of current node
30224
+ if (nodeToRemove === this.currentNode) {
30225
+ this.currentNode = nodeToRemove.previous || nodeToRemove.next;
30226
+ }
30227
+ // Connect previous and next nodes
30228
+ if (nodeToRemove.previous) {
30229
+ nodeToRemove.previous.next = nodeToRemove.next;
30230
+ }
30231
+ else {
30232
+ // Removing the root node
30233
+ this.rootNode = nodeToRemove.next;
30234
+ }
30235
+ if (nodeToRemove.next) {
30236
+ nodeToRemove.next.previous = nodeToRemove.previous;
30237
+ }
30238
+ // Clean up references to help garbage collection
30239
+ nodeToRemove.previous = null;
30240
+ nodeToRemove.next = null;
30241
+ this._size--;
30242
+ return true;
30243
+ }
30244
+ /**
30245
+ * Performs an undo operation, moving to the previous state
30246
+ * @returns The previous state or null if can't undo
30247
+ */
30248
+ undo() {
30249
+ if (!this.canUndo) {
30250
+ return null;
30251
+ }
30252
+ this.currentNode = this.currentNode.previous;
30253
+ return this.currentNode.state;
30254
+ }
30255
+ /**
30256
+ * Performs a redo operation, moving to the next state
30257
+ * @returns The next state or null if can't redo
30258
+ */
30259
+ redo() {
30260
+ if (!this.canRedo) {
30261
+ return null;
30262
+ }
30263
+ this.currentNode = this.currentNode.next;
30264
+ return this.currentNode.state;
30265
+ }
30266
+ /**
30267
+ * Clears all history
30268
+ */
30269
+ clear() {
30270
+ this.currentNode = null;
30271
+ this.rootNode = null;
30272
+ this._size = 0;
30273
+ }
30274
+ /**
30275
+ * Removes all states after the specified node
30276
+ * @param node The node to truncate from
30277
+ * @returns The number of nodes removed
30278
+ */
30279
+ truncateForward(node) {
30280
+ if (!node.next) {
30281
+ return 0;
30282
+ }
30283
+ let removedCount = 0;
30284
+ let currentNext = node.next;
30285
+ while (currentNext) {
30286
+ const temp = currentNext.next;
30287
+ // Clean up references for garbage collection
30288
+ currentNext.previous = null;
30289
+ currentNext.next = null;
30290
+ currentNext = temp;
30291
+ removedCount++;
30292
+ }
30293
+ // Update the node's next pointer
30294
+ node.next = null;
30295
+ this._size -= removedCount;
30296
+ return removedCount;
30297
+ }
30298
+ /**
30299
+ * Ensures the stack doesn't exceed the maximum size by removing oldest nodes
30300
+ */
30301
+ enforceMaxSize() {
30302
+ if (this.maxSize <= 0 || this._size <= this.maxSize) {
30303
+ return;
30304
+ }
30305
+ let nodesToRemove = this._size - this.maxSize;
30306
+ let currentNode = this.rootNode;
30307
+ // Find the new root node
30308
+ while (nodesToRemove > 0 && currentNode) {
30309
+ currentNode = currentNode.next;
30310
+ nodesToRemove--;
30311
+ }
30312
+ if (currentNode) {
30313
+ // Disconnect from previous history
30314
+ currentNode.previous = null;
30315
+ // Update root node
30316
+ this.rootNode = currentNode;
30317
+ // Update size
30318
+ this._size = this.maxSize;
30319
+ }
30320
+ }
30321
+ /**
30322
+ * Gets all states in the stack as an array (from oldest to newest)
30323
+ */
30324
+ toArray() {
30325
+ const result = [];
30326
+ let node = this.rootNode;
30327
+ while (node) {
30328
+ result.push(node.state);
30329
+ node = node.next;
30330
+ }
30331
+ return result;
30332
+ }
30333
+ /**
30334
+ * Gets the history nodes as an array (useful for debugging)
30335
+ */
30336
+ getNodes() {
30337
+ const result = [];
30338
+ let node = this.rootNode;
30339
+ while (node) {
30340
+ result.push(node);
30341
+ node = node.next;
30342
+ }
30343
+ return result;
30344
+ }
30345
+ }
30346
+
30347
+ /**
30348
+ * Arguments for the `undo` and `redo` events.
30349
+ */
30350
+ class UndoRedoEvent extends PreventableEvent$1 {
30351
+ /**
30352
+ * The event data of the original action that triggered the state change.
30353
+ */
30354
+ originalEvent;
30355
+ /**
30356
+ * The grid state and rendered data at the time of the action.
30357
+ */
30358
+ gridState;
30359
+ /**
30360
+ * @hidden
30361
+ */
30362
+ constructor({ originalEvent, gridState }) {
30363
+ super();
30364
+ this.originalEvent = originalEvent;
30365
+ this.gridState = gridState;
30366
+ }
30367
+ }
30368
+
30369
+ /**
30370
+ * @hidden
30371
+ */
30372
+ class UndoRedoService {
30373
+ originalEvent;
30374
+ onUndo = new Subject();
30375
+ onRedo = new Subject();
30376
+ stackEndReached = new Subject();
30377
+ setState = new Subject();
30378
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UndoRedoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
30379
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UndoRedoService });
30380
+ }
30381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UndoRedoService, decorators: [{
30382
+ type: Injectable
30383
+ }] });
30384
+
30385
+ class UndoRedoDirective {
30386
+ host;
30387
+ editService;
30388
+ undoRedoService;
30389
+ changeNotification;
30390
+ /**
30391
+ * Determines the maximum number of actions to keep in the undo-redo stack.
30392
+ * @default 10
30393
+ */
30394
+ maxStoredStates = 10;
30395
+ /**
30396
+ * Fires when undo action is performed. Exposes the state of the grid that will be applied.
30397
+ */
30398
+ onUndo = new EventEmitter();
30399
+ /**
30400
+ * Fires when undo action is performed. Exposes the state of the grid that will be applied.
30401
+ */
30402
+ onRedo = new EventEmitter();
30403
+ /**
30404
+ * Returns an array of all undo-redo actions that are currently in the stack.
30405
+ */
30406
+ get undoRedoItems() {
30407
+ return this.stack.toArray();
30408
+ }
30409
+ stack;
30410
+ subs = new Subscription();
30411
+ addToState = true;
30412
+ constructor(host, editService, undoRedoService, changeNotification) {
30413
+ this.host = host;
30414
+ this.editService = editService;
30415
+ this.undoRedoService = undoRedoService;
30416
+ this.changeNotification = changeNotification;
30417
+ this.host.undoRedoService = this.undoRedoService;
30418
+ }
30419
+ ngOnInit() {
30420
+ this.stack = new UndoRedoStack(this.maxStoredStates);
30421
+ this.stack.add({
30422
+ originalEvent: {
30423
+ skip: this.host.skip,
30424
+ take: this.host.pageSize,
30425
+ sort: this.host.sort,
30426
+ filter: this.host.filter,
30427
+ group: this.host.group
30428
+ }, gridState: structuredClone(this.host.currentState)
30429
+ });
30430
+ this.subs = this.host.gridStateChange.subscribe((state) => {
30431
+ if (this.addToState) {
30432
+ this.stack.add({
30433
+ originalEvent: {
30434
+ skip: state.skip,
30435
+ take: state.take,
30436
+ sort: state.sort,
30437
+ filter: state.filter,
30438
+ group: state.group
30439
+ },
30440
+ gridState: structuredClone(state)
30441
+ });
30442
+ }
30443
+ let stackEndPointReached;
30444
+ if (this.stack.canUndo) {
30445
+ stackEndPointReached = this.stack.canRedo ? false : 'end';
30446
+ }
30447
+ else {
30448
+ stackEndPointReached = 'start';
30449
+ }
30450
+ this.undoRedoService.stackEndReached.next(stackEndPointReached);
30451
+ });
30452
+ this.subs.add(this.editService.changes
30453
+ .pipe(filter(event => event.action === 'save' || event.action === 'remove'), tap(event => this.undoRedoService.originalEvent = event))
30454
+ .subscribe(event => {
30455
+ this.stack.add({
30456
+ originalEvent: event,
30457
+ gridState: structuredClone(this.host.currentState)
30458
+ });
30459
+ this.addToState = false;
30460
+ this.host.gridStateChange.emit(this.stack.current.gridState);
30461
+ this.addToState = true;
30462
+ this.updateUndoRedoDisabled();
30463
+ }));
30464
+ this.subs.add(this.changeNotification.changes.subscribe(() => this.stack.current.gridState = this.host.currentState));
30465
+ ['Undo', 'Redo'].forEach((action) => {
30466
+ this.subs.add(this.undoRedoService[`on${action}`].subscribe(() => {
30467
+ if (!this.stack[`can${action}`]) {
30468
+ return;
30469
+ }
30470
+ this.stack[`${action.toLowerCase()}`]();
30471
+ if (hasObservers(this[`on${action}`])) {
30472
+ const event = new UndoRedoEvent(this.stack.current);
30473
+ this[`on${action}`].emit(event);
30474
+ if (event.isDefaultPrevented()) {
30475
+ return;
30476
+ }
30477
+ }
30478
+ this.updateUndoRedoDisabled();
30479
+ this.host.loadState(this.stack.current.gridState);
30480
+ }));
30481
+ });
30482
+ this.subs.add(this.undoRedoService.setState.subscribe((state) => this.stack.add({ originalEvent: 'dataChange', gridState: state })));
30483
+ }
30484
+ ngOnDestroy() {
30485
+ this.stack.clear();
30486
+ this.stack = null;
30487
+ this.subs.unsubscribe();
30488
+ }
30489
+ /**
30490
+ * Re-applies the last action, reverted by the `undo` method.
30491
+ */
30492
+ redo() {
30493
+ if (this.stack.canRedo) {
30494
+ this.stack.redo();
30495
+ this.host.loadState(this.stack.current.gridState);
30496
+ if (!this.stack.canRedo) {
30497
+ this.undoRedoService.stackEndReached.next('end');
30498
+ }
30499
+ }
30500
+ }
30501
+ /**
30502
+ * Reverts the last user action.
30503
+ */
30504
+ undo() {
30505
+ if (this.stack.canUndo) {
30506
+ this.stack.undo();
30507
+ this.host.loadState(this.stack.current.gridState);
30508
+ if (!this.stack.canUndo) {
30509
+ this.undoRedoService.stackEndReached.next('start');
30510
+ }
30511
+ }
30512
+ }
30513
+ updateUndoRedoDisabled() {
30514
+ if (!this.stack.canRedo) {
30515
+ this.undoRedoService.stackEndReached.next('end');
30516
+ return;
30517
+ }
30518
+ if (!this.stack.canUndo) {
30519
+ this.undoRedoService.stackEndReached.next('start');
30520
+ return;
30521
+ }
30522
+ this.undoRedoService.stackEndReached.next(false);
30523
+ }
30524
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UndoRedoDirective, deps: [{ token: GridComponent }, { token: EditService }, { token: UndoRedoService }, { token: ChangeNotificationService }], target: i0.ɵɵFactoryTarget.Directive });
30525
+ 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 });
30526
+ }
30527
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UndoRedoDirective, decorators: [{
30528
+ type: Directive,
30529
+ args: [{
30530
+ selector: '[kendoGridUndoRedo]',
30531
+ standalone: true,
30532
+ exportAs: 'kendoGridUndoRedo',
30533
+ providers: [UndoRedoService]
30534
+ }]
30535
+ }], ctorParameters: function () { return [{ type: GridComponent }, { type: EditService }, { type: UndoRedoService }, { type: ChangeNotificationService }]; }, propDecorators: { maxStoredStates: [{
30536
+ type: Input
30537
+ }], onUndo: [{
30538
+ type: Output,
30539
+ args: ['undo']
30540
+ }], onRedo: [{
30541
+ type: Output,
30542
+ args: ['redo']
30543
+ }] } });
30544
+
30545
+ /**
30546
+ * Represents the command for triggering the undo action in the Grid.
30547
+ * You can apply this directive to any `kendo-toolbar-button` element inside a
30548
+ * ToolbarComponent used in the Grid.
30549
+ *
30550
+ * When the user clicks the toolbar button that is associated with the directive, the
30551
+ * [undo]({% slug api_grid_undoredodirective %}#toc-undo) event is triggered.
30552
+ *
30553
+ * @example
30554
+ * ```html-no-run
30555
+ * <kendo-grid>
30556
+ * <kendo-toolbar>
30557
+ * <kendo-toolbar-button kendoGridUndoTool></kendo-toolbar-button>
30558
+ * </kendo-toolbar>
30559
+ * </kendo-grid>
30560
+ * ```
30561
+ */
30562
+ class UndoCommandToolbarDirective {
30563
+ undoRedoService;
30564
+ host;
30565
+ subs = new Subscription();
30566
+ constructor(undoRedoService, host) {
30567
+ this.undoRedoService = undoRedoService;
30568
+ this.host = host;
30569
+ }
30570
+ ngOnInit() {
30571
+ this.subs = this.host.click.subscribe(e => this.onClick(e));
30572
+ this.host.className = 'k-grid-undo-command';
30573
+ this.host.svgIcon = undoIcon;
30574
+ this.host.icon = 'undo';
30575
+ this.host.text = 'Undo';
30576
+ this.host.disabled = true;
30577
+ this.subs.add(this.undoRedoService.stackEndReached.subscribe((stackEnd) => this.host.disabled = stackEnd === 'start'));
30578
+ }
30579
+ ngOnDestroy() {
30580
+ this.subs.unsubscribe();
30581
+ }
30582
+ /**
30583
+ * @hidden
30584
+ */
30585
+ onClick(e) {
30586
+ e.preventDefault();
30587
+ this.undoRedoService.onUndo.next();
30588
+ }
30589
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UndoCommandToolbarDirective, deps: [{ token: UndoRedoService }, { token: i51.ToolBarButtonComponent }], target: i0.ɵɵFactoryTarget.Directive });
30590
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: UndoCommandToolbarDirective, isStandalone: true, selector: "[kendoGridUndoTool]", ngImport: i0 });
30591
+ }
30592
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UndoCommandToolbarDirective, decorators: [{
30593
+ type: Directive,
30594
+ args: [{
30595
+ selector: '[kendoGridUndoTool]',
30596
+ standalone: true
30597
+ }]
30598
+ }], ctorParameters: function () { return [{ type: UndoRedoService }, { type: i51.ToolBarButtonComponent }]; } });
30599
+
30600
+ /**
30601
+ * Represents the command for triggering the redo action in the Grid.
30602
+ * You can apply this directive to any `kendo-toolbar-button` element inside a
30603
+ * ToolbarComponent used in the Grid.
30604
+ *
30605
+ * When the user clicks the toolbar button that is associated with the directive, the
30606
+ * [redo]({% slug api_grid_undoredodirective %}#toc-redo) event is triggered.
30607
+ *
30608
+ * @example
30609
+ * ```html-no-run
30610
+ * <kendo-grid>
30611
+ * <kendo-toolbar>
30612
+ * <kendo-toolbar-button kendoGridRedoTool></kendo-toolbar-button>
30613
+ * </kendo-toolbar>
30614
+ * </kendo-grid>
30615
+ * ```
30616
+ */
30617
+ class RedoCommandToolbarDirective {
30618
+ undoRedoService;
30619
+ host;
30620
+ subs = new Subscription();
30621
+ constructor(undoRedoService, host) {
30622
+ this.undoRedoService = undoRedoService;
30623
+ this.host = host;
30624
+ }
30625
+ ngOnInit() {
30626
+ this.subs = this.host.click.subscribe(e => this.onClick(e));
30627
+ this.host.className = 'k-grid-redo-command';
30628
+ this.host.svgIcon = redoIcon;
30629
+ this.host.icon = 'redo';
30630
+ this.host.text = 'Redo';
30631
+ this.host.disabled = true;
30632
+ this.subs.add(this.undoRedoService.stackEndReached.subscribe((stackEnd) => this.host.disabled = stackEnd === 'end'));
30633
+ }
30634
+ ngOnDestroy() {
30635
+ this.subs.unsubscribe();
30636
+ }
30637
+ /**
30638
+ * @hidden
30639
+ */
30640
+ onClick(e) {
30641
+ e.preventDefault();
30642
+ this.undoRedoService.onRedo.next();
30643
+ }
30644
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RedoCommandToolbarDirective, deps: [{ token: UndoRedoService }, { token: i51.ToolBarButtonComponent }], target: i0.ɵɵFactoryTarget.Directive });
30645
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: RedoCommandToolbarDirective, isStandalone: true, selector: "[kendoGridRedoTool]", ngImport: i0 });
30646
+ }
30647
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RedoCommandToolbarDirective, decorators: [{
30648
+ type: Directive,
30649
+ args: [{
30650
+ selector: '[kendoGridRedoTool]',
30651
+ standalone: true
30652
+ }]
30653
+ }], ctorParameters: function () { return [{ type: UndoRedoService }, { type: i51.ToolBarButtonComponent }]; } });
30654
+
30032
30655
  const directions = initialDirection => initialDirection === "asc" ? ["asc", "desc"] : ["desc", "asc"];
30033
30656
  /**
30034
30657
  * @hidden
@@ -31264,7 +31887,8 @@ const KENDO_GRID_DECLARATIONS = [
31264
31887
  GridClipboardDirective,
31265
31888
  FormComponent,
31266
31889
  DialogFormComponent,
31267
- FormFormFieldComponent
31890
+ FormFormFieldComponent,
31891
+ UndoRedoDirective,
31268
31892
  ];
31269
31893
  /**
31270
31894
  * @hidden
@@ -31296,7 +31920,10 @@ const KENDO_GRID_EXPORTS = [
31296
31920
  ...KENDO_GRID_FILTER_OPERATORS,
31297
31921
  ...KENDO_GRID_FILTER_MENU_EXPORTS,
31298
31922
  ...KENDO_GRID_COLUMN_MENU_EXPORTS,
31299
- GridClipboardDirective
31923
+ GridClipboardDirective,
31924
+ UndoRedoDirective,
31925
+ UndoCommandToolbarDirective,
31926
+ RedoCommandToolbarDirective,
31300
31927
  ];
31301
31928
  /**
31302
31929
  * @hidden
@@ -31359,7 +31986,9 @@ const KENDO_GRID = [
31359
31986
  */
31360
31987
  class GridModule {
31361
31988
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
31362
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: GridModule, imports: [GroupHeaderTemplateDirective, GroupHeaderColumnTemplateDirective, GroupFooterTemplateDirective, GroupHeaderComponent, GroupPanelComponent, ColumnComponent, ColumnGroupComponent, LogicalCellDirective, LogicalRowDirective, FocusableDirective, FooterTemplateDirective, ColGroupComponent, ResizableContainerDirective, i1$3.TemplateContextDirective, FieldAccessorPipe, DetailTemplateDirective, SpanColumnComponent, LoadingComponent, GridTableDirective, CommandColumnComponent, CheckboxColumnComponent, SelectionCheckboxDirective, CellTemplateDirective, EditTemplateDirective, RowDragHandleTemplateDirective, RowDragHintTemplateDirective, TableBodyComponent, NoRecordsTemplateDirective, CellComponent, EditCommandDirective, CancelCommandDirective, SaveCommandDirective, RemoveCommandDirective, AddCommandDirective, AddCommandToolbarDirective, EditCommandToolbarDirective, SaveCommandToolbarDirective, RemoveCommandToolbarDirective, CancelCommandToolbarDirective, CellLoadingTemplateDirective, LoadingTemplateDirective, RowReorderColumnComponent, SortCommandToolbarDirective, FilterCommandToolbarDirective, HeaderComponent, HeaderTemplateDirective, ColumnHandleDirective, SelectAllCheckboxDirective, 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, FilterRowComponent, FilterCellComponent, FilterCellTemplateDirective, StringFilterCellComponent, NumericFilterCellComponent, AutoCompleteFilterCellComponent, BooleanFilterCellComponent, FilterCellHostDirective, FilterCellWrapperComponent, DateFilterCellComponent, ColumnComponent, ColumnGroupComponent, LogicalCellDirective, LogicalRowDirective, FocusableDirective, FooterTemplateDirective, ColGroupComponent, ResizableContainerDirective, i1$3.TemplateContextDirective, FieldAccessorPipe, DetailTemplateDirective, SpanColumnComponent, LoadingComponent, GridTableDirective, FilterCellOperatorsComponent, ContainsFilterOperatorComponent, DoesNotContainFilterOperatorComponent, EndsWithFilterOperatorComponent, EqualFilterOperatorComponent, IsEmptyFilterOperatorComponent, IsNotEmptyFilterOperatorComponent, IsNotNullFilterOperatorComponent, IsNullFilterOperatorComponent, NotEqualFilterOperatorComponent, StartsWithFilterOperatorComponent, GreaterFilterOperatorComponent, GreaterOrEqualToFilterOperatorComponent, LessFilterOperatorComponent, LessOrEqualToFilterOperatorComponent, AfterFilterOperatorComponent, AfterEqFilterOperatorComponent, BeforeEqFilterOperatorComponent, BeforeFilterOperatorComponent, FilterInputDirective, ColumnComponent, ColumnGroupComponent, LogicalCellDirective, LogicalRowDirective, FocusableDirective, FooterTemplateDirective, ColGroupComponent, ResizableContainerDirective, i1$3.TemplateContextDirective, FieldAccessorPipe, DetailTemplateDirective, SpanColumnComponent, LoadingComponent, GridTableDirective, FilterCellOperatorsComponent, ContainsFilterOperatorComponent, DoesNotContainFilterOperatorComponent, EndsWithFilterOperatorComponent, EqualFilterOperatorComponent, IsEmptyFilterOperatorComponent, IsNotEmptyFilterOperatorComponent, IsNotNullFilterOperatorComponent, IsNullFilterOperatorComponent, NotEqualFilterOperatorComponent, StartsWithFilterOperatorComponent, GreaterFilterOperatorComponent, GreaterOrEqualToFilterOperatorComponent, LessFilterOperatorComponent, LessOrEqualToFilterOperatorComponent, AfterFilterOperatorComponent, AfterEqFilterOperatorComponent, BeforeEqFilterOperatorComponent, BeforeFilterOperatorComponent, FilterInputDirective, FilterMenuComponent, FilterMenuContainerComponent, FilterMenuInputWrapperComponent, StringFilterMenuInputComponent, StringFilterMenuComponent, FilterMenuTemplateDirective, NumericFilterMenuComponent, NumericFilterMenuInputComponent, DateFilterMenuInputComponent, DateFilterMenuComponent, FilterMenuHostDirective, BooleanFilterMenuComponent, FilterMenuDropDownListDirective, BooleanFilterRadioButtonDirective, ColumnMenuChooserItemCheckedDirective, ColumnListComponent, ColumnChooserComponent, ColumnChooserToolbarDirective, ColumnMenuChooserComponent, ColumnMenuFilterComponent, ColumnMenuItemComponent, ColumnMenuItemContentTemplateDirective, ColumnMenuSortComponent, ColumnMenuComponent, ColumnMenuLockComponent, ColumnMenuTemplateDirective, ColumnMenuContainerComponent, ColumnMenuItemDirective, ColumnMenuStickComponent, ColumnMenuPositionComponent, ColumnMenuAutoSizeColumnComponent, ColumnMenuAutoSizeAllColumnsComponent, GridComponent, ListComponent, ToolbarComponent, LocalizedMessagesDirective, CustomMessagesComponent, DataBindingDirective, ToolbarTemplateDirective, SelectionDirective, TemplateEditingDirective, ReactiveEditingDirective, InCellEditingDirective, ExternalEditingDirective, ExpandDetailsDirective, ExpandGroupDirective, GroupBindingDirective, GridMarqueeDirective, GridSpacerComponent, GridToolbarFocusableDirective, StatusBarComponent, StatusBarTemplateDirective, GridClipboardDirective, FormComponent, DialogFormComponent, FormFormFieldComponent, i51.ToolBarComponent, i51.ToolbarCustomMessagesComponent, i51.ToolBarButtonComponent, i51.ToolBarButtonGroupComponent, i51.ToolBarDropDownButtonComponent, i51.ToolBarSeparatorComponent, i51.ToolBarSpacerComponent, i51.ToolBarSplitButtonComponent, i51.ToolBarToolComponent, TableDirective], exports: [GridComponent, ToolbarTemplateDirective, ToolbarComponent, GridSpacerComponent, StatusBarTemplateDirective, DataBindingDirective, SelectionDirective, CustomMessagesComponent, GroupBindingDirective, TemplateEditingDirective, ReactiveEditingDirective, InCellEditingDirective, ExternalEditingDirective, ExpandDetailsDirective, ExpandGroupDirective, GridToolbarFocusableDirective, GroupHeaderTemplateDirective, GroupHeaderColumnTemplateDirective, GroupFooterTemplateDirective, GroupHeaderComponent, GroupPanelComponent, ColumnComponent, ColumnGroupComponent, LogicalCellDirective, LogicalRowDirective, FocusableDirective, FooterTemplateDirective, ColGroupComponent, ResizableContainerDirective, i1$3.TemplateContextDirective, FieldAccessorPipe, DetailTemplateDirective, SpanColumnComponent, LoadingComponent, GridTableDirective, CommandColumnComponent, CheckboxColumnComponent, SelectionCheckboxDirective, CellTemplateDirective, EditTemplateDirective, RowDragHandleTemplateDirective, RowDragHintTemplateDirective, TableBodyComponent, NoRecordsTemplateDirective, CellComponent, EditCommandDirective, CancelCommandDirective, SaveCommandDirective, RemoveCommandDirective, AddCommandDirective, AddCommandToolbarDirective, EditCommandToolbarDirective, SaveCommandToolbarDirective, RemoveCommandToolbarDirective, CancelCommandToolbarDirective, CellLoadingTemplateDirective, LoadingTemplateDirective, RowReorderColumnComponent, SortCommandToolbarDirective, FilterCommandToolbarDirective, HeaderComponent, HeaderTemplateDirective, ColumnHandleDirective, SelectAllCheckboxDirective, FilterRowComponent, FilterCellComponent, FilterCellTemplateDirective, StringFilterCellComponent, NumericFilterCellComponent, AutoCompleteFilterCellComponent, BooleanFilterCellComponent, FilterCellHostDirective, FilterCellWrapperComponent, DateFilterCellComponent, FilterCellOperatorsComponent, ContainsFilterOperatorComponent, DoesNotContainFilterOperatorComponent, EndsWithFilterOperatorComponent, EqualFilterOperatorComponent, IsEmptyFilterOperatorComponent, IsNotEmptyFilterOperatorComponent, IsNotNullFilterOperatorComponent, IsNullFilterOperatorComponent, NotEqualFilterOperatorComponent, StartsWithFilterOperatorComponent, GreaterFilterOperatorComponent, GreaterOrEqualToFilterOperatorComponent, LessFilterOperatorComponent, LessOrEqualToFilterOperatorComponent, AfterFilterOperatorComponent, AfterEqFilterOperatorComponent, BeforeEqFilterOperatorComponent, BeforeFilterOperatorComponent, FilterMenuComponent, FilterMenuContainerComponent, FilterMenuInputWrapperComponent, StringFilterMenuInputComponent, StringFilterMenuComponent, FilterMenuTemplateDirective, NumericFilterMenuComponent, NumericFilterMenuInputComponent, DateFilterMenuInputComponent, DateFilterMenuComponent, FilterMenuHostDirective, BooleanFilterMenuComponent, FilterMenuDropDownListDirective, BooleanFilterRadioButtonDirective, ColumnChooserComponent, ColumnChooserToolbarDirective, ColumnMenuFilterComponent, ColumnMenuItemComponent, ColumnMenuItemContentTemplateDirective, ColumnMenuSortComponent, ColumnMenuLockComponent, ColumnMenuStickComponent, ColumnMenuPositionComponent, ColumnMenuChooserComponent, ColumnMenuTemplateDirective, ColumnMenuContainerComponent, ColumnMenuItemDirective, ColumnMenuComponent, ColumnMenuAutoSizeColumnComponent, ColumnMenuAutoSizeAllColumnsComponent, 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] });
31989
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: GridModule, imports: [GroupHeaderTemplateDirective, GroupHeaderColumnTemplateDirective, GroupFooterTemplateDirective, GroupHeaderComponent, GroupPanelComponent, ColumnComponent, ColumnGroupComponent, LogicalCellDirective, LogicalRowDirective, FocusableDirective, FooterTemplateDirective, ColGroupComponent, ResizableContainerDirective, i1$3.TemplateContextDirective, FieldAccessorPipe, DetailTemplateDirective, SpanColumnComponent, LoadingComponent, GridTableDirective, CommandColumnComponent, CheckboxColumnComponent, SelectionCheckboxDirective, CellTemplateDirective, EditTemplateDirective, RowDragHandleTemplateDirective, RowDragHintTemplateDirective, TableBodyComponent, NoRecordsTemplateDirective, CellComponent, EditCommandDirective, CancelCommandDirective, SaveCommandDirective, RemoveCommandDirective, AddCommandDirective, AddCommandToolbarDirective, EditCommandToolbarDirective, SaveCommandToolbarDirective, RemoveCommandToolbarDirective, CancelCommandToolbarDirective, CellLoadingTemplateDirective, LoadingTemplateDirective, RowReorderColumnComponent, SortCommandToolbarDirective, FilterCommandToolbarDirective, HeaderComponent, HeaderTemplateDirective, ColumnHandleDirective, SelectAllCheckboxDirective, 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, FilterRowComponent, FilterCellComponent, FilterCellTemplateDirective, StringFilterCellComponent, NumericFilterCellComponent, AutoCompleteFilterCellComponent, BooleanFilterCellComponent, FilterCellHostDirective, FilterCellWrapperComponent, DateFilterCellComponent, ColumnComponent, ColumnGroupComponent, LogicalCellDirective, LogicalRowDirective, FocusableDirective, FooterTemplateDirective, ColGroupComponent, ResizableContainerDirective, i1$3.TemplateContextDirective, FieldAccessorPipe, DetailTemplateDirective, SpanColumnComponent, LoadingComponent, GridTableDirective, FilterCellOperatorsComponent, ContainsFilterOperatorComponent, DoesNotContainFilterOperatorComponent, EndsWithFilterOperatorComponent, EqualFilterOperatorComponent, IsEmptyFilterOperatorComponent, IsNotEmptyFilterOperatorComponent, IsNotNullFilterOperatorComponent, IsNullFilterOperatorComponent, NotEqualFilterOperatorComponent, StartsWithFilterOperatorComponent, GreaterFilterOperatorComponent, GreaterOrEqualToFilterOperatorComponent, LessFilterOperatorComponent, LessOrEqualToFilterOperatorComponent, AfterFilterOperatorComponent, AfterEqFilterOperatorComponent, BeforeEqFilterOperatorComponent, BeforeFilterOperatorComponent, FilterInputDirective, ColumnComponent, ColumnGroupComponent, LogicalCellDirective, LogicalRowDirective, FocusableDirective, FooterTemplateDirective, ColGroupComponent, ResizableContainerDirective, i1$3.TemplateContextDirective, FieldAccessorPipe, DetailTemplateDirective, SpanColumnComponent, LoadingComponent, GridTableDirective, FilterCellOperatorsComponent, ContainsFilterOperatorComponent, DoesNotContainFilterOperatorComponent, EndsWithFilterOperatorComponent, EqualFilterOperatorComponent, IsEmptyFilterOperatorComponent, IsNotEmptyFilterOperatorComponent, IsNotNullFilterOperatorComponent, IsNullFilterOperatorComponent, NotEqualFilterOperatorComponent, StartsWithFilterOperatorComponent, GreaterFilterOperatorComponent, GreaterOrEqualToFilterOperatorComponent, LessFilterOperatorComponent, LessOrEqualToFilterOperatorComponent, AfterFilterOperatorComponent, AfterEqFilterOperatorComponent, BeforeEqFilterOperatorComponent, BeforeFilterOperatorComponent, FilterInputDirective, FilterMenuComponent, FilterMenuContainerComponent, FilterMenuInputWrapperComponent, StringFilterMenuInputComponent, StringFilterMenuComponent, FilterMenuTemplateDirective, NumericFilterMenuComponent, NumericFilterMenuInputComponent, DateFilterMenuInputComponent, DateFilterMenuComponent, FilterMenuHostDirective, BooleanFilterMenuComponent, FilterMenuDropDownListDirective, BooleanFilterRadioButtonDirective, ColumnMenuChooserItemCheckedDirective, ColumnListComponent, ColumnChooserComponent, ColumnChooserToolbarDirective, ColumnMenuChooserComponent, ColumnMenuFilterComponent, ColumnMenuItemComponent, ColumnMenuItemContentTemplateDirective, ColumnMenuSortComponent, ColumnMenuComponent, ColumnMenuLockComponent, ColumnMenuTemplateDirective, ColumnMenuContainerComponent, ColumnMenuItemDirective, ColumnMenuStickComponent, ColumnMenuPositionComponent, ColumnMenuAutoSizeColumnComponent, ColumnMenuAutoSizeAllColumnsComponent, GridComponent, ListComponent, ToolbarComponent, LocalizedMessagesDirective, CustomMessagesComponent, DataBindingDirective, ToolbarTemplateDirective, SelectionDirective, TemplateEditingDirective, ReactiveEditingDirective, InCellEditingDirective, ExternalEditingDirective, ExpandDetailsDirective, ExpandGroupDirective, GroupBindingDirective, GridMarqueeDirective, GridSpacerComponent, GridToolbarFocusableDirective, StatusBarComponent, StatusBarTemplateDirective, GridClipboardDirective, FormComponent, DialogFormComponent, FormFormFieldComponent, UndoRedoDirective, i51.ToolBarComponent, i51.ToolbarCustomMessagesComponent, i51.ToolBarButtonComponent, i51.ToolBarButtonGroupComponent, i51.ToolBarDropDownButtonComponent, i51.ToolBarSeparatorComponent, i51.ToolBarSpacerComponent, i51.ToolBarSplitButtonComponent, i51.ToolBarToolComponent, TableDirective,
31990
+ UndoCommandToolbarDirective,
31991
+ RedoCommandToolbarDirective], exports: [GridComponent, ToolbarTemplateDirective, ToolbarComponent, GridSpacerComponent, StatusBarTemplateDirective, DataBindingDirective, SelectionDirective, CustomMessagesComponent, GroupBindingDirective, TemplateEditingDirective, ReactiveEditingDirective, InCellEditingDirective, ExternalEditingDirective, ExpandDetailsDirective, ExpandGroupDirective, GridToolbarFocusableDirective, GroupHeaderTemplateDirective, GroupHeaderColumnTemplateDirective, GroupFooterTemplateDirective, GroupHeaderComponent, GroupPanelComponent, ColumnComponent, ColumnGroupComponent, LogicalCellDirective, LogicalRowDirective, FocusableDirective, FooterTemplateDirective, ColGroupComponent, ResizableContainerDirective, i1$3.TemplateContextDirective, FieldAccessorPipe, DetailTemplateDirective, SpanColumnComponent, LoadingComponent, GridTableDirective, CommandColumnComponent, CheckboxColumnComponent, SelectionCheckboxDirective, CellTemplateDirective, EditTemplateDirective, RowDragHandleTemplateDirective, RowDragHintTemplateDirective, TableBodyComponent, NoRecordsTemplateDirective, CellComponent, EditCommandDirective, CancelCommandDirective, SaveCommandDirective, RemoveCommandDirective, AddCommandDirective, AddCommandToolbarDirective, EditCommandToolbarDirective, SaveCommandToolbarDirective, RemoveCommandToolbarDirective, CancelCommandToolbarDirective, CellLoadingTemplateDirective, LoadingTemplateDirective, RowReorderColumnComponent, SortCommandToolbarDirective, FilterCommandToolbarDirective, HeaderComponent, HeaderTemplateDirective, ColumnHandleDirective, SelectAllCheckboxDirective, FilterRowComponent, FilterCellComponent, FilterCellTemplateDirective, StringFilterCellComponent, NumericFilterCellComponent, AutoCompleteFilterCellComponent, BooleanFilterCellComponent, FilterCellHostDirective, FilterCellWrapperComponent, DateFilterCellComponent, FilterCellOperatorsComponent, ContainsFilterOperatorComponent, DoesNotContainFilterOperatorComponent, EndsWithFilterOperatorComponent, EqualFilterOperatorComponent, IsEmptyFilterOperatorComponent, IsNotEmptyFilterOperatorComponent, IsNotNullFilterOperatorComponent, IsNullFilterOperatorComponent, NotEqualFilterOperatorComponent, StartsWithFilterOperatorComponent, GreaterFilterOperatorComponent, GreaterOrEqualToFilterOperatorComponent, LessFilterOperatorComponent, LessOrEqualToFilterOperatorComponent, AfterFilterOperatorComponent, AfterEqFilterOperatorComponent, BeforeEqFilterOperatorComponent, BeforeFilterOperatorComponent, FilterMenuComponent, FilterMenuContainerComponent, FilterMenuInputWrapperComponent, StringFilterMenuInputComponent, StringFilterMenuComponent, FilterMenuTemplateDirective, NumericFilterMenuComponent, NumericFilterMenuInputComponent, DateFilterMenuInputComponent, DateFilterMenuComponent, FilterMenuHostDirective, BooleanFilterMenuComponent, FilterMenuDropDownListDirective, BooleanFilterRadioButtonDirective, ColumnChooserComponent, ColumnChooserToolbarDirective, ColumnMenuFilterComponent, ColumnMenuItemComponent, ColumnMenuItemContentTemplateDirective, ColumnMenuSortComponent, ColumnMenuLockComponent, ColumnMenuStickComponent, ColumnMenuPositionComponent, ColumnMenuChooserComponent, ColumnMenuTemplateDirective, ColumnMenuContainerComponent, ColumnMenuItemDirective, ColumnMenuComponent, ColumnMenuAutoSizeColumnComponent, ColumnMenuAutoSizeAllColumnsComponent, GridClipboardDirective, UndoRedoDirective, UndoCommandToolbarDirective, 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] });
31363
31992
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GridModule, providers: [
31364
31993
  PopupService,
31365
31994
  ResizeBatchService,
@@ -31393,7 +32022,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
31393
32022
  ...KENDO_GRID_COLUMN_MENU_DECLARATIONS,
31394
32023
  ...KENDO_GRID_DECLARATIONS,
31395
32024
  ...KENDO_TOOLBAR,
31396
- TableDirective
32025
+ TableDirective,
32026
+ UndoCommandToolbarDirective,
32027
+ RedoCommandToolbarDirective
31397
32028
  ],
31398
32029
  providers: [
31399
32030
  PopupService,
@@ -31490,5 +32121,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
31490
32121
  * Generated bundle index. Do not edit.
31491
32122
  */
31492
32123
 
31493
- export { AddCommandDirective, AddCommandToolbarDirective, AfterEqFilterOperatorComponent, AfterFilterOperatorComponent, AutoCompleteFilterCellComponent, BaseFilterCellComponent, BeforeEqFilterOperatorComponent, BeforeFilterOperatorComponent, BooleanFilterCellComponent, BooleanFilterComponent, BooleanFilterMenuComponent, BooleanFilterRadioButtonDirective, BrowserSupportService, CELL_CONTEXT, CancelCommandDirective, CancelCommandToolbarDirective, CellCloseEvent, CellComponent, CellLoadingTemplateDirective, CellSelectionAggregateService, CellSelectionService, CellTemplateDirective, ChangeNotificationService, CheckboxColumnComponent, ColGroupComponent, ColumnBase, ColumnChooserComponent, ColumnChooserToolbarDirective, ColumnComponent, ColumnGroupComponent, ColumnHandleDirective, ColumnInfoService, ColumnListComponent, ColumnLockedChangeEvent, ColumnMenuAutoSizeAllColumnsComponent, ColumnMenuAutoSizeColumnComponent, ColumnMenuChooserComponent, ColumnMenuComponent, ColumnMenuContainerComponent, ColumnMenuFilterComponent, ColumnMenuItemComponent, ColumnMenuItemContentTemplateDirective, ColumnMenuItemDirective, ColumnMenuLockComponent, ColumnMenuPositionComponent, ColumnMenuService, ColumnMenuSortComponent, ColumnMenuStickComponent, ColumnMenuTemplateDirective, ColumnReorderEvent, ColumnReorderService, ColumnResizingService, ColumnStickyChangeEvent, ColumnVisibilityChangeEvent, ColumnsContainer, CommandColumnComponent, ContainsFilterOperatorComponent, ContextService, CustomMessagesComponent, DEFAULT_SCROLLER_FACTORY, DataBindingDirective, DateFilterCellComponent, DateFilterComponent, DateFilterMenuComponent, DateFilterMenuInputComponent, DetailCollapseEvent, DetailExpandEvent, DetailTemplateDirective, DetailsService, DoesNotContainFilterOperatorComponent, DomEventsService, DragAndDropService, DragHintService, DropCueService, EditCommandDirective, EditCommandToolbarDirective, EditService as EditServiceClass, EditTemplateDirective, EditingDirectiveBase, EndsWithFilterOperatorComponent, EqualFilterOperatorComponent, ExcelCommandDirective, ExcelCommandToolbarDirective, ExcelComponent, ExcelExportEvent, ExcelModule, ExcelService, ExpandDetailsDirective, ExpandGroupDirective, ExternalEditingDirective, FieldAccessorPipe, FilterCellComponent, FilterCellHostDirective, FilterCellOperatorsComponent, FilterCellTemplateDirective, FilterCellWrapperComponent, FilterCommandToolbarDirective, FilterInputDirective, FilterMenuComponent, FilterMenuContainerComponent, FilterMenuDropDownListDirective, FilterMenuHostDirective, FilterMenuInputWrapperComponent, FilterMenuTemplateDirective, FilterRowComponent, FilterService, FocusRoot, FocusableDirective, FooterComponent, FooterTemplateDirective, GreaterFilterOperatorComponent, GreaterOrEqualToFilterOperatorComponent, GridClipboardDirective, GridComponent, GridModule, GridSpacerComponent, GridTableDirective, GridToolbarFocusableDirective, GridToolbarNavigationService, GroupBindingDirective, GroupFooterTemplateDirective, GroupHeaderColumnTemplateDirective, GroupHeaderComponent, GroupHeaderTemplateDirective, GroupInfoService, GroupPanelComponent, GroupsService, HeaderComponent, HeaderTemplateDirective, IdService, InCellEditingDirective, IsEmptyFilterOperatorComponent, IsNotEmptyFilterOperatorComponent, IsNotNullFilterOperatorComponent, IsNullFilterOperatorComponent, KENDO_GRID, KENDO_GRID_BODY_EXPORTS, KENDO_GRID_COLUMN_DRAGANDDROP, KENDO_GRID_COLUMN_MENU_DECLARATIONS, KENDO_GRID_COLUMN_MENU_EXPORTS, KENDO_GRID_DECLARATIONS, KENDO_GRID_EXCEL_EXPORT, KENDO_GRID_EXPORTS, KENDO_GRID_FILTER_MENU, KENDO_GRID_FILTER_MENU_EXPORTS, KENDO_GRID_FILTER_OPERATORS, KENDO_GRID_FILTER_ROW, KENDO_GRID_FILTER_ROW_EXPORTS, KENDO_GRID_FILTER_SHARED, KENDO_GRID_FOOTER_EXPORTS, KENDO_GRID_GROUP_EXPORTS, KENDO_GRID_HEADER_EXPORTS, KENDO_GRID_PDF_EXPORT, KENDO_GRID_SHARED, LessFilterOperatorComponent, LessOrEqualToFilterOperatorComponent, ListComponent, LoadingComponent, LoadingTemplateDirective, LocalDataChangesService, LogicalCellDirective, LogicalRowDirective, MenuTabbingService, NavigationService, NoRecordsTemplateDirective, NotEqualFilterOperatorComponent, NumericFilterCellComponent, NumericFilterComponent, NumericFilterMenuComponent, NumericFilterMenuInputComponent, PDFCommandDirective, PDFCommandToolbarDirective, PDFComponent, PDFMarginComponent, PDFModule, PDFService, PDFTemplateDirective, PopupCloseEvent, ReactiveEditingDirective, RemoveCommandDirective, RemoveCommandToolbarDirective, ResizableContainerDirective, ResizeService, ResponsiveService, RowDragHandleTemplateDirective, RowDragHintTemplateDirective, RowEditingDirectiveBase, RowReorderColumnComponent, RowReorderService, SaveCommandDirective, SaveCommandToolbarDirective, ScrollRequestService, ScrollSyncService, SelectAllCheckboxDirective, SelectionCheckboxDirective, SelectionDirective, SelectionService, SinglePopupService, SizingOptionsService, Skip, SortCommandToolbarDirective, SortService, SpanColumnComponent, StartsWithFilterOperatorComponent, StatusBarTemplateDirective, StringFilterCellComponent, StringFilterComponent, StringFilterMenuComponent, StringFilterMenuInputComponent, SuspendService, TableBodyComponent, TableDirective, TemplateEditingDirective, ToolbarComponent, ToolbarTemplateDirective, count, defaultTrackBy, hasFilterMenu, hasFilterRow, isFilterable, slice };
32124
+ export { AddCommandDirective, AddCommandToolbarDirective, AfterEqFilterOperatorComponent, AfterFilterOperatorComponent, AutoCompleteFilterCellComponent, BaseFilterCellComponent, BeforeEqFilterOperatorComponent, BeforeFilterOperatorComponent, BooleanFilterCellComponent, BooleanFilterComponent, BooleanFilterMenuComponent, BooleanFilterRadioButtonDirective, BrowserSupportService, CELL_CONTEXT, CancelCommandDirective, CancelCommandToolbarDirective, CellCloseEvent, CellComponent, CellLoadingTemplateDirective, CellSelectionAggregateService, CellSelectionService, CellTemplateDirective, ChangeNotificationService, CheckboxColumnComponent, ColGroupComponent, ColumnBase, ColumnChooserComponent, ColumnChooserToolbarDirective, ColumnComponent, ColumnGroupComponent, ColumnHandleDirective, ColumnInfoService, ColumnListComponent, ColumnLockedChangeEvent, ColumnMenuAutoSizeAllColumnsComponent, ColumnMenuAutoSizeColumnComponent, ColumnMenuChooserComponent, ColumnMenuComponent, ColumnMenuContainerComponent, ColumnMenuFilterComponent, ColumnMenuItemComponent, ColumnMenuItemContentTemplateDirective, ColumnMenuItemDirective, ColumnMenuLockComponent, ColumnMenuPositionComponent, ColumnMenuService, ColumnMenuSortComponent, ColumnMenuStickComponent, ColumnMenuTemplateDirective, ColumnReorderEvent, ColumnReorderService, ColumnResizingService, ColumnStickyChangeEvent, ColumnVisibilityChangeEvent, ColumnsContainer, CommandColumnComponent, ContainsFilterOperatorComponent, ContextService, CustomMessagesComponent, DEFAULT_SCROLLER_FACTORY, DataBindingDirective, DateFilterCellComponent, DateFilterComponent, DateFilterMenuComponent, DateFilterMenuInputComponent, DetailCollapseEvent, DetailExpandEvent, DetailTemplateDirective, DetailsService, DoesNotContainFilterOperatorComponent, DomEventsService, DragAndDropService, DragHintService, DropCueService, EditCommandDirective, EditCommandToolbarDirective, EditService as EditServiceClass, EditTemplateDirective, EditingDirectiveBase, EndsWithFilterOperatorComponent, EqualFilterOperatorComponent, ExcelCommandDirective, ExcelCommandToolbarDirective, ExcelComponent, ExcelExportEvent, ExcelModule, ExcelService, ExpandDetailsDirective, ExpandGroupDirective, ExternalEditingDirective, FieldAccessorPipe, FilterCellComponent, FilterCellHostDirective, FilterCellOperatorsComponent, FilterCellTemplateDirective, FilterCellWrapperComponent, FilterCommandToolbarDirective, FilterInputDirective, FilterMenuComponent, FilterMenuContainerComponent, FilterMenuDropDownListDirective, FilterMenuHostDirective, FilterMenuInputWrapperComponent, FilterMenuTemplateDirective, FilterRowComponent, FilterService, FocusRoot, FocusableDirective, FooterComponent, FooterTemplateDirective, GreaterFilterOperatorComponent, GreaterOrEqualToFilterOperatorComponent, GridClipboardDirective, GridComponent, GridModule, GridSpacerComponent, GridTableDirective, GridToolbarFocusableDirective, GridToolbarNavigationService, GroupBindingDirective, GroupFooterTemplateDirective, GroupHeaderColumnTemplateDirective, GroupHeaderComponent, GroupHeaderTemplateDirective, GroupInfoService, GroupPanelComponent, GroupsService, HeaderComponent, HeaderTemplateDirective, IdService, InCellEditingDirective, IsEmptyFilterOperatorComponent, IsNotEmptyFilterOperatorComponent, IsNotNullFilterOperatorComponent, IsNullFilterOperatorComponent, KENDO_GRID, KENDO_GRID_BODY_EXPORTS, KENDO_GRID_COLUMN_DRAGANDDROP, KENDO_GRID_COLUMN_MENU_DECLARATIONS, KENDO_GRID_COLUMN_MENU_EXPORTS, KENDO_GRID_DECLARATIONS, KENDO_GRID_EXCEL_EXPORT, KENDO_GRID_EXPORTS, KENDO_GRID_FILTER_MENU, KENDO_GRID_FILTER_MENU_EXPORTS, KENDO_GRID_FILTER_OPERATORS, KENDO_GRID_FILTER_ROW, KENDO_GRID_FILTER_ROW_EXPORTS, KENDO_GRID_FILTER_SHARED, KENDO_GRID_FOOTER_EXPORTS, KENDO_GRID_GROUP_EXPORTS, KENDO_GRID_HEADER_EXPORTS, KENDO_GRID_PDF_EXPORT, KENDO_GRID_SHARED, LessFilterOperatorComponent, LessOrEqualToFilterOperatorComponent, ListComponent, LoadingComponent, LoadingTemplateDirective, LocalDataChangesService, LogicalCellDirective, LogicalRowDirective, MenuTabbingService, NavigationService, NoRecordsTemplateDirective, NotEqualFilterOperatorComponent, NumericFilterCellComponent, NumericFilterComponent, NumericFilterMenuComponent, NumericFilterMenuInputComponent, PDFCommandDirective, PDFCommandToolbarDirective, PDFComponent, PDFMarginComponent, PDFModule, PDFService, PDFTemplateDirective, PopupCloseEvent, ReactiveEditingDirective, RedoCommandToolbarDirective, RemoveCommandDirective, RemoveCommandToolbarDirective, ResizableContainerDirective, ResizeService, ResponsiveService, RowDragHandleTemplateDirective, RowDragHintTemplateDirective, RowEditingDirectiveBase, RowReorderColumnComponent, RowReorderService, SaveCommandDirective, SaveCommandToolbarDirective, ScrollRequestService, ScrollSyncService, SelectAllCheckboxDirective, SelectionCheckboxDirective, SelectionDirective, SelectionService, SinglePopupService, SizingOptionsService, Skip, SortCommandToolbarDirective, SortService, SpanColumnComponent, StartsWithFilterOperatorComponent, StatusBarTemplateDirective, StringFilterCellComponent, StringFilterComponent, StringFilterMenuComponent, StringFilterMenuInputComponent, SuspendService, TableBodyComponent, TableDirective, TemplateEditingDirective, ToolbarComponent, ToolbarTemplateDirective, UndoCommandToolbarDirective, UndoRedoDirective, UndoRedoEvent, count, defaultTrackBy, hasFilterMenu, hasFilterRow, isFilterable, slice };
31494
32125