@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.
- package/adaptiveness/adaptive-mode.d.ts +12 -0
- package/adaptiveness/adaptive-renderer.component.d.ts +84 -0
- package/codemods/template-transformer/index.js +94 -0
- package/codemods/utils.js +553 -0
- package/codemods/v19/grid-kendogridgroupbinding.js +51 -0
- package/column-menu/column-chooser.component.d.ts +4 -0
- package/column-menu/column-list.component.d.ts +10 -3
- package/column-menu/column-menu-item.component.d.ts +48 -3
- package/column-menu/column-menu-item.directive.d.ts +5 -2
- package/column-menu/column-menu.component.d.ts +4 -2
- package/columns/column-base.d.ts +5 -0
- package/columns/span-column.component.d.ts +2 -2
- package/common/adaptiveness.service.d.ts +50 -0
- package/common/single-popup.service.d.ts +3 -1
- package/common/toolbar-tool-base.directive.d.ts +26 -0
- package/directives.d.ts +12 -5
- package/dragdrop/drag-hint.service.d.ts +3 -2
- package/editing/add-command-tool.directive.d.ts +7 -6
- package/editing/cancel-command-tool.directive.d.ts +38 -0
- package/editing/edit-command-tool.directive.d.ts +38 -0
- package/editing/edit.service.d.ts +1 -1
- package/editing/remove-command-tool.directive.d.ts +39 -0
- package/editing/save-command-tool.directive.d.ts +38 -0
- package/editing/toolbar-editing-tool-base.directive.d.ts +29 -0
- package/editing-directives/editing-directive-base.d.ts +4 -1
- package/editing-directives/external-editing.directive.d.ts +3 -1
- package/esm2022/adaptiveness/adaptive-mode.mjs +5 -0
- package/esm2022/adaptiveness/adaptive-renderer.component.mjs +1108 -0
- package/esm2022/column-menu/column-chooser.component.mjs +13 -11
- package/esm2022/column-menu/column-list.component.mjs +51 -8
- package/esm2022/column-menu/column-menu-autosize-all.component.mjs +1 -1
- package/esm2022/column-menu/column-menu-autosize.component.mjs +1 -1
- package/esm2022/column-menu/column-menu-chooser.component.mjs +1 -1
- package/esm2022/column-menu/column-menu-container.component.mjs +1 -1
- package/esm2022/column-menu/column-menu-filter.component.mjs +1 -1
- package/esm2022/column-menu/column-menu-item.component.mjs +123 -12
- package/esm2022/column-menu/column-menu-item.directive.mjs +14 -5
- package/esm2022/column-menu/column-menu-lock.component.mjs +1 -1
- package/esm2022/column-menu/column-menu-position.component.mjs +1 -1
- package/esm2022/column-menu/column-menu-sort.component.mjs +1 -1
- package/esm2022/column-menu/column-menu-stick.component.mjs +1 -1
- package/esm2022/column-menu/column-menu.component.mjs +68 -44
- package/esm2022/column-resizing/column-handle.directive.mjs +2 -2
- package/esm2022/columns/column-base.mjs +9 -0
- package/esm2022/columns/columns-container.mjs +1 -1
- package/esm2022/columns/span-column.component.mjs +9 -9
- package/esm2022/common/adaptiveness.service.mjs +72 -0
- package/esm2022/common/single-popup.service.mjs +9 -3
- package/esm2022/common/toolbar-tool-base.directive.mjs +81 -0
- package/esm2022/directives.mjs +18 -3
- package/esm2022/dragdrop/drag-hint.service.mjs +7 -4
- package/esm2022/editing/add-command-tool.directive.mjs +12 -15
- package/esm2022/editing/cancel-command-tool.directive.mjs +64 -0
- package/esm2022/editing/edit-command-tool.directive.mjs +59 -0
- package/esm2022/editing/form/form-formfield.component.mjs +1 -1
- package/esm2022/editing/remove-command-tool.directive.mjs +60 -0
- package/esm2022/editing/remove-command.directive.mjs +1 -0
- package/esm2022/editing/save-command-tool.directive.mjs +64 -0
- package/esm2022/editing/toolbar-editing-tool-base.directive.mjs +94 -0
- package/esm2022/editing-directives/editing-directive-base.mjs +5 -2
- package/esm2022/editing-directives/external-editing.directive.mjs +28 -14
- package/esm2022/excel/excel-command-tool.directive.mjs +12 -17
- package/esm2022/filtering/cell/autocomplete-filter-cell.component.mjs +1 -1
- package/esm2022/filtering/cell/boolean-filter-cell.component.mjs +1 -1
- package/esm2022/filtering/cell/date-filter-cell.component.mjs +1 -1
- package/esm2022/filtering/cell/filter-cell-operators.component.mjs +1 -1
- package/esm2022/filtering/filter-input.directive.mjs +14 -2
- package/esm2022/filtering/menu/boolean-filter-menu.component.mjs +4 -2
- package/esm2022/filtering/menu/date-filter-menu-input.component.mjs +5 -1
- package/esm2022/filtering/menu/date-filter-menu.component.mjs +7 -1
- package/esm2022/filtering/menu/filter-menu-container.component.mjs +21 -10
- package/esm2022/filtering/menu/filter-menu-input-wrapper.component.mjs +27 -5
- package/esm2022/filtering/menu/filter-menu.component.mjs +44 -29
- package/esm2022/filtering/menu/numeric-filter-menu-input.component.mjs +2 -0
- package/esm2022/filtering/menu/numeric-filter-menu.component.mjs +7 -1
- package/esm2022/filtering/menu/string-filter-menu-input.component.mjs +2 -0
- package/esm2022/filtering/menu/string-filter-menu.component.mjs +11 -2
- package/esm2022/grid.component.mjs +358 -82
- package/esm2022/grid.module.mjs +114 -101
- package/esm2022/index.mjs +10 -1
- package/esm2022/localization/messages.mjs +104 -2
- package/esm2022/navigation/navigation.service.mjs +1 -1
- package/esm2022/navigation/toolbar-tool-name.mjs +17 -0
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/pdf/pdf-command-tool.directive.mjs +12 -15
- package/esm2022/rendering/cell.component.mjs +4 -4
- package/esm2022/rendering/header/header.component.mjs +1 -1
- package/esm2022/rendering/list.component.mjs +1 -1
- package/esm2022/rendering/table-body.component.mjs +11 -3
- package/esm2022/rendering/toolbar/tools/column-chooser-tool.directive.mjs +203 -0
- package/esm2022/rendering/toolbar/tools/filter-command-tool.directive.mjs +61 -34
- package/esm2022/rendering/toolbar/tools/filter-tool-wrapper.component.mjs +29 -8
- package/esm2022/rendering/toolbar/tools/filter-toolbar-tool.component.mjs +73 -8
- package/esm2022/rendering/toolbar/tools/sort-command-tool.directive.mjs +46 -20
- package/esm2022/rendering/toolbar/tools/sort-toolbar-tool.component.mjs +24 -8
- package/esm2022/row-reordering/row-reorder.service.mjs +15 -0
- package/esm2022/selection/selection.service.mjs +11 -0
- package/esm2022/state-management/grid-state.models.mjs +26 -0
- package/esm2022/state-management/redo-command-tool.mjs +66 -0
- package/esm2022/state-management/undo-command-tool.mjs +66 -0
- package/esm2022/state-management/undo-redo.directive.mjs +178 -0
- package/esm2022/state-management/undo-redo.service.mjs +22 -0
- package/esm2022/state-management/undo-redo.stack.mjs +232 -0
- package/esm2022/utils.mjs +13 -13
- package/excel/excel-command-tool.directive.d.ts +5 -5
- package/fesm2022/progress-kendo-angular-grid.mjs +4672 -1798
- package/filtering/filter-input.directive.d.ts +1 -0
- package/filtering/menu/date-filter-menu-input.component.d.ts +1 -1
- package/filtering/menu/filter-menu-container.component.d.ts +14 -4
- package/filtering/menu/filter-menu-input-wrapper.component.d.ts +8 -3
- package/filtering/menu/filter-menu.component.d.ts +6 -3
- package/filtering/menu/numeric-filter-menu-input.component.d.ts +1 -1
- package/filtering/menu/string-filter-menu-input.component.d.ts +1 -1
- package/filtering/menu/string-filter-menu.component.d.ts +1 -0
- package/grid.component.d.ts +86 -33
- package/grid.module.d.ts +107 -100
- package/index.d.ts +9 -1
- package/localization/messages.d.ts +70 -2
- package/navigation/toolbar-tool-name.d.ts +17 -0
- package/package.json +36 -20
- package/pdf/pdf-command-tool.directive.d.ts +6 -5
- package/rendering/cell.component.d.ts +1 -1
- package/{column-menu → rendering/toolbar/tools}/column-chooser-tool.directive.d.ts +17 -6
- package/rendering/toolbar/tools/filter-command-tool.directive.d.ts +9 -1
- package/rendering/toolbar/tools/filter-tool-wrapper.component.d.ts +6 -5
- package/rendering/toolbar/tools/filter-toolbar-tool.component.d.ts +11 -2
- package/rendering/toolbar/tools/sort-command-tool.directive.d.ts +9 -1
- package/rendering/toolbar/tools/sort-toolbar-tool.component.d.ts +5 -1
- package/row-reordering/row-reorder.service.d.ts +2 -0
- package/schematics/ngAdd/index.js +4 -4
- package/selection/selection.service.d.ts +1 -0
- package/state-management/grid-state.models.d.ts +58 -0
- package/state-management/redo-command-tool.d.ts +38 -0
- package/state-management/undo-command-tool.d.ts +38 -0
- package/state-management/undo-redo.directive.d.ts +51 -0
- package/state-management/undo-redo.service.d.ts +19 -0
- package/state-management/undo-redo.stack.d.ts +104 -0
- package/utils.d.ts +11 -5
- 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
|
-
}] } });
|