@progress/kendo-angular-grid 19.0.0-develop.3 → 19.0.0-develop.31

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 (139) hide show
  1. package/adaptiveness/adaptive-mode.d.ts +12 -0
  2. package/adaptiveness/adaptive-renderer.component.d.ts +84 -0
  3. package/codemods/template-transformer/index.js +94 -0
  4. package/codemods/utils.js +553 -0
  5. package/codemods/v19/grid-kendogridgroupbinding.js +51 -0
  6. package/column-menu/column-chooser.component.d.ts +4 -0
  7. package/column-menu/column-list.component.d.ts +10 -3
  8. package/column-menu/column-menu-item.component.d.ts +48 -3
  9. package/column-menu/column-menu-item.directive.d.ts +5 -2
  10. package/column-menu/column-menu.component.d.ts +4 -2
  11. package/columns/column-base.d.ts +5 -0
  12. package/columns/span-column.component.d.ts +2 -2
  13. package/common/adaptiveness.service.d.ts +50 -0
  14. package/common/single-popup.service.d.ts +3 -1
  15. package/common/toolbar-tool-base.directive.d.ts +26 -0
  16. package/directives.d.ts +12 -5
  17. package/dragdrop/drag-hint.service.d.ts +3 -2
  18. package/editing/add-command-tool.directive.d.ts +7 -6
  19. package/editing/cancel-command-tool.directive.d.ts +38 -0
  20. package/editing/edit-command-tool.directive.d.ts +38 -0
  21. package/editing/edit.service.d.ts +1 -1
  22. package/editing/remove-command-tool.directive.d.ts +39 -0
  23. package/editing/save-command-tool.directive.d.ts +38 -0
  24. package/editing/toolbar-editing-tool-base.directive.d.ts +29 -0
  25. package/editing-directives/editing-directive-base.d.ts +4 -1
  26. package/editing-directives/external-editing.directive.d.ts +3 -1
  27. package/esm2022/adaptiveness/adaptive-mode.mjs +5 -0
  28. package/esm2022/adaptiveness/adaptive-renderer.component.mjs +1108 -0
  29. package/esm2022/column-menu/column-chooser.component.mjs +13 -11
  30. package/esm2022/column-menu/column-list.component.mjs +51 -8
  31. package/esm2022/column-menu/column-menu-autosize-all.component.mjs +1 -1
  32. package/esm2022/column-menu/column-menu-autosize.component.mjs +1 -1
  33. package/esm2022/column-menu/column-menu-chooser.component.mjs +1 -1
  34. package/esm2022/column-menu/column-menu-container.component.mjs +1 -1
  35. package/esm2022/column-menu/column-menu-filter.component.mjs +1 -1
  36. package/esm2022/column-menu/column-menu-item.component.mjs +123 -12
  37. package/esm2022/column-menu/column-menu-item.directive.mjs +14 -5
  38. package/esm2022/column-menu/column-menu-lock.component.mjs +1 -1
  39. package/esm2022/column-menu/column-menu-position.component.mjs +1 -1
  40. package/esm2022/column-menu/column-menu-sort.component.mjs +1 -1
  41. package/esm2022/column-menu/column-menu-stick.component.mjs +1 -1
  42. package/esm2022/column-menu/column-menu.component.mjs +68 -44
  43. package/esm2022/column-resizing/column-handle.directive.mjs +2 -2
  44. package/esm2022/columns/column-base.mjs +9 -0
  45. package/esm2022/columns/columns-container.mjs +1 -1
  46. package/esm2022/columns/span-column.component.mjs +9 -9
  47. package/esm2022/common/adaptiveness.service.mjs +72 -0
  48. package/esm2022/common/single-popup.service.mjs +9 -3
  49. package/esm2022/common/toolbar-tool-base.directive.mjs +81 -0
  50. package/esm2022/directives.mjs +18 -3
  51. package/esm2022/dragdrop/drag-hint.service.mjs +7 -4
  52. package/esm2022/editing/add-command-tool.directive.mjs +12 -15
  53. package/esm2022/editing/cancel-command-tool.directive.mjs +64 -0
  54. package/esm2022/editing/edit-command-tool.directive.mjs +59 -0
  55. package/esm2022/editing/form/form-formfield.component.mjs +1 -1
  56. package/esm2022/editing/remove-command-tool.directive.mjs +60 -0
  57. package/esm2022/editing/remove-command.directive.mjs +1 -0
  58. package/esm2022/editing/save-command-tool.directive.mjs +64 -0
  59. package/esm2022/editing/toolbar-editing-tool-base.directive.mjs +94 -0
  60. package/esm2022/editing-directives/editing-directive-base.mjs +5 -2
  61. package/esm2022/editing-directives/external-editing.directive.mjs +28 -14
  62. package/esm2022/excel/excel-command-tool.directive.mjs +12 -17
  63. package/esm2022/filtering/cell/autocomplete-filter-cell.component.mjs +1 -1
  64. package/esm2022/filtering/cell/boolean-filter-cell.component.mjs +1 -1
  65. package/esm2022/filtering/cell/date-filter-cell.component.mjs +1 -1
  66. package/esm2022/filtering/cell/filter-cell-operators.component.mjs +1 -1
  67. package/esm2022/filtering/filter-input.directive.mjs +14 -2
  68. package/esm2022/filtering/menu/boolean-filter-menu.component.mjs +4 -2
  69. package/esm2022/filtering/menu/date-filter-menu-input.component.mjs +5 -1
  70. package/esm2022/filtering/menu/date-filter-menu.component.mjs +7 -1
  71. package/esm2022/filtering/menu/filter-menu-container.component.mjs +21 -10
  72. package/esm2022/filtering/menu/filter-menu-input-wrapper.component.mjs +27 -5
  73. package/esm2022/filtering/menu/filter-menu.component.mjs +44 -29
  74. package/esm2022/filtering/menu/numeric-filter-menu-input.component.mjs +2 -0
  75. package/esm2022/filtering/menu/numeric-filter-menu.component.mjs +7 -1
  76. package/esm2022/filtering/menu/string-filter-menu-input.component.mjs +2 -0
  77. package/esm2022/filtering/menu/string-filter-menu.component.mjs +11 -2
  78. package/esm2022/grid.component.mjs +358 -82
  79. package/esm2022/grid.module.mjs +114 -101
  80. package/esm2022/index.mjs +10 -1
  81. package/esm2022/localization/messages.mjs +104 -2
  82. package/esm2022/navigation/navigation.service.mjs +1 -1
  83. package/esm2022/navigation/toolbar-tool-name.mjs +17 -0
  84. package/esm2022/package-metadata.mjs +2 -2
  85. package/esm2022/pdf/pdf-command-tool.directive.mjs +12 -15
  86. package/esm2022/rendering/cell.component.mjs +4 -4
  87. package/esm2022/rendering/header/header.component.mjs +1 -1
  88. package/esm2022/rendering/list.component.mjs +1 -1
  89. package/esm2022/rendering/table-body.component.mjs +11 -3
  90. package/esm2022/rendering/toolbar/tools/column-chooser-tool.directive.mjs +203 -0
  91. package/esm2022/rendering/toolbar/tools/filter-command-tool.directive.mjs +61 -34
  92. package/esm2022/rendering/toolbar/tools/filter-tool-wrapper.component.mjs +29 -8
  93. package/esm2022/rendering/toolbar/tools/filter-toolbar-tool.component.mjs +73 -8
  94. package/esm2022/rendering/toolbar/tools/sort-command-tool.directive.mjs +46 -20
  95. package/esm2022/rendering/toolbar/tools/sort-toolbar-tool.component.mjs +24 -8
  96. package/esm2022/row-reordering/row-reorder.service.mjs +15 -0
  97. package/esm2022/selection/selection.service.mjs +11 -0
  98. package/esm2022/state-management/grid-state.models.mjs +26 -0
  99. package/esm2022/state-management/redo-command-tool.mjs +66 -0
  100. package/esm2022/state-management/undo-command-tool.mjs +66 -0
  101. package/esm2022/state-management/undo-redo.directive.mjs +178 -0
  102. package/esm2022/state-management/undo-redo.service.mjs +22 -0
  103. package/esm2022/state-management/undo-redo.stack.mjs +232 -0
  104. package/esm2022/utils.mjs +13 -13
  105. package/excel/excel-command-tool.directive.d.ts +5 -5
  106. package/fesm2022/progress-kendo-angular-grid.mjs +4672 -1798
  107. package/filtering/filter-input.directive.d.ts +1 -0
  108. package/filtering/menu/date-filter-menu-input.component.d.ts +1 -1
  109. package/filtering/menu/filter-menu-container.component.d.ts +14 -4
  110. package/filtering/menu/filter-menu-input-wrapper.component.d.ts +8 -3
  111. package/filtering/menu/filter-menu.component.d.ts +6 -3
  112. package/filtering/menu/numeric-filter-menu-input.component.d.ts +1 -1
  113. package/filtering/menu/string-filter-menu-input.component.d.ts +1 -1
  114. package/filtering/menu/string-filter-menu.component.d.ts +1 -0
  115. package/grid.component.d.ts +86 -33
  116. package/grid.module.d.ts +107 -100
  117. package/index.d.ts +9 -1
  118. package/localization/messages.d.ts +70 -2
  119. package/navigation/toolbar-tool-name.d.ts +17 -0
  120. package/package.json +36 -20
  121. package/pdf/pdf-command-tool.directive.d.ts +6 -5
  122. package/rendering/cell.component.d.ts +1 -1
  123. package/{column-menu → rendering/toolbar/tools}/column-chooser-tool.directive.d.ts +17 -6
  124. package/rendering/toolbar/tools/filter-command-tool.directive.d.ts +9 -1
  125. package/rendering/toolbar/tools/filter-tool-wrapper.component.d.ts +6 -5
  126. package/rendering/toolbar/tools/filter-toolbar-tool.component.d.ts +11 -2
  127. package/rendering/toolbar/tools/sort-command-tool.directive.d.ts +9 -1
  128. package/rendering/toolbar/tools/sort-toolbar-tool.component.d.ts +5 -1
  129. package/row-reordering/row-reorder.service.d.ts +2 -0
  130. package/schematics/ngAdd/index.js +4 -4
  131. package/selection/selection.service.d.ts +1 -0
  132. package/state-management/grid-state.models.d.ts +58 -0
  133. package/state-management/redo-command-tool.d.ts +38 -0
  134. package/state-management/undo-command-tool.d.ts +38 -0
  135. package/state-management/undo-redo.directive.d.ts +51 -0
  136. package/state-management/undo-redo.service.d.ts +19 -0
  137. package/state-management/undo-redo.stack.d.ts +104 -0
  138. package/utils.d.ts +11 -5
  139. package/esm2022/column-menu/column-chooser-tool.directive.mjs +0 -172
@@ -89,7 +89,7 @@ export class ColumnMenuLockComponent extends ColumnMenuItemBase {
89
89
  (itemClick)="toggleColumn()"
90
90
  [disabled]="disabled">
91
91
  </kendo-grid-columnmenu-item>
92
- `, isInline: true, dependencies: [{ kind: "component", type: ColumnMenuItemComponent, selector: "kendo-grid-columnmenu-item", inputs: ["icon", "svgIcon", "text", "selected", "disabled", "expanded", "service"], outputs: ["itemClick", "expand", "collapse"] }] });
92
+ `, isInline: true, dependencies: [{ kind: "component", type: ColumnMenuItemComponent, selector: "kendo-grid-columnmenu-item", inputs: ["icon", "svgIcon", "indicatorIcon", "text", "selected", "disabled", "expanded", "focused", "service", "column"], outputs: ["itemClick", "expand", "collapse"] }] });
93
93
  }
94
94
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnMenuLockComponent, decorators: [{
95
95
  type: Component,
@@ -138,7 +138,7 @@ export class ColumnMenuPositionComponent extends ColumnMenuItemBase {
138
138
  </kendo-grid-columnmenu-stick>
139
139
  </ng-template>
140
140
  </kendo-grid-columnmenu-item>
141
- `, isInline: true, dependencies: [{ kind: "component", type: ColumnMenuItemComponent, selector: "kendo-grid-columnmenu-item", inputs: ["icon", "svgIcon", "text", "selected", "disabled", "expanded", "service"], outputs: ["itemClick", "expand", "collapse"] }, { kind: "directive", type: ColumnMenuItemContentTemplateDirective, selector: "[kendoGridColumnMenuItemContentTemplate]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ColumnMenuLockComponent, selector: "kendo-grid-columnmenu-lock" }, { kind: "component", type: ColumnMenuStickComponent, selector: "kendo-grid-columnmenu-stick" }] });
141
+ `, isInline: true, dependencies: [{ kind: "component", type: ColumnMenuItemComponent, selector: "kendo-grid-columnmenu-item", inputs: ["icon", "svgIcon", "indicatorIcon", "text", "selected", "disabled", "expanded", "focused", "service", "column"], outputs: ["itemClick", "expand", "collapse"] }, { kind: "directive", type: ColumnMenuItemContentTemplateDirective, selector: "[kendoGridColumnMenuItemContentTemplate]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ColumnMenuLockComponent, selector: "kendo-grid-columnmenu-lock" }, { kind: "component", type: ColumnMenuStickComponent, selector: "kendo-grid-columnmenu-stick" }] });
142
142
  }
143
143
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnMenuPositionComponent, decorators: [{
144
144
  type: Component,
@@ -91,7 +91,7 @@ export class ColumnMenuSortComponent extends ColumnMenuItemBase {
91
91
  (itemClick)="toggleSort('desc')"
92
92
  [selected]="sortedDesc">
93
93
  </kendo-grid-columnmenu-item>
94
- `, isInline: true, dependencies: [{ kind: "component", type: ColumnMenuItemComponent, selector: "kendo-grid-columnmenu-item", inputs: ["icon", "svgIcon", "text", "selected", "disabled", "expanded", "service"], outputs: ["itemClick", "expand", "collapse"] }] });
94
+ `, isInline: true, dependencies: [{ kind: "component", type: ColumnMenuItemComponent, selector: "kendo-grid-columnmenu-item", inputs: ["icon", "svgIcon", "indicatorIcon", "text", "selected", "disabled", "expanded", "focused", "service", "column"], outputs: ["itemClick", "expand", "collapse"] }] });
95
95
  }
96
96
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnMenuSortComponent, decorators: [{
97
97
  type: Component,
@@ -91,7 +91,7 @@ export class ColumnMenuStickComponent extends ColumnMenuItemBase {
91
91
  (itemClick)="toggleColumn()"
92
92
  [disabled]="disabled">
93
93
  </kendo-grid-columnmenu-item>
94
- `, isInline: true, dependencies: [{ kind: "component", type: ColumnMenuItemComponent, selector: "kendo-grid-columnmenu-item", inputs: ["icon", "svgIcon", "text", "selected", "disabled", "expanded", "service"], outputs: ["itemClick", "expand", "collapse"] }] });
94
+ `, isInline: true, dependencies: [{ kind: "component", type: ColumnMenuItemComponent, selector: "kendo-grid-columnmenu-item", inputs: ["icon", "svgIcon", "indicatorIcon", "text", "selected", "disabled", "expanded", "focused", "service", "column"], outputs: ["itemClick", "expand", "collapse"] }] });
95
95
  }
96
96
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnMenuStickComponent, decorators: [{
97
97
  type: Component,
@@ -30,6 +30,7 @@ import { ColumnMenuSortComponent } from './column-menu-sort.component';
30
30
  import { ColumnMenuContainerComponent } from './column-menu-container.component';
31
31
  import { NgClass, NgTemplateOutlet, NgIf } from '@angular/common';
32
32
  import { IconWrapperComponent } from '@progress/kendo-angular-icons';
33
+ import { AdaptiveGridService } from '../common/adaptiveness.service';
33
34
  import * as i0 from "@angular/core";
34
35
  import * as i1 from "./../navigation/navigation.service";
35
36
  import * as i2 from "../common/single-popup.service";
@@ -37,6 +38,7 @@ import * as i3 from "./column-menu.service";
37
38
  import * as i4 from "../common/provider.service";
38
39
  import * as i5 from "../common/column-info.service";
39
40
  import * as i6 from "../common/id.service";
41
+ import * as i7 from "../common/adaptiveness.service";
40
42
  const POPUP_CLASSES = 'k-grid-columnmenu-popup k-column-menu';
41
43
  let id = 0;
42
44
  const getId = (gridId) => `${gridId}-column-menu-${id++}`;
@@ -61,6 +63,7 @@ export class ColumnMenuComponent {
61
63
  cdr;
62
64
  columnInfoService;
63
65
  idService;
66
+ adaptiveGridService;
64
67
  /**
65
68
  * @hidden
66
69
  */
@@ -143,7 +146,7 @@ export class ColumnMenuComponent {
143
146
  popupRef;
144
147
  closeSubscription;
145
148
  popupSubs;
146
- constructor(navigationService, popupService, service, ctx, renderer, cdr, columnInfoService, idService) {
149
+ constructor(navigationService, popupService, service, ctx, renderer, cdr, columnInfoService, idService, adaptiveGridService) {
147
150
  this.navigationService = navigationService;
148
151
  this.popupService = popupService;
149
152
  this.service = service;
@@ -152,6 +155,7 @@ export class ColumnMenuComponent {
152
155
  this.cdr = cdr;
153
156
  this.columnInfoService = columnInfoService;
154
157
  this.idService = idService;
158
+ this.adaptiveGridService = adaptiveGridService;
155
159
  this.closeSubscription = service.closeMenu.subscribe(this.close.bind(this, true));
156
160
  }
157
161
  /**
@@ -264,53 +268,69 @@ export class ColumnMenuComponent {
264
268
  e.preventDefault();
265
269
  e instanceof KeyboardEvent && e.stopImmediatePropagation();
266
270
  }
267
- this.expandedFilter = this.getExpandedState(this.settings.filter);
268
- this.expandedColumns = this.getExpandedState(this.settings.columnChooser);
269
- this.expandedPosition = this.getExpandedState(this.settings.setColumnPosition);
270
- this.popupRef = this.popupService.open(anchor, template, this.popupRef, POPUP_CLASSES);
271
- // Needed as changes to 'popupRef' and 'popupId' are not reflected
272
- // automatically when the Popup is closed by clicking outside the anchor
273
- const ariaRoot = this.isNavigable ? anchor.closest('.k-table-th') : anchor;
274
- if (this.popupRef) {
275
- this.popupSubs?.unsubscribe();
276
- this.popupSubs = this.popupRef.popup.instance.anchorViewportLeave.subscribe(() => {
277
- this.popupSubs?.unsubscribe();
278
- this.popupSubs = null;
279
- this.close(true);
280
- this.updateAria(ariaRoot);
281
- });
282
- this.popupSubs.add(() => this.popupRef.popup.instance.close.subscribe(() => {
283
- this.popupSubs?.unsubscribe();
284
- this.popupSubs = this.popupRef = null;
285
- this.updateAria(ariaRoot);
286
- }));
287
- const popupAriaElement = this.popupRef.popupElement.querySelector('.k-grid-columnmenu-popup');
288
- if (popupAriaElement) {
289
- const popupId = getId(this.idService?.gridId());
290
- this.renderer.setAttribute(popupAriaElement, 'id', popupId);
291
- this.renderer.setAttribute(popupAriaElement, 'role', 'dialog');
292
- this.renderer.setAttribute(popupAriaElement, 'aria-label', this.columnMenuTitle);
293
- ariaRoot && this.renderer.setAttribute(ariaRoot, 'aria-controls', popupId);
294
- ariaRoot && this.renderer.setAttribute(ariaRoot, 'aria-expanded', 'true');
295
- }
296
- if (this.settings.view === 'tabbed') {
297
- this.renderer.addClass(popupAriaElement, 'k-column-menu-tabbed');
298
- this.renderer.addClass(popupAriaElement, 'k-column-menu');
299
- this.cdr.detectChanges();
300
- this.tabStrip?.selectTab(0);
271
+ if (this.ctx.grid.adaptiveMode === 'auto' && this.adaptiveGridService.windowSize !== 'large') {
272
+ if (!this.ctx.grid.isActionSheetExpanded) {
273
+ this.adaptiveGridService.viewType = 'columnMenu';
274
+ this.adaptiveGridService.columns = this.columns;
275
+ this.adaptiveGridService.columnMenuService = this.service;
276
+ this.adaptiveGridService.column = this.column;
277
+ this.ctx.grid.adaptiveRenderer.actionSheet.toggle(true);
301
278
  }
302
279
  }
303
280
  else {
304
- this.focusRoot();
281
+ this.expandedFilter = this.getExpandedState(this.settings.filter);
282
+ this.expandedColumns = this.getExpandedState(this.settings.columnChooser);
283
+ this.expandedPosition = this.getExpandedState(this.settings.setColumnPosition);
284
+ this.popupRef = this.popupService.open(anchor, template, this.popupRef, POPUP_CLASSES);
285
+ // Needed as changes to 'popupRef' and 'popupId' are not reflected
286
+ // automatically when the Popup is closed by clicking outside the anchor
287
+ const ariaRoot = this.isNavigable ? anchor.closest('.k-table-th') : anchor;
288
+ if (this.popupRef) {
289
+ this.popupSubs?.unsubscribe();
290
+ this.popupSubs = this.popupRef.popup.instance.anchorViewportLeave.subscribe(() => {
291
+ this.popupSubs?.unsubscribe();
292
+ this.popupSubs = null;
293
+ this.close(true);
294
+ this.updateAria(ariaRoot);
295
+ });
296
+ this.popupSubs.add(() => this.popupRef.popup.instance.close.subscribe(() => {
297
+ this.popupSubs?.unsubscribe();
298
+ this.popupSubs = this.popupRef = null;
299
+ this.updateAria(ariaRoot);
300
+ }));
301
+ const popupAriaElement = this.popupRef.popupElement.querySelector('.k-grid-columnmenu-popup');
302
+ if (popupAriaElement) {
303
+ const popupId = getId(this.idService?.gridId());
304
+ this.renderer.setAttribute(popupAriaElement, 'id', popupId);
305
+ this.renderer.setAttribute(popupAriaElement, 'role', 'dialog');
306
+ this.renderer.setAttribute(popupAriaElement, 'aria-label', this.columnMenuTitle);
307
+ ariaRoot && this.renderer.setAttribute(ariaRoot, 'aria-controls', popupId);
308
+ ariaRoot && this.renderer.setAttribute(ariaRoot, 'aria-expanded', 'true');
309
+ }
310
+ if (this.settings.view === 'tabbed') {
311
+ this.renderer.addClass(popupAriaElement, 'k-column-menu-tabbed');
312
+ this.renderer.addClass(popupAriaElement, 'k-column-menu');
313
+ this.cdr.detectChanges();
314
+ this.tabStrip?.selectTab(0);
315
+ }
316
+ }
317
+ else {
318
+ this.focusRoot();
319
+ }
305
320
  }
306
321
  }
307
322
  /**
308
323
  * @hidden
309
324
  */
310
325
  close(triggerFocus = false) {
311
- this.popupService.destroy();
312
- this.popupRef = null;
313
- this.cdr.markForCheck();
326
+ if (this.ctx.grid.adaptiveMode === 'auto' && this.adaptiveGridService.windowSize !== 'large') {
327
+ this.ctx.grid.adaptiveRenderer.actionSheet.toggle(false);
328
+ }
329
+ else {
330
+ this.popupService.destroy();
331
+ this.popupRef = null;
332
+ this.cdr.markForCheck();
333
+ }
314
334
  if (!triggerFocus) {
315
335
  return;
316
336
  }
@@ -334,7 +354,7 @@ export class ColumnMenuComponent {
334
354
  focusRoot() {
335
355
  this.isNavigable ? this.navigationService.focusCell(0, this.column.leafIndex) : this.anchor.nativeElement.focus();
336
356
  }
337
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnMenuComponent, deps: [{ token: i1.NavigationService }, { token: i2.SinglePopupService }, { token: i3.ColumnMenuService }, { token: i4.ContextService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i5.ColumnInfoService }, { token: i6.IdService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
357
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnMenuComponent, deps: [{ token: i1.NavigationService }, { token: i2.SinglePopupService }, { token: i3.ColumnMenuService }, { token: i4.ContextService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i5.ColumnInfoService }, { token: i6.IdService, optional: true }, { token: i7.AdaptiveGridService }], target: i0.ɵɵFactoryTarget.Component });
338
358
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ColumnMenuComponent, isStandalone: true, selector: "kendo-grid-column-menu", inputs: { standalone: "standalone", column: "column", settings: "settings", sort: "sort", filter: "filter", sortable: "sortable", columnMenuTemplate: "columnMenuTemplate", tabIndex: "tabIndex" }, host: { properties: { "class.k-grid-column-menu-standalone": "this.standalone" } }, providers: [
339
359
  ColumnMenuService,
340
360
  MenuTabbingService
@@ -380,7 +400,8 @@ export class ColumnMenuComponent {
380
400
  [showStick]="hasStick"
381
401
  [kendoGridColumnMenuItem]="positionItem"
382
402
  [service]="service"
383
- [expanded]="expandedPosition">
403
+ [expanded]="expandedPosition"
404
+ >
384
405
  </kendo-grid-columnmenu-position>
385
406
  <span [style.borderColor]="'rgba(0, 0, 0, 0.08)'" *ngIf="hasColumnChooser || hasAutoSizeColumn || hasAutoSizeAllColumns" class="k-separator"></span>
386
407
  <kendo-grid-columnmenu-chooser
@@ -505,7 +526,8 @@ export class ColumnMenuComponent {
505
526
  </kendo-tabstrip-tab>
506
527
  </kendo-tabstrip>
507
528
  </ng-template>
508
- `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: ColumnMenuContainerComponent, selector: "kendo-grid-columnmenu-container" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ColumnMenuSortComponent, selector: "kendo-grid-columnmenu-sort" }, { kind: "directive", type: ColumnMenuItemDirective, selector: "[kendoGridColumnMenuItem]", inputs: ["kendoGridColumnMenuItem"] }, { kind: "component", type: ColumnMenuLockComponent, selector: "kendo-grid-columnmenu-lock" }, { kind: "component", type: ColumnMenuStickComponent, selector: "kendo-grid-columnmenu-stick" }, { kind: "component", type: ColumnMenuPositionComponent, selector: "kendo-grid-columnmenu-position", inputs: ["expanded", "showLock", "showStick", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: ColumnMenuChooserComponent, selector: "kendo-grid-columnmenu-chooser", inputs: ["expanded", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: ColumnMenuAutoSizeColumnComponent, selector: "kendo-grid-columnmenu-autosize-column", inputs: ["column"] }, { kind: "component", type: ColumnMenuAutoSizeAllColumnsComponent, selector: "kendo-grid-columnmenu-autosize-all-columns" }, { kind: "component", type: ColumnMenuFilterComponent, selector: "kendo-grid-columnmenu-filter", inputs: ["expanded", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: TabStripComponent, selector: "kendo-tabstrip", inputs: ["height", "animate", "tabAlignment", "tabPosition", "keepTabContent", "closable", "scrollable", "size", "closeIcon", "closeIconClass", "closeSVGIcon", "showContentArea"], outputs: ["tabSelect", "tabClose", "tabScroll"], exportAs: ["kendoTabStrip"] }, { kind: "component", type: TabStripTabComponent, selector: "kendo-tabstrip-tab", inputs: ["title", "disabled", "cssClass", "cssStyle", "selected", "closable", "closeIcon", "closeIconClass", "closeSVGIcon"], exportAs: ["kendoTabStripTab"] }, { kind: "directive", type: TabTitleDirective, selector: "[kendoTabTitle]" }, { kind: "directive", type: TabContentDirective, selector: "[kendoTabContent]" }, { kind: "component", type: FilterMenuContainerComponent, selector: "kendo-grid-filter-menu-container", inputs: ["column", "isLast", "isExpanded", "menuTabbingService", "filter", "actionsClass"], outputs: ["close"] }, { kind: "component", type: ColumnListComponent, selector: "kendo-grid-columnlist", inputs: ["columns", "autoSync", "ariaLabel", "allowHideAll", "applyText", "resetText", "actionsClass", "isLast", "isExpanded", "service"], outputs: ["reset", "apply", "columnChange"] }] });
529
+
530
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: ColumnMenuContainerComponent, selector: "kendo-grid-columnmenu-container" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ColumnMenuSortComponent, selector: "kendo-grid-columnmenu-sort" }, { kind: "directive", type: ColumnMenuItemDirective, selector: "[kendoGridColumnMenuItem]", inputs: ["kendoGridColumnMenuItem"] }, { kind: "component", type: ColumnMenuLockComponent, selector: "kendo-grid-columnmenu-lock" }, { kind: "component", type: ColumnMenuStickComponent, selector: "kendo-grid-columnmenu-stick" }, { kind: "component", type: ColumnMenuPositionComponent, selector: "kendo-grid-columnmenu-position", inputs: ["expanded", "showLock", "showStick", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: ColumnMenuChooserComponent, selector: "kendo-grid-columnmenu-chooser", inputs: ["expanded", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: ColumnMenuAutoSizeColumnComponent, selector: "kendo-grid-columnmenu-autosize-column", inputs: ["column"] }, { kind: "component", type: ColumnMenuAutoSizeAllColumnsComponent, selector: "kendo-grid-columnmenu-autosize-all-columns" }, { kind: "component", type: ColumnMenuFilterComponent, selector: "kendo-grid-columnmenu-filter", inputs: ["expanded", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: TabStripComponent, selector: "kendo-tabstrip", inputs: ["height", "animate", "tabAlignment", "tabPosition", "keepTabContent", "closable", "scrollable", "size", "closeIcon", "closeIconClass", "closeSVGIcon", "showContentArea"], outputs: ["tabSelect", "tabClose", "tabScroll"], exportAs: ["kendoTabStrip"] }, { kind: "component", type: TabStripTabComponent, selector: "kendo-tabstrip-tab", inputs: ["title", "disabled", "cssClass", "cssStyle", "selected", "closable", "closeIcon", "closeIconClass", "closeSVGIcon"], exportAs: ["kendoTabStripTab"] }, { kind: "directive", type: TabTitleDirective, selector: "[kendoTabTitle]" }, { kind: "directive", type: TabContentDirective, selector: "[kendoTabContent]" }, { kind: "component", type: FilterMenuContainerComponent, selector: "kendo-grid-filter-menu-container", inputs: ["column", "isLast", "isExpanded", "menuTabbingService", "filter", "actionsClass"], outputs: ["close"] }, { kind: "component", type: ColumnListComponent, selector: "kendo-grid-columnlist", inputs: ["columns", "showActions", "autoSync", "ariaLabel", "allowHideAll", "applyText", "resetText", "actionsClass", "isLast", "isExpanded", "service"], outputs: ["reset", "apply", "columnChange"] }] });
509
531
  }
510
532
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnMenuComponent, decorators: [{
511
533
  type: Component,
@@ -557,7 +579,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
557
579
  [showStick]="hasStick"
558
580
  [kendoGridColumnMenuItem]="positionItem"
559
581
  [service]="service"
560
- [expanded]="expandedPosition">
582
+ [expanded]="expandedPosition"
583
+ >
561
584
  </kendo-grid-columnmenu-position>
562
585
  <span [style.borderColor]="'rgba(0, 0, 0, 0.08)'" *ngIf="hasColumnChooser || hasAutoSizeColumn || hasAutoSizeAllColumns" class="k-separator"></span>
563
586
  <kendo-grid-columnmenu-chooser
@@ -682,6 +705,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
682
705
  </kendo-tabstrip-tab>
683
706
  </kendo-tabstrip>
684
707
  </ng-template>
708
+
685
709
  `,
686
710
  standalone: true,
687
711
  imports: [
@@ -694,7 +718,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
694
718
  }]
695
719
  }], ctorParameters: function () { return [{ type: i1.NavigationService }, { type: i2.SinglePopupService }, { type: i3.ColumnMenuService }, { type: i4.ContextService }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i5.ColumnInfoService }, { type: i6.IdService, decorators: [{
696
720
  type: Optional
697
- }] }]; }, propDecorators: { standalone: [{
721
+ }] }, { type: i7.AdaptiveGridService }]; }, propDecorators: { standalone: [{
698
722
  type: HostBinding,
699
723
  args: ['class.k-grid-column-menu-standalone']
700
724
  }, {
@@ -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
  }
@@ -48,7 +48,7 @@ export class SpanColumnComponent extends ColumnBase {
48
48
  /**
49
49
  * @hidden
50
50
  */
51
- childColumns = new QueryList();
51
+ children = new QueryList();
52
52
  /**
53
53
  * @hidden
54
54
  */
@@ -91,13 +91,13 @@ export class SpanColumnComponent extends ColumnBase {
91
91
  set width(_value) {
92
92
  }
93
93
  get width() {
94
- return this.childColumns.reduce((total, column) => total + column.width, 0);
94
+ return this.children.reduce((total, column) => total + column.width, 0);
95
95
  }
96
96
  /**
97
97
  * @hidden
98
98
  */
99
99
  get leafIndex() {
100
- return this.childColumns.first.leafIndex;
100
+ return this.children.first.leafIndex;
101
101
  }
102
102
  _editable = true;
103
103
  constructor(parent, idService) {
@@ -124,7 +124,7 @@ export class SpanColumnComponent extends ColumnBase {
124
124
  * @hidden
125
125
  */
126
126
  get colspan() {
127
- return this.childColumns.filter(c => c.isVisible).length;
127
+ return this.children.filter(c => c.isVisible).length;
128
128
  }
129
129
  /**
130
130
  * Toggles the locked (frozen) state of the columns ([see example](slug:locked_columns_grid)).
@@ -134,13 +134,13 @@ export class SpanColumnComponent extends ColumnBase {
134
134
  this._locked = value;
135
135
  }
136
136
  get locked() {
137
- return this._locked || this.childColumns.some(c => c.locked);
137
+ return this._locked || this.children.some(c => c.locked);
138
138
  }
139
139
  get childrenArray() {
140
- return this.childColumns.toArray();
140
+ return this.children.toArray();
141
141
  }
142
142
  get hasChildren() {
143
- return this.childColumns.length > 0;
143
+ return this.children.length > 0;
144
144
  }
145
145
  /**
146
146
  * @hidden
@@ -156,7 +156,7 @@ export class SpanColumnComponent extends ColumnBase {
156
156
  provide: ColumnBase,
157
157
  useExisting: forwardRef(() => SpanColumnComponent)
158
158
  }
159
- ], queries: [{ propertyName: "template", predicate: CellTemplateDirective }, { propertyName: "editTemplate", predicate: EditTemplateDirective }, { propertyName: "childColumns", predicate: ColumnComponent }], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
159
+ ], queries: [{ propertyName: "template", predicate: CellTemplateDirective }, { propertyName: "editTemplate", predicate: EditTemplateDirective }, { propertyName: "children", predicate: ColumnComponent }], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
160
160
  }
161
161
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SpanColumnComponent, decorators: [{
162
162
  type: Component,
@@ -185,7 +185,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
185
185
  }], editTemplate: [{
186
186
  type: ContentChildren,
187
187
  args: [EditTemplateDirective, { descendants: false }]
188
- }], childColumns: [{
188
+ }], children: [{
189
189
  type: ContentChildren,
190
190
  args: [ColumnComponent]
191
191
  }], editable: [{
@@ -0,0 +1,72 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Injectable } from "@angular/core";
6
+ import { Subject } from "rxjs";
7
+ import { AdaptiveService } from "@progress/kendo-angular-utils";
8
+ import { ContextService } from "./provider.service";
9
+ import * as i0 from "@angular/core";
10
+ import * as i1 from "./provider.service";
11
+ import * as i2 from "@progress/kendo-angular-utils";
12
+ /**
13
+ * @hidden
14
+ *
15
+ * The AdaptiveGridService is used to provide common information for the ActionSheet used in adaptive mode.
16
+ */
17
+ export class AdaptiveGridService {
18
+ ctx;
19
+ adaptiveService;
20
+ /**
21
+ * Observable that emits when the ActionSheet's views change animation ends.
22
+ */
23
+ get animationEnd() {
24
+ return this.animationEndSubject.asObservable();
25
+ }
26
+ columnMenuService;
27
+ columns = [];
28
+ secondaryView;
29
+ viewType;
30
+ popupRef;
31
+ column;
32
+ filterMenuContainer;
33
+ filterMenuContainerComponentRef;
34
+ animationEndSubject = new Subject();
35
+ constructor(ctx, adaptiveService) {
36
+ this.ctx = ctx;
37
+ this.adaptiveService = adaptiveService;
38
+ }
39
+ submitFilter() {
40
+ this.filterMenuContainer.submit();
41
+ this.ctx.grid.adaptiveRenderer.actionSheet.toggle(false);
42
+ this.reset();
43
+ }
44
+ resetFilter() {
45
+ this.filterMenuContainer.reset();
46
+ this.ctx.grid.adaptiveRenderer.actionSheet.toggle(false);
47
+ this.reset();
48
+ }
49
+ reset() {
50
+ this.ctx.grid.adaptiveRenderer.actionSheet.currentView = 1;
51
+ this.filterMenuContainerComponentRef?.destroy();
52
+ this.column = null;
53
+ this.popupRef = null;
54
+ this.filterMenuContainer = null;
55
+ this.viewType = null;
56
+ this.secondaryView = null;
57
+ }
58
+ /**
59
+ * Emits an event to notify that the animation has ended.
60
+ */
61
+ notifyAnimationEnd() {
62
+ this.animationEndSubject.next();
63
+ }
64
+ get windowSize() {
65
+ return this.adaptiveService.size;
66
+ }
67
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AdaptiveGridService, deps: [{ token: i1.ContextService }, { token: i2.AdaptiveService }], target: i0.ɵɵFactoryTarget.Injectable });
68
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AdaptiveGridService });
69
+ }
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AdaptiveGridService, decorators: [{
71
+ type: Injectable
72
+ }], ctorParameters: function () { return [{ type: i1.ContextService }, { type: i2.AdaptiveService }]; } });
@@ -11,10 +11,12 @@ import { ScrollSyncService } from '../scrolling/scroll-sync.service';
11
11
  import { isDocumentAvailable } from '@progress/kendo-angular-common';
12
12
  import { ContextService } from './provider.service';
13
13
  import { skip } from 'rxjs/operators';
14
+ import { AdaptiveGridService } from './adaptiveness.service';
14
15
  import * as i0 from "@angular/core";
15
16
  import * as i1 from "@progress/kendo-angular-popup";
16
17
  import * as i2 from "../scrolling/scroll-sync.service";
17
18
  import * as i3 from "./provider.service";
19
+ import * as i4 from "./adaptiveness.service";
18
20
  const contains = (node, predicate) => {
19
21
  while (node) {
20
22
  if (predicate(node)) {
@@ -47,6 +49,7 @@ export class SinglePopupService {
47
49
  renderer;
48
50
  ngZone;
49
51
  ctx;
52
+ adaptiveGridService;
50
53
  /**
51
54
  * Fires when the filter or column menus are about to close because the user clicked outside their popups.
52
55
  * Used to prevent the popup from closing.
@@ -60,11 +63,12 @@ export class SinglePopupService {
60
63
  /**
61
64
  * @hidden
62
65
  */
63
- constructor(popupService, renderer, ngZone, scrollSyncService, ctx) {
66
+ constructor(popupService, renderer, ngZone, scrollSyncService, ctx, adaptiveGridService) {
64
67
  this.popupService = popupService;
65
68
  this.renderer = renderer;
66
69
  this.ngZone = ngZone;
67
70
  this.ctx = ctx;
71
+ this.adaptiveGridService = adaptiveGridService;
68
72
  this.scrollSubscription = scrollSyncService.changes.pipe(skip(1)).subscribe(() => this.destroy());
69
73
  }
70
74
  /**
@@ -83,6 +87,7 @@ export class SinglePopupService {
83
87
  content: template,
84
88
  positionMode: "absolute"
85
89
  });
90
+ this.adaptiveGridService.popupRef = this.popupRef;
86
91
  this.renderer.setAttribute(this.popupRef.popupElement, 'dir', this.ctx.localization.rtl ? 'rtl' : 'ltr');
87
92
  this.attachClose(anchor);
88
93
  }
@@ -102,6 +107,7 @@ export class SinglePopupService {
102
107
  this.pointerEventsSub = null;
103
108
  this.popupRef.close();
104
109
  this.popupRef = null;
110
+ this.adaptiveGridService.popupRef = null;
105
111
  }
106
112
  }
107
113
  ngOnDestroy() {
@@ -141,9 +147,9 @@ export class SinglePopupService {
141
147
  }));
142
148
  });
143
149
  }
144
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SinglePopupService, deps: [{ token: i1.PopupService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i2.ScrollSyncService }, { token: i3.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
150
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SinglePopupService, deps: [{ token: i1.PopupService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i2.ScrollSyncService }, { token: i3.ContextService }, { token: i4.AdaptiveGridService }], target: i0.ɵɵFactoryTarget.Injectable });
145
151
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SinglePopupService });
146
152
  }
147
153
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SinglePopupService, decorators: [{
148
154
  type: Injectable
149
- }], ctorParameters: function () { return [{ type: i1.PopupService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i2.ScrollSyncService }, { type: i3.ContextService }]; } });
155
+ }], ctorParameters: function () { return [{ type: i1.PopupService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i2.ScrollSyncService }, { type: i3.ContextService }, { type: i4.AdaptiveGridService }]; } });
@@ -0,0 +1,81 @@
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 { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
+ import { Subscription } from 'rxjs';
8
+ import { cancelIcon, columnsIcon, fileExcelIcon, filePdfIcon, pencilIcon, plusIcon, saveIcon, trashIcon } from '@progress/kendo-svg-icons';
9
+ import { isPresent } from '@progress/kendo-angular-common';
10
+ import { ContextService } from './provider.service';
11
+ import { ToolbarToolName } from '../navigation/toolbar-tool-name';
12
+ import * as i0 from "@angular/core";
13
+ import * as i1 from "@progress/kendo-angular-toolbar";
14
+ import * as i2 from "./provider.service";
15
+ const ICONS_MAP = {
16
+ edit: { svgIcon: pencilIcon, icon: 'pencil' },
17
+ save: { svgIcon: saveIcon, icon: 'save' },
18
+ cancel: { svgIcon: cancelIcon, icon: 'cancel' },
19
+ remove: { svgIcon: trashIcon, icon: 'trash' },
20
+ add: { svgIcon: plusIcon, icon: 'plus' },
21
+ excelExport: { svgIcon: fileExcelIcon, icon: 'file-excel' },
22
+ pdfExport: { svgIcon: filePdfIcon, icon: 'file-pdf' },
23
+ columns: { svgIcon: columnsIcon, icon: 'columns' }
24
+ };
25
+ /**
26
+ * @hidden
27
+ */
28
+ export class ToolbarToolBase {
29
+ host;
30
+ commandName;
31
+ ctx;
32
+ zone;
33
+ cdr;
34
+ clickSub = new Subscription();
35
+ constructor(host, commandName, ctx, zone, cdr) {
36
+ this.host = host;
37
+ this.commandName = commandName;
38
+ this.ctx = ctx;
39
+ this.zone = zone;
40
+ this.cdr = cdr;
41
+ }
42
+ ngOnInit() {
43
+ this.clickSub = this.host.click.subscribe(e => this.onClick(e));
44
+ const hasIcon = (isPresent(this.host.toolbarOptions.icon) && this.host.toolbarOptions.icon !== '') &&
45
+ (isPresent(this.host.overflowOptions.icon) && this.host.overflowOptions.icon !== '');
46
+ const hasSvgIcon = isPresent(this.host.toolbarOptions.svgIcon) && isPresent(this.host.overflowOptions.svgIcon);
47
+ if (!hasIcon) {
48
+ this.host.icon = ICONS_MAP[this.commandName].icon;
49
+ }
50
+ if (!hasSvgIcon) {
51
+ this.host.svgIcon = ICONS_MAP[this.commandName].svgIcon;
52
+ }
53
+ }
54
+ ngAfterViewInit() {
55
+ const hasText = isPresent(this.host.text);
56
+ if (!hasText) {
57
+ this.zone.runOutsideAngular(() => {
58
+ setTimeout(() => {
59
+ const messageKey = this.commandName === ToolbarToolName.columns ? 'columns' : `${this.commandName}ToolbarToolText`;
60
+ this.host.text = this.ctx.localization.get(messageKey);
61
+ this.zone.run(() => {
62
+ this.cdr.markForCheck();
63
+ });
64
+ });
65
+ });
66
+ }
67
+ }
68
+ ngOnDestroy() {
69
+ this.clickSub.unsubscribe();
70
+ }
71
+ onClick(_e) { }
72
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarToolBase, deps: [{ token: i1.ToolBarButtonComponent }, { token: 'command' }, { token: i2.ContextService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
73
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ToolbarToolBase, ngImport: i0 });
74
+ }
75
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarToolBase, decorators: [{
76
+ type: Directive,
77
+ args: [{}]
78
+ }], ctorParameters: function () { return [{ type: i1.ToolBarButtonComponent }, { type: undefined, decorators: [{
79
+ type: Inject,
80
+ args: ['command']
81
+ }] }, { type: i2.ContextService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; } });