@progress/kendo-angular-grid 13.4.0-develop.9 → 13.4.1-develop.1
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/column-menu/column-chooser-item-checked.directive.d.ts +20 -0
- package/column-menu/column-chooser.component.d.ts +9 -1
- package/column-menu/column-list-kb-nav.service.d.ts +22 -0
- package/column-menu/column-list.component.d.ts +10 -2
- package/column-menu/column-menu-item.component.d.ts +2 -0
- package/column-menu/column-menu.component.d.ts +10 -4
- package/column-menu/column-menu.module.d.ts +22 -21
- package/common/error-messages.d.ts +1 -1
- package/esm2020/column-menu/column-chooser-item-checked.directive.mjs +36 -0
- package/esm2020/column-menu/column-chooser.component.mjs +63 -12
- package/esm2020/column-menu/column-list-kb-nav.service.mjs +38 -0
- package/esm2020/column-menu/column-list.component.mjs +137 -26
- package/esm2020/column-menu/column-menu-autosize-all.component.mjs +2 -2
- package/esm2020/column-menu/column-menu-autosize.component.mjs +2 -2
- package/esm2020/column-menu/column-menu-chooser.component.mjs +3 -1
- package/esm2020/column-menu/column-menu-item.component.mjs +10 -4
- package/esm2020/column-menu/column-menu.component.mjs +79 -37
- package/esm2020/column-menu/column-menu.module.mjs +6 -2
- package/esm2020/common/error-messages.mjs +1 -1
- package/esm2020/filtering/menu/filter-menu-container.component.mjs +2 -2
- package/esm2020/filtering/menu/filter-menu.component.mjs +52 -10
- package/esm2020/navigation/logical-cell.directive.mjs +1 -1
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/rendering/header/header.component.mjs +30 -20
- package/fesm2015/progress-kendo-angular-grid.mjs +402 -81
- package/fesm2020/progress-kendo-angular-grid.mjs +394 -80
- package/filtering/menu/filter-menu.component.d.ts +13 -4
- package/package.json +16 -16
- package/rendering/header/header.component.d.ts +4 -1
- package/schematics/ngAdd/index.js +3 -3
|
@@ -2,19 +2,25 @@
|
|
|
2
2
|
* Copyright © 2023 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 { Component, HostBinding, Input, ElementRef, NgZone, Renderer2, Output, EventEmitter, ViewChild } from '@angular/core';
|
|
6
|
-
import { hasClasses } from '../rendering/common/dom-queries';
|
|
5
|
+
import { Component, HostBinding, Input, ElementRef, NgZone, Renderer2, Output, EventEmitter, ViewChild, ViewChildren, QueryList } from '@angular/core';
|
|
7
6
|
import { ColumnMenuService } from './column-menu.service';
|
|
7
|
+
import { ColumnListKeyboardNavigation } from './column-list-kb-nav.service';
|
|
8
|
+
import { ColumnMenuChooserItemCheckedDirective } from './column-chooser-item-checked.directive';
|
|
9
|
+
import { Keys } from '@progress/kendo-angular-common';
|
|
10
|
+
import { Subscription } from 'rxjs';
|
|
8
11
|
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "
|
|
12
|
+
import * as i1 from "./column-list-kb-nav.service";
|
|
13
|
+
import * as i2 from "@angular/common";
|
|
14
|
+
import * as i3 from "./column-chooser-item-checked.directive";
|
|
10
15
|
/**
|
|
11
16
|
* @hidden
|
|
12
17
|
*/
|
|
13
18
|
export class ColumnListComponent {
|
|
14
|
-
constructor(element, ngZone, renderer) {
|
|
19
|
+
constructor(element, ngZone, renderer, listNavigationService) {
|
|
15
20
|
this.element = element;
|
|
16
21
|
this.ngZone = ngZone;
|
|
17
22
|
this.renderer = renderer;
|
|
23
|
+
this.listNavigationService = listNavigationService;
|
|
18
24
|
this.reset = new EventEmitter();
|
|
19
25
|
this.apply = new EventEmitter();
|
|
20
26
|
this.columnChange = new EventEmitter();
|
|
@@ -22,10 +28,28 @@ export class ColumnListComponent {
|
|
|
22
28
|
this.allowHideAll = false;
|
|
23
29
|
this.actionsClass = 'k-actions k-actions-stretched k-actions-horizontal';
|
|
24
30
|
this.unlockedCount = 0;
|
|
31
|
+
this.domSubscriptions = new Subscription();
|
|
32
|
+
this.onKeydown = (e) => {
|
|
33
|
+
if (e.keyCode !== Keys.Tab) {
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
}
|
|
36
|
+
if (e.keyCode === Keys.ArrowDown) {
|
|
37
|
+
this.listNavigationService.next();
|
|
38
|
+
}
|
|
39
|
+
else if (e.keyCode === Keys.ArrowUp) {
|
|
40
|
+
this.listNavigationService.prev();
|
|
41
|
+
}
|
|
42
|
+
else if (e.keyCode === Keys.Space && e.target.classList.contains('k-column-list-item')) {
|
|
43
|
+
this.listNavigationService.toggleCheckedState();
|
|
44
|
+
}
|
|
45
|
+
};
|
|
25
46
|
}
|
|
26
47
|
get className() {
|
|
27
48
|
return true;
|
|
28
49
|
}
|
|
50
|
+
isChecked(checkbox) {
|
|
51
|
+
return checkbox.checked;
|
|
52
|
+
}
|
|
29
53
|
set columns(value) {
|
|
30
54
|
this._columns = value.filter(column => column.includeInChooser !== false);
|
|
31
55
|
this.allColumns = value;
|
|
@@ -43,12 +67,21 @@ export class ColumnListComponent {
|
|
|
43
67
|
return;
|
|
44
68
|
}
|
|
45
69
|
this.ngZone.runOutsideAngular(() => {
|
|
46
|
-
this.domSubscriptions
|
|
47
|
-
|
|
70
|
+
this.domSubscriptions.add(this.renderer.listen(this.element.nativeElement, 'click', (e) => {
|
|
71
|
+
const closestItem = e.target.closest('.k-column-list-item');
|
|
72
|
+
if (closestItem) {
|
|
73
|
+
const checkbox = closestItem.querySelector('.k-checkbox');
|
|
74
|
+
const index = parseInt(checkbox.getAttribute('data-index'), 10);
|
|
75
|
+
if (e.target === checkbox) {
|
|
76
|
+
closestItem.focus();
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
e.preventDefault();
|
|
80
|
+
checkbox.checked = !checkbox.checked;
|
|
81
|
+
}
|
|
48
82
|
if (this.autoSync) {
|
|
49
|
-
const index = parseInt(e.target.getAttribute('data-index'), 10);
|
|
50
83
|
const column = this.columns[index];
|
|
51
|
-
const hidden = !
|
|
84
|
+
const hidden = !checkbox.checked;
|
|
52
85
|
if (Boolean(column.hidden) !== hidden) {
|
|
53
86
|
this.ngZone.run(() => {
|
|
54
87
|
column.hidden = hidden;
|
|
@@ -59,10 +92,20 @@ export class ColumnListComponent {
|
|
|
59
92
|
else {
|
|
60
93
|
this.updateDisabled();
|
|
61
94
|
}
|
|
95
|
+
if (index !== this.listNavigationService.activeIndex) {
|
|
96
|
+
this.listNavigationService.toggle(this.listNavigationService.activeIndex, false);
|
|
97
|
+
this.listNavigationService.activeIndex = index;
|
|
98
|
+
this.listNavigationService.toggle(index, true);
|
|
99
|
+
}
|
|
62
100
|
}
|
|
63
|
-
});
|
|
101
|
+
}));
|
|
102
|
+
this.domSubscriptions.add(this.renderer.listen(this.element.nativeElement, 'keydown', this.onKeydown));
|
|
64
103
|
});
|
|
65
104
|
}
|
|
105
|
+
ngAfterViewInit() {
|
|
106
|
+
this.listNavigationService.items = this.options.toArray();
|
|
107
|
+
this.listNavigationService.toggle(0, true);
|
|
108
|
+
}
|
|
66
109
|
ngOnChanges(changes) {
|
|
67
110
|
if (!this.service) {
|
|
68
111
|
return;
|
|
@@ -75,9 +118,7 @@ export class ColumnListComponent {
|
|
|
75
118
|
}
|
|
76
119
|
}
|
|
77
120
|
ngOnDestroy() {
|
|
78
|
-
|
|
79
|
-
this.domSubscriptions();
|
|
80
|
-
}
|
|
121
|
+
this.domSubscriptions.unsubscribe();
|
|
81
122
|
}
|
|
82
123
|
cancelChanges() {
|
|
83
124
|
this.forEachCheckBox((element, index) => {
|
|
@@ -105,6 +146,9 @@ export class ColumnListComponent {
|
|
|
105
146
|
if (this.service) {
|
|
106
147
|
this.service.menuTabbingService.firstFocusable.focus();
|
|
107
148
|
}
|
|
149
|
+
else {
|
|
150
|
+
this.listNavigationService.toggle(this.listNavigationService.activeIndex, true);
|
|
151
|
+
}
|
|
108
152
|
}
|
|
109
153
|
}
|
|
110
154
|
forEachCheckBox(callback) {
|
|
@@ -151,35 +195,94 @@ export class ColumnListComponent {
|
|
|
151
195
|
}
|
|
152
196
|
}
|
|
153
197
|
}
|
|
154
|
-
ColumnListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnListComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
155
|
-
ColumnListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ColumnListComponent, selector: "kendo-grid-columnlist", inputs: { columns: "columns", autoSync: "autoSync", allowHideAll: "allowHideAll", applyText: "applyText", resetText: "resetText", actionsClass: "actionsClass", isLast: "isLast", isExpanded: "isExpanded", service: "service" }, outputs: { reset: "reset", apply: "apply", columnChange: "columnChange" }, host: { properties: { "class.k-column-list-wrapper": "this.className" } }, viewQueries: [{ propertyName: "applyButton", first: true, predicate: ["applyButton"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
156
|
-
<div
|
|
157
|
-
|
|
158
|
-
|
|
198
|
+
ColumnListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnListComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i1.ColumnListKeyboardNavigation }], target: i0.ɵɵFactoryTarget.Component });
|
|
199
|
+
ColumnListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ColumnListComponent, selector: "kendo-grid-columnlist", inputs: { columns: "columns", autoSync: "autoSync", ariaLabel: "ariaLabel", allowHideAll: "allowHideAll", applyText: "applyText", resetText: "resetText", actionsClass: "actionsClass", isLast: "isLast", isExpanded: "isExpanded", service: "service" }, outputs: { reset: "reset", apply: "apply", columnChange: "columnChange" }, host: { properties: { "class.k-column-list-wrapper": "this.className" } }, providers: [ColumnListKeyboardNavigation], viewQueries: [{ propertyName: "resetButton", first: true, predicate: ["resetButton"], descendants: true }, { propertyName: "applyButton", first: true, predicate: ["applyButton"], descendants: true }, { propertyName: "options", predicate: ColumnMenuChooserItemCheckedDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
200
|
+
<div
|
|
201
|
+
class="k-column-list"
|
|
202
|
+
role="listbox"
|
|
203
|
+
aria-multiselectable="true"
|
|
204
|
+
[attr.aria-label]="ariaLabel">
|
|
205
|
+
<label
|
|
206
|
+
*ngFor="let column of columns; let index = index;"
|
|
207
|
+
class='k-column-list-item'
|
|
208
|
+
[kendoColumnMenuChooserItemChecked]="!column.hidden"
|
|
209
|
+
role="option">
|
|
210
|
+
<input
|
|
211
|
+
class="k-checkbox k-checkbox-md k-rounded-md"
|
|
212
|
+
type="checkbox"
|
|
213
|
+
[attr.data-index]="index"
|
|
214
|
+
[checked]="!column.hidden"
|
|
215
|
+
tabindex="-1"
|
|
216
|
+
[attr.aria-hidden]="true"
|
|
217
|
+
[disabled]="isDisabled(column)" />
|
|
218
|
+
<span class="k-checkbox-label">{{ column.displayTitle }}</span>
|
|
159
219
|
</label>
|
|
160
220
|
</div>
|
|
161
221
|
<div [ngClass]="actionsClass" *ngIf="!autoSync">
|
|
162
|
-
<button
|
|
163
|
-
|
|
222
|
+
<button
|
|
223
|
+
#applyButton
|
|
224
|
+
type="button"
|
|
225
|
+
class="k-button k-button-solid-primary k-button-solid k-button-md k-rounded-md k-button-rectangle"
|
|
226
|
+
(click)="applyChanges()"
|
|
227
|
+
(keydown.enter)="$event.preventDefault(); $event.stopPropagation; applyChanges();"
|
|
228
|
+
(keydown.space)="$event.preventDefault(); $event.stopPropagation; applyChanges();">{{ applyText }}</button>
|
|
229
|
+
<button
|
|
230
|
+
#resetButton
|
|
231
|
+
type="button"
|
|
232
|
+
(keydown.tab)="onTab($event)"
|
|
233
|
+
class="k-button k-button-solid-base k-button-solid k-button-md k-rounded-md k-button-rectangle"
|
|
234
|
+
(click)="cancelChanges()"
|
|
235
|
+
(keydown.enter)="$event.preventDefault(); $event.stopPropagation; cancelChanges();"
|
|
236
|
+
(keydown.space)="$event.preventDefault(); $event.stopPropagation; cancelChanges();">{{ resetText }}</button>
|
|
164
237
|
</div>
|
|
165
|
-
`, isInline: true, directives: [{ type:
|
|
238
|
+
`, isInline: true, directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.ColumnMenuChooserItemCheckedDirective, selector: "[kendoColumnMenuChooserItemChecked]", inputs: ["kendoColumnMenuChooserItemChecked"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
166
239
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnListComponent, decorators: [{
|
|
167
240
|
type: Component,
|
|
168
241
|
args: [{
|
|
169
242
|
selector: 'kendo-grid-columnlist',
|
|
243
|
+
providers: [ColumnListKeyboardNavigation],
|
|
170
244
|
template: `
|
|
171
|
-
<div
|
|
172
|
-
|
|
173
|
-
|
|
245
|
+
<div
|
|
246
|
+
class="k-column-list"
|
|
247
|
+
role="listbox"
|
|
248
|
+
aria-multiselectable="true"
|
|
249
|
+
[attr.aria-label]="ariaLabel">
|
|
250
|
+
<label
|
|
251
|
+
*ngFor="let column of columns; let index = index;"
|
|
252
|
+
class='k-column-list-item'
|
|
253
|
+
[kendoColumnMenuChooserItemChecked]="!column.hidden"
|
|
254
|
+
role="option">
|
|
255
|
+
<input
|
|
256
|
+
class="k-checkbox k-checkbox-md k-rounded-md"
|
|
257
|
+
type="checkbox"
|
|
258
|
+
[attr.data-index]="index"
|
|
259
|
+
[checked]="!column.hidden"
|
|
260
|
+
tabindex="-1"
|
|
261
|
+
[attr.aria-hidden]="true"
|
|
262
|
+
[disabled]="isDisabled(column)" />
|
|
263
|
+
<span class="k-checkbox-label">{{ column.displayTitle }}</span>
|
|
174
264
|
</label>
|
|
175
265
|
</div>
|
|
176
266
|
<div [ngClass]="actionsClass" *ngIf="!autoSync">
|
|
177
|
-
<button
|
|
178
|
-
|
|
267
|
+
<button
|
|
268
|
+
#applyButton
|
|
269
|
+
type="button"
|
|
270
|
+
class="k-button k-button-solid-primary k-button-solid k-button-md k-rounded-md k-button-rectangle"
|
|
271
|
+
(click)="applyChanges()"
|
|
272
|
+
(keydown.enter)="$event.preventDefault(); $event.stopPropagation; applyChanges();"
|
|
273
|
+
(keydown.space)="$event.preventDefault(); $event.stopPropagation; applyChanges();">{{ applyText }}</button>
|
|
274
|
+
<button
|
|
275
|
+
#resetButton
|
|
276
|
+
type="button"
|
|
277
|
+
(keydown.tab)="onTab($event)"
|
|
278
|
+
class="k-button k-button-solid-base k-button-solid k-button-md k-rounded-md k-button-rectangle"
|
|
279
|
+
(click)="cancelChanges()"
|
|
280
|
+
(keydown.enter)="$event.preventDefault(); $event.stopPropagation; cancelChanges();"
|
|
281
|
+
(keydown.space)="$event.preventDefault(); $event.stopPropagation; cancelChanges();">{{ resetText }}</button>
|
|
179
282
|
</div>
|
|
180
283
|
`
|
|
181
284
|
}]
|
|
182
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { className: [{
|
|
285
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i1.ColumnListKeyboardNavigation }]; }, propDecorators: { className: [{
|
|
183
286
|
type: HostBinding,
|
|
184
287
|
args: ["class.k-column-list-wrapper"]
|
|
185
288
|
}], reset: [{
|
|
@@ -192,6 +295,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
192
295
|
type: Input
|
|
193
296
|
}], autoSync: [{
|
|
194
297
|
type: Input
|
|
298
|
+
}], ariaLabel: [{
|
|
299
|
+
type: Input
|
|
195
300
|
}], allowHideAll: [{
|
|
196
301
|
type: Input
|
|
197
302
|
}], applyText: [{
|
|
@@ -206,7 +311,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
206
311
|
type: Input
|
|
207
312
|
}], service: [{
|
|
208
313
|
type: Input
|
|
314
|
+
}], resetButton: [{
|
|
315
|
+
type: ViewChild,
|
|
316
|
+
args: ['resetButton', { static: false }]
|
|
209
317
|
}], applyButton: [{
|
|
210
318
|
type: ViewChild,
|
|
211
319
|
args: ['applyButton', { static: false }]
|
|
320
|
+
}], options: [{
|
|
321
|
+
type: ViewChildren,
|
|
322
|
+
args: [ColumnMenuChooserItemCheckedDirective]
|
|
212
323
|
}] } });
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Component, isDevMode } from '@angular/core';
|
|
6
6
|
import { displayInlineFlexIcon } from '@progress/kendo-svg-icons';
|
|
7
|
-
import {
|
|
7
|
+
import { ColumnMenuErrorMessages } from '../common/error-messages';
|
|
8
8
|
import { ContextService } from '../common/provider.service';
|
|
9
9
|
import { ColumnMenuItemBase } from './column-menu-item-base';
|
|
10
10
|
import { autoSizeColumn } from './utils';
|
|
@@ -39,7 +39,7 @@ export class ColumnMenuAutoSizeAllColumnsComponent extends ColumnMenuItemBase {
|
|
|
39
39
|
ngOnInit() {
|
|
40
40
|
const isVirtualColumns = this.ctx.grid.columnMenuTemplate && this.ctx.grid.virtualColumns;
|
|
41
41
|
if (isVirtualColumns && isDevMode()) {
|
|
42
|
-
console.warn(
|
|
42
|
+
console.warn(ColumnMenuErrorMessages.autoSizeAllColumns);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Component, Input, isDevMode } from '@angular/core';
|
|
6
6
|
import { maxWidthIcon } from '@progress/kendo-svg-icons';
|
|
7
|
-
import {
|
|
7
|
+
import { ColumnMenuErrorMessages } from '../common/error-messages';
|
|
8
8
|
import { ContextService } from '../common/provider.service';
|
|
9
9
|
import { ColumnMenuItemBase } from './column-menu-item-base';
|
|
10
10
|
import { autoSizeColumn } from './utils';
|
|
@@ -40,7 +40,7 @@ export class ColumnMenuAutoSizeColumnComponent extends ColumnMenuItemBase {
|
|
|
40
40
|
ngOnInit() {
|
|
41
41
|
const isVirtualColumns = this.ctx.grid.columnMenuTemplate && this.ctx.grid.virtualColumns;
|
|
42
42
|
if (isVirtualColumns && isDevMode()) {
|
|
43
|
-
console.warn(
|
|
43
|
+
console.warn(ColumnMenuErrorMessages.autoSizeColumn);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
@@ -103,6 +103,7 @@ ColumnMenuChooserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
103
103
|
<kendo-grid-columnlist
|
|
104
104
|
[applyText]="ctx.localization.get('columnsApply')"
|
|
105
105
|
[resetText]="ctx.localization.get('columnsReset')"
|
|
106
|
+
[ariaLabel]="ctx.localization.get('columns')"
|
|
106
107
|
[columns]="columns"
|
|
107
108
|
[autoSync]="false"
|
|
108
109
|
[allowHideAll]="false"
|
|
@@ -114,7 +115,7 @@ ColumnMenuChooserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
114
115
|
</kendo-grid-columnlist>
|
|
115
116
|
</ng-template>
|
|
116
117
|
</kendo-grid-columnmenu-item>
|
|
117
|
-
`, isInline: true, components: [{ type: i3.ColumnMenuItemComponent, selector: "kendo-grid-columnmenu-item", inputs: ["icon", "svgIcon", "text", "selected", "disabled", "expanded"], outputs: ["itemClick", "expand", "collapse"] }, { type: i4.ColumnListComponent, selector: "kendo-grid-columnlist", inputs: ["columns", "autoSync", "allowHideAll", "applyText", "resetText", "actionsClass", "isLast", "isExpanded", "service"], outputs: ["reset", "apply", "columnChange"] }], directives: [{ type: i5.ColumnMenuItemContentTemplateDirective, selector: "[kendoGridColumnMenuItemContentTemplate]" }] });
|
|
118
|
+
`, isInline: true, components: [{ type: i3.ColumnMenuItemComponent, selector: "kendo-grid-columnmenu-item", inputs: ["icon", "svgIcon", "text", "selected", "disabled", "expanded"], outputs: ["itemClick", "expand", "collapse"] }, { type: i4.ColumnListComponent, selector: "kendo-grid-columnlist", inputs: ["columns", "autoSync", "ariaLabel", "allowHideAll", "applyText", "resetText", "actionsClass", "isLast", "isExpanded", "service"], outputs: ["reset", "apply", "columnChange"] }], directives: [{ type: i5.ColumnMenuItemContentTemplateDirective, selector: "[kendoGridColumnMenuItemContentTemplate]" }] });
|
|
118
119
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnMenuChooserComponent, decorators: [{
|
|
119
120
|
type: Component,
|
|
120
121
|
args: [{
|
|
@@ -131,6 +132,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
131
132
|
<kendo-grid-columnlist
|
|
132
133
|
[applyText]="ctx.localization.get('columnsApply')"
|
|
133
134
|
[resetText]="ctx.localization.get('columnsReset')"
|
|
135
|
+
[ariaLabel]="ctx.localization.get('columns')"
|
|
134
136
|
[columns]="columns"
|
|
135
137
|
[autoSync]="false"
|
|
136
138
|
[allowHideAll]="false"
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { Component, Input, Output, EventEmitter, ContentChild } from '@angular/core';
|
|
6
6
|
import { trigger, transition, style, animate, state } from '@angular/animations';
|
|
7
7
|
import { ColumnMenuItemContentTemplateDirective } from './column-menu-item-content-template.directive';
|
|
8
|
+
import { guid } from '@progress/kendo-angular-common';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
import * as i1 from "@progress/kendo-angular-icons";
|
|
10
11
|
import * as i2 from "@angular/common";
|
|
@@ -37,6 +38,9 @@ export class ColumnMenuItemComponent {
|
|
|
37
38
|
this.collapse = new EventEmitter();
|
|
38
39
|
this.contentState = 'collapsed';
|
|
39
40
|
}
|
|
41
|
+
ngAfterViewInit() {
|
|
42
|
+
this.contentTemplate && (this.contentId = `k-${guid()}`);
|
|
43
|
+
}
|
|
40
44
|
ngOnChanges(changes) {
|
|
41
45
|
if (changes.expanded) {
|
|
42
46
|
this.updateContentState();
|
|
@@ -71,13 +75,14 @@ ColumnMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
71
75
|
[class.k-selected]="selected"
|
|
72
76
|
[class.k-disabled]="disabled"
|
|
73
77
|
role="button"
|
|
74
|
-
[attr.aria-expanded]="expanded"
|
|
78
|
+
[attr.aria-expanded]="expanded"
|
|
79
|
+
[attr.aria-controls]="expanded ? contentId : undefined">
|
|
75
80
|
<kendo-icon-wrapper
|
|
76
81
|
[name]="icon"
|
|
77
82
|
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
78
83
|
{{ text }}
|
|
79
84
|
</div>
|
|
80
|
-
<div *ngIf="contentTemplate" [@state]="contentState" [style.overflow]="'hidden'" class="k-columnmenu-item-content">
|
|
85
|
+
<div *ngIf="contentTemplate" [attr.id]="contentId" [@state]="contentState" [style.overflow]="'hidden'" class="k-columnmenu-item-content">
|
|
81
86
|
<ng-container [ngTemplateOutlet]="contentTemplate.templateRef">
|
|
82
87
|
</ng-container>
|
|
83
88
|
<div>
|
|
@@ -139,13 +144,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
139
144
|
[class.k-selected]="selected"
|
|
140
145
|
[class.k-disabled]="disabled"
|
|
141
146
|
role="button"
|
|
142
|
-
[attr.aria-expanded]="expanded"
|
|
147
|
+
[attr.aria-expanded]="expanded"
|
|
148
|
+
[attr.aria-controls]="expanded ? contentId : undefined">
|
|
143
149
|
<kendo-icon-wrapper
|
|
144
150
|
[name]="icon"
|
|
145
151
|
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
146
152
|
{{ text }}
|
|
147
153
|
</div>
|
|
148
|
-
<div *ngIf="contentTemplate" [@state]="contentState" [style.overflow]="'hidden'" class="k-columnmenu-item-content">
|
|
154
|
+
<div *ngIf="contentTemplate" [attr.id]="contentId" [@state]="contentState" [style.overflow]="'hidden'" class="k-columnmenu-item-content">
|
|
149
155
|
<ng-container [ngTemplateOutlet]="contentTemplate.templateRef">
|
|
150
156
|
</ng-container>
|
|
151
157
|
<div>
|