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

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.
@@ -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
  /**
@@ -835,15 +835,15 @@ export class ComboBoxComponent extends MultiTabStop {
835
835
  }
836
836
  }))
837
837
  .subscribe(this.handleEnter.bind(this)));
838
- this.subs.add(merge(this.selectionService.onChange, this.selectionService.onSelect.pipe(filter(_ => !this.isOpen)))
839
- .pipe(tap(_ => {
838
+ this.subs.add(merge(this.selectionService.onChange, this.selectionService.onSelect.pipe(filter(() => !this.isOpen)))
839
+ .pipe(tap(() => {
840
840
  this._filtering = false;
841
841
  this.togglePopup(false);
842
842
  }), map((event) => this.dataService.itemAt(event.indices[0])))
843
843
  .subscribe(dataItem => {
844
844
  this.change(dataItem);
845
845
  }));
846
- this.subs.add(this.selectionService.onSelect.pipe(filter(_ => this.isOpen), tap(_ => this._filtering = false), map((event) => this.dataService.itemAt(event.indices[0])))
846
+ this.subs.add(this.selectionService.onSelect.pipe(filter(() => this.isOpen), tap(() => this._filtering = false), map((event) => this.dataService.itemAt(event.indices[0])))
847
847
  .subscribe(dataItem => {
848
848
  const selectionChanged = getter(dataItem, this.valueField) !== getter(this.dataItem, this.valueField);
849
849
  this.updateState({ dataItem });
@@ -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()) {
@@ -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();
@@ -1074,10 +1074,10 @@ export class DropDownListComponent {
1074
1074
  return;
1075
1075
  }
1076
1076
  // Item selection when the popup is open.
1077
- this.subs.add(this.selectionService.onSelect.pipe(filter(_ => this.isOpen), map(this.itemFromEvent.bind(this)))
1077
+ this.subs.add(this.selectionService.onSelect.pipe(filter(() => this.isOpen), map(this.itemFromEvent.bind(this)))
1078
1078
  .subscribe(this.onSelectionChange.bind(this)));
1079
1079
  // Item selection when the popup is closed | clicked | enter, and so on.
1080
- this.subs.add(merge(this.selectionService.onSelect.pipe(filter(_ => !this.isOpen)), this.selectionService.onChange).pipe(map(this.itemFromEvent.bind(this)), tap(_ => this.togglePopup(false)))
1080
+ this.subs.add(merge(this.selectionService.onSelect.pipe(filter(() => !this.isOpen)), this.selectionService.onChange).pipe(map(this.itemFromEvent.bind(this)), tap(() => this.togglePopup(false)))
1081
1081
  .subscribe(({ dataItem, value: newValue, newSelection }) => {
1082
1082
  if (newSelection) {
1083
1083
  this.onSelectionChange({ dataItem });
@@ -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) {
@@ -5,30 +5,8 @@
5
5
  import { Directive, Input } from '@angular/core';
6
6
  import { isChanged } from '@progress/kendo-angular-common';
7
7
  import { DataBoundComponent, HierarchyBindingDirective } from '@progress/kendo-angular-treeview';
8
- import { getter } from '@progress/kendo-common';
9
8
  import * as i0 from "@angular/core";
10
9
  import * as i1 from "@progress/kendo-angular-treeview";
11
- const INDEX_SEPARATOR = '_';
12
- const nodeIndex = (index = '', parentIndex = '') => {
13
- return `${parentIndex}${parentIndex ? INDEX_SEPARATOR : ''}${index}`;
14
- };
15
- const isArrayWithAtLeastOneItem = v => v && Array.isArray(v) && v.length !== 0;
16
- const mapToWrappers = (currentLevelNodes, childrenField, parent = null, parentIndex = '') => {
17
- if (!isArrayWithAtLeastOneItem(currentLevelNodes)) {
18
- return [];
19
- }
20
- return currentLevelNodes.map((node, idx) => {
21
- const index = nodeIndex(idx.toString(), parentIndex);
22
- const wrapper = {
23
- dataItem: node,
24
- index,
25
- parent,
26
- visible: true
27
- };
28
- wrapper.children = mapToWrappers(getter(childrenField)(node), childrenField, wrapper, index);
29
- return wrapper;
30
- });
31
- };
32
10
  /**
33
11
  * A directive which encapsulates the retrieval of the child nodes when hierarchical data is provided.
34
12
  */
@@ -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();
@@ -1736,7 +1736,6 @@ export class MultiSelectComponent {
1736
1736
  popupWrapper.style.width = max;
1737
1737
  popupWrapper.style.height = this.height;
1738
1738
  popupWrapper.setAttribute("dir", this.direction);
1739
- const listBox = popupWrapper.querySelector('ul.k-list-ul');
1740
1739
  this.popupRef.popupOpen.subscribe(() => {
1741
1740
  this.cdr.detectChanges();
1742
1741
  setListBoxAriaLabelledBy(this.optionsList, this.searchbar.input, this.renderer);
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1738076590,
14
- version: '18.0.1-develop.3',
13
+ publishDate: 1738357235,
14
+ version: '18.1.0-develop.10',
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: 1738076590,
41
- version: '18.0.1-develop.3',
40
+ publishDate: 1738357235,
41
+ version: '18.1.0-develop.10',
42
42
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
43
43
  };
44
44
 
@@ -5567,15 +5567,15 @@ class ComboBoxComponent extends MultiTabStop {
5567
5567
  }
5568
5568
  }))
5569
5569
  .subscribe(this.handleEnter.bind(this)));
5570
- this.subs.add(merge(this.selectionService.onChange, this.selectionService.onSelect.pipe(filter(_ => !this.isOpen)))
5571
- .pipe(tap(_ => {
5570
+ this.subs.add(merge(this.selectionService.onChange, this.selectionService.onSelect.pipe(filter(() => !this.isOpen)))
5571
+ .pipe(tap(() => {
5572
5572
  this._filtering = false;
5573
5573
  this.togglePopup(false);
5574
5574
  }), map((event) => this.dataService.itemAt(event.indices[0])))
5575
5575
  .subscribe(dataItem => {
5576
5576
  this.change(dataItem);
5577
5577
  }));
5578
- this.subs.add(this.selectionService.onSelect.pipe(filter(_ => this.isOpen), tap(_ => this._filtering = false), map((event) => this.dataService.itemAt(event.indices[0])))
5578
+ this.subs.add(this.selectionService.onSelect.pipe(filter(() => this.isOpen), tap(() => this._filtering = false), map((event) => this.dataService.itemAt(event.indices[0])))
5579
5579
  .subscribe(dataItem => {
5580
5580
  const selectionChanged = getter(dataItem, this.valueField) !== getter(this.dataItem, this.valueField);
5581
5581
  this.updateState({ dataItem });
@@ -7895,7 +7895,6 @@ class DropDownListComponent {
7895
7895
  });
7896
7896
  this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'true');
7897
7897
  this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-controls', this.listBoxId);
7898
- this.setAriaactivedescendant();
7899
7898
  const popupWrapper = this.popupRef.popupElement;
7900
7899
  const { min, max } = this.width;
7901
7900
  popupWrapper.addEventListener('mousedown', this.popupMouseDownHandler);
@@ -7915,6 +7914,7 @@ class DropDownListComponent {
7915
7914
  this.subs.add(this.popupRef.popupOpen.subscribe(() => {
7916
7915
  this.cdr.detectChanges();
7917
7916
  setListBoxAriaLabelledBy(this.optionsList, this.wrapper, this.renderer);
7917
+ this.setAriaactivedescendant();
7918
7918
  this.optionsList.scrollToItem(this.selectionService.focused);
7919
7919
  this.selectionService.focus(this.selectionService.focused);
7920
7920
  this.opened.emit();
@@ -7966,10 +7966,10 @@ class DropDownListComponent {
7966
7966
  return;
7967
7967
  }
7968
7968
  // Item selection when the popup is open.
7969
- this.subs.add(this.selectionService.onSelect.pipe(filter(_ => this.isOpen), map(this.itemFromEvent.bind(this)))
7969
+ this.subs.add(this.selectionService.onSelect.pipe(filter(() => this.isOpen), map(this.itemFromEvent.bind(this)))
7970
7970
  .subscribe(this.onSelectionChange.bind(this)));
7971
7971
  // Item selection when the popup is closed | clicked | enter, and so on.
7972
- this.subs.add(merge(this.selectionService.onSelect.pipe(filter(_ => !this.isOpen)), this.selectionService.onChange).pipe(map(this.itemFromEvent.bind(this)), tap(_ => this.togglePopup(false)))
7972
+ this.subs.add(merge(this.selectionService.onSelect.pipe(filter(() => !this.isOpen)), this.selectionService.onChange).pipe(map(this.itemFromEvent.bind(this)), tap(() => this.togglePopup(false)))
7973
7973
  .subscribe(({ dataItem, value: newValue, newSelection }) => {
7974
7974
  if (newSelection) {
7975
7975
  this.onSelectionChange({ dataItem });
@@ -8018,7 +8018,7 @@ class DropDownListComponent {
8018
8018
  setAriaactivedescendant() {
8019
8019
  if (this.ariaActivedescendant) {
8020
8020
  this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-activedescendant', this.ariaActivedescendant);
8021
- const searchInput = this.popupRef.popupElement.querySelector('input[role="searchbox"]');
8021
+ const searchInput = this.popupRef?.popupElement.querySelector('input[role="searchbox"]') || this.actionSheetSearchBar?.input.nativeElement;
8022
8022
  if (searchInput) {
8023
8023
  this.renderer.setAttribute(searchInput, 'aria-activedescendant', this.ariaActivedescendant);
8024
8024
  }
@@ -8347,6 +8347,8 @@ class DropDownListComponent {
8347
8347
  }
8348
8348
  closeActionSheet() {
8349
8349
  this.actionSheet.toggle(false);
8350
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'false');
8351
+ this.renderer.removeAttribute(this.wrapper.nativeElement, 'aria-controls');
8350
8352
  if (this.filterable) {
8351
8353
  this.actionSheetSearchBar.value = '';
8352
8354
  this.filterChange.emit('');
@@ -8357,7 +8359,10 @@ class DropDownListComponent {
8357
8359
  this.windowSize = this.adaptiveService.size;
8358
8360
  this.actionSheet.toggle(true);
8359
8361
  this.cdr.detectChanges();
8362
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'true');
8363
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-controls', this.listBoxId);
8360
8364
  setListBoxAriaLabelledBy(this.optionsList, this.wrapper, this.renderer);
8365
+ this.setAriaactivedescendant();
8361
8366
  this.title = setActionSheetTitle(this.wrapper, this.title);
8362
8367
  updateActionSheetAdaptiveAppearance(this.actionSheet, this.windowSize, this.renderer);
8363
8368
  this.cdr.detectChanges();
@@ -11033,7 +11038,6 @@ class MultiSelectComponent {
11033
11038
  popupWrapper.style.width = max;
11034
11039
  popupWrapper.style.height = this.height;
11035
11040
  popupWrapper.setAttribute("dir", this.direction);
11036
- const listBox = popupWrapper.querySelector('ul.k-list-ul');
11037
11041
  this.popupRef.popupOpen.subscribe(() => {
11038
11042
  this.cdr.detectChanges();
11039
11043
  setListBoxAriaLabelledBy(this.optionsList, this.searchbar.input, this.renderer);
@@ -12051,14 +12055,10 @@ class MultiColumnComboBoxComponent extends ComboBoxComponent {
12051
12055
  * @hidden
12052
12056
  */
12053
12057
  getColumnWidth(index) {
12054
- const popupWidthNumber = +(this.popupWidth.max.slice(0, -2));
12055
- if (this.totalColumnsWidth >= popupWidthNumber) {
12058
+ if (!this.virtual) {
12056
12059
  return this.columns.get(index).width;
12057
12060
  }
12058
- if (this.virtual && isPresent(this.headerColumnWidths[index])) {
12059
- return this.headerColumnWidths[index];
12060
- }
12061
- return this.columns.get(index).width;
12061
+ return this.headerColumnWidths[index];
12062
12062
  }
12063
12063
  verifySettings() {
12064
12064
  if (!isDevMode()) {
@@ -14601,7 +14601,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
14601
14601
  /**
14602
14602
  * @hidden
14603
14603
  */
14604
- const nodeIndex$1 = (item) => (item || {}).key;
14604
+ const nodeIndex = (item) => (item || {}).key;
14605
14605
  /**
14606
14606
  * @hidden
14607
14607
  */
@@ -14642,7 +14642,7 @@ class MultiSelectTreeLookupService {
14642
14642
  const currentLookup = {
14643
14643
  children: [],
14644
14644
  item,
14645
- parent: this.item(nodeIndex$1(parent))
14645
+ parent: this.item(nodeIndex(parent))
14646
14646
  };
14647
14647
  this.map.set(item.key, currentLookup);
14648
14648
  }
@@ -14683,8 +14683,8 @@ class BaseCheckDirective {
14683
14683
  /**
14684
14684
  * @hidden
14685
14685
  * The flag is needed in order to determine how to construct the items map keys.
14686
- * If `true`, then the key consists of the item's value and 0 (no leveling required),
14687
- * else the key consists of the item's value and level (depth)
14686
+ * If `true`, then the key consists of the item's value and level (depth),
14687
+ * else the key consists of the item's value and 0 (no leveling required)
14688
14688
  */
14689
14689
  isHeterogeneous;
14690
14690
  addItem(item) {
@@ -14705,7 +14705,11 @@ class BaseCheckDirective {
14705
14705
  const key = this.getKey(item, level);
14706
14706
  const candidate = { ...item, level, key };
14707
14707
  this.checkedItems = this.checkedItems
14708
- .filter(item => valueFrom(item, this.valueField) !== valueFrom(candidate, this.valueField));
14708
+ .filter(item => {
14709
+ const valueMatch = valueFrom(item, this.valueField) === valueFrom(candidate, this.valueField);
14710
+ const levelMatch = item.level === candidate.level;
14711
+ return this.isHeterogeneous ? !(valueMatch && levelMatch) : !valueMatch;
14712
+ });
14709
14713
  this.checkedKeys.delete(key);
14710
14714
  }
14711
14715
  isItemChecked(item) {
@@ -15791,8 +15795,8 @@ class MultiSelectTreeComponent {
15791
15795
  /**
15792
15796
  * @hidden
15793
15797
  * The flag is needed in order to determine how to construct the items map keys.
15794
- * If `true`, then the key consists of the item's value and 0 (no leveling required),
15795
- * else the key consists of the item's value and level (depth)
15798
+ * If `true`, then the key consists of the item's value and level (depth),
15799
+ * else the key consists of the item's value and 0 (no leveling required)
15796
15800
  */
15797
15801
  isHeterogeneous;
15798
15802
  /**
@@ -16139,7 +16143,7 @@ class MultiSelectTreeComponent {
16139
16143
  }
16140
16144
  else {
16141
16145
  // Remove single tag when the child items are pre-fetched
16142
- const dataItem = this.dataItems[index];
16146
+ const dataItem = this.dataItems.find(item => item.tagPositionIndex === index);
16143
16147
  const itemKey = dataItem.key;
16144
16148
  const lookup = this.lookup.itemLookup(itemKey);
16145
16149
  const pendingCheck = [lookup.item];
@@ -16149,10 +16153,20 @@ class MultiSelectTreeComponent {
16149
16153
  pendingCheck.push(...this.removeParents(lookup.parent));
16150
16154
  }
16151
16155
  const keysToRemove = pendingCheck.map(item => item.key);
16156
+ // Holds the position indexes of the items to be removed
16157
+ const valueDepthIndices = [];
16152
16158
  this.dataItems = this.dataItems.filter((_item, i) => {
16153
- return !keysToRemove.includes(_item.key) || this.disabledIndices.has(i);
16159
+ const shouldStay = !keysToRemove.includes(_item.key) || this.disabledIndices.has(i);
16160
+ if (!shouldStay) {
16161
+ // We need to know the index position of the data item to be able to update the valueDepth array accordignly
16162
+ // as each data item's position is corresponding to the same position in valueDepth
16163
+ valueDepthIndices.push(i);
16164
+ }
16165
+ return shouldStay;
16166
+ });
16167
+ this.valueDepth = this.valueDepth.filter((_item, i) => {
16168
+ return !valueDepthIndices.includes(i) || this.disabledIndices.has(i);
16154
16169
  });
16155
- this.valueDepth = this.dataItems.map(i => i.level);
16156
16170
  }
16157
16171
  this.updateValue(this.dataItems);
16158
16172
  if (!this.isFocused) {
@@ -16561,7 +16575,15 @@ class MultiSelectTreeComponent {
16561
16575
  const source = this.dataItems.map(item => item.dataItem);
16562
16576
  this.tags = this.tagMapper(source);
16563
16577
  this.disabledIndices = this.disabledItemsMapper();
16564
- this.dataItems.sort((a, b) => this.tags.indexOf(a.dataItem) - this.tags.indexOf(b.dataItem));
16578
+ // Create a mapping of tags to position indices
16579
+ const tagIndexMap = new Map(this.tags.map((tag, index) => [JSON.stringify(tag), index]));
16580
+ // Modify dataItems by adding a property to hold the item's position as displayed in the tags
16581
+ this.dataItems.forEach(item => {
16582
+ const serializedDataItem = JSON.stringify(item.dataItem);
16583
+ item.tagPositionIndex = tagIndexMap.has(serializedDataItem)
16584
+ ? tagIndexMap.get(serializedDataItem) // Use the index from tags if it exists
16585
+ : null; // Assign a null value if the dataItem is not visible in the tags
16586
+ });
16565
16587
  }
16566
16588
  updateValue(value) {
16567
16589
  const newValue = this.valuePrimitive ?
@@ -16629,7 +16651,7 @@ class MultiSelectTreeComponent {
16629
16651
  if (!isPresent(data) || data.length === 0) {
16630
16652
  return;
16631
16653
  }
16632
- const parentIndex = nodeIndex$1(parentItem);
16654
+ const parentIndex = nodeIndex(parentItem);
16633
16655
  const treeItems = data.map((node) => buildTreeItem(node, this.valueField, levelIndex));
16634
16656
  if (isPresent(parentItem)) {
16635
16657
  this.lookup.registerChildren(parentIndex, treeItems);
@@ -16653,6 +16675,8 @@ class MultiSelectTreeComponent {
16653
16675
  closeActionSheet() {
16654
16676
  this.wrapper.nativeElement.focus();
16655
16677
  this.actionSheet.toggle(false);
16678
+ this.renderer.removeAttribute(this.wrapper.nativeElement, 'aria-controls');
16679
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'false');
16656
16680
  if (this.filterable) {
16657
16681
  this.actionSheetSearchBar.value = '';
16658
16682
  this.filterChange.emit('');
@@ -16664,6 +16688,8 @@ class MultiSelectTreeComponent {
16664
16688
  this.actionSheet.toggle(true);
16665
16689
  this.title = setActionSheetTitle(this.wrapper, this.title);
16666
16690
  this.cdr.detectChanges();
16691
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-controls', this.treeViewId);
16692
+ this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', 'true');
16667
16693
  updateActionSheetAdaptiveAppearance(this.actionSheet, this.windowSize, this.renderer);
16668
16694
  this.cdr.detectChanges();
16669
16695
  this.opened.emit();
@@ -17408,27 +17434,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
17408
17434
  args: ['valueField']
17409
17435
  }] } });
17410
17436
 
17411
- const INDEX_SEPARATOR = '_';
17412
- const nodeIndex = (index = '', parentIndex = '') => {
17413
- return `${parentIndex}${parentIndex ? INDEX_SEPARATOR : ''}${index}`;
17414
- };
17415
- const isArrayWithAtLeastOneItem = v => v && Array.isArray(v) && v.length !== 0;
17416
- const mapToWrappers = (currentLevelNodes, childrenField, parent = null, parentIndex = '') => {
17417
- if (!isArrayWithAtLeastOneItem(currentLevelNodes)) {
17418
- return [];
17419
- }
17420
- return currentLevelNodes.map((node, idx) => {
17421
- const index = nodeIndex(idx.toString(), parentIndex);
17422
- const wrapper = {
17423
- dataItem: node,
17424
- index,
17425
- parent,
17426
- visible: true
17427
- };
17428
- wrapper.children = mapToWrappers(getter$1(childrenField)(node), childrenField, wrapper, index);
17429
- return wrapper;
17430
- });
17431
- };
17432
17437
  /**
17433
17438
  * A directive which encapsulates the retrieval of the child nodes when hierarchical data is provided.
17434
17439
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-dropdowns",
3
- "version": "18.0.1-develop.3",
3
+ "version": "18.1.0-develop.10",
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": 1738076590,
23
+ "publishDate": 1738357235,
24
24
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
25
25
  }
26
26
  },
@@ -31,18 +31,18 @@
31
31
  "@angular/forms": "16 - 19",
32
32
  "@angular/platform-browser": "16 - 19",
33
33
  "@progress/kendo-licensing": "^1.0.2",
34
- "@progress/kendo-angular-common": "18.0.1-develop.3",
35
- "@progress/kendo-angular-utils": "18.0.1-develop.3",
36
- "@progress/kendo-angular-l10n": "18.0.1-develop.3",
37
- "@progress/kendo-angular-navigation": "18.0.1-develop.3",
38
- "@progress/kendo-angular-popup": "18.0.1-develop.3",
39
- "@progress/kendo-angular-icons": "18.0.1-develop.3",
40
- "@progress/kendo-angular-treeview": "18.0.1-develop.3",
34
+ "@progress/kendo-angular-common": "18.1.0-develop.10",
35
+ "@progress/kendo-angular-utils": "18.1.0-develop.10",
36
+ "@progress/kendo-angular-l10n": "18.1.0-develop.10",
37
+ "@progress/kendo-angular-navigation": "18.1.0-develop.10",
38
+ "@progress/kendo-angular-popup": "18.1.0-develop.10",
39
+ "@progress/kendo-angular-icons": "18.1.0-develop.10",
40
+ "@progress/kendo-angular-treeview": "18.1.0-develop.10",
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.0.1-develop.3",
45
+ "@progress/kendo-angular-schematics": "18.1.0-develop.10",
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.0.1-develop.3',
7
+ '@progress/kendo-angular-inputs': '18.1.0-develop.10',
8
8
  // peers of inputs
9
- '@progress/kendo-angular-intl': '18.0.1-develop.3',
9
+ '@progress/kendo-angular-intl': '18.1.0-develop.10',
10
10
  '@progress/kendo-drawing': '^1.17.2',
11
11
  // Peer dependency of icons
12
12
  '@progress/kendo-svg-icons': '^4.0.0'