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

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
@@ -1,172 +0,0 @@
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 } 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-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 * as i0 from "@angular/core";
15
- import * as i1 from "@progress/kendo-angular-popup";
16
- import * as i2 from "@progress/kendo-angular-toolbar";
17
- import * as i3 from "../common/provider.service";
18
- let incrementingId = 0;
19
- /**
20
- * Represents the `column-chooser` toolbar tool of the Grid.
21
- * You can apply this directive to any `kendo-toolbar-button` element inside a
22
- * ToolbarComponent used in the Grid.
23
- *
24
- * @example
25
- * ```html-no-run
26
- * <kendo-grid>
27
- * <kendo-toolbar>
28
- * <kendo-toolbar-button kendoGridColumnChooserTool></kendo-toolbar-button>
29
- * </kendo-toolbar>
30
- * </kendo-grid>
31
- * ```
32
- */
33
- export class ColumnChooserToolbarDirective {
34
- renderer;
35
- popupSerivce;
36
- host;
37
- ctx;
38
- zone;
39
- refresh;
40
- /**
41
- * Specifies if the changes in the visibility of the column will be immediately applied.
42
- *
43
- * @default false
44
- */
45
- autoSync = false;
46
- /**
47
- * Specifies if all columns can be hidden.
48
- *
49
- * @default true
50
- */
51
- allowHideAll = true;
52
- popupRef;
53
- subs = new Subscription();
54
- nextId = incrementingId++;
55
- constructor(renderer, popupSerivce, host, ctx, zone, refresh) {
56
- this.renderer = renderer;
57
- this.popupSerivce = popupSerivce;
58
- this.host = host;
59
- this.ctx = ctx;
60
- this.zone = zone;
61
- this.refresh = refresh;
62
- }
63
- ngOnInit() {
64
- this.subs.add(this.host.click.subscribe(e => this.onClick(e)));
65
- const hasToolbarIcon = isPresent(this.host.toolbarOptions.icon) && this.host.toolbarOptions.icon !== '';
66
- const hasOverflowIcon = isPresent(this.host.overflowOptions.icon) && this.host.overflowOptions.icon !== '';
67
- const hasIcon = hasToolbarIcon && hasOverflowIcon;
68
- const hasSvgIcon = isPresent(this.host.toolbarOptions.svgIcon) && isPresent(this.host.overflowOptions.svgIcon);
69
- if (!hasIcon) {
70
- this.host.icon = 'columns';
71
- }
72
- if (!hasSvgIcon) {
73
- this.host.svgIcon = columnsIcon;
74
- }
75
- }
76
- ngAfterViewInit() {
77
- const hasText = isPresent(this.host.text);
78
- if (!hasText) {
79
- this.zone.onStable.pipe(take(1)).subscribe(() => {
80
- this.host.text = this.ctx.localization.get(`columns`);
81
- });
82
- }
83
- this.host.toolbarButtonElement.nativeElement.setAttribute('aria-haspopup', 'dialog');
84
- this.host.toolbarButtonElement.nativeElement.setAttribute('aria-expanded', 'false');
85
- this.host.toolbarButtonElement.nativeElement.setAttribute('title', this.ctx.localization.get('columns'));
86
- this.subs.add(this.refresh.onRefresh.pipe(filter((tool) => tool === this.host)).subscribe((tool) => {
87
- if (tool.overflows && this.popupRef) {
88
- this.popupRef.close();
89
- }
90
- }));
91
- }
92
- ngOnDestroy() {
93
- this.subs.unsubscribe();
94
- }
95
- /**
96
- * @hidden
97
- */
98
- onClick(e) {
99
- e.preventDefault();
100
- if (!this.popupRef) {
101
- if (!this.host.overflows) {
102
- const direction = this.ctx.localization.rtl ? 'right' : 'left';
103
- this.popupRef = this.popupSerivce.open({
104
- anchor: this.host.toolbarButtonElement,
105
- content: ColumnListComponent,
106
- positionMode: 'absolute',
107
- anchorAlign: { vertical: 'bottom', horizontal: direction },
108
- popupAlign: { vertical: 'top', horizontal: direction }
109
- });
110
- const popupElement = this.popupRef.popupElement;
111
- const popupId = `k-column-chooser-tool-${this.nextId}-popup`;
112
- const popupAriaElement = popupElement.querySelector('.k-popup');
113
- this.zone.runOutsideAngular(() => {
114
- this.renderer.listen(popupAriaElement, 'keydown', (e) => {
115
- if (e.key === 'Escape') {
116
- this.closePopup(true);
117
- }
118
- });
119
- });
120
- this.renderer.setAttribute(popupElement, 'dir', this.ctx.localization.rtl ? 'rtl' : 'ltr');
121
- this.renderer.setAttribute(popupAriaElement, 'id', popupId);
122
- this.renderer.setAttribute(popupAriaElement, 'role', 'dialog');
123
- this.host.toolbarButtonElement.nativeElement.setAttribute('aria-expanded', 'true');
124
- this.host.toolbarButtonElement.nativeElement.setAttribute('aria-controls', popupId);
125
- const columnList = this.popupRef.content.instance;
126
- columnList.isLast = true;
127
- columnList.autoSync = this.autoSync;
128
- columnList.allowHideAll = this.allowHideAll;
129
- columnList.applyText = this.ctx.localization.get('columnsApply');
130
- columnList.resetText = this.ctx.localization.get('columnsReset');
131
- columnList.columns = this.ctx.grid.columns;
132
- columnList.ariaLabel = this.ctx.localization.get('columns');
133
- this.subs.add(this.popupRef.popup.instance.anchorViewportLeave.subscribe(() => {
134
- this.closePopup(true);
135
- }));
136
- this.subs.add(columnList.apply.subscribe(() => {
137
- this.closePopup();
138
- }));
139
- this.zone.runOutsideAngular(() => this.renderer.listen('document', 'click', ({ target }) => {
140
- if (this.popupRef && !closest(target, node => node === this.popupRef.popupElement || node === this.host.toolbarButtonElement.nativeElement)) {
141
- this.zone.run(() => {
142
- this.closePopup();
143
- });
144
- }
145
- }));
146
- }
147
- }
148
- else {
149
- this.closePopup();
150
- }
151
- }
152
- closePopup(focusAnchor = false) {
153
- this.popupRef.close();
154
- this.popupRef = null;
155
- this.host.toolbarButtonElement.nativeElement.setAttribute('aria-expanded', 'false');
156
- this.host.toolbarButtonElement.nativeElement.removeAttribute('aria-controls');
157
- focusAnchor && this.host.toolbarButtonElement.nativeElement.focus();
158
- }
159
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnChooserToolbarDirective, deps: [{ token: i0.Renderer2 }, { token: i1.PopupService }, { token: i2.ToolBarButtonComponent }, { token: i3.ContextService }, { token: i0.NgZone }, { token: i2.RefreshService }], target: i0.ɵɵFactoryTarget.Directive });
160
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ColumnChooserToolbarDirective, isStandalone: true, selector: "[kendoGridColumnChooserTool]", inputs: { autoSync: "autoSync", allowHideAll: "allowHideAll" }, ngImport: i0 });
161
- }
162
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnChooserToolbarDirective, decorators: [{
163
- type: Directive,
164
- args: [{
165
- selector: '[kendoGridColumnChooserTool]',
166
- standalone: true
167
- }]
168
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i1.PopupService }, { type: i2.ToolBarButtonComponent }, { type: i3.ContextService }, { type: i0.NgZone }, { type: i2.RefreshService }]; }, propDecorators: { autoSync: [{
169
- type: Input
170
- }], allowHideAll: [{
171
- type: Input
172
- }] } });