@progress/kendo-angular-dropdowns 21.1.1-develop.2 → 21.2.0-develop.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ import { DisabledItemsService } from './disabled-items/disabled-items.service';
17
17
  import { DataService } from './data.service';
18
18
  import { NavigationAction } from './navigation/navigation-action';
19
19
  import { SelectableDirective } from './selection/selectable.directive';
20
- import { NgIf, NgStyle, NgFor, NgClass } from '@angular/common';
20
+ import { NgStyle, NgClass } from '@angular/common';
21
21
  import { CustomItemTemplateDirective } from './templates/custom-item-template.directive';
22
22
  import * as i0 from "@angular/core";
23
23
  import * as i1 from "./data.service";
@@ -445,15 +445,18 @@ export class ListComponent {
445
445
  }
446
446
  }
447
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 });
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: `
449
- <div *ngIf="defaultItem && !template"
448
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.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: `
449
+ @if (defaultItem && !template) {
450
+ <div
450
451
  class="k-list-optionlabel"
451
452
  [ngClass]="{ 'k-disabled': isDisabledDefaultItem }"
452
453
  kendoDropDownsSelectable
453
454
  [index]="-1">
454
455
  {{ getDefaultItemText() }}
455
- </div>
456
- <div *ngIf="defaultItem && template"
456
+ </div>
457
+ }
458
+ @if (defaultItem && template) {
459
+ <div
457
460
  class="k-list-optionlabel"
458
461
  [ngClass]="{ 'k-disabled': isDisabledDefaultItem }"
459
462
  kendoDropDownsSelectable
@@ -464,181 +467,220 @@ export class ListComponent {
464
467
  $implicit: defaultItem
465
468
  }">
466
469
  </ng-template>
467
- </div>
468
- <div *ngIf="allowCustom && text"
470
+ </div>
471
+ }
472
+ @if (allowCustom && text) {
473
+ <div
469
474
  kendoDropDownsSelectable
470
475
  [multipleSelection]="true"
471
476
  [index]="-1"
472
477
  class="k-list-custom-value">
473
- <ng-template *ngIf="customItemTemplate; else default_custom_item_template"
478
+ @if (customItemTemplate) {
479
+ <ng-template
474
480
  [templateContext]="{
475
481
  templateRef: customItemTemplate.templateRef,
476
482
  $implicit: text
477
483
  }">
478
- </ng-template>
479
- <ng-template #default_custom_item_template>
480
- {{useCustomValueText}}
481
- </ng-template>
482
- </div>
483
- <div *ngIf="dataService.grouped && showStickyHeader"
484
+ </ng-template>
485
+ } @else {
486
+ {{useCustomValueText}}
487
+ }
488
+ </div>
489
+ }
490
+ @if (dataService.grouped && showStickyHeader) {
491
+ <div
484
492
  [class]="listGroupStickyHeaderClass"
485
493
  [ngStyle]="{
486
494
  'height.px': virtual?.itemHeight,
487
495
  'minHeight.px' : virtual?.itemHeight,
488
496
  'boxSizing' : virtual ? 'border-box' : 'inherit'}"
489
497
  >
490
- <ng-template *ngIf="fixedGroupTemplate"
498
+ @if (fixedGroupTemplate) {
499
+ <ng-template
491
500
  [templateContext]="{
492
501
  templateRef: fixedGroupTemplate.templateRef,
493
502
  $implicit: currentGroup
494
503
  }">
495
- </ng-template>
496
- <ng-template [ngIf]="!fixedGroupTemplate"><span [class]="listGroupStickyHeaderTextClass">{{ currentGroup }}</span></ng-template>
497
- </div>
504
+ </ng-template>
505
+ }
506
+ @if (!fixedGroupTemplate) {
507
+ <span [class]="listGroupStickyHeaderTextClass">{{ currentGroup }}</span>
508
+ }
509
+ </div>
510
+ }
498
511
  <div #content
499
- [class]="listContentClass"
500
- [style.maxHeight.px]="height"
501
- unselectable="on"
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
- >
512
+ [class]="listContentClass"
513
+ [style.maxHeight.px]="height"
514
+ unselectable="on"
515
+ (scroll)="popupListScroll.emit($event)"
516
+ [attr.role]="dataService.grouped ? 'listbox' : null"
517
+ [attr.id]="dataService.grouped ? id : null"
518
+ [attr.aria-live]="dataService.grouped ? ariaLive : null"
519
+ [attr.aria-multiselectable]="dataService.grouped ? isMultiselect : null"
520
+ [attr.aria-hidden]="dataService.grouped ? !show : null"
521
+ >
522
+ @if (!dataService.grouped) {
509
523
  <ul #list
510
- *ngIf="!dataService.grouped"
511
- [attr.role]="'listbox'"
512
- [class]="listClass"
513
- [attr.id]="id"
514
- [attr.aria-live]="ariaLive"
515
- [attr.aria-multiselectable]="isMultiselect"
516
- [attr.aria-hidden]="!show">
517
- <ng-container *ngFor="let dataItem of data; let itemIndex = index">
518
- <li
519
- role="option"
520
- kendoDropDownsSelectable
521
- [checkboxes]="checkboxes"
522
- [height]="virtual?.itemHeight"
523
- [index]="itemIndex + startFrom"
524
- [multipleSelection]="multipleSelection"
525
- [attr.id]="optionPrefix + '-' + itemIndex"
526
- [attr.tabIndex]="-1"
527
- [attr.aria-selected]="isItemSelected(itemIndex)"
528
- [class]="listItemClass"
524
+ [attr.role]="'listbox'"
525
+ [class]="listClass"
526
+ [attr.id]="id"
527
+ [attr.aria-live]="ariaLive"
528
+ [attr.aria-multiselectable]="isMultiselect"
529
+ [attr.aria-hidden]="!show">
530
+ @for (dataItem of data; track $index; let itemIndex = $index) {
531
+ <li
532
+ role="option"
533
+ kendoDropDownsSelectable
534
+ [checkboxes]="checkboxes"
535
+ [height]="virtual?.itemHeight"
536
+ [index]="itemIndex + startFrom"
537
+ [multipleSelection]="multipleSelection"
538
+ [attr.id]="optionPrefix + '-' + itemIndex"
539
+ [attr.tabIndex]="-1"
540
+ [attr.aria-selected]="isItemSelected(itemIndex)"
541
+ [class]="listItemClass"
529
542
  [ngClass]="{
530
543
  'k-disabled': isDisabled(itemIndex),
531
544
  'k-table-alt-row': isAltRow(itemIndex)
532
545
  }"
533
- [style.width.px]="rowWidth ?? null"
534
- >
535
- <input
536
- *ngIf="checkboxes.enabled"
537
- type="checkbox"
538
- class="k-checkbox"
539
- role="presentation"
540
- tabindex="-1"
541
- [ngClass]="checkboxClasses"
542
- (change)="onCheckedChange($event, itemIndex + startFrom)"
543
- [checked]="isChecked(itemIndex)"
544
- />
545
- <ng-template *ngIf="template"
546
+ [style.width.px]="rowWidth ?? null"
547
+ >
548
+ @if (checkboxes.enabled) {
549
+ <input
550
+ type="checkbox"
551
+ class="k-checkbox"
552
+ role="presentation"
553
+ tabindex="-1"
554
+ [ngClass]="checkboxClasses"
555
+ (change)="onCheckedChange($event, itemIndex + startFrom)"
556
+ [checked]="isChecked(itemIndex)"
557
+ />
558
+ }
559
+ @if (template) {
560
+ <ng-template
546
561
  [templateContext]="{
547
562
  templateRef: template.templateRef,
548
563
  $implicit: dataItem
549
564
  }">
550
- </ng-template>
551
- <ng-template [ngIf]="!template"><span class="k-list-item-text">{{ getText(dataItem) }}</span></ng-template>
552
- </li>
553
- </ng-container>
565
+ </ng-template>
566
+ }
567
+ @if (!template) {
568
+ <span class="k-list-item-text">{{ getText(dataItem) }}</span>
569
+ }
570
+ </li>
571
+ }
572
+ @if (!virtual) {
554
573
  <kendo-resize-sensor
555
- *ngIf="!virtual"
556
- (resize)="listResize.emit()"
557
- >
574
+ (resize)="listResize.emit()"
575
+ >
558
576
  </kendo-resize-sensor>
577
+ }
559
578
  </ul>
579
+ }
560
580
 
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"
570
- [class]="listGroupItemClass"
571
- [class.k-table-alt-row]="isAltRow(dataItem.index - 1)"
581
+ @if (dataService.grouped) {
582
+ <ng-container #list>
583
+ @for (dataItem of groupedData; track dataItem) {
584
+ <ul
585
+ #groupUl
586
+ class="k-list-ul"
587
+ [attr.role]="'group'"
588
+ [attr.aria-labelledby]="generateGroupId(dataItem)"
589
+ >
590
+ @if (dataItem.header) {
591
+ <li
592
+ role="presentation"
593
+ [class]="listGroupItemClass"
594
+ [class.k-table-alt-row]="isAltRow(dataItem.index - 1)"
572
595
  [ngStyle]="{
573
596
  'height.px': virtual?.itemHeight,
574
597
  'minHeight.px' : virtual?.itemHeight,
575
598
  'boxSizing' : virtual ? 'border-box' : 'inherit'}"
576
- [attr.group-index]="dataItem.index"
577
- [attr.id]="groupUl.getAttribute('aria-labelledby')"
578
- [style.width.px]="rowWidth ?? null"
579
- >
580
- <span [class]="listGroupItemTextClass">
581
- <ng-template *ngIf="groupTemplate"
599
+ [attr.group-index]="dataItem.index"
600
+ [attr.id]="groupUl.getAttribute('aria-labelledby')"
601
+ [style.width.px]="rowWidth ?? null"
602
+ >
603
+ <span [class]="listGroupItemTextClass">
604
+ @if (groupTemplate) {
605
+ <ng-template
582
606
  [templateContext]="{
583
607
  templateRef: groupTemplate.templateRef,
584
608
  $implicit: dataItem.value
585
609
  }">
586
- </ng-template>
587
- <ng-template [ngIf]="!groupTemplate">{{ dataItem.value }}</ng-template>
588
- </span>
610
+ </ng-template>
611
+ }
612
+ @if (!groupTemplate) {
613
+ {{ dataItem.value }}
614
+ }
615
+ </span>
589
616
  </li>
590
- <li *ngFor="let item of dataItem.items"
591
- role="option"
592
- kendoDropDownsSelectable
593
- [height]="virtual?.itemHeight"
594
- [index]="item.offsetIndex"
595
- [multipleSelection]="multipleSelection"
596
- [attr.absolute-index]="item.index"
597
- [attr.id]="optionPrefix + '-' + (item.index - 1 - item.groupIndex)"
598
- [attr.tabIndex]="-1"
599
- [attr.aria-selected]="isItemSelected(item.offsetIndex)"
600
- [class]="listItemClass"
617
+ }
618
+ @for (item of dataItem.items; track item) {
619
+ <li
620
+ role="option"
621
+ kendoDropDownsSelectable
622
+ [height]="virtual?.itemHeight"
623
+ [index]="item.offsetIndex"
624
+ [multipleSelection]="multipleSelection"
625
+ [attr.absolute-index]="item.index"
626
+ [attr.id]="optionPrefix + '-' + (item.index - 1 - item.groupIndex)"
627
+ [attr.tabIndex]="-1"
628
+ [attr.aria-selected]="isItemSelected(item.offsetIndex)"
629
+ [class]="listItemClass"
601
630
  [ngClass]="{
602
631
  'k-disabled': isDisabled(item.offsetIndex),
603
632
  'k-table-alt-row': isAltRow(item.index - 1)
604
633
  }"
605
- [style.width.px]="rowWidth ?? null">
606
- <ng-template *ngIf="template"
634
+ [style.width.px]="rowWidth ?? null">
635
+ @if (template) {
636
+ <ng-template
607
637
  [templateContext]="{
608
638
  templateRef: template.templateRef,
609
639
  $implicit: item.value
610
640
  }">
611
641
  </ng-template>
612
- <ng-template [ngIf]="!template"><span class="k-list-item-text">{{ getText(item.value) }}</span></ng-template>
642
+ }
643
+ @if (!template) {
644
+ <span class="k-list-item-text">{{ getText(item.value) }}</span>
645
+ }
613
646
  </li>
647
+ }
648
+ @if (!virtual) {
614
649
  <kendo-resize-sensor
615
- *ngIf="!virtual"
616
- (resize)="listResize.emit()"
617
- >
650
+ (resize)="listResize.emit()"
651
+ >
618
652
  </kendo-resize-sensor>
653
+ }
619
654
  </ul>
655
+ }
620
656
  </ng-container>
621
- <div *ngIf="virtual" #virtualContainer class="k-height-container" role="presentation">
622
- <div [style.height.px]="scrollHeight">
623
- <kendo-resize-sensor (resize)="listResize.emit()"></kendo-resize-sensor>
624
- </div>
657
+ }
658
+ @if (virtual) {
659
+ <div #virtualContainer class="k-height-container" role="presentation">
660
+ <div [style.height.px]="scrollHeight">
661
+ <kendo-resize-sensor (resize)="listResize.emit()"></kendo-resize-sensor>
662
+ </div>
625
663
  </div>
664
+ }
626
665
  </div>
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"] }] });
666
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { 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"] }] });
628
667
  }
629
668
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ListComponent, decorators: [{
630
669
  type: Component,
631
670
  args: [{
632
671
  selector: 'kendo-list',
633
672
  template: `
634
- <div *ngIf="defaultItem && !template"
673
+ @if (defaultItem && !template) {
674
+ <div
635
675
  class="k-list-optionlabel"
636
676
  [ngClass]="{ 'k-disabled': isDisabledDefaultItem }"
637
677
  kendoDropDownsSelectable
638
678
  [index]="-1">
639
679
  {{ getDefaultItemText() }}
640
- </div>
641
- <div *ngIf="defaultItem && template"
680
+ </div>
681
+ }
682
+ @if (defaultItem && template) {
683
+ <div
642
684
  class="k-list-optionlabel"
643
685
  [ngClass]="{ 'k-disabled': isDisabledDefaultItem }"
644
686
  kendoDropDownsSelectable
@@ -649,169 +691,205 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
649
691
  $implicit: defaultItem
650
692
  }">
651
693
  </ng-template>
652
- </div>
653
- <div *ngIf="allowCustom && text"
694
+ </div>
695
+ }
696
+ @if (allowCustom && text) {
697
+ <div
654
698
  kendoDropDownsSelectable
655
699
  [multipleSelection]="true"
656
700
  [index]="-1"
657
701
  class="k-list-custom-value">
658
- <ng-template *ngIf="customItemTemplate; else default_custom_item_template"
702
+ @if (customItemTemplate) {
703
+ <ng-template
659
704
  [templateContext]="{
660
705
  templateRef: customItemTemplate.templateRef,
661
706
  $implicit: text
662
707
  }">
663
- </ng-template>
664
- <ng-template #default_custom_item_template>
665
- {{useCustomValueText}}
666
- </ng-template>
667
- </div>
668
- <div *ngIf="dataService.grouped && showStickyHeader"
708
+ </ng-template>
709
+ } @else {
710
+ {{useCustomValueText}}
711
+ }
712
+ </div>
713
+ }
714
+ @if (dataService.grouped && showStickyHeader) {
715
+ <div
669
716
  [class]="listGroupStickyHeaderClass"
670
717
  [ngStyle]="{
671
718
  'height.px': virtual?.itemHeight,
672
719
  'minHeight.px' : virtual?.itemHeight,
673
720
  'boxSizing' : virtual ? 'border-box' : 'inherit'}"
674
721
  >
675
- <ng-template *ngIf="fixedGroupTemplate"
722
+ @if (fixedGroupTemplate) {
723
+ <ng-template
676
724
  [templateContext]="{
677
725
  templateRef: fixedGroupTemplate.templateRef,
678
726
  $implicit: currentGroup
679
727
  }">
680
- </ng-template>
681
- <ng-template [ngIf]="!fixedGroupTemplate"><span [class]="listGroupStickyHeaderTextClass">{{ currentGroup }}</span></ng-template>
682
- </div>
728
+ </ng-template>
729
+ }
730
+ @if (!fixedGroupTemplate) {
731
+ <span [class]="listGroupStickyHeaderTextClass">{{ currentGroup }}</span>
732
+ }
733
+ </div>
734
+ }
683
735
  <div #content
684
- [class]="listContentClass"
685
- [style.maxHeight.px]="height"
686
- unselectable="on"
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
- >
736
+ [class]="listContentClass"
737
+ [style.maxHeight.px]="height"
738
+ unselectable="on"
739
+ (scroll)="popupListScroll.emit($event)"
740
+ [attr.role]="dataService.grouped ? 'listbox' : null"
741
+ [attr.id]="dataService.grouped ? id : null"
742
+ [attr.aria-live]="dataService.grouped ? ariaLive : null"
743
+ [attr.aria-multiselectable]="dataService.grouped ? isMultiselect : null"
744
+ [attr.aria-hidden]="dataService.grouped ? !show : null"
745
+ >
746
+ @if (!dataService.grouped) {
694
747
  <ul #list
695
- *ngIf="!dataService.grouped"
696
- [attr.role]="'listbox'"
697
- [class]="listClass"
698
- [attr.id]="id"
699
- [attr.aria-live]="ariaLive"
700
- [attr.aria-multiselectable]="isMultiselect"
701
- [attr.aria-hidden]="!show">
702
- <ng-container *ngFor="let dataItem of data; let itemIndex = index">
703
- <li
704
- role="option"
705
- kendoDropDownsSelectable
706
- [checkboxes]="checkboxes"
707
- [height]="virtual?.itemHeight"
708
- [index]="itemIndex + startFrom"
709
- [multipleSelection]="multipleSelection"
710
- [attr.id]="optionPrefix + '-' + itemIndex"
711
- [attr.tabIndex]="-1"
712
- [attr.aria-selected]="isItemSelected(itemIndex)"
713
- [class]="listItemClass"
748
+ [attr.role]="'listbox'"
749
+ [class]="listClass"
750
+ [attr.id]="id"
751
+ [attr.aria-live]="ariaLive"
752
+ [attr.aria-multiselectable]="isMultiselect"
753
+ [attr.aria-hidden]="!show">
754
+ @for (dataItem of data; track $index; let itemIndex = $index) {
755
+ <li
756
+ role="option"
757
+ kendoDropDownsSelectable
758
+ [checkboxes]="checkboxes"
759
+ [height]="virtual?.itemHeight"
760
+ [index]="itemIndex + startFrom"
761
+ [multipleSelection]="multipleSelection"
762
+ [attr.id]="optionPrefix + '-' + itemIndex"
763
+ [attr.tabIndex]="-1"
764
+ [attr.aria-selected]="isItemSelected(itemIndex)"
765
+ [class]="listItemClass"
714
766
  [ngClass]="{
715
767
  'k-disabled': isDisabled(itemIndex),
716
768
  'k-table-alt-row': isAltRow(itemIndex)
717
769
  }"
718
- [style.width.px]="rowWidth ?? null"
719
- >
720
- <input
721
- *ngIf="checkboxes.enabled"
722
- type="checkbox"
723
- class="k-checkbox"
724
- role="presentation"
725
- tabindex="-1"
726
- [ngClass]="checkboxClasses"
727
- (change)="onCheckedChange($event, itemIndex + startFrom)"
728
- [checked]="isChecked(itemIndex)"
729
- />
730
- <ng-template *ngIf="template"
770
+ [style.width.px]="rowWidth ?? null"
771
+ >
772
+ @if (checkboxes.enabled) {
773
+ <input
774
+ type="checkbox"
775
+ class="k-checkbox"
776
+ role="presentation"
777
+ tabindex="-1"
778
+ [ngClass]="checkboxClasses"
779
+ (change)="onCheckedChange($event, itemIndex + startFrom)"
780
+ [checked]="isChecked(itemIndex)"
781
+ />
782
+ }
783
+ @if (template) {
784
+ <ng-template
731
785
  [templateContext]="{
732
786
  templateRef: template.templateRef,
733
787
  $implicit: dataItem
734
788
  }">
735
- </ng-template>
736
- <ng-template [ngIf]="!template"><span class="k-list-item-text">{{ getText(dataItem) }}</span></ng-template>
737
- </li>
738
- </ng-container>
789
+ </ng-template>
790
+ }
791
+ @if (!template) {
792
+ <span class="k-list-item-text">{{ getText(dataItem) }}</span>
793
+ }
794
+ </li>
795
+ }
796
+ @if (!virtual) {
739
797
  <kendo-resize-sensor
740
- *ngIf="!virtual"
741
- (resize)="listResize.emit()"
742
- >
798
+ (resize)="listResize.emit()"
799
+ >
743
800
  </kendo-resize-sensor>
801
+ }
744
802
  </ul>
803
+ }
745
804
 
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"
755
- [class]="listGroupItemClass"
756
- [class.k-table-alt-row]="isAltRow(dataItem.index - 1)"
805
+ @if (dataService.grouped) {
806
+ <ng-container #list>
807
+ @for (dataItem of groupedData; track dataItem) {
808
+ <ul
809
+ #groupUl
810
+ class="k-list-ul"
811
+ [attr.role]="'group'"
812
+ [attr.aria-labelledby]="generateGroupId(dataItem)"
813
+ >
814
+ @if (dataItem.header) {
815
+ <li
816
+ role="presentation"
817
+ [class]="listGroupItemClass"
818
+ [class.k-table-alt-row]="isAltRow(dataItem.index - 1)"
757
819
  [ngStyle]="{
758
820
  'height.px': virtual?.itemHeight,
759
821
  'minHeight.px' : virtual?.itemHeight,
760
822
  'boxSizing' : virtual ? 'border-box' : 'inherit'}"
761
- [attr.group-index]="dataItem.index"
762
- [attr.id]="groupUl.getAttribute('aria-labelledby')"
763
- [style.width.px]="rowWidth ?? null"
764
- >
765
- <span [class]="listGroupItemTextClass">
766
- <ng-template *ngIf="groupTemplate"
823
+ [attr.group-index]="dataItem.index"
824
+ [attr.id]="groupUl.getAttribute('aria-labelledby')"
825
+ [style.width.px]="rowWidth ?? null"
826
+ >
827
+ <span [class]="listGroupItemTextClass">
828
+ @if (groupTemplate) {
829
+ <ng-template
767
830
  [templateContext]="{
768
831
  templateRef: groupTemplate.templateRef,
769
832
  $implicit: dataItem.value
770
833
  }">
771
- </ng-template>
772
- <ng-template [ngIf]="!groupTemplate">{{ dataItem.value }}</ng-template>
773
- </span>
834
+ </ng-template>
835
+ }
836
+ @if (!groupTemplate) {
837
+ {{ dataItem.value }}
838
+ }
839
+ </span>
774
840
  </li>
775
- <li *ngFor="let item of dataItem.items"
776
- role="option"
777
- kendoDropDownsSelectable
778
- [height]="virtual?.itemHeight"
779
- [index]="item.offsetIndex"
780
- [multipleSelection]="multipleSelection"
781
- [attr.absolute-index]="item.index"
782
- [attr.id]="optionPrefix + '-' + (item.index - 1 - item.groupIndex)"
783
- [attr.tabIndex]="-1"
784
- [attr.aria-selected]="isItemSelected(item.offsetIndex)"
785
- [class]="listItemClass"
841
+ }
842
+ @for (item of dataItem.items; track item) {
843
+ <li
844
+ role="option"
845
+ kendoDropDownsSelectable
846
+ [height]="virtual?.itemHeight"
847
+ [index]="item.offsetIndex"
848
+ [multipleSelection]="multipleSelection"
849
+ [attr.absolute-index]="item.index"
850
+ [attr.id]="optionPrefix + '-' + (item.index - 1 - item.groupIndex)"
851
+ [attr.tabIndex]="-1"
852
+ [attr.aria-selected]="isItemSelected(item.offsetIndex)"
853
+ [class]="listItemClass"
786
854
  [ngClass]="{
787
855
  'k-disabled': isDisabled(item.offsetIndex),
788
856
  'k-table-alt-row': isAltRow(item.index - 1)
789
857
  }"
790
- [style.width.px]="rowWidth ?? null">
791
- <ng-template *ngIf="template"
858
+ [style.width.px]="rowWidth ?? null">
859
+ @if (template) {
860
+ <ng-template
792
861
  [templateContext]="{
793
862
  templateRef: template.templateRef,
794
863
  $implicit: item.value
795
864
  }">
796
865
  </ng-template>
797
- <ng-template [ngIf]="!template"><span class="k-list-item-text">{{ getText(item.value) }}</span></ng-template>
866
+ }
867
+ @if (!template) {
868
+ <span class="k-list-item-text">{{ getText(item.value) }}</span>
869
+ }
798
870
  </li>
871
+ }
872
+ @if (!virtual) {
799
873
  <kendo-resize-sensor
800
- *ngIf="!virtual"
801
- (resize)="listResize.emit()"
802
- >
874
+ (resize)="listResize.emit()"
875
+ >
803
876
  </kendo-resize-sensor>
877
+ }
804
878
  </ul>
879
+ }
805
880
  </ng-container>
806
- <div *ngIf="virtual" #virtualContainer class="k-height-container" role="presentation">
807
- <div [style.height.px]="scrollHeight">
808
- <kendo-resize-sensor (resize)="listResize.emit()"></kendo-resize-sensor>
809
- </div>
881
+ }
882
+ @if (virtual) {
883
+ <div #virtualContainer class="k-height-container" role="presentation">
884
+ <div [style.height.px]="scrollHeight">
885
+ <kendo-resize-sensor (resize)="listResize.emit()"></kendo-resize-sensor>
886
+ </div>
810
887
  </div>
888
+ }
811
889
  </div>
812
- `,
890
+ `,
813
891
  standalone: true,
814
- imports: [NgIf, NgStyle, TemplateContextDirective, NgFor, ListItemDirective, SelectableDirective, NgClass, ResizeSensorComponent]
892
+ imports: [NgStyle, TemplateContextDirective, ListItemDirective, SelectableDirective, NgClass, ResizeSensorComponent]
815
893
  }]
816
894
  }], ctorParameters: () => [{ type: i1.DataService }, { type: i0.ElementRef }, { type: i2.SelectionService }, { type: i3.DisabledItemsService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i4.LocalizationService }], propDecorators: { selected: [{
817
895
  type: Input