@progress/kendo-angular-grid 13.4.0-develop.9 → 13.4.0
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
|
@@ -34,7 +34,7 @@ import * as i3$1 from '@progress/kendo-angular-inputs';
|
|
|
34
34
|
import { NumericTextBoxComponent, InputsModule, NumericTextBoxModule } from '@progress/kendo-angular-inputs';
|
|
35
35
|
import * as i4$3 from '@progress/kendo-angular-dateinputs';
|
|
36
36
|
import { DatePickerModule } from '@progress/kendo-angular-dateinputs';
|
|
37
|
-
import * as
|
|
37
|
+
import * as i17 from '@progress/kendo-angular-layout';
|
|
38
38
|
import { TabStripComponent, TabStripModule } from '@progress/kendo-angular-layout';
|
|
39
39
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
40
40
|
import { getter } from '@progress/kendo-common';
|
|
@@ -4442,8 +4442,8 @@ const packageMetadata = {
|
|
|
4442
4442
|
name: '@progress/kendo-angular-grid',
|
|
4443
4443
|
productName: 'Kendo UI for Angular',
|
|
4444
4444
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
4445
|
-
publishDate:
|
|
4446
|
-
version: '13.4.0
|
|
4445
|
+
publishDate: 1693305612,
|
|
4446
|
+
version: '13.4.0',
|
|
4447
4447
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
4448
4448
|
};
|
|
4449
4449
|
|
|
@@ -11097,10 +11097,10 @@ class FilterMenuContainerComponent {
|
|
|
11097
11097
|
e.preventDefault();
|
|
11098
11098
|
if (buttonType === 'reset') {
|
|
11099
11099
|
// eslint-disable-next-line no-unused-expressions
|
|
11100
|
-
this.
|
|
11100
|
+
this.menuTabbingService.firstFocusable.focus();
|
|
11101
11101
|
}
|
|
11102
11102
|
else {
|
|
11103
|
-
this.menuTabbingService.firstFocusable.focus();
|
|
11103
|
+
this.disabled ? this.menuTabbingService.firstFocusable.focus() : this.resetButton.nativeElement.focus();
|
|
11104
11104
|
}
|
|
11105
11105
|
}
|
|
11106
11106
|
}
|
|
@@ -11224,15 +11224,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
11224
11224
|
args: ['filterButton', { static: false }]
|
|
11225
11225
|
}] } });
|
|
11226
11226
|
|
|
11227
|
+
let id$3 = 0;
|
|
11228
|
+
const getId$1 = (gridId) => `${gridId}-filter-menu-${id$3++}`;
|
|
11227
11229
|
/**
|
|
11228
11230
|
* @hidden
|
|
11229
11231
|
*/
|
|
11230
11232
|
class FilterMenuComponent {
|
|
11231
|
-
constructor(filterService, popupService, ctx, navigationService) {
|
|
11233
|
+
constructor(filterService, popupService, ctx, navigationService, renderer, cdr, idService) {
|
|
11232
11234
|
this.filterService = filterService;
|
|
11233
11235
|
this.popupService = popupService;
|
|
11234
11236
|
this.ctx = ctx;
|
|
11235
11237
|
this.navigationService = navigationService;
|
|
11238
|
+
this.renderer = renderer;
|
|
11239
|
+
this.cdr = cdr;
|
|
11240
|
+
this.idService = idService;
|
|
11236
11241
|
this.filterIcon = filterIcon;
|
|
11237
11242
|
this.tabIndex = '-1';
|
|
11238
11243
|
}
|
|
@@ -11247,9 +11252,35 @@ class FilterMenuComponent {
|
|
|
11247
11252
|
const columnName = this.column.title || this.column.field;
|
|
11248
11253
|
return replaceMessagePlaceholder(localizationMsg, 'columnName', columnName);
|
|
11249
11254
|
}
|
|
11255
|
+
/**
|
|
11256
|
+
* @hidden
|
|
11257
|
+
*/
|
|
11258
|
+
get isNavigable() {
|
|
11259
|
+
return this.navigationService.tableEnabled;
|
|
11260
|
+
}
|
|
11250
11261
|
toggle(anchor, template) {
|
|
11251
11262
|
this.popupRef = this.popupService.open(anchor, template, this.popupRef);
|
|
11252
|
-
|
|
11263
|
+
// Needed as changes to 'popupRef' are not reflected
|
|
11264
|
+
// automatically when the Popup is closed by clicking outside the anchor
|
|
11265
|
+
const ariaRoot = this.isNavigable ? anchor.closest('.k-table-th') : anchor;
|
|
11266
|
+
if (this.popupRef) {
|
|
11267
|
+
this.popupRef.popup.instance.close.pipe(take(1)).subscribe(() => {
|
|
11268
|
+
this.popupRef = null;
|
|
11269
|
+
const ariaRoot = this.isNavigable ? anchor.closest('.k-table-th') : anchor;
|
|
11270
|
+
ariaRoot && this.renderer.removeAttribute(ariaRoot, 'aria-controls');
|
|
11271
|
+
ariaRoot && this.renderer.setAttribute(ariaRoot, 'aria-expanded', 'false');
|
|
11272
|
+
});
|
|
11273
|
+
const popupAriaElement = this.popupRef.popupElement.querySelector('.k-grid-filter-popup');
|
|
11274
|
+
if (popupAriaElement) {
|
|
11275
|
+
const popupId = getId$1(this.idService?.gridId());
|
|
11276
|
+
this.renderer.setAttribute(popupAriaElement, 'id', popupId);
|
|
11277
|
+
this.renderer.setAttribute(popupAriaElement, 'role', 'dialog');
|
|
11278
|
+
this.renderer.setAttribute(popupAriaElement, 'aria-label', this.filterLabel);
|
|
11279
|
+
ariaRoot && this.renderer.setAttribute(ariaRoot, 'aria-controls', popupId);
|
|
11280
|
+
ariaRoot && this.renderer.setAttribute(ariaRoot, 'aria-expanded', 'true');
|
|
11281
|
+
}
|
|
11282
|
+
}
|
|
11283
|
+
else {
|
|
11253
11284
|
if (this.navigationService.tableEnabled) {
|
|
11254
11285
|
this.navigationService.focusCell(0, this.column.leafIndex);
|
|
11255
11286
|
}
|
|
@@ -11261,6 +11292,8 @@ class FilterMenuComponent {
|
|
|
11261
11292
|
}
|
|
11262
11293
|
close() {
|
|
11263
11294
|
this.popupService.destroy();
|
|
11295
|
+
this.popupRef = null;
|
|
11296
|
+
this.cdr.markForCheck();
|
|
11264
11297
|
if (this.navigationService.tableEnabled) {
|
|
11265
11298
|
this.navigationService.focusCell(0, this.column.leafIndex);
|
|
11266
11299
|
}
|
|
@@ -11269,7 +11302,7 @@ class FilterMenuComponent {
|
|
|
11269
11302
|
}
|
|
11270
11303
|
}
|
|
11271
11304
|
}
|
|
11272
|
-
FilterMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FilterMenuComponent, deps: [{ token: FilterService }, { token: SinglePopupService }, { token: ContextService }, { token: NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11305
|
+
FilterMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FilterMenuComponent, deps: [{ token: FilterService }, { token: SinglePopupService }, { token: ContextService }, { token: NavigationService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: IdService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
11273
11306
|
FilterMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FilterMenuComponent, selector: "kendo-grid-filter-menu", inputs: { column: "column", filter: "filter", tabIndex: "tabIndex" }, viewQueries: [{ propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true, static: true }, { propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: `
|
|
11274
11307
|
<a #anchor
|
|
11275
11308
|
class="k-grid-filter-menu k-grid-header-menu"
|
|
@@ -11278,7 +11311,9 @@ FilterMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
11278
11311
|
(click)="toggle(anchor, template)"
|
|
11279
11312
|
(keydown.enter)="$event.stopImmediatePropagation()"
|
|
11280
11313
|
href="#"
|
|
11281
|
-
[attr.title]="filterLabel"
|
|
11314
|
+
[attr.title]="filterLabel"
|
|
11315
|
+
[attr.aria-haspopup]="isNavigable ? undefined : 'dialog'"
|
|
11316
|
+
[attr.aria-expanded]="isNavigable ? undefined : false">
|
|
11282
11317
|
<kendo-icon-wrapper
|
|
11283
11318
|
name="filter"
|
|
11284
11319
|
[svgIcon]="filterIcon"></kendo-icon-wrapper>
|
|
@@ -11306,7 +11341,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
11306
11341
|
(click)="toggle(anchor, template)"
|
|
11307
11342
|
(keydown.enter)="$event.stopImmediatePropagation()"
|
|
11308
11343
|
href="#"
|
|
11309
|
-
[attr.title]="filterLabel"
|
|
11344
|
+
[attr.title]="filterLabel"
|
|
11345
|
+
[attr.aria-haspopup]="isNavigable ? undefined : 'dialog'"
|
|
11346
|
+
[attr.aria-expanded]="isNavigable ? undefined : false">
|
|
11310
11347
|
<kendo-icon-wrapper
|
|
11311
11348
|
name="filter"
|
|
11312
11349
|
[svgIcon]="filterIcon"></kendo-icon-wrapper>
|
|
@@ -11323,7 +11360,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
11323
11360
|
</ng-template>
|
|
11324
11361
|
`
|
|
11325
11362
|
}]
|
|
11326
|
-
}], ctorParameters: function () { return [{ type: FilterService }, { type: SinglePopupService }, { type: ContextService }, { type: NavigationService }
|
|
11363
|
+
}], ctorParameters: function () { return [{ type: FilterService }, { type: SinglePopupService }, { type: ContextService }, { type: NavigationService }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: IdService, decorators: [{
|
|
11364
|
+
type: Optional
|
|
11365
|
+
}] }]; }, propDecorators: { column: [{
|
|
11327
11366
|
type: Input
|
|
11328
11367
|
}], filter: [{
|
|
11329
11368
|
type: Input
|
|
@@ -11381,7 +11420,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
11381
11420
|
/**
|
|
11382
11421
|
* @hidden
|
|
11383
11422
|
*/
|
|
11384
|
-
const
|
|
11423
|
+
const ColumnMenuErrorMessages = {
|
|
11385
11424
|
autoSizeColumn: 'The auto size column does not work with enabled virtual columns',
|
|
11386
11425
|
autoSizeAllColumns: 'The auto size all columns does not work with enabled virtual columns'
|
|
11387
11426
|
};
|
|
@@ -11487,6 +11526,9 @@ class ColumnMenuItemComponent {
|
|
|
11487
11526
|
this.collapse = new EventEmitter();
|
|
11488
11527
|
this.contentState = 'collapsed';
|
|
11489
11528
|
}
|
|
11529
|
+
ngAfterViewInit() {
|
|
11530
|
+
this.contentTemplate && (this.contentId = `k-${guid()}`);
|
|
11531
|
+
}
|
|
11490
11532
|
ngOnChanges(changes) {
|
|
11491
11533
|
if (changes.expanded) {
|
|
11492
11534
|
this.updateContentState();
|
|
@@ -11521,13 +11563,14 @@ ColumnMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
11521
11563
|
[class.k-selected]="selected"
|
|
11522
11564
|
[class.k-disabled]="disabled"
|
|
11523
11565
|
role="button"
|
|
11524
|
-
[attr.aria-expanded]="expanded"
|
|
11566
|
+
[attr.aria-expanded]="expanded"
|
|
11567
|
+
[attr.aria-controls]="expanded ? contentId : undefined">
|
|
11525
11568
|
<kendo-icon-wrapper
|
|
11526
11569
|
[name]="icon"
|
|
11527
11570
|
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
11528
11571
|
{{ text }}
|
|
11529
11572
|
</div>
|
|
11530
|
-
<div *ngIf="contentTemplate" [@state]="contentState" [style.overflow]="'hidden'" class="k-columnmenu-item-content">
|
|
11573
|
+
<div *ngIf="contentTemplate" [attr.id]="contentId" [@state]="contentState" [style.overflow]="'hidden'" class="k-columnmenu-item-content">
|
|
11531
11574
|
<ng-container [ngTemplateOutlet]="contentTemplate.templateRef">
|
|
11532
11575
|
</ng-container>
|
|
11533
11576
|
<div>
|
|
@@ -11589,13 +11632,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
11589
11632
|
[class.k-selected]="selected"
|
|
11590
11633
|
[class.k-disabled]="disabled"
|
|
11591
11634
|
role="button"
|
|
11592
|
-
[attr.aria-expanded]="expanded"
|
|
11635
|
+
[attr.aria-expanded]="expanded"
|
|
11636
|
+
[attr.aria-controls]="expanded ? contentId : undefined">
|
|
11593
11637
|
<kendo-icon-wrapper
|
|
11594
11638
|
[name]="icon"
|
|
11595
11639
|
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
11596
11640
|
{{ text }}
|
|
11597
11641
|
</div>
|
|
11598
|
-
<div *ngIf="contentTemplate" [@state]="contentState" [style.overflow]="'hidden'" class="k-columnmenu-item-content">
|
|
11642
|
+
<div *ngIf="contentTemplate" [attr.id]="contentId" [@state]="contentState" [style.overflow]="'hidden'" class="k-columnmenu-item-content">
|
|
11599
11643
|
<ng-container [ngTemplateOutlet]="contentTemplate.templateRef">
|
|
11600
11644
|
</ng-container>
|
|
11601
11645
|
<div>
|
|
@@ -11971,14 +12015,78 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
11971
12015
|
type: Input
|
|
11972
12016
|
}] } });
|
|
11973
12017
|
|
|
12018
|
+
/**
|
|
12019
|
+
* @hidden
|
|
12020
|
+
*/
|
|
12021
|
+
class ColumnListKeyboardNavigation {
|
|
12022
|
+
constructor(renderer) {
|
|
12023
|
+
this.renderer = renderer;
|
|
12024
|
+
this.activeIndex = 0;
|
|
12025
|
+
}
|
|
12026
|
+
next() {
|
|
12027
|
+
this.toggle(this.activeIndex, false);
|
|
12028
|
+
this.activeIndex = Math.min(this.activeIndex + 1, this.items.length - 1);
|
|
12029
|
+
this.toggle(this.activeIndex, true);
|
|
12030
|
+
}
|
|
12031
|
+
prev() {
|
|
12032
|
+
this.toggle(this.activeIndex, false);
|
|
12033
|
+
this.activeIndex = Math.max(this.activeIndex - 1, 0);
|
|
12034
|
+
this.toggle(this.activeIndex, true);
|
|
12035
|
+
}
|
|
12036
|
+
toggle(index, active) {
|
|
12037
|
+
const element = this.items[index]?.host.nativeElement;
|
|
12038
|
+
element && this.renderer.setAttribute(this.items[index].host.nativeElement, 'tabindex', active ? '0' : '-1');
|
|
12039
|
+
active && element && element.focus();
|
|
12040
|
+
}
|
|
12041
|
+
toggleCheckedState() {
|
|
12042
|
+
this.items[this.activeIndex].host.nativeElement.firstElementChild.click();
|
|
12043
|
+
}
|
|
12044
|
+
}
|
|
12045
|
+
ColumnListKeyboardNavigation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnListKeyboardNavigation, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
12046
|
+
ColumnListKeyboardNavigation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnListKeyboardNavigation });
|
|
12047
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnListKeyboardNavigation, decorators: [{
|
|
12048
|
+
type: Injectable
|
|
12049
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }]; } });
|
|
12050
|
+
|
|
12051
|
+
/**
|
|
12052
|
+
* @hidden
|
|
12053
|
+
*/
|
|
12054
|
+
class ColumnMenuChooserItemCheckedDirective {
|
|
12055
|
+
constructor(host, renderer) {
|
|
12056
|
+
this.host = host;
|
|
12057
|
+
this.renderer = renderer;
|
|
12058
|
+
this.checkedChangeSub = new Subscription();
|
|
12059
|
+
}
|
|
12060
|
+
ngAfterViewInit() {
|
|
12061
|
+
this.checkedChangeSub.add(this.renderer.listen(this.host.nativeElement.firstElementChild, 'change', (e) => {
|
|
12062
|
+
this.kendoColumnMenuChooserItemChecked = e.target.checked;
|
|
12063
|
+
}));
|
|
12064
|
+
}
|
|
12065
|
+
ngOnDestroy() {
|
|
12066
|
+
this.checkedChangeSub.unsubscribe();
|
|
12067
|
+
}
|
|
12068
|
+
}
|
|
12069
|
+
ColumnMenuChooserItemCheckedDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnMenuChooserItemCheckedDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
12070
|
+
ColumnMenuChooserItemCheckedDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: ColumnMenuChooserItemCheckedDirective, selector: "[kendoColumnMenuChooserItemChecked]", inputs: { kendoColumnMenuChooserItemChecked: "kendoColumnMenuChooserItemChecked" }, host: { properties: { "attr.aria-checked": "this.kendoColumnMenuChooserItemChecked" } }, ngImport: i0 });
|
|
12071
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnMenuChooserItemCheckedDirective, decorators: [{
|
|
12072
|
+
type: Directive,
|
|
12073
|
+
args: [{ selector: '[kendoColumnMenuChooserItemChecked]' }]
|
|
12074
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { kendoColumnMenuChooserItemChecked: [{
|
|
12075
|
+
type: HostBinding,
|
|
12076
|
+
args: ['attr.aria-checked']
|
|
12077
|
+
}, {
|
|
12078
|
+
type: Input
|
|
12079
|
+
}] } });
|
|
12080
|
+
|
|
11974
12081
|
/**
|
|
11975
12082
|
* @hidden
|
|
11976
12083
|
*/
|
|
11977
12084
|
class ColumnListComponent {
|
|
11978
|
-
constructor(element, ngZone, renderer) {
|
|
12085
|
+
constructor(element, ngZone, renderer, listNavigationService) {
|
|
11979
12086
|
this.element = element;
|
|
11980
12087
|
this.ngZone = ngZone;
|
|
11981
12088
|
this.renderer = renderer;
|
|
12089
|
+
this.listNavigationService = listNavigationService;
|
|
11982
12090
|
this.reset = new EventEmitter();
|
|
11983
12091
|
this.apply = new EventEmitter();
|
|
11984
12092
|
this.columnChange = new EventEmitter();
|
|
@@ -11986,10 +12094,28 @@ class ColumnListComponent {
|
|
|
11986
12094
|
this.allowHideAll = false;
|
|
11987
12095
|
this.actionsClass = 'k-actions k-actions-stretched k-actions-horizontal';
|
|
11988
12096
|
this.unlockedCount = 0;
|
|
12097
|
+
this.domSubscriptions = new Subscription();
|
|
12098
|
+
this.onKeydown = (e) => {
|
|
12099
|
+
if (e.keyCode !== Keys.Tab) {
|
|
12100
|
+
e.preventDefault();
|
|
12101
|
+
}
|
|
12102
|
+
if (e.keyCode === Keys.ArrowDown) {
|
|
12103
|
+
this.listNavigationService.next();
|
|
12104
|
+
}
|
|
12105
|
+
else if (e.keyCode === Keys.ArrowUp) {
|
|
12106
|
+
this.listNavigationService.prev();
|
|
12107
|
+
}
|
|
12108
|
+
else if (e.keyCode === Keys.Space && e.target.classList.contains('k-column-list-item')) {
|
|
12109
|
+
this.listNavigationService.toggleCheckedState();
|
|
12110
|
+
}
|
|
12111
|
+
};
|
|
11989
12112
|
}
|
|
11990
12113
|
get className() {
|
|
11991
12114
|
return true;
|
|
11992
12115
|
}
|
|
12116
|
+
isChecked(checkbox) {
|
|
12117
|
+
return checkbox.checked;
|
|
12118
|
+
}
|
|
11993
12119
|
set columns(value) {
|
|
11994
12120
|
this._columns = value.filter(column => column.includeInChooser !== false);
|
|
11995
12121
|
this.allColumns = value;
|
|
@@ -12007,12 +12133,21 @@ class ColumnListComponent {
|
|
|
12007
12133
|
return;
|
|
12008
12134
|
}
|
|
12009
12135
|
this.ngZone.runOutsideAngular(() => {
|
|
12010
|
-
this.domSubscriptions
|
|
12011
|
-
|
|
12136
|
+
this.domSubscriptions.add(this.renderer.listen(this.element.nativeElement, 'click', (e) => {
|
|
12137
|
+
const closestItem = e.target.closest('.k-column-list-item');
|
|
12138
|
+
if (closestItem) {
|
|
12139
|
+
const checkbox = closestItem.querySelector('.k-checkbox');
|
|
12140
|
+
const index = parseInt(checkbox.getAttribute('data-index'), 10);
|
|
12141
|
+
if (e.target === checkbox) {
|
|
12142
|
+
closestItem.focus();
|
|
12143
|
+
}
|
|
12144
|
+
else {
|
|
12145
|
+
e.preventDefault();
|
|
12146
|
+
checkbox.checked = !checkbox.checked;
|
|
12147
|
+
}
|
|
12012
12148
|
if (this.autoSync) {
|
|
12013
|
-
const index = parseInt(e.target.getAttribute('data-index'), 10);
|
|
12014
12149
|
const column = this.columns[index];
|
|
12015
|
-
const hidden = !
|
|
12150
|
+
const hidden = !checkbox.checked;
|
|
12016
12151
|
if (Boolean(column.hidden) !== hidden) {
|
|
12017
12152
|
this.ngZone.run(() => {
|
|
12018
12153
|
column.hidden = hidden;
|
|
@@ -12023,10 +12158,20 @@ class ColumnListComponent {
|
|
|
12023
12158
|
else {
|
|
12024
12159
|
this.updateDisabled();
|
|
12025
12160
|
}
|
|
12161
|
+
if (index !== this.listNavigationService.activeIndex) {
|
|
12162
|
+
this.listNavigationService.toggle(this.listNavigationService.activeIndex, false);
|
|
12163
|
+
this.listNavigationService.activeIndex = index;
|
|
12164
|
+
this.listNavigationService.toggle(index, true);
|
|
12165
|
+
}
|
|
12026
12166
|
}
|
|
12027
|
-
});
|
|
12167
|
+
}));
|
|
12168
|
+
this.domSubscriptions.add(this.renderer.listen(this.element.nativeElement, 'keydown', this.onKeydown));
|
|
12028
12169
|
});
|
|
12029
12170
|
}
|
|
12171
|
+
ngAfterViewInit() {
|
|
12172
|
+
this.listNavigationService.items = this.options.toArray();
|
|
12173
|
+
this.listNavigationService.toggle(0, true);
|
|
12174
|
+
}
|
|
12030
12175
|
ngOnChanges(changes) {
|
|
12031
12176
|
if (!this.service) {
|
|
12032
12177
|
return;
|
|
@@ -12039,9 +12184,7 @@ class ColumnListComponent {
|
|
|
12039
12184
|
}
|
|
12040
12185
|
}
|
|
12041
12186
|
ngOnDestroy() {
|
|
12042
|
-
|
|
12043
|
-
this.domSubscriptions();
|
|
12044
|
-
}
|
|
12187
|
+
this.domSubscriptions.unsubscribe();
|
|
12045
12188
|
}
|
|
12046
12189
|
cancelChanges() {
|
|
12047
12190
|
this.forEachCheckBox((element, index) => {
|
|
@@ -12069,6 +12212,9 @@ class ColumnListComponent {
|
|
|
12069
12212
|
if (this.service) {
|
|
12070
12213
|
this.service.menuTabbingService.firstFocusable.focus();
|
|
12071
12214
|
}
|
|
12215
|
+
else {
|
|
12216
|
+
this.listNavigationService.toggle(this.listNavigationService.activeIndex, true);
|
|
12217
|
+
}
|
|
12072
12218
|
}
|
|
12073
12219
|
}
|
|
12074
12220
|
forEachCheckBox(callback) {
|
|
@@ -12115,35 +12261,94 @@ class ColumnListComponent {
|
|
|
12115
12261
|
}
|
|
12116
12262
|
}
|
|
12117
12263
|
}
|
|
12118
|
-
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 });
|
|
12119
|
-
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: `
|
|
12120
|
-
<div
|
|
12121
|
-
|
|
12122
|
-
|
|
12264
|
+
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: ColumnListKeyboardNavigation }], target: i0.ɵɵFactoryTarget.Component });
|
|
12265
|
+
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: `
|
|
12266
|
+
<div
|
|
12267
|
+
class="k-column-list"
|
|
12268
|
+
role="listbox"
|
|
12269
|
+
aria-multiselectable="true"
|
|
12270
|
+
[attr.aria-label]="ariaLabel">
|
|
12271
|
+
<label
|
|
12272
|
+
*ngFor="let column of columns; let index = index;"
|
|
12273
|
+
class='k-column-list-item'
|
|
12274
|
+
[kendoColumnMenuChooserItemChecked]="!column.hidden"
|
|
12275
|
+
role="option">
|
|
12276
|
+
<input
|
|
12277
|
+
class="k-checkbox k-checkbox-md k-rounded-md"
|
|
12278
|
+
type="checkbox"
|
|
12279
|
+
[attr.data-index]="index"
|
|
12280
|
+
[checked]="!column.hidden"
|
|
12281
|
+
tabindex="-1"
|
|
12282
|
+
[attr.aria-hidden]="true"
|
|
12283
|
+
[disabled]="isDisabled(column)" />
|
|
12284
|
+
<span class="k-checkbox-label">{{ column.displayTitle }}</span>
|
|
12123
12285
|
</label>
|
|
12124
12286
|
</div>
|
|
12125
12287
|
<div [ngClass]="actionsClass" *ngIf="!autoSync">
|
|
12126
|
-
<button
|
|
12127
|
-
|
|
12288
|
+
<button
|
|
12289
|
+
#applyButton
|
|
12290
|
+
type="button"
|
|
12291
|
+
class="k-button k-button-solid-primary k-button-solid k-button-md k-rounded-md k-button-rectangle"
|
|
12292
|
+
(click)="applyChanges()"
|
|
12293
|
+
(keydown.enter)="$event.preventDefault(); $event.stopPropagation; applyChanges();"
|
|
12294
|
+
(keydown.space)="$event.preventDefault(); $event.stopPropagation; applyChanges();">{{ applyText }}</button>
|
|
12295
|
+
<button
|
|
12296
|
+
#resetButton
|
|
12297
|
+
type="button"
|
|
12298
|
+
(keydown.tab)="onTab($event)"
|
|
12299
|
+
class="k-button k-button-solid-base k-button-solid k-button-md k-rounded-md k-button-rectangle"
|
|
12300
|
+
(click)="cancelChanges()"
|
|
12301
|
+
(keydown.enter)="$event.preventDefault(); $event.stopPropagation; cancelChanges();"
|
|
12302
|
+
(keydown.space)="$event.preventDefault(); $event.stopPropagation; cancelChanges();">{{ resetText }}</button>
|
|
12128
12303
|
</div>
|
|
12129
|
-
`, isInline: true, directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
12304
|
+
`, isInline: true, directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: ColumnMenuChooserItemCheckedDirective, selector: "[kendoColumnMenuChooserItemChecked]", inputs: ["kendoColumnMenuChooserItemChecked"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
12130
12305
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnListComponent, decorators: [{
|
|
12131
12306
|
type: Component,
|
|
12132
12307
|
args: [{
|
|
12133
12308
|
selector: 'kendo-grid-columnlist',
|
|
12309
|
+
providers: [ColumnListKeyboardNavigation],
|
|
12134
12310
|
template: `
|
|
12135
|
-
<div
|
|
12136
|
-
|
|
12137
|
-
|
|
12311
|
+
<div
|
|
12312
|
+
class="k-column-list"
|
|
12313
|
+
role="listbox"
|
|
12314
|
+
aria-multiselectable="true"
|
|
12315
|
+
[attr.aria-label]="ariaLabel">
|
|
12316
|
+
<label
|
|
12317
|
+
*ngFor="let column of columns; let index = index;"
|
|
12318
|
+
class='k-column-list-item'
|
|
12319
|
+
[kendoColumnMenuChooserItemChecked]="!column.hidden"
|
|
12320
|
+
role="option">
|
|
12321
|
+
<input
|
|
12322
|
+
class="k-checkbox k-checkbox-md k-rounded-md"
|
|
12323
|
+
type="checkbox"
|
|
12324
|
+
[attr.data-index]="index"
|
|
12325
|
+
[checked]="!column.hidden"
|
|
12326
|
+
tabindex="-1"
|
|
12327
|
+
[attr.aria-hidden]="true"
|
|
12328
|
+
[disabled]="isDisabled(column)" />
|
|
12329
|
+
<span class="k-checkbox-label">{{ column.displayTitle }}</span>
|
|
12138
12330
|
</label>
|
|
12139
12331
|
</div>
|
|
12140
12332
|
<div [ngClass]="actionsClass" *ngIf="!autoSync">
|
|
12141
|
-
<button
|
|
12142
|
-
|
|
12333
|
+
<button
|
|
12334
|
+
#applyButton
|
|
12335
|
+
type="button"
|
|
12336
|
+
class="k-button k-button-solid-primary k-button-solid k-button-md k-rounded-md k-button-rectangle"
|
|
12337
|
+
(click)="applyChanges()"
|
|
12338
|
+
(keydown.enter)="$event.preventDefault(); $event.stopPropagation; applyChanges();"
|
|
12339
|
+
(keydown.space)="$event.preventDefault(); $event.stopPropagation; applyChanges();">{{ applyText }}</button>
|
|
12340
|
+
<button
|
|
12341
|
+
#resetButton
|
|
12342
|
+
type="button"
|
|
12343
|
+
(keydown.tab)="onTab($event)"
|
|
12344
|
+
class="k-button k-button-solid-base k-button-solid k-button-md k-rounded-md k-button-rectangle"
|
|
12345
|
+
(click)="cancelChanges()"
|
|
12346
|
+
(keydown.enter)="$event.preventDefault(); $event.stopPropagation; cancelChanges();"
|
|
12347
|
+
(keydown.space)="$event.preventDefault(); $event.stopPropagation; cancelChanges();">{{ resetText }}</button>
|
|
12143
12348
|
</div>
|
|
12144
12349
|
`
|
|
12145
12350
|
}]
|
|
12146
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { className: [{
|
|
12351
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: ColumnListKeyboardNavigation }]; }, propDecorators: { className: [{
|
|
12147
12352
|
type: HostBinding,
|
|
12148
12353
|
args: ["class.k-column-list-wrapper"]
|
|
12149
12354
|
}], reset: [{
|
|
@@ -12156,6 +12361,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
12156
12361
|
type: Input
|
|
12157
12362
|
}], autoSync: [{
|
|
12158
12363
|
type: Input
|
|
12364
|
+
}], ariaLabel: [{
|
|
12365
|
+
type: Input
|
|
12159
12366
|
}], allowHideAll: [{
|
|
12160
12367
|
type: Input
|
|
12161
12368
|
}], applyText: [{
|
|
@@ -12170,9 +12377,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
12170
12377
|
type: Input
|
|
12171
12378
|
}], service: [{
|
|
12172
12379
|
type: Input
|
|
12380
|
+
}], resetButton: [{
|
|
12381
|
+
type: ViewChild,
|
|
12382
|
+
args: ['resetButton', { static: false }]
|
|
12173
12383
|
}], applyButton: [{
|
|
12174
12384
|
type: ViewChild,
|
|
12175
12385
|
args: ['applyButton', { static: false }]
|
|
12386
|
+
}], options: [{
|
|
12387
|
+
type: ViewChildren,
|
|
12388
|
+
args: [ColumnMenuChooserItemCheckedDirective]
|
|
12176
12389
|
}] } });
|
|
12177
12390
|
|
|
12178
12391
|
/**
|
|
@@ -12265,6 +12478,7 @@ ColumnMenuChooserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
12265
12478
|
<kendo-grid-columnlist
|
|
12266
12479
|
[applyText]="ctx.localization.get('columnsApply')"
|
|
12267
12480
|
[resetText]="ctx.localization.get('columnsReset')"
|
|
12481
|
+
[ariaLabel]="ctx.localization.get('columns')"
|
|
12268
12482
|
[columns]="columns"
|
|
12269
12483
|
[autoSync]="false"
|
|
12270
12484
|
[allowHideAll]="false"
|
|
@@ -12276,7 +12490,7 @@ ColumnMenuChooserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
12276
12490
|
</kendo-grid-columnlist>
|
|
12277
12491
|
</ng-template>
|
|
12278
12492
|
</kendo-grid-columnmenu-item>
|
|
12279
|
-
`, isInline: true, components: [{ type: ColumnMenuItemComponent, selector: "kendo-grid-columnmenu-item", inputs: ["icon", "svgIcon", "text", "selected", "disabled", "expanded"], outputs: ["itemClick", "expand", "collapse"] }, { type: ColumnListComponent, selector: "kendo-grid-columnlist", inputs: ["columns", "autoSync", "allowHideAll", "applyText", "resetText", "actionsClass", "isLast", "isExpanded", "service"], outputs: ["reset", "apply", "columnChange"] }], directives: [{ type: ColumnMenuItemContentTemplateDirective, selector: "[kendoGridColumnMenuItemContentTemplate]" }] });
|
|
12493
|
+
`, isInline: true, components: [{ type: ColumnMenuItemComponent, selector: "kendo-grid-columnmenu-item", inputs: ["icon", "svgIcon", "text", "selected", "disabled", "expanded"], outputs: ["itemClick", "expand", "collapse"] }, { type: ColumnListComponent, selector: "kendo-grid-columnlist", inputs: ["columns", "autoSync", "ariaLabel", "allowHideAll", "applyText", "resetText", "actionsClass", "isLast", "isExpanded", "service"], outputs: ["reset", "apply", "columnChange"] }], directives: [{ type: ColumnMenuItemContentTemplateDirective, selector: "[kendoGridColumnMenuItemContentTemplate]" }] });
|
|
12280
12494
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnMenuChooserComponent, decorators: [{
|
|
12281
12495
|
type: Component,
|
|
12282
12496
|
args: [{
|
|
@@ -12293,6 +12507,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
12293
12507
|
<kendo-grid-columnlist
|
|
12294
12508
|
[applyText]="ctx.localization.get('columnsApply')"
|
|
12295
12509
|
[resetText]="ctx.localization.get('columnsReset')"
|
|
12510
|
+
[ariaLabel]="ctx.localization.get('columns')"
|
|
12296
12511
|
[columns]="columns"
|
|
12297
12512
|
[autoSync]="false"
|
|
12298
12513
|
[allowHideAll]="false"
|
|
@@ -12696,7 +12911,7 @@ class ColumnMenuAutoSizeColumnComponent extends ColumnMenuItemBase {
|
|
|
12696
12911
|
ngOnInit() {
|
|
12697
12912
|
const isVirtualColumns = this.ctx.grid.columnMenuTemplate && this.ctx.grid.virtualColumns;
|
|
12698
12913
|
if (isVirtualColumns && isDevMode()) {
|
|
12699
|
-
console.warn(
|
|
12914
|
+
console.warn(ColumnMenuErrorMessages.autoSizeColumn);
|
|
12700
12915
|
}
|
|
12701
12916
|
}
|
|
12702
12917
|
/**
|
|
@@ -12763,7 +12978,7 @@ class ColumnMenuAutoSizeAllColumnsComponent extends ColumnMenuItemBase {
|
|
|
12763
12978
|
ngOnInit() {
|
|
12764
12979
|
const isVirtualColumns = this.ctx.grid.columnMenuTemplate && this.ctx.grid.virtualColumns;
|
|
12765
12980
|
if (isVirtualColumns && isDevMode()) {
|
|
12766
|
-
console.warn(
|
|
12981
|
+
console.warn(ColumnMenuErrorMessages.autoSizeAllColumns);
|
|
12767
12982
|
}
|
|
12768
12983
|
}
|
|
12769
12984
|
/**
|
|
@@ -12800,6 +13015,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
12800
13015
|
}], ctorParameters: function () { return [{ type: ContextService }]; } });
|
|
12801
13016
|
|
|
12802
13017
|
const POPUP_CLASS = 'k-grid-columnmenu-popup';
|
|
13018
|
+
let id$2 = 0;
|
|
13019
|
+
const getId = (gridId) => `${gridId}-column-menu-${id$2++}`;
|
|
12803
13020
|
/**
|
|
12804
13021
|
* Represents the [column menu](slug:columnmenu_grid#toc-customizing-the-position) component.
|
|
12805
13022
|
*
|
|
@@ -12812,7 +13029,7 @@ const POPUP_CLASS = 'k-grid-columnmenu-popup';
|
|
|
12812
13029
|
* </kendo-grid>
|
|
12813
13030
|
*/
|
|
12814
13031
|
class ColumnMenuComponent {
|
|
12815
|
-
constructor(navigationService, popupService, service, ctx, renderer, cdr, columnInfoService) {
|
|
13032
|
+
constructor(navigationService, popupService, service, ctx, renderer, cdr, columnInfoService, idService) {
|
|
12816
13033
|
this.navigationService = navigationService;
|
|
12817
13034
|
this.popupService = popupService;
|
|
12818
13035
|
this.service = service;
|
|
@@ -12820,6 +13037,7 @@ class ColumnMenuComponent {
|
|
|
12820
13037
|
this.renderer = renderer;
|
|
12821
13038
|
this.cdr = cdr;
|
|
12822
13039
|
this.columnInfoService = columnInfoService;
|
|
13040
|
+
this.idService = idService;
|
|
12823
13041
|
/**
|
|
12824
13042
|
* @hidden
|
|
12825
13043
|
*/
|
|
@@ -12865,7 +13083,7 @@ class ColumnMenuComponent {
|
|
|
12865
13083
|
*/
|
|
12866
13084
|
this.expandedPosition = false;
|
|
12867
13085
|
this.moreVerticalIcon = moreVerticalIcon;
|
|
12868
|
-
this.closeSubscription = service.closeMenu.subscribe(this.close.bind(this));
|
|
13086
|
+
this.closeSubscription = service.closeMenu.subscribe(this.close.bind(this, true));
|
|
12869
13087
|
}
|
|
12870
13088
|
/**
|
|
12871
13089
|
* @hidden
|
|
@@ -12891,6 +13109,12 @@ class ColumnMenuComponent {
|
|
|
12891
13109
|
get hasFilter() {
|
|
12892
13110
|
return hasFilter(this.settings, this.column);
|
|
12893
13111
|
}
|
|
13112
|
+
/**
|
|
13113
|
+
* @hidden
|
|
13114
|
+
*/
|
|
13115
|
+
get isNavigable() {
|
|
13116
|
+
return this.navigationService.tableEnabled;
|
|
13117
|
+
}
|
|
12894
13118
|
/**
|
|
12895
13119
|
* @hidden
|
|
12896
13120
|
*/
|
|
@@ -12907,7 +13131,7 @@ class ColumnMenuComponent {
|
|
|
12907
13131
|
* @hidden
|
|
12908
13132
|
*/
|
|
12909
13133
|
onApply(changed) {
|
|
12910
|
-
this.close();
|
|
13134
|
+
this.close(true);
|
|
12911
13135
|
if (changed.length) {
|
|
12912
13136
|
this.cdr.markForCheck();
|
|
12913
13137
|
this.columnInfoService.changeVisibility(changed);
|
|
@@ -12953,11 +13177,11 @@ class ColumnMenuComponent {
|
|
|
12953
13177
|
if (this.ctx.grid.virtualColumns && isDevMode()) {
|
|
12954
13178
|
if (this.settings.autoSizeAllColumns) {
|
|
12955
13179
|
this.settings.autoSizeAllColumns = false;
|
|
12956
|
-
console.warn(
|
|
13180
|
+
console.warn(ColumnMenuErrorMessages.autoSizeAllColumns);
|
|
12957
13181
|
}
|
|
12958
13182
|
if (this.settings.autoSizeColumn) {
|
|
12959
13183
|
this.settings.autoSizeColumn = false;
|
|
12960
|
-
console.warn(
|
|
13184
|
+
console.warn(ColumnMenuErrorMessages.autoSizeColumn);
|
|
12961
13185
|
}
|
|
12962
13186
|
}
|
|
12963
13187
|
this.service.menuTabbingService.isTabbedInterface = this.settings.view === 'tabbed' ? true : false;
|
|
@@ -12984,12 +13208,32 @@ class ColumnMenuComponent {
|
|
|
12984
13208
|
this.expandedColumns = this.getExpandedState(this.settings.columnChooser);
|
|
12985
13209
|
this.expandedPosition = this.getExpandedState(this.settings.setColumnPosition);
|
|
12986
13210
|
this.popupRef = this.popupService.open(anchor, template, this.popupRef, POPUP_CLASS);
|
|
12987
|
-
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
|
|
13211
|
+
// Needed as changes to 'popupRef' and 'popupId' are not reflected
|
|
13212
|
+
// automatically when the Popup is closed by clicking outside the anchor
|
|
13213
|
+
const ariaRoot = this.isNavigable ? anchor.closest('.k-table-th') : anchor;
|
|
13214
|
+
if (this.popupRef) {
|
|
13215
|
+
this.popupRef.popup.instance.close.pipe(take(1)).subscribe(() => {
|
|
13216
|
+
this.popupRef = null;
|
|
13217
|
+
const ariaRoot = this.isNavigable ? anchor.closest('.k-table-th') : anchor;
|
|
13218
|
+
ariaRoot && this.renderer.removeAttribute(ariaRoot, 'aria-controls');
|
|
13219
|
+
ariaRoot && this.renderer.setAttribute(ariaRoot, 'aria-expanded', 'false');
|
|
13220
|
+
});
|
|
13221
|
+
const popupAriaElement = this.popupRef.popupElement.querySelector('.k-grid-columnmenu-popup');
|
|
13222
|
+
if (popupAriaElement) {
|
|
13223
|
+
const popupId = getId(this.idService?.gridId());
|
|
13224
|
+
this.renderer.setAttribute(popupAriaElement, 'id', popupId);
|
|
13225
|
+
this.renderer.setAttribute(popupAriaElement, 'role', 'dialog');
|
|
13226
|
+
this.renderer.setAttribute(popupAriaElement, 'aria-label', this.columnMenuTitle);
|
|
13227
|
+
ariaRoot && this.renderer.setAttribute(ariaRoot, 'aria-controls', popupId);
|
|
13228
|
+
ariaRoot && this.renderer.setAttribute(ariaRoot, 'aria-expanded', 'true');
|
|
13229
|
+
}
|
|
13230
|
+
if (this.settings.view === 'tabbed') {
|
|
13231
|
+
this.renderer.addClass(this.popupRef.popupElement.querySelector('.k-grid-columnmenu-popup'), 'k-column-menu-tabbed');
|
|
13232
|
+
this.cdr.detectChanges();
|
|
13233
|
+
this.tabStrip?.selectTab(0);
|
|
13234
|
+
}
|
|
12991
13235
|
}
|
|
12992
|
-
|
|
13236
|
+
else {
|
|
12993
13237
|
if (this.navigationService.tableEnabled) {
|
|
12994
13238
|
this.navigationService.focusCell(0, this.column.leafIndex);
|
|
12995
13239
|
}
|
|
@@ -13001,9 +13245,13 @@ class ColumnMenuComponent {
|
|
|
13001
13245
|
/**
|
|
13002
13246
|
* @hidden
|
|
13003
13247
|
*/
|
|
13004
|
-
close() {
|
|
13248
|
+
close(triggerFocus = false) {
|
|
13005
13249
|
this.popupService.destroy();
|
|
13006
13250
|
this.popupRef = null;
|
|
13251
|
+
this.cdr.markForCheck();
|
|
13252
|
+
if (!triggerFocus) {
|
|
13253
|
+
return;
|
|
13254
|
+
}
|
|
13007
13255
|
if (this.navigationService.tableEnabled) {
|
|
13008
13256
|
this.navigationService.focusCell(0, this.column.leafIndex);
|
|
13009
13257
|
}
|
|
@@ -13023,7 +13271,7 @@ class ColumnMenuComponent {
|
|
|
13023
13271
|
return typeof (menuItemSettings) === 'object' ? menuItemSettings.expanded : false;
|
|
13024
13272
|
}
|
|
13025
13273
|
}
|
|
13026
|
-
ColumnMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnMenuComponent, deps: [{ token: NavigationService }, { token: SinglePopupService }, { token: ColumnMenuService }, { token: ContextService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: ColumnInfoService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13274
|
+
ColumnMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnMenuComponent, deps: [{ token: NavigationService }, { token: SinglePopupService }, { token: ColumnMenuService }, { token: ContextService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: ColumnInfoService }, { token: IdService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
13027
13275
|
ColumnMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ColumnMenuComponent, 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: [
|
|
13028
13276
|
ColumnMenuService,
|
|
13029
13277
|
MenuTabbingService
|
|
@@ -13035,7 +13283,9 @@ ColumnMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
13035
13283
|
(keydown.enter)="$event.stopImmediatePropagation()"
|
|
13036
13284
|
href="#"
|
|
13037
13285
|
[tabindex]="tabIndex"
|
|
13038
|
-
[attr.title]="columnMenuTitle"
|
|
13286
|
+
[attr.title]="columnMenuTitle"
|
|
13287
|
+
[attr.aria-expanded]="isNavigable ? undefined: false"
|
|
13288
|
+
[attr.aria-haspopup]="isNavigable ? undefined : 'dialog'">
|
|
13039
13289
|
<kendo-icon-wrapper
|
|
13040
13290
|
name="more-vertical"
|
|
13041
13291
|
[svgIcon]="moreVerticalIcon"></kendo-icon-wrapper>
|
|
@@ -13048,7 +13298,7 @@ ColumnMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
13048
13298
|
</ng-template>
|
|
13049
13299
|
<ng-template #defaultTemplate>
|
|
13050
13300
|
<kendo-grid-columnmenu-container
|
|
13051
|
-
(keydown.escape)="close()"
|
|
13301
|
+
(keydown.escape)="close(true)"
|
|
13052
13302
|
(keydown.enter)="$event.stopImmediatePropagation()">
|
|
13053
13303
|
<kendo-grid-columnmenu-sort #sortItem [kendoGridColumnMenuItem]="sortItem" *ngIf="hasSort" [service]="service">
|
|
13054
13304
|
</kendo-grid-columnmenu-sort>
|
|
@@ -13100,7 +13350,7 @@ ColumnMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
13100
13350
|
</kendo-grid-columnmenu-container>
|
|
13101
13351
|
</ng-template>
|
|
13102
13352
|
<ng-template #tabbedInterfaceTemplate>
|
|
13103
|
-
<kendo-tabstrip #tabstrip (keydown.escape)="close()">
|
|
13353
|
+
<kendo-tabstrip #tabstrip (keydown.escape)="close(true)">
|
|
13104
13354
|
<kendo-tabstrip-tab *ngIf="hasFilter">
|
|
13105
13355
|
<ng-template kendoTabTitle>
|
|
13106
13356
|
<kendo-icon-wrapper
|
|
@@ -13187,7 +13437,7 @@ ColumnMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
13187
13437
|
</kendo-tabstrip-tab>
|
|
13188
13438
|
</kendo-tabstrip>
|
|
13189
13439
|
</ng-template>
|
|
13190
|
-
`, isInline: true, components: [{ type: i3.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: ColumnMenuContainerComponent, selector: "kendo-grid-columnmenu-container" }, { type: ColumnMenuSortComponent, selector: "kendo-grid-columnmenu-sort" }, { type: ColumnMenuLockComponent, selector: "kendo-grid-columnmenu-lock" }, { type: ColumnMenuStickComponent, selector: "kendo-grid-columnmenu-stick" }, { type: ColumnMenuPositionComponent, selector: "kendo-grid-columnmenu-position", inputs: ["expanded", "showLock", "showStick", "isLast"], outputs: ["expand", "collapse"] }, { type: ColumnMenuChooserComponent, selector: "kendo-grid-columnmenu-chooser", inputs: ["expanded", "isLast"], outputs: ["expand", "collapse"] }, { type: ColumnMenuAutoSizeColumnComponent, selector: "kendo-grid-columnmenu-autosize-column", inputs: ["column"] }, { type: ColumnMenuAutoSizeAllColumnsComponent, selector: "kendo-grid-columnmenu-autosize-all-columns" }, { type: ColumnMenuFilterComponent, selector: "kendo-grid-columnmenu-filter", inputs: ["expanded", "isLast"], outputs: ["expand", "collapse"] }, { type:
|
|
13440
|
+
`, isInline: true, components: [{ type: i3.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: ColumnMenuContainerComponent, selector: "kendo-grid-columnmenu-container" }, { type: ColumnMenuSortComponent, selector: "kendo-grid-columnmenu-sort" }, { type: ColumnMenuLockComponent, selector: "kendo-grid-columnmenu-lock" }, { type: ColumnMenuStickComponent, selector: "kendo-grid-columnmenu-stick" }, { type: ColumnMenuPositionComponent, selector: "kendo-grid-columnmenu-position", inputs: ["expanded", "showLock", "showStick", "isLast"], outputs: ["expand", "collapse"] }, { type: ColumnMenuChooserComponent, selector: "kendo-grid-columnmenu-chooser", inputs: ["expanded", "isLast"], outputs: ["expand", "collapse"] }, { type: ColumnMenuAutoSizeColumnComponent, selector: "kendo-grid-columnmenu-autosize-column", inputs: ["column"] }, { type: ColumnMenuAutoSizeAllColumnsComponent, selector: "kendo-grid-columnmenu-autosize-all-columns" }, { type: ColumnMenuFilterComponent, selector: "kendo-grid-columnmenu-filter", inputs: ["expanded", "isLast"], outputs: ["expand", "collapse"] }, { type: i17.TabStripComponent, selector: "kendo-tabstrip", inputs: ["height", "animate", "tabAlignment", "tabPosition", "keepTabContent", "closable", "scrollable", "closeIcon", "closeIconClass", "closeSVGIcon"], outputs: ["tabSelect", "tabClose", "tabScroll"], exportAs: ["kendoTabStrip"] }, { type: i17.TabStripTabComponent, selector: "kendo-tabstrip-tab", inputs: ["title", "disabled", "cssClass", "cssStyle", "selected", "closable", "closeIcon", "closeIconClass", "closeSVGIcon"], exportAs: ["kendoTabStripTab"] }, { type: FilterMenuContainerComponent, selector: "kendo-grid-filter-menu-container", inputs: ["column", "isLast", "isExpanded", "menuTabbingService", "filter", "actionsClass"], outputs: ["close"] }, { type: ColumnListComponent, selector: "kendo-grid-columnlist", inputs: ["columns", "autoSync", "ariaLabel", "allowHideAll", "applyText", "resetText", "actionsClass", "isLast", "isExpanded", "service"], outputs: ["reset", "apply", "columnChange"] }], directives: [{ type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: ColumnMenuItemDirective, selector: "[kendoGridColumnMenuItem]", inputs: ["kendoGridColumnMenuItem"] }, { type: i17.TabTitleDirective, selector: "[kendoTabTitle]" }, { type: i17.TabContentDirective, selector: "[kendoTabContent]" }] });
|
|
13191
13441
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnMenuComponent, decorators: [{
|
|
13192
13442
|
type: Component,
|
|
13193
13443
|
args: [{
|
|
@@ -13204,7 +13454,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
13204
13454
|
(keydown.enter)="$event.stopImmediatePropagation()"
|
|
13205
13455
|
href="#"
|
|
13206
13456
|
[tabindex]="tabIndex"
|
|
13207
|
-
[attr.title]="columnMenuTitle"
|
|
13457
|
+
[attr.title]="columnMenuTitle"
|
|
13458
|
+
[attr.aria-expanded]="isNavigable ? undefined: false"
|
|
13459
|
+
[attr.aria-haspopup]="isNavigable ? undefined : 'dialog'">
|
|
13208
13460
|
<kendo-icon-wrapper
|
|
13209
13461
|
name="more-vertical"
|
|
13210
13462
|
[svgIcon]="moreVerticalIcon"></kendo-icon-wrapper>
|
|
@@ -13217,7 +13469,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
13217
13469
|
</ng-template>
|
|
13218
13470
|
<ng-template #defaultTemplate>
|
|
13219
13471
|
<kendo-grid-columnmenu-container
|
|
13220
|
-
(keydown.escape)="close()"
|
|
13472
|
+
(keydown.escape)="close(true)"
|
|
13221
13473
|
(keydown.enter)="$event.stopImmediatePropagation()">
|
|
13222
13474
|
<kendo-grid-columnmenu-sort #sortItem [kendoGridColumnMenuItem]="sortItem" *ngIf="hasSort" [service]="service">
|
|
13223
13475
|
</kendo-grid-columnmenu-sort>
|
|
@@ -13269,7 +13521,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
13269
13521
|
</kendo-grid-columnmenu-container>
|
|
13270
13522
|
</ng-template>
|
|
13271
13523
|
<ng-template #tabbedInterfaceTemplate>
|
|
13272
|
-
<kendo-tabstrip #tabstrip (keydown.escape)="close()">
|
|
13524
|
+
<kendo-tabstrip #tabstrip (keydown.escape)="close(true)">
|
|
13273
13525
|
<kendo-tabstrip-tab *ngIf="hasFilter">
|
|
13274
13526
|
<ng-template kendoTabTitle>
|
|
13275
13527
|
<kendo-icon-wrapper
|
|
@@ -13358,7 +13610,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
13358
13610
|
</ng-template>
|
|
13359
13611
|
`
|
|
13360
13612
|
}]
|
|
13361
|
-
}], ctorParameters: function () { return [{ type: NavigationService }, { type: SinglePopupService }, { type: ColumnMenuService }, { type: ContextService }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: ColumnInfoService }
|
|
13613
|
+
}], ctorParameters: function () { return [{ type: NavigationService }, { type: SinglePopupService }, { type: ColumnMenuService }, { type: ContextService }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: ColumnInfoService }, { type: IdService, decorators: [{
|
|
13614
|
+
type: Optional
|
|
13615
|
+
}] }]; }, propDecorators: { standalone: [{
|
|
13362
13616
|
type: HostBinding,
|
|
13363
13617
|
args: ['class.k-grid-column-menu-standalone']
|
|
13364
13618
|
}, {
|
|
@@ -14301,7 +14555,7 @@ class LogicalCellDirective {
|
|
|
14301
14555
|
this.renderer.addClass(el, 'k-focus');
|
|
14302
14556
|
}
|
|
14303
14557
|
if (this.headerLabelText) {
|
|
14304
|
-
el.
|
|
14558
|
+
el.removeAttribute('aria-label');
|
|
14305
14559
|
}
|
|
14306
14560
|
}
|
|
14307
14561
|
else {
|
|
@@ -14993,7 +15247,7 @@ const modifierKeys = ['alt', 'ctrl', 'shift', 'meta'];
|
|
|
14993
15247
|
* @hidden
|
|
14994
15248
|
*/
|
|
14995
15249
|
class HeaderComponent {
|
|
14996
|
-
constructor(popupService, hint, cue, reorderService, idService, sortService, columnInfoService, cd, contextService) {
|
|
15250
|
+
constructor(popupService, hint, cue, reorderService, idService, sortService, columnInfoService, cd, contextService, navigationService) {
|
|
14997
15251
|
this.popupService = popupService;
|
|
14998
15252
|
this.hint = hint;
|
|
14999
15253
|
this.cue = cue;
|
|
@@ -15003,6 +15257,7 @@ class HeaderComponent {
|
|
|
15003
15257
|
this.columnInfoService = columnInfoService;
|
|
15004
15258
|
this.cd = cd;
|
|
15005
15259
|
this.contextService = contextService;
|
|
15260
|
+
this.navigationService = navigationService;
|
|
15006
15261
|
this.columns = [];
|
|
15007
15262
|
this.groups = [];
|
|
15008
15263
|
this.sort = new Array();
|
|
@@ -15137,6 +15392,9 @@ class HeaderComponent {
|
|
|
15137
15392
|
return 'descending';
|
|
15138
15393
|
}
|
|
15139
15394
|
}
|
|
15395
|
+
get isNavigable() {
|
|
15396
|
+
return this.navigationService.tableEnabled;
|
|
15397
|
+
}
|
|
15140
15398
|
/**
|
|
15141
15399
|
*
|
|
15142
15400
|
* @param column
|
|
@@ -15364,7 +15622,7 @@ class HeaderComponent {
|
|
|
15364
15622
|
});
|
|
15365
15623
|
}
|
|
15366
15624
|
}
|
|
15367
|
-
HeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: HeaderComponent, deps: [{ token: SinglePopupService }, { token: DragHintService }, { token: DropCueService }, { token: ColumnReorderService }, { token: IdService }, { token: SortService }, { token: ColumnInfoService }, { token: i0.ChangeDetectorRef }, { token: ContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
15625
|
+
HeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: HeaderComponent, deps: [{ token: SinglePopupService }, { token: DragHintService }, { token: DropCueService }, { token: ColumnReorderService }, { token: IdService }, { token: SortService }, { token: ColumnInfoService }, { token: i0.ChangeDetectorRef }, { token: ContextService }, { token: NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
15368
15626
|
HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: HeaderComponent, selector: "[kendoGridHeader]", inputs: { totalColumnLevels: "totalColumnLevels", columns: "columns", groups: "groups", detailTemplate: "detailTemplate", scrollable: "scrollable", filterable: "filterable", sort: "sort", filter: "filter", sortable: "sortable", groupable: "groupable", lockedColumnsCount: "lockedColumnsCount", resizable: "resizable", reorderable: "reorderable", columnMenu: "columnMenu", columnMenuTemplate: "columnMenuTemplate", totalColumnsCount: "totalColumnsCount", totalColumns: "totalColumns", tabIndex: "tabIndex", size: "size" }, host: { properties: { "class.k-grid-header": "this.headerClass", "class.k-table-thead": "this.hostClass" } }, viewQueries: [{ propertyName: "dropTargets", predicate: DropTargetDirective, descendants: true }, { propertyName: "filterMenus", predicate: FilterMenuComponent, descendants: true }, { propertyName: "columnMenus", predicate: ColumnMenuComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
15369
15627
|
<ng-container>
|
|
15370
15628
|
<tr *ngFor="let i of columnLevels; let levelIndex = index"
|
|
@@ -15416,7 +15674,9 @@ HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
15416
15674
|
[ngStyle]="column.sticky ? addStickyStyles(column) : column.headerStyle"
|
|
15417
15675
|
[attr.rowspan]="column.rowspan(totalColumnLevels)"
|
|
15418
15676
|
[attr.colspan]="column.colspan"
|
|
15419
|
-
[attr.aria-haspopup]="(showFilterMenu || showColumnMenu(column)) ? 'dialog' : undefined"
|
|
15677
|
+
[attr.aria-haspopup]="isNavigable && (showFilterMenu || showColumnMenu(column)) ? 'dialog' : undefined"
|
|
15678
|
+
[attr.aria-expanded]="isNavigable && (showFilterMenu || showColumnMenu(column)) ? false : undefined"
|
|
15679
|
+
[attr.aria-keyshortcuts]="isNavigable ? 'Alt + ArrowDown' : undefined">
|
|
15420
15680
|
|
|
15421
15681
|
<ng-container *ngIf="!isSortable(getColumnComponent(column))">
|
|
15422
15682
|
<span class="k-cell-inner">
|
|
@@ -15638,7 +15898,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
15638
15898
|
[ngStyle]="column.sticky ? addStickyStyles(column) : column.headerStyle"
|
|
15639
15899
|
[attr.rowspan]="column.rowspan(totalColumnLevels)"
|
|
15640
15900
|
[attr.colspan]="column.colspan"
|
|
15641
|
-
[attr.aria-haspopup]="(showFilterMenu || showColumnMenu(column)) ? 'dialog' : undefined"
|
|
15901
|
+
[attr.aria-haspopup]="isNavigable && (showFilterMenu || showColumnMenu(column)) ? 'dialog' : undefined"
|
|
15902
|
+
[attr.aria-expanded]="isNavigable && (showFilterMenu || showColumnMenu(column)) ? false : undefined"
|
|
15903
|
+
[attr.aria-keyshortcuts]="isNavigable ? 'Alt + ArrowDown' : undefined">
|
|
15642
15904
|
|
|
15643
15905
|
<ng-container *ngIf="!isSortable(getColumnComponent(column))">
|
|
15644
15906
|
<span class="k-cell-inner">
|
|
@@ -15806,7 +16068,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
15806
16068
|
</ng-container>
|
|
15807
16069
|
`
|
|
15808
16070
|
}]
|
|
15809
|
-
}], ctorParameters: function () { return [{ type: SinglePopupService }, { type: DragHintService }, { type: DropCueService }, { type: ColumnReorderService }, { type: IdService }, { type: SortService }, { type: ColumnInfoService }, { type: i0.ChangeDetectorRef }, { type: ContextService }]; }, propDecorators: { totalColumnLevels: [{
|
|
16071
|
+
}], ctorParameters: function () { return [{ type: SinglePopupService }, { type: DragHintService }, { type: DropCueService }, { type: ColumnReorderService }, { type: IdService }, { type: SortService }, { type: ColumnInfoService }, { type: i0.ChangeDetectorRef }, { type: ContextService }, { type: NavigationService }]; }, propDecorators: { totalColumnLevels: [{
|
|
15810
16072
|
type: Input
|
|
15811
16073
|
}], columns: [{
|
|
15812
16074
|
type: Input
|
|
@@ -24133,13 +24395,30 @@ class ColumnChooserComponent {
|
|
|
24133
24395
|
anchorAlign: { vertical: 'bottom', horizontal: direction },
|
|
24134
24396
|
popupAlign: { vertical: 'top', horizontal: direction }
|
|
24135
24397
|
});
|
|
24136
|
-
|
|
24398
|
+
const popupElement = this.popupRef?.popupElement;
|
|
24399
|
+
if (popupElement) {
|
|
24400
|
+
const popupId = `k-${guid()}`;
|
|
24401
|
+
const popupAriaElement = popupElement.querySelector('.k-popup');
|
|
24402
|
+
this.ngZone.runOutsideAngular(() => {
|
|
24403
|
+
this.escapeListener = this.renderer.listen(popupAriaElement, 'keydown', (e) => {
|
|
24404
|
+
if (e.keyCode === Keys.Escape) {
|
|
24405
|
+
this.close(true);
|
|
24406
|
+
}
|
|
24407
|
+
});
|
|
24408
|
+
});
|
|
24409
|
+
this.renderer.setAttribute(popupElement, 'dir', this.ctx.localization.rtl ? 'rtl' : 'ltr');
|
|
24410
|
+
this.renderer.setAttribute(popupAriaElement, 'id', popupId);
|
|
24411
|
+
this.renderer.setAttribute(popupAriaElement, 'role', 'dialog');
|
|
24412
|
+
this.popupId = popupId;
|
|
24413
|
+
}
|
|
24137
24414
|
if (!isDocumentAvailable()) {
|
|
24138
24415
|
return;
|
|
24139
24416
|
}
|
|
24140
24417
|
this.ngZone.runOutsideAngular(() => this.closeClick = this.renderer.listen('document', 'click', ({ target }) => {
|
|
24141
24418
|
if (!closest(target, node => node === this.popupRef.popupElement || node === anchor.element)) {
|
|
24142
|
-
this.
|
|
24419
|
+
this.ngZone.run(() => {
|
|
24420
|
+
this.close();
|
|
24421
|
+
});
|
|
24143
24422
|
}
|
|
24144
24423
|
}));
|
|
24145
24424
|
}
|
|
@@ -24151,7 +24430,7 @@ class ColumnChooserComponent {
|
|
|
24151
24430
|
* @hidden
|
|
24152
24431
|
*/
|
|
24153
24432
|
onApply(changed) {
|
|
24154
|
-
this.close();
|
|
24433
|
+
this.close(true);
|
|
24155
24434
|
if (changed.length) {
|
|
24156
24435
|
this.changeDetector.markForCheck();
|
|
24157
24436
|
this.columnInfoService.changeVisibility(changed);
|
|
@@ -24164,12 +24443,24 @@ class ColumnChooserComponent {
|
|
|
24164
24443
|
this.changeDetector.markForCheck();
|
|
24165
24444
|
this.columnInfoService.changeVisibility(changed);
|
|
24166
24445
|
}
|
|
24167
|
-
|
|
24446
|
+
/**
|
|
24447
|
+
* @hidden
|
|
24448
|
+
*/
|
|
24449
|
+
onShiftTab(e) {
|
|
24450
|
+
if (e.target.matches('.k-column-list-item')) {
|
|
24451
|
+
e.preventDefault();
|
|
24452
|
+
this.columnList.resetButton.nativeElement.focus();
|
|
24453
|
+
}
|
|
24454
|
+
}
|
|
24455
|
+
close(focusAnchor = false) {
|
|
24168
24456
|
if (this.popupRef) {
|
|
24169
24457
|
this.popupRef.close();
|
|
24170
24458
|
this.popupRef = null;
|
|
24459
|
+
this.changeDetector.markForCheck();
|
|
24460
|
+
this.escapeListener && this.escapeListener();
|
|
24171
24461
|
}
|
|
24172
24462
|
this.detachClose();
|
|
24463
|
+
focusAnchor && this.anchor.element.focus();
|
|
24173
24464
|
}
|
|
24174
24465
|
detachClose() {
|
|
24175
24466
|
if (this.closeClick) {
|
|
@@ -24179,7 +24470,7 @@ class ColumnChooserComponent {
|
|
|
24179
24470
|
}
|
|
24180
24471
|
}
|
|
24181
24472
|
ColumnChooserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnChooserComponent, deps: [{ token: ContextService }, { token: ColumnInfoService }, { token: i1$2.PopupService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
24182
|
-
ColumnChooserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ColumnChooserComponent, selector: "kendo-grid-column-chooser", inputs: { autoSync: "autoSync", allowHideAll: "allowHideAll" }, ngImport: i0, template: `
|
|
24473
|
+
ColumnChooserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ColumnChooserComponent, selector: "kendo-grid-column-chooser", inputs: { autoSync: "autoSync", allowHideAll: "allowHideAll" }, viewQueries: [{ propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true }, { propertyName: "columnList", first: true, predicate: ["columnList"], descendants: true }], ngImport: i0, template: `
|
|
24183
24474
|
<button #anchor
|
|
24184
24475
|
kendoButton
|
|
24185
24476
|
type="button"
|
|
@@ -24187,20 +24478,27 @@ ColumnChooserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
24187
24478
|
fillMode="flat"
|
|
24188
24479
|
[attr.title]="ctx.localization.get('columns')"
|
|
24189
24480
|
icon="columns"
|
|
24190
|
-
[svgIcon]="columnsIcon"
|
|
24481
|
+
[svgIcon]="columnsIcon"
|
|
24482
|
+
[attr.aria-haspopup]="'dialog'"
|
|
24483
|
+
[attr.aria-expanded]="!!(popupRef)"
|
|
24484
|
+
[attr.aria-controls]="!!(popupRef) ? popupId : undefined"></button>
|
|
24191
24485
|
<ng-template #template>
|
|
24192
24486
|
<span class='k-column-chooser-title'>{{ ctx.localization.get('columns') }}</span>
|
|
24193
24487
|
<kendo-grid-columnlist
|
|
24488
|
+
#columnList
|
|
24194
24489
|
[columns]="columns"
|
|
24490
|
+
[ariaLabel]="ctx.localization.get('columns')"
|
|
24491
|
+
[isLast]="true"
|
|
24195
24492
|
[applyText]="ctx.localization.get('columnsApply')"
|
|
24196
24493
|
[resetText]="ctx.localization.get('columnsReset')"
|
|
24197
24494
|
[autoSync]="autoSync"
|
|
24198
24495
|
[allowHideAll]="allowHideAll"
|
|
24199
24496
|
(apply)="onApply($event)"
|
|
24200
|
-
(columnChange)="onChange($event)"
|
|
24497
|
+
(columnChange)="onChange($event)"
|
|
24498
|
+
(keydown.shift.tab)="onShiftTab($event)">
|
|
24201
24499
|
</kendo-grid-columnlist>
|
|
24202
24500
|
</ng-template>
|
|
24203
|
-
`, isInline: true, components: [{ type: i4$1.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: ColumnListComponent, selector: "kendo-grid-columnlist", inputs: ["columns", "autoSync", "allowHideAll", "applyText", "resetText", "actionsClass", "isLast", "isExpanded", "service"], outputs: ["reset", "apply", "columnChange"] }] });
|
|
24501
|
+
`, isInline: true, components: [{ type: i4$1.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: ColumnListComponent, selector: "kendo-grid-columnlist", inputs: ["columns", "autoSync", "ariaLabel", "allowHideAll", "applyText", "resetText", "actionsClass", "isLast", "isExpanded", "service"], outputs: ["reset", "apply", "columnChange"] }] });
|
|
24204
24502
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnChooserComponent, decorators: [{
|
|
24205
24503
|
type: Component,
|
|
24206
24504
|
args: [{
|
|
@@ -24213,17 +24511,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
24213
24511
|
fillMode="flat"
|
|
24214
24512
|
[attr.title]="ctx.localization.get('columns')"
|
|
24215
24513
|
icon="columns"
|
|
24216
|
-
[svgIcon]="columnsIcon"
|
|
24514
|
+
[svgIcon]="columnsIcon"
|
|
24515
|
+
[attr.aria-haspopup]="'dialog'"
|
|
24516
|
+
[attr.aria-expanded]="!!(popupRef)"
|
|
24517
|
+
[attr.aria-controls]="!!(popupRef) ? popupId : undefined"></button>
|
|
24217
24518
|
<ng-template #template>
|
|
24218
24519
|
<span class='k-column-chooser-title'>{{ ctx.localization.get('columns') }}</span>
|
|
24219
24520
|
<kendo-grid-columnlist
|
|
24521
|
+
#columnList
|
|
24220
24522
|
[columns]="columns"
|
|
24523
|
+
[ariaLabel]="ctx.localization.get('columns')"
|
|
24524
|
+
[isLast]="true"
|
|
24221
24525
|
[applyText]="ctx.localization.get('columnsApply')"
|
|
24222
24526
|
[resetText]="ctx.localization.get('columnsReset')"
|
|
24223
24527
|
[autoSync]="autoSync"
|
|
24224
24528
|
[allowHideAll]="allowHideAll"
|
|
24225
24529
|
(apply)="onApply($event)"
|
|
24226
|
-
(columnChange)="onChange($event)"
|
|
24530
|
+
(columnChange)="onChange($event)"
|
|
24531
|
+
(keydown.shift.tab)="onShiftTab($event)">
|
|
24227
24532
|
</kendo-grid-columnlist>
|
|
24228
24533
|
</ng-template>
|
|
24229
24534
|
`
|
|
@@ -24232,9 +24537,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
24232
24537
|
type: Input
|
|
24233
24538
|
}], allowHideAll: [{
|
|
24234
24539
|
type: Input
|
|
24540
|
+
}], anchor: [{
|
|
24541
|
+
type: ViewChild,
|
|
24542
|
+
args: ['anchor']
|
|
24543
|
+
}], columnList: [{
|
|
24544
|
+
type: ViewChild,
|
|
24545
|
+
args: ['columnList']
|
|
24235
24546
|
}] } });
|
|
24236
24547
|
|
|
24237
24548
|
const COMPONENTS = [
|
|
24549
|
+
ColumnMenuChooserItemCheckedDirective,
|
|
24238
24550
|
ColumnListComponent,
|
|
24239
24551
|
ColumnChooserComponent,
|
|
24240
24552
|
ColumnMenuChooserComponent,
|
|
@@ -24277,7 +24589,8 @@ class ColumnMenuModule {
|
|
|
24277
24589
|
}
|
|
24278
24590
|
}
|
|
24279
24591
|
ColumnMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
24280
|
-
ColumnMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnMenuModule, declarations: [
|
|
24592
|
+
ColumnMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnMenuModule, declarations: [ColumnMenuChooserItemCheckedDirective,
|
|
24593
|
+
ColumnListComponent,
|
|
24281
24594
|
ColumnChooserComponent,
|
|
24282
24595
|
ColumnMenuChooserComponent,
|
|
24283
24596
|
ColumnMenuFilterComponent,
|
|
@@ -24292,7 +24605,8 @@ ColumnMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
24292
24605
|
ColumnMenuStickComponent,
|
|
24293
24606
|
ColumnMenuPositionComponent,
|
|
24294
24607
|
ColumnMenuAutoSizeColumnComponent,
|
|
24295
|
-
ColumnMenuAutoSizeAllColumnsComponent], imports: [CommonModule, FilterMenuModule, ButtonModule, TabStripModule], exports: [
|
|
24608
|
+
ColumnMenuAutoSizeAllColumnsComponent], imports: [CommonModule, FilterMenuModule, ButtonModule, TabStripModule], exports: [ColumnMenuChooserItemCheckedDirective,
|
|
24609
|
+
ColumnListComponent,
|
|
24296
24610
|
ColumnChooserComponent,
|
|
24297
24611
|
ColumnMenuChooserComponent,
|
|
24298
24612
|
ColumnMenuFilterComponent,
|