@progress/kendo-angular-grid 20.0.4-develop.2 → 20.1.0-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/adaptiveness/adaptive-renderer.component.d.ts +2 -3
- package/column-menu/column-chooser-content.component.d.ts +60 -0
- package/column-menu/column-chooser.component.d.ts +15 -4
- package/column-menu/column-list-kb-nav.service.d.ts +2 -2
- package/column-menu/column-list.component.d.ts +30 -21
- package/column-menu/column-menu-chooser.component.d.ts +2 -7
- package/column-menu/column-menu.component.d.ts +0 -4
- package/columns/column-base.d.ts +8 -0
- package/directives.d.ts +1 -2
- package/esm2022/adaptiveness/adaptive-renderer.component.mjs +26 -46
- package/esm2022/column-menu/column-chooser-content.component.mjs +306 -0
- package/esm2022/column-menu/column-chooser.component.mjs +39 -31
- package/esm2022/column-menu/column-list-kb-nav.service.mjs +3 -3
- package/esm2022/column-menu/column-list.component.mjs +258 -177
- package/esm2022/column-menu/column-menu-chooser.component.mjs +17 -36
- package/esm2022/column-menu/column-menu.component.mjs +12 -28
- package/esm2022/columns/column-base.mjs +8 -0
- package/esm2022/common/column-info.service.mjs +3 -0
- package/esm2022/directives.mjs +0 -2
- package/esm2022/grid.component.mjs +6 -0
- package/esm2022/grid.module.mjs +47 -48
- package/esm2022/localization/messages.mjs +12 -1
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/rendering/toolbar/tools/column-chooser-tool.directive.mjs +38 -12
- package/fesm2022/progress-kendo-angular-grid.mjs +702 -367
- package/grid.module.d.ts +46 -47
- package/localization/messages.d.ts +10 -1
- package/package.json +21 -21
- package/rendering/toolbar/tools/column-chooser-tool.directive.d.ts +13 -1
- package/schematics/ngAdd/index.js +4 -4
- package/column-menu/column-chooser-item-checked.directive.d.ts +0 -21
- package/esm2022/column-menu/column-chooser-item-checked.directive.mjs +0 -45
|
@@ -0,0 +1,306 @@
|
|
|
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 { Component, Input, ChangeDetectorRef, ViewChild, EventEmitter, Output, ElementRef, Optional } from '@angular/core';
|
|
6
|
+
import { ColumnInfoService } from '../common/column-info.service';
|
|
7
|
+
import { EventsOutsideAngularDirective, PrefixTemplateDirective, replaceMessagePlaceholder } from '@progress/kendo-angular-common';
|
|
8
|
+
import { arrowRotateCcwIcon, checkIcon, searchIcon } from '@progress/kendo-svg-icons';
|
|
9
|
+
import { ButtonComponent } from '@progress/kendo-angular-buttons';
|
|
10
|
+
import { ColumnListComponent } from './column-list.component';
|
|
11
|
+
import { TextBoxComponent } from '@progress/kendo-angular-inputs';
|
|
12
|
+
import { NgClass, NgIf } from '@angular/common';
|
|
13
|
+
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
14
|
+
import { ColumnMenuService } from './column-menu.service';
|
|
15
|
+
import { ContextService } from '../common/provider.service';
|
|
16
|
+
import { filterBy } from '@progress/kendo-data-query';
|
|
17
|
+
import * as i0 from "@angular/core";
|
|
18
|
+
import * as i1 from "../common/column-info.service";
|
|
19
|
+
import * as i2 from "../common/provider.service";
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
export class ColumnChooserContentComponent {
|
|
24
|
+
cdr;
|
|
25
|
+
columnInfoService;
|
|
26
|
+
ctx;
|
|
27
|
+
resetButton;
|
|
28
|
+
applyButton;
|
|
29
|
+
columnList;
|
|
30
|
+
filterInput;
|
|
31
|
+
filterable = true;
|
|
32
|
+
showSelectAll = true;
|
|
33
|
+
showCheckedCount = true;
|
|
34
|
+
allowHideAll = false;
|
|
35
|
+
autoSync = false;
|
|
36
|
+
actionsClass = 'k-actions k-actions-stretched k-actions-horizontal';
|
|
37
|
+
closeOnReset = true;
|
|
38
|
+
set columns(value) {
|
|
39
|
+
this._columns = value;
|
|
40
|
+
}
|
|
41
|
+
get columns() {
|
|
42
|
+
return this._columns;
|
|
43
|
+
}
|
|
44
|
+
isLast;
|
|
45
|
+
isExpanded;
|
|
46
|
+
service;
|
|
47
|
+
close = new EventEmitter();
|
|
48
|
+
get selectedItemsText() {
|
|
49
|
+
const count = this.columnList?.checkedCheckboxesLength || 0;
|
|
50
|
+
const localizedMessage = this.messageFor('columnChooserSelectedColumnsCount');
|
|
51
|
+
return replaceMessagePlaceholder(localizedMessage, 'selectedColumnsCount', count.toString());
|
|
52
|
+
}
|
|
53
|
+
get actionSheetOpened() {
|
|
54
|
+
return this.ctx?.grid?.isActionSheetExpanded;
|
|
55
|
+
}
|
|
56
|
+
searchIcon = searchIcon;
|
|
57
|
+
checkIcon = checkIcon;
|
|
58
|
+
arrowRotateCcwIcon = arrowRotateCcwIcon;
|
|
59
|
+
applyText;
|
|
60
|
+
resetText;
|
|
61
|
+
filteredColumns = [];
|
|
62
|
+
isFiltered = false;
|
|
63
|
+
_columns = [];
|
|
64
|
+
constructor(cdr, columnInfoService, ctx) {
|
|
65
|
+
this.cdr = cdr;
|
|
66
|
+
this.columnInfoService = columnInfoService;
|
|
67
|
+
this.ctx = ctx;
|
|
68
|
+
}
|
|
69
|
+
ngOnInit() {
|
|
70
|
+
this.applyText = this.ctx?.localization.get('columnsApply');
|
|
71
|
+
this.resetText = this.ctx?.localization.get('columnsReset');
|
|
72
|
+
}
|
|
73
|
+
ngAfterViewInit() {
|
|
74
|
+
this.filteredColumns = this.columnInfoService?.leafNamedColumns.filter(column => {
|
|
75
|
+
if (column.includeInChooser !== false) {
|
|
76
|
+
column.initiallyChecked = column.currentlyChecked = !column.hidden;
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
return false;
|
|
80
|
+
});
|
|
81
|
+
this.cdr.detectChanges();
|
|
82
|
+
}
|
|
83
|
+
ngAfterViewChecked() {
|
|
84
|
+
this.columnList.resetButton = this.resetButton;
|
|
85
|
+
this.columnList.applyButton = this.applyButton;
|
|
86
|
+
this.columnList.filterInput = this.filterInput;
|
|
87
|
+
}
|
|
88
|
+
onFilter(value) {
|
|
89
|
+
this.isFiltered = value.length > 0;
|
|
90
|
+
this.showSelectAll = !this.isFiltered;
|
|
91
|
+
const filterDescriptor = {
|
|
92
|
+
field: 'displayTitle',
|
|
93
|
+
operator: 'contains',
|
|
94
|
+
value: value
|
|
95
|
+
};
|
|
96
|
+
this.filteredColumns = filterBy(this.columnInfoService?.leafNamedColumns, filterDescriptor);
|
|
97
|
+
this.cdr.detectChanges();
|
|
98
|
+
this.columnList.listNavigationService.activeIndex = 0;
|
|
99
|
+
this.columnList.listNavigationService.items = this.columnList.checkboxes?.toArray();
|
|
100
|
+
}
|
|
101
|
+
messageFor = token => this.ctx?.localization.get(token);
|
|
102
|
+
onChange(changed) {
|
|
103
|
+
this.cdr.markForCheck();
|
|
104
|
+
this.columnInfoService?.changeVisibility(changed);
|
|
105
|
+
}
|
|
106
|
+
applyChanges() {
|
|
107
|
+
this.columnList.applyChanges();
|
|
108
|
+
this.close.emit();
|
|
109
|
+
}
|
|
110
|
+
cancelChanges() {
|
|
111
|
+
this.columnList.cancelChanges();
|
|
112
|
+
if (this.closeOnReset) {
|
|
113
|
+
this.close.emit();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
onTab(e) {
|
|
117
|
+
if (e.key === 'Tab' && !e.shiftKey) {
|
|
118
|
+
this.columnList.listNavigationService.toggle(this.columnList.listNavigationService.activeIndex, true);
|
|
119
|
+
e.preventDefault();
|
|
120
|
+
}
|
|
121
|
+
if (e.key === 'Tab' && e.shiftKey && !this.service) {
|
|
122
|
+
this.columnList.resetButton?.nativeElement.focus();
|
|
123
|
+
e.preventDefault();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
onApplyButtonKeydown(e) {
|
|
127
|
+
if (e.key === 'Tab') {
|
|
128
|
+
this.columnList.focusActiveColumn(e);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnChooserContentComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.ColumnInfoService, optional: true }, { token: i2.ContextService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
132
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ColumnChooserContentComponent, isStandalone: true, selector: "kendo-grid-column-chooser-content", inputs: { filterable: "filterable", showSelectAll: "showSelectAll", showCheckedCount: "showCheckedCount", allowHideAll: "allowHideAll", autoSync: "autoSync", actionsClass: "actionsClass", closeOnReset: "closeOnReset", columns: "columns", isLast: "isLast", isExpanded: "isExpanded", service: "service" }, outputs: { close: "close" }, viewQueries: [{ propertyName: "resetButton", first: true, predicate: ["resetButton"], descendants: true }, { propertyName: "applyButton", first: true, predicate: ["applyButton"], descendants: true }, { propertyName: "columnList", first: true, predicate: ["columnList"], descendants: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true }], ngImport: i0, template: `
|
|
133
|
+
<form class="k-filter-menu">
|
|
134
|
+
<div class="k-filter-menu-container">
|
|
135
|
+
<kendo-textbox
|
|
136
|
+
#filterInput
|
|
137
|
+
*ngIf="filterable"
|
|
138
|
+
class="k-searchbox"
|
|
139
|
+
(valueChange)="onFilter($event)"
|
|
140
|
+
[kendoEventsOutsideAngular]="{'keydown': onTab}"
|
|
141
|
+
[scope]="this"
|
|
142
|
+
>
|
|
143
|
+
<ng-template kendoPrefixTemplate>
|
|
144
|
+
<kendo-icon-wrapper
|
|
145
|
+
[name]="'search'"
|
|
146
|
+
[svgIcon]="searchIcon">
|
|
147
|
+
</kendo-icon-wrapper>
|
|
148
|
+
</ng-template>
|
|
149
|
+
</kendo-textbox>
|
|
150
|
+
<kendo-grid-columnlist
|
|
151
|
+
#columnList
|
|
152
|
+
[columns]="columns"
|
|
153
|
+
[filteredColumns]="filteredColumns"
|
|
154
|
+
[ariaLabel]="messageFor('columns')"
|
|
155
|
+
[showSelectAll]="showSelectAll"
|
|
156
|
+
[isLast]="isLast"
|
|
157
|
+
[isFiltered]="isFiltered"
|
|
158
|
+
[filterable]="filterable"
|
|
159
|
+
[isExpanded]="isExpanded"
|
|
160
|
+
[service]="service"
|
|
161
|
+
[applyText]="messageFor('columnsApply')"
|
|
162
|
+
[resetText]="messageFor('columnsReset')"
|
|
163
|
+
[autoSync]="autoSync"
|
|
164
|
+
[allowHideAll]="allowHideAll"
|
|
165
|
+
(columnChange)="onChange($event)"
|
|
166
|
+
>
|
|
167
|
+
</kendo-grid-columnlist>
|
|
168
|
+
<div *ngIf="showCheckedCount" class="k-filter-selected-items">
|
|
169
|
+
{{selectedItemsText}}
|
|
170
|
+
</div>
|
|
171
|
+
<div [ngClass]="actionsClass" *ngIf="!autoSync && !actionSheetOpened">
|
|
172
|
+
<button
|
|
173
|
+
#applyButton
|
|
174
|
+
kendoButton
|
|
175
|
+
type="button"
|
|
176
|
+
icon="check"
|
|
177
|
+
[svgIcon]="checkIcon"
|
|
178
|
+
themeColor="primary"
|
|
179
|
+
(click)="applyChanges()"
|
|
180
|
+
(keydown)="onApplyButtonKeydown($event)"
|
|
181
|
+
>{{ applyText }}</button>
|
|
182
|
+
<button
|
|
183
|
+
#resetButton
|
|
184
|
+
kendoButton
|
|
185
|
+
type="button"
|
|
186
|
+
icon="reset"
|
|
187
|
+
(keydown.tab)="columnList.onTab($event)"
|
|
188
|
+
[svgIcon]="arrowRotateCcwIcon"
|
|
189
|
+
(click)="cancelChanges()"
|
|
190
|
+
>{{ resetText }}</button>
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
</form>
|
|
194
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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-grid-columnlist", inputs: ["columns", "filteredColumns", "autoSync", "showSelectAll", "isFiltered", "ariaLabel", "allowHideAll", "applyText", "resetText", "isLast", "isExpanded", "service", "filterable"], outputs: ["reset", "apply", "columnChange"] }, { kind: "component", type: TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { kind: "directive", type: PrefixTemplateDirective, selector: "[kendoPrefixTemplate]", inputs: ["showSeparator"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }] });
|
|
195
|
+
}
|
|
196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnChooserContentComponent, decorators: [{
|
|
197
|
+
type: Component,
|
|
198
|
+
args: [{
|
|
199
|
+
selector: 'kendo-grid-column-chooser-content',
|
|
200
|
+
template: `
|
|
201
|
+
<form class="k-filter-menu">
|
|
202
|
+
<div class="k-filter-menu-container">
|
|
203
|
+
<kendo-textbox
|
|
204
|
+
#filterInput
|
|
205
|
+
*ngIf="filterable"
|
|
206
|
+
class="k-searchbox"
|
|
207
|
+
(valueChange)="onFilter($event)"
|
|
208
|
+
[kendoEventsOutsideAngular]="{'keydown': onTab}"
|
|
209
|
+
[scope]="this"
|
|
210
|
+
>
|
|
211
|
+
<ng-template kendoPrefixTemplate>
|
|
212
|
+
<kendo-icon-wrapper
|
|
213
|
+
[name]="'search'"
|
|
214
|
+
[svgIcon]="searchIcon">
|
|
215
|
+
</kendo-icon-wrapper>
|
|
216
|
+
</ng-template>
|
|
217
|
+
</kendo-textbox>
|
|
218
|
+
<kendo-grid-columnlist
|
|
219
|
+
#columnList
|
|
220
|
+
[columns]="columns"
|
|
221
|
+
[filteredColumns]="filteredColumns"
|
|
222
|
+
[ariaLabel]="messageFor('columns')"
|
|
223
|
+
[showSelectAll]="showSelectAll"
|
|
224
|
+
[isLast]="isLast"
|
|
225
|
+
[isFiltered]="isFiltered"
|
|
226
|
+
[filterable]="filterable"
|
|
227
|
+
[isExpanded]="isExpanded"
|
|
228
|
+
[service]="service"
|
|
229
|
+
[applyText]="messageFor('columnsApply')"
|
|
230
|
+
[resetText]="messageFor('columnsReset')"
|
|
231
|
+
[autoSync]="autoSync"
|
|
232
|
+
[allowHideAll]="allowHideAll"
|
|
233
|
+
(columnChange)="onChange($event)"
|
|
234
|
+
>
|
|
235
|
+
</kendo-grid-columnlist>
|
|
236
|
+
<div *ngIf="showCheckedCount" class="k-filter-selected-items">
|
|
237
|
+
{{selectedItemsText}}
|
|
238
|
+
</div>
|
|
239
|
+
<div [ngClass]="actionsClass" *ngIf="!autoSync && !actionSheetOpened">
|
|
240
|
+
<button
|
|
241
|
+
#applyButton
|
|
242
|
+
kendoButton
|
|
243
|
+
type="button"
|
|
244
|
+
icon="check"
|
|
245
|
+
[svgIcon]="checkIcon"
|
|
246
|
+
themeColor="primary"
|
|
247
|
+
(click)="applyChanges()"
|
|
248
|
+
(keydown)="onApplyButtonKeydown($event)"
|
|
249
|
+
>{{ applyText }}</button>
|
|
250
|
+
<button
|
|
251
|
+
#resetButton
|
|
252
|
+
kendoButton
|
|
253
|
+
type="button"
|
|
254
|
+
icon="reset"
|
|
255
|
+
(keydown.tab)="columnList.onTab($event)"
|
|
256
|
+
[svgIcon]="arrowRotateCcwIcon"
|
|
257
|
+
(click)="cancelChanges()"
|
|
258
|
+
>{{ resetText }}</button>
|
|
259
|
+
</div>
|
|
260
|
+
</div>
|
|
261
|
+
</form>
|
|
262
|
+
`,
|
|
263
|
+
standalone: true,
|
|
264
|
+
imports: [NgIf, NgClass, ButtonComponent, ColumnListComponent, TextBoxComponent, PrefixTemplateDirective, IconWrapperComponent, EventsOutsideAngularDirective]
|
|
265
|
+
}]
|
|
266
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.ColumnInfoService, decorators: [{
|
|
267
|
+
type: Optional
|
|
268
|
+
}] }, { type: i2.ContextService, decorators: [{
|
|
269
|
+
type: Optional
|
|
270
|
+
}] }]; }, propDecorators: { resetButton: [{
|
|
271
|
+
type: ViewChild,
|
|
272
|
+
args: ['resetButton']
|
|
273
|
+
}], applyButton: [{
|
|
274
|
+
type: ViewChild,
|
|
275
|
+
args: ['applyButton']
|
|
276
|
+
}], columnList: [{
|
|
277
|
+
type: ViewChild,
|
|
278
|
+
args: ['columnList']
|
|
279
|
+
}], filterInput: [{
|
|
280
|
+
type: ViewChild,
|
|
281
|
+
args: ['filterInput']
|
|
282
|
+
}], filterable: [{
|
|
283
|
+
type: Input
|
|
284
|
+
}], showSelectAll: [{
|
|
285
|
+
type: Input
|
|
286
|
+
}], showCheckedCount: [{
|
|
287
|
+
type: Input
|
|
288
|
+
}], allowHideAll: [{
|
|
289
|
+
type: Input
|
|
290
|
+
}], autoSync: [{
|
|
291
|
+
type: Input
|
|
292
|
+
}], actionsClass: [{
|
|
293
|
+
type: Input
|
|
294
|
+
}], closeOnReset: [{
|
|
295
|
+
type: Input
|
|
296
|
+
}], columns: [{
|
|
297
|
+
type: Input
|
|
298
|
+
}], isLast: [{
|
|
299
|
+
type: Input
|
|
300
|
+
}], isExpanded: [{
|
|
301
|
+
type: Input
|
|
302
|
+
}], service: [{
|
|
303
|
+
type: Input
|
|
304
|
+
}], close: [{
|
|
305
|
+
type: Output
|
|
306
|
+
}] } });
|
|
@@ -11,6 +11,7 @@ import { columnsIcon } from '@progress/kendo-svg-icons';
|
|
|
11
11
|
import { ButtonComponent } from '@progress/kendo-angular-buttons';
|
|
12
12
|
import { ContextService } from '../common/provider.service';
|
|
13
13
|
import { ColumnListComponent } from './column-list.component';
|
|
14
|
+
import { ColumnChooserContentComponent } from './column-chooser-content.component';
|
|
14
15
|
import * as i0 from "@angular/core";
|
|
15
16
|
import * as i1 from "../common/provider.service";
|
|
16
17
|
import * as i2 from "../common/column-info.service";
|
|
@@ -43,6 +44,18 @@ export class ColumnChooserComponent {
|
|
|
43
44
|
* @default false
|
|
44
45
|
*/
|
|
45
46
|
autoSync = false;
|
|
47
|
+
/**
|
|
48
|
+
* Specifies if the column chooser displays a search box.
|
|
49
|
+
*
|
|
50
|
+
* @default true
|
|
51
|
+
*/
|
|
52
|
+
filterable = true;
|
|
53
|
+
/**
|
|
54
|
+
* Specifies if the column chooser displays a select all checkbox.
|
|
55
|
+
*
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
showSelectAll = true;
|
|
46
59
|
/**
|
|
47
60
|
* Specifies if all columns can be hidden.
|
|
48
61
|
*
|
|
@@ -118,16 +131,6 @@ export class ColumnChooserComponent {
|
|
|
118
131
|
this.close();
|
|
119
132
|
}
|
|
120
133
|
}
|
|
121
|
-
/**
|
|
122
|
-
* @hidden
|
|
123
|
-
*/
|
|
124
|
-
onApply(changed) {
|
|
125
|
-
this.close(true);
|
|
126
|
-
if (changed.length) {
|
|
127
|
-
this.changeDetector.markForCheck();
|
|
128
|
-
this.columnInfoService.changeVisibility(changed);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
134
|
/**
|
|
132
135
|
* @hidden
|
|
133
136
|
*/
|
|
@@ -135,6 +138,9 @@ export class ColumnChooserComponent {
|
|
|
135
138
|
this.changeDetector.markForCheck();
|
|
136
139
|
this.columnInfoService.changeVisibility(changed);
|
|
137
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* @hidden
|
|
143
|
+
*/
|
|
138
144
|
close(focusAnchor = false) {
|
|
139
145
|
if (this.popupRef) {
|
|
140
146
|
this.popupRef.close();
|
|
@@ -152,7 +158,7 @@ export class ColumnChooserComponent {
|
|
|
152
158
|
}
|
|
153
159
|
}
|
|
154
160
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnChooserComponent, deps: [{ token: i1.ContextService }, { token: i2.ColumnInfoService }, { token: i3.PopupService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
155
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ColumnChooserComponent, isStandalone: true, 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: `
|
|
161
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ColumnChooserComponent, isStandalone: true, selector: "kendo-grid-column-chooser", inputs: { autoSync: "autoSync", filterable: "filterable", showSelectAll: "showSelectAll", allowHideAll: "allowHideAll" }, viewQueries: [{ propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true }, { propertyName: "columnList", first: true, predicate: ["columnList"], descendants: true }], ngImport: i0, template: `
|
|
156
162
|
<button #anchor
|
|
157
163
|
kendoButton
|
|
158
164
|
type="button"
|
|
@@ -165,20 +171,19 @@ export class ColumnChooserComponent {
|
|
|
165
171
|
[attr.aria-expanded]="!!(popupRef)"
|
|
166
172
|
[attr.aria-controls]="!!(popupRef) ? popupId : undefined"></button>
|
|
167
173
|
<ng-template #template>
|
|
168
|
-
<kendo-grid-
|
|
169
|
-
#columnList
|
|
174
|
+
<kendo-grid-column-chooser-content
|
|
170
175
|
[columns]="columns"
|
|
171
|
-
[ariaLabel]="messageFor('columns')"
|
|
172
|
-
[isLast]="true"
|
|
173
|
-
[applyText]="messageFor('columnsApply')"
|
|
174
|
-
[resetText]="messageFor('columnsReset')"
|
|
175
176
|
[autoSync]="autoSync"
|
|
177
|
+
[filterable]="filterable"
|
|
178
|
+
[showSelectAll]="showSelectAll"
|
|
179
|
+
[closeOnReset]="false"
|
|
180
|
+
[isLast]="true"
|
|
176
181
|
[allowHideAll]="allowHideAll"
|
|
177
|
-
(
|
|
178
|
-
|
|
179
|
-
</kendo-grid-
|
|
182
|
+
(close)="close(true)"
|
|
183
|
+
>
|
|
184
|
+
</kendo-grid-column-chooser-content>
|
|
180
185
|
</ng-template>
|
|
181
|
-
`, 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:
|
|
186
|
+
`, 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: ColumnChooserContentComponent, selector: "kendo-grid-column-chooser-content", inputs: ["filterable", "showSelectAll", "showCheckedCount", "allowHideAll", "autoSync", "actionsClass", "closeOnReset", "columns", "isLast", "isExpanded", "service"], outputs: ["close"] }] });
|
|
182
187
|
}
|
|
183
188
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnChooserComponent, decorators: [{
|
|
184
189
|
type: Component,
|
|
@@ -197,25 +202,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
197
202
|
[attr.aria-expanded]="!!(popupRef)"
|
|
198
203
|
[attr.aria-controls]="!!(popupRef) ? popupId : undefined"></button>
|
|
199
204
|
<ng-template #template>
|
|
200
|
-
<kendo-grid-
|
|
201
|
-
#columnList
|
|
205
|
+
<kendo-grid-column-chooser-content
|
|
202
206
|
[columns]="columns"
|
|
203
|
-
[ariaLabel]="messageFor('columns')"
|
|
204
|
-
[isLast]="true"
|
|
205
|
-
[applyText]="messageFor('columnsApply')"
|
|
206
|
-
[resetText]="messageFor('columnsReset')"
|
|
207
207
|
[autoSync]="autoSync"
|
|
208
|
+
[filterable]="filterable"
|
|
209
|
+
[showSelectAll]="showSelectAll"
|
|
210
|
+
[closeOnReset]="false"
|
|
211
|
+
[isLast]="true"
|
|
208
212
|
[allowHideAll]="allowHideAll"
|
|
209
|
-
(
|
|
210
|
-
|
|
211
|
-
</kendo-grid-
|
|
213
|
+
(close)="close(true)"
|
|
214
|
+
>
|
|
215
|
+
</kendo-grid-column-chooser-content>
|
|
212
216
|
</ng-template>
|
|
213
217
|
`,
|
|
214
218
|
standalone: true,
|
|
215
|
-
imports: [ButtonComponent, ColumnListComponent]
|
|
219
|
+
imports: [ButtonComponent, ColumnListComponent, ColumnChooserContentComponent]
|
|
216
220
|
}]
|
|
217
221
|
}], ctorParameters: function () { return [{ type: i1.ContextService }, { type: i2.ColumnInfoService }, { type: i3.PopupService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { autoSync: [{
|
|
218
222
|
type: Input
|
|
223
|
+
}], filterable: [{
|
|
224
|
+
type: Input
|
|
225
|
+
}], showSelectAll: [{
|
|
226
|
+
type: Input
|
|
219
227
|
}], allowHideAll: [{
|
|
220
228
|
type: Input
|
|
221
229
|
}], anchor: [{
|
|
@@ -25,12 +25,12 @@ export class ColumnListKeyboardNavigation {
|
|
|
25
25
|
this.toggle(this.activeIndex, true);
|
|
26
26
|
}
|
|
27
27
|
toggle(index, active) {
|
|
28
|
-
const element = this.items[index]?.
|
|
29
|
-
element && this.renderer.setAttribute(
|
|
28
|
+
const element = this.items[index]?.hostElement.nativeElement.closest('.k-column-list-item');
|
|
29
|
+
element && this.renderer.setAttribute(element, 'tabindex', active ? '0' : '-1');
|
|
30
30
|
active && element?.focus();
|
|
31
31
|
}
|
|
32
32
|
toggleCheckedState() {
|
|
33
|
-
this.items[this.activeIndex].
|
|
33
|
+
this.items[this.activeIndex].hostElement.nativeElement.closest('.k-column-list-item').firstElementChild.click();
|
|
34
34
|
}
|
|
35
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
36
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnListKeyboardNavigation });
|