@progress/kendo-angular-dropdowns 18.1.0-develop.3 → 18.1.0-develop.31

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.
@@ -36,8 +36,12 @@ export declare class ResponsiveRendererComponent {
36
36
  searchBarValue: string;
37
37
  animationDuration: number;
38
38
  xIcon: SVGIcon;
39
+ private expanded;
39
40
  messageFor(key: string): string;
40
41
  onValueChange(value: string): void;
42
+ onOverlayClick(): void;
43
+ handleExpand(): void;
44
+ handleClose(): void;
41
45
  static ɵfac: i0.ɵɵFactoryDeclaration<ResponsiveRendererComponent, never>;
42
46
  static ɵcmp: i0.ɵɵComponentDeclaration<ResponsiveRendererComponent, "responsive-renderer", never, { "title": { "alias": "title"; "required": false; }; "showActionButtons": { "alias": "showActionButtons"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "size": { "alias": "size"; "required": false; }; "showTextInput": { "alias": "showTextInput"; "required": false; }; "sharedPopupActionSheetTemplate": { "alias": "sharedPopupActionSheetTemplate"; "required": false; }; "isActionSheetExpanded": { "alias": "isActionSheetExpanded"; "required": false; }; "text": { "alias": "text"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, { "closePopup": "closePopup"; "textInputChange": "textInputChange"; "navigate": "navigate"; "onExpand": "onExpand"; "onCollapse": "onCollapse"; "onApply": "onApply"; "onCancel": "onCancel"; }, never, never, true, never>;
43
47
  }
@@ -22,8 +22,8 @@ export declare abstract class BaseCheckDirective {
22
22
  /**
23
23
  * @hidden
24
24
  * The flag is needed in order to determine how to construct the items map keys.
25
- * If `true`, then the key consists of the item's value and 0 (no leveling required),
26
- * else the key consists of the item's value and level (depth)
25
+ * If `true`, then the key consists of the item's value and level (depth),
26
+ * else the key consists of the item's value and 0 (no leveling required)
27
27
  */
28
28
  isHeterogeneous: boolean;
29
29
  /**
@@ -489,8 +489,8 @@ export declare class MultiSelectTreeComponent implements OnInit, OnDestroy, OnCh
489
489
  /**
490
490
  * @hidden
491
491
  * The flag is needed in order to determine how to construct the items map keys.
492
- * If `true`, then the key consists of the item's value and 0 (no leveling required),
493
- * else the key consists of the item's value and level (depth)
492
+ * If `true`, then the key consists of the item's value and level (depth),
493
+ * else the key consists of the item's value and 0 (no leveling required)
494
494
  */
495
495
  isHeterogeneous: boolean;
496
496
  /**
@@ -179,14 +179,10 @@ export class MultiColumnComboBoxComponent extends ComboBoxComponent {
179
179
  * @hidden
180
180
  */
181
181
  getColumnWidth(index) {
182
- const popupWidthNumber = +(this.popupWidth.max.slice(0, -2));
183
- if (this.totalColumnsWidth >= popupWidthNumber) {
182
+ if (!this.virtual) {
184
183
  return this.columns.get(index).width;
185
184
  }
186
- if (this.virtual && isPresent(this.headerColumnWidths[index])) {
187
- return this.headerColumnWidths[index];
188
- }
189
- return this.columns.get(index).width;
185
+ return this.headerColumnWidths[index];
190
186
  }
191
187
  verifySettings() {
192
188
  if (!isDevMode()) {
@@ -42,6 +42,7 @@ export class ResponsiveRendererComponent {
42
42
  searchBarValue = '';
43
43
  animationDuration = animationDuration;
44
44
  xIcon = xIcon;
45
+ expanded = false;
45
46
  messageFor(key) {
46
47
  return this.localization.get(key);
47
48
  }
@@ -49,15 +50,28 @@ export class ResponsiveRendererComponent {
49
50
  this.searchBarValue = value;
50
51
  this.textInputChange.emit(value);
51
52
  }
53
+ onOverlayClick() {
54
+ if (this.expanded) {
55
+ this.handleClose();
56
+ }
57
+ }
58
+ handleExpand() {
59
+ this.onExpand.emit();
60
+ this.expanded = true;
61
+ }
62
+ handleClose() {
63
+ this.closePopup.emit();
64
+ this.expanded = false;
65
+ }
52
66
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ResponsiveRendererComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
53
67
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ResponsiveRendererComponent, isStandalone: true, selector: "responsive-renderer", inputs: { title: "title", showActionButtons: "showActionButtons", subtitle: "subtitle", size: "size", showTextInput: "showTextInput", sharedPopupActionSheetTemplate: "sharedPopupActionSheetTemplate", isActionSheetExpanded: "isActionSheetExpanded", text: "text", placeholder: "placeholder" }, outputs: { closePopup: "closePopup", textInputChange: "textInputChange", navigate: "navigate", onExpand: "onExpand", onCollapse: "onCollapse", onApply: "onApply", onCancel: "onCancel" }, viewQueries: [{ propertyName: "actionSheet", first: true, predicate: ActionSheetComponent, descendants: true }, { propertyName: "actionSheetSearchBar", first: true, predicate: ["actionSheetSearchBar"], descendants: true }], ngImport: i0, template: `
54
68
  <kendo-actionsheet
55
69
  #actionSheet
56
70
  [animation]="{ duration: animationDuration }"
57
71
  [expanded]="isActionSheetExpanded"
58
- (overlayClick)="closePopup.emit()"
72
+ (overlayClick)="onOverlayClick()"
59
73
  (keydown)="navigate.emit($event)"
60
- (expand)="onExpand.emit()"
74
+ (expand)="handleExpand()"
61
75
  (collapse)="onCollapse.emit()"
62
76
  >
63
77
  <ng-template kendoActionSheetTemplate>
@@ -79,7 +93,7 @@ export class ResponsiveRendererComponent {
79
93
  [tabIndex]="-1"
80
94
  aria-hidden="true"
81
95
  innerCssClass="k-button-icon"
82
- (click)="closePopup.emit()"
96
+ (click)="handleClose()"
83
97
  ></button>
84
98
  </div>
85
99
  </div>
@@ -141,9 +155,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
141
155
  #actionSheet
142
156
  [animation]="{ duration: animationDuration }"
143
157
  [expanded]="isActionSheetExpanded"
144
- (overlayClick)="closePopup.emit()"
158
+ (overlayClick)="onOverlayClick()"
145
159
  (keydown)="navigate.emit($event)"
146
- (expand)="onExpand.emit()"
160
+ (expand)="handleExpand()"
147
161
  (collapse)="onCollapse.emit()"
148
162
  >
149
163
  <ng-template kendoActionSheetTemplate>
@@ -165,7 +179,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
165
179
  [tabIndex]="-1"
166
180
  aria-hidden="true"
167
181
  innerCssClass="k-button-icon"
168
- (click)="closePopup.emit()"
182
+ (click)="handleClose()"
169
183
  ></button>
170
184
  </div>
171
185
  </div>
@@ -141,6 +141,9 @@ export class ListComponent {
141
141
  this.scrollToFocused = !changes['data'].isFirstChange();
142
142
  }
143
143
  this.setOverflow();
144
+ this.zone.onStable.pipe(take(1)).subscribe(() => {
145
+ this.setGroupAttributes();
146
+ });
144
147
  }
145
148
  if (isChanged('virtual', changes, false)) {
146
149
  this.setOverflow();
@@ -257,7 +260,7 @@ export class ListComponent {
257
260
  let index;
258
261
  if (item.getAttribute("role") === "group") {
259
262
  index = parseInt(item.getAttribute("group-index"), 10);
260
- this.currentGroup = this.dataService.groupAt(index).value;
263
+ this.currentGroup = this.dataService.groupAt(index)?.value;
261
264
  }
262
265
  else {
263
266
  index = parseInt(item.getAttribute("index"), 10);
@@ -495,7 +498,7 @@ export class ListComponent {
495
498
  tabindex="-1"
496
499
  aria-hidden="true"
497
500
  [ngClass]="checkboxClasses"
498
- (change)="onCheckedChange($event, itemIndex)"
501
+ (change)="onCheckedChange($event, itemIndex + startFrom)"
499
502
  [checked]="isChecked(itemIndex)"
500
503
  />
501
504
  <ng-template *ngIf="template"
@@ -519,7 +522,7 @@ export class ListComponent {
519
522
  'minHeight.px' : virtual?.itemHeight,
520
523
  'boxSizing' : virtual ? 'border-box' : 'inherit'}"
521
524
  [attr.group-index]="dataItem.index"
522
- [attr.id]="optionPrefix + '-' + dataItem.groupIndex + '-' + dataItem.value"
525
+ [attr.id]="optionPrefix + '-' + dataItem.groupIndex + '-' + dataItem.value.split(' ').join('')"
523
526
  [attr.tabIndex]="-1"
524
527
  [style.width.px]="rowWidth ?? null">
525
528
  <span [class]="listGroupItemTextClass">
@@ -633,7 +636,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
633
636
  tabindex="-1"
634
637
  aria-hidden="true"
635
638
  [ngClass]="checkboxClasses"
636
- (change)="onCheckedChange($event, itemIndex)"
639
+ (change)="onCheckedChange($event, itemIndex + startFrom)"
637
640
  [checked]="isChecked(itemIndex)"
638
641
  />
639
642
  <ng-template *ngIf="template"
@@ -657,7 +660,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
657
660
  'minHeight.px' : virtual?.itemHeight,
658
661
  'boxSizing' : virtual ? 'border-box' : 'inherit'}"
659
662
  [attr.group-index]="dataItem.index"
660
- [attr.id]="optionPrefix + '-' + dataItem.groupIndex + '-' + dataItem.value"
663
+ [attr.id]="optionPrefix + '-' + dataItem.groupIndex + '-' + dataItem.value.split(' ').join('')"
661
664
  [attr.tabIndex]="-1"
662
665
  [style.width.px]="rowWidth ?? null">
663
666
  <span [class]="listGroupItemTextClass">
@@ -1003,7 +1003,6 @@ export class DropDownListComponent {
1003
1003
  });
1004
1004
  this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'true');
1005
1005
  this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-controls', this.listBoxId);
1006
- this.setAriaactivedescendant();
1007
1006
  const popupWrapper = this.popupRef.popupElement;
1008
1007
  const { min, max } = this.width;
1009
1008
  popupWrapper.addEventListener('mousedown', this.popupMouseDownHandler);
@@ -1023,6 +1022,7 @@ export class DropDownListComponent {
1023
1022
  this.subs.add(this.popupRef.popupOpen.subscribe(() => {
1024
1023
  this.cdr.detectChanges();
1025
1024
  setListBoxAriaLabelledBy(this.optionsList, this.wrapper, this.renderer);
1025
+ this.setAriaactivedescendant();
1026
1026
  this.optionsList.scrollToItem(this.selectionService.focused);
1027
1027
  this.selectionService.focus(this.selectionService.focused);
1028
1028
  this.opened.emit();
@@ -1126,7 +1126,7 @@ export class DropDownListComponent {
1126
1126
  setAriaactivedescendant() {
1127
1127
  if (this.ariaActivedescendant) {
1128
1128
  this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-activedescendant', this.ariaActivedescendant);
1129
- const searchInput = this.popupRef.popupElement.querySelector('input[role="searchbox"]');
1129
+ const searchInput = this.popupRef?.popupElement.querySelector('input[role="searchbox"]') || this.actionSheetSearchBar?.input.nativeElement;
1130
1130
  if (searchInput) {
1131
1131
  this.renderer.setAttribute(searchInput, 'aria-activedescendant', this.ariaActivedescendant);
1132
1132
  }
@@ -1455,6 +1455,8 @@ export class DropDownListComponent {
1455
1455
  }
1456
1456
  closeActionSheet() {
1457
1457
  this.actionSheet.toggle(false);
1458
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'false');
1459
+ this.renderer.removeAttribute(this.wrapper.nativeElement, 'aria-controls');
1458
1460
  if (this.filterable) {
1459
1461
  this.actionSheetSearchBar.value = '';
1460
1462
  this.filterChange.emit('');
@@ -1465,7 +1467,10 @@ export class DropDownListComponent {
1465
1467
  this.windowSize = this.adaptiveService.size;
1466
1468
  this.actionSheet.toggle(true);
1467
1469
  this.cdr.detectChanges();
1470
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'true');
1471
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-controls', this.listBoxId);
1468
1472
  setListBoxAriaLabelledBy(this.optionsList, this.wrapper, this.renderer);
1473
+ this.setAriaactivedescendant();
1469
1474
  this.title = setActionSheetTitle(this.wrapper, this.title);
1470
1475
  updateActionSheetAdaptiveAppearance(this.actionSheet, this.windowSize, this.renderer);
1471
1476
  this.cdr.detectChanges();
@@ -14,8 +14,8 @@ export class BaseCheckDirective {
14
14
  /**
15
15
  * @hidden
16
16
  * The flag is needed in order to determine how to construct the items map keys.
17
- * If `true`, then the key consists of the item's value and 0 (no leveling required),
18
- * else the key consists of the item's value and level (depth)
17
+ * If `true`, then the key consists of the item's value and level (depth),
18
+ * else the key consists of the item's value and 0 (no leveling required)
19
19
  */
20
20
  isHeterogeneous;
21
21
  addItem(item) {
@@ -36,7 +36,11 @@ export class BaseCheckDirective {
36
36
  const key = this.getKey(item, level);
37
37
  const candidate = { ...item, level, key };
38
38
  this.checkedItems = this.checkedItems
39
- .filter(item => valueFrom(item, this.valueField) !== valueFrom(candidate, this.valueField));
39
+ .filter(item => {
40
+ const valueMatch = valueFrom(item, this.valueField) === valueFrom(candidate, this.valueField);
41
+ const levelMatch = item.level === candidate.level;
42
+ return this.isHeterogeneous ? !(valueMatch && levelMatch) : !valueMatch;
43
+ });
40
44
  this.checkedKeys.delete(key);
41
45
  }
42
46
  isItemChecked(item) {
@@ -768,8 +768,8 @@ export class MultiSelectTreeComponent {
768
768
  /**
769
769
  * @hidden
770
770
  * The flag is needed in order to determine how to construct the items map keys.
771
- * If `true`, then the key consists of the item's value and 0 (no leveling required),
772
- * else the key consists of the item's value and level (depth)
771
+ * If `true`, then the key consists of the item's value and level (depth),
772
+ * else the key consists of the item's value and 0 (no leveling required)
773
773
  */
774
774
  isHeterogeneous;
775
775
  /**
@@ -1116,7 +1116,7 @@ export class MultiSelectTreeComponent {
1116
1116
  }
1117
1117
  else {
1118
1118
  // Remove single tag when the child items are pre-fetched
1119
- const dataItem = this.dataItems[index];
1119
+ const dataItem = this.dataItems.find(item => item.tagPositionIndex === index);
1120
1120
  const itemKey = dataItem.key;
1121
1121
  const lookup = this.lookup.itemLookup(itemKey);
1122
1122
  const pendingCheck = [lookup.item];
@@ -1126,10 +1126,20 @@ export class MultiSelectTreeComponent {
1126
1126
  pendingCheck.push(...this.removeParents(lookup.parent));
1127
1127
  }
1128
1128
  const keysToRemove = pendingCheck.map(item => item.key);
1129
+ // Holds the position indexes of the items to be removed
1130
+ const valueDepthIndices = [];
1129
1131
  this.dataItems = this.dataItems.filter((_item, i) => {
1130
- return !keysToRemove.includes(_item.key) || this.disabledIndices.has(i);
1132
+ const shouldStay = !keysToRemove.includes(_item.key) || this.disabledIndices.has(i);
1133
+ if (!shouldStay) {
1134
+ // We need to know the index position of the data item to be able to update the valueDepth array accordignly
1135
+ // as each data item's position is corresponding to the same position in valueDepth
1136
+ valueDepthIndices.push(i);
1137
+ }
1138
+ return shouldStay;
1139
+ });
1140
+ this.valueDepth = this.valueDepth.filter((_item, i) => {
1141
+ return !valueDepthIndices.includes(i) || this.disabledIndices.has(i);
1131
1142
  });
1132
- this.valueDepth = this.dataItems.map(i => i.level);
1133
1143
  }
1134
1144
  this.updateValue(this.dataItems);
1135
1145
  if (!this.isFocused) {
@@ -1538,7 +1548,15 @@ export class MultiSelectTreeComponent {
1538
1548
  const source = this.dataItems.map(item => item.dataItem);
1539
1549
  this.tags = this.tagMapper(source);
1540
1550
  this.disabledIndices = this.disabledItemsMapper();
1541
- this.dataItems.sort((a, b) => this.tags.indexOf(a.dataItem) - this.tags.indexOf(b.dataItem));
1551
+ // Create a mapping of tags to position indices
1552
+ const tagIndexMap = new Map(this.tags.map((tag, index) => [JSON.stringify(tag), index]));
1553
+ // Modify dataItems by adding a property to hold the item's position as displayed in the tags
1554
+ this.dataItems.forEach(item => {
1555
+ const serializedDataItem = JSON.stringify(item.dataItem);
1556
+ item.tagPositionIndex = tagIndexMap.has(serializedDataItem)
1557
+ ? tagIndexMap.get(serializedDataItem) // Use the index from tags if it exists
1558
+ : null; // Assign a null value if the dataItem is not visible in the tags
1559
+ });
1542
1560
  }
1543
1561
  updateValue(value) {
1544
1562
  const newValue = this.valuePrimitive ?
@@ -1630,6 +1648,8 @@ export class MultiSelectTreeComponent {
1630
1648
  closeActionSheet() {
1631
1649
  this.wrapper.nativeElement.focus();
1632
1650
  this.actionSheet.toggle(false);
1651
+ this.renderer.removeAttribute(this.wrapper.nativeElement, 'aria-controls');
1652
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'false');
1633
1653
  if (this.filterable) {
1634
1654
  this.actionSheetSearchBar.value = '';
1635
1655
  this.filterChange.emit('');
@@ -1641,6 +1661,8 @@ export class MultiSelectTreeComponent {
1641
1661
  this.actionSheet.toggle(true);
1642
1662
  this.title = setActionSheetTitle(this.wrapper, this.title);
1643
1663
  this.cdr.detectChanges();
1664
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-controls', this.treeViewId);
1665
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'true');
1644
1666
  updateActionSheetAdaptiveAppearance(this.actionSheet, this.windowSize, this.renderer);
1645
1667
  this.cdr.detectChanges();
1646
1668
  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: 1738245843,
14
- version: '18.1.0-develop.3',
13
+ publishDate: 1739264298,
14
+ version: '18.1.0-develop.31',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -37,8 +37,8 @@ const packageMetadata = {
37
37
  productName: 'Kendo UI for Angular',
38
38
  productCode: 'KENDOUIANGULAR',
39
39
  productCodes: ['KENDOUIANGULAR'],
40
- publishDate: 1738245843,
41
- version: '18.1.0-develop.3',
40
+ publishDate: 1739264298,
41
+ version: '18.1.0-develop.31',
42
42
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
43
43
  };
44
44
 
@@ -2014,6 +2014,9 @@ class ListComponent {
2014
2014
  this.scrollToFocused = !changes['data'].isFirstChange();
2015
2015
  }
2016
2016
  this.setOverflow();
2017
+ this.zone.onStable.pipe(take(1)).subscribe(() => {
2018
+ this.setGroupAttributes();
2019
+ });
2017
2020
  }
2018
2021
  if (isChanged('virtual', changes, false)) {
2019
2022
  this.setOverflow();
@@ -2130,7 +2133,7 @@ class ListComponent {
2130
2133
  let index;
2131
2134
  if (item.getAttribute("role") === "group") {
2132
2135
  index = parseInt(item.getAttribute("group-index"), 10);
2133
- this.currentGroup = this.dataService.groupAt(index).value;
2136
+ this.currentGroup = this.dataService.groupAt(index)?.value;
2134
2137
  }
2135
2138
  else {
2136
2139
  index = parseInt(item.getAttribute("index"), 10);
@@ -2368,7 +2371,7 @@ class ListComponent {
2368
2371
  tabindex="-1"
2369
2372
  aria-hidden="true"
2370
2373
  [ngClass]="checkboxClasses"
2371
- (change)="onCheckedChange($event, itemIndex)"
2374
+ (change)="onCheckedChange($event, itemIndex + startFrom)"
2372
2375
  [checked]="isChecked(itemIndex)"
2373
2376
  />
2374
2377
  <ng-template *ngIf="template"
@@ -2392,7 +2395,7 @@ class ListComponent {
2392
2395
  'minHeight.px' : virtual?.itemHeight,
2393
2396
  'boxSizing' : virtual ? 'border-box' : 'inherit'}"
2394
2397
  [attr.group-index]="dataItem.index"
2395
- [attr.id]="optionPrefix + '-' + dataItem.groupIndex + '-' + dataItem.value"
2398
+ [attr.id]="optionPrefix + '-' + dataItem.groupIndex + '-' + dataItem.value.split(' ').join('')"
2396
2399
  [attr.tabIndex]="-1"
2397
2400
  [style.width.px]="rowWidth ?? null">
2398
2401
  <span [class]="listGroupItemTextClass">
@@ -2506,7 +2509,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2506
2509
  tabindex="-1"
2507
2510
  aria-hidden="true"
2508
2511
  [ngClass]="checkboxClasses"
2509
- (change)="onCheckedChange($event, itemIndex)"
2512
+ (change)="onCheckedChange($event, itemIndex + startFrom)"
2510
2513
  [checked]="isChecked(itemIndex)"
2511
2514
  />
2512
2515
  <ng-template *ngIf="template"
@@ -2530,7 +2533,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2530
2533
  'minHeight.px' : virtual?.itemHeight,
2531
2534
  'boxSizing' : virtual ? 'border-box' : 'inherit'}"
2532
2535
  [attr.group-index]="dataItem.index"
2533
- [attr.id]="optionPrefix + '-' + dataItem.groupIndex + '-' + dataItem.value"
2536
+ [attr.id]="optionPrefix + '-' + dataItem.groupIndex + '-' + dataItem.value.split(' ').join('')"
2534
2537
  [attr.tabIndex]="-1"
2535
2538
  [style.width.px]="rowWidth ?? null">
2536
2539
  <span [class]="listGroupItemTextClass">
@@ -2705,6 +2708,7 @@ class ResponsiveRendererComponent {
2705
2708
  searchBarValue = '';
2706
2709
  animationDuration = animationDuration;
2707
2710
  xIcon = xIcon;
2711
+ expanded = false;
2708
2712
  messageFor(key) {
2709
2713
  return this.localization.get(key);
2710
2714
  }
@@ -2712,15 +2716,28 @@ class ResponsiveRendererComponent {
2712
2716
  this.searchBarValue = value;
2713
2717
  this.textInputChange.emit(value);
2714
2718
  }
2719
+ onOverlayClick() {
2720
+ if (this.expanded) {
2721
+ this.handleClose();
2722
+ }
2723
+ }
2724
+ handleExpand() {
2725
+ this.onExpand.emit();
2726
+ this.expanded = true;
2727
+ }
2728
+ handleClose() {
2729
+ this.closePopup.emit();
2730
+ this.expanded = false;
2731
+ }
2715
2732
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ResponsiveRendererComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
2716
2733
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ResponsiveRendererComponent, isStandalone: true, selector: "responsive-renderer", inputs: { title: "title", showActionButtons: "showActionButtons", subtitle: "subtitle", size: "size", showTextInput: "showTextInput", sharedPopupActionSheetTemplate: "sharedPopupActionSheetTemplate", isActionSheetExpanded: "isActionSheetExpanded", text: "text", placeholder: "placeholder" }, outputs: { closePopup: "closePopup", textInputChange: "textInputChange", navigate: "navigate", onExpand: "onExpand", onCollapse: "onCollapse", onApply: "onApply", onCancel: "onCancel" }, viewQueries: [{ propertyName: "actionSheet", first: true, predicate: ActionSheetComponent, descendants: true }, { propertyName: "actionSheetSearchBar", first: true, predicate: ["actionSheetSearchBar"], descendants: true }], ngImport: i0, template: `
2717
2734
  <kendo-actionsheet
2718
2735
  #actionSheet
2719
2736
  [animation]="{ duration: animationDuration }"
2720
2737
  [expanded]="isActionSheetExpanded"
2721
- (overlayClick)="closePopup.emit()"
2738
+ (overlayClick)="onOverlayClick()"
2722
2739
  (keydown)="navigate.emit($event)"
2723
- (expand)="onExpand.emit()"
2740
+ (expand)="handleExpand()"
2724
2741
  (collapse)="onCollapse.emit()"
2725
2742
  >
2726
2743
  <ng-template kendoActionSheetTemplate>
@@ -2742,7 +2759,7 @@ class ResponsiveRendererComponent {
2742
2759
  [tabIndex]="-1"
2743
2760
  aria-hidden="true"
2744
2761
  innerCssClass="k-button-icon"
2745
- (click)="closePopup.emit()"
2762
+ (click)="handleClose()"
2746
2763
  ></button>
2747
2764
  </div>
2748
2765
  </div>
@@ -2804,9 +2821,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2804
2821
  #actionSheet
2805
2822
  [animation]="{ duration: animationDuration }"
2806
2823
  [expanded]="isActionSheetExpanded"
2807
- (overlayClick)="closePopup.emit()"
2824
+ (overlayClick)="onOverlayClick()"
2808
2825
  (keydown)="navigate.emit($event)"
2809
- (expand)="onExpand.emit()"
2826
+ (expand)="handleExpand()"
2810
2827
  (collapse)="onCollapse.emit()"
2811
2828
  >
2812
2829
  <ng-template kendoActionSheetTemplate>
@@ -2828,7 +2845,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2828
2845
  [tabIndex]="-1"
2829
2846
  aria-hidden="true"
2830
2847
  innerCssClass="k-button-icon"
2831
- (click)="closePopup.emit()"
2848
+ (click)="handleClose()"
2832
2849
  ></button>
2833
2850
  </div>
2834
2851
  </div>
@@ -7895,7 +7912,6 @@ class DropDownListComponent {
7895
7912
  });
7896
7913
  this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'true');
7897
7914
  this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-controls', this.listBoxId);
7898
- this.setAriaactivedescendant();
7899
7915
  const popupWrapper = this.popupRef.popupElement;
7900
7916
  const { min, max } = this.width;
7901
7917
  popupWrapper.addEventListener('mousedown', this.popupMouseDownHandler);
@@ -7915,6 +7931,7 @@ class DropDownListComponent {
7915
7931
  this.subs.add(this.popupRef.popupOpen.subscribe(() => {
7916
7932
  this.cdr.detectChanges();
7917
7933
  setListBoxAriaLabelledBy(this.optionsList, this.wrapper, this.renderer);
7934
+ this.setAriaactivedescendant();
7918
7935
  this.optionsList.scrollToItem(this.selectionService.focused);
7919
7936
  this.selectionService.focus(this.selectionService.focused);
7920
7937
  this.opened.emit();
@@ -8018,7 +8035,7 @@ class DropDownListComponent {
8018
8035
  setAriaactivedescendant() {
8019
8036
  if (this.ariaActivedescendant) {
8020
8037
  this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-activedescendant', this.ariaActivedescendant);
8021
- const searchInput = this.popupRef.popupElement.querySelector('input[role="searchbox"]');
8038
+ const searchInput = this.popupRef?.popupElement.querySelector('input[role="searchbox"]') || this.actionSheetSearchBar?.input.nativeElement;
8022
8039
  if (searchInput) {
8023
8040
  this.renderer.setAttribute(searchInput, 'aria-activedescendant', this.ariaActivedescendant);
8024
8041
  }
@@ -8347,6 +8364,8 @@ class DropDownListComponent {
8347
8364
  }
8348
8365
  closeActionSheet() {
8349
8366
  this.actionSheet.toggle(false);
8367
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'false');
8368
+ this.renderer.removeAttribute(this.wrapper.nativeElement, 'aria-controls');
8350
8369
  if (this.filterable) {
8351
8370
  this.actionSheetSearchBar.value = '';
8352
8371
  this.filterChange.emit('');
@@ -8357,7 +8376,10 @@ class DropDownListComponent {
8357
8376
  this.windowSize = this.adaptiveService.size;
8358
8377
  this.actionSheet.toggle(true);
8359
8378
  this.cdr.detectChanges();
8379
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'true');
8380
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-controls', this.listBoxId);
8360
8381
  setListBoxAriaLabelledBy(this.optionsList, this.wrapper, this.renderer);
8382
+ this.setAriaactivedescendant();
8361
8383
  this.title = setActionSheetTitle(this.wrapper, this.title);
8362
8384
  updateActionSheetAdaptiveAppearance(this.actionSheet, this.windowSize, this.renderer);
8363
8385
  this.cdr.detectChanges();
@@ -12050,14 +12072,10 @@ class MultiColumnComboBoxComponent extends ComboBoxComponent {
12050
12072
  * @hidden
12051
12073
  */
12052
12074
  getColumnWidth(index) {
12053
- const popupWidthNumber = +(this.popupWidth.max.slice(0, -2));
12054
- if (this.totalColumnsWidth >= popupWidthNumber) {
12075
+ if (!this.virtual) {
12055
12076
  return this.columns.get(index).width;
12056
12077
  }
12057
- if (this.virtual && isPresent(this.headerColumnWidths[index])) {
12058
- return this.headerColumnWidths[index];
12059
- }
12060
- return this.columns.get(index).width;
12078
+ return this.headerColumnWidths[index];
12061
12079
  }
12062
12080
  verifySettings() {
12063
12081
  if (!isDevMode()) {
@@ -14682,8 +14700,8 @@ class BaseCheckDirective {
14682
14700
  /**
14683
14701
  * @hidden
14684
14702
  * The flag is needed in order to determine how to construct the items map keys.
14685
- * If `true`, then the key consists of the item's value and 0 (no leveling required),
14686
- * else the key consists of the item's value and level (depth)
14703
+ * If `true`, then the key consists of the item's value and level (depth),
14704
+ * else the key consists of the item's value and 0 (no leveling required)
14687
14705
  */
14688
14706
  isHeterogeneous;
14689
14707
  addItem(item) {
@@ -14704,7 +14722,11 @@ class BaseCheckDirective {
14704
14722
  const key = this.getKey(item, level);
14705
14723
  const candidate = { ...item, level, key };
14706
14724
  this.checkedItems = this.checkedItems
14707
- .filter(item => valueFrom(item, this.valueField) !== valueFrom(candidate, this.valueField));
14725
+ .filter(item => {
14726
+ const valueMatch = valueFrom(item, this.valueField) === valueFrom(candidate, this.valueField);
14727
+ const levelMatch = item.level === candidate.level;
14728
+ return this.isHeterogeneous ? !(valueMatch && levelMatch) : !valueMatch;
14729
+ });
14708
14730
  this.checkedKeys.delete(key);
14709
14731
  }
14710
14732
  isItemChecked(item) {
@@ -15790,8 +15812,8 @@ class MultiSelectTreeComponent {
15790
15812
  /**
15791
15813
  * @hidden
15792
15814
  * The flag is needed in order to determine how to construct the items map keys.
15793
- * If `true`, then the key consists of the item's value and 0 (no leveling required),
15794
- * else the key consists of the item's value and level (depth)
15815
+ * If `true`, then the key consists of the item's value and level (depth),
15816
+ * else the key consists of the item's value and 0 (no leveling required)
15795
15817
  */
15796
15818
  isHeterogeneous;
15797
15819
  /**
@@ -16138,7 +16160,7 @@ class MultiSelectTreeComponent {
16138
16160
  }
16139
16161
  else {
16140
16162
  // Remove single tag when the child items are pre-fetched
16141
- const dataItem = this.dataItems[index];
16163
+ const dataItem = this.dataItems.find(item => item.tagPositionIndex === index);
16142
16164
  const itemKey = dataItem.key;
16143
16165
  const lookup = this.lookup.itemLookup(itemKey);
16144
16166
  const pendingCheck = [lookup.item];
@@ -16148,10 +16170,20 @@ class MultiSelectTreeComponent {
16148
16170
  pendingCheck.push(...this.removeParents(lookup.parent));
16149
16171
  }
16150
16172
  const keysToRemove = pendingCheck.map(item => item.key);
16173
+ // Holds the position indexes of the items to be removed
16174
+ const valueDepthIndices = [];
16151
16175
  this.dataItems = this.dataItems.filter((_item, i) => {
16152
- return !keysToRemove.includes(_item.key) || this.disabledIndices.has(i);
16176
+ const shouldStay = !keysToRemove.includes(_item.key) || this.disabledIndices.has(i);
16177
+ if (!shouldStay) {
16178
+ // We need to know the index position of the data item to be able to update the valueDepth array accordignly
16179
+ // as each data item's position is corresponding to the same position in valueDepth
16180
+ valueDepthIndices.push(i);
16181
+ }
16182
+ return shouldStay;
16183
+ });
16184
+ this.valueDepth = this.valueDepth.filter((_item, i) => {
16185
+ return !valueDepthIndices.includes(i) || this.disabledIndices.has(i);
16153
16186
  });
16154
- this.valueDepth = this.dataItems.map(i => i.level);
16155
16187
  }
16156
16188
  this.updateValue(this.dataItems);
16157
16189
  if (!this.isFocused) {
@@ -16560,7 +16592,15 @@ class MultiSelectTreeComponent {
16560
16592
  const source = this.dataItems.map(item => item.dataItem);
16561
16593
  this.tags = this.tagMapper(source);
16562
16594
  this.disabledIndices = this.disabledItemsMapper();
16563
- this.dataItems.sort((a, b) => this.tags.indexOf(a.dataItem) - this.tags.indexOf(b.dataItem));
16595
+ // Create a mapping of tags to position indices
16596
+ const tagIndexMap = new Map(this.tags.map((tag, index) => [JSON.stringify(tag), index]));
16597
+ // Modify dataItems by adding a property to hold the item's position as displayed in the tags
16598
+ this.dataItems.forEach(item => {
16599
+ const serializedDataItem = JSON.stringify(item.dataItem);
16600
+ item.tagPositionIndex = tagIndexMap.has(serializedDataItem)
16601
+ ? tagIndexMap.get(serializedDataItem) // Use the index from tags if it exists
16602
+ : null; // Assign a null value if the dataItem is not visible in the tags
16603
+ });
16564
16604
  }
16565
16605
  updateValue(value) {
16566
16606
  const newValue = this.valuePrimitive ?
@@ -16652,6 +16692,8 @@ class MultiSelectTreeComponent {
16652
16692
  closeActionSheet() {
16653
16693
  this.wrapper.nativeElement.focus();
16654
16694
  this.actionSheet.toggle(false);
16695
+ this.renderer.removeAttribute(this.wrapper.nativeElement, 'aria-controls');
16696
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'false');
16655
16697
  if (this.filterable) {
16656
16698
  this.actionSheetSearchBar.value = '';
16657
16699
  this.filterChange.emit('');
@@ -16663,6 +16705,8 @@ class MultiSelectTreeComponent {
16663
16705
  this.actionSheet.toggle(true);
16664
16706
  this.title = setActionSheetTitle(this.wrapper, this.title);
16665
16707
  this.cdr.detectChanges();
16708
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-controls', this.treeViewId);
16709
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'true');
16666
16710
  updateActionSheetAdaptiveAppearance(this.actionSheet, this.windowSize, this.renderer);
16667
16711
  this.cdr.detectChanges();
16668
16712
  this.opened.emit();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-dropdowns",
3
- "version": "18.1.0-develop.3",
3
+ "version": "18.1.0-develop.31",
4
4
  "description": "A wide variety of native Angular dropdown components including AutoComplete, ComboBox, DropDownList, DropDownTree, MultiColumnComboBox, MultiSelect, and MultiSelectTree ",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -20,7 +20,7 @@
20
20
  "package": {
21
21
  "productName": "Kendo UI for Angular",
22
22
  "productCode": "KENDOUIANGULAR",
23
- "publishDate": 1738245843,
23
+ "publishDate": 1739264298,
24
24
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
25
25
  }
26
26
  },
@@ -30,19 +30,19 @@
30
30
  "@angular/core": "16 - 19",
31
31
  "@angular/forms": "16 - 19",
32
32
  "@angular/platform-browser": "16 - 19",
33
- "@progress/kendo-licensing": "^1.0.2",
34
- "@progress/kendo-angular-common": "18.1.0-develop.3",
35
- "@progress/kendo-angular-utils": "18.1.0-develop.3",
36
- "@progress/kendo-angular-l10n": "18.1.0-develop.3",
37
- "@progress/kendo-angular-navigation": "18.1.0-develop.3",
38
- "@progress/kendo-angular-popup": "18.1.0-develop.3",
39
- "@progress/kendo-angular-icons": "18.1.0-develop.3",
40
- "@progress/kendo-angular-treeview": "18.1.0-develop.3",
33
+ "@progress/kendo-licensing": "^1.4.0",
34
+ "@progress/kendo-angular-common": "18.1.0-develop.31",
35
+ "@progress/kendo-angular-utils": "18.1.0-develop.31",
36
+ "@progress/kendo-angular-l10n": "18.1.0-develop.31",
37
+ "@progress/kendo-angular-navigation": "18.1.0-develop.31",
38
+ "@progress/kendo-angular-popup": "18.1.0-develop.31",
39
+ "@progress/kendo-angular-icons": "18.1.0-develop.31",
40
+ "@progress/kendo-angular-treeview": "18.1.0-develop.31",
41
41
  "rxjs": "^6.5.3 || ^7.0.0"
42
42
  },
43
43
  "dependencies": {
44
44
  "tslib": "^2.3.1",
45
- "@progress/kendo-angular-schematics": "18.1.0-develop.3",
45
+ "@progress/kendo-angular-schematics": "18.1.0-develop.31",
46
46
  "@progress/kendo-common": "^1.0.1"
47
47
  },
48
48
  "schematics": "./schematics/collection.json",
@@ -4,9 +4,9 @@ const schematics_1 = require("@angular-devkit/schematics");
4
4
  function default_1(options) {
5
5
  const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'DropDownsModule', package: 'dropdowns', peerDependencies: {
6
6
  // peers of the treeview
7
- '@progress/kendo-angular-inputs': '18.1.0-develop.3',
7
+ '@progress/kendo-angular-inputs': '18.1.0-develop.31',
8
8
  // peers of inputs
9
- '@progress/kendo-angular-intl': '18.1.0-develop.3',
9
+ '@progress/kendo-angular-intl': '18.1.0-develop.31',
10
10
  '@progress/kendo-drawing': '^1.17.2',
11
11
  // Peer dependency of icons
12
12
  '@progress/kendo-svg-icons': '^4.0.0'