@progress/kendo-angular-treeview 12.0.2-develop.2 → 12.0.2-develop.3

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.
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-treeview',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1683808964,
13
- version: '12.0.2-develop.2',
12
+ publishDate: 1683884228,
13
+ version: '12.0.2-develop.3',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -55,7 +55,6 @@ export class TreeViewGroupComponent {
55
55
  */
56
56
  this.caretAltRightIcon = caretAltRightIcon;
57
57
  this.kGroupClass = true;
58
- this.role = 'group';
59
58
  this.loadOnDemand = true;
60
59
  this.textField = "";
61
60
  this.size = 'medium';
@@ -72,6 +71,9 @@ export class TreeViewGroupComponent {
72
71
  this.children = () => of([]);
73
72
  this.hasChildren = () => false;
74
73
  }
74
+ get role() {
75
+ return this.parentIndex ? 'group' : 'tree';
76
+ }
75
77
  getFontIcon(node, index) {
76
78
  return this.isExpanded(node, index) ? 'caret-alt-down' : 'caret-alt-right';
77
79
  }
@@ -23,6 +23,7 @@ import { SelectionService } from './selection/selection.service';
23
23
  import { TreeViewLookupService } from './treeview-lookup.service';
24
24
  import { closestNode, focusableNode, hasParent, isContent, isFocusable, match, nodeId, isLoadMoreButton, isPresent, nodeIndex, buildTreeItem, getSizeClass } from './utils';
25
25
  import { searchIcon } from '@progress/kendo-svg-icons';
26
+ import { TextBoxComponent } from '@progress/kendo-angular-inputs';
26
27
  import * as i0 from "@angular/core";
27
28
  import * as i1 from "./expand-state.service";
28
29
  import * as i2 from "./navigation/navigation.service";
@@ -35,6 +36,7 @@ import * as i8 from "@progress/kendo-angular-inputs";
35
36
  import * as i9 from "@progress/kendo-angular-icons";
36
37
  import * as i10 from "./treeview-group.component";
37
38
  import * as i11 from "@angular/common";
39
+ let nextId = 0;
38
40
  const LOAD_MORE_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button/';
39
41
  const providers = [
40
42
  ExpandStateService,
@@ -87,7 +89,6 @@ export class TreeViewComponent {
87
89
  */
88
90
  this.searchIcon = searchIcon;
89
91
  this.classNames = true;
90
- this.role = 'tree';
91
92
  /**
92
93
  * The hint which is displayed when the component is empty.
93
94
  */
@@ -252,7 +253,9 @@ export class TreeViewComponent {
252
253
  this._size = 'medium';
253
254
  this.subscriptions = new Subscription();
254
255
  this.domSubscriptions = [];
256
+ this._nextId = nextId;
255
257
  validatePackage(packageMetadata);
258
+ nextId++;
256
259
  }
257
260
  /** @hidden */
258
261
  get direction() {
@@ -365,6 +368,12 @@ export class TreeViewComponent {
365
368
  get size() {
366
369
  return this._size;
367
370
  }
371
+ /**
372
+ * @hidden
373
+ */
374
+ get treeviewId() {
375
+ return `treeview_${this._nextId}`;
376
+ }
368
377
  ngOnChanges(changes) {
369
378
  this.navigationService.navigable = Boolean(this.navigable);
370
379
  // TODO: should react to changes.loadOnDemand as well - should preload the data or clear the already cached items
@@ -403,6 +412,13 @@ export class TreeViewComponent {
403
412
  this.renderer.addClass(this.element.nativeElement, getSizeClass('treeview', this.size));
404
413
  }
405
414
  }
415
+ ngAfterViewInit() {
416
+ if (this.searchbox) {
417
+ this.renderer.setAttribute(this.searchbox.input.nativeElement, 'role', 'searchbox');
418
+ this.renderer.setAttribute(this.searchbox.input.nativeElement, 'aria-controls', this.treeviewId);
419
+ this.renderer.setAttribute(this.searchbox.input.nativeElement, 'aria-label', 'searchbar');
420
+ }
421
+ }
406
422
  /**
407
423
  * Blurs the focused TreeView item.
408
424
  */
@@ -618,12 +634,13 @@ export class TreeViewComponent {
618
634
  }
619
635
  }
620
636
  TreeViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.ExpandStateService }, { token: i2.NavigationService }, { token: i3.NodeChildrenService }, { token: i4.SelectionService }, { token: i5.TreeViewLookupService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i6.DataChangeNotificationService }, { token: i7.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
621
- TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TreeViewComponent, selector: "kendo-treeview", inputs: { filterInputPlaceholder: "filterInputPlaceholder", expandDisabledNodes: "expandDisabledNodes", animate: "animate", nodeTemplateRef: ["nodeTemplate", "nodeTemplateRef"], loadMoreButtonTemplateRef: ["loadMoreButtonTemplate", "loadMoreButtonTemplateRef"], trackBy: "trackBy", nodes: "nodes", textField: "textField", hasChildren: "hasChildren", isChecked: "isChecked", isDisabled: "isDisabled", isExpanded: "isExpanded", isSelected: "isSelected", isVisible: "isVisible", navigable: "navigable", children: "children", loadOnDemand: "loadOnDemand", filterable: "filterable", filter: "filter", size: "size", disableParentNodesOnly: "disableParentNodesOnly" }, outputs: { childrenLoaded: "childrenLoaded", onBlur: "blur", onFocus: "focus", expand: "expand", collapse: "collapse", nodeDragStart: "nodeDragStart", nodeDrag: "nodeDrag", filterStateChange: "filterStateChange", nodeDrop: "nodeDrop", nodeDragEnd: "nodeDragEnd", addItem: "addItem", removeItem: "removeItem", checkedChange: "checkedChange", selectionChange: "selectionChange", filterChange: "filterChange", nodeClick: "nodeClick", nodeDblClick: "nodeDblClick" }, host: { properties: { "class.k-treeview": "this.classNames", "attr.role": "this.role", "attr.dir": "this.direction", "@.disabled": "this.animate" } }, providers: providers, queries: [{ propertyName: "nodeTemplateQuery", first: true, predicate: NodeTemplateDirective, descendants: true }, { propertyName: "loadMoreButtonTemplateQuery", first: true, predicate: LoadMoreButtonTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "assetsContainer", first: true, predicate: ["assetsContainer"], descendants: true, read: ViewContainerRef, static: true }], exportAs: ["kendoTreeView"], usesOnChanges: true, ngImport: i0, template: `
637
+ TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TreeViewComponent, selector: "kendo-treeview", inputs: { filterInputPlaceholder: "filterInputPlaceholder", expandDisabledNodes: "expandDisabledNodes", animate: "animate", nodeTemplateRef: ["nodeTemplate", "nodeTemplateRef"], loadMoreButtonTemplateRef: ["loadMoreButtonTemplate", "loadMoreButtonTemplateRef"], trackBy: "trackBy", nodes: "nodes", textField: "textField", hasChildren: "hasChildren", isChecked: "isChecked", isDisabled: "isDisabled", isExpanded: "isExpanded", isSelected: "isSelected", isVisible: "isVisible", navigable: "navigable", children: "children", loadOnDemand: "loadOnDemand", filterable: "filterable", filter: "filter", size: "size", disableParentNodesOnly: "disableParentNodesOnly" }, outputs: { childrenLoaded: "childrenLoaded", onBlur: "blur", onFocus: "focus", expand: "expand", collapse: "collapse", nodeDragStart: "nodeDragStart", nodeDrag: "nodeDrag", filterStateChange: "filterStateChange", nodeDrop: "nodeDrop", nodeDragEnd: "nodeDragEnd", addItem: "addItem", removeItem: "removeItem", checkedChange: "checkedChange", selectionChange: "selectionChange", filterChange: "filterChange", nodeClick: "nodeClick", nodeDblClick: "nodeDblClick" }, host: { properties: { "class.k-treeview": "this.classNames", "attr.dir": "this.direction", "@.disabled": "this.animate" } }, providers: providers, queries: [{ propertyName: "nodeTemplateQuery", first: true, predicate: NodeTemplateDirective, descendants: true }, { propertyName: "loadMoreButtonTemplateQuery", first: true, predicate: LoadMoreButtonTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "assetsContainer", first: true, predicate: ["assetsContainer"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "searchbox", first: true, predicate: ["searchbox"], descendants: true }], exportAs: ["kendoTreeView"], usesOnChanges: true, ngImport: i0, template: `
622
638
  <span
623
639
  class="k-treeview-filter"
624
640
  *ngIf="filterable"
625
641
  >
626
642
  <kendo-textbox
643
+ #searchbox
627
644
  [size]="size"
628
645
  [value]="filter"
629
646
  [clearButton]="true"
@@ -642,7 +659,8 @@ TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
642
659
  </span>
643
660
  <ul class="k-treeview-lines"
644
661
  kendoTreeViewGroup
645
- role="group"
662
+ [attr.id]="treeviewId"
663
+ role="tree"
646
664
  [size]="size"
647
665
  [loadOnDemand]="loadOnDemand"
648
666
  [checkboxes]="checkboxes"
@@ -681,6 +699,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
681
699
  *ngIf="filterable"
682
700
  >
683
701
  <kendo-textbox
702
+ #searchbox
684
703
  [size]="size"
685
704
  [value]="filter"
686
705
  [clearButton]="true"
@@ -699,7 +718,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
699
718
  </span>
700
719
  <ul class="k-treeview-lines"
701
720
  kendoTreeViewGroup
702
- role="group"
721
+ [attr.id]="treeviewId"
722
+ role="tree"
703
723
  [size]="size"
704
724
  [loadOnDemand]="loadOnDemand"
705
725
  [checkboxes]="checkboxes"
@@ -729,15 +749,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
729
749
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.ExpandStateService }, { type: i2.NavigationService }, { type: i3.NodeChildrenService }, { type: i4.SelectionService }, { type: i5.TreeViewLookupService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i6.DataChangeNotificationService }, { type: i7.LocalizationService }]; }, propDecorators: { classNames: [{
730
750
  type: HostBinding,
731
751
  args: ["class.k-treeview"]
732
- }], role: [{
733
- type: HostBinding,
734
- args: ["attr.role"]
735
752
  }], direction: [{
736
753
  type: HostBinding,
737
754
  args: ["attr.dir"]
738
755
  }], assetsContainer: [{
739
756
  type: ViewChild,
740
757
  args: ['assetsContainer', { read: ViewContainerRef, static: true }]
758
+ }], searchbox: [{
759
+ type: ViewChild,
760
+ args: ['searchbox']
741
761
  }], filterInputPlaceholder: [{
742
762
  type: Input
743
763
  }], expandDisabledNodes: [{
@@ -28,8 +28,8 @@ const packageMetadata = {
28
28
  name: '@progress/kendo-angular-treeview',
29
29
  productName: 'Kendo UI for Angular',
30
30
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
31
- publishDate: 1683808964,
32
- version: '12.0.2-develop.2',
31
+ publishDate: 1683884228,
32
+ version: '12.0.2-develop.3',
33
33
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
34
34
  };
35
35
 
@@ -1537,7 +1537,6 @@ class TreeViewGroupComponent {
1537
1537
  */
1538
1538
  this.caretAltRightIcon = caretAltRightIcon;
1539
1539
  this.kGroupClass = true;
1540
- this.role = 'group';
1541
1540
  this.loadOnDemand = true;
1542
1541
  this.textField = "";
1543
1542
  this.size = 'medium';
@@ -1554,6 +1553,9 @@ class TreeViewGroupComponent {
1554
1553
  this.children = () => of([]);
1555
1554
  this.hasChildren = () => false;
1556
1555
  }
1556
+ get role() {
1557
+ return this.parentIndex ? 'group' : 'tree';
1558
+ }
1557
1559
  getFontIcon(node, index) {
1558
1560
  return this.isExpanded(node, index) ? 'caret-alt-down' : 'caret-alt-right';
1559
1561
  }
@@ -2152,6 +2154,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2152
2154
  type: Input
2153
2155
  }] } });
2154
2156
 
2157
+ let nextId = 0;
2155
2158
  const LOAD_MORE_DOC_LINK$1 = 'http://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button/';
2156
2159
  const providers = [
2157
2160
  ExpandStateService,
@@ -2204,7 +2207,6 @@ class TreeViewComponent {
2204
2207
  */
2205
2208
  this.searchIcon = searchIcon;
2206
2209
  this.classNames = true;
2207
- this.role = 'tree';
2208
2210
  /**
2209
2211
  * The hint which is displayed when the component is empty.
2210
2212
  */
@@ -2369,7 +2371,9 @@ class TreeViewComponent {
2369
2371
  this._size = 'medium';
2370
2372
  this.subscriptions = new Subscription();
2371
2373
  this.domSubscriptions = [];
2374
+ this._nextId = nextId;
2372
2375
  validatePackage(packageMetadata);
2376
+ nextId++;
2373
2377
  }
2374
2378
  /** @hidden */
2375
2379
  get direction() {
@@ -2482,6 +2486,12 @@ class TreeViewComponent {
2482
2486
  get size() {
2483
2487
  return this._size;
2484
2488
  }
2489
+ /**
2490
+ * @hidden
2491
+ */
2492
+ get treeviewId() {
2493
+ return `treeview_${this._nextId}`;
2494
+ }
2485
2495
  ngOnChanges(changes) {
2486
2496
  this.navigationService.navigable = Boolean(this.navigable);
2487
2497
  // TODO: should react to changes.loadOnDemand as well - should preload the data or clear the already cached items
@@ -2520,6 +2530,13 @@ class TreeViewComponent {
2520
2530
  this.renderer.addClass(this.element.nativeElement, getSizeClass('treeview', this.size));
2521
2531
  }
2522
2532
  }
2533
+ ngAfterViewInit() {
2534
+ if (this.searchbox) {
2535
+ this.renderer.setAttribute(this.searchbox.input.nativeElement, 'role', 'searchbox');
2536
+ this.renderer.setAttribute(this.searchbox.input.nativeElement, 'aria-controls', this.treeviewId);
2537
+ this.renderer.setAttribute(this.searchbox.input.nativeElement, 'aria-label', 'searchbar');
2538
+ }
2539
+ }
2523
2540
  /**
2524
2541
  * Blurs the focused TreeView item.
2525
2542
  */
@@ -2735,12 +2752,13 @@ class TreeViewComponent {
2735
2752
  }
2736
2753
  }
2737
2754
  TreeViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: ExpandStateService }, { token: NavigationService }, { token: NodeChildrenService }, { token: SelectionService }, { token: TreeViewLookupService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: DataChangeNotificationService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
2738
- TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TreeViewComponent, selector: "kendo-treeview", inputs: { filterInputPlaceholder: "filterInputPlaceholder", expandDisabledNodes: "expandDisabledNodes", animate: "animate", nodeTemplateRef: ["nodeTemplate", "nodeTemplateRef"], loadMoreButtonTemplateRef: ["loadMoreButtonTemplate", "loadMoreButtonTemplateRef"], trackBy: "trackBy", nodes: "nodes", textField: "textField", hasChildren: "hasChildren", isChecked: "isChecked", isDisabled: "isDisabled", isExpanded: "isExpanded", isSelected: "isSelected", isVisible: "isVisible", navigable: "navigable", children: "children", loadOnDemand: "loadOnDemand", filterable: "filterable", filter: "filter", size: "size", disableParentNodesOnly: "disableParentNodesOnly" }, outputs: { childrenLoaded: "childrenLoaded", onBlur: "blur", onFocus: "focus", expand: "expand", collapse: "collapse", nodeDragStart: "nodeDragStart", nodeDrag: "nodeDrag", filterStateChange: "filterStateChange", nodeDrop: "nodeDrop", nodeDragEnd: "nodeDragEnd", addItem: "addItem", removeItem: "removeItem", checkedChange: "checkedChange", selectionChange: "selectionChange", filterChange: "filterChange", nodeClick: "nodeClick", nodeDblClick: "nodeDblClick" }, host: { properties: { "class.k-treeview": "this.classNames", "attr.role": "this.role", "attr.dir": "this.direction", "@.disabled": "this.animate" } }, providers: providers, queries: [{ propertyName: "nodeTemplateQuery", first: true, predicate: NodeTemplateDirective, descendants: true }, { propertyName: "loadMoreButtonTemplateQuery", first: true, predicate: LoadMoreButtonTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "assetsContainer", first: true, predicate: ["assetsContainer"], descendants: true, read: ViewContainerRef, static: true }], exportAs: ["kendoTreeView"], usesOnChanges: true, ngImport: i0, template: `
2755
+ TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TreeViewComponent, selector: "kendo-treeview", inputs: { filterInputPlaceholder: "filterInputPlaceholder", expandDisabledNodes: "expandDisabledNodes", animate: "animate", nodeTemplateRef: ["nodeTemplate", "nodeTemplateRef"], loadMoreButtonTemplateRef: ["loadMoreButtonTemplate", "loadMoreButtonTemplateRef"], trackBy: "trackBy", nodes: "nodes", textField: "textField", hasChildren: "hasChildren", isChecked: "isChecked", isDisabled: "isDisabled", isExpanded: "isExpanded", isSelected: "isSelected", isVisible: "isVisible", navigable: "navigable", children: "children", loadOnDemand: "loadOnDemand", filterable: "filterable", filter: "filter", size: "size", disableParentNodesOnly: "disableParentNodesOnly" }, outputs: { childrenLoaded: "childrenLoaded", onBlur: "blur", onFocus: "focus", expand: "expand", collapse: "collapse", nodeDragStart: "nodeDragStart", nodeDrag: "nodeDrag", filterStateChange: "filterStateChange", nodeDrop: "nodeDrop", nodeDragEnd: "nodeDragEnd", addItem: "addItem", removeItem: "removeItem", checkedChange: "checkedChange", selectionChange: "selectionChange", filterChange: "filterChange", nodeClick: "nodeClick", nodeDblClick: "nodeDblClick" }, host: { properties: { "class.k-treeview": "this.classNames", "attr.dir": "this.direction", "@.disabled": "this.animate" } }, providers: providers, queries: [{ propertyName: "nodeTemplateQuery", first: true, predicate: NodeTemplateDirective, descendants: true }, { propertyName: "loadMoreButtonTemplateQuery", first: true, predicate: LoadMoreButtonTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "assetsContainer", first: true, predicate: ["assetsContainer"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "searchbox", first: true, predicate: ["searchbox"], descendants: true }], exportAs: ["kendoTreeView"], usesOnChanges: true, ngImport: i0, template: `
2739
2756
  <span
2740
2757
  class="k-treeview-filter"
2741
2758
  *ngIf="filterable"
2742
2759
  >
2743
2760
  <kendo-textbox
2761
+ #searchbox
2744
2762
  [size]="size"
2745
2763
  [value]="filter"
2746
2764
  [clearButton]="true"
@@ -2759,7 +2777,8 @@ TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
2759
2777
  </span>
2760
2778
  <ul class="k-treeview-lines"
2761
2779
  kendoTreeViewGroup
2762
- role="group"
2780
+ [attr.id]="treeviewId"
2781
+ role="tree"
2763
2782
  [size]="size"
2764
2783
  [loadOnDemand]="loadOnDemand"
2765
2784
  [checkboxes]="checkboxes"
@@ -2798,6 +2817,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2798
2817
  *ngIf="filterable"
2799
2818
  >
2800
2819
  <kendo-textbox
2820
+ #searchbox
2801
2821
  [size]="size"
2802
2822
  [value]="filter"
2803
2823
  [clearButton]="true"
@@ -2816,7 +2836,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2816
2836
  </span>
2817
2837
  <ul class="k-treeview-lines"
2818
2838
  kendoTreeViewGroup
2819
- role="group"
2839
+ [attr.id]="treeviewId"
2840
+ role="tree"
2820
2841
  [size]="size"
2821
2842
  [loadOnDemand]="loadOnDemand"
2822
2843
  [checkboxes]="checkboxes"
@@ -2846,15 +2867,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2846
2867
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: ExpandStateService }, { type: NavigationService }, { type: NodeChildrenService }, { type: SelectionService }, { type: TreeViewLookupService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: DataChangeNotificationService }, { type: i1.LocalizationService }]; }, propDecorators: { classNames: [{
2847
2868
  type: HostBinding,
2848
2869
  args: ["class.k-treeview"]
2849
- }], role: [{
2850
- type: HostBinding,
2851
- args: ["attr.role"]
2852
2870
  }], direction: [{
2853
2871
  type: HostBinding,
2854
2872
  args: ["attr.dir"]
2855
2873
  }], assetsContainer: [{
2856
2874
  type: ViewChild,
2857
2875
  args: ['assetsContainer', { read: ViewContainerRef, static: true }]
2876
+ }], searchbox: [{
2877
+ type: ViewChild,
2878
+ args: ['searchbox']
2858
2879
  }], filterInputPlaceholder: [{
2859
2880
  type: Input
2860
2881
  }], expandDisabledNodes: [{
@@ -28,8 +28,8 @@ const packageMetadata = {
28
28
  name: '@progress/kendo-angular-treeview',
29
29
  productName: 'Kendo UI for Angular',
30
30
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
31
- publishDate: 1683808964,
32
- version: '12.0.2-develop.2',
31
+ publishDate: 1683884228,
32
+ version: '12.0.2-develop.3',
33
33
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
34
34
  };
35
35
 
@@ -1533,7 +1533,6 @@ class TreeViewGroupComponent {
1533
1533
  */
1534
1534
  this.caretAltRightIcon = caretAltRightIcon;
1535
1535
  this.kGroupClass = true;
1536
- this.role = 'group';
1537
1536
  this.loadOnDemand = true;
1538
1537
  this.textField = "";
1539
1538
  this.size = 'medium';
@@ -1550,6 +1549,9 @@ class TreeViewGroupComponent {
1550
1549
  this.children = () => of([]);
1551
1550
  this.hasChildren = () => false;
1552
1551
  }
1552
+ get role() {
1553
+ return this.parentIndex ? 'group' : 'tree';
1554
+ }
1553
1555
  getFontIcon(node, index) {
1554
1556
  return this.isExpanded(node, index) ? 'caret-alt-down' : 'caret-alt-right';
1555
1557
  }
@@ -2148,6 +2150,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2148
2150
  type: Input
2149
2151
  }] } });
2150
2152
 
2153
+ let nextId = 0;
2151
2154
  const LOAD_MORE_DOC_LINK$1 = 'http://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button/';
2152
2155
  const providers = [
2153
2156
  ExpandStateService,
@@ -2200,7 +2203,6 @@ class TreeViewComponent {
2200
2203
  */
2201
2204
  this.searchIcon = searchIcon;
2202
2205
  this.classNames = true;
2203
- this.role = 'tree';
2204
2206
  /**
2205
2207
  * The hint which is displayed when the component is empty.
2206
2208
  */
@@ -2365,7 +2367,9 @@ class TreeViewComponent {
2365
2367
  this._size = 'medium';
2366
2368
  this.subscriptions = new Subscription();
2367
2369
  this.domSubscriptions = [];
2370
+ this._nextId = nextId;
2368
2371
  validatePackage(packageMetadata);
2372
+ nextId++;
2369
2373
  }
2370
2374
  /** @hidden */
2371
2375
  get direction() {
@@ -2478,6 +2482,12 @@ class TreeViewComponent {
2478
2482
  get size() {
2479
2483
  return this._size;
2480
2484
  }
2485
+ /**
2486
+ * @hidden
2487
+ */
2488
+ get treeviewId() {
2489
+ return `treeview_${this._nextId}`;
2490
+ }
2481
2491
  ngOnChanges(changes) {
2482
2492
  this.navigationService.navigable = Boolean(this.navigable);
2483
2493
  // TODO: should react to changes.loadOnDemand as well - should preload the data or clear the already cached items
@@ -2516,6 +2526,13 @@ class TreeViewComponent {
2516
2526
  this.renderer.addClass(this.element.nativeElement, getSizeClass('treeview', this.size));
2517
2527
  }
2518
2528
  }
2529
+ ngAfterViewInit() {
2530
+ if (this.searchbox) {
2531
+ this.renderer.setAttribute(this.searchbox.input.nativeElement, 'role', 'searchbox');
2532
+ this.renderer.setAttribute(this.searchbox.input.nativeElement, 'aria-controls', this.treeviewId);
2533
+ this.renderer.setAttribute(this.searchbox.input.nativeElement, 'aria-label', 'searchbar');
2534
+ }
2535
+ }
2519
2536
  /**
2520
2537
  * Blurs the focused TreeView item.
2521
2538
  */
@@ -2731,12 +2748,13 @@ class TreeViewComponent {
2731
2748
  }
2732
2749
  }
2733
2750
  TreeViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: ExpandStateService }, { token: NavigationService }, { token: NodeChildrenService }, { token: SelectionService }, { token: TreeViewLookupService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: DataChangeNotificationService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
2734
- TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TreeViewComponent, selector: "kendo-treeview", inputs: { filterInputPlaceholder: "filterInputPlaceholder", expandDisabledNodes: "expandDisabledNodes", animate: "animate", nodeTemplateRef: ["nodeTemplate", "nodeTemplateRef"], loadMoreButtonTemplateRef: ["loadMoreButtonTemplate", "loadMoreButtonTemplateRef"], trackBy: "trackBy", nodes: "nodes", textField: "textField", hasChildren: "hasChildren", isChecked: "isChecked", isDisabled: "isDisabled", isExpanded: "isExpanded", isSelected: "isSelected", isVisible: "isVisible", navigable: "navigable", children: "children", loadOnDemand: "loadOnDemand", filterable: "filterable", filter: "filter", size: "size", disableParentNodesOnly: "disableParentNodesOnly" }, outputs: { childrenLoaded: "childrenLoaded", onBlur: "blur", onFocus: "focus", expand: "expand", collapse: "collapse", nodeDragStart: "nodeDragStart", nodeDrag: "nodeDrag", filterStateChange: "filterStateChange", nodeDrop: "nodeDrop", nodeDragEnd: "nodeDragEnd", addItem: "addItem", removeItem: "removeItem", checkedChange: "checkedChange", selectionChange: "selectionChange", filterChange: "filterChange", nodeClick: "nodeClick", nodeDblClick: "nodeDblClick" }, host: { properties: { "class.k-treeview": "this.classNames", "attr.role": "this.role", "attr.dir": "this.direction", "@.disabled": "this.animate" } }, providers: providers, queries: [{ propertyName: "nodeTemplateQuery", first: true, predicate: NodeTemplateDirective, descendants: true }, { propertyName: "loadMoreButtonTemplateQuery", first: true, predicate: LoadMoreButtonTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "assetsContainer", first: true, predicate: ["assetsContainer"], descendants: true, read: ViewContainerRef, static: true }], exportAs: ["kendoTreeView"], usesOnChanges: true, ngImport: i0, template: `
2751
+ TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TreeViewComponent, selector: "kendo-treeview", inputs: { filterInputPlaceholder: "filterInputPlaceholder", expandDisabledNodes: "expandDisabledNodes", animate: "animate", nodeTemplateRef: ["nodeTemplate", "nodeTemplateRef"], loadMoreButtonTemplateRef: ["loadMoreButtonTemplate", "loadMoreButtonTemplateRef"], trackBy: "trackBy", nodes: "nodes", textField: "textField", hasChildren: "hasChildren", isChecked: "isChecked", isDisabled: "isDisabled", isExpanded: "isExpanded", isSelected: "isSelected", isVisible: "isVisible", navigable: "navigable", children: "children", loadOnDemand: "loadOnDemand", filterable: "filterable", filter: "filter", size: "size", disableParentNodesOnly: "disableParentNodesOnly" }, outputs: { childrenLoaded: "childrenLoaded", onBlur: "blur", onFocus: "focus", expand: "expand", collapse: "collapse", nodeDragStart: "nodeDragStart", nodeDrag: "nodeDrag", filterStateChange: "filterStateChange", nodeDrop: "nodeDrop", nodeDragEnd: "nodeDragEnd", addItem: "addItem", removeItem: "removeItem", checkedChange: "checkedChange", selectionChange: "selectionChange", filterChange: "filterChange", nodeClick: "nodeClick", nodeDblClick: "nodeDblClick" }, host: { properties: { "class.k-treeview": "this.classNames", "attr.dir": "this.direction", "@.disabled": "this.animate" } }, providers: providers, queries: [{ propertyName: "nodeTemplateQuery", first: true, predicate: NodeTemplateDirective, descendants: true }, { propertyName: "loadMoreButtonTemplateQuery", first: true, predicate: LoadMoreButtonTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "assetsContainer", first: true, predicate: ["assetsContainer"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "searchbox", first: true, predicate: ["searchbox"], descendants: true }], exportAs: ["kendoTreeView"], usesOnChanges: true, ngImport: i0, template: `
2735
2752
  <span
2736
2753
  class="k-treeview-filter"
2737
2754
  *ngIf="filterable"
2738
2755
  >
2739
2756
  <kendo-textbox
2757
+ #searchbox
2740
2758
  [size]="size"
2741
2759
  [value]="filter"
2742
2760
  [clearButton]="true"
@@ -2755,7 +2773,8 @@ TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
2755
2773
  </span>
2756
2774
  <ul class="k-treeview-lines"
2757
2775
  kendoTreeViewGroup
2758
- role="group"
2776
+ [attr.id]="treeviewId"
2777
+ role="tree"
2759
2778
  [size]="size"
2760
2779
  [loadOnDemand]="loadOnDemand"
2761
2780
  [checkboxes]="checkboxes"
@@ -2794,6 +2813,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2794
2813
  *ngIf="filterable"
2795
2814
  >
2796
2815
  <kendo-textbox
2816
+ #searchbox
2797
2817
  [size]="size"
2798
2818
  [value]="filter"
2799
2819
  [clearButton]="true"
@@ -2812,7 +2832,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2812
2832
  </span>
2813
2833
  <ul class="k-treeview-lines"
2814
2834
  kendoTreeViewGroup
2815
- role="group"
2835
+ [attr.id]="treeviewId"
2836
+ role="tree"
2816
2837
  [size]="size"
2817
2838
  [loadOnDemand]="loadOnDemand"
2818
2839
  [checkboxes]="checkboxes"
@@ -2842,15 +2863,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2842
2863
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: ExpandStateService }, { type: NavigationService }, { type: NodeChildrenService }, { type: SelectionService }, { type: TreeViewLookupService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: DataChangeNotificationService }, { type: i1.LocalizationService }]; }, propDecorators: { classNames: [{
2843
2864
  type: HostBinding,
2844
2865
  args: ["class.k-treeview"]
2845
- }], role: [{
2846
- type: HostBinding,
2847
- args: ["attr.role"]
2848
2866
  }], direction: [{
2849
2867
  type: HostBinding,
2850
2868
  args: ["attr.dir"]
2851
2869
  }], assetsContainer: [{
2852
2870
  type: ViewChild,
2853
2871
  args: ['assetsContainer', { read: ViewContainerRef, static: true }]
2872
+ }], searchbox: [{
2873
+ type: ViewChild,
2874
+ args: ['searchbox']
2854
2875
  }], filterInputPlaceholder: [{
2855
2876
  type: Input
2856
2877
  }], expandDisabledNodes: [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-treeview",
3
- "version": "12.0.2-develop.2",
3
+ "version": "12.0.2-develop.3",
4
4
  "description": "Kendo UI TreeView for Angular",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -23,15 +23,15 @@
23
23
  "@angular/core": "13 - 16",
24
24
  "@angular/platform-browser": "13 - 16",
25
25
  "@progress/kendo-licensing": "^1.0.2",
26
- "@progress/kendo-angular-common": "12.0.2-develop.2",
27
- "@progress/kendo-angular-inputs": "12.0.2-develop.2",
28
- "@progress/kendo-angular-icons": "12.0.2-develop.2",
29
- "@progress/kendo-angular-l10n": "12.0.2-develop.2",
26
+ "@progress/kendo-angular-common": "12.0.2-develop.3",
27
+ "@progress/kendo-angular-inputs": "12.0.2-develop.3",
28
+ "@progress/kendo-angular-icons": "12.0.2-develop.3",
29
+ "@progress/kendo-angular-l10n": "12.0.2-develop.3",
30
30
  "rxjs": "^6.5.3 || ^7.0.0"
31
31
  },
32
32
  "dependencies": {
33
33
  "tslib": "^2.3.1",
34
- "@progress/kendo-angular-schematics": "12.0.2-develop.2",
34
+ "@progress/kendo-angular-schematics": "12.0.2-develop.3",
35
35
  "@progress/kendo-common": "^0.2.0",
36
36
  "@progress/kendo-draggable": "^3.0.2"
37
37
  },
@@ -4,10 +4,10 @@ const schematics_1 = require("@angular-devkit/schematics");
4
4
  function default_1(options) {
5
5
  const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'TreeViewModule', package: 'treeview', peerDependencies: {
6
6
  // Peers of kendo-angular-inputs
7
- '@progress/kendo-angular-buttons': '12.0.2-develop.2',
8
- '@progress/kendo-angular-dialog': '12.0.2-develop.2',
9
- '@progress/kendo-angular-intl': '12.0.2-develop.2',
10
- '@progress/kendo-angular-popup': '12.0.2-develop.2',
7
+ '@progress/kendo-angular-buttons': '12.0.2-develop.3',
8
+ '@progress/kendo-angular-dialog': '12.0.2-develop.3',
9
+ '@progress/kendo-angular-intl': '12.0.2-develop.3',
10
+ '@progress/kendo-angular-popup': '12.0.2-develop.3',
11
11
  '@progress/kendo-drawing': '^1.9.3',
12
12
  // Peer dependency of icons
13
13
  '@progress/kendo-svg-icons': '^1.0.0'
@@ -37,7 +37,7 @@ export declare class TreeViewGroupComponent implements OnChanges, OnInit, OnDest
37
37
  */
38
38
  caretAltRightIcon: SVGIcon;
39
39
  kGroupClass: boolean;
40
- role: string;
40
+ get role(): string;
41
41
  checkboxes: boolean;
42
42
  expandIcons: boolean;
43
43
  disabled: boolean;
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2023 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 { ElementRef, EventEmitter, NgZone, OnChanges, OnDestroy, OnInit, Renderer2, ViewContainerRef, TrackByFunction, SimpleChanges, ChangeDetectorRef } from '@angular/core';
5
+ import { ElementRef, EventEmitter, NgZone, OnChanges, OnDestroy, OnInit, Renderer2, ViewContainerRef, TrackByFunction, SimpleChanges, ChangeDetectorRef, AfterViewInit } from '@angular/core';
6
6
  import { LocalizationService } from '@progress/kendo-angular-l10n';
7
7
  import { BehaviorSubject, Observable } from 'rxjs';
8
8
  import { CheckedState } from './checkbox/checked-state';
@@ -23,6 +23,7 @@ import { TreeItemDropEvent, TreeItemAddRemoveArgs, EditService, TreeItemDragEven
23
23
  import { FilterState } from './filter-state.interface';
24
24
  import { TreeViewSize } from './size';
25
25
  import { SVGIcon } from '@progress/kendo-svg-icons';
26
+ import { TextBoxComponent } from '@progress/kendo-angular-inputs';
26
27
  import * as i0 from "@angular/core";
27
28
  /**
28
29
  * Represents the [Kendo UI TreeView component for Angular]({% slug overview_treeview %}).
@@ -34,7 +35,7 @@ import * as i0 from "@angular/core";
34
35
  * {% embed_file shared/main.ts %}
35
36
  * {% endmeta %}
36
37
  */
37
- export declare class TreeViewComponent implements OnChanges, OnInit, OnDestroy, DataBoundComponent {
38
+ export declare class TreeViewComponent implements OnChanges, OnInit, AfterViewInit, OnDestroy, DataBoundComponent {
38
39
  element: ElementRef<HTMLElement>;
39
40
  changeDetectorRef: ChangeDetectorRef;
40
41
  protected expandService: ExpandStateService;
@@ -51,13 +52,16 @@ export declare class TreeViewComponent implements OnChanges, OnInit, OnDestroy,
51
52
  */
52
53
  searchIcon: SVGIcon;
53
54
  classNames: boolean;
54
- role: string;
55
55
  /** @hidden */
56
56
  get direction(): string;
57
57
  /**
58
58
  * @hidden
59
59
  */
60
60
  assetsContainer: ViewContainerRef;
61
+ /**
62
+ * @hidden
63
+ */
64
+ searchbox: TextBoxComponent;
61
65
  /**
62
66
  * The hint which is displayed when the component is empty.
63
67
  */
@@ -297,6 +301,10 @@ export declare class TreeViewComponent implements OnChanges, OnInit, OnDestroy,
297
301
  */
298
302
  set size(size: TreeViewSize);
299
303
  get size(): TreeViewSize;
304
+ /**
305
+ * @hidden
306
+ */
307
+ get treeviewId(): string;
300
308
  /**
301
309
  * Indicates whether only parent nodes should be disabled or their child nodes as well
302
310
  * @default false
@@ -326,10 +334,12 @@ export declare class TreeViewComponent implements OnChanges, OnInit, OnDestroy,
326
334
  private _size;
327
335
  private subscriptions;
328
336
  private domSubscriptions;
337
+ private _nextId;
329
338
  constructor(element: ElementRef<HTMLElement>, changeDetectorRef: ChangeDetectorRef, expandService: ExpandStateService, navigationService: NavigationService, nodeChildrenService: NodeChildrenService, selectionService: SelectionService, treeViewLookupService: TreeViewLookupService, ngZone: NgZone, renderer: Renderer2, dataChangeNotification: DataChangeNotificationService, localization: LocalizationService);
330
339
  ngOnChanges(changes: SimpleChanges): void;
331
340
  ngOnDestroy(): void;
332
341
  ngOnInit(): void;
342
+ ngAfterViewInit(): void;
333
343
  /**
334
344
  * Blurs the focused TreeView item.
335
345
  */