@progress/kendo-angular-listbox 15.0.2-develop.11 → 15.0.2-develop.13

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.
@@ -4,7 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /* eslint-disable @typescript-eslint/no-inferrable-types */
6
6
  /* eslint-disable @typescript-eslint/no-explicit-any */
7
- import { Component, ContentChild, ElementRef, EventEmitter, HostBinding, Input, isDevMode, NgZone, Output, QueryList, Renderer2, ViewChild, ViewChildren } from '@angular/core';
7
+ import { ChangeDetectorRef, Component, ContentChild, ElementRef, EventEmitter, HostBinding, Input, isDevMode, NgZone, Output, QueryList, Renderer2, ViewChild, ViewChildren } from '@angular/core';
8
8
  import { validatePackage } from '@progress/kendo-licensing';
9
9
  import { Subscription } from 'rxjs';
10
10
  import { packageMetadata } from './package-metadata';
@@ -30,13 +30,14 @@ let idx = 0;
30
30
  * Represents the [Kendo UI ListBox component for Angular]({% slug overview_listbox %}).
31
31
  */
32
32
  export class ListBoxComponent {
33
- constructor(keyboardNavigationService, selectionService, hostElement, renderer, zone, localization) {
33
+ constructor(keyboardNavigationService, selectionService, hostElement, renderer, zone, localization, changeDetector) {
34
34
  this.keyboardNavigationService = keyboardNavigationService;
35
35
  this.selectionService = selectionService;
36
36
  this.hostElement = hostElement;
37
37
  this.renderer = renderer;
38
38
  this.zone = zone;
39
39
  this.localization = localization;
40
+ this.changeDetector = changeDetector;
40
41
  /**
41
42
  * @hidden
42
43
  */
@@ -270,6 +271,7 @@ export class ListBoxComponent {
270
271
  const { prevIndex, index } = indexes;
271
272
  this.selectionService.selectedIndex = index;
272
273
  this.selectionChange.next({ index, prevIndex });
274
+ this.changeDetector.markForCheck();
273
275
  }));
274
276
  }
275
277
  onFocusIn(event) {
@@ -277,6 +279,9 @@ export class ListBoxComponent {
277
279
  if (navService.focusedListboxItemIndex === navService.selectedListboxItemIndex && this.shouldFireFocusIn) {
278
280
  const items = this.listboxItems.toArray();
279
281
  const index = items.findIndex(elem => elem.nativeElement === event.target);
282
+ if (index === -1) {
283
+ return;
284
+ }
280
285
  this.selectionService.selectedIndex = index;
281
286
  this.selectionChange.next({ index, prevIndex: null });
282
287
  const previousItem = items[navService.selectedListboxItemIndex]?.nativeElement;
@@ -343,7 +348,7 @@ export class ListBoxComponent {
343
348
  this.renderer.addClass(this.hostElement.nativeElement, `k-listbox-${sizeClassMap[size]}`);
344
349
  }
345
350
  }
346
- ListBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ListBoxComponent, deps: [{ token: i1.KeyboardNavigationService }, { token: i2.ListBoxSelectionService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i3.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
351
+ ListBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ListBoxComponent, deps: [{ token: i1.KeyboardNavigationService }, { token: i2.ListBoxSelectionService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i3.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
347
352
  ListBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ListBoxComponent, selector: "kendo-listbox", inputs: { textField: "textField", data: "data", size: "size", toolbar: "toolbar", listboxLabel: "listboxLabel", listboxToolbarLabel: "listboxToolbarLabel", itemDisabled: "itemDisabled" }, outputs: { selectionChange: "selectionChange", actionClick: "actionClick", getChildListbox: "getChildListbox" }, host: { properties: { "class.k-listbox": "this.listboxClassName", "attr.dir": "this.direction" } }, providers: [
348
353
  ListBoxSelectionService,
349
354
  KeyboardNavigationService,
@@ -532,7 +537,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
532
537
  </div>
533
538
  `,
534
539
  }]
535
- }], ctorParameters: function () { return [{ type: i1.KeyboardNavigationService }, { type: i2.ListBoxSelectionService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i3.LocalizationService }]; }, propDecorators: { listboxClassName: [{
540
+ }], ctorParameters: function () { return [{ type: i1.KeyboardNavigationService }, { type: i2.ListBoxSelectionService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i3.LocalizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { listboxClassName: [{
536
541
  type: HostBinding,
537
542
  args: ['class.k-listbox']
538
543
  }], direction: [{
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-listbox',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1708345477,
13
- version: '15.0.2-develop.11',
12
+ publishDate: 1708353413,
13
+ version: '15.0.2-develop.13',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
15
15
  };
@@ -24,8 +24,8 @@ const packageMetadata = {
24
24
  name: '@progress/kendo-angular-listbox',
25
25
  productName: 'Kendo UI for Angular',
26
26
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
27
- publishDate: 1708345477,
28
- version: '15.0.2-develop.11',
27
+ publishDate: 1708353413,
28
+ version: '15.0.2-develop.13',
29
29
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
30
30
  };
31
31
 
@@ -566,13 +566,14 @@ let idx = 0;
566
566
  * Represents the [Kendo UI ListBox component for Angular]({% slug overview_listbox %}).
567
567
  */
568
568
  class ListBoxComponent {
569
- constructor(keyboardNavigationService, selectionService, hostElement, renderer, zone, localization) {
569
+ constructor(keyboardNavigationService, selectionService, hostElement, renderer, zone, localization, changeDetector) {
570
570
  this.keyboardNavigationService = keyboardNavigationService;
571
571
  this.selectionService = selectionService;
572
572
  this.hostElement = hostElement;
573
573
  this.renderer = renderer;
574
574
  this.zone = zone;
575
575
  this.localization = localization;
576
+ this.changeDetector = changeDetector;
576
577
  /**
577
578
  * @hidden
578
579
  */
@@ -807,6 +808,7 @@ class ListBoxComponent {
807
808
  const { prevIndex, index } = indexes;
808
809
  this.selectionService.selectedIndex = index;
809
810
  this.selectionChange.next({ index, prevIndex });
811
+ this.changeDetector.markForCheck();
810
812
  }));
811
813
  }
812
814
  onFocusIn(event) {
@@ -815,6 +817,9 @@ class ListBoxComponent {
815
817
  if (navService.focusedListboxItemIndex === navService.selectedListboxItemIndex && this.shouldFireFocusIn) {
816
818
  const items = this.listboxItems.toArray();
817
819
  const index = items.findIndex(elem => elem.nativeElement === event.target);
820
+ if (index === -1) {
821
+ return;
822
+ }
818
823
  this.selectionService.selectedIndex = index;
819
824
  this.selectionChange.next({ index, prevIndex: null });
820
825
  const previousItem = (_a = items[navService.selectedListboxItemIndex]) === null || _a === void 0 ? void 0 : _a.nativeElement;
@@ -883,7 +888,7 @@ class ListBoxComponent {
883
888
  this.renderer.addClass(this.hostElement.nativeElement, `k-listbox-${sizeClassMap[size]}`);
884
889
  }
885
890
  }
886
- ListBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ListBoxComponent, deps: [{ token: KeyboardNavigationService }, { token: ListBoxSelectionService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
891
+ ListBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ListBoxComponent, deps: [{ token: KeyboardNavigationService }, { token: ListBoxSelectionService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
887
892
  ListBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ListBoxComponent, selector: "kendo-listbox", inputs: { textField: "textField", data: "data", size: "size", toolbar: "toolbar", listboxLabel: "listboxLabel", listboxToolbarLabel: "listboxToolbarLabel", itemDisabled: "itemDisabled" }, outputs: { selectionChange: "selectionChange", actionClick: "actionClick", getChildListbox: "getChildListbox" }, host: { properties: { "class.k-listbox": "this.listboxClassName", "attr.dir": "this.direction" } }, providers: [
888
893
  ListBoxSelectionService,
889
894
  KeyboardNavigationService,
@@ -1072,7 +1077,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
1072
1077
  </div>
1073
1078
  `,
1074
1079
  }]
1075
- }], ctorParameters: function () { return [{ type: KeyboardNavigationService }, { type: ListBoxSelectionService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i1.LocalizationService }]; }, propDecorators: { listboxClassName: [{
1080
+ }], ctorParameters: function () { return [{ type: KeyboardNavigationService }, { type: ListBoxSelectionService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { listboxClassName: [{
1076
1081
  type: HostBinding,
1077
1082
  args: ['class.k-listbox']
1078
1083
  }], direction: [{
@@ -24,8 +24,8 @@ const packageMetadata = {
24
24
  name: '@progress/kendo-angular-listbox',
25
25
  productName: 'Kendo UI for Angular',
26
26
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
27
- publishDate: 1708345477,
28
- version: '15.0.2-develop.11',
27
+ publishDate: 1708353413,
28
+ version: '15.0.2-develop.13',
29
29
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
30
30
  };
31
31
 
@@ -561,13 +561,14 @@ let idx = 0;
561
561
  * Represents the [Kendo UI ListBox component for Angular]({% slug overview_listbox %}).
562
562
  */
563
563
  class ListBoxComponent {
564
- constructor(keyboardNavigationService, selectionService, hostElement, renderer, zone, localization) {
564
+ constructor(keyboardNavigationService, selectionService, hostElement, renderer, zone, localization, changeDetector) {
565
565
  this.keyboardNavigationService = keyboardNavigationService;
566
566
  this.selectionService = selectionService;
567
567
  this.hostElement = hostElement;
568
568
  this.renderer = renderer;
569
569
  this.zone = zone;
570
570
  this.localization = localization;
571
+ this.changeDetector = changeDetector;
571
572
  /**
572
573
  * @hidden
573
574
  */
@@ -801,6 +802,7 @@ class ListBoxComponent {
801
802
  const { prevIndex, index } = indexes;
802
803
  this.selectionService.selectedIndex = index;
803
804
  this.selectionChange.next({ index, prevIndex });
805
+ this.changeDetector.markForCheck();
804
806
  }));
805
807
  }
806
808
  onFocusIn(event) {
@@ -808,6 +810,9 @@ class ListBoxComponent {
808
810
  if (navService.focusedListboxItemIndex === navService.selectedListboxItemIndex && this.shouldFireFocusIn) {
809
811
  const items = this.listboxItems.toArray();
810
812
  const index = items.findIndex(elem => elem.nativeElement === event.target);
813
+ if (index === -1) {
814
+ return;
815
+ }
811
816
  this.selectionService.selectedIndex = index;
812
817
  this.selectionChange.next({ index, prevIndex: null });
813
818
  const previousItem = items[navService.selectedListboxItemIndex]?.nativeElement;
@@ -874,7 +879,7 @@ class ListBoxComponent {
874
879
  this.renderer.addClass(this.hostElement.nativeElement, `k-listbox-${sizeClassMap[size]}`);
875
880
  }
876
881
  }
877
- ListBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ListBoxComponent, deps: [{ token: KeyboardNavigationService }, { token: ListBoxSelectionService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
882
+ ListBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ListBoxComponent, deps: [{ token: KeyboardNavigationService }, { token: ListBoxSelectionService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
878
883
  ListBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ListBoxComponent, selector: "kendo-listbox", inputs: { textField: "textField", data: "data", size: "size", toolbar: "toolbar", listboxLabel: "listboxLabel", listboxToolbarLabel: "listboxToolbarLabel", itemDisabled: "itemDisabled" }, outputs: { selectionChange: "selectionChange", actionClick: "actionClick", getChildListbox: "getChildListbox" }, host: { properties: { "class.k-listbox": "this.listboxClassName", "attr.dir": "this.direction" } }, providers: [
879
884
  ListBoxSelectionService,
880
885
  KeyboardNavigationService,
@@ -1063,7 +1068,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
1063
1068
  </div>
1064
1069
  `,
1065
1070
  }]
1066
- }], ctorParameters: function () { return [{ type: KeyboardNavigationService }, { type: ListBoxSelectionService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i1.LocalizationService }]; }, propDecorators: { listboxClassName: [{
1071
+ }], ctorParameters: function () { return [{ type: KeyboardNavigationService }, { type: ListBoxSelectionService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { listboxClassName: [{
1067
1072
  type: HostBinding,
1068
1073
  args: ['class.k-listbox']
1069
1074
  }], direction: [{
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { AfterViewInit, ElementRef, EventEmitter, NgZone, OnDestroy, OnInit, QueryList, Renderer2 } from '@angular/core';
5
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy, OnInit, QueryList, Renderer2 } from '@angular/core';
6
6
  import { ListBoxSelectionEvent, ListBoxSelectionService } from './selection.service';
7
7
  import { ItemTemplateDirective } from './item-template.directive';
8
8
  import { Direction } from './util';
@@ -23,6 +23,7 @@ export declare class ListBoxComponent implements OnInit, AfterViewInit, OnDestro
23
23
  private renderer;
24
24
  private zone;
25
25
  private localization;
26
+ private changeDetector;
26
27
  /**
27
28
  * @hidden
28
29
  */
@@ -137,7 +138,7 @@ export declare class ListBoxComponent implements OnInit, AfterViewInit, OnDestro
137
138
  private _size;
138
139
  private subs;
139
140
  private shouldFireFocusIn;
140
- constructor(keyboardNavigationService: KeyboardNavigationService, selectionService: ListBoxSelectionService, hostElement: ElementRef, renderer: Renderer2, zone: NgZone, localization: LocalizationService);
141
+ constructor(keyboardNavigationService: KeyboardNavigationService, selectionService: ListBoxSelectionService, hostElement: ElementRef, renderer: Renderer2, zone: NgZone, localization: LocalizationService, changeDetector: ChangeDetectorRef);
141
142
  ngOnInit(): void;
142
143
  ngAfterViewInit(): void;
143
144
  ngOnDestroy(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-listbox",
3
- "version": "15.0.2-develop.11",
3
+ "version": "15.0.2-develop.13",
4
4
  "description": "Kendo UI for Angular ListBox",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -23,14 +23,14 @@
23
23
  "@angular/core": "13 - 17",
24
24
  "@angular/platform-browser": "13 - 17",
25
25
  "@progress/kendo-licensing": "^1.0.2",
26
- "@progress/kendo-angular-buttons": "15.0.2-develop.11",
27
- "@progress/kendo-angular-common": "15.0.2-develop.11",
28
- "@progress/kendo-angular-popup": "15.0.2-develop.11",
26
+ "@progress/kendo-angular-buttons": "15.0.2-develop.13",
27
+ "@progress/kendo-angular-common": "15.0.2-develop.13",
28
+ "@progress/kendo-angular-popup": "15.0.2-develop.13",
29
29
  "rxjs": "^6.5.3 || ^7.0.0"
30
30
  },
31
31
  "dependencies": {
32
32
  "tslib": "^2.3.1",
33
- "@progress/kendo-angular-schematics": "15.0.2-develop.11",
33
+ "@progress/kendo-angular-schematics": "15.0.2-develop.13",
34
34
  "@progress/kendo-common": "^0.2.2"
35
35
  },
36
36
  "schematics": "./schematics/collection.json",
@@ -6,11 +6,11 @@ function default_1(options) {
6
6
  // Additional dependencies to install.
7
7
  // See https://github.com/telerik/kendo-schematics/issues/28
8
8
  peerDependencies: {
9
- '@progress/kendo-angular-buttons': '15.0.2-develop.11',
10
- '@progress/kendo-angular-common': '15.0.2-develop.11',
11
- '@progress/kendo-angular-l10n': '15.0.2-develop.11',
9
+ '@progress/kendo-angular-buttons': '15.0.2-develop.13',
10
+ '@progress/kendo-angular-common': '15.0.2-develop.13',
11
+ '@progress/kendo-angular-l10n': '15.0.2-develop.13',
12
12
  // Peer of kendo-angular-buttons
13
- '@progress/kendo-angular-popup': '15.0.2-develop.11'
13
+ '@progress/kendo-angular-popup': '15.0.2-develop.13'
14
14
  } });
15
15
  return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
16
16
  }