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

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 (40) hide show
  1. package/column-menu/column-chooser-tool.directive.d.ts +6 -6
  2. package/common/toolbar-tool-base.directive.d.ts +26 -0
  3. package/directives.d.ts +7 -3
  4. package/editing/add-command-tool.directive.d.ts +7 -6
  5. package/editing/cancel-command-tool.directive.d.ts +38 -0
  6. package/editing/edit-command-tool.directive.d.ts +38 -0
  7. package/editing/edit.service.d.ts +1 -1
  8. package/editing/remove-command-tool.directive.d.ts +39 -0
  9. package/editing/save-command-tool.directive.d.ts +38 -0
  10. package/editing/toolbar-editing-tool-base.directive.d.ts +29 -0
  11. package/esm2022/column-menu/column-chooser-tool.directive.mjs +17 -30
  12. package/esm2022/common/toolbar-tool-base.directive.mjs +81 -0
  13. package/esm2022/directives.mjs +8 -0
  14. package/esm2022/editing/add-command-tool.directive.mjs +12 -15
  15. package/esm2022/editing/cancel-command-tool.directive.mjs +64 -0
  16. package/esm2022/editing/edit-command-tool.directive.mjs +59 -0
  17. package/esm2022/editing/remove-command-tool.directive.mjs +60 -0
  18. package/esm2022/editing/remove-command.directive.mjs +1 -0
  19. package/esm2022/editing/save-command-tool.directive.mjs +64 -0
  20. package/esm2022/editing/toolbar-editing-tool-base.directive.mjs +91 -0
  21. package/esm2022/excel/excel-command-tool.directive.mjs +12 -17
  22. package/esm2022/grid.component.mjs +51 -1
  23. package/esm2022/grid.module.mjs +104 -100
  24. package/esm2022/index.mjs +4 -0
  25. package/esm2022/localization/messages.mjs +43 -1
  26. package/esm2022/navigation/toolbar-tool-name.mjs +17 -0
  27. package/esm2022/package-metadata.mjs +2 -2
  28. package/esm2022/pdf/pdf-command-tool.directive.mjs +12 -15
  29. package/esm2022/selection/selection.service.mjs +11 -0
  30. package/excel/excel-command-tool.directive.d.ts +5 -5
  31. package/fesm2022/progress-kendo-angular-grid.mjs +502 -82
  32. package/grid.component.d.ts +7 -1
  33. package/grid.module.d.ts +104 -100
  34. package/index.d.ts +4 -0
  35. package/localization/messages.d.ts +29 -1
  36. package/navigation/toolbar-tool-name.d.ts +17 -0
  37. package/package.json +20 -20
  38. package/pdf/pdf-command-tool.directive.d.ts +6 -5
  39. package/schematics/ngAdd/index.js +4 -4
  40. package/selection/selection.service.d.ts +1 -0
@@ -0,0 +1,64 @@
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, Directive, 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 { ToolbarToolName } from '../navigation/toolbar-tool-name';
12
+ import * as i0 from "@angular/core";
13
+ import * as i1 from "./edit.service";
14
+ import * as i2 from "@progress/kendo-angular-toolbar";
15
+ import * as i3 from "../selection/selection.service";
16
+ import * as i4 from "../common/provider.service";
17
+ /**
18
+ * Represents the `cancel` command in the Grid.
19
+ * You can apply this directive to any `kendo-toolbar-button` element inside a
20
+ * ToolbarComponent used in the Grid.
21
+ *
22
+ * When the user clicks the toolbar button that is associated with the directive, the
23
+ * [cancel]({% slug api_grid_gridcomponent %}#toc-cancel) event is triggered.
24
+ *
25
+ * @example
26
+ * ```html-no-run
27
+ * <kendo-grid>
28
+ * <kendo-toolbar>
29
+ * <kendo-toolbar-button text="Cancel" kendoGridCancelTool></kendo-toolbar-button>
30
+ * </kendo-toolbar>
31
+ * </kendo-grid>
32
+ * ```
33
+ */
34
+ export class CancelCommandToolbarDirective extends ToolbarEditingToolBase {
35
+ editService;
36
+ constructor(editService, host, selection, ctx, zone, cdr) {
37
+ super(host, ToolbarToolName.cancel, ctx, zone, cdr, editService, selection);
38
+ this.editService = editService;
39
+ }
40
+ /**
41
+ * @hidden
42
+ */
43
+ onClick(e) {
44
+ e.preventDefault();
45
+ if (this.editService.hasNewItem) {
46
+ this.editService.endEdit();
47
+ }
48
+ else if (this.isSelectionPresent && this.editService.isEdited(this.lastSelectionIndex)) {
49
+ this.editService.endEdit(this.lastSelectionIndex);
50
+ }
51
+ else {
52
+ this.editService.editedIndices.forEach(i => this.editService.endEdit(i.index));
53
+ }
54
+ }
55
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CancelCommandToolbarDirective, deps: [{ token: i1.EditService }, { token: i2.ToolBarButtonComponent }, { token: i3.SelectionService }, { token: i4.ContextService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
56
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CancelCommandToolbarDirective, isStandalone: true, selector: "[kendoGridCancelTool]", usesInheritance: true, ngImport: i0 });
57
+ }
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CancelCommandToolbarDirective, decorators: [{
59
+ type: Directive,
60
+ args: [{
61
+ selector: '[kendoGridCancelTool]',
62
+ standalone: true
63
+ }]
64
+ }], ctorParameters: function () { return [{ type: i1.EditService }, { type: i2.ToolBarButtonComponent }, { type: i3.SelectionService }, { type: i4.ContextService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; } });
@@ -0,0 +1,59 @@
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, Directive, 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 { ToolbarToolName } from '../navigation/toolbar-tool-name';
12
+ import * as i0 from "@angular/core";
13
+ import * as i1 from "./edit.service";
14
+ import * as i2 from "@progress/kendo-angular-toolbar";
15
+ import * as i3 from "../selection/selection.service";
16
+ import * as i4 from "../common/provider.service";
17
+ /**
18
+ * Represents the `edit` command in the Grid.
19
+ * You can apply this directive to any `kendo-toolbar-button` element inside a
20
+ * ToolbarComponent used in the Grid.
21
+ *
22
+ * When the user clicks the toolbar button that is associated with the directive, the
23
+ * [edit]({% slug api_grid_gridcomponent %}#toc-edit) event is triggered.
24
+ *
25
+ * @example
26
+ * ```html-no-run
27
+ * <kendo-grid>
28
+ * <kendo-toolbar>
29
+ * <kendo-toolbar-button text="Edit" kendoGridEditTool></kendo-toolbar-button>
30
+ * </kendo-toolbar>
31
+ * </kendo-grid>
32
+ * ```
33
+ */
34
+ export class EditCommandToolbarDirective extends ToolbarEditingToolBase {
35
+ editService;
36
+ constructor(editService, host, selection, ctx, zone, cdr) {
37
+ super(host, ToolbarToolName.edit, ctx, zone, cdr, editService, selection);
38
+ this.editService = editService;
39
+ }
40
+ /**
41
+ * @hidden
42
+ */
43
+ onClick(e) {
44
+ e.preventDefault();
45
+ if (!this.isSelectionPresent) {
46
+ return;
47
+ }
48
+ this.editService.beginEdit(this.lastSelectionIndex);
49
+ }
50
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditCommandToolbarDirective, deps: [{ token: i1.EditService }, { token: i2.ToolBarButtonComponent }, { token: i3.SelectionService }, { token: i4.ContextService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
51
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: EditCommandToolbarDirective, isStandalone: true, selector: "[kendoGridEditTool]", usesInheritance: true, ngImport: i0 });
52
+ }
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditCommandToolbarDirective, decorators: [{
54
+ type: Directive,
55
+ args: [{
56
+ selector: '[kendoGridEditTool]',
57
+ standalone: true
58
+ }]
59
+ }], ctorParameters: function () { return [{ type: i1.EditService }, { type: i2.ToolBarButtonComponent }, { type: i3.SelectionService }, { type: i4.ContextService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; } });
@@ -0,0 +1,60 @@
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, Directive, 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 { ToolbarToolName } from '../navigation/toolbar-tool-name';
12
+ import * as i0 from "@angular/core";
13
+ import * as i1 from "./edit.service";
14
+ import * as i2 from "@progress/kendo-angular-toolbar";
15
+ import * as i3 from "../selection/selection.service";
16
+ import * as i4 from "../common/provider.service";
17
+ /**
18
+ * Represents the `remove` command in the Grid.
19
+ * You can apply this directive to any `kendo-toolbar-button` element inside a
20
+ * ToolbarComponent used in the Grid.
21
+ *
22
+ * When the user clicks the toolbar button that is associated with the directive, the
23
+ * [remove]({% slug api_grid_gridcomponent %}#toc-remove) event is triggered.
24
+ *
25
+ * @example
26
+ * ```html-no-run
27
+ * <kendo-grid>
28
+ * <kendo-toolbar>
29
+ * <kendo-toolbar-button text="Remove row" kendoGridRemoveTool></kendo-toolbar-button>
30
+ * </kendo-toolbar>
31
+ * </kendo-grid>
32
+ * ```
33
+ */
34
+ export class RemoveCommandToolbarDirective extends ToolbarEditingToolBase {
35
+ editService;
36
+ selection;
37
+ constructor(editService, host, selection, ctx, zone, cdr) {
38
+ super(host, ToolbarToolName.remove, ctx, zone, cdr, editService, selection);
39
+ this.editService = editService;
40
+ this.selection = selection;
41
+ }
42
+ /**
43
+ * @hidden
44
+ */
45
+ onClick(e) {
46
+ e.preventDefault();
47
+ if (this.isSelectionPresent) {
48
+ this.editService.remove(this.lastSelectionIndex);
49
+ }
50
+ }
51
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RemoveCommandToolbarDirective, deps: [{ token: i1.EditService }, { token: i2.ToolBarButtonComponent }, { token: i3.SelectionService }, { token: i4.ContextService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
52
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: RemoveCommandToolbarDirective, isStandalone: true, selector: "[kendoGridRemoveTool]", usesInheritance: true, ngImport: i0 });
53
+ }
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RemoveCommandToolbarDirective, decorators: [{
55
+ type: Directive,
56
+ args: [{
57
+ selector: '[kendoGridRemoveTool]',
58
+ standalone: true
59
+ }]
60
+ }], ctorParameters: function () { return [{ type: i1.EditService }, { type: i2.ToolBarButtonComponent }, { type: i3.SelectionService }, { type: i4.ContextService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; } });
@@ -52,6 +52,7 @@ export class RemoveCommandDirective extends Button {
52
52
  */
53
53
  onClick(e) {
54
54
  e.preventDefault();
55
+ e.stopImmediatePropagation();
55
56
  this.editService.remove(this.rowIndex);
56
57
  }
57
58
  constructor(editService, cellContext, element, renderer, ctx, ngZone) {
@@ -0,0 +1,64 @@
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, Directive, 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 { ToolbarToolName } from '../navigation/toolbar-tool-name';
12
+ import * as i0 from "@angular/core";
13
+ import * as i1 from "./edit.service";
14
+ import * as i2 from "@progress/kendo-angular-toolbar";
15
+ import * as i3 from "../selection/selection.service";
16
+ import * as i4 from "../common/provider.service";
17
+ /**
18
+ * Represents the `save` command in the Grid.
19
+ * You can apply this directive to any `kendo-toolbar-button` element inside a
20
+ * ToolbarComponent used in the Grid.
21
+ *
22
+ * When the user clicks the toolbar button that is associated with the directive, the
23
+ * [save]({% slug api_grid_gridcomponent %}#toc-save) event is triggered.
24
+ *
25
+ * @example
26
+ * ```html-no-run
27
+ * <kendo-grid>
28
+ * <kendo-toolbar>
29
+ * <kendo-toolbar-button text="Save" kendoGridSaveTool></kendo-toolbar-button>
30
+ * </kendo-toolbar>
31
+ * </kendo-grid>
32
+ * ```
33
+ */
34
+ export class SaveCommandToolbarDirective extends ToolbarEditingToolBase {
35
+ editService;
36
+ constructor(editService, host, selection, ctx, zone, cdr) {
37
+ super(host, ToolbarToolName.save, ctx, zone, cdr, editService, selection);
38
+ this.editService = editService;
39
+ }
40
+ /**
41
+ * @hidden
42
+ */
43
+ onClick(e) {
44
+ e.preventDefault();
45
+ if (this.editService.hasNewItem) {
46
+ this.editService.save();
47
+ }
48
+ else if (this.isSelectionPresent && this.editService.isEdited(this.lastSelectionIndex)) {
49
+ this.editService.save(this.lastSelectionIndex);
50
+ }
51
+ else {
52
+ this.editService.editedIndices.forEach(i => this.editService.save(i.index));
53
+ }
54
+ }
55
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SaveCommandToolbarDirective, deps: [{ token: i1.EditService }, { token: i2.ToolBarButtonComponent }, { token: i3.SelectionService }, { token: i4.ContextService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
56
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: SaveCommandToolbarDirective, isStandalone: true, selector: "[kendoGridSaveTool]", usesInheritance: true, ngImport: i0 });
57
+ }
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SaveCommandToolbarDirective, decorators: [{
59
+ type: Directive,
60
+ args: [{
61
+ selector: '[kendoGridSaveTool]',
62
+ standalone: true
63
+ }]
64
+ }], ctorParameters: function () { return [{ type: i1.EditService }, { type: i2.ToolBarButtonComponent }, { type: i3.SelectionService }, { type: i4.ContextService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; } });
@@ -0,0 +1,91 @@
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, Directive, Inject, NgZone } from '@angular/core';
6
+ import { take } from 'rxjs/operators';
7
+ import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
8
+ import { isPresent } from '@progress/kendo-angular-common';
9
+ import { SelectionService } from '../selection/selection.service';
10
+ import { EditService } from '../editing/edit.service';
11
+ import { ContextService } from '../common/provider.service';
12
+ import { ToolbarToolBase } from '../common/toolbar-tool-base.directive';
13
+ import { ToolbarToolName } from '../navigation/toolbar-tool-name';
14
+ import * as i0 from "@angular/core";
15
+ import * as i1 from "@progress/kendo-angular-toolbar";
16
+ import * as i2 from "../common/provider.service";
17
+ import * as i3 from "../editing/edit.service";
18
+ import * as i4 from "../selection/selection.service";
19
+ /**
20
+ * @hidden
21
+ */
22
+ export class ToolbarEditingToolBase extends ToolbarToolBase {
23
+ host;
24
+ commandName;
25
+ ctx;
26
+ editService;
27
+ selection;
28
+ isEdited = false;
29
+ lastToolState = null;
30
+ constructor(host, commandName, ctx, zone, cdr, editService, selection) {
31
+ super(host, commandName, ctx, zone, cdr);
32
+ this.host = host;
33
+ this.commandName = commandName;
34
+ this.ctx = ctx;
35
+ this.editService = editService;
36
+ this.selection = selection;
37
+ }
38
+ ngDoCheck() {
39
+ if (!isPresent(this.editService)) {
40
+ return;
41
+ }
42
+ this.isEdited = this.editService.isEditing();
43
+ let isToolInactive = false;
44
+ const selectionPresent = isPresent(this.lastSelectionIndex);
45
+ switch (this.commandName) {
46
+ case ToolbarToolName.edit:
47
+ isToolInactive = this.isEdited || !selectionPresent;
48
+ break;
49
+ case ToolbarToolName.save:
50
+ isToolInactive = !(this.isEdited || this.editService.hasNewItem);
51
+ break;
52
+ case ToolbarToolName.remove:
53
+ isToolInactive = this.isEdited || !selectionPresent;
54
+ break;
55
+ case ToolbarToolName.cancel:
56
+ isToolInactive = !(this.isEdited || this.editService.hasNewItem);
57
+ break;
58
+ }
59
+ if (this.lastToolState !== isToolInactive) {
60
+ this.lastToolState = isToolInactive;
61
+ if (this.ctx.grid.showInactiveTools) {
62
+ this.host.disabled = isToolInactive;
63
+ }
64
+ else {
65
+ this.host.isHidden = isToolInactive;
66
+ const toolbar = this.host.host;
67
+ toolbar.refreshService.refresh(this.host);
68
+ if (toolbar.resizable) {
69
+ this.zone.onStable.pipe(take(1)).subscribe(() => {
70
+ toolbar.onResize();
71
+ });
72
+ }
73
+ }
74
+ }
75
+ }
76
+ get lastSelectionIndex() {
77
+ return this.selection?.selected[this.selection?.selected.length - 1];
78
+ }
79
+ get isSelectionPresent() {
80
+ return isPresent(this.lastSelectionIndex) && this.lastSelectionIndex > -1;
81
+ }
82
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarEditingToolBase, deps: [{ token: i1.ToolBarButtonComponent }, { token: 'command' }, { token: i2.ContextService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i3.EditService }, { token: i4.SelectionService }], target: i0.ɵɵFactoryTarget.Directive });
83
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ToolbarEditingToolBase, usesInheritance: true, ngImport: i0 });
84
+ }
85
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarEditingToolBase, decorators: [{
86
+ type: Directive,
87
+ args: [{}]
88
+ }], ctorParameters: function () { return [{ type: i1.ToolBarButtonComponent }, { type: undefined, decorators: [{
89
+ type: Inject,
90
+ args: ['command']
91
+ }] }, { type: i2.ContextService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i3.EditService }, { type: i4.SelectionService }]; } });
@@ -2,14 +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 } from '@angular/core';
5
+ import { ChangeDetectorRef, Directive, NgZone } from '@angular/core';
6
6
  import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
- import { Subscription } from 'rxjs';
8
- import { fileExcelIcon } from '@progress/kendo-svg-icons';
9
7
  import { ExcelService } from './excel.service';
8
+ import { ContextService } from '../common/provider.service';
9
+ import { ToolbarToolBase } from '../common/toolbar-tool-base.directive';
10
+ import { ToolbarToolName } from '../navigation/toolbar-tool-name';
10
11
  import * as i0 from "@angular/core";
11
12
  import * as i1 from "./excel.service";
12
13
  import * as i2 from "@progress/kendo-angular-toolbar";
14
+ import * as i3 from "../common/provider.service";
13
15
  /**
14
16
  * Represents the `export-to-Excel` toolbar tool of the Grid.
15
17
  * You can apply this directive to any `kendo-toolbar-button` element inside a
@@ -30,22 +32,15 @@ import * as i2 from "@progress/kendo-angular-toolbar";
30
32
  * </kendo-grid>
31
33
  * ```
32
34
  */
33
- export class ExcelCommandToolbarDirective {
35
+ export class ExcelCommandToolbarDirective extends ToolbarToolBase {
34
36
  excelService;
35
- host;
36
- clickSub = new Subscription();
37
- constructor(excelService, host) {
37
+ constructor(excelService, host, ctx, zone, cdr) {
38
+ super(host, ToolbarToolName.excelExport, ctx, zone, cdr);
38
39
  this.excelService = excelService;
39
- this.host = host;
40
40
  }
41
41
  ngOnInit() {
42
- this.clickSub = this.host.click.subscribe(e => this.onClick(e));
42
+ super.ngOnInit();
43
43
  this.host.className = 'k-grid-excel';
44
- this.host.svgIcon = fileExcelIcon;
45
- this.host.icon = 'file-excel';
46
- }
47
- ngOnDestroy() {
48
- this.clickSub.unsubscribe();
49
44
  }
50
45
  /**
51
46
  * @hidden
@@ -54,8 +49,8 @@ export class ExcelCommandToolbarDirective {
54
49
  e.preventDefault();
55
50
  this.excelService.exportClick.emit();
56
51
  }
57
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExcelCommandToolbarDirective, deps: [{ token: i1.ExcelService }, { token: i2.ToolBarButtonComponent }], target: i0.ɵɵFactoryTarget.Directive });
58
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ExcelCommandToolbarDirective, isStandalone: true, selector: "[kendoGridExcelTool]", ngImport: i0 });
52
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExcelCommandToolbarDirective, deps: [{ token: i1.ExcelService }, { token: i2.ToolBarButtonComponent }, { token: i3.ContextService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
53
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ExcelCommandToolbarDirective, isStandalone: true, selector: "[kendoGridExcelTool]", usesInheritance: true, ngImport: i0 });
59
54
  }
60
55
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExcelCommandToolbarDirective, decorators: [{
61
56
  type: Directive,
@@ -63,4 +58,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
63
58
  selector: '[kendoGridExcelTool]',
64
59
  standalone: true
65
60
  }]
66
- }], ctorParameters: function () { return [{ type: i1.ExcelService }, { type: i2.ToolBarButtonComponent }]; } });
61
+ }], ctorParameters: function () { return [{ type: i1.ExcelService }, { type: i2.ToolBarButtonComponent }, { type: i3.ContextService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; } });
@@ -610,6 +610,12 @@ export class GridComponent {
610
610
  * @default false
611
611
  */
612
612
  hideHeader = false;
613
+ /**
614
+ * Specifies if the currently inactive toolbar tools will be visible. Applicable when the toolbar is configured using the <kendo-toolbar> component. By default, such tools are hidden.
615
+ *
616
+ * @default false
617
+ */
618
+ showInactiveTools = false;
613
619
  /**
614
620
  * Fires when the Grid filter is modified through the UI.
615
621
  * You have to handle the event yourself and filter the data.
@@ -2203,7 +2209,7 @@ export class GridComponent {
2203
2209
  this.dropTargetContainer?.notify();
2204
2210
  }
2205
2211
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GridComponent, deps: [{ token: i1.BrowserSupportService }, { token: i2.SelectionService }, { token: i3.CellSelectionService }, { token: i0.ElementRef }, { token: i4.GroupInfoService }, { token: i5.GroupsService }, { token: i6.ChangeNotificationService }, { token: i7.DetailsService }, { token: i8.EditService }, { token: i9.FilterService }, { token: i10.PDFService }, { token: i11.ResponsiveService }, { token: i0.Renderer2 }, { token: i12.ExcelService }, { token: i0.NgZone }, { token: i13.ScrollSyncService }, { token: i14.DomEventsService }, { token: i15.ColumnResizingService }, { token: i0.ChangeDetectorRef }, { token: i16.ColumnReorderService }, { token: i17.ColumnInfoService }, { token: i18.NavigationService }, { token: i19.SortService }, { token: i20.ScrollRequestService }, { token: i21.LocalizationService }, { token: i22.ContextService }, { token: i23.SizingOptionsService }, { token: i24.RowReorderService }], target: i0.ɵɵFactoryTarget.Component });
2206
- 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", 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: [
2212
+ 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: [
2207
2213
  BrowserSupportService,
2208
2214
  LocalizationService,
2209
2215
  ColumnInfoService,
@@ -2489,6 +2495,27 @@ export class GridComponent {
2489
2495
  i18n-bottomToolbarLabel="kendo.grid.bottomToolbarLabel|The label for the Grid bottom toolbar"
2490
2496
  bottomToolbarLabel="Bottom toolbar"
2491
2497
 
2498
+ i18n-editToolbarToolText="kendo.grid.editToolbarToolText|The text for the Grid Edit toolbar tool"
2499
+ editToolbarToolText="Edit"
2500
+
2501
+ i18n-saveToolbarToolText="kendo.grid.saveToolbarToolText|The text for the Grid Save toolbar tool"
2502
+ saveToolbarToolText="Save"
2503
+
2504
+ i18n-addToolbarToolText="kendo.grid.addToolbarToolText|The text for the Grid Add toolbar tool"
2505
+ addToolbarToolText="Add"
2506
+
2507
+ i18n-cancelToolbarToolText="kendo.grid.cancelToolbarToolText|The text for the Grid Cancel toolbar tool"
2508
+ cancelToolbarToolText="Cancel"
2509
+
2510
+ i18n-removeToolbarToolText="kendo.grid.removeToolbarToolText|The text for the Grid Remove toolbar tool"
2511
+ removeToolbarToolText="Delete"
2512
+
2513
+ i18n-excelExportToolbarToolText="kendo.grid.excelExportToolbarToolText|The text for the Grid Excel export toolbar tool"
2514
+ excelExportToolbarToolText="Excel Export"
2515
+
2516
+ i18n-pdfExportToolbarToolText="kendo.grid.pdfExportToolbarToolText|The text for the Grid PDF export toolbar tool"
2517
+ pdfExportToolbarToolText="PDF Export"
2518
+
2492
2519
  i18n-groupPanelLabel="kendo.grid.groupPanelLabel|The label for the Grid group panel toolbar"
2493
2520
  groupPanelLabel="Group panel"
2494
2521
 
@@ -3237,6 +3264,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3237
3264
  i18n-bottomToolbarLabel="kendo.grid.bottomToolbarLabel|The label for the Grid bottom toolbar"
3238
3265
  bottomToolbarLabel="Bottom toolbar"
3239
3266
 
3267
+ i18n-editToolbarToolText="kendo.grid.editToolbarToolText|The text for the Grid Edit toolbar tool"
3268
+ editToolbarToolText="Edit"
3269
+
3270
+ i18n-saveToolbarToolText="kendo.grid.saveToolbarToolText|The text for the Grid Save toolbar tool"
3271
+ saveToolbarToolText="Save"
3272
+
3273
+ i18n-addToolbarToolText="kendo.grid.addToolbarToolText|The text for the Grid Add toolbar tool"
3274
+ addToolbarToolText="Add"
3275
+
3276
+ i18n-cancelToolbarToolText="kendo.grid.cancelToolbarToolText|The text for the Grid Cancel toolbar tool"
3277
+ cancelToolbarToolText="Cancel"
3278
+
3279
+ i18n-removeToolbarToolText="kendo.grid.removeToolbarToolText|The text for the Grid Remove toolbar tool"
3280
+ removeToolbarToolText="Delete"
3281
+
3282
+ i18n-excelExportToolbarToolText="kendo.grid.excelExportToolbarToolText|The text for the Grid Excel export toolbar tool"
3283
+ excelExportToolbarToolText="Excel Export"
3284
+
3285
+ i18n-pdfExportToolbarToolText="kendo.grid.pdfExportToolbarToolText|The text for the Grid PDF export toolbar tool"
3286
+ pdfExportToolbarToolText="PDF Export"
3287
+
3240
3288
  i18n-groupPanelLabel="kendo.grid.groupPanelLabel|The label for the Grid group panel toolbar"
3241
3289
  groupPanelLabel="Group panel"
3242
3290
 
@@ -3766,6 +3814,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3766
3814
  type: Input
3767
3815
  }], hideHeader: [{
3768
3816
  type: Input
3817
+ }], showInactiveTools: [{
3818
+ type: Input
3769
3819
  }], filterChange: [{
3770
3820
  type: Output
3771
3821
  }], pageChange: [{