@progress/kendo-angular-dropdowns 21.0.0-develop.2 → 21.0.0-develop.21
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/codemods/utils.js +485 -324
- package/codemods/v19/autocomplete-subtitle.js +7 -5
- package/codemods/v19/autocomplete-title.js +7 -6
- package/codemods/v19/combobox-subtitle.js +7 -5
- package/codemods/v19/combobox-title.js +7 -6
- package/codemods/v19/dropdownlist-subtitle.js +7 -4
- package/codemods/v19/dropdownlist-title.js +7 -5
- package/codemods/v19/dropdowntree-subtitle.js +7 -4
- package/codemods/v19/dropdowntree-title.js +7 -6
- package/codemods/v19/multicolumncombobox-subtitle.js +7 -4
- package/codemods/v19/multicolumncombobox-title.js +7 -6
- package/codemods/v19/multiselect-subtitle.js +7 -4
- package/codemods/v19/multiselect-title.js +7 -6
- package/codemods/v19/multiselecttree-subtitle.js +7 -4
- package/codemods/v19/multiselecttree-title.js +7 -6
- package/common/list-item.directive.d.ts +1 -1
- package/common/list.component.d.ts +2 -5
- package/esm2022/autocomplete/autocomplete.component.mjs +6 -2
- package/esm2022/comboboxes/combobox.component.mjs +6 -2
- package/esm2022/common/list-item.directive.mjs +2 -2
- package/esm2022/common/list.component.mjs +136 -126
- package/esm2022/dropdownlist/dropdownlist.component.mjs +6 -7
- package/esm2022/multiselect/multiselect.component.mjs +6 -2
- package/esm2022/package-metadata.mjs +2 -2
- package/fesm2022/progress-kendo-angular-dropdowns.mjs +164 -143
- package/package.json +10 -10
- package/schematics/ngAdd/index.js +2 -2
|
@@ -61,7 +61,19 @@ export class ListComponent {
|
|
|
61
61
|
allowCustom;
|
|
62
62
|
defaultItem;
|
|
63
63
|
set data(data) {
|
|
64
|
-
this._data = data[0]
|
|
64
|
+
this._data = data[0]?.header ? data.slice(0) : data;
|
|
65
|
+
if (this.dataService.grouped) {
|
|
66
|
+
if (this.virtual) {
|
|
67
|
+
const firstGroupItem = this.dataService.data.find(item => item.header && item.groupIndex === this.data[0].groupIndex);
|
|
68
|
+
if (!this.data[0].header) {
|
|
69
|
+
this._data = [firstGroupItem, ...this._data.slice(1)];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
this.groupedData = this._data.filter(item => item?.header);
|
|
73
|
+
this.groupedData.forEach(group => {
|
|
74
|
+
group.items = this._data.filter(item => !item.header && item.groupIndex === group.groupIndex);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
65
77
|
}
|
|
66
78
|
get data() {
|
|
67
79
|
return this._data;
|
|
@@ -78,6 +90,7 @@ export class ListComponent {
|
|
|
78
90
|
get size() {
|
|
79
91
|
return this._size;
|
|
80
92
|
}
|
|
93
|
+
groupedData;
|
|
81
94
|
rounded = 'medium';
|
|
82
95
|
onClick = new EventEmitter();
|
|
83
96
|
pageChange = new EventEmitter();
|
|
@@ -157,9 +170,6 @@ export class ListComponent {
|
|
|
157
170
|
this.scrollToFocused = !changes['data'].isFirstChange();
|
|
158
171
|
}
|
|
159
172
|
this.setOverflow();
|
|
160
|
-
this.zone.onStable.pipe(take(1)).subscribe(() => {
|
|
161
|
-
this.setGroupAttributes();
|
|
162
|
-
});
|
|
163
173
|
}
|
|
164
174
|
if (isChanged('virtual', changes, false)) {
|
|
165
175
|
this.setOverflow();
|
|
@@ -175,31 +185,8 @@ export class ListComponent {
|
|
|
175
185
|
this.lastScrollTop = this.content.nativeElement.scrollTop;
|
|
176
186
|
});
|
|
177
187
|
});
|
|
178
|
-
this.setGroupAttributes();
|
|
179
188
|
this.setOverflow();
|
|
180
189
|
}
|
|
181
|
-
setGroupAttributes() {
|
|
182
|
-
const liItems = document.querySelectorAll('li');
|
|
183
|
-
let isGroup;
|
|
184
|
-
let childrenliItemsIds = [];
|
|
185
|
-
let firstGroupReached = false;
|
|
186
|
-
let previousGroup;
|
|
187
|
-
liItems.forEach((li, idx) => {
|
|
188
|
-
isGroup = li.getAttribute('role') === 'group';
|
|
189
|
-
if (!isGroup && firstGroupReached) {
|
|
190
|
-
this.renderer.setAttribute(li, 'aria-describedby', previousGroup.getAttribute('id'));
|
|
191
|
-
childrenliItemsIds.push(li.getAttribute('id'));
|
|
192
|
-
if (idx + 1 >= liItems.length || liItems[idx + 1]?.getAttribute('role') === 'group') {
|
|
193
|
-
this.renderer.setAttribute(previousGroup, 'aria-owns', childrenliItemsIds.join(' '));
|
|
194
|
-
childrenliItemsIds = [];
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
if (isGroup) {
|
|
198
|
-
firstGroupReached = true;
|
|
199
|
-
previousGroup = li;
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
190
|
ngAfterViewChecked() {
|
|
204
191
|
if (this.virtual) {
|
|
205
192
|
this.positionItems();
|
|
@@ -274,7 +261,7 @@ export class ListComponent {
|
|
|
274
261
|
const item = this.firstVisibleItem();
|
|
275
262
|
if (item) {
|
|
276
263
|
let index;
|
|
277
|
-
if (item.getAttribute("role") === "
|
|
264
|
+
if (item.getAttribute("role") === "presentation") {
|
|
278
265
|
index = parseInt(item.getAttribute("group-index"), 10);
|
|
279
266
|
this.currentGroup = this.dataService.groupAt(index)?.value;
|
|
280
267
|
}
|
|
@@ -320,7 +307,6 @@ export class ListComponent {
|
|
|
320
307
|
this.lastLoaded = end;
|
|
321
308
|
this.pageChange.emit({ skip: start, take: this.pageSize });
|
|
322
309
|
});
|
|
323
|
-
this.setGroupAttributes();
|
|
324
310
|
}
|
|
325
311
|
index(groupIndex, itemIndex) {
|
|
326
312
|
return groupIndex > 0 ? (this.dataService.groupIndices[groupIndex - 1] + itemIndex) : itemIndex;
|
|
@@ -331,6 +317,9 @@ export class ListComponent {
|
|
|
331
317
|
getValue(dataItem) {
|
|
332
318
|
return getter(dataItem, this.valueField);
|
|
333
319
|
}
|
|
320
|
+
generateGroupId(dataItem) {
|
|
321
|
+
return `${this.optionPrefix}-${dataItem.groupIndex}-${dataItem.value.toString().split(' ').join('')}`;
|
|
322
|
+
}
|
|
334
323
|
isDisabled(index) {
|
|
335
324
|
if (isPresent(this.virtual) && !this.dataService.grouped) {
|
|
336
325
|
index += this.virtual.skip;
|
|
@@ -441,15 +430,6 @@ export class ListComponent {
|
|
|
441
430
|
this.renderer.setStyle(item.element.nativeElement, "transform", `translateY(${offsetY}px`);
|
|
442
431
|
});
|
|
443
432
|
}
|
|
444
|
-
/**
|
|
445
|
-
* Indicates whether the first group header from the data set is in the targeted virtual page.
|
|
446
|
-
*/
|
|
447
|
-
firstGroupHeaderInTargetedPage(itemIndex) {
|
|
448
|
-
if (!isPresent(this.virtual)) {
|
|
449
|
-
return true;
|
|
450
|
-
}
|
|
451
|
-
return this.virtual.skip === 0 && (this.virtual.pageSize > itemIndex);
|
|
452
|
-
}
|
|
453
433
|
setComponentClasses() {
|
|
454
434
|
if (this.type === 'list') {
|
|
455
435
|
this.renderer.addClass(this.wrapper.nativeElement, 'k-list');
|
|
@@ -465,7 +445,7 @@ export class ListComponent {
|
|
|
465
445
|
}
|
|
466
446
|
}
|
|
467
447
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ListComponent, deps: [{ token: i1.DataService }, { token: i0.ElementRef }, { token: i2.SelectionService }, { token: i3.DisabledItemsService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i4.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
468
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ListComponent, isStandalone: true, selector: "kendo-list", inputs: { selected: "selected", focused: "focused", textField: "textField", valueField: "valueField", height: "height", template: "template", groupTemplate: "groupTemplate", fixedGroupTemplate: "fixedGroupTemplate", show: "show", id: "id", optionPrefix: "optionPrefix", multipleSelection: "multipleSelection", virtual: "virtual", type: "type", checkboxes: "checkboxes", ariaLive: "ariaLive", isMultiselect: "isMultiselect", isActionSheetExpanded: "isActionSheetExpanded", showStickyHeader: "showStickyHeader", rowWidth: "rowWidth", customItemTemplate: "customItemTemplate", text: "text", allowCustom: "allowCustom", defaultItem: "defaultItem", data: "data", size: "size", rounded: "rounded" }, outputs: { onClick: "onClick", pageChange: "pageChange", listResize: "listResize", popupListScroll: "popupListScroll" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, static: true }, { propertyName: "list", first: true, predicate: ["list"], descendants: true
|
|
448
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ListComponent, isStandalone: true, selector: "kendo-list", inputs: { selected: "selected", focused: "focused", textField: "textField", valueField: "valueField", height: "height", template: "template", groupTemplate: "groupTemplate", fixedGroupTemplate: "fixedGroupTemplate", show: "show", id: "id", optionPrefix: "optionPrefix", multipleSelection: "multipleSelection", virtual: "virtual", type: "type", checkboxes: "checkboxes", ariaLive: "ariaLive", isMultiselect: "isMultiselect", isActionSheetExpanded: "isActionSheetExpanded", showStickyHeader: "showStickyHeader", rowWidth: "rowWidth", customItemTemplate: "customItemTemplate", text: "text", allowCustom: "allowCustom", defaultItem: "defaultItem", data: "data", size: "size", rounded: "rounded" }, outputs: { onClick: "onClick", pageChange: "pageChange", listResize: "listResize", popupListScroll: "popupListScroll" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, static: true }, { propertyName: "list", first: true, predicate: ["list"], descendants: true }, { propertyName: "virtualContainer", first: true, predicate: ["virtualContainer"], descendants: true }, { propertyName: "items", predicate: ListItemDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
469
449
|
<div *ngIf="defaultItem && !template"
|
|
470
450
|
class="k-list-optionlabel"
|
|
471
451
|
[ngClass]="{ 'k-disabled': isDisabledDefaultItem }"
|
|
@@ -519,15 +499,22 @@ export class ListComponent {
|
|
|
519
499
|
[class]="listContentClass"
|
|
520
500
|
[style.maxHeight.px]="height"
|
|
521
501
|
unselectable="on"
|
|
522
|
-
(scroll)="popupListScroll.emit($event)"
|
|
502
|
+
(scroll)="popupListScroll.emit($event)"
|
|
503
|
+
[attr.role]="dataService.grouped ? 'listbox' : null"
|
|
504
|
+
[attr.id]="dataService.grouped ? id : null"
|
|
505
|
+
[attr.aria-live]="dataService.grouped ? ariaLive : null"
|
|
506
|
+
[attr.aria-multiselectable]="dataService.grouped ? isMultiselect : null"
|
|
507
|
+
[attr.aria-hidden]="dataService.grouped ? !show : null"
|
|
508
|
+
>
|
|
523
509
|
<ul #list
|
|
524
|
-
|
|
510
|
+
*ngIf="!dataService.grouped"
|
|
511
|
+
[attr.role]="'listbox'"
|
|
525
512
|
[class]="listClass"
|
|
526
513
|
[attr.id]="id"
|
|
527
514
|
[attr.aria-live]="ariaLive"
|
|
528
515
|
[attr.aria-multiselectable]="isMultiselect"
|
|
529
516
|
[attr.aria-hidden]="!show">
|
|
530
|
-
<ng-
|
|
517
|
+
<ng-container *ngFor="let dataItem of data; let itemIndex = index">
|
|
531
518
|
<li
|
|
532
519
|
role="option"
|
|
533
520
|
kendoDropDownsSelectable
|
|
@@ -563,73 +550,81 @@ export class ListComponent {
|
|
|
563
550
|
</ng-template>
|
|
564
551
|
<ng-template [ngIf]="!template"><span class="k-list-item-text">{{ getText(dataItem) }}</span></ng-template>
|
|
565
552
|
</li>
|
|
566
|
-
</ng-
|
|
567
|
-
<
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
553
|
+
</ng-container>
|
|
554
|
+
<kendo-resize-sensor
|
|
555
|
+
*ngIf="!virtual"
|
|
556
|
+
(resize)="listResize.emit()"
|
|
557
|
+
>
|
|
558
|
+
</kendo-resize-sensor>
|
|
559
|
+
</ul>
|
|
560
|
+
|
|
561
|
+
<ng-container *ngIf="dataService.grouped" #list>
|
|
562
|
+
<ul *ngFor="let dataItem of groupedData"
|
|
563
|
+
#groupUl
|
|
564
|
+
class="k-list-ul"
|
|
565
|
+
[attr.role]="'group'"
|
|
566
|
+
[attr.aria-labelledby]="generateGroupId(dataItem)"
|
|
567
|
+
>
|
|
568
|
+
<li *ngIf="dataItem.header"
|
|
569
|
+
role="presentation"
|
|
572
570
|
[class]="listGroupItemClass"
|
|
573
|
-
[class.k-table-alt-row]="isAltRow(
|
|
571
|
+
[class.k-table-alt-row]="isAltRow(dataItem.index - 1)"
|
|
574
572
|
[ngStyle]="{
|
|
575
573
|
'height.px': virtual?.itemHeight,
|
|
576
574
|
'minHeight.px' : virtual?.itemHeight,
|
|
577
575
|
'boxSizing' : virtual ? 'border-box' : 'inherit'}"
|
|
578
576
|
[attr.group-index]="dataItem.index"
|
|
579
|
-
[attr.id]="
|
|
580
|
-
[
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
577
|
+
[attr.id]="groupUl.getAttribute('aria-labelledby')"
|
|
578
|
+
[style.width.px]="rowWidth ?? null"
|
|
579
|
+
>
|
|
580
|
+
<span [class]="listGroupItemTextClass">
|
|
581
|
+
<ng-template *ngIf="groupTemplate"
|
|
582
|
+
[templateContext]="{
|
|
583
|
+
templateRef: groupTemplate.templateRef,
|
|
584
|
+
$implicit: dataItem.value
|
|
585
|
+
}">
|
|
586
|
+
</ng-template>
|
|
587
|
+
<ng-template [ngIf]="!groupTemplate">{{ dataItem.value }}</ng-template>
|
|
588
|
+
</span>
|
|
591
589
|
</li>
|
|
592
|
-
<li
|
|
593
|
-
#li
|
|
594
|
-
*ngIf="!dataItem.header"
|
|
590
|
+
<li *ngFor="let item of dataItem.items"
|
|
595
591
|
role="option"
|
|
596
592
|
kendoDropDownsSelectable
|
|
597
593
|
[height]="virtual?.itemHeight"
|
|
598
|
-
[index]="
|
|
594
|
+
[index]="item.offsetIndex"
|
|
599
595
|
[multipleSelection]="multipleSelection"
|
|
600
|
-
[attr.absolute-index]="
|
|
601
|
-
[attr.id]="optionPrefix + '-' + (
|
|
596
|
+
[attr.absolute-index]="item.index"
|
|
597
|
+
[attr.id]="optionPrefix + '-' + (item.index - 1 - item.groupIndex)"
|
|
602
598
|
[attr.tabIndex]="-1"
|
|
603
|
-
[attr.aria-selected]="isItemSelected(
|
|
599
|
+
[attr.aria-selected]="isItemSelected(item.offsetIndex)"
|
|
604
600
|
[class]="listItemClass"
|
|
605
601
|
[ngClass]="{
|
|
606
|
-
'k-disabled': isDisabled(
|
|
607
|
-
'k-table-alt-row': isAltRow(
|
|
602
|
+
'k-disabled': isDisabled(item.offsetIndex),
|
|
603
|
+
'k-table-alt-row': isAltRow(item.index - 1)
|
|
608
604
|
}"
|
|
609
|
-
[style.width.px]="rowWidth ?? null"
|
|
610
|
-
>
|
|
605
|
+
[style.width.px]="rowWidth ?? null">
|
|
611
606
|
<ng-template *ngIf="template"
|
|
612
607
|
[templateContext]="{
|
|
613
608
|
templateRef: template.templateRef,
|
|
614
|
-
$implicit:
|
|
609
|
+
$implicit: item.value
|
|
615
610
|
}">
|
|
616
611
|
</ng-template>
|
|
617
|
-
<ng-template [ngIf]="!template"><span class="k-list-item-text">{{ getText(
|
|
612
|
+
<ng-template [ngIf]="!template"><span class="k-list-item-text">{{ getText(item.value) }}</span></ng-template>
|
|
618
613
|
</li>
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
</
|
|
625
|
-
</
|
|
614
|
+
<kendo-resize-sensor
|
|
615
|
+
*ngIf="!virtual"
|
|
616
|
+
(resize)="listResize.emit()"
|
|
617
|
+
>
|
|
618
|
+
</kendo-resize-sensor>
|
|
619
|
+
</ul>
|
|
620
|
+
</ng-container>
|
|
626
621
|
<div *ngIf="virtual" #virtualContainer class="k-height-container" role="presentation">
|
|
627
622
|
<div [style.height.px]="scrollHeight">
|
|
628
623
|
<kendo-resize-sensor (resize)="listResize.emit()"></kendo-resize-sensor>
|
|
629
624
|
</div>
|
|
630
625
|
</div>
|
|
631
626
|
</div>
|
|
632
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: ListItemDirective, selector: "\"li[role=option], li[role=group]\"" }, { kind: "directive", type: SelectableDirective, selector: "[kendoDropDownsSelectable]", inputs: ["index", "checkboxes", "height", "isMultiselect", "multipleSelection"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }] });
|
|
627
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: ListItemDirective, selector: "\"li[role=option], li[role=group], li[role=presentation]\"" }, { kind: "directive", type: SelectableDirective, selector: "[kendoDropDownsSelectable]", inputs: ["index", "checkboxes", "height", "isMultiselect", "multipleSelection"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }] });
|
|
633
628
|
}
|
|
634
629
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ListComponent, decorators: [{
|
|
635
630
|
type: Component,
|
|
@@ -689,15 +684,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
689
684
|
[class]="listContentClass"
|
|
690
685
|
[style.maxHeight.px]="height"
|
|
691
686
|
unselectable="on"
|
|
692
|
-
(scroll)="popupListScroll.emit($event)"
|
|
687
|
+
(scroll)="popupListScroll.emit($event)"
|
|
688
|
+
[attr.role]="dataService.grouped ? 'listbox' : null"
|
|
689
|
+
[attr.id]="dataService.grouped ? id : null"
|
|
690
|
+
[attr.aria-live]="dataService.grouped ? ariaLive : null"
|
|
691
|
+
[attr.aria-multiselectable]="dataService.grouped ? isMultiselect : null"
|
|
692
|
+
[attr.aria-hidden]="dataService.grouped ? !show : null"
|
|
693
|
+
>
|
|
693
694
|
<ul #list
|
|
694
|
-
|
|
695
|
+
*ngIf="!dataService.grouped"
|
|
696
|
+
[attr.role]="'listbox'"
|
|
695
697
|
[class]="listClass"
|
|
696
698
|
[attr.id]="id"
|
|
697
699
|
[attr.aria-live]="ariaLive"
|
|
698
700
|
[attr.aria-multiselectable]="isMultiselect"
|
|
699
701
|
[attr.aria-hidden]="!show">
|
|
700
|
-
<ng-
|
|
702
|
+
<ng-container *ngFor="let dataItem of data; let itemIndex = index">
|
|
701
703
|
<li
|
|
702
704
|
role="option"
|
|
703
705
|
kendoDropDownsSelectable
|
|
@@ -733,66 +735,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
733
735
|
</ng-template>
|
|
734
736
|
<ng-template [ngIf]="!template"><span class="k-list-item-text">{{ getText(dataItem) }}</span></ng-template>
|
|
735
737
|
</li>
|
|
736
|
-
</ng-
|
|
737
|
-
<
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
738
|
+
</ng-container>
|
|
739
|
+
<kendo-resize-sensor
|
|
740
|
+
*ngIf="!virtual"
|
|
741
|
+
(resize)="listResize.emit()"
|
|
742
|
+
>
|
|
743
|
+
</kendo-resize-sensor>
|
|
744
|
+
</ul>
|
|
745
|
+
|
|
746
|
+
<ng-container *ngIf="dataService.grouped" #list>
|
|
747
|
+
<ul *ngFor="let dataItem of groupedData"
|
|
748
|
+
#groupUl
|
|
749
|
+
class="k-list-ul"
|
|
750
|
+
[attr.role]="'group'"
|
|
751
|
+
[attr.aria-labelledby]="generateGroupId(dataItem)"
|
|
752
|
+
>
|
|
753
|
+
<li *ngIf="dataItem.header"
|
|
754
|
+
role="presentation"
|
|
742
755
|
[class]="listGroupItemClass"
|
|
743
|
-
[class.k-table-alt-row]="isAltRow(
|
|
756
|
+
[class.k-table-alt-row]="isAltRow(dataItem.index - 1)"
|
|
744
757
|
[ngStyle]="{
|
|
745
758
|
'height.px': virtual?.itemHeight,
|
|
746
759
|
'minHeight.px' : virtual?.itemHeight,
|
|
747
760
|
'boxSizing' : virtual ? 'border-box' : 'inherit'}"
|
|
748
761
|
[attr.group-index]="dataItem.index"
|
|
749
|
-
[attr.id]="
|
|
750
|
-
[
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
762
|
+
[attr.id]="groupUl.getAttribute('aria-labelledby')"
|
|
763
|
+
[style.width.px]="rowWidth ?? null"
|
|
764
|
+
>
|
|
765
|
+
<span [class]="listGroupItemTextClass">
|
|
766
|
+
<ng-template *ngIf="groupTemplate"
|
|
767
|
+
[templateContext]="{
|
|
768
|
+
templateRef: groupTemplate.templateRef,
|
|
769
|
+
$implicit: dataItem.value
|
|
770
|
+
}">
|
|
771
|
+
</ng-template>
|
|
772
|
+
<ng-template [ngIf]="!groupTemplate">{{ dataItem.value }}</ng-template>
|
|
773
|
+
</span>
|
|
761
774
|
</li>
|
|
762
|
-
<li
|
|
763
|
-
#li
|
|
764
|
-
*ngIf="!dataItem.header"
|
|
775
|
+
<li *ngFor="let item of dataItem.items"
|
|
765
776
|
role="option"
|
|
766
777
|
kendoDropDownsSelectable
|
|
767
778
|
[height]="virtual?.itemHeight"
|
|
768
|
-
[index]="
|
|
779
|
+
[index]="item.offsetIndex"
|
|
769
780
|
[multipleSelection]="multipleSelection"
|
|
770
|
-
[attr.absolute-index]="
|
|
771
|
-
[attr.id]="optionPrefix + '-' + (
|
|
781
|
+
[attr.absolute-index]="item.index"
|
|
782
|
+
[attr.id]="optionPrefix + '-' + (item.index - 1 - item.groupIndex)"
|
|
772
783
|
[attr.tabIndex]="-1"
|
|
773
|
-
[attr.aria-selected]="isItemSelected(
|
|
784
|
+
[attr.aria-selected]="isItemSelected(item.offsetIndex)"
|
|
774
785
|
[class]="listItemClass"
|
|
775
786
|
[ngClass]="{
|
|
776
|
-
'k-disabled': isDisabled(
|
|
777
|
-
'k-table-alt-row': isAltRow(
|
|
787
|
+
'k-disabled': isDisabled(item.offsetIndex),
|
|
788
|
+
'k-table-alt-row': isAltRow(item.index - 1)
|
|
778
789
|
}"
|
|
779
|
-
[style.width.px]="rowWidth ?? null"
|
|
780
|
-
>
|
|
790
|
+
[style.width.px]="rowWidth ?? null">
|
|
781
791
|
<ng-template *ngIf="template"
|
|
782
792
|
[templateContext]="{
|
|
783
793
|
templateRef: template.templateRef,
|
|
784
|
-
$implicit:
|
|
794
|
+
$implicit: item.value
|
|
785
795
|
}">
|
|
786
796
|
</ng-template>
|
|
787
|
-
<ng-template [ngIf]="!template"><span class="k-list-item-text">{{ getText(
|
|
797
|
+
<ng-template [ngIf]="!template"><span class="k-list-item-text">{{ getText(item.value) }}</span></ng-template>
|
|
788
798
|
</li>
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
</
|
|
795
|
-
</
|
|
799
|
+
<kendo-resize-sensor
|
|
800
|
+
*ngIf="!virtual"
|
|
801
|
+
(resize)="listResize.emit()"
|
|
802
|
+
>
|
|
803
|
+
</kendo-resize-sensor>
|
|
804
|
+
</ul>
|
|
805
|
+
</ng-container>
|
|
796
806
|
<div *ngIf="virtual" #virtualContainer class="k-height-container" role="presentation">
|
|
797
807
|
<div [style.height.px]="scrollHeight">
|
|
798
808
|
<kendo-resize-sensor (resize)="listResize.emit()"></kendo-resize-sensor>
|
|
@@ -873,8 +883,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
873
883
|
args: ['content', { static: true }]
|
|
874
884
|
}], list: [{
|
|
875
885
|
type: ViewChild,
|
|
876
|
-
args: ['list'
|
|
886
|
+
args: ['list']
|
|
877
887
|
}], virtualContainer: [{
|
|
878
888
|
type: ViewChild,
|
|
879
|
-
args: ['virtualContainer'
|
|
889
|
+
args: ['virtualContainer']
|
|
880
890
|
}] } });
|
|
@@ -978,14 +978,11 @@ export class DropDownListComponent {
|
|
|
978
978
|
this.renderer.setAttribute(popupWrapper, 'role', 'region');
|
|
979
979
|
this.renderer.setAttribute(popupWrapper, 'aria-label', this.messageFor('popupLabel'));
|
|
980
980
|
}
|
|
981
|
-
const listBox = popupWrapper.querySelector('ul.k-list-ul');
|
|
982
|
-
const ariaLabel = this.wrapper.nativeElement.getAttribute('aria-labelledby');
|
|
983
|
-
if (ariaLabel) {
|
|
984
|
-
listBox.setAttribute('aria-labelledby', ariaLabel);
|
|
985
|
-
}
|
|
986
981
|
this.subs.add(this.popupRef.popupOpen.subscribe(() => {
|
|
987
982
|
this.cdr.detectChanges();
|
|
988
|
-
|
|
983
|
+
if (!this.dataService.grouped) {
|
|
984
|
+
setListBoxAriaLabelledBy(this.optionsList, this.wrapper, this.renderer);
|
|
985
|
+
}
|
|
989
986
|
this.setAriaactivedescendant();
|
|
990
987
|
this.optionsList.scrollToItem(this.selectionService.focused);
|
|
991
988
|
this.selectionService.focus(this.selectionService.focused);
|
|
@@ -1444,7 +1441,9 @@ export class DropDownListComponent {
|
|
|
1444
1441
|
this.cdr.detectChanges();
|
|
1445
1442
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'true');
|
|
1446
1443
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-controls', this.listBoxId);
|
|
1447
|
-
|
|
1444
|
+
if (!this.dataService.grouped) {
|
|
1445
|
+
setListBoxAriaLabelledBy(this.optionsList, this.wrapper, this.renderer);
|
|
1446
|
+
}
|
|
1448
1447
|
this.setAriaactivedescendant();
|
|
1449
1448
|
this.adaptiveTitle = setActionSheetTitle(this.wrapper, this.adaptiveTitle);
|
|
1450
1449
|
this.cdr.detectChanges();
|
|
@@ -1689,7 +1689,9 @@ export class MultiSelectComponent {
|
|
|
1689
1689
|
popupWrapper.setAttribute("dir", this.direction);
|
|
1690
1690
|
this.popupRef.popupOpen.subscribe(() => {
|
|
1691
1691
|
this.cdr.detectChanges();
|
|
1692
|
-
|
|
1692
|
+
if (!this.dataService.grouped) {
|
|
1693
|
+
setListBoxAriaLabelledBy(this.optionsList, this.searchbar.input, this.renderer);
|
|
1694
|
+
}
|
|
1693
1695
|
this.optionsList.scrollToItem(this.selectionService.focused);
|
|
1694
1696
|
this.selectionService.focus(this.selectionService.focused);
|
|
1695
1697
|
this.opened.emit();
|
|
@@ -1750,7 +1752,9 @@ export class MultiSelectComponent {
|
|
|
1750
1752
|
// Stores the current value state until the user either accepts or cancels it
|
|
1751
1753
|
this._valueHolder = [...this.value];
|
|
1752
1754
|
this.cdr.detectChanges();
|
|
1753
|
-
|
|
1755
|
+
if (!this.dataService.grouped) {
|
|
1756
|
+
setListBoxAriaLabelledBy(this.optionsList, this.searchbar.input, this.renderer);
|
|
1757
|
+
}
|
|
1754
1758
|
this.adaptiveTitle = setActionSheetTitle(this.searchbar.input, this.adaptiveTitle);
|
|
1755
1759
|
this.cdr.detectChanges();
|
|
1756
1760
|
this.opened.emit();
|
|
@@ -10,7 +10,7 @@ export const packageMetadata = {
|
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCode: 'KENDOUIANGULAR',
|
|
12
12
|
productCodes: ['KENDOUIANGULAR'],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: '21.0.0-develop.
|
|
13
|
+
publishDate: 1762426753,
|
|
14
|
+
version: '21.0.0-develop.21',
|
|
15
15
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
16
16
|
};
|