@progress/kendo-angular-treelist 18.2.1-develop.2 → 18.3.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/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
@@ -11,7 +11,9 @@ import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
11
11
|
import { Keys, DraggableDirective, TemplateContextDirective } from '@progress/kendo-angular-common';
|
12
12
|
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
13
13
|
import { sortAscSmallIcon, sortDescSmallIcon } from '@progress/kendo-svg-icons';
|
14
|
+
import { isColumnComponent } from '../../columns/column.component';
|
14
15
|
import { isColumnGroupComponent } from '../../columns/column-group.component';
|
16
|
+
import { isCheckboxColumn } from '../../columns/column-base';
|
15
17
|
import { normalize } from '../../columns/sort-settings';
|
16
18
|
import { and, isNullOrEmptyString, isPresent, isTruthy, not, observe } from '../../utils';
|
17
19
|
import { columnsToRender, sortColumns, isInSpanColumn } from "../../columns/column-common";
|
@@ -37,14 +39,23 @@ import { LogicalCellDirective } from '../../navigation/logical-cell.directive';
|
|
37
39
|
import { LogicalRowDirective } from '../../navigation/logical-row.directive';
|
38
40
|
import { CheckBoxComponent } from '@progress/kendo-angular-inputs';
|
39
41
|
import { TreeListSelectAllCheckboxDirective } from './select-all-checkbox.directive';
|
42
|
+
import { ColumnInfoService } from '../../common/column-info.service';
|
43
|
+
import { ContextService } from '../../common/provider.service';
|
44
|
+
import { NavigationService } from '../../navigation/navigation.service';
|
45
|
+
import { IdService } from '../../common/id.service';
|
46
|
+
import { ColumnReorderEvent } from '../../dragdrop/column-reorder-event';
|
40
47
|
import * as i0 from "@angular/core";
|
41
48
|
import * as i1 from "../../common/single-popup.service";
|
42
49
|
import * as i2 from "../../dragdrop/drag-hint.service";
|
43
50
|
import * as i3 from "../../dragdrop/drop-cue.service";
|
44
51
|
import * as i4 from "../../dragdrop/column-reorder.service";
|
45
|
-
import * as i5 from "../../common/
|
46
|
-
import * as i6 from "../../
|
47
|
-
import * as i7 from "
|
52
|
+
import * as i5 from "../../common/id.service";
|
53
|
+
import * as i6 from "../../common/sort.service";
|
54
|
+
import * as i7 from "../../selection/selection.service";
|
55
|
+
import * as i8 from "@progress/kendo-angular-l10n";
|
56
|
+
import * as i9 from "../../common/column-info.service";
|
57
|
+
import * as i10 from "../../common/provider.service";
|
58
|
+
import * as i11 from "../../navigation/navigation.service";
|
48
59
|
const mergeObjects = (...args) => Object.assign.apply(null, [{}].concat(args));
|
49
60
|
const directions = initialDirection => initialDirection === "asc" ? ["asc", "desc"] : ["desc", "asc"];
|
50
61
|
/**
|
@@ -65,6 +76,7 @@ const reorderable = ({ draggable }) => draggable.context.column.reorderable;
|
|
65
76
|
const lockable = ({ draggable, target }) => draggable.context.column.lockable !== false ||
|
66
77
|
draggable.context.column.isLocked === target.context.column.isLocked;
|
67
78
|
const rules = and(ofColumnType, reorderable, notInSpanColumn, notSameElement, sameParent, not(lastNonLocked), lockable);
|
79
|
+
const modifierKeys = ['alt', 'ctrl', 'shift', 'meta'];
|
68
80
|
/**
|
69
81
|
* @hidden
|
70
82
|
*/
|
@@ -73,10 +85,14 @@ export class HeaderComponent {
|
|
73
85
|
hint;
|
74
86
|
cue;
|
75
87
|
reorderService;
|
88
|
+
idService;
|
76
89
|
sortService;
|
77
90
|
selectionService;
|
78
91
|
localization;
|
79
92
|
cd;
|
93
|
+
columnInfoService;
|
94
|
+
contextService;
|
95
|
+
navigationService;
|
80
96
|
/**
|
81
97
|
* @hidden
|
82
98
|
*/
|
@@ -94,6 +110,10 @@ export class HeaderComponent {
|
|
94
110
|
columnMenuTemplate;
|
95
111
|
totalColumnsCount = 0;
|
96
112
|
totalColumns;
|
113
|
+
tabIndex;
|
114
|
+
get isNavigable() {
|
115
|
+
return this.navigationService.enabled;
|
116
|
+
}
|
97
117
|
sortedFields = {};
|
98
118
|
get headerClass() {
|
99
119
|
return !this.scrollable;
|
@@ -106,6 +126,8 @@ export class HeaderComponent {
|
|
106
126
|
return this.columnMenu;
|
107
127
|
}
|
108
128
|
dropTargets = new QueryList();
|
129
|
+
filterMenus;
|
130
|
+
columnMenus;
|
109
131
|
// Number of unlocked columns in the next table, if any
|
110
132
|
get unlockedColumnsCount() {
|
111
133
|
return this.totalColumnsCount - this.lockedColumnsCount - this.columns.length;
|
@@ -114,38 +136,134 @@ export class HeaderComponent {
|
|
114
136
|
sortDescSmallIcon = sortDescSmallIcon;
|
115
137
|
subscription = new Subscription();
|
116
138
|
targetSubscription;
|
139
|
+
stopSorting = false;
|
117
140
|
_leafColumns;
|
118
|
-
constructor(popupService, hint, cue, reorderService, sortService, selectionService, localization, cd) {
|
141
|
+
constructor(popupService, hint, cue, reorderService, idService, sortService, selectionService, localization, cd, columnInfoService, contextService, navigationService) {
|
119
142
|
this.popupService = popupService;
|
120
143
|
this.hint = hint;
|
121
144
|
this.cue = cue;
|
122
145
|
this.reorderService = reorderService;
|
146
|
+
this.idService = idService;
|
123
147
|
this.sortService = sortService;
|
124
148
|
this.selectionService = selectionService;
|
125
149
|
this.localization = localization;
|
126
150
|
this.cd = cd;
|
151
|
+
this.columnInfoService = columnInfoService;
|
152
|
+
this.contextService = contextService;
|
153
|
+
this.navigationService = navigationService;
|
154
|
+
}
|
155
|
+
ngAfterViewInit() {
|
156
|
+
this.subscription.add(observe(this.dropTargets)
|
157
|
+
.subscribe(this.attachTargets.bind(this)));
|
158
|
+
}
|
159
|
+
ngDoCheck() {
|
160
|
+
this._leafColumns = columnsToRender(this.columns || []).filter(x => !isColumnGroupComponent(x));
|
161
|
+
}
|
162
|
+
ngOnChanges(changes) {
|
163
|
+
const sortChange = changes.sort;
|
164
|
+
if (sortChange && !sortChange.isFirstChange()) {
|
165
|
+
sortChange.currentValue.forEach(change => {
|
166
|
+
this.sortedFields[change.field] = true;
|
167
|
+
});
|
168
|
+
}
|
169
|
+
}
|
170
|
+
ngOnInit() {
|
171
|
+
this.subscription.add(this.localization.changes
|
172
|
+
.subscribe(() => this.cd.markForCheck()));
|
173
|
+
}
|
174
|
+
ngOnDestroy() {
|
175
|
+
if (this.targetSubscription) {
|
176
|
+
this.targetSubscription.unsubscribe();
|
177
|
+
}
|
178
|
+
if (this.popupService) {
|
179
|
+
this.popupService.destroy();
|
180
|
+
}
|
181
|
+
this.subscription.unsubscribe();
|
127
182
|
}
|
128
183
|
getColumnComponent(column) {
|
129
184
|
return column;
|
130
185
|
}
|
131
|
-
|
132
|
-
|
186
|
+
onSortClick(column, event, link) {
|
187
|
+
if (this.stopSorting) {
|
188
|
+
this.stopSorting = false;
|
189
|
+
return;
|
190
|
+
}
|
191
|
+
const target = event.target;
|
133
192
|
if (column.headerTemplateRef && target !== link) {
|
134
193
|
const hasFocusableParent = Boolean(closestInScope(target, isFocusable, link));
|
135
194
|
if (hasFocusableParent) {
|
136
|
-
|
195
|
+
// Do not sort when clicking focusable template elements.
|
196
|
+
return;
|
137
197
|
}
|
138
198
|
}
|
139
|
-
this.
|
140
|
-
|
141
|
-
|
199
|
+
const modifier = this.matchModifier(event);
|
200
|
+
const toggledColumn = this.toggleSort(column, modifier);
|
201
|
+
this.sortColumn(toggledColumn);
|
202
|
+
}
|
203
|
+
selectAllCheckboxId() {
|
204
|
+
return this.idService.selectAllCheckboxId();
|
205
|
+
}
|
206
|
+
get selectAllCheckboxLabel() {
|
207
|
+
return this.contextService.localization.get('selectAllRowsCheckboxLabel');
|
208
|
+
}
|
209
|
+
sortColumn(descriptor) {
|
210
|
+
this.sortService.sort(descriptor);
|
211
|
+
}
|
212
|
+
/**
|
213
|
+
*
|
214
|
+
* Determines whether the modifier key (if any) passed
|
215
|
+
* with a click/keyboard event matches the user-defined multiSortKey.
|
216
|
+
*/
|
217
|
+
matchModifier(event) {
|
218
|
+
const { multiSortKey } = normalize(this.sortable);
|
219
|
+
if (multiSortKey === 'none') {
|
220
|
+
return modifierKeys.every(key => !event[`${key}Key`]);
|
221
|
+
}
|
222
|
+
return multiSortKey === 'ctrl'
|
223
|
+
? event.ctrlKey || event.metaKey
|
224
|
+
: event[`${multiSortKey}Key`];
|
142
225
|
}
|
143
226
|
onHeaderKeydown(column, args) {
|
227
|
+
if (args.keyCode === Keys.ArrowDown && args.altKey && this.showFilterMenu) {
|
228
|
+
args.preventDefault();
|
229
|
+
args.stopImmediatePropagation();
|
230
|
+
const filterMenu = this.filterMenus.find(fm => fm.column === column);
|
231
|
+
filterMenu.toggle(filterMenu.anchor.nativeElement, filterMenu.template);
|
232
|
+
return;
|
233
|
+
}
|
234
|
+
if (args.keyCode === Keys.ArrowDown && args.altKey && this.showColumnMenu(column)) {
|
235
|
+
args.preventDefault();
|
236
|
+
args.stopImmediatePropagation();
|
237
|
+
const columnMenu = this.columnMenus.find(cm => cm.column === column);
|
238
|
+
columnMenu.toggle(null, columnMenu.anchor.nativeElement, columnMenu.template);
|
239
|
+
return;
|
240
|
+
}
|
241
|
+
const isCtrlOrMeta = args.ctrlKey || args.metaKey;
|
242
|
+
const isLeftOrRightArrow = args.keyCode === Keys.ArrowLeft || args.keyCode === Keys.ArrowRight;
|
243
|
+
const isReorderingKeyShortcut = isLeftOrRightArrow && isCtrlOrMeta;
|
244
|
+
if (isReorderingKeyShortcut && this.isReorderable(column)) {
|
245
|
+
args.preventDefault();
|
246
|
+
const columnsCount = this.columnInfoService.leafNamedColumns.length;
|
247
|
+
const reorderDirection = args.keyCode === Keys.ArrowLeft ? -1 : 1;
|
248
|
+
const rtlMultiplier = this.contextService.localization.rtl ? -1 : 1;
|
249
|
+
const reorderDirectionOffset = reorderDirection * rtlMultiplier;
|
250
|
+
const newIndex = column.leafIndex + reorderDirectionOffset;
|
251
|
+
const normalizedNewIndex = Math.min(Math.max(0, newIndex), columnsCount - 1);
|
252
|
+
const gridInstance = this.contextService.treelist;
|
253
|
+
gridInstance.reorderColumn(column, normalizedNewIndex, { before: reorderDirectionOffset < 0 });
|
254
|
+
gridInstance.columnReorder.emit(new ColumnReorderEvent({
|
255
|
+
column,
|
256
|
+
newIndex: normalizedNewIndex,
|
257
|
+
oldIndex: column.leafIndex
|
258
|
+
}));
|
259
|
+
return;
|
260
|
+
}
|
144
261
|
if (!this.sortable || args.defaultPrevented || column.sortable === false) {
|
145
262
|
return;
|
146
263
|
}
|
147
|
-
if (args.keyCode === Keys.Enter) {
|
148
|
-
this.
|
264
|
+
if (args.keyCode === Keys.Enter && isPresent(column.field)) {
|
265
|
+
const modifier = this.matchModifier(args);
|
266
|
+
this.sortService.sort(this.toggleSort(column, modifier));
|
149
267
|
}
|
150
268
|
}
|
151
269
|
showSortNumbering(column) {
|
@@ -173,42 +291,20 @@ export class HeaderComponent {
|
|
173
291
|
return 'descending';
|
174
292
|
}
|
175
293
|
}
|
176
|
-
|
294
|
+
/**
|
295
|
+
*
|
296
|
+
* @param column
|
297
|
+
* @param modifier - Indicates whether the client-defined `multiSortKey` modifier is met. Defaults to `true`.
|
298
|
+
* @returns - SortDescriptor[]
|
299
|
+
*/
|
300
|
+
toggleSort(column, modifier = true) {
|
177
301
|
const { allowUnsort, mode, initialDirection } = normalize(this.sortable, column.sortable);
|
178
302
|
const descriptor = this.toggleDirection(column.field, allowUnsort, initialDirection);
|
179
|
-
if (mode === 'single') {
|
303
|
+
if (mode === 'single' || !modifier) {
|
180
304
|
return [descriptor];
|
181
305
|
}
|
182
306
|
return [...this.sort.filter(desc => desc.field !== column.field), descriptor];
|
183
307
|
}
|
184
|
-
ngAfterViewInit() {
|
185
|
-
this.subscription.add(observe(this.dropTargets)
|
186
|
-
.subscribe(this.attachTargets.bind(this)));
|
187
|
-
}
|
188
|
-
ngDoCheck() {
|
189
|
-
this._leafColumns = columnsToRender(this.columns || []).filter(x => !isColumnGroupComponent(x));
|
190
|
-
}
|
191
|
-
ngOnChanges(changes) {
|
192
|
-
const sortChange = changes.sort;
|
193
|
-
if (sortChange && !sortChange.isFirstChange()) {
|
194
|
-
sortChange.currentValue.forEach(change => {
|
195
|
-
this.sortedFields[change.field] = true;
|
196
|
-
});
|
197
|
-
}
|
198
|
-
}
|
199
|
-
ngOnInit() {
|
200
|
-
this.subscription.add(this.localization.changes
|
201
|
-
.subscribe(() => this.cd.markForCheck()));
|
202
|
-
}
|
203
|
-
ngOnDestroy() {
|
204
|
-
if (this.targetSubscription) {
|
205
|
-
this.targetSubscription.unsubscribe();
|
206
|
-
}
|
207
|
-
if (this.popupService) {
|
208
|
-
this.popupService.destroy();
|
209
|
-
}
|
210
|
-
this.subscription.unsubscribe();
|
211
|
-
}
|
212
308
|
isFirstOnRow(column, index) {
|
213
309
|
const isTailing = (c) => c &&
|
214
310
|
(this.columnsForLevel(c.level).indexOf(c) > 0 || isTailing(c.parent));
|
@@ -228,7 +324,7 @@ export class HeaderComponent {
|
|
228
324
|
return hasFilterRow(this.filterable);
|
229
325
|
}
|
230
326
|
showColumnMenu(column) {
|
231
|
-
return this.columnMenu && column.columnMenu &&
|
327
|
+
return this.columnMenu && !isCheckboxColumn(column) && column.columnMenu &&
|
232
328
|
(this.columnMenuTemplate || column.columnMenuTemplates.length || hasItems(this.columnMenu, column));
|
233
329
|
}
|
234
330
|
isFilterable(column) {
|
@@ -237,9 +333,6 @@ export class HeaderComponent {
|
|
237
333
|
canDrop(draggable, target) {
|
238
334
|
return this.reorderable && rules({ draggable, target });
|
239
335
|
}
|
240
|
-
shouldActivate(column) {
|
241
|
-
return this.reorderable && column.reorderable;
|
242
|
-
}
|
243
336
|
isSortable(column) {
|
244
337
|
return !isNullOrEmptyString(column.field)
|
245
338
|
&& isTruthy(this.sortable) && isTruthy(column.sortable);
|
@@ -247,6 +340,23 @@ export class HeaderComponent {
|
|
247
340
|
trackByIndex(index, _item) {
|
248
341
|
return index;
|
249
342
|
}
|
343
|
+
shouldActivate(column) {
|
344
|
+
const canReorder = this.isReorderable(column);
|
345
|
+
if (!canReorder && !isColumnComponent(column)) {
|
346
|
+
return false;
|
347
|
+
}
|
348
|
+
return canReorder;
|
349
|
+
}
|
350
|
+
isInteractive(column, prop) {
|
351
|
+
return !isNullOrEmptyString(column.field)
|
352
|
+
&& isTruthy(this[prop]) && isTruthy(column[prop]);
|
353
|
+
}
|
354
|
+
isCheckboxColumn(column) {
|
355
|
+
return isCheckboxColumn(column) && !column.templateRef;
|
356
|
+
}
|
357
|
+
isReorderable(column) {
|
358
|
+
return this.reorderable && column.reorderable;
|
359
|
+
}
|
250
360
|
toggleDirection(field, allowUnsort, initialDirection) {
|
251
361
|
const descriptor = this.sortDescriptor(field);
|
252
362
|
const [first, second] = directions(initialDirection);
|
@@ -362,8 +472,8 @@ export class HeaderComponent {
|
|
362
472
|
target: target.context.column
|
363
473
|
});
|
364
474
|
}
|
365
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HeaderComponent, deps: [{ token: i1.SinglePopupService }, { token: i2.DragHintService }, { token: i3.DropCueService }, { token: i4.ColumnReorderService }, { token: i5.
|
366
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: HeaderComponent, isStandalone: true, selector: "[kendoTreeListHeader]", inputs: { totalColumnLevels: "totalColumnLevels", columns: "columns", scrollable: "scrollable", filterable: "filterable", sort: "sort", filter: "filter", sortable: "sortable", lockedColumnsCount: "lockedColumnsCount", resizable: "resizable", reorderable: "reorderable", columnMenu: "columnMenu", columnMenuTemplate: "columnMenuTemplate", totalColumnsCount: "totalColumnsCount", totalColumns: "totalColumns" }, host: { properties: { "class.k-grid-header": "this.headerClass", "class.k-table-thead": "this.hostClass" } }, viewQueries: [{ propertyName: "dropTargets", predicate: DropTargetDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
475
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HeaderComponent, deps: [{ token: i1.SinglePopupService }, { token: i2.DragHintService }, { token: i3.DropCueService }, { token: i4.ColumnReorderService }, { token: i5.IdService }, { token: i6.SortService }, { token: i7.SelectionService }, { token: i8.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i9.ColumnInfoService }, { token: i10.ContextService }, { token: i11.NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
476
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: HeaderComponent, isStandalone: true, selector: "[kendoTreeListHeader]", inputs: { totalColumnLevels: "totalColumnLevels", columns: "columns", scrollable: "scrollable", filterable: "filterable", sort: "sort", filter: "filter", sortable: "sortable", lockedColumnsCount: "lockedColumnsCount", resizable: "resizable", reorderable: "reorderable", columnMenu: "columnMenu", columnMenuTemplate: "columnMenuTemplate", totalColumnsCount: "totalColumnsCount", totalColumns: "totalColumns", tabIndex: "tabIndex" }, 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: `
|
367
477
|
<tr *ngFor="let i of columnLevels; let levelIndex = index" role="row"
|
368
478
|
kendoTreeListLogicalRow
|
369
479
|
[logicalRowIndex]="levelIndex"
|
@@ -376,11 +486,13 @@ export class HeaderComponent {
|
|
376
486
|
kendoTreeListLogicalCell
|
377
487
|
[logicalRowIndex]="levelIndex"
|
378
488
|
[logicalColIndex]="logicalColumnIndex(column)"
|
489
|
+
[headerLabelText]="column.title || getColumnComponent(column).field"
|
379
490
|
[colSpan]="column.colspan"
|
380
491
|
[rowSpan]="column.rowspan(totalColumnLevels)"
|
381
492
|
role="columnheader"
|
382
493
|
aria-selected="false"
|
383
494
|
[attr.aria-sort]="sortState(getColumnComponent(column))"
|
495
|
+
[class.k-sorted]="sortState(getColumnComponent(column))"
|
384
496
|
(keydown)="onHeaderKeydown(getColumnComponent(column), $event)"
|
385
497
|
kendoDropTarget
|
386
498
|
kendoDraggable
|
@@ -395,40 +507,50 @@ export class HeaderComponent {
|
|
395
507
|
}"
|
396
508
|
class="k-header k-table-th"
|
397
509
|
[class.k-filterable]="(showFilterMenu && isFilterable(getColumnComponent(column))) || showColumnMenu(column)"
|
398
|
-
[attr.aria-haspopup]="(showFilterMenu || showColumnMenu(column)) ? 'dialog' : undefined"
|
399
510
|
[class.k-first]="isFirstOnRow(getColumnComponent(column), columnIndex)"
|
400
511
|
[ngClass]="column.headerClass"
|
401
512
|
[ngStyle]="column.headerStyle"
|
402
513
|
[attr.rowspan]="column.rowspan(totalColumnLevels)"
|
403
|
-
[attr.colspan]="column.colspan"
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
514
|
+
[attr.colspan]="column.colspan"
|
515
|
+
[attr.aria-haspopup]="isNavigable && (showFilterMenu || showColumnMenu(column)) ? 'dialog' : undefined"
|
516
|
+
[attr.aria-expanded]="isNavigable && (showFilterMenu || showColumnMenu(column)) ? false : undefined"
|
517
|
+
[attr.aria-keyshortcuts]="isNavigable && (showFilterMenu || showColumnMenu(column)) ? 'Alt + ArrowDown' : undefined">
|
518
|
+
<ng-container *ngIf="!isInteractive(getColumnComponent(column), 'sortable')">
|
519
|
+
<span class="k-cell-inner">
|
520
|
+
<span class="k-link" [class.!k-cursor-default]="!isInteractive(getColumnComponent(column), 'reorderable')">
|
521
|
+
<ng-template
|
522
|
+
[templateContext]="{
|
523
|
+
templateRef: column.headerTemplateRef,
|
524
|
+
columnIndex: column.leafIndex,
|
525
|
+
column: column,
|
526
|
+
$implicit: column
|
527
|
+
}">
|
528
|
+
</ng-template>
|
529
|
+
<ng-container *ngIf="!column.headerTemplateRef">
|
530
|
+
<span class="k-column-title">{{column.displayTitle}}</span>
|
531
|
+
</ng-container>
|
532
|
+
</span>
|
533
|
+
<kendo-treelist-filter-menu
|
534
|
+
*ngIf="showFilterMenu && isFilterable(getColumnComponent(column))"
|
535
|
+
[column]="getColumnComponent(column)"
|
536
|
+
[filter]="filter"
|
537
|
+
[tabIndex]="tabIndex">
|
538
|
+
</kendo-treelist-filter-menu>
|
539
|
+
<kendo-treelist-column-menu *ngIf="showColumnMenu(column)"
|
540
|
+
[standalone]="false"
|
541
|
+
[settings]="columnMenuSettings"
|
542
|
+
[column]="column"
|
543
|
+
[columnMenuTemplate]="columnMenuTemplate"
|
544
|
+
[sort]="sort"
|
545
|
+
[filter]="filter"
|
546
|
+
[sortable]="sortable"
|
547
|
+
[tabIndex]="tabIndex">
|
548
|
+
</kendo-treelist-column-menu>
|
549
|
+
</span>
|
550
|
+
</ng-container>
|
551
|
+
<ng-container *ngIf="isInteractive(getColumnComponent(column), 'sortable')">
|
430
552
|
<span class="k-cell-inner">
|
431
|
-
<span #link class="k-link" (click)="
|
553
|
+
<span #link class="k-link" (click)="onSortClick(getColumnComponent(column), $event, link)">
|
432
554
|
<ng-template
|
433
555
|
[templateContext]="{
|
434
556
|
templateRef: column.headerTemplateRef,
|
@@ -453,7 +575,8 @@ export class HeaderComponent {
|
|
453
575
|
<kendo-treelist-filter-menu
|
454
576
|
*ngIf="showFilterMenu && isFilterable(getColumnComponent(column))"
|
455
577
|
[column]="getColumnComponent(column)"
|
456
|
-
[filter]="filter"
|
578
|
+
[filter]="filter"
|
579
|
+
[tabIndex]="tabIndex">
|
457
580
|
</kendo-treelist-filter-menu>
|
458
581
|
<kendo-treelist-column-menu *ngIf="showColumnMenu(column)"
|
459
582
|
[standalone]="false"
|
@@ -462,18 +585,20 @@ export class HeaderComponent {
|
|
462
585
|
[columnMenuTemplate]="columnMenuTemplate"
|
463
586
|
[sort]="sort"
|
464
587
|
[filter]="filter"
|
465
|
-
[sortable]="sortable"
|
588
|
+
[sortable]="sortable"
|
589
|
+
[tabIndex]="tabIndex">
|
466
590
|
</kendo-treelist-column-menu>
|
467
591
|
</span>
|
468
|
-
</ng-
|
469
|
-
<ng-
|
592
|
+
</ng-container>
|
593
|
+
<ng-container *ngIf="isCheckboxColumn(column) && !column.headerTemplateRef && $any(column).showSelectAll">
|
470
594
|
<kendo-checkbox
|
471
|
-
[
|
472
|
-
|
595
|
+
[attr.id]="selectAllCheckboxId()"
|
596
|
+
[inputAttributes]="{'aria-label': selectAllCheckboxLabel}"
|
473
597
|
kendoTreeListSelectAllCheckbox
|
598
|
+
kendoTreeListFocusable
|
474
599
|
(checkedStateChange)="selectAllChange($event)"
|
475
600
|
></kendo-checkbox>
|
476
|
-
</ng-
|
601
|
+
</ng-container>
|
477
602
|
<span kendoTreeListColumnHandle
|
478
603
|
kendoDraggable
|
479
604
|
class="k-column-resizer"
|
@@ -488,6 +613,7 @@ export class HeaderComponent {
|
|
488
613
|
[logicalColIndex]="logicalColumnIndex(column)"
|
489
614
|
[rowSpan]="column.rowspan(totalColumnLevels)"
|
490
615
|
[colSpan]="column.colspan"
|
616
|
+
[headerLabelText]="column.title || getColumnComponent(column).field"
|
491
617
|
kendoDropTarget
|
492
618
|
kendoDraggable
|
493
619
|
kendoDraggableColumn
|
@@ -500,28 +626,34 @@ export class HeaderComponent {
|
|
500
626
|
}"
|
501
627
|
class="k-header k-table-th"
|
502
628
|
[class.k-first]="isFirstOnRow(getColumnComponent(column), columnIndex)"
|
503
|
-
[attr.aria-haspopup]="(
|
504
|
-
[
|
505
|
-
[attr.aria-
|
629
|
+
[attr.aria-haspopup]="(isNavigable && showColumnMenu(column)) ? 'dialog' : undefined"
|
630
|
+
[attr.aria-expanded]="(isNavigable && showColumnMenu(column)) ? false : undefined"
|
631
|
+
[attr.aria-keyshortcuts]="isNavigable && showColumnMenu(column) ? 'Alt + ArrowDown' : undefined"
|
506
632
|
[ngClass]="column.headerClass"
|
507
633
|
[ngStyle]="column.headerStyle"
|
508
634
|
[attr.rowspan]="column.rowspan(totalColumnLevels)"
|
509
635
|
[attr.colspan]="column.colspan">
|
510
|
-
<
|
511
|
-
[
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
636
|
+
<span class="k-cell-inner">
|
637
|
+
<span class="k-link" [class.!k-cursor-default]="!isInteractive(getColumnComponent(column), 'reorderable')">
|
638
|
+
<ng-template
|
639
|
+
[templateContext]="{
|
640
|
+
templateRef: column.headerTemplateRef,
|
641
|
+
columnIndex: lockedColumnsCount + columnIndex,
|
642
|
+
column: column,
|
643
|
+
$implicit: column
|
644
|
+
}">
|
645
|
+
</ng-template>
|
646
|
+
<ng-container *ngIf="!column.headerTemplateRef">
|
647
|
+
<span class="k-column-title">{{column.displayTitle}}</span>
|
648
|
+
</ng-container>
|
649
|
+
</span>
|
650
|
+
<kendo-treelist-column-menu *ngIf="showColumnMenu(column)"
|
651
|
+
[standalone]="false"
|
652
|
+
[settings]="columnMenuSettings"
|
653
|
+
[column]="column"
|
654
|
+
[columnMenuTemplate]="columnMenuTemplate">
|
655
|
+
</kendo-treelist-column-menu>
|
656
|
+
</span>
|
525
657
|
<span kendoTreeListColumnHandle
|
526
658
|
kendoDraggable
|
527
659
|
class="k-column-resizer"
|
@@ -534,18 +666,16 @@ export class HeaderComponent {
|
|
534
666
|
</tr>
|
535
667
|
<tr *ngIf="showFilterRow"
|
536
668
|
kendoTreeListFilterRow
|
537
|
-
|
538
|
-
|
539
|
-
|
669
|
+
[columns]="leafColumns"
|
670
|
+
[filter]="filter"
|
671
|
+
[lockedColumnsCount]="lockedColumnsCount"
|
540
672
|
kendoTreeListLogicalRow
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
</tr>
|
548
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: LogicalRowDirective, selector: "[kendoTreeListLogicalRow]", inputs: ["logicalRowIndex", "logicalSlaveRow", "logicalCellsCount", "logicalSlaveCellsCount", "dataRowIndex", "dataItem", "isNew", "totalColumns"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: LogicalCellDirective, selector: "[kendoTreeListLogicalCell]", inputs: ["logicalColIndex", "logicalRowIndex", "logicalSlaveCell", "column", "colIndex", "colSpan", "rowSpan", "dataRowIndex", "dataItem", "expandable"] }, { kind: "directive", type: DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["context"], outputs: ["enter", "leave", "drop"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: DraggableColumnDirective, selector: "[kendoDraggableColumn]", inputs: ["context", "enableDrag"], outputs: ["drag"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: FilterMenuComponent, selector: "kendo-treelist-filter-menu", inputs: ["column", "filter"] }, { kind: "component", type: ColumnMenuComponent, selector: "kendo-treelist-column-menu", inputs: ["standalone", "column", "settings", "sort", "filter", "sortable", "columnMenuTemplate"] }, { kind: "directive", type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: FocusableDirective, selector: "[kendoTreeListFocusable],\n [kendoTreeListAddCommand],\n [kendoTreeListEditCommand],\n [kendoTreeListRemoveCommand],\n [kendoTreeListSaveCommand],\n [kendoTreeListCancelCommand]\n ", inputs: ["kendoTreeListFocusable", "enabled", "kendoTreeListAddCommand", "kendoTreeListEditCommand", "kendoTreeListRemoveCommand", "kendoTreeListSaveCommand", "kendoTreeListCancelCommand"] }, { kind: "directive", type: ColumnHandleDirective, selector: "[kendoTreeListColumnHandle]", inputs: ["columns", "column"] }, { kind: "component", type: FilterRowComponent, selector: "[kendoTreeListFilterRow]", inputs: ["columns", "filter", "logicalRowIndex", "lockedColumnsCount"] }, { kind: "component", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }, { kind: "directive", type: TreeListSelectAllCheckboxDirective, selector: "[kendoTreeListSelectAllCheckbox]" }] });
|
673
|
+
[totalColumns]="totalColumns"
|
674
|
+
[logicalRowIndex]="totalColumnLevels + 1"
|
675
|
+
[logicalSlaveRow]="lockedColumnsCount > 0"
|
676
|
+
[logicalCellsCount]="columns.length"
|
677
|
+
[logicalSlaveCellsCount]="unlockedColumnsCount"></tr>
|
678
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: LogicalRowDirective, selector: "[kendoTreeListLogicalRow]", inputs: ["logicalRowIndex", "logicalSlaveRow", "logicalCellsCount", "logicalSlaveCellsCount", "dataRowIndex", "dataItem", "isNew", "totalColumns"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: LogicalCellDirective, selector: "[kendoTreeListLogicalCell]", inputs: ["logicalColIndex", "logicalRowIndex", "logicalSlaveCell", "column", "colIndex", "colSpan", "rowSpan", "dataRowIndex", "dataItem", "expandable", "headerLabelText"] }, { kind: "directive", type: DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["context"], outputs: ["enter", "leave", "drop"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: DraggableColumnDirective, selector: "[kendoDraggableColumn]", inputs: ["context", "enableDrag"], outputs: ["drag"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: FilterMenuComponent, selector: "kendo-treelist-filter-menu", inputs: ["column", "filter", "tabIndex"] }, { kind: "component", type: ColumnMenuComponent, selector: "kendo-treelist-column-menu", inputs: ["standalone", "column", "settings", "sort", "filter", "sortable", "columnMenuTemplate", "tabIndex"] }, { kind: "directive", type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: FocusableDirective, selector: "[kendoTreeListFocusable],\n [kendoTreeListAddCommand],\n [kendoTreeListEditCommand],\n [kendoTreeListRemoveCommand],\n [kendoTreeListSaveCommand],\n [kendoTreeListCancelCommand]\n ", inputs: ["kendoTreeListFocusable", "enabled", "kendoTreeListAddCommand", "kendoTreeListEditCommand", "kendoTreeListRemoveCommand", "kendoTreeListSaveCommand", "kendoTreeListCancelCommand"] }, { kind: "directive", type: ColumnHandleDirective, selector: "[kendoTreeListColumnHandle]", inputs: ["columns", "column"] }, { kind: "component", type: FilterRowComponent, selector: "[kendoTreeListFilterRow]", inputs: ["columns", "filter", "logicalRowIndex", "lockedColumnsCount"] }, { kind: "component", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }, { kind: "directive", type: TreeListSelectAllCheckboxDirective, selector: "[kendoTreeListSelectAllCheckbox]" }] });
|
549
679
|
}
|
550
680
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HeaderComponent, decorators: [{
|
551
681
|
type: Component,
|
@@ -564,11 +694,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
564
694
|
kendoTreeListLogicalCell
|
565
695
|
[logicalRowIndex]="levelIndex"
|
566
696
|
[logicalColIndex]="logicalColumnIndex(column)"
|
697
|
+
[headerLabelText]="column.title || getColumnComponent(column).field"
|
567
698
|
[colSpan]="column.colspan"
|
568
699
|
[rowSpan]="column.rowspan(totalColumnLevels)"
|
569
700
|
role="columnheader"
|
570
701
|
aria-selected="false"
|
571
702
|
[attr.aria-sort]="sortState(getColumnComponent(column))"
|
703
|
+
[class.k-sorted]="sortState(getColumnComponent(column))"
|
572
704
|
(keydown)="onHeaderKeydown(getColumnComponent(column), $event)"
|
573
705
|
kendoDropTarget
|
574
706
|
kendoDraggable
|
@@ -583,40 +715,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
583
715
|
}"
|
584
716
|
class="k-header k-table-th"
|
585
717
|
[class.k-filterable]="(showFilterMenu && isFilterable(getColumnComponent(column))) || showColumnMenu(column)"
|
586
|
-
[attr.aria-haspopup]="(showFilterMenu || showColumnMenu(column)) ? 'dialog' : undefined"
|
587
718
|
[class.k-first]="isFirstOnRow(getColumnComponent(column), columnIndex)"
|
588
719
|
[ngClass]="column.headerClass"
|
589
720
|
[ngStyle]="column.headerStyle"
|
590
721
|
[attr.rowspan]="column.rowspan(totalColumnLevels)"
|
591
|
-
[attr.colspan]="column.colspan"
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
[filter]="filter">
|
597
|
-
</kendo-treelist-filter-menu>
|
598
|
-
<kendo-treelist-column-menu *ngIf="showColumnMenu(column)"
|
599
|
-
[standalone]="false"
|
600
|
-
[settings]="columnMenuSettings"
|
601
|
-
[column]="column"
|
602
|
-
[columnMenuTemplate]="columnMenuTemplate"
|
603
|
-
[sort]="sort"
|
604
|
-
[filter]="filter"
|
605
|
-
[sortable]="sortable">
|
606
|
-
</kendo-treelist-column-menu>
|
607
|
-
<ng-template
|
608
|
-
[templateContext]="{
|
609
|
-
templateRef: column.headerTemplateRef,
|
610
|
-
columnIndex: column.leafIndex,
|
611
|
-
column: column,
|
612
|
-
$implicit: column
|
613
|
-
}">
|
614
|
-
</ng-template>
|
615
|
-
<ng-template [ngIf]="!column.headerTemplateRef">{{column.displayTitle}}</ng-template>
|
616
|
-
</ng-template>
|
617
|
-
<ng-template [ngIf]="isSortable(getColumnComponent(column))">
|
722
|
+
[attr.colspan]="column.colspan"
|
723
|
+
[attr.aria-haspopup]="isNavigable && (showFilterMenu || showColumnMenu(column)) ? 'dialog' : undefined"
|
724
|
+
[attr.aria-expanded]="isNavigable && (showFilterMenu || showColumnMenu(column)) ? false : undefined"
|
725
|
+
[attr.aria-keyshortcuts]="isNavigable && (showFilterMenu || showColumnMenu(column)) ? 'Alt + ArrowDown' : undefined">
|
726
|
+
<ng-container *ngIf="!isInteractive(getColumnComponent(column), 'sortable')">
|
618
727
|
<span class="k-cell-inner">
|
619
|
-
<span
|
728
|
+
<span class="k-link" [class.!k-cursor-default]="!isInteractive(getColumnComponent(column), 'reorderable')">
|
729
|
+
<ng-template
|
730
|
+
[templateContext]="{
|
731
|
+
templateRef: column.headerTemplateRef,
|
732
|
+
columnIndex: column.leafIndex,
|
733
|
+
column: column,
|
734
|
+
$implicit: column
|
735
|
+
}">
|
736
|
+
</ng-template>
|
737
|
+
<ng-container *ngIf="!column.headerTemplateRef">
|
738
|
+
<span class="k-column-title">{{column.displayTitle}}</span>
|
739
|
+
</ng-container>
|
740
|
+
</span>
|
741
|
+
<kendo-treelist-filter-menu
|
742
|
+
*ngIf="showFilterMenu && isFilterable(getColumnComponent(column))"
|
743
|
+
[column]="getColumnComponent(column)"
|
744
|
+
[filter]="filter"
|
745
|
+
[tabIndex]="tabIndex">
|
746
|
+
</kendo-treelist-filter-menu>
|
747
|
+
<kendo-treelist-column-menu *ngIf="showColumnMenu(column)"
|
748
|
+
[standalone]="false"
|
749
|
+
[settings]="columnMenuSettings"
|
750
|
+
[column]="column"
|
751
|
+
[columnMenuTemplate]="columnMenuTemplate"
|
752
|
+
[sort]="sort"
|
753
|
+
[filter]="filter"
|
754
|
+
[sortable]="sortable"
|
755
|
+
[tabIndex]="tabIndex">
|
756
|
+
</kendo-treelist-column-menu>
|
757
|
+
</span>
|
758
|
+
</ng-container>
|
759
|
+
<ng-container *ngIf="isInteractive(getColumnComponent(column), 'sortable')">
|
760
|
+
<span class="k-cell-inner">
|
761
|
+
<span #link class="k-link" (click)="onSortClick(getColumnComponent(column), $event, link)">
|
620
762
|
<ng-template
|
621
763
|
[templateContext]="{
|
622
764
|
templateRef: column.headerTemplateRef,
|
@@ -641,7 +783,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
641
783
|
<kendo-treelist-filter-menu
|
642
784
|
*ngIf="showFilterMenu && isFilterable(getColumnComponent(column))"
|
643
785
|
[column]="getColumnComponent(column)"
|
644
|
-
[filter]="filter"
|
786
|
+
[filter]="filter"
|
787
|
+
[tabIndex]="tabIndex">
|
645
788
|
</kendo-treelist-filter-menu>
|
646
789
|
<kendo-treelist-column-menu *ngIf="showColumnMenu(column)"
|
647
790
|
[standalone]="false"
|
@@ -650,18 +793,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
650
793
|
[columnMenuTemplate]="columnMenuTemplate"
|
651
794
|
[sort]="sort"
|
652
795
|
[filter]="filter"
|
653
|
-
[sortable]="sortable"
|
796
|
+
[sortable]="sortable"
|
797
|
+
[tabIndex]="tabIndex">
|
654
798
|
</kendo-treelist-column-menu>
|
655
799
|
</span>
|
656
|
-
</ng-
|
657
|
-
<ng-
|
800
|
+
</ng-container>
|
801
|
+
<ng-container *ngIf="isCheckboxColumn(column) && !column.headerTemplateRef && $any(column).showSelectAll">
|
658
802
|
<kendo-checkbox
|
659
|
-
[
|
660
|
-
|
803
|
+
[attr.id]="selectAllCheckboxId()"
|
804
|
+
[inputAttributes]="{'aria-label': selectAllCheckboxLabel}"
|
661
805
|
kendoTreeListSelectAllCheckbox
|
806
|
+
kendoTreeListFocusable
|
662
807
|
(checkedStateChange)="selectAllChange($event)"
|
663
808
|
></kendo-checkbox>
|
664
|
-
</ng-
|
809
|
+
</ng-container>
|
665
810
|
<span kendoTreeListColumnHandle
|
666
811
|
kendoDraggable
|
667
812
|
class="k-column-resizer"
|
@@ -676,6 +821,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
676
821
|
[logicalColIndex]="logicalColumnIndex(column)"
|
677
822
|
[rowSpan]="column.rowspan(totalColumnLevels)"
|
678
823
|
[colSpan]="column.colspan"
|
824
|
+
[headerLabelText]="column.title || getColumnComponent(column).field"
|
679
825
|
kendoDropTarget
|
680
826
|
kendoDraggable
|
681
827
|
kendoDraggableColumn
|
@@ -688,28 +834,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
688
834
|
}"
|
689
835
|
class="k-header k-table-th"
|
690
836
|
[class.k-first]="isFirstOnRow(getColumnComponent(column), columnIndex)"
|
691
|
-
[attr.aria-haspopup]="(
|
692
|
-
[
|
693
|
-
[attr.aria-
|
837
|
+
[attr.aria-haspopup]="(isNavigable && showColumnMenu(column)) ? 'dialog' : undefined"
|
838
|
+
[attr.aria-expanded]="(isNavigable && showColumnMenu(column)) ? false : undefined"
|
839
|
+
[attr.aria-keyshortcuts]="isNavigable && showColumnMenu(column) ? 'Alt + ArrowDown' : undefined"
|
694
840
|
[ngClass]="column.headerClass"
|
695
841
|
[ngStyle]="column.headerStyle"
|
696
842
|
[attr.rowspan]="column.rowspan(totalColumnLevels)"
|
697
843
|
[attr.colspan]="column.colspan">
|
698
|
-
<
|
699
|
-
[
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
844
|
+
<span class="k-cell-inner">
|
845
|
+
<span class="k-link" [class.!k-cursor-default]="!isInteractive(getColumnComponent(column), 'reorderable')">
|
846
|
+
<ng-template
|
847
|
+
[templateContext]="{
|
848
|
+
templateRef: column.headerTemplateRef,
|
849
|
+
columnIndex: lockedColumnsCount + columnIndex,
|
850
|
+
column: column,
|
851
|
+
$implicit: column
|
852
|
+
}">
|
853
|
+
</ng-template>
|
854
|
+
<ng-container *ngIf="!column.headerTemplateRef">
|
855
|
+
<span class="k-column-title">{{column.displayTitle}}</span>
|
856
|
+
</ng-container>
|
857
|
+
</span>
|
858
|
+
<kendo-treelist-column-menu *ngIf="showColumnMenu(column)"
|
859
|
+
[standalone]="false"
|
860
|
+
[settings]="columnMenuSettings"
|
861
|
+
[column]="column"
|
862
|
+
[columnMenuTemplate]="columnMenuTemplate">
|
863
|
+
</kendo-treelist-column-menu>
|
864
|
+
</span>
|
713
865
|
<span kendoTreeListColumnHandle
|
714
866
|
kendoDraggable
|
715
867
|
class="k-column-resizer"
|
@@ -722,24 +874,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
722
874
|
</tr>
|
723
875
|
<tr *ngIf="showFilterRow"
|
724
876
|
kendoTreeListFilterRow
|
725
|
-
|
726
|
-
|
727
|
-
|
877
|
+
[columns]="leafColumns"
|
878
|
+
[filter]="filter"
|
879
|
+
[lockedColumnsCount]="lockedColumnsCount"
|
728
880
|
kendoTreeListLogicalRow
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
>
|
735
|
-
</tr>
|
881
|
+
[totalColumns]="totalColumns"
|
882
|
+
[logicalRowIndex]="totalColumnLevels + 1"
|
883
|
+
[logicalSlaveRow]="lockedColumnsCount > 0"
|
884
|
+
[logicalCellsCount]="columns.length"
|
885
|
+
[logicalSlaveCellsCount]="unlockedColumnsCount"></tr>
|
736
886
|
`,
|
737
887
|
standalone: true,
|
738
888
|
imports: [NgFor, LogicalRowDirective, NgIf, LogicalCellDirective, DropTargetDirective, DraggableDirective, DraggableColumnDirective, NgClass, NgStyle,
|
739
889
|
FilterMenuComponent, ColumnMenuComponent, TemplateContextDirective, IconWrapperComponent, FocusableDirective, ColumnHandleDirective, FilterRowComponent,
|
740
890
|
CheckBoxComponent, TreeListSelectAllCheckboxDirective]
|
741
891
|
}]
|
742
|
-
}], ctorParameters: function () { return [{ type: i1.SinglePopupService }, { type: i2.DragHintService }, { type: i3.DropCueService }, { type: i4.ColumnReorderService }, { type: i5.
|
892
|
+
}], ctorParameters: function () { return [{ type: i1.SinglePopupService }, { type: i2.DragHintService }, { type: i3.DropCueService }, { type: i4.ColumnReorderService }, { type: i5.IdService }, { type: i6.SortService }, { type: i7.SelectionService }, { type: i8.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i9.ColumnInfoService }, { type: i10.ContextService }, { type: i11.NavigationService }]; }, propDecorators: { totalColumnLevels: [{
|
743
893
|
type: Input
|
744
894
|
}], columns: [{
|
745
895
|
type: Input
|
@@ -767,6 +917,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
767
917
|
type: Input
|
768
918
|
}], totalColumns: [{
|
769
919
|
type: Input
|
920
|
+
}], tabIndex: [{
|
921
|
+
type: Input
|
770
922
|
}], headerClass: [{
|
771
923
|
type: HostBinding,
|
772
924
|
args: ['class.k-grid-header']
|
@@ -776,4 +928,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
776
928
|
}], dropTargets: [{
|
777
929
|
type: ViewChildren,
|
778
930
|
args: [DropTargetDirective]
|
931
|
+
}], filterMenus: [{
|
932
|
+
type: ViewChildren,
|
933
|
+
args: [FilterMenuComponent]
|
934
|
+
}], columnMenus: [{
|
935
|
+
type: ViewChildren,
|
936
|
+
args: [ColumnMenuComponent]
|
779
937
|
}] } });
|