@progress/kendo-angular-grid 19.0.0-develop.2 → 19.0.0-develop.20

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 (129) hide show
  1. package/adaptiveness/adaptive-mode.d.ts +12 -0
  2. package/adaptiveness/adaptive-renderer.component.d.ts +84 -0
  3. package/column-menu/column-chooser.component.d.ts +4 -0
  4. package/column-menu/column-list.component.d.ts +9 -3
  5. package/column-menu/column-menu-item.component.d.ts +38 -2
  6. package/column-menu/column-menu-item.directive.d.ts +5 -2
  7. package/column-menu/column-menu.component.d.ts +4 -2
  8. package/columns/column-base.d.ts +5 -0
  9. package/columns/span-column.component.d.ts +2 -2
  10. package/common/adaptiveness.service.d.ts +50 -0
  11. package/common/single-popup.service.d.ts +3 -1
  12. package/common/toolbar-tool-base.directive.d.ts +26 -0
  13. package/directives.d.ts +12 -5
  14. package/dragdrop/drag-hint.service.d.ts +3 -2
  15. package/editing/add-command-tool.directive.d.ts +7 -6
  16. package/editing/cancel-command-tool.directive.d.ts +38 -0
  17. package/editing/edit-command-tool.directive.d.ts +38 -0
  18. package/editing/edit.service.d.ts +1 -1
  19. package/editing/remove-command-tool.directive.d.ts +39 -0
  20. package/editing/save-command-tool.directive.d.ts +38 -0
  21. package/editing/toolbar-editing-tool-base.directive.d.ts +29 -0
  22. package/editing-directives/external-editing.directive.d.ts +3 -1
  23. package/esm2022/adaptiveness/adaptive-mode.mjs +5 -0
  24. package/esm2022/adaptiveness/adaptive-renderer.component.mjs +1106 -0
  25. package/esm2022/column-menu/column-chooser.component.mjs +13 -11
  26. package/esm2022/column-menu/column-list.component.mjs +43 -8
  27. package/esm2022/column-menu/column-menu-autosize-all.component.mjs +1 -1
  28. package/esm2022/column-menu/column-menu-autosize.component.mjs +1 -1
  29. package/esm2022/column-menu/column-menu-chooser.component.mjs +1 -1
  30. package/esm2022/column-menu/column-menu-container.component.mjs +1 -1
  31. package/esm2022/column-menu/column-menu-filter.component.mjs +1 -1
  32. package/esm2022/column-menu/column-menu-item.component.mjs +106 -11
  33. package/esm2022/column-menu/column-menu-item.directive.mjs +14 -5
  34. package/esm2022/column-menu/column-menu-lock.component.mjs +1 -1
  35. package/esm2022/column-menu/column-menu-position.component.mjs +1 -1
  36. package/esm2022/column-menu/column-menu-sort.component.mjs +1 -1
  37. package/esm2022/column-menu/column-menu-stick.component.mjs +1 -1
  38. package/esm2022/column-menu/column-menu.component.mjs +68 -44
  39. package/esm2022/column-resizing/column-handle.directive.mjs +2 -2
  40. package/esm2022/columns/column-base.mjs +9 -0
  41. package/esm2022/columns/columns-container.mjs +1 -1
  42. package/esm2022/columns/span-column.component.mjs +9 -9
  43. package/esm2022/common/adaptiveness.service.mjs +72 -0
  44. package/esm2022/common/single-popup.service.mjs +9 -3
  45. package/esm2022/common/toolbar-tool-base.directive.mjs +81 -0
  46. package/esm2022/directives.mjs +18 -3
  47. package/esm2022/dragdrop/drag-hint.service.mjs +7 -4
  48. package/esm2022/editing/add-command-tool.directive.mjs +12 -15
  49. package/esm2022/editing/cancel-command-tool.directive.mjs +64 -0
  50. package/esm2022/editing/edit-command-tool.directive.mjs +59 -0
  51. package/esm2022/editing/form/form-formfield.component.mjs +1 -1
  52. package/esm2022/editing/remove-command-tool.directive.mjs +60 -0
  53. package/esm2022/editing/remove-command.directive.mjs +1 -0
  54. package/esm2022/editing/save-command-tool.directive.mjs +64 -0
  55. package/esm2022/editing/toolbar-editing-tool-base.directive.mjs +89 -0
  56. package/esm2022/editing-directives/external-editing.directive.mjs +28 -14
  57. package/esm2022/excel/excel-command-tool.directive.mjs +12 -17
  58. package/esm2022/filtering/cell/autocomplete-filter-cell.component.mjs +1 -1
  59. package/esm2022/filtering/cell/boolean-filter-cell.component.mjs +1 -1
  60. package/esm2022/filtering/cell/date-filter-cell.component.mjs +1 -1
  61. package/esm2022/filtering/cell/filter-cell-operators.component.mjs +1 -1
  62. package/esm2022/filtering/filter-input.directive.mjs +14 -2
  63. package/esm2022/filtering/menu/boolean-filter-menu.component.mjs +2 -2
  64. package/esm2022/filtering/menu/date-filter-menu-input.component.mjs +3 -1
  65. package/esm2022/filtering/menu/date-filter-menu.component.mjs +5 -1
  66. package/esm2022/filtering/menu/filter-menu-container.component.mjs +21 -10
  67. package/esm2022/filtering/menu/filter-menu-input-wrapper.component.mjs +25 -5
  68. package/esm2022/filtering/menu/filter-menu.component.mjs +44 -29
  69. package/esm2022/filtering/menu/numeric-filter-menu.component.mjs +5 -1
  70. package/esm2022/filtering/menu/string-filter-menu.component.mjs +5 -1
  71. package/esm2022/grid.component.mjs +291 -55
  72. package/esm2022/grid.module.mjs +114 -101
  73. package/esm2022/index.mjs +10 -1
  74. package/esm2022/localization/messages.mjs +104 -2
  75. package/esm2022/navigation/navigation.service.mjs +1 -1
  76. package/esm2022/navigation/toolbar-tool-name.mjs +17 -0
  77. package/esm2022/package-metadata.mjs +2 -2
  78. package/esm2022/pdf/pdf-command-tool.directive.mjs +12 -15
  79. package/esm2022/rendering/cell.component.mjs +4 -4
  80. package/esm2022/rendering/header/header.component.mjs +1 -1
  81. package/esm2022/rendering/list.component.mjs +1 -1
  82. package/esm2022/rendering/table-body.component.mjs +11 -3
  83. package/esm2022/rendering/toolbar/tools/column-chooser-tool.directive.mjs +201 -0
  84. package/esm2022/rendering/toolbar/tools/filter-command-tool.directive.mjs +49 -33
  85. package/esm2022/rendering/toolbar/tools/filter-tool-wrapper.component.mjs +28 -8
  86. package/esm2022/rendering/toolbar/tools/filter-toolbar-tool.component.mjs +26 -4
  87. package/esm2022/rendering/toolbar/tools/sort-command-tool.directive.mjs +33 -17
  88. package/esm2022/rendering/toolbar/tools/sort-toolbar-tool.component.mjs +24 -8
  89. package/esm2022/row-reordering/row-reorder.service.mjs +15 -0
  90. package/esm2022/selection/selection.service.mjs +11 -0
  91. package/esm2022/state-management/grid-state.models.mjs +26 -0
  92. package/esm2022/state-management/redo-command-tool.mjs +66 -0
  93. package/esm2022/state-management/undo-command-tool.mjs +66 -0
  94. package/esm2022/state-management/undo-redo.directive.mjs +178 -0
  95. package/esm2022/state-management/undo-redo.service.mjs +22 -0
  96. package/esm2022/state-management/undo-redo.stack.mjs +232 -0
  97. package/esm2022/utils.mjs +13 -13
  98. package/excel/excel-command-tool.directive.d.ts +5 -5
  99. package/fesm2022/progress-kendo-angular-grid.mjs +4066 -1351
  100. package/filtering/filter-input.directive.d.ts +1 -0
  101. package/filtering/menu/date-filter-menu-input.component.d.ts +1 -1
  102. package/filtering/menu/filter-menu-container.component.d.ts +14 -4
  103. package/filtering/menu/filter-menu-input-wrapper.component.d.ts +8 -3
  104. package/filtering/menu/filter-menu.component.d.ts +6 -3
  105. package/grid.component.d.ts +71 -21
  106. package/grid.module.d.ts +107 -100
  107. package/index.d.ts +9 -1
  108. package/localization/messages.d.ts +70 -2
  109. package/navigation/toolbar-tool-name.d.ts +17 -0
  110. package/package.json +21 -20
  111. package/pdf/pdf-command-tool.directive.d.ts +6 -5
  112. package/rendering/cell.component.d.ts +1 -1
  113. package/{column-menu → rendering/toolbar/tools}/column-chooser-tool.directive.d.ts +17 -6
  114. package/rendering/toolbar/tools/filter-command-tool.directive.d.ts +4 -1
  115. package/rendering/toolbar/tools/filter-tool-wrapper.component.d.ts +6 -5
  116. package/rendering/toolbar/tools/filter-toolbar-tool.component.d.ts +4 -1
  117. package/rendering/toolbar/tools/sort-command-tool.directive.d.ts +4 -1
  118. package/rendering/toolbar/tools/sort-toolbar-tool.component.d.ts +5 -1
  119. package/row-reordering/row-reorder.service.d.ts +2 -0
  120. package/schematics/ngAdd/index.js +4 -4
  121. package/selection/selection.service.d.ts +1 -0
  122. package/state-management/grid-state.models.d.ts +58 -0
  123. package/state-management/redo-command-tool.d.ts +38 -0
  124. package/state-management/undo-command-tool.d.ts +38 -0
  125. package/state-management/undo-redo.directive.d.ts +51 -0
  126. package/state-management/undo-redo.service.d.ts +19 -0
  127. package/state-management/undo-redo.stack.d.ts +104 -0
  128. package/utils.d.ts +11 -5
  129. package/esm2022/column-menu/column-chooser-tool.directive.mjs +0 -172
@@ -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 { PDFService } from './pdf.service';
7
7
  import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
8
- import { Subscription } from 'rxjs';
9
- import { filePdfIcon } from '@progress/kendo-svg-icons';
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 "./pdf.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-PDF` toolbar tool of the Grid.
15
17
  * You can apply this directive to any `kendo-toolbar-button` element inside a
@@ -30,22 +32,17 @@ import * as i2 from "@progress/kendo-angular-toolbar";
30
32
  * </kendo-grid>
31
33
  * ```
32
34
  */
33
- export class PDFCommandToolbarDirective {
35
+ export class PDFCommandToolbarDirective extends ToolbarToolBase {
34
36
  pdfService;
35
37
  host;
36
- clickSub = new Subscription();
37
- constructor(pdfService, host) {
38
+ constructor(pdfService, host, ctx, zone, cdr) {
39
+ super(host, ToolbarToolName.pdfExport, ctx, zone, cdr);
38
40
  this.pdfService = pdfService;
39
41
  this.host = host;
40
42
  }
41
43
  ngOnInit() {
42
- this.clickSub = this.host.click.subscribe(e => this.onClick(e));
44
+ super.ngOnInit();
43
45
  this.host.className = 'k-grid-pdf';
44
- this.host.svgIcon = filePdfIcon;
45
- this.host.icon = 'file-pdf';
46
- }
47
- ngOnDestroy() {
48
- this.clickSub.unsubscribe();
49
46
  }
50
47
  /**
51
48
  * @hidden
@@ -54,8 +51,8 @@ export class PDFCommandToolbarDirective {
54
51
  e.preventDefault();
55
52
  this.pdfService.exportClick.emit();
56
53
  }
57
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFCommandToolbarDirective, deps: [{ token: i1.PDFService }, { token: i2.ToolBarButtonComponent }], target: i0.ɵɵFactoryTarget.Directive });
58
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: PDFCommandToolbarDirective, isStandalone: true, selector: "[kendoGridPDFTool]", ngImport: i0 });
54
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFCommandToolbarDirective, deps: [{ token: i1.PDFService }, { token: i2.ToolBarButtonComponent }, { token: i3.ContextService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
55
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: PDFCommandToolbarDirective, isStandalone: true, selector: "[kendoGridPDFTool]", usesInheritance: true, ngImport: i0 });
59
56
  }
60
57
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PDFCommandToolbarDirective, decorators: [{
61
58
  type: Directive,
@@ -63,4 +60,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
63
60
  selector: '[kendoGridPDFTool]',
64
61
  standalone: true
65
62
  }]
66
- }], ctorParameters: function () { return [{ type: i1.PDFService }, { type: i2.ToolBarButtonComponent }]; } });
63
+ }], ctorParameters: function () { return [{ type: i1.PDFService }, { type: i2.ToolBarButtonComponent }, { type: i3.ContextService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; } });
@@ -110,7 +110,7 @@ export class CellComponent {
110
110
  get isSpanColumn() {
111
111
  return isSpanColumn(this.column) && !this.column.templateRef;
112
112
  }
113
- get childColumns() {
113
+ get children() {
114
114
  return columnsToRender([this.column]);
115
115
  }
116
116
  get isRowReorderColumn() {
@@ -183,7 +183,7 @@ export class CellComponent {
183
183
  [ngTemplateOutletContext]="templateContext">
184
184
  </ng-template>
185
185
  <ng-container *ngIf="isSpanColumn">
186
- <ng-container *ngFor="let childColumn of childColumns">
186
+ <ng-container *ngFor="let childColumn of children">
187
187
  {{ dataItem | valueOf: childColumn.field: childColumn.format}}
188
188
  </ng-container>
189
189
  </ng-container>
@@ -260,7 +260,7 @@ export class CellComponent {
260
260
  </ng-container>
261
261
  </ng-container>
262
262
  </ng-container>
263
- `, isInline: true, dependencies: [{ kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: FocusableDirective, selector: "[kendoGridFocusable],\n [kendoGridEditCommand],\n [kendoGridRemoveCommand],\n [kendoGridSaveCommand],\n [kendoGridCancelCommand],\n [kendoGridSelectionCheckbox]\n ", inputs: ["kendoGridFocusable"] }, { kind: "directive", type: SelectionCheckboxDirective, selector: "[kendoGridSelectionCheckbox]", inputs: ["kendoGridSelectionCheckbox"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode", "inputAttributes"], outputs: ["valueChange", "focus", "blur", "inputFocus", "inputBlur"], exportAs: ["kendoNumericTextBox"] }, { kind: "component", type: DatePickerComponent, selector: "kendo-datepicker", inputs: ["focusableId", "cellTemplate", "clearButton", "inputAttributes", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate", "footer", "navigationItemTemplate", "weekDaysFormat", "showOtherMonthDays", "activeView", "bottomView", "topView", "calendarType", "animateCalendarNavigation", "disabled", "readonly", "readOnlyInput", "popupSettings", "navigation", "min", "max", "incompleteDateValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "enableMouseWheel", "allowCaretMode", "autoFill", "focusedDate", "value", "format", "twoDigitYearMax", "formatPlaceholder", "placeholder", "tabindex", "tabIndex", "disabledDates", "title", "subtitle", "rangeValidation", "disabledDatesValidation", "weekNumber", "size", "rounded", "fillMode", "adaptiveMode"], outputs: ["valueChange", "focus", "blur", "open", "close", "escape"], exportAs: ["kendo-datepicker"] }, { kind: "directive", type: NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: FieldAccessorPipe, name: "valueOf" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }, { kind: "component", type: TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }] });
263
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: FocusableDirective, selector: "[kendoGridFocusable],\n [kendoGridEditCommand],\n [kendoGridRemoveCommand],\n [kendoGridSaveCommand],\n [kendoGridCancelCommand],\n [kendoGridSelectionCheckbox]\n ", inputs: ["kendoGridFocusable"] }, { kind: "directive", type: SelectionCheckboxDirective, selector: "[kendoGridSelectionCheckbox]", inputs: ["kendoGridSelectionCheckbox"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode", "inputAttributes"], outputs: ["valueChange", "focus", "blur", "inputFocus", "inputBlur"], exportAs: ["kendoNumericTextBox"] }, { kind: "component", type: DatePickerComponent, selector: "kendo-datepicker", inputs: ["focusableId", "cellTemplate", "clearButton", "inputAttributes", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate", "footer", "navigationItemTemplate", "weekDaysFormat", "showOtherMonthDays", "activeView", "bottomView", "topView", "calendarType", "animateCalendarNavigation", "disabled", "readonly", "readOnlyInput", "popupSettings", "navigation", "min", "max", "incompleteDateValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "enableMouseWheel", "allowCaretMode", "autoFill", "focusedDate", "value", "format", "twoDigitYearMax", "formatPlaceholder", "placeholder", "tabindex", "tabIndex", "disabledDates", "adaptiveTitle", "adaptiveSubtitle", "rangeValidation", "disabledDatesValidation", "weekNumber", "size", "rounded", "fillMode", "adaptiveMode"], outputs: ["valueChange", "focus", "blur", "open", "close", "escape"], exportAs: ["kendo-datepicker"] }, { kind: "directive", type: NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: FieldAccessorPipe, name: "valueOf" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }, { kind: "component", type: TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }] });
264
264
  }
265
265
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CellComponent, decorators: [{
266
266
  type: Component,
@@ -275,7 +275,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
275
275
  [ngTemplateOutletContext]="templateContext">
276
276
  </ng-template>
277
277
  <ng-container *ngIf="isSpanColumn">
278
- <ng-container *ngFor="let childColumn of childColumns">
278
+ <ng-container *ngFor="let childColumn of children">
279
279
  {{ dataItem | valueOf: childColumn.field: childColumn.format}}
280
280
  </ng-container>
281
281
  </ng-container>
@@ -433,7 +433,7 @@ export class HeaderComponent {
433
433
  const arr = this.dropTargets.toArray();
434
434
  const firstSpan = arr.find(t => t.context.column.parent === parent);
435
435
  const index = arr.indexOf(firstSpan);
436
- const adjust = e.before ? 0 : parent.childColumns.length - 1;
436
+ const adjust = e.before ? 0 : parent.children.length - 1;
437
437
  target = arr[index + adjust];
438
438
  }
439
439
  return mergeObjects(e, { target });
@@ -616,7 +616,7 @@ export class ListComponent {
616
616
  for (let idx = 0; idx < leafColumns.length; idx++) {
617
617
  const column = leafColumns[idx];
618
618
  if (column.isSpanColumn) {
619
- viewportEnd += column.childColumns.length;
619
+ viewportEnd += column.children.length;
620
620
  }
621
621
  }
622
622
  this.navigationService.setColumnViewport(viewportStart, viewportEnd);
@@ -348,7 +348,7 @@ export class TableBodyComponent {
348
348
  }
349
349
  get footerColumns() {
350
350
  const colsToRender = Array.from(this.columns).reduce((cols, col) => {
351
- const newCols = (col instanceof SpanColumnComponent) ? Array.from(col.childColumns) : [col];
351
+ const newCols = (col instanceof SpanColumnComponent) ? Array.from(col.children) : [col];
352
352
  return [...cols, ...newCols];
353
353
  }, []);
354
354
  return colsToRender;
@@ -369,6 +369,15 @@ export class TableBodyComponent {
369
369
  clickHandler(eventArg) {
370
370
  const element = this.element.nativeElement;
371
371
  const target = this.eventTarget(eventArg);
372
+ const selectionEnabled = this.selectable && this.selectable.enabled !== false;
373
+ if (eventArg.keyCode === Keys.Space) {
374
+ if (!selectionEnabled) {
375
+ return;
376
+ }
377
+ if (!this.editService.isEditing()) {
378
+ eventArg.preventDefault();
379
+ }
380
+ }
372
381
  let cell, row, body, gridElement;
373
382
  let currentTarget = target;
374
383
  do {
@@ -386,7 +395,6 @@ export class TableBodyComponent {
386
395
  if (!focusable && !matchesNodeName('label')(target) && !hasClasses(target, IGNORE_TARGET_CLASSSES) &&
387
396
  !closestInScope(target, matchesClasses(IGNORE_CONTAINER_CLASSES), cell)) {
388
397
  const args = this.cellClickArgs(cell, row, eventArg);
389
- const selectionEnabled = this.selectable && this.selectable.enabled !== false;
390
398
  if (selectionEnabled && !this.isRowSelectable({ index: args.rowIndex, dataItem: args.dataItem })) {
391
399
  return;
392
400
  }
@@ -417,7 +425,7 @@ export class TableBodyComponent {
417
425
  }));
418
426
  }
419
427
  cellKeydownHandler(args) {
420
- if (args.keyCode === Keys.Enter) {
428
+ if (args.keyCode === Keys.Enter || args.keyCode === Keys.Space) {
421
429
  this.clickHandler(args);
422
430
  }
423
431
  }
@@ -0,0 +1,201 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Directive, NgZone, Input, Renderer2, ChangeDetectorRef } from '@angular/core';
6
+ import { PopupService } from '@progress/kendo-angular-popup';
7
+ import { RefreshService, ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
8
+ import { ColumnListComponent } from '../../../column-menu/column-list.component';
9
+ import { closest, isPresent } from '@progress/kendo-angular-common';
10
+ import { Subscription } from 'rxjs';
11
+ import { columnsIcon } from '@progress/kendo-svg-icons';
12
+ import { ContextService } from '../../../common/provider.service';
13
+ import { filter, take } from 'rxjs/operators';
14
+ import { AdaptiveGridService } from '../../../common/adaptiveness.service';
15
+ import { ColumnInfoService } from '../../../common/column-info.service';
16
+ import { ToolbarToolBase } from '../../../common/toolbar-tool-base.directive';
17
+ import { ToolbarToolName } from '../../../navigation/toolbar-tool-name';
18
+ import * as i0 from "@angular/core";
19
+ import * as i1 from "@progress/kendo-angular-popup";
20
+ import * as i2 from "@progress/kendo-angular-toolbar";
21
+ import * as i3 from "../../../common/provider.service";
22
+ import * as i4 from "../../../common/adaptiveness.service";
23
+ import * as i5 from "../../../common/column-info.service";
24
+ let incrementingId = 0;
25
+ /**
26
+ * Represents the `column-chooser` toolbar tool of the Grid.
27
+ * You can apply this directive to any `kendo-toolbar-button` element inside a
28
+ * ToolbarComponent used in the Grid.
29
+ *
30
+ * @example
31
+ * ```html-no-run
32
+ * <kendo-grid>
33
+ * <kendo-toolbar>
34
+ * <kendo-toolbar-button kendoGridColumnChooserTool></kendo-toolbar-button>
35
+ * </kendo-toolbar>
36
+ * </kendo-grid>
37
+ * ```
38
+ */
39
+ export class ColumnChooserToolbarDirective extends ToolbarToolBase {
40
+ renderer;
41
+ popupSerivce;
42
+ host;
43
+ ctx;
44
+ zone;
45
+ refresh;
46
+ adaptiveGridService;
47
+ columnInfoService;
48
+ /**
49
+ * Specifies if the changes in the visibility of the column will be immediately applied.
50
+ *
51
+ * @default false
52
+ */
53
+ autoSync = false;
54
+ /**
55
+ * Specifies if all columns can be hidden.
56
+ *
57
+ * @default true
58
+ */
59
+ allowHideAll = true;
60
+ /**
61
+ * @hidden
62
+ */
63
+ get columns() {
64
+ return this.columnInfoService.leafNamedColumns;
65
+ }
66
+ popupRef;
67
+ subs = new Subscription();
68
+ nextId = incrementingId++;
69
+ constructor(renderer, popupSerivce, host, ctx, zone, refresh, adaptiveGridService, columnInfoService, cdr) {
70
+ super(host, ToolbarToolName.columns, ctx, zone, cdr);
71
+ this.renderer = renderer;
72
+ this.popupSerivce = popupSerivce;
73
+ this.host = host;
74
+ this.ctx = ctx;
75
+ this.zone = zone;
76
+ this.refresh = refresh;
77
+ this.adaptiveGridService = adaptiveGridService;
78
+ this.columnInfoService = columnInfoService;
79
+ }
80
+ ngOnInit() {
81
+ this.subs.add(this.host.click.subscribe(e => this.onClick(e)));
82
+ const hasToolbarIcon = isPresent(this.host.toolbarOptions.icon) && this.host.toolbarOptions.icon !== '';
83
+ const hasOverflowIcon = isPresent(this.host.overflowOptions.icon) && this.host.overflowOptions.icon !== '';
84
+ const hasIcon = hasToolbarIcon && hasOverflowIcon;
85
+ const hasSvgIcon = isPresent(this.host.toolbarOptions.svgIcon) && isPresent(this.host.overflowOptions.svgIcon);
86
+ if (!hasIcon) {
87
+ this.host.icon = 'columns';
88
+ }
89
+ if (!hasSvgIcon) {
90
+ this.host.svgIcon = columnsIcon;
91
+ }
92
+ }
93
+ ngAfterViewInit() {
94
+ super.ngAfterViewInit();
95
+ this.zone.onStable.pipe(take(1)).subscribe(() => {
96
+ this.buttonElement?.setAttribute('aria-haspopup', 'dialog');
97
+ this.buttonElement?.setAttribute('aria-expanded', 'false');
98
+ this.buttonElement?.setAttribute('title', this.ctx.localization.get('columns'));
99
+ });
100
+ this.subs.add(this.refresh.onRefresh.pipe(filter((tool) => tool === this.host)).subscribe((tool) => {
101
+ if (tool.overflows && this.popupRef) {
102
+ this.popupRef.close();
103
+ }
104
+ }));
105
+ }
106
+ ngOnDestroy() {
107
+ super.ngOnDestroy();
108
+ this.subs.unsubscribe();
109
+ }
110
+ /**
111
+ * @hidden
112
+ */
113
+ onClick(e) {
114
+ e.preventDefault();
115
+ if (this.ctx.grid.adaptiveMode === 'auto' && this.adaptiveGridService.windowSize !== 'large') {
116
+ if (!this.ctx.grid.isActionSheetExpanded) {
117
+ this.adaptiveGridService.viewType = 'columnChooserToolbarTool';
118
+ this.adaptiveGridService.columns = this.columns;
119
+ this.ctx.grid.adaptiveRenderer.actionSheet.toggle(true);
120
+ }
121
+ }
122
+ else {
123
+ this.togglePopup();
124
+ }
125
+ }
126
+ togglePopup() {
127
+ if (!this.popupRef) {
128
+ const direction = this.ctx.localization.rtl ? 'right' : 'left';
129
+ this.popupRef = this.popupSerivce.open({
130
+ anchor: this.buttonElement,
131
+ content: ColumnListComponent,
132
+ positionMode: 'absolute',
133
+ anchorAlign: { vertical: 'bottom', horizontal: direction },
134
+ popupAlign: { vertical: 'top', horizontal: direction }
135
+ });
136
+ this.adaptiveGridService.popupRef = this.popupRef;
137
+ const popupElement = this.popupRef.popupElement;
138
+ const popupId = `k-column-chooser-tool-${this.nextId}-popup`;
139
+ const popupAriaElement = popupElement.querySelector('.k-popup');
140
+ this.zone.runOutsideAngular(() => {
141
+ this.renderer.listen(popupAriaElement, 'keydown', (e) => {
142
+ if (e.key === 'Escape') {
143
+ this.closePopup(true);
144
+ }
145
+ });
146
+ });
147
+ this.renderer.setAttribute(popupElement, 'dir', this.ctx.localization.rtl ? 'rtl' : 'ltr');
148
+ this.renderer.setAttribute(popupAriaElement, 'id', popupId);
149
+ this.renderer.setAttribute(popupAriaElement, 'role', 'dialog');
150
+ this.buttonElement?.setAttribute('aria-expanded', 'true');
151
+ this.buttonElement?.setAttribute('aria-controls', popupId);
152
+ const columnList = this.popupRef.content.instance;
153
+ columnList.isLast = true;
154
+ columnList.autoSync = this.autoSync;
155
+ columnList.allowHideAll = this.allowHideAll;
156
+ columnList.applyText = this.ctx.localization.get('columnsApply');
157
+ columnList.resetText = this.ctx.localization.get('columnsReset');
158
+ columnList.columns = this.ctx.grid.columns;
159
+ columnList.ariaLabel = this.ctx.localization.get('columns');
160
+ this.subs.add(this.popupRef.popup.instance.anchorViewportLeave.subscribe(() => {
161
+ this.closePopup(true);
162
+ }));
163
+ this.subs.add(columnList.apply.subscribe(() => {
164
+ this.closePopup();
165
+ }));
166
+ this.zone.runOutsideAngular(() => this.renderer.listen('document', 'click', ({ target }) => {
167
+ if (this.popupRef && !closest(target, node => node === this.popupRef.popupElement || node === this.buttonElement)) {
168
+ this.zone.run(() => {
169
+ this.closePopup();
170
+ });
171
+ }
172
+ }));
173
+ }
174
+ else {
175
+ this.closePopup();
176
+ }
177
+ }
178
+ closePopup(focusAnchor = false) {
179
+ this.popupRef.close();
180
+ this.popupRef = null;
181
+ this.buttonElement?.setAttribute('aria-expanded', 'false');
182
+ this.buttonElement?.removeAttribute('aria-controls');
183
+ focusAnchor && this.buttonElement?.focus();
184
+ }
185
+ get buttonElement() {
186
+ return this.host.getButton();
187
+ }
188
+ 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: i4.AdaptiveGridService }, { token: i5.ColumnInfoService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
189
+ 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 });
190
+ }
191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnChooserToolbarDirective, decorators: [{
192
+ type: Directive,
193
+ args: [{
194
+ selector: '[kendoGridColumnChooserTool]',
195
+ standalone: true
196
+ }]
197
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i1.PopupService }, { type: i2.ToolBarButtonComponent }, { type: i3.ContextService }, { type: i0.NgZone }, { type: i2.RefreshService }, { type: i4.AdaptiveGridService }, { type: i5.ColumnInfoService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { autoSync: [{
198
+ type: Input
199
+ }], allowHideAll: [{
200
+ type: Input
201
+ }] } });
@@ -13,12 +13,14 @@ import { ColumnInfoService } from '../../../common/column-info.service';
13
13
  import { take } from 'rxjs/operators';
14
14
  import { FilterService } from '../../../filtering/filter.service';
15
15
  import { FilterToolWrapperComponent } from './filter-tool-wrapper.component';
16
+ import { AdaptiveGridService } from '../../../common/adaptiveness.service';
16
17
  import * as i0 from "@angular/core";
17
18
  import * as i1 from "@progress/kendo-angular-toolbar";
18
19
  import * as i2 from "@progress/kendo-angular-popup";
19
20
  import * as i3 from "../../../common/provider.service";
20
21
  import * as i4 from "../../../filtering/filter.service";
21
22
  import * as i5 from "../../../common/column-info.service";
23
+ import * as i6 from "../../../common/adaptiveness.service";
22
24
  let incrementingId = 0;
23
25
  /**
24
26
  * Represents the toolbar tool for filtering columns of the Grid.
@@ -45,12 +47,13 @@ export class FilterCommandToolbarDirective {
45
47
  columnInfoService;
46
48
  ngZone;
47
49
  renderer;
50
+ adaptiveGridService;
48
51
  popupRef;
49
52
  nextId = incrementingId++;
50
53
  toolSubs = new Subscription();
51
54
  popupSubs;
52
55
  removeClickListener;
53
- constructor(host, popupService, ctx, filterService, columnInfoService, ngZone, renderer) {
56
+ constructor(host, popupService, ctx, filterService, columnInfoService, ngZone, renderer, adaptiveGridService) {
54
57
  this.host = host;
55
58
  this.popupService = popupService;
56
59
  this.ctx = ctx;
@@ -58,6 +61,7 @@ export class FilterCommandToolbarDirective {
58
61
  this.columnInfoService = columnInfoService;
59
62
  this.ngZone = ngZone;
60
63
  this.renderer = renderer;
64
+ this.adaptiveGridService = adaptiveGridService;
61
65
  }
62
66
  ngOnInit() {
63
67
  this.toolSubs = this.host.click.subscribe(e => this.onClick(e));
@@ -69,7 +73,7 @@ export class FilterCommandToolbarDirective {
69
73
  const hasIcon = hasToolbarIcon && hasOverflowIcon;
70
74
  const hasSvgIcon = isPresent(this.host.toolbarOptions.svgIcon) && isPresent(this.host.overflowOptions.svgIcon);
71
75
  if (!hasIcon) {
72
- this.host.icon = 'k-i-filter';
76
+ this.host.icon = 'filter';
73
77
  }
74
78
  if (!hasSvgIcon) {
75
79
  this.host.svgIcon = filterIcon;
@@ -81,9 +85,9 @@ export class FilterCommandToolbarDirective {
81
85
  this.host.text = this.ctx.localization.get(`filterToolbarToolText`);
82
86
  });
83
87
  }
84
- this.host.toolbarButtonElement.nativeElement.setAttribute('aria-haspopup', 'dialog');
85
- this.host.toolbarButtonElement.nativeElement.setAttribute('aria-expanded', 'false');
86
- this.host.toolbarButtonElement.nativeElement.setAttribute('title', this.ctx.localization.get('filter'));
88
+ this.buttonElement?.setAttribute('aria-haspopup', 'dialog');
89
+ this.buttonElement?.setAttribute('aria-expanded', 'false');
90
+ this.buttonElement?.setAttribute('title', this.ctx.localization.get('filter'));
87
91
  }
88
92
  ngOnDestroy() {
89
93
  if (this.toolSubs) {
@@ -111,31 +115,40 @@ export class FilterCommandToolbarDirective {
111
115
  }
112
116
  openPopup() {
113
117
  const direction = this.ctx.localization.rtl ? 'right' : 'left';
114
- this.popupRef = this.popupService.open({
115
- anchor: this.host.toolbarButtonElement.nativeElement,
116
- content: FilterToolWrapperComponent,
117
- popupClass: 'k-grid-columnmenu-popup',
118
- positionMode: 'absolute',
119
- anchorAlign: { vertical: 'bottom', horizontal: direction },
120
- popupAlign: { vertical: 'top', horizontal: direction }
121
- });
122
- this.setPopupAttributes();
123
- this.ngZone.runOutsideAngular(() => {
124
- if (!isDocumentAvailable()) {
125
- return;
118
+ if (this.ctx.grid.adaptiveMode === 'auto' && this.adaptiveGridService.windowSize !== 'large') {
119
+ if (!this.ctx.grid.isActionSheetExpanded) {
120
+ this.adaptiveGridService.viewType = 'filterToolbarTool';
121
+ this.ctx.grid.adaptiveRenderer.actionSheet.toggle(true);
126
122
  }
127
- this.removeClickListener = this.renderer.listen('document', 'click', (e) => {
128
- if (this.popupRef && !closest(e.target, node => node === this.popupRef.popupElement || node === this.host.toolbarButtonElement.nativeElement)) {
129
- this.closePopup();
123
+ }
124
+ else {
125
+ this.popupRef = this.popupService.open({
126
+ anchor: this.buttonElement,
127
+ content: FilterToolWrapperComponent,
128
+ popupClass: 'k-grid-columnmenu-popup',
129
+ positionMode: 'absolute',
130
+ anchorAlign: { vertical: 'bottom', horizontal: direction },
131
+ popupAlign: { vertical: 'top', horizontal: direction }
132
+ });
133
+ this.adaptiveGridService.popupRef = this.popupRef;
134
+ this.setPopupAttributes();
135
+ this.ngZone.runOutsideAngular(() => {
136
+ if (!isDocumentAvailable()) {
137
+ return;
130
138
  }
139
+ this.removeClickListener = this.renderer.listen('document', 'click', (e) => {
140
+ if (this.popupRef && !closest(e.target, node => node === this.popupRef.popupElement || node === this.buttonElement)) {
141
+ this.closePopup();
142
+ }
143
+ });
131
144
  });
132
- });
133
- this.popupSubs = this.popupRef.popup.instance.anchorViewportLeave.subscribe(() => {
134
- this.popupSubs?.unsubscribe();
135
- this.popupSubs = null;
136
- this.closePopup();
137
- });
138
- this.initPopupProperties();
145
+ this.popupSubs = this.popupRef.popup.instance.anchorViewportLeave.subscribe(() => {
146
+ this.popupSubs?.unsubscribe();
147
+ this.popupSubs = null;
148
+ this.closePopup();
149
+ });
150
+ this.initPopupProperties();
151
+ }
139
152
  }
140
153
  setPopupAttributes() {
141
154
  const popupElement = this.popupRef.popupElement;
@@ -144,8 +157,8 @@ export class FilterCommandToolbarDirective {
144
157
  this.renderer.setAttribute(popupElement, 'dir', this.ctx.localization.rtl ? 'rtl' : 'ltr');
145
158
  this.renderer.setAttribute(popupAriaElement, 'id', popupId);
146
159
  this.renderer.setAttribute(popupAriaElement, 'role', 'dialog');
147
- this.host.toolbarButtonElement.nativeElement.setAttribute('aria-expanded', 'true');
148
- this.host.toolbarButtonElement.nativeElement.setAttribute('aria-controls', popupId);
160
+ this.buttonElement?.setAttribute('aria-expanded', 'true');
161
+ this.buttonElement?.setAttribute('aria-controls', popupId);
149
162
  }
150
163
  initPopupProperties() {
151
164
  this.popupRef.content.instance.columnInfoService = this.columnInfoService;
@@ -157,8 +170,8 @@ export class FilterCommandToolbarDirective {
157
170
  }));
158
171
  }
159
172
  closePopup() {
160
- this.host.toolbarButtonElement.nativeElement.setAttribute('aria-expanded', 'false');
161
- this.host.toolbarButtonElement.nativeElement.removeAttribute('aria-controls');
173
+ this.buttonElement?.setAttribute('aria-expanded', 'false');
174
+ this.buttonElement?.removeAttribute('aria-controls');
162
175
  if (this.popupRef) {
163
176
  this.popupRef.close();
164
177
  this.popupRef = null;
@@ -172,7 +185,10 @@ export class FilterCommandToolbarDirective {
172
185
  this.removeClickListener = null;
173
186
  }
174
187
  }
175
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterCommandToolbarDirective, deps: [{ token: i1.ToolBarButtonComponent }, { token: i2.PopupService }, { token: i3.ContextService }, { token: i4.FilterService }, { token: i5.ColumnInfoService }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
188
+ get buttonElement() {
189
+ return this.host.getButton();
190
+ }
191
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterCommandToolbarDirective, deps: [{ token: i1.ToolBarButtonComponent }, { token: i2.PopupService }, { token: i3.ContextService }, { token: i4.FilterService }, { token: i5.ColumnInfoService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i6.AdaptiveGridService }], target: i0.ɵɵFactoryTarget.Directive });
176
192
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: FilterCommandToolbarDirective, isStandalone: true, selector: "[kendoGridFilterTool]", ngImport: i0 });
177
193
  }
178
194
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterCommandToolbarDirective, decorators: [{
@@ -181,4 +197,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
181
197
  selector: '[kendoGridFilterTool]',
182
198
  standalone: true
183
199
  }]
184
- }], ctorParameters: function () { return [{ type: i1.ToolBarButtonComponent }, { type: i2.PopupService }, { type: i3.ContextService }, { type: i4.FilterService }, { type: i5.ColumnInfoService }, { type: i0.NgZone }, { type: i0.Renderer2 }]; } });
200
+ }], ctorParameters: function () { return [{ type: i1.ToolBarButtonComponent }, { type: i2.PopupService }, { type: i3.ContextService }, { type: i4.FilterService }, { type: i5.ColumnInfoService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i6.AdaptiveGridService }]; } });
@@ -12,6 +12,7 @@ import { SinglePopupService } from '../../../common/single-popup.service';
12
12
  import { ScrollSyncService } from '../../../scrolling/scroll-sync.service';
13
13
  import { ColumnInfoService } from '../../../common/column-info.service';
14
14
  import { cloneFilters } from '../../../common/filter-descriptor-differ';
15
+ import { AdaptiveGridService } from '../../../common/adaptiveness.service';
15
16
  import * as i0 from "@angular/core";
16
17
  import * as i1 from "@progress/kendo-angular-buttons";
17
18
  /**
@@ -26,14 +27,15 @@ export class FilterToolWrapperComponent {
26
27
  this.close.emit();
27
28
  this.hostButton?.focus(event);
28
29
  }
30
+ onClick(event) {
31
+ if (this.hostButton.location !== 'toolbar') {
32
+ event.stopImmediatePropagation();
33
+ }
34
+ }
29
35
  close = new EventEmitter();
30
36
  hostButton;
31
37
  clearIcon = filterClearIcon;
32
38
  columnInfoService;
33
- popupRef;
34
- filter;
35
- subscriptions;
36
- _ctx;
37
39
  set ctx(ctx) {
38
40
  this._ctx = ctx;
39
41
  this.createPopup();
@@ -41,7 +43,6 @@ export class FilterToolWrapperComponent {
41
43
  get ctx() {
42
44
  return this._ctx;
43
45
  }
44
- _filterService;
45
46
  set filterService(filterService) {
46
47
  this._filterService = filterService;
47
48
  this.subscriptions = this._filterService.changes.subscribe(filter => {
@@ -53,6 +54,11 @@ export class FilterToolWrapperComponent {
53
54
  return this._filterService;
54
55
  }
55
56
  columnMenuService;
57
+ popupRef;
58
+ filter;
59
+ subscriptions;
60
+ _ctx;
61
+ _filterService;
56
62
  constructor(injector) {
57
63
  this.injector = injector;
58
64
  }
@@ -81,6 +87,7 @@ export class FilterToolWrapperComponent {
81
87
  { provide: FilterService, useValue: this._filterService },
82
88
  { provide: ContextService, useValue: this._ctx },
83
89
  { provide: ColumnInfoService, useValue: this.columnInfoService },
90
+ AdaptiveGridService,
84
91
  SinglePopupService,
85
92
  ScrollSyncService
86
93
  ],
@@ -93,10 +100,15 @@ export class FilterToolWrapperComponent {
93
100
  }
94
101
  }
95
102
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilterToolWrapperComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
96
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FilterToolWrapperComponent, isStandalone: true, selector: "kendo-filter-tool-wrapper", outputs: { close: "close" }, host: { listeners: { "keydown.escape": "onEscKeyDown($event)" }, properties: { "class.k-column-menu": "this.wrapperClasses", "class.k-column-menu-md": "this.wrapperClasses" } }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
103
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FilterToolWrapperComponent, isStandalone: true, selector: "kendo-filter-tool-wrapper", outputs: { close: "close" }, host: { listeners: { "keydown.escape": "onEscKeyDown($event)", "click": "onClick($event)" }, properties: { "class.k-column-menu": "this.wrapperClasses", "class.k-column-menu-md": "this.wrapperClasses" } }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
97
104
  <ng-container #container></ng-container>
98
105
  <div class="k-actions k-actions-stretched k-actions-horizontal k-column-menu-footer">
99
- <button kendoButton [svgIcon]="clearIcon" (click)="clear()">Clear all filters</button>
106
+ <button kendoButton
107
+ [svgIcon]="clearIcon"
108
+ icon="filter-clear"
109
+ (click)="clear()">
110
+ {{ctx?.localization.get('filterClearAllButton')}}
111
+ </button>
100
112
  </div>
101
113
  `, isInline: true, dependencies: [{ kind: "component", type: i1.ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
102
114
  }
@@ -107,7 +119,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
107
119
  template: `
108
120
  <ng-container #container></ng-container>
109
121
  <div class="k-actions k-actions-stretched k-actions-horizontal k-column-menu-footer">
110
- <button kendoButton [svgIcon]="clearIcon" (click)="clear()">Clear all filters</button>
122
+ <button kendoButton
123
+ [svgIcon]="clearIcon"
124
+ icon="filter-clear"
125
+ (click)="clear()">
126
+ {{ctx?.localization.get('filterClearAllButton')}}
127
+ </button>
111
128
  </div>
112
129
  `,
113
130
  standalone: true,
@@ -125,6 +142,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
125
142
  }], onEscKeyDown: [{
126
143
  type: HostListener,
127
144
  args: ['keydown.escape', ['$event']]
145
+ }], onClick: [{
146
+ type: HostListener,
147
+ args: ['click', ['$event']]
128
148
  }], close: [{
129
149
  type: Output
130
150
  }] } });