@progress/kendo-angular-grid 19.0.0-develop.10 → 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 (65) hide show
  1. package/column-menu/column-chooser-tool.directive.d.ts +6 -6
  2. package/columns/column-base.d.ts +5 -0
  3. package/columns/span-column.component.d.ts +2 -2
  4. package/common/toolbar-tool-base.directive.d.ts +26 -0
  5. package/directives.d.ts +11 -4
  6. package/editing/add-command-tool.directive.d.ts +7 -6
  7. package/editing/cancel-command-tool.directive.d.ts +38 -0
  8. package/editing/edit-command-tool.directive.d.ts +38 -0
  9. package/editing/edit.service.d.ts +1 -1
  10. package/editing/remove-command-tool.directive.d.ts +39 -0
  11. package/editing/save-command-tool.directive.d.ts +38 -0
  12. package/editing/toolbar-editing-tool-base.directive.d.ts +29 -0
  13. package/esm2022/column-menu/column-chooser-tool.directive.mjs +17 -30
  14. package/esm2022/column-resizing/column-handle.directive.mjs +2 -2
  15. package/esm2022/columns/column-base.mjs +9 -0
  16. package/esm2022/columns/columns-container.mjs +1 -1
  17. package/esm2022/columns/span-column.component.mjs +9 -9
  18. package/esm2022/common/toolbar-tool-base.directive.mjs +81 -0
  19. package/esm2022/directives.mjs +17 -2
  20. package/esm2022/editing/add-command-tool.directive.mjs +12 -15
  21. package/esm2022/editing/cancel-command-tool.directive.mjs +64 -0
  22. package/esm2022/editing/edit-command-tool.directive.mjs +59 -0
  23. package/esm2022/editing/remove-command-tool.directive.mjs +60 -0
  24. package/esm2022/editing/remove-command.directive.mjs +1 -0
  25. package/esm2022/editing/save-command-tool.directive.mjs +64 -0
  26. package/esm2022/editing/toolbar-editing-tool-base.directive.mjs +91 -0
  27. package/esm2022/excel/excel-command-tool.directive.mjs +12 -17
  28. package/esm2022/grid.component.mjs +155 -40
  29. package/esm2022/grid.module.mjs +114 -101
  30. package/esm2022/index.mjs +9 -0
  31. package/esm2022/localization/messages.mjs +43 -1
  32. package/esm2022/navigation/toolbar-tool-name.mjs +17 -0
  33. package/esm2022/package-metadata.mjs +2 -2
  34. package/esm2022/pdf/pdf-command-tool.directive.mjs +12 -15
  35. package/esm2022/rendering/cell.component.mjs +3 -3
  36. package/esm2022/rendering/header/header.component.mjs +1 -1
  37. package/esm2022/rendering/list.component.mjs +1 -1
  38. package/esm2022/rendering/table-body.component.mjs +1 -1
  39. package/esm2022/selection/selection.service.mjs +11 -0
  40. package/esm2022/state-management/grid-state.models.mjs +26 -0
  41. package/esm2022/state-management/redo-command-tool.mjs +66 -0
  42. package/esm2022/state-management/undo-command-tool.mjs +66 -0
  43. package/esm2022/state-management/undo-redo.directive.mjs +178 -0
  44. package/esm2022/state-management/undo-redo.service.mjs +22 -0
  45. package/esm2022/state-management/undo-redo.stack.mjs +232 -0
  46. package/esm2022/utils.mjs +13 -0
  47. package/excel/excel-command-tool.directive.d.ts +5 -5
  48. package/fesm2022/progress-kendo-angular-grid.mjs +1213 -162
  49. package/grid.component.d.ts +42 -19
  50. package/grid.module.d.ts +107 -100
  51. package/index.d.ts +8 -0
  52. package/localization/messages.d.ts +29 -1
  53. package/navigation/toolbar-tool-name.d.ts +17 -0
  54. package/package.json +20 -20
  55. package/pdf/pdf-command-tool.directive.d.ts +6 -5
  56. package/rendering/cell.component.d.ts +1 -1
  57. package/schematics/ngAdd/index.js +4 -4
  58. package/selection/selection.service.d.ts +1 -0
  59. package/state-management/grid-state.models.d.ts +58 -0
  60. package/state-management/redo-command-tool.d.ts +38 -0
  61. package/state-management/undo-command-tool.d.ts +38 -0
  62. package/state-management/undo-redo.directive.d.ts +51 -0
  63. package/state-management/undo-redo.service.d.ts +19 -0
  64. package/state-management/undo-redo.stack.d.ts +104 -0
  65. package/utils.d.ts +11 -1
@@ -2,10 +2,11 @@
2
2
  * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { NgZone, Renderer2, AfterViewInit, OnInit, OnDestroy } from '@angular/core';
5
+ import { NgZone, Renderer2, AfterViewInit, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
6
6
  import { PopupService } from '@progress/kendo-angular-popup';
7
7
  import { RefreshService, ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
8
8
  import { ContextService } from '../common/provider.service';
9
+ import { ToolbarToolBase } from '../common/toolbar-tool-base.directive';
9
10
  import * as i0 from "@angular/core";
10
11
  /**
11
12
  * Represents the `column-chooser` toolbar tool of the Grid.
@@ -21,12 +22,12 @@ import * as i0 from "@angular/core";
21
22
  * </kendo-grid>
22
23
  * ```
23
24
  */
24
- export declare class ColumnChooserToolbarDirective implements OnInit, AfterViewInit, OnDestroy {
25
+ export declare class ColumnChooserToolbarDirective extends ToolbarToolBase implements OnInit, AfterViewInit, OnDestroy {
25
26
  private renderer;
26
27
  private popupSerivce;
27
28
  host: ToolBarButtonComponent;
28
- private ctx;
29
- private zone;
29
+ ctx: ContextService;
30
+ zone: NgZone;
30
31
  private refresh;
31
32
  /**
32
33
  * Specifies if the changes in the visibility of the column will be immediately applied.
@@ -43,8 +44,7 @@ export declare class ColumnChooserToolbarDirective implements OnInit, AfterViewI
43
44
  private popupRef;
44
45
  private subs;
45
46
  private nextId;
46
- constructor(renderer: Renderer2, popupSerivce: PopupService, host: ToolBarButtonComponent, ctx: ContextService, zone: NgZone, refresh: RefreshService);
47
- ngOnInit(): void;
47
+ constructor(renderer: Renderer2, popupSerivce: PopupService, host: ToolBarButtonComponent, ctx: ContextService, zone: NgZone, refresh: RefreshService, cdr: ChangeDetectorRef);
48
48
  ngAfterViewInit(): void;
49
49
  ngOnDestroy(): void;
50
50
  /**
@@ -271,6 +271,10 @@ export declare class ColumnBase implements AfterViewInit {
271
271
  */
272
272
  get isLocked(): boolean;
273
273
  protected _width: number;
274
+ /**
275
+ * @hidden
276
+ */
277
+ get id(): string;
274
278
  /**
275
279
  * @hidden
276
280
  */
@@ -299,6 +303,7 @@ export declare class ColumnBase implements AfterViewInit {
299
303
  * @hidden
300
304
  */
301
305
  get isVisible(): boolean;
306
+ private _id;
302
307
  /**
303
308
  * @hidden
304
309
  */
@@ -39,7 +39,7 @@ export declare class SpanColumnComponent extends ColumnBase {
39
39
  /**
40
40
  * @hidden
41
41
  */
42
- childColumns: QueryList<ColumnComponent>;
42
+ children: QueryList<ColumnComponent>;
43
43
  /**
44
44
  * @hidden
45
45
  */
@@ -118,5 +118,5 @@ export declare class SpanColumnComponent extends ColumnBase {
118
118
  */
119
119
  set cellRowspan(cellRowSpan: any);
120
120
  static ɵfac: i0.ɵɵFactoryDeclaration<SpanColumnComponent, [{ optional: true; host: true; skipSelf: true; }, { optional: true; }]>;
121
- static ɵcmp: i0.ɵɵComponentDeclaration<SpanColumnComponent, "kendo-grid-span-column", never, { "editable": { "alias": "editable"; "required": false; }; "locked": { "alias": "locked"; "required": false; }; }, {}, ["template", "editTemplate", "childColumns"], never, true, never>;
121
+ static ɵcmp: i0.ɵɵComponentDeclaration<SpanColumnComponent, "kendo-grid-span-column", never, { "editable": { "alias": "editable"; "required": false; }; "locked": { "alias": "locked"; "required": false; }; }, {}, ["template", "editTemplate", "children"], never, true, never>;
122
122
  }
@@ -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 { AfterViewInit, ChangeDetectorRef, NgZone, OnDestroy, OnInit } from '@angular/core';
6
+ import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
+ import { ContextService } from './provider.service';
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * @hidden
11
+ */
12
+ export declare abstract class ToolbarToolBase implements OnInit, OnDestroy, AfterViewInit {
13
+ host: ToolBarButtonComponent;
14
+ commandName: string;
15
+ ctx: ContextService;
16
+ zone: NgZone;
17
+ private cdr;
18
+ private clickSub;
19
+ constructor(host: ToolBarButtonComponent, commandName: string, ctx: ContextService, zone: NgZone, cdr: ChangeDetectorRef);
20
+ ngOnInit(): void;
21
+ ngAfterViewInit(): void;
22
+ ngOnDestroy(): void;
23
+ onClick(_e: any): void;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToolbarToolBase, never>;
25
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ToolbarToolBase, never, never, {}, {}, never, never, false, never>;
26
+ }
package/directives.d.ts CHANGED
@@ -140,8 +140,15 @@ import { AddCommandToolbarDirective } from "./editing/add-command-tool.directive
140
140
  import { RowDragHandleTemplateDirective } from "./row-reordering/drag-handle-template.directive";
141
141
  import { RowDragHintTemplateDirective } from "./row-reordering/drag-hint-template.directive";
142
142
  import { DialogFormComponent, FormComponent, FormFormFieldComponent } from "./editing/form";
143
+ import { UndoRedoDirective } from "./state-management/undo-redo.directive";
144
+ import { UndoCommandToolbarDirective } from "./state-management/undo-command-tool";
145
+ import { RedoCommandToolbarDirective } from "./state-management/redo-command-tool";
143
146
  import { SortCommandToolbarDirective } from "./rendering/toolbar/tools/sort-command-tool.directive";
144
147
  import { FilterCommandToolbarDirective } from "./rendering/toolbar/tools/filter-command-tool.directive";
148
+ import { EditCommandToolbarDirective } from "./editing/edit-command-tool.directive";
149
+ import { SaveCommandToolbarDirective } from "./editing/save-command-tool.directive";
150
+ import { RemoveCommandToolbarDirective } from "./editing/remove-command-tool.directive";
151
+ import { CancelCommandToolbarDirective } from "./editing/cancel-command-tool.directive";
145
152
  /**
146
153
  * @hidden
147
154
  *
@@ -223,19 +230,19 @@ export declare const KENDO_GRID_FOOTER_EXPORTS: readonly [typeof FooterComponent
223
230
  *
224
231
  * Utility array that contains the Body module exports
225
232
  */
226
- export declare const KENDO_GRID_BODY_EXPORTS: readonly [typeof CommandColumnComponent, typeof CheckboxColumnComponent, typeof SelectionCheckboxDirective, typeof CellTemplateDirective, typeof EditTemplateDirective, typeof RowDragHandleTemplateDirective, typeof RowDragHintTemplateDirective, typeof TableBodyComponent, typeof NoRecordsTemplateDirective, typeof CellComponent, typeof EditCommandDirective, typeof CancelCommandDirective, typeof SaveCommandDirective, typeof RemoveCommandDirective, typeof AddCommandDirective, typeof AddCommandToolbarDirective, typeof CellLoadingTemplateDirective, typeof LoadingTemplateDirective, typeof RowReorderColumnComponent, typeof SortCommandToolbarDirective, typeof FilterCommandToolbarDirective];
233
+ export declare const KENDO_GRID_BODY_EXPORTS: readonly [typeof CommandColumnComponent, typeof CheckboxColumnComponent, typeof SelectionCheckboxDirective, typeof CellTemplateDirective, typeof EditTemplateDirective, typeof RowDragHandleTemplateDirective, typeof RowDragHintTemplateDirective, typeof TableBodyComponent, typeof NoRecordsTemplateDirective, typeof CellComponent, typeof EditCommandDirective, typeof CancelCommandDirective, typeof SaveCommandDirective, typeof RemoveCommandDirective, typeof AddCommandDirective, typeof AddCommandToolbarDirective, typeof EditCommandToolbarDirective, typeof SaveCommandToolbarDirective, typeof RemoveCommandToolbarDirective, typeof CancelCommandToolbarDirective, typeof CellLoadingTemplateDirective, typeof LoadingTemplateDirective, typeof RowReorderColumnComponent, typeof SortCommandToolbarDirective, typeof FilterCommandToolbarDirective];
227
234
  /**
228
235
  * @hidden
229
236
  *
230
237
  * Utility array that contains the Grid module declarations
231
238
  */
232
- export declare const KENDO_GRID_DECLARATIONS: readonly [typeof GridComponent, typeof ListComponent, typeof ToolbarComponent, typeof LocalizedMessagesDirective, typeof CustomMessagesComponent, typeof DataBindingDirective, typeof ToolbarTemplateDirective, typeof SelectionDirective, typeof TemplateEditingDirective, typeof ReactiveEditingDirective, typeof InCellEditingDirective, typeof ExternalEditingDirective, typeof ExpandDetailsDirective, typeof ExpandGroupDirective, typeof GroupBindingDirective, typeof GridMarqueeDirective, typeof GridSpacerComponent, typeof GridToolbarFocusableDirective, typeof StatusBarComponent, typeof StatusBarTemplateDirective, typeof GridClipboardDirective, typeof FormComponent, typeof DialogFormComponent, typeof FormFormFieldComponent];
239
+ export declare const KENDO_GRID_DECLARATIONS: readonly [typeof GridComponent, typeof ListComponent, typeof ToolbarComponent, typeof LocalizedMessagesDirective, typeof CustomMessagesComponent, typeof DataBindingDirective, typeof ToolbarTemplateDirective, typeof SelectionDirective, typeof TemplateEditingDirective, typeof ReactiveEditingDirective, typeof InCellEditingDirective, typeof ExternalEditingDirective, typeof ExpandDetailsDirective, typeof ExpandGroupDirective, typeof GroupBindingDirective, typeof GridMarqueeDirective, typeof GridSpacerComponent, typeof GridToolbarFocusableDirective, typeof StatusBarComponent, typeof StatusBarTemplateDirective, typeof GridClipboardDirective, typeof FormComponent, typeof DialogFormComponent, typeof FormFormFieldComponent, typeof UndoRedoDirective];
233
240
  /**
234
241
  * @hidden
235
242
  *
236
243
  * Utility array that contains the Grid module exports
237
244
  */
238
- export declare const KENDO_GRID_EXPORTS: readonly [typeof GridComponent, typeof ToolbarTemplateDirective, typeof ToolbarComponent, typeof GridSpacerComponent, typeof StatusBarTemplateDirective, typeof DataBindingDirective, typeof SelectionDirective, typeof CustomMessagesComponent, typeof GroupBindingDirective, typeof TemplateEditingDirective, typeof ReactiveEditingDirective, typeof InCellEditingDirective, typeof ExternalEditingDirective, typeof ExpandDetailsDirective, typeof ExpandGroupDirective, typeof GridToolbarFocusableDirective, typeof GroupHeaderTemplateDirective, typeof GroupHeaderColumnTemplateDirective, typeof GroupFooterTemplateDirective, typeof GroupHeaderComponent, typeof GroupPanelComponent, typeof ColumnComponent, typeof ColumnGroupComponent, typeof LogicalCellDirective, typeof LogicalRowDirective, typeof FocusableDirective, typeof FooterTemplateDirective, typeof ColGroupComponent, typeof ResizableContainerDirective, typeof TemplateContextDirective, typeof FieldAccessorPipe, typeof DetailTemplateDirective, typeof SpanColumnComponent, typeof LoadingComponent, typeof GridTableDirective, typeof CommandColumnComponent, typeof CheckboxColumnComponent, typeof SelectionCheckboxDirective, typeof CellTemplateDirective, typeof EditTemplateDirective, typeof RowDragHandleTemplateDirective, typeof RowDragHintTemplateDirective, typeof TableBodyComponent, typeof NoRecordsTemplateDirective, typeof CellComponent, typeof EditCommandDirective, typeof CancelCommandDirective, typeof SaveCommandDirective, typeof RemoveCommandDirective, typeof AddCommandDirective, typeof AddCommandToolbarDirective, typeof CellLoadingTemplateDirective, typeof LoadingTemplateDirective, typeof RowReorderColumnComponent, typeof SortCommandToolbarDirective, typeof FilterCommandToolbarDirective, typeof HeaderComponent, typeof HeaderTemplateDirective, typeof ColumnHandleDirective, typeof SelectAllCheckboxDirective, typeof FilterRowComponent, typeof FilterCellComponent, typeof FilterCellTemplateDirective, typeof StringFilterCellComponent, typeof NumericFilterCellComponent, typeof AutoCompleteFilterCellComponent, typeof BooleanFilterCellComponent, typeof FilterCellHostDirective, typeof FilterCellWrapperComponent, typeof DateFilterCellComponent, typeof FilterCellOperatorsComponent, typeof ContainsFilterOperatorComponent, typeof DoesNotContainFilterOperatorComponent, typeof EndsWithFilterOperatorComponent, typeof EqualFilterOperatorComponent, typeof IsEmptyFilterOperatorComponent, typeof IsNotEmptyFilterOperatorComponent, typeof IsNotNullFilterOperatorComponent, typeof IsNullFilterOperatorComponent, typeof NotEqualFilterOperatorComponent, typeof StartsWithFilterOperatorComponent, typeof GreaterFilterOperatorComponent, typeof GreaterOrEqualToFilterOperatorComponent, typeof LessFilterOperatorComponent, typeof LessOrEqualToFilterOperatorComponent, typeof AfterFilterOperatorComponent, typeof AfterEqFilterOperatorComponent, typeof BeforeEqFilterOperatorComponent, typeof BeforeFilterOperatorComponent, typeof FilterMenuComponent, typeof FilterMenuContainerComponent, typeof FilterMenuInputWrapperComponent, typeof StringFilterMenuInputComponent, typeof StringFilterMenuComponent, typeof FilterMenuTemplateDirective, typeof NumericFilterMenuComponent, typeof NumericFilterMenuInputComponent, typeof DateFilterMenuInputComponent, typeof DateFilterMenuComponent, typeof FilterMenuHostDirective, typeof BooleanFilterMenuComponent, typeof FilterMenuDropDownListDirective, typeof BooleanFilterRadioButtonDirective, typeof ColumnChooserComponent, typeof ColumnChooserToolbarDirective, typeof ColumnMenuFilterComponent, typeof ColumnMenuItemComponent, typeof ColumnMenuItemContentTemplateDirective, typeof ColumnMenuSortComponent, typeof ColumnMenuLockComponent, typeof ColumnMenuStickComponent, typeof ColumnMenuPositionComponent, typeof ColumnMenuChooserComponent, typeof ColumnMenuTemplateDirective, typeof ColumnMenuContainerComponent, typeof ColumnMenuItemDirective, typeof ColumnMenuComponent, typeof ColumnMenuAutoSizeColumnComponent, typeof ColumnMenuAutoSizeAllColumnsComponent, typeof GridClipboardDirective];
245
+ export declare const KENDO_GRID_EXPORTS: readonly [typeof GridComponent, typeof ToolbarTemplateDirective, typeof ToolbarComponent, typeof GridSpacerComponent, typeof StatusBarTemplateDirective, typeof DataBindingDirective, typeof SelectionDirective, typeof CustomMessagesComponent, typeof GroupBindingDirective, typeof TemplateEditingDirective, typeof ReactiveEditingDirective, typeof InCellEditingDirective, typeof ExternalEditingDirective, typeof ExpandDetailsDirective, typeof ExpandGroupDirective, typeof GridToolbarFocusableDirective, typeof GroupHeaderTemplateDirective, typeof GroupHeaderColumnTemplateDirective, typeof GroupFooterTemplateDirective, typeof GroupHeaderComponent, typeof GroupPanelComponent, typeof ColumnComponent, typeof ColumnGroupComponent, typeof LogicalCellDirective, typeof LogicalRowDirective, typeof FocusableDirective, typeof FooterTemplateDirective, typeof ColGroupComponent, typeof ResizableContainerDirective, typeof TemplateContextDirective, typeof FieldAccessorPipe, typeof DetailTemplateDirective, typeof SpanColumnComponent, typeof LoadingComponent, typeof GridTableDirective, typeof CommandColumnComponent, typeof CheckboxColumnComponent, typeof SelectionCheckboxDirective, typeof CellTemplateDirective, typeof EditTemplateDirective, typeof RowDragHandleTemplateDirective, typeof RowDragHintTemplateDirective, typeof TableBodyComponent, typeof NoRecordsTemplateDirective, typeof CellComponent, typeof EditCommandDirective, typeof CancelCommandDirective, typeof SaveCommandDirective, typeof RemoveCommandDirective, typeof AddCommandDirective, typeof AddCommandToolbarDirective, typeof EditCommandToolbarDirective, typeof SaveCommandToolbarDirective, typeof RemoveCommandToolbarDirective, typeof CancelCommandToolbarDirective, typeof CellLoadingTemplateDirective, typeof LoadingTemplateDirective, typeof RowReorderColumnComponent, typeof SortCommandToolbarDirective, typeof FilterCommandToolbarDirective, typeof HeaderComponent, typeof HeaderTemplateDirective, typeof ColumnHandleDirective, typeof SelectAllCheckboxDirective, typeof FilterRowComponent, typeof FilterCellComponent, typeof FilterCellTemplateDirective, typeof StringFilterCellComponent, typeof NumericFilterCellComponent, typeof AutoCompleteFilterCellComponent, typeof BooleanFilterCellComponent, typeof FilterCellHostDirective, typeof FilterCellWrapperComponent, typeof DateFilterCellComponent, typeof FilterCellOperatorsComponent, typeof ContainsFilterOperatorComponent, typeof DoesNotContainFilterOperatorComponent, typeof EndsWithFilterOperatorComponent, typeof EqualFilterOperatorComponent, typeof IsEmptyFilterOperatorComponent, typeof IsNotEmptyFilterOperatorComponent, typeof IsNotNullFilterOperatorComponent, typeof IsNullFilterOperatorComponent, typeof NotEqualFilterOperatorComponent, typeof StartsWithFilterOperatorComponent, typeof GreaterFilterOperatorComponent, typeof GreaterOrEqualToFilterOperatorComponent, typeof LessFilterOperatorComponent, typeof LessOrEqualToFilterOperatorComponent, typeof AfterFilterOperatorComponent, typeof AfterEqFilterOperatorComponent, typeof BeforeEqFilterOperatorComponent, typeof BeforeFilterOperatorComponent, typeof FilterMenuComponent, typeof FilterMenuContainerComponent, typeof FilterMenuInputWrapperComponent, typeof StringFilterMenuInputComponent, typeof StringFilterMenuComponent, typeof FilterMenuTemplateDirective, typeof NumericFilterMenuComponent, typeof NumericFilterMenuInputComponent, typeof DateFilterMenuInputComponent, typeof DateFilterMenuComponent, typeof FilterMenuHostDirective, typeof BooleanFilterMenuComponent, typeof FilterMenuDropDownListDirective, typeof BooleanFilterRadioButtonDirective, typeof ColumnChooserComponent, typeof ColumnChooserToolbarDirective, typeof ColumnMenuFilterComponent, typeof ColumnMenuItemComponent, typeof ColumnMenuItemContentTemplateDirective, typeof ColumnMenuSortComponent, typeof ColumnMenuLockComponent, typeof ColumnMenuStickComponent, typeof ColumnMenuPositionComponent, typeof ColumnMenuChooserComponent, typeof ColumnMenuTemplateDirective, typeof ColumnMenuContainerComponent, typeof ColumnMenuItemDirective, typeof ColumnMenuComponent, typeof ColumnMenuAutoSizeColumnComponent, typeof ColumnMenuAutoSizeAllColumnsComponent, typeof GridClipboardDirective, typeof UndoRedoDirective, typeof UndoCommandToolbarDirective, typeof RedoCommandToolbarDirective];
239
246
  /**
240
247
  * @hidden
241
248
  *
@@ -251,4 +258,4 @@ export declare const KENDO_GRID_PDF_EXPORT: readonly [typeof PDFComponent, typeo
251
258
  /**
252
259
  * Utility array that contains all `Grid` related components and directives
253
260
  */
254
- export declare const KENDO_GRID: readonly [typeof GridComponent, typeof ToolbarTemplateDirective, typeof ToolbarComponent, typeof GridSpacerComponent, typeof StatusBarTemplateDirective, typeof DataBindingDirective, typeof SelectionDirective, typeof CustomMessagesComponent, typeof GroupBindingDirective, typeof TemplateEditingDirective, typeof ReactiveEditingDirective, typeof InCellEditingDirective, typeof ExternalEditingDirective, typeof ExpandDetailsDirective, typeof ExpandGroupDirective, typeof GridToolbarFocusableDirective, typeof GroupHeaderTemplateDirective, typeof GroupHeaderColumnTemplateDirective, typeof GroupFooterTemplateDirective, typeof GroupHeaderComponent, typeof GroupPanelComponent, typeof ColumnComponent, typeof ColumnGroupComponent, typeof LogicalCellDirective, typeof LogicalRowDirective, typeof FocusableDirective, typeof FooterTemplateDirective, typeof ColGroupComponent, typeof ResizableContainerDirective, typeof TemplateContextDirective, typeof FieldAccessorPipe, typeof DetailTemplateDirective, typeof SpanColumnComponent, typeof LoadingComponent, typeof GridTableDirective, typeof CommandColumnComponent, typeof CheckboxColumnComponent, typeof SelectionCheckboxDirective, typeof CellTemplateDirective, typeof EditTemplateDirective, typeof RowDragHandleTemplateDirective, typeof RowDragHintTemplateDirective, typeof TableBodyComponent, typeof NoRecordsTemplateDirective, typeof CellComponent, typeof EditCommandDirective, typeof CancelCommandDirective, typeof SaveCommandDirective, typeof RemoveCommandDirective, typeof AddCommandDirective, typeof AddCommandToolbarDirective, typeof CellLoadingTemplateDirective, typeof LoadingTemplateDirective, typeof RowReorderColumnComponent, typeof SortCommandToolbarDirective, typeof FilterCommandToolbarDirective, typeof HeaderComponent, typeof HeaderTemplateDirective, typeof ColumnHandleDirective, typeof SelectAllCheckboxDirective, typeof FilterRowComponent, typeof FilterCellComponent, typeof FilterCellTemplateDirective, typeof StringFilterCellComponent, typeof NumericFilterCellComponent, typeof AutoCompleteFilterCellComponent, typeof BooleanFilterCellComponent, typeof FilterCellHostDirective, typeof FilterCellWrapperComponent, typeof DateFilterCellComponent, typeof FilterCellOperatorsComponent, typeof ContainsFilterOperatorComponent, typeof DoesNotContainFilterOperatorComponent, typeof EndsWithFilterOperatorComponent, typeof EqualFilterOperatorComponent, typeof IsEmptyFilterOperatorComponent, typeof IsNotEmptyFilterOperatorComponent, typeof IsNotNullFilterOperatorComponent, typeof IsNullFilterOperatorComponent, typeof NotEqualFilterOperatorComponent, typeof StartsWithFilterOperatorComponent, typeof GreaterFilterOperatorComponent, typeof GreaterOrEqualToFilterOperatorComponent, typeof LessFilterOperatorComponent, typeof LessOrEqualToFilterOperatorComponent, typeof AfterFilterOperatorComponent, typeof AfterEqFilterOperatorComponent, typeof BeforeEqFilterOperatorComponent, typeof BeforeFilterOperatorComponent, typeof FilterMenuComponent, typeof FilterMenuContainerComponent, typeof FilterMenuInputWrapperComponent, typeof StringFilterMenuInputComponent, typeof StringFilterMenuComponent, typeof FilterMenuTemplateDirective, typeof NumericFilterMenuComponent, typeof NumericFilterMenuInputComponent, typeof DateFilterMenuInputComponent, typeof DateFilterMenuComponent, typeof FilterMenuHostDirective, typeof BooleanFilterMenuComponent, typeof FilterMenuDropDownListDirective, typeof BooleanFilterRadioButtonDirective, typeof ColumnChooserComponent, typeof ColumnChooserToolbarDirective, typeof ColumnMenuFilterComponent, typeof ColumnMenuItemComponent, typeof ColumnMenuItemContentTemplateDirective, typeof ColumnMenuSortComponent, typeof ColumnMenuLockComponent, typeof ColumnMenuStickComponent, typeof ColumnMenuPositionComponent, typeof ColumnMenuChooserComponent, typeof ColumnMenuTemplateDirective, typeof ColumnMenuContainerComponent, typeof ColumnMenuItemDirective, typeof ColumnMenuComponent, typeof ColumnMenuAutoSizeColumnComponent, typeof ColumnMenuAutoSizeAllColumnsComponent, typeof GridClipboardDirective, typeof ExcelComponent, typeof ExcelCommandDirective, typeof ExcelCommandToolbarDirective, typeof ExcelColumnComponent, typeof ExcelColumnGroupComponent, typeof ExcelFooterTemplateDirective, typeof ExcelGroupFooterTemplateDirective, typeof ExcelGroupHeaderColumnTemplateDirective, typeof ExcelGroupHeaderTemplateDirective, typeof PDFComponent, typeof PDFMarginComponent, typeof PDFCommandDirective, typeof PDFTemplateDirective, typeof PDFCommandToolbarDirective];
261
+ export declare const KENDO_GRID: readonly [typeof GridComponent, typeof ToolbarTemplateDirective, typeof ToolbarComponent, typeof GridSpacerComponent, typeof StatusBarTemplateDirective, typeof DataBindingDirective, typeof SelectionDirective, typeof CustomMessagesComponent, typeof GroupBindingDirective, typeof TemplateEditingDirective, typeof ReactiveEditingDirective, typeof InCellEditingDirective, typeof ExternalEditingDirective, typeof ExpandDetailsDirective, typeof ExpandGroupDirective, typeof GridToolbarFocusableDirective, typeof GroupHeaderTemplateDirective, typeof GroupHeaderColumnTemplateDirective, typeof GroupFooterTemplateDirective, typeof GroupHeaderComponent, typeof GroupPanelComponent, typeof ColumnComponent, typeof ColumnGroupComponent, typeof LogicalCellDirective, typeof LogicalRowDirective, typeof FocusableDirective, typeof FooterTemplateDirective, typeof ColGroupComponent, typeof ResizableContainerDirective, typeof TemplateContextDirective, typeof FieldAccessorPipe, typeof DetailTemplateDirective, typeof SpanColumnComponent, typeof LoadingComponent, typeof GridTableDirective, typeof CommandColumnComponent, typeof CheckboxColumnComponent, typeof SelectionCheckboxDirective, typeof CellTemplateDirective, typeof EditTemplateDirective, typeof RowDragHandleTemplateDirective, typeof RowDragHintTemplateDirective, typeof TableBodyComponent, typeof NoRecordsTemplateDirective, typeof CellComponent, typeof EditCommandDirective, typeof CancelCommandDirective, typeof SaveCommandDirective, typeof RemoveCommandDirective, typeof AddCommandDirective, typeof AddCommandToolbarDirective, typeof EditCommandToolbarDirective, typeof SaveCommandToolbarDirective, typeof RemoveCommandToolbarDirective, typeof CancelCommandToolbarDirective, typeof CellLoadingTemplateDirective, typeof LoadingTemplateDirective, typeof RowReorderColumnComponent, typeof SortCommandToolbarDirective, typeof FilterCommandToolbarDirective, typeof HeaderComponent, typeof HeaderTemplateDirective, typeof ColumnHandleDirective, typeof SelectAllCheckboxDirective, typeof FilterRowComponent, typeof FilterCellComponent, typeof FilterCellTemplateDirective, typeof StringFilterCellComponent, typeof NumericFilterCellComponent, typeof AutoCompleteFilterCellComponent, typeof BooleanFilterCellComponent, typeof FilterCellHostDirective, typeof FilterCellWrapperComponent, typeof DateFilterCellComponent, typeof FilterCellOperatorsComponent, typeof ContainsFilterOperatorComponent, typeof DoesNotContainFilterOperatorComponent, typeof EndsWithFilterOperatorComponent, typeof EqualFilterOperatorComponent, typeof IsEmptyFilterOperatorComponent, typeof IsNotEmptyFilterOperatorComponent, typeof IsNotNullFilterOperatorComponent, typeof IsNullFilterOperatorComponent, typeof NotEqualFilterOperatorComponent, typeof StartsWithFilterOperatorComponent, typeof GreaterFilterOperatorComponent, typeof GreaterOrEqualToFilterOperatorComponent, typeof LessFilterOperatorComponent, typeof LessOrEqualToFilterOperatorComponent, typeof AfterFilterOperatorComponent, typeof AfterEqFilterOperatorComponent, typeof BeforeEqFilterOperatorComponent, typeof BeforeFilterOperatorComponent, typeof FilterMenuComponent, typeof FilterMenuContainerComponent, typeof FilterMenuInputWrapperComponent, typeof StringFilterMenuInputComponent, typeof StringFilterMenuComponent, typeof FilterMenuTemplateDirective, typeof NumericFilterMenuComponent, typeof NumericFilterMenuInputComponent, typeof DateFilterMenuInputComponent, typeof DateFilterMenuComponent, typeof FilterMenuHostDirective, typeof BooleanFilterMenuComponent, typeof FilterMenuDropDownListDirective, typeof BooleanFilterRadioButtonDirective, typeof ColumnChooserComponent, typeof ColumnChooserToolbarDirective, typeof ColumnMenuFilterComponent, typeof ColumnMenuItemComponent, typeof ColumnMenuItemContentTemplateDirective, typeof ColumnMenuSortComponent, typeof ColumnMenuLockComponent, typeof ColumnMenuStickComponent, typeof ColumnMenuPositionComponent, typeof ColumnMenuChooserComponent, typeof ColumnMenuTemplateDirective, typeof ColumnMenuContainerComponent, typeof ColumnMenuItemDirective, typeof ColumnMenuComponent, typeof ColumnMenuAutoSizeColumnComponent, typeof ColumnMenuAutoSizeAllColumnsComponent, typeof GridClipboardDirective, typeof UndoRedoDirective, typeof UndoCommandToolbarDirective, typeof RedoCommandToolbarDirective, typeof ExcelComponent, typeof ExcelCommandDirective, typeof ExcelCommandToolbarDirective, typeof ExcelColumnComponent, typeof ExcelColumnGroupComponent, typeof ExcelFooterTemplateDirective, typeof ExcelGroupFooterTemplateDirective, typeof ExcelGroupHeaderColumnTemplateDirective, typeof ExcelGroupHeaderTemplateDirective, typeof PDFComponent, typeof PDFMarginComponent, typeof PDFCommandDirective, typeof PDFTemplateDirective, typeof PDFCommandToolbarDirective];
@@ -2,8 +2,11 @@
2
2
  * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
+ import { ChangeDetectorRef, NgZone } from '@angular/core';
5
6
  import { EditService } from './edit.service';
6
7
  import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
8
+ import { ContextService } from '../common/provider.service';
9
+ import { ToolbarEditingToolBase } from './toolbar-editing-tool-base.directive';
7
10
  import * as i0 from "@angular/core";
8
11
  /**
9
12
  * Represents the command for adding a new item to the Grid.
@@ -23,13 +26,11 @@ import * as i0 from "@angular/core";
23
26
  * </kendo-grid>
24
27
  * ```
25
28
  */
26
- export declare class AddCommandToolbarDirective {
27
- private editService;
28
- private host;
29
- private clickSub;
30
- constructor(editService: EditService, host: ToolBarButtonComponent);
29
+ export declare class AddCommandToolbarDirective extends ToolbarEditingToolBase {
30
+ editService: EditService;
31
+ host: ToolBarButtonComponent;
32
+ constructor(editService: EditService, host: ToolBarButtonComponent, ctx: ContextService, zone: NgZone, cdr: ChangeDetectorRef);
31
33
  ngOnInit(): void;
32
- ngOnDestroy(): void;
33
34
  /**
34
35
  * @hidden
35
36
  */
@@ -0,0 +1,38 @@
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 { ChangeDetectorRef, NgZone } from '@angular/core';
6
+ import { EditService } from './edit.service';
7
+ import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
8
+ import { SelectionService } from '../selection/selection.service';
9
+ import { ContextService } from '../common/provider.service';
10
+ import { ToolbarEditingToolBase } from './toolbar-editing-tool-base.directive';
11
+ import * as i0 from "@angular/core";
12
+ /**
13
+ * Represents the `cancel` command in the Grid.
14
+ * You can apply this directive to any `kendo-toolbar-button` element inside a
15
+ * ToolbarComponent used in the Grid.
16
+ *
17
+ * When the user clicks the toolbar button that is associated with the directive, the
18
+ * [cancel]({% slug api_grid_gridcomponent %}#toc-cancel) event is triggered.
19
+ *
20
+ * @example
21
+ * ```html-no-run
22
+ * <kendo-grid>
23
+ * <kendo-toolbar>
24
+ * <kendo-toolbar-button text="Cancel" kendoGridCancelTool></kendo-toolbar-button>
25
+ * </kendo-toolbar>
26
+ * </kendo-grid>
27
+ * ```
28
+ */
29
+ export declare class CancelCommandToolbarDirective extends ToolbarEditingToolBase {
30
+ editService: EditService;
31
+ constructor(editService: EditService, host: ToolBarButtonComponent, selection: SelectionService, ctx: ContextService, zone: NgZone, cdr: ChangeDetectorRef);
32
+ /**
33
+ * @hidden
34
+ */
35
+ onClick(e: any): void;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<CancelCommandToolbarDirective, never>;
37
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CancelCommandToolbarDirective, "[kendoGridCancelTool]", never, {}, {}, never, never, true, never>;
38
+ }
@@ -0,0 +1,38 @@
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 { ChangeDetectorRef, NgZone } from '@angular/core';
6
+ import { EditService } from './edit.service';
7
+ import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
8
+ import { SelectionService } from '../selection/selection.service';
9
+ import { ContextService } from '../common/provider.service';
10
+ import { ToolbarEditingToolBase } from './toolbar-editing-tool-base.directive';
11
+ import * as i0 from "@angular/core";
12
+ /**
13
+ * Represents the `edit` command in the Grid.
14
+ * You can apply this directive to any `kendo-toolbar-button` element inside a
15
+ * ToolbarComponent used in the Grid.
16
+ *
17
+ * When the user clicks the toolbar button that is associated with the directive, the
18
+ * [edit]({% slug api_grid_gridcomponent %}#toc-edit) event is triggered.
19
+ *
20
+ * @example
21
+ * ```html-no-run
22
+ * <kendo-grid>
23
+ * <kendo-toolbar>
24
+ * <kendo-toolbar-button text="Edit" kendoGridEditTool></kendo-toolbar-button>
25
+ * </kendo-toolbar>
26
+ * </kendo-grid>
27
+ * ```
28
+ */
29
+ export declare class EditCommandToolbarDirective extends ToolbarEditingToolBase {
30
+ editService: EditService;
31
+ constructor(editService: EditService, host: ToolBarButtonComponent, selection: SelectionService, ctx: ContextService, zone: NgZone, cdr: ChangeDetectorRef);
32
+ /**
33
+ * @hidden
34
+ */
35
+ onClick(e: any): void;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditCommandToolbarDirective, never>;
37
+ static ɵdir: i0.ɵɵDirectiveDeclaration<EditCommandToolbarDirective, "[kendoGridEditTool]", never, {}, {}, never, never, true, never>;
38
+ }
@@ -33,7 +33,7 @@ export declare class EditService {
33
33
  ngZone: NgZone;
34
34
  changes: EventEmitter<CommandEvent>;
35
35
  changed: Observable<any>;
36
- private editedIndices;
36
+ editedIndices: Entity[];
37
37
  private newItemGroup;
38
38
  private keepEditCell;
39
39
  private keepCellTimeout;
@@ -0,0 +1,39 @@
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 { ChangeDetectorRef, NgZone } from '@angular/core';
6
+ import { EditService } from './edit.service';
7
+ import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
8
+ import { SelectionService } from '../selection/selection.service';
9
+ import { ContextService } from '../common/provider.service';
10
+ import { ToolbarEditingToolBase } from './toolbar-editing-tool-base.directive';
11
+ import * as i0 from "@angular/core";
12
+ /**
13
+ * Represents the `remove` command in the Grid.
14
+ * You can apply this directive to any `kendo-toolbar-button` element inside a
15
+ * ToolbarComponent used in the Grid.
16
+ *
17
+ * When the user clicks the toolbar button that is associated with the directive, the
18
+ * [remove]({% slug api_grid_gridcomponent %}#toc-remove) event is triggered.
19
+ *
20
+ * @example
21
+ * ```html-no-run
22
+ * <kendo-grid>
23
+ * <kendo-toolbar>
24
+ * <kendo-toolbar-button text="Remove row" kendoGridRemoveTool></kendo-toolbar-button>
25
+ * </kendo-toolbar>
26
+ * </kendo-grid>
27
+ * ```
28
+ */
29
+ export declare class RemoveCommandToolbarDirective extends ToolbarEditingToolBase {
30
+ editService: EditService;
31
+ selection: SelectionService;
32
+ constructor(editService: EditService, host: ToolBarButtonComponent, selection: SelectionService, ctx: ContextService, zone: NgZone, cdr: ChangeDetectorRef);
33
+ /**
34
+ * @hidden
35
+ */
36
+ onClick(e: any): void;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<RemoveCommandToolbarDirective, never>;
38
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RemoveCommandToolbarDirective, "[kendoGridRemoveTool]", never, {}, {}, never, never, true, never>;
39
+ }
@@ -0,0 +1,38 @@
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 { ChangeDetectorRef, NgZone } from '@angular/core';
6
+ import { EditService } from './edit.service';
7
+ import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
8
+ import { SelectionService } from '../selection/selection.service';
9
+ import { ContextService } from '../common/provider.service';
10
+ import { ToolbarEditingToolBase } from './toolbar-editing-tool-base.directive';
11
+ import * as i0 from "@angular/core";
12
+ /**
13
+ * Represents the `save` command in the Grid.
14
+ * You can apply this directive to any `kendo-toolbar-button` element inside a
15
+ * ToolbarComponent used in the Grid.
16
+ *
17
+ * When the user clicks the toolbar button that is associated with the directive, the
18
+ * [save]({% slug api_grid_gridcomponent %}#toc-save) event is triggered.
19
+ *
20
+ * @example
21
+ * ```html-no-run
22
+ * <kendo-grid>
23
+ * <kendo-toolbar>
24
+ * <kendo-toolbar-button text="Save" kendoGridSaveTool></kendo-toolbar-button>
25
+ * </kendo-toolbar>
26
+ * </kendo-grid>
27
+ * ```
28
+ */
29
+ export declare class SaveCommandToolbarDirective extends ToolbarEditingToolBase {
30
+ editService: EditService;
31
+ constructor(editService: EditService, host: ToolBarButtonComponent, selection: SelectionService, ctx: ContextService, zone: NgZone, cdr: ChangeDetectorRef);
32
+ /**
33
+ * @hidden
34
+ */
35
+ onClick(e: any): void;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<SaveCommandToolbarDirective, never>;
37
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SaveCommandToolbarDirective, "[kendoGridSaveTool]", never, {}, {}, never, never, true, never>;
38
+ }
@@ -0,0 +1,29 @@
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 { ChangeDetectorRef, DoCheck, NgZone } from '@angular/core';
6
+ import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
+ import { SelectionService } from '../selection/selection.service';
8
+ import { EditService } from '../editing/edit.service';
9
+ import { ContextService } from '../common/provider.service';
10
+ import { ToolbarToolBase } from '../common/toolbar-tool-base.directive';
11
+ import * as i0 from "@angular/core";
12
+ /**
13
+ * @hidden
14
+ */
15
+ export declare abstract class ToolbarEditingToolBase extends ToolbarToolBase implements DoCheck {
16
+ host: ToolBarButtonComponent;
17
+ commandName: string;
18
+ ctx: ContextService;
19
+ editService?: EditService;
20
+ selection?: SelectionService;
21
+ private isEdited;
22
+ private lastToolState;
23
+ constructor(host: ToolBarButtonComponent, commandName: string, ctx: ContextService, zone: NgZone, cdr: ChangeDetectorRef, editService?: EditService, selection?: SelectionService);
24
+ ngDoCheck(): void;
25
+ get lastSelectionIndex(): number;
26
+ get isSelectionPresent(): boolean;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToolbarEditingToolBase, never>;
28
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ToolbarEditingToolBase, never, never, {}, {}, never, never, false, never>;
29
+ }
@@ -2,15 +2,16 @@
2
2
  * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { Directive, NgZone, Input, Renderer2 } from '@angular/core';
5
+ import { Directive, NgZone, Input, Renderer2, ChangeDetectorRef } from '@angular/core';
6
6
  import { PopupService } from '@progress/kendo-angular-popup';
7
7
  import { RefreshService, ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
8
8
  import { ColumnListComponent } from './column-list.component';
9
- import { closest, isPresent } from '@progress/kendo-angular-common';
9
+ import { closest } from '@progress/kendo-angular-common';
10
10
  import { Subscription } from 'rxjs';
11
- import { columnsIcon } from '@progress/kendo-svg-icons';
12
11
  import { ContextService } from '../common/provider.service';
13
12
  import { filter, take } from 'rxjs/operators';
13
+ import { ToolbarToolBase } from '../common/toolbar-tool-base.directive';
14
+ import { ToolbarToolName } from '../navigation/toolbar-tool-name';
14
15
  import * as i0 from "@angular/core";
15
16
  import * as i1 from "@progress/kendo-angular-popup";
16
17
  import * as i2 from "@progress/kendo-angular-toolbar";
@@ -30,7 +31,7 @@ let incrementingId = 0;
30
31
  * </kendo-grid>
31
32
  * ```
32
33
  */
33
- export class ColumnChooserToolbarDirective {
34
+ export class ColumnChooserToolbarDirective extends ToolbarToolBase {
34
35
  renderer;
35
36
  popupSerivce;
36
37
  host;
@@ -52,7 +53,8 @@ export class ColumnChooserToolbarDirective {
52
53
  popupRef;
53
54
  subs = new Subscription();
54
55
  nextId = incrementingId++;
55
- constructor(renderer, popupSerivce, host, ctx, zone, refresh) {
56
+ constructor(renderer, popupSerivce, host, ctx, zone, refresh, cdr) {
57
+ super(host, ToolbarToolName.columns, ctx, zone, cdr);
56
58
  this.renderer = renderer;
57
59
  this.popupSerivce = popupSerivce;
58
60
  this.host = host;
@@ -60,29 +62,13 @@ export class ColumnChooserToolbarDirective {
60
62
  this.zone = zone;
61
63
  this.refresh = refresh;
62
64
  }
63
- ngOnInit() {
64
- this.subs.add(this.host.click.subscribe(e => this.onClick(e)));
65
- const hasToolbarIcon = isPresent(this.host.toolbarOptions.icon) && this.host.toolbarOptions.icon !== '';
66
- const hasOverflowIcon = isPresent(this.host.overflowOptions.icon) && this.host.overflowOptions.icon !== '';
67
- const hasIcon = hasToolbarIcon && hasOverflowIcon;
68
- const hasSvgIcon = isPresent(this.host.toolbarOptions.svgIcon) && isPresent(this.host.overflowOptions.svgIcon);
69
- if (!hasIcon) {
70
- this.host.icon = 'columns';
71
- }
72
- if (!hasSvgIcon) {
73
- this.host.svgIcon = columnsIcon;
74
- }
75
- }
76
65
  ngAfterViewInit() {
77
- const hasText = isPresent(this.host.text);
78
- if (!hasText) {
79
- this.zone.onStable.pipe(take(1)).subscribe(() => {
80
- this.host.text = this.ctx.localization.get(`columns`);
81
- });
82
- }
83
- this.host.toolbarButtonElement.nativeElement.setAttribute('aria-haspopup', 'dialog');
84
- this.host.toolbarButtonElement.nativeElement.setAttribute('aria-expanded', 'false');
85
- this.host.toolbarButtonElement.nativeElement.setAttribute('title', this.ctx.localization.get('columns'));
66
+ super.ngAfterViewInit();
67
+ this.zone.onStable.pipe(take(1)).subscribe(() => {
68
+ this.host.toolbarButtonElement.nativeElement.setAttribute('aria-haspopup', 'dialog');
69
+ this.host.toolbarButtonElement.nativeElement.setAttribute('aria-expanded', 'false');
70
+ this.host.toolbarButtonElement.nativeElement.setAttribute('title', this.ctx.localization.get('columns'));
71
+ });
86
72
  this.subs.add(this.refresh.onRefresh.pipe(filter((tool) => tool === this.host)).subscribe((tool) => {
87
73
  if (tool.overflows && this.popupRef) {
88
74
  this.popupRef.close();
@@ -90,6 +76,7 @@ export class ColumnChooserToolbarDirective {
90
76
  }));
91
77
  }
92
78
  ngOnDestroy() {
79
+ super.ngOnDestroy();
93
80
  this.subs.unsubscribe();
94
81
  }
95
82
  /**
@@ -156,8 +143,8 @@ export class ColumnChooserToolbarDirective {
156
143
  this.host.toolbarButtonElement.nativeElement.removeAttribute('aria-controls');
157
144
  focusAnchor && this.host.toolbarButtonElement.nativeElement.focus();
158
145
  }
159
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnChooserToolbarDirective, deps: [{ token: i0.Renderer2 }, { token: i1.PopupService }, { token: i2.ToolBarButtonComponent }, { token: i3.ContextService }, { token: i0.NgZone }, { token: i2.RefreshService }], target: i0.ɵɵFactoryTarget.Directive });
160
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ColumnChooserToolbarDirective, isStandalone: true, selector: "[kendoGridColumnChooserTool]", inputs: { autoSync: "autoSync", allowHideAll: "allowHideAll" }, ngImport: i0 });
146
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnChooserToolbarDirective, deps: [{ token: i0.Renderer2 }, { token: i1.PopupService }, { token: i2.ToolBarButtonComponent }, { token: i3.ContextService }, { token: i0.NgZone }, { token: i2.RefreshService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
147
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ColumnChooserToolbarDirective, isStandalone: true, selector: "[kendoGridColumnChooserTool]", inputs: { autoSync: "autoSync", allowHideAll: "allowHideAll" }, usesInheritance: true, ngImport: i0 });
161
148
  }
162
149
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnChooserToolbarDirective, decorators: [{
163
150
  type: Directive,
@@ -165,7 +152,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
165
152
  selector: '[kendoGridColumnChooserTool]',
166
153
  standalone: true
167
154
  }]
168
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i1.PopupService }, { type: i2.ToolBarButtonComponent }, { type: i3.ContextService }, { type: i0.NgZone }, { type: i2.RefreshService }]; }, propDecorators: { autoSync: [{
155
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i1.PopupService }, { type: i2.ToolBarButtonComponent }, { type: i3.ContextService }, { type: i0.NgZone }, { type: i2.RefreshService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { autoSync: [{
169
156
  type: Input
170
157
  }], allowHideAll: [{
171
158
  type: Input
@@ -82,7 +82,7 @@ const indexOf = (target, list) => {
82
82
  break;
83
83
  }
84
84
  if ((ignore-- <= 0) && isParentSpanColumn) {
85
- ignore = current.parent.childColumns.length - 1;
85
+ ignore = current.parent.children.length - 1;
86
86
  skip += ignore;
87
87
  }
88
88
  index++;
@@ -134,7 +134,7 @@ export class ColumnHandleDirective {
134
134
  const currentLeafs = leafColumns([this.column]).filter(column => isTruthy(column.resizable));
135
135
  const columnInfo = currentLeafs.map(column => {
136
136
  const isParentSpan = isInSpanColumn(column);
137
- const isLastInSpan = isParentSpan ? column.parent.childColumns.last === column : false;
137
+ const isLastInSpan = isParentSpan ? column.parent.children.last === column : false;
138
138
  const index = indexOf(column, allLeafs);
139
139
  return {
140
140
  column,
@@ -24,6 +24,7 @@ export const isCheckboxColumn = column => column.isCheckboxColumn;
24
24
  */
25
25
  export const isRowReorderColumn = column => column.isRowReorderColumn;
26
26
  const isColumnContainer = column => column.isColumnGroup || isSpanColumn(column);
27
+ let columnId = 0;
27
28
  /**
28
29
  * The base class for the column components of the Grid.
29
30
  */
@@ -300,6 +301,12 @@ export class ColumnBase {
300
301
  return this.parent ? this.parent.isLocked : this.locked;
301
302
  }
302
303
  _width;
304
+ /**
305
+ * @hidden
306
+ */
307
+ get id() {
308
+ return this._id;
309
+ }
303
310
  /**
304
311
  * @hidden
305
312
  */
@@ -344,6 +351,7 @@ export class ColumnBase {
344
351
  get isVisible() {
345
352
  return !this.hidden && this.matchesMedia;
346
353
  }
354
+ _id;
347
355
  /**
348
356
  * @hidden
349
357
  */
@@ -353,6 +361,7 @@ export class ColumnBase {
353
361
  if (parent && idService && parent.idService.gridId() === idService.gridId() && !isColumnContainer(parent)) {
354
362
  throw new Error(ColumnConfigurationErrorMessages.columnNested);
355
363
  }
364
+ this._id = `k-grid-column-${columnId++}`;
356
365
  }
357
366
  ngAfterViewInit() {
358
367
  this.initialMaxResizableWidth = this.maxResizableWidth;
@@ -70,7 +70,7 @@ export class ColumnsContainer {
70
70
  unlockedWidth += column.width || 0;
71
71
  }
72
72
  if (column.isSpanColumn) {
73
- column.childColumns.forEach(c => {
73
+ column.children.forEach(c => {
74
74
  c.leafIndex = leafIndex++;
75
75
  });
76
76
  }