@progress/kendo-angular-treelist 18.2.1-develop.3 → 18.3.0-develop.2
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 +21 -0
- package/column-menu/column-chooser.component.d.ts +14 -3
- package/column-menu/column-list-kb-nav.service.d.ts +22 -0
- package/column-menu/column-list.component.d.ts +20 -5
- package/column-menu/column-menu-autosize-all.component.d.ts +39 -0
- package/column-menu/column-menu-autosize.component.d.ts +43 -0
- package/column-menu/column-menu-chooser.component.d.ts +16 -4
- package/column-menu/column-menu-container.component.d.ts +21 -0
- package/column-menu/column-menu-expandable-item.interface.d.ts +14 -0
- package/column-menu/column-menu-filter.component.d.ts +16 -3
- package/column-menu/column-menu-item.component.d.ts +11 -3
- package/column-menu/column-menu-item.directive.d.ts +45 -0
- package/column-menu/column-menu-settings.interface.d.ts +11 -2
- package/column-menu/column-menu.component.d.ts +40 -15
- package/column-menu/column-menu.service.d.ts +14 -0
- package/column-menu/utils.d.ts +13 -0
- package/columns/sort-settings.d.ts +12 -0
- package/common/error-messages.d.ts +8 -0
- package/common/id.service.d.ts +3 -0
- package/common/provider.service.d.ts +3 -1
- package/esm2022/column-menu/column-chooser-item-checked.directive.mjs +45 -0
- package/esm2022/column-menu/column-chooser.component.mjs +69 -14
- package/esm2022/column-menu/column-list-kb-nav.service.mjs +40 -0
- package/esm2022/column-menu/column-list.component.mjs +172 -50
- package/esm2022/column-menu/column-menu-autosize-all.component.mjs +79 -0
- package/esm2022/column-menu/column-menu-autosize.component.mjs +87 -0
- package/esm2022/column-menu/column-menu-chooser.component.mjs +44 -12
- package/esm2022/column-menu/column-menu-container.component.mjs +58 -0
- package/esm2022/column-menu/column-menu-expandable-item.interface.mjs +5 -0
- package/esm2022/column-menu/column-menu-filter.component.mjs +58 -25
- package/esm2022/column-menu/column-menu-item-base.mjs +2 -1
- package/esm2022/column-menu/column-menu-item.component.mjs +34 -5
- package/esm2022/column-menu/column-menu-item.directive.mjs +125 -0
- package/esm2022/column-menu/column-menu-lock.component.mjs +1 -1
- package/esm2022/column-menu/column-menu-sort.component.mjs +1 -1
- package/esm2022/column-menu/column-menu.component.mjs +264 -67
- package/esm2022/column-menu/column-menu.service.mjs +18 -2
- package/esm2022/column-menu/utils.mjs +21 -1
- package/esm2022/common/error-messages.mjs +15 -0
- package/esm2022/common/id.service.mjs +9 -0
- package/esm2022/common/provider.service.mjs +7 -3
- package/esm2022/filtering/cell/boolean-filter-cell.component.mjs +5 -2
- package/esm2022/filtering/cell/date-filter-cell.component.mjs +20 -3
- package/esm2022/filtering/cell/numeric-filter-cell.component.mjs +17 -3
- package/esm2022/filtering/filter-row.component.mjs +1 -1
- package/esm2022/filtering/filter.service.mjs +17 -3
- package/esm2022/filtering/menu/boolean-filter-menu.component.mjs +40 -14
- package/esm2022/filtering/menu/date-filter-menu-input.component.mjs +47 -17
- package/esm2022/filtering/menu/date-filter-menu.component.mjs +27 -7
- package/esm2022/filtering/menu/filter-menu-container.component.mjs +83 -31
- package/esm2022/filtering/menu/filter-menu-dropdownlist.directive.mjs +44 -0
- package/esm2022/filtering/menu/filter-menu-host.directive.mjs +6 -1
- package/esm2022/filtering/menu/filter-menu-input-wrapper.component.mjs +52 -9
- package/esm2022/filtering/menu/filter-menu.component.mjs +111 -16
- package/esm2022/filtering/menu/menu-tabbing.service.mjs +22 -0
- package/esm2022/filtering/menu/numeric-filter-menu-input.component.mjs +49 -35
- package/esm2022/filtering/menu/numeric-filter-menu.component.mjs +37 -7
- package/esm2022/filtering/menu/string-filter-menu-input.component.mjs +13 -4
- package/esm2022/filtering/menu/string-filter-menu.component.mjs +27 -8
- package/esm2022/filtering/operators/after-eq-filter-operator.component.mjs +2 -2
- package/esm2022/filtering/operators/after-filter-operator.component.mjs +2 -2
- package/esm2022/filtering/operators/before-eq-filter-operator.component.mjs +2 -2
- package/esm2022/filtering/operators/before-filter-operator.component.mjs +2 -2
- package/esm2022/filtering/operators/contains-filter-operator.component.mjs +1 -1
- package/esm2022/filtering/operators/ends-with-filter-operator.component.mjs +1 -1
- package/esm2022/filtering/operators/eq-filter-operator.component.mjs +1 -1
- package/esm2022/filtering/operators/filter-operator.base.mjs +18 -18
- package/esm2022/filtering/operators/gt-filter-operator.component.mjs +1 -1
- package/esm2022/filtering/operators/gte-filter-operator.component.mjs +1 -1
- package/esm2022/filtering/operators/is-empty-filter-operator.component.mjs +1 -1
- package/esm2022/filtering/operators/is-not-empty-filter-operator.component.mjs +1 -1
- package/esm2022/filtering/operators/is-not-null-filter-operator.component.mjs +1 -1
- package/esm2022/filtering/operators/isnull-filter-operator.component.mjs +1 -1
- package/esm2022/filtering/operators/lt-filter-operator.component.mjs +1 -1
- package/esm2022/filtering/operators/lte-filter-operator.component.mjs +1 -1
- package/esm2022/filtering/operators/neq-filter-operator.component.mjs +1 -1
- package/esm2022/filtering/operators/not-contains-filter-operator.component.mjs +1 -1
- package/esm2022/filtering/operators/starts-with-filter-operator.component.mjs +1 -1
- package/esm2022/localization/messages.mjs +97 -3
- package/esm2022/navigation/logical-cell.directive.mjs +4 -1
- package/esm2022/navigation/navigation.service.mjs +4 -4
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/rendering/header/header.component.mjs +336 -178
- package/esm2022/rendering/table-body.component.mjs +1 -1
- package/esm2022/selection/selection.service.mjs +2 -2
- package/esm2022/treelist.component.mjs +73 -9
- package/fesm2022/progress-kendo-angular-treelist.mjs +2231 -628
- package/filtering/cell/date-filter-cell.component.d.ts +4 -0
- package/filtering/cell/numeric-filter-cell.component.d.ts +4 -0
- package/filtering/filter.service.d.ts +10 -1
- package/filtering/menu/boolean-filter-menu.component.d.ts +19 -7
- package/filtering/menu/date-filter-menu-input.component.d.ts +10 -3
- package/filtering/menu/date-filter-menu.component.d.ts +7 -1
- package/filtering/menu/filter-menu-container.component.d.ts +23 -6
- package/filtering/menu/filter-menu-dropdownlist.directive.d.ts +19 -0
- package/filtering/menu/filter-menu-host.directive.d.ts +3 -1
- package/filtering/menu/filter-menu-input-wrapper.component.d.ts +12 -2
- package/filtering/menu/filter-menu.component.d.ts +30 -7
- package/filtering/menu/menu-tabbing.service.d.ts +18 -0
- package/filtering/menu/numeric-filter-menu-input.component.d.ts +12 -26
- package/filtering/menu/numeric-filter-menu.component.d.ts +13 -1
- package/filtering/menu/string-filter-menu-input.component.d.ts +4 -1
- package/filtering/menu/string-filter-menu.component.d.ts +7 -1
- package/index.d.ts +1 -0
- package/localization/messages.d.ts +79 -3
- package/navigation/logical-cell.directive.d.ts +2 -1
- package/package.json +18 -18
- package/rendering/header/header.component.d.ts +43 -10
- package/schematics/ngAdd/index.js +3 -3
package/column-menu/utils.d.ts
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
* Copyright © 2025 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 { TreeListComponent } from "../treelist.component";
|
5
6
|
/**
|
6
7
|
* @hidden
|
7
8
|
*/
|
@@ -18,6 +19,18 @@ export declare const hasLock: (settings: any, column: any) => boolean;
|
|
18
19
|
* @hidden
|
19
20
|
*/
|
20
21
|
export declare const hasColumnChooser: (settings: any) => boolean;
|
22
|
+
/**
|
23
|
+
* @hidden
|
24
|
+
*/
|
25
|
+
export declare const hasAutoSizeColumn: (settings: any) => boolean;
|
26
|
+
/**
|
27
|
+
* @hidden
|
28
|
+
*/
|
29
|
+
export declare const hasAutoSizeAllColumns: (settings: any) => boolean;
|
30
|
+
/**
|
31
|
+
* @hidden
|
32
|
+
*/
|
33
|
+
export declare const autoSizeColumn: (treelist: TreeListComponent, service: any, column?: any) => void;
|
21
34
|
/**
|
22
35
|
* @hidden
|
23
36
|
*/
|
@@ -27,6 +27,18 @@ export type ColumnSortSettings = boolean | {
|
|
27
27
|
*/
|
28
28
|
initialDirection?: 'asc' | 'desc';
|
29
29
|
};
|
30
|
+
/**
|
31
|
+
* Specifies a modifier key when multiple sort.
|
32
|
+
*
|
33
|
+
* @example
|
34
|
+
* ```html
|
35
|
+
* <kendo-treelist [sortable]="{ mode: 'multiple', multiSortKey: 'shift' }">
|
36
|
+
* <kendo-treelist-column field="ProductID"></kendo-treelist-column>
|
37
|
+
* ...
|
38
|
+
* </kendo-treelist>
|
39
|
+
* ```
|
40
|
+
*/
|
41
|
+
export type ModifierKey = 'none' | 'ctrl' | 'shift' | 'alt';
|
30
42
|
/**
|
31
43
|
* Defines the settings for sorting the TreeList.
|
32
44
|
*
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
5
|
+
/**
|
6
|
+
* @hidden
|
7
|
+
*/
|
8
|
+
export declare const ColumnMenuErrorMessages: any;
|
package/common/id.service.d.ts
CHANGED
@@ -10,6 +10,9 @@ export declare class IdService {
|
|
10
10
|
private prefix;
|
11
11
|
constructor();
|
12
12
|
cellId(rowIndex: number, colIndex: number): string;
|
13
|
+
gridId(): string;
|
14
|
+
selectionCheckboxId(itemIndex: any): string;
|
15
|
+
selectAllCheckboxId(): string;
|
13
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<IdService, never>;
|
14
17
|
static ɵprov: i0.ɵɵInjectableDeclaration<IdService>;
|
15
18
|
}
|
@@ -5,6 +5,7 @@
|
|
5
5
|
import { Renderer2 } from '@angular/core';
|
6
6
|
import type { TreeListComponent } from '../treelist.component';
|
7
7
|
import { TreeListToolbarNavigationService } from '../rendering/toolbar/toolbar-navigation.service';
|
8
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
8
9
|
import * as i0 from "@angular/core";
|
9
10
|
/**
|
10
11
|
* @hidden
|
@@ -16,10 +17,11 @@ import * as i0 from "@angular/core";
|
|
16
17
|
* and a avoids dependency cycles between components.
|
17
18
|
*/
|
18
19
|
export declare class ContextService {
|
20
|
+
localization: LocalizationService;
|
19
21
|
treelist: TreeListComponent;
|
20
22
|
topToolbarNavigation: TreeListToolbarNavigationService;
|
21
23
|
bottomToolbarNavigation: TreeListToolbarNavigationService;
|
22
|
-
constructor(renderer: Renderer2);
|
24
|
+
constructor(renderer: Renderer2, localization: LocalizationService);
|
23
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<ContextService, never>;
|
24
26
|
static ɵprov: i0.ɵɵInjectableDeclaration<ContextService>;
|
25
27
|
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
5
|
+
import { ContentChild, Directive, ElementRef, HostBinding, Input } from '@angular/core';
|
6
|
+
import { CheckBoxComponent } from '@progress/kendo-angular-inputs';
|
7
|
+
import { Subscription } from 'rxjs';
|
8
|
+
import * as i0 from "@angular/core";
|
9
|
+
/**
|
10
|
+
* @hidden
|
11
|
+
*/
|
12
|
+
export class ColumnMenuChooserItemCheckedDirective {
|
13
|
+
host;
|
14
|
+
kendoColumnMenuChooserItemChecked;
|
15
|
+
checkbox;
|
16
|
+
checkedChangeSub = new Subscription();
|
17
|
+
constructor(host) {
|
18
|
+
this.host = host;
|
19
|
+
}
|
20
|
+
ngAfterViewInit() {
|
21
|
+
this.checkedChangeSub.add(this.checkbox.checkedStateChange.subscribe(() => {
|
22
|
+
this.kendoColumnMenuChooserItemChecked = this.checkbox.checkedState === true;
|
23
|
+
}));
|
24
|
+
}
|
25
|
+
ngOnDestroy() {
|
26
|
+
this.checkedChangeSub.unsubscribe();
|
27
|
+
}
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnMenuChooserItemCheckedDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
29
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ColumnMenuChooserItemCheckedDirective, isStandalone: true, selector: "[kendoColumnMenuChooserItemChecked]", inputs: { kendoColumnMenuChooserItemChecked: "kendoColumnMenuChooserItemChecked" }, host: { properties: { "attr.aria-checked": "this.kendoColumnMenuChooserItemChecked" } }, queries: [{ propertyName: "checkbox", first: true, predicate: CheckBoxComponent, descendants: true }], ngImport: i0 });
|
30
|
+
}
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnMenuChooserItemCheckedDirective, decorators: [{
|
32
|
+
type: Directive,
|
33
|
+
args: [{
|
34
|
+
selector: '[kendoColumnMenuChooserItemChecked]',
|
35
|
+
standalone: true
|
36
|
+
}]
|
37
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { kendoColumnMenuChooserItemChecked: [{
|
38
|
+
type: HostBinding,
|
39
|
+
args: ['attr.aria-checked']
|
40
|
+
}, {
|
41
|
+
type: Input
|
42
|
+
}], checkbox: [{
|
43
|
+
type: ContentChild,
|
44
|
+
args: [CheckBoxComponent]
|
45
|
+
}] } });
|
@@ -2,10 +2,10 @@
|
|
2
2
|
* Copyright © 2025 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, Input, NgZone, Renderer2, ChangeDetectorRef } from '@angular/core';
|
5
|
+
import { Component, Input, NgZone, Renderer2, ChangeDetectorRef, ViewChild } from '@angular/core';
|
6
6
|
import { PopupService } from '@progress/kendo-angular-popup';
|
7
7
|
import { LocalizationService } from "@progress/kendo-angular-l10n";
|
8
|
-
import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
8
|
+
import { guid, isDocumentAvailable, Keys } from '@progress/kendo-angular-common';
|
9
9
|
import { columnsIcon } from '@progress/kendo-svg-icons';
|
10
10
|
import { ButtonComponent } from '@progress/kendo-angular-buttons';
|
11
11
|
import { ColumnInfoService } from '../common/column-info.service';
|
@@ -16,8 +16,9 @@ import * as i1 from "@progress/kendo-angular-l10n";
|
|
16
16
|
import * as i2 from "../common/column-info.service";
|
17
17
|
import * as i3 from "@progress/kendo-angular-popup";
|
18
18
|
/**
|
19
|
-
* Represents the component for selecting columns in the TreeList.
|
20
|
-
*
|
19
|
+
* Represents the component for selecting columns in the TreeList.
|
20
|
+
* To show and hide the columns without including the column chooser item in the [Column Menu](slug:columnmenu_treelist),
|
21
|
+
* add the component inside the [`ToolbarTemplate`]({% slug api_treelist_toolbartemplatedirective %}) directive.
|
21
22
|
*
|
22
23
|
* @example
|
23
24
|
* ```html
|
@@ -37,20 +38,26 @@ export class ColumnChooserComponent {
|
|
37
38
|
changeDetector;
|
38
39
|
/**
|
39
40
|
* Specifies if the changes in the visibility of the column will be immediately applied.
|
41
|
+
*
|
40
42
|
* @default false
|
41
43
|
*/
|
42
44
|
autoSync = false;
|
43
45
|
/**
|
44
46
|
* Specifies if all columns can be hidden.
|
47
|
+
*
|
45
48
|
* @default true
|
46
49
|
*/
|
47
50
|
allowHideAll = true;
|
51
|
+
anchor;
|
52
|
+
columnList;
|
48
53
|
get columns() {
|
49
54
|
return this.columnInfoService.leafNamedColumns;
|
50
55
|
}
|
51
56
|
columnsIcon = columnsIcon;
|
52
57
|
popupRef;
|
58
|
+
popupId;
|
53
59
|
closeClick;
|
60
|
+
escapeListener;
|
54
61
|
constructor(localization, columnInfoService, popupService, ngZone, renderer, changeDetector) {
|
55
62
|
this.localization = localization;
|
56
63
|
this.columnInfoService = columnInfoService;
|
@@ -75,13 +82,30 @@ export class ColumnChooserComponent {
|
|
75
82
|
anchorAlign: { vertical: 'bottom', horizontal: direction },
|
76
83
|
popupAlign: { vertical: 'top', horizontal: direction }
|
77
84
|
});
|
78
|
-
|
85
|
+
const popupElement = this.popupRef?.popupElement;
|
86
|
+
if (popupElement) {
|
87
|
+
const popupId = `k-${guid()}`;
|
88
|
+
const popupAriaElement = popupElement.querySelector('.k-popup');
|
89
|
+
this.ngZone.runOutsideAngular(() => {
|
90
|
+
this.escapeListener = this.renderer.listen(popupAriaElement, 'keydown', (e) => {
|
91
|
+
if (e.keyCode === Keys.Escape) {
|
92
|
+
this.close(true);
|
93
|
+
}
|
94
|
+
});
|
95
|
+
});
|
96
|
+
this.renderer.setAttribute(popupElement, 'dir', this.localization.rtl ? 'rtl' : 'ltr');
|
97
|
+
this.renderer.setAttribute(popupAriaElement, 'id', popupId);
|
98
|
+
this.renderer.setAttribute(popupAriaElement, 'role', 'dialog');
|
99
|
+
this.popupId = popupId;
|
100
|
+
}
|
79
101
|
if (!isDocumentAvailable()) {
|
80
102
|
return;
|
81
103
|
}
|
82
104
|
this.ngZone.runOutsideAngular(() => this.closeClick = this.renderer.listen('document', 'click', ({ target }) => {
|
83
105
|
if (!closest(target, node => node === this.popupRef.popupElement || node === anchor.element)) {
|
84
|
-
this.
|
106
|
+
this.ngZone.run(() => {
|
107
|
+
this.close();
|
108
|
+
});
|
85
109
|
}
|
86
110
|
}));
|
87
111
|
}
|
@@ -93,7 +117,7 @@ export class ColumnChooserComponent {
|
|
93
117
|
* @hidden
|
94
118
|
*/
|
95
119
|
onApply(changed) {
|
96
|
-
this.close();
|
120
|
+
this.close(true);
|
97
121
|
if (changed.length) {
|
98
122
|
this.changeDetector.markForCheck();
|
99
123
|
this.columnInfoService.changeVisibility(changed);
|
@@ -106,13 +130,24 @@ export class ColumnChooserComponent {
|
|
106
130
|
this.changeDetector.markForCheck();
|
107
131
|
this.columnInfoService.changeVisibility(changed);
|
108
132
|
}
|
109
|
-
|
133
|
+
/**
|
134
|
+
* @hidden
|
135
|
+
*/
|
136
|
+
onShiftTab(e) {
|
137
|
+
if (e.target.matches('.k-column-list-item')) {
|
138
|
+
e.preventDefault();
|
139
|
+
this.columnList.resetButton.nativeElement.focus();
|
140
|
+
}
|
141
|
+
}
|
142
|
+
close(focusAnchor = false) {
|
110
143
|
if (this.popupRef) {
|
111
144
|
this.popupRef.close();
|
112
145
|
this.popupRef = null;
|
113
146
|
this.changeDetector.markForCheck();
|
147
|
+
this.escapeListener?.();
|
114
148
|
}
|
115
149
|
this.detachClose();
|
150
|
+
focusAnchor && this.anchor.element.focus();
|
116
151
|
}
|
117
152
|
detachClose() {
|
118
153
|
if (this.closeClick) {
|
@@ -121,7 +156,7 @@ export class ColumnChooserComponent {
|
|
121
156
|
}
|
122
157
|
}
|
123
158
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnChooserComponent, deps: [{ token: i1.LocalizationService }, { token: i2.ColumnInfoService }, { token: i3.PopupService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
124
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ColumnChooserComponent, isStandalone: true, selector: "kendo-treelist-column-chooser", inputs: { autoSync: "autoSync", allowHideAll: "allowHideAll" }, ngImport: i0, template: `
|
159
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ColumnChooserComponent, isStandalone: true, selector: "kendo-treelist-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: `
|
125
160
|
<button #anchor
|
126
161
|
kendoButton
|
127
162
|
type="button"
|
@@ -129,20 +164,27 @@ export class ColumnChooserComponent {
|
|
129
164
|
fillMode="flat"
|
130
165
|
[attr.title]="localization.get('columns')"
|
131
166
|
icon="columns"
|
132
|
-
[svgIcon]="columnsIcon"
|
167
|
+
[svgIcon]="columnsIcon"
|
168
|
+
[attr.aria-haspopup]="'dialog'"
|
169
|
+
[attr.aria-expanded]="!!(popupRef)"
|
170
|
+
[attr.aria-controls]="!!(popupRef) ? popupId : undefined"></button>
|
133
171
|
<ng-template #template>
|
134
172
|
<span class='k-column-chooser-title'>{{ localization.get('columns') }}</span>
|
135
173
|
<kendo-treelist-columnlist
|
174
|
+
#columnList
|
136
175
|
[columns]="columns"
|
176
|
+
[ariaLabel]="localization.get('columns')"
|
177
|
+
[isLast]="true"
|
137
178
|
[applyText]="localization.get('columnsApply')"
|
138
179
|
[resetText]="localization.get('columnsReset')"
|
139
180
|
[autoSync]="autoSync"
|
140
181
|
[allowHideAll]="allowHideAll"
|
141
182
|
(apply)="onApply($event)"
|
142
|
-
(columnChange)="onChange($event)"
|
183
|
+
(columnChange)="onChange($event)"
|
184
|
+
(keydown.shift.tab)="onShiftTab($event)">
|
143
185
|
</kendo-treelist-columnlist>
|
144
186
|
</ng-template>
|
145
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: ColumnListComponent, selector: "kendo-treelist-columnlist", inputs: ["columns", "autoSync", "allowHideAll", "applyText", "resetText", "actionsClass"], outputs: ["reset", "apply", "columnChange"] }] });
|
187
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: ColumnListComponent, selector: "kendo-treelist-columnlist", inputs: ["columns", "autoSync", "ariaLabel", "allowHideAll", "applyText", "resetText", "actionsClass", "isLast", "isExpanded", "service"], outputs: ["reset", "apply", "columnChange"] }] });
|
146
188
|
}
|
147
189
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnChooserComponent, decorators: [{
|
148
190
|
type: Component,
|
@@ -156,17 +198,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
156
198
|
fillMode="flat"
|
157
199
|
[attr.title]="localization.get('columns')"
|
158
200
|
icon="columns"
|
159
|
-
[svgIcon]="columnsIcon"
|
201
|
+
[svgIcon]="columnsIcon"
|
202
|
+
[attr.aria-haspopup]="'dialog'"
|
203
|
+
[attr.aria-expanded]="!!(popupRef)"
|
204
|
+
[attr.aria-controls]="!!(popupRef) ? popupId : undefined"></button>
|
160
205
|
<ng-template #template>
|
161
206
|
<span class='k-column-chooser-title'>{{ localization.get('columns') }}</span>
|
162
207
|
<kendo-treelist-columnlist
|
208
|
+
#columnList
|
163
209
|
[columns]="columns"
|
210
|
+
[ariaLabel]="localization.get('columns')"
|
211
|
+
[isLast]="true"
|
164
212
|
[applyText]="localization.get('columnsApply')"
|
165
213
|
[resetText]="localization.get('columnsReset')"
|
166
214
|
[autoSync]="autoSync"
|
167
215
|
[allowHideAll]="allowHideAll"
|
168
216
|
(apply)="onApply($event)"
|
169
|
-
(columnChange)="onChange($event)"
|
217
|
+
(columnChange)="onChange($event)"
|
218
|
+
(keydown.shift.tab)="onShiftTab($event)">
|
170
219
|
</kendo-treelist-columnlist>
|
171
220
|
</ng-template>
|
172
221
|
`,
|
@@ -177,4 +226,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
177
226
|
type: Input
|
178
227
|
}], allowHideAll: [{
|
179
228
|
type: Input
|
229
|
+
}], anchor: [{
|
230
|
+
type: ViewChild,
|
231
|
+
args: ['anchor']
|
232
|
+
}], columnList: [{
|
233
|
+
type: ViewChild,
|
234
|
+
args: ['columnList']
|
180
235
|
}] } });
|
@@ -0,0 +1,40 @@
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
5
|
+
import { Injectable, Renderer2 } from '@angular/core';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
/**
|
8
|
+
* @hidden
|
9
|
+
*/
|
10
|
+
export class ColumnListKeyboardNavigation {
|
11
|
+
renderer;
|
12
|
+
items;
|
13
|
+
activeIndex = 0;
|
14
|
+
constructor(renderer) {
|
15
|
+
this.renderer = renderer;
|
16
|
+
}
|
17
|
+
next() {
|
18
|
+
this.toggle(this.activeIndex, false);
|
19
|
+
this.activeIndex = Math.min(this.activeIndex + 1, this.items.length - 1);
|
20
|
+
this.toggle(this.activeIndex, true);
|
21
|
+
}
|
22
|
+
prev() {
|
23
|
+
this.toggle(this.activeIndex, false);
|
24
|
+
this.activeIndex = Math.max(this.activeIndex - 1, 0);
|
25
|
+
this.toggle(this.activeIndex, true);
|
26
|
+
}
|
27
|
+
toggle(index, active) {
|
28
|
+
const element = this.items[index]?.host.nativeElement;
|
29
|
+
element && this.renderer.setAttribute(this.items[index].host.nativeElement, 'tabindex', active ? '0' : '-1');
|
30
|
+
active && element?.focus();
|
31
|
+
}
|
32
|
+
toggleCheckedState() {
|
33
|
+
this.items[this.activeIndex].host.nativeElement.firstElementChild.click();
|
34
|
+
}
|
35
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnListKeyboardNavigation, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
36
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnListKeyboardNavigation });
|
37
|
+
}
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnListKeyboardNavigation, decorators: [{
|
39
|
+
type: Injectable
|
40
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }]; } });
|