@progress/kendo-angular-treeview 6.0.0-dev.202112021059 → 6.0.1-dev.202202151121

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.
Files changed (50) hide show
  1. package/LICENSE.md +1 -1
  2. package/NOTICE.txt +119 -79
  3. package/README.md +1 -1
  4. package/dist/cdn/js/kendo-angular-treeview.js +18 -18
  5. package/dist/cdn/main.js +1 -1
  6. package/dist/es/checkbox/checkbox.component.js +17 -1
  7. package/dist/es/drag-and-drop/drag-and-drop-utils.js +3 -3
  8. package/dist/es/drag-and-drop/drag-and-drop.directive.js +2 -2
  9. package/dist/es/navigation/navigation.service.js +9 -6
  10. package/dist/es/package-metadata.js +1 -1
  11. package/dist/es/size.js +4 -0
  12. package/dist/es/treeview-group.component.js +7 -2
  13. package/dist/es/treeview-item-content.directive.js +2 -2
  14. package/dist/es/treeview-item.directive.js +6 -5
  15. package/dist/es/treeview.component.js +36 -4
  16. package/dist/es/utils.js +17 -5
  17. package/dist/es2015/checkbox/checkbox.component.d.ts +6 -0
  18. package/dist/es2015/checkbox/checkbox.component.js +13 -1
  19. package/dist/es2015/drag-and-drop/drag-and-drop-utils.js +3 -3
  20. package/dist/es2015/drag-and-drop/drag-and-drop.directive.js +2 -2
  21. package/dist/es2015/index.metadata.json +1 -1
  22. package/dist/es2015/navigation/navigation-state.interface.d.ts +1 -0
  23. package/dist/es2015/navigation/navigation.service.d.ts +2 -1
  24. package/dist/es2015/navigation/navigation.service.js +8 -6
  25. package/dist/es2015/package-metadata.js +1 -1
  26. package/dist/es2015/size.d.ts +14 -0
  27. package/dist/es2015/size.js +4 -0
  28. package/dist/es2015/treeview-group.component.d.ts +2 -0
  29. package/dist/es2015/treeview-group.component.js +49 -35
  30. package/dist/es2015/treeview-item-content.directive.js +2 -2
  31. package/dist/es2015/treeview-item.directive.js +5 -5
  32. package/dist/es2015/treeview.component.d.ts +13 -0
  33. package/dist/es2015/treeview.component.js +46 -13
  34. package/dist/es2015/utils.d.ts +7 -1
  35. package/dist/es2015/utils.js +17 -5
  36. package/dist/fesm2015/index.js +144 -72
  37. package/dist/fesm5/index.js +98 -30
  38. package/dist/npm/checkbox/checkbox.component.js +17 -1
  39. package/dist/npm/drag-and-drop/drag-and-drop-utils.js +3 -3
  40. package/dist/npm/drag-and-drop/drag-and-drop.directive.js +2 -2
  41. package/dist/npm/navigation/navigation.service.js +9 -6
  42. package/dist/npm/package-metadata.js +1 -1
  43. package/dist/npm/size.js +6 -0
  44. package/dist/npm/treeview-group.component.js +7 -2
  45. package/dist/npm/treeview-item-content.directive.js +2 -2
  46. package/dist/npm/treeview-item.directive.js +6 -5
  47. package/dist/npm/treeview.component.js +35 -3
  48. package/dist/npm/utils.js +17 -5
  49. package/dist/systemjs/kendo-angular-treeview.js +1 -1
  50. package/package.json +9 -8
@@ -22,7 +22,7 @@ var packageMetadata = {
22
22
  name: '@progress/kendo-angular-treeview',
23
23
  productName: 'Kendo UI for Angular',
24
24
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
25
- publishDate: 1638442548,
25
+ publishDate: 1644923991,
26
26
  version: '',
27
27
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
28
28
  };
@@ -222,7 +222,7 @@ var isFocusable = function (element) {
222
222
  * @hidden
223
223
  */
224
224
  var isContent = function (element) {
225
- var scopeSelector = '.k-in:not(.k-treeview-load-more-button),.k-treeview-item,.k-treeview';
225
+ var scopeSelector = '.k-treeview-leaf:not(.k-treeview-load-more-button),.k-treeview-item,.k-treeview';
226
226
  if (!isDocumentAvailable()) {
227
227
  return null;
228
228
  }
@@ -231,20 +231,20 @@ var isContent = function (element) {
231
231
  node = node.parentNode;
232
232
  }
233
233
  if (node) {
234
- return match(node, '.k-in:not(.k-treeview-load-more-button)');
234
+ return match(node, '.k-treeview-leaf:not(.k-treeview-load-more-button)');
235
235
  }
236
236
  };
237
237
  /**
238
238
  * @hidden
239
239
  *
240
- * Returns the nested .k-in:not(.k-treeview-load-more-button) element.
240
+ * Returns the nested .k-treeview-leaf:not(.k-treeview-load-more-button) element.
241
241
  * If the passed parent item is itself a content node, it is returned.
242
242
  */
243
243
  var getContentElement = function (parent) {
244
244
  if (!isPresent(parent)) {
245
245
  return null;
246
246
  }
247
- var selector = '.k-in:not(.k-treeview-load-more-button)';
247
+ var selector = '.k-treeview-leaf:not(.k-treeview-load-more-button)';
248
248
  if (match(parent, selector)) {
249
249
  return parent;
250
250
  }
@@ -254,7 +254,7 @@ var getContentElement = function (parent) {
254
254
  * @hidden
255
255
  */
256
256
  var isLoadMoreButton = function (element) {
257
- return isPresent(closestWithMatch(element, '.k-in.k-treeview-load-more-button'));
257
+ return isPresent(closestWithMatch(element, '.k-treeview-leaf.k-treeview-load-more-button'));
258
258
  };
259
259
  /**
260
260
  * @hidden
@@ -417,6 +417,18 @@ var sameValues = function (as, bs) {
417
417
  }
418
418
  return Array.from(as).every(function (v) { return bs.has(v); });
419
419
  };
420
+ /**
421
+ * @hidden
422
+ * Returns the size class based on the component and size input.
423
+ */
424
+ var getSizeClass = function (component, size) {
425
+ var SIZE_CLASSES = {
426
+ 'small': "k-" + component + "-sm",
427
+ 'medium': "k-" + component + "-md",
428
+ 'large': "k-" + component + "-lg"
429
+ };
430
+ return SIZE_CLASSES[size];
431
+ };
420
432
 
421
433
  var safe = function (node) { return (node || {}); };
422
434
  var safeChildren = function (node) { return (safe(node).children || []); };
@@ -585,8 +597,8 @@ var NavigationService = /** @class */ (function () {
585
597
  this.loadMore = new Subject();
586
598
  this.navigable = true;
587
599
  this.actions = (_a = {},
588
- _a[Keys.ArrowUp] = function () { return _this.activate(_this.model.findVisiblePrev(_this.focusableItem)); },
589
- _a[Keys.ArrowDown] = function () { return _this.activate(_this.model.findVisibleNext(_this.focusableItem)); },
600
+ _a[Keys.ArrowUp] = function () { return _this.activate(_this.model.findVisiblePrev(_this.focusableItem), true); },
601
+ _a[Keys.ArrowDown] = function () { return _this.activate(_this.model.findVisibleNext(_this.focusableItem), true); },
590
602
  _a[Keys.ArrowLeft] = function () { return !_this.isLoadMoreButton && (_this.expand({
591
603
  expand: _this.localization.rtl,
592
604
  intercept: _this.localization.rtl ? _this.moveToFirstVisibleChild : _this.moveToParent
@@ -595,12 +607,13 @@ var NavigationService = /** @class */ (function () {
595
607
  expand: !_this.localization.rtl,
596
608
  intercept: _this.localization.rtl ? _this.moveToParent : _this.moveToFirstVisibleChild
597
609
  })); },
598
- _a[Keys.Home] = function () { return _this.activate(_this.model.firstVisibleNode()); },
599
- _a[Keys.End] = function () { return _this.activate(_this.model.lastVisibleNode()); },
610
+ _a[Keys.Home] = function () { return _this.activate(_this.model.firstVisibleNode(), true); },
611
+ _a[Keys.End] = function () { return _this.activate(_this.model.lastVisibleNode(), true); },
600
612
  _a[Keys.Enter] = function () { return _this.handleEnter(); },
601
613
  _a[Keys.Space] = function () { return _this.handleSpace(); },
602
614
  _a);
603
615
  this.isFocused = false;
616
+ this.shouldScroll = false;
604
617
  this._model = new NavigationModel();
605
618
  this.moveToFirstVisibleChild = this.moveToFirstVisibleChild.bind(this);
606
619
  this.moveToParent = this.moveToParent.bind(this);
@@ -643,12 +656,14 @@ var NavigationService = /** @class */ (function () {
643
656
  enumerable: true,
644
657
  configurable: true
645
658
  });
646
- NavigationService.prototype.activate = function (item) {
659
+ NavigationService.prototype.activate = function (item, shouldScroll) {
660
+ if (shouldScroll === void 0) { shouldScroll = false; }
647
661
  if (!this.navigable || !item || this.isActive(nodeIndex(item))) {
648
662
  return;
649
663
  }
650
664
  this.isFocused = true;
651
665
  this.activeItem = item || this.activeItem;
666
+ this.shouldScroll = shouldScroll;
652
667
  this.notifyMove();
653
668
  };
654
669
  NavigationService.prototype.activateParent = function (index) {
@@ -768,7 +783,7 @@ var NavigationService = /** @class */ (function () {
768
783
  };
769
784
  NavigationService.prototype.navigationState = function (expand) {
770
785
  if (expand === void 0) { expand = false; }
771
- return ({ expand: expand, index: this.activeIndex, isFocused: this.isFocused });
786
+ return ({ expand: expand, index: this.activeIndex, isFocused: this.isFocused, shouldScroll: this.shouldScroll });
772
787
  };
773
788
  NavigationService.prototype.handleEnter = function () {
774
789
  if (!this.navigable) {
@@ -1257,6 +1272,7 @@ var TreeViewComponent = /** @class */ (function () {
1257
1272
  this.isActive = false;
1258
1273
  this.data = new BehaviorSubject([]);
1259
1274
  this._animate = true;
1275
+ this._size = 'medium';
1260
1276
  this.subscriptions = new Subscription();
1261
1277
  this.domSubscriptions = [];
1262
1278
  validatePackage(packageMetadata);
@@ -1388,6 +1404,30 @@ var TreeViewComponent = /** @class */ (function () {
1388
1404
  enumerable: true,
1389
1405
  configurable: true
1390
1406
  });
1407
+ Object.defineProperty(TreeViewComponent.prototype, "size", {
1408
+ get: function () {
1409
+ return this._size;
1410
+ },
1411
+ /**
1412
+ * Sets the size of the component.
1413
+ *
1414
+ * The possible values are:
1415
+ * * `'small'`
1416
+ * * `'medium'` (default)
1417
+ * * `'large'`
1418
+ * * `null`
1419
+ *
1420
+ */
1421
+ set: function (size) {
1422
+ this.renderer.removeClass(this.element.nativeElement, getSizeClass('treeview', this.size));
1423
+ if (size) {
1424
+ this.renderer.addClass(this.element.nativeElement, getSizeClass('treeview', size));
1425
+ }
1426
+ this._size = size;
1427
+ },
1428
+ enumerable: true,
1429
+ configurable: true
1430
+ });
1391
1431
  TreeViewComponent.prototype.ngOnChanges = function (changes) {
1392
1432
  this.navigationService.navigable = Boolean(this.navigable);
1393
1433
  // TODO: should react to changes.loadOnDemand as well - should preload the data or clear the already cached items
@@ -1428,6 +1468,9 @@ var TreeViewComponent = /** @class */ (function () {
1428
1468
  _this.attachDomHandlers();
1429
1469
  });
1430
1470
  }
1471
+ if (this.size) {
1472
+ this.renderer.addClass(this.element.nativeElement, getSizeClass('treeview', this.size));
1473
+ }
1431
1474
  };
1432
1475
  /**
1433
1476
  * Blurs the focused TreeView item.
@@ -1587,7 +1630,7 @@ var TreeViewComponent = /** @class */ (function () {
1587
1630
  return;
1588
1631
  }
1589
1632
  var index = nodeId(closestNode(target));
1590
- // the disabled check is probably not needed due to the k-state-disabled styles
1633
+ // the disabled check is probably not needed due to the k-disabled styles
1591
1634
  if (!index || this.navigationService.isDisabled(index)) {
1592
1635
  return;
1593
1636
  }
@@ -1649,7 +1692,6 @@ var TreeViewComponent = /** @class */ (function () {
1649
1692
  });
1650
1693
  };
1651
1694
  __decorate([
1652
- HostBinding("class.k-widget"),
1653
1695
  HostBinding("class.k-treeview"),
1654
1696
  __metadata("design:type", Boolean)
1655
1697
  ], TreeViewComponent.prototype, "classNames", void 0);
@@ -1823,13 +1865,18 @@ var TreeViewComponent = /** @class */ (function () {
1823
1865
  Input(),
1824
1866
  __metadata("design:type", String)
1825
1867
  ], TreeViewComponent.prototype, "filter", void 0);
1868
+ __decorate([
1869
+ Input(),
1870
+ __metadata("design:type", String),
1871
+ __metadata("design:paramtypes", [String])
1872
+ ], TreeViewComponent.prototype, "size", null);
1826
1873
  TreeViewComponent = __decorate([
1827
1874
  Component({
1828
1875
  changeDetection: ChangeDetectionStrategy.Default,
1829
1876
  exportAs: 'kendoTreeView',
1830
1877
  providers: providers,
1831
1878
  selector: 'kendo-treeview',
1832
- template: "\n <kendo-textbox\n #filterInput\n *ngIf=\"filterable\"\n [value]=\"filter\"\n [clearButton]=\"true\"\n (valueChange)=\"filterChange.emit($event)\"\n [placeholder]=\"filterInputPlaceholder\"\n >\n <ng-template kendoTextBoxPrefixTemplate>\n <span class=\"k-icon k-i-search\"></span>\n </ng-template>\n </kendo-textbox>\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [loadOnDemand]=\"loadOnDemand\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [selectable]=\"selectable\"\n [touchActions]=\"touchActions\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isDisabled]=\"isDisabled\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [isVisible]=\"isVisible\"\n [nodeTemplateRef]=\"nodeTemplateRef?.templateRef\"\n [loadMoreButtonTemplateRef]=\"loadMoreButtonTemplateRef?.templateRef\"\n [textField]=\"textField\"\n [nodes]=\"fetchNodes\"\n [loadMoreService]=\"loadMoreService\"\n [trackBy]=\"trackBy\"\n >\n </ul>\n <ng-container #assetsContainer></ng-container>\n "
1879
+ template: "\n <span\n class=\"k-treeview-filter\"\n *ngIf=\"filterable\"\n >\n <kendo-textbox\n [size]=\"size\"\n [value]=\"filter\"\n [clearButton]=\"true\"\n (valueChange)=\"filterChange.emit($event)\"\n [placeholder]=\"filterInputPlaceholder\"\n >\n <ng-template kendoTextBoxPrefixTemplate>\n <span class=\"k-input-icon k-icon k-i-search\"></span>\n </ng-template>\n </kendo-textbox>\n </span>\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [size]=\"size\"\n [loadOnDemand]=\"loadOnDemand\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [selectable]=\"selectable\"\n [touchActions]=\"touchActions\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isDisabled]=\"isDisabled\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [isVisible]=\"isVisible\"\n [nodeTemplateRef]=\"nodeTemplateRef?.templateRef\"\n [loadMoreButtonTemplateRef]=\"loadMoreButtonTemplateRef?.templateRef\"\n [textField]=\"textField\"\n [nodes]=\"fetchNodes\"\n [loadMoreService]=\"loadMoreService\"\n [trackBy]=\"trackBy\"\n >\n </ul>\n <ng-container #assetsContainer></ng-container>\n "
1833
1880
  }),
1834
1881
  __metadata("design:paramtypes", [ElementRef,
1835
1882
  ChangeDetectorRef,
@@ -1863,6 +1910,7 @@ var TreeViewGroupComponent = /** @class */ (function () {
1863
1910
  this.role = 'group';
1864
1911
  this.loadOnDemand = true;
1865
1912
  this.textField = "";
1913
+ this.size = 'medium';
1866
1914
  this.initialNodesLoaded = false;
1867
1915
  this.loadingMoreNodes = false;
1868
1916
  this._data = [];
@@ -2096,7 +2144,7 @@ var TreeViewGroupComponent = /** @class */ (function () {
2096
2144
  this.emitChildrenLoaded(mappedChildren);
2097
2145
  };
2098
2146
  __decorate([
2099
- HostBinding("class.k-group"),
2147
+ HostBinding("class.k-treeview-group"),
2100
2148
  __metadata("design:type", Boolean)
2101
2149
  ], TreeViewGroupComponent.prototype, "kGroupClass", void 0);
2102
2150
  __decorate([
@@ -2159,6 +2207,10 @@ var TreeViewGroupComponent = /** @class */ (function () {
2159
2207
  Input(),
2160
2208
  __metadata("design:type", Object)
2161
2209
  ], TreeViewGroupComponent.prototype, "loadMoreService", void 0);
2210
+ __decorate([
2211
+ Input(),
2212
+ __metadata("design:type", String)
2213
+ ], TreeViewGroupComponent.prototype, "size", void 0);
2162
2214
  __decorate([
2163
2215
  Input(),
2164
2216
  __metadata("design:type", Function)
@@ -2202,7 +2254,7 @@ var TreeViewGroupComponent = /** @class */ (function () {
2202
2254
  ])
2203
2255
  ],
2204
2256
  selector: '[kendoTreeViewGroup]',
2205
- template: "\n <li\n *ngFor=\"let node of data; let index = index; trackBy: trackBy\"\n class=\"k-item k-treeview-item\"\n [class.k-display-none]=\"!isVisible(node, nodeIndex(index))\"\n kendoTreeViewItem\n [attr.aria-setsize]=\"totalNodesCount\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [parentDataItem]=\"parentDataItem\"\n [parentIndex]=\"parentIndex\"\n [loadOnDemand]=\"loadOnDemand\"\n [checkable]=\"checkboxes\"\n [isChecked]=\"isChecked(node, nodeIndex(index))\"\n [isDisabled]=\"disabled || isDisabled(node, nodeIndex(index))\"\n [isVisible]=\"isVisible(node, nodeIndex(index))\"\n [expandable]=\"expandIcons && hasChildren(node)\"\n [isExpanded]=\"isExpanded(node, nodeIndex(index))\"\n [selectable]=\"selectable\"\n [isSelected]=\"isSelected(node, nodeIndex(index))\"\n [attr.data-treeindex]=\"nodeIndex(index)\"\n >\n <div class=\"k-mid\">\n <span\n class=\"k-icon\"\n [class.k-i-collapse]=\"isExpanded(node, nodeIndex(index))\"\n [class.k-i-expand]=\"!isExpanded(node, nodeIndex(index))\"\n [kendoTreeViewLoading]=\"nodeIndex(index)\"\n (click)=\"expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"expandIcons && hasChildren(node)\"\n >\n </span>\n <kendo-checkbox\n *ngIf=\"checkboxes\"\n [node]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isChecked]=\"isChecked\"\n (checkStateChange)=\"checkNode(nodeIndex(index))\"\n tabindex=\"-1\"\n ></kendo-checkbox>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [initialSelection]=\"isSelected(node, nodeIndex(index))\"\n [isSelected]=\"isSelected\"\n class=\"k-in\"\n [style.touch-action]=\"touchActions ? '' : 'none'\"\n >\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\"\n [ngTemplateOutletContext]=\"{\n $implicit: node,\n index: nodeIndex(index)\n }\"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf=\"isExpanded(node, nodeIndex(index)) && hasChildren(node)\"\n kendoTreeViewGroup\n role=\"group\"\n [nodes]=\"fetchChildren\"\n [loadOnDemand]=\"loadOnDemand\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [selectable]=\"selectable\"\n [touchActions]=\"touchActions\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isDisabled]=\"isDisabled\"\n [disabled]=\"disabled || isDisabled(node, nodeIndex(index))\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [isVisible]=\"isVisible\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [loadMoreButtonTemplateRef]=\"loadMoreButtonTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [parentDataItem]=\"node\"\n [textField]=\"nextFields\"\n [loadMoreService]=\"loadMoreService\"\n [@toggle]=\"true\"\n [trackBy]=\"trackBy\"\n >\n </ul>\n </li>\n <li\n *ngIf=\"initialNodesLoaded && moreNodesAvailable\"\n class=\"k-item k-treeview-item\"\n [class.k-treeview-load-more-checkboxes-container]=\"checkboxes\"\n kendoTreeViewItem\n role=\"button\"\n [selectable]=\"false\"\n [checkable]=\"false\"\n [expandable]=\"false\"\n [index]=\"loadMoreButtonIndex\"\n [parentDataItem]=\"parentDataItem\"\n [parentIndex]=\"parentIndex\"\n [attr.data-treeindex]=\"loadMoreButtonIndex\"\n >\n <div class=\"k-mid\">\n <span\n *ngIf=\"loadingMoreNodes\"\n class=\"k-icon k-i-loading k-i-expand\"\n >\n </span>\n <span\n class=\"k-in k-treeview-load-more-button\"\n [attr.data-treeindex]=\"loadMoreButtonIndex\"\n kendoTreeViewItemContent\n [index]=\"loadMoreButtonIndex\"\n >\n <ng-template\n *ngIf=\"loadMoreButtonTemplateRef\"\n [ngTemplateOutlet]=\"loadMoreButtonTemplateRef\"\n [ngTemplateOutletContext]=\"{\n index: loadMoreButtonIndex\n }\"\n >\n </ng-template>\n <ng-container *ngIf=\"!loadMoreButtonTemplateRef\">\n Load more\n </ng-container>\n </span>\n </div>\n </li>\n "
2257
+ template: "\n <li\n *ngFor=\"let node of data; let index = index; trackBy: trackBy\"\n class=\"k-treeview-item\"\n [class.k-display-none]=\"!isVisible(node, nodeIndex(index))\"\n kendoTreeViewItem\n [attr.aria-setsize]=\"totalNodesCount\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [parentDataItem]=\"parentDataItem\"\n [parentIndex]=\"parentIndex\"\n [loadOnDemand]=\"loadOnDemand\"\n [checkable]=\"checkboxes\"\n [isChecked]=\"isChecked(node, nodeIndex(index))\"\n [isDisabled]=\"disabled || isDisabled(node, nodeIndex(index))\"\n [isVisible]=\"isVisible(node, nodeIndex(index))\"\n [expandable]=\"expandIcons && hasChildren(node)\"\n [isExpanded]=\"isExpanded(node, nodeIndex(index))\"\n [selectable]=\"selectable\"\n [isSelected]=\"isSelected(node, nodeIndex(index))\"\n [attr.data-treeindex]=\"nodeIndex(index)\"\n >\n <div class=\"k-treeview-mid\">\n <span\n class=\"k-treeview-toggle\"\n [kendoTreeViewLoading]=\"nodeIndex(index)\"\n (click)=\"expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"expandIcons && hasChildren(node)\"\n >\n <span\n class=\"k-icon\"\n [class.k-i-collapse]=\"isExpanded(node, nodeIndex(index))\"\n [class.k-i-expand]=\"!isExpanded(node, nodeIndex(index))\"\n >\n </span>\n </span>\n <kendo-checkbox\n *ngIf=\"checkboxes\"\n [size]=\"size\"\n [node]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isChecked]=\"isChecked\"\n (checkStateChange)=\"checkNode(nodeIndex(index))\"\n tabindex=\"-1\"\n ></kendo-checkbox>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [initialSelection]=\"isSelected(node, nodeIndex(index))\"\n [isSelected]=\"isSelected\"\n class=\"k-treeview-leaf\"\n [style.touch-action]=\"touchActions ? '' : 'none'\"\n >\n <span class=\"k-treeview-leaf-text\">\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\"\n [ngTemplateOutletContext]=\"{\n $implicit: node,\n index: nodeIndex(index)\n }\"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </span>\n </div>\n <ul\n *ngIf=\"isExpanded(node, nodeIndex(index)) && hasChildren(node)\"\n kendoTreeViewGroup\n role=\"group\"\n [nodes]=\"fetchChildren\"\n [loadOnDemand]=\"loadOnDemand\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [selectable]=\"selectable\"\n [touchActions]=\"touchActions\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isDisabled]=\"isDisabled\"\n [disabled]=\"disabled || isDisabled(node, nodeIndex(index))\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [isVisible]=\"isVisible\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [loadMoreButtonTemplateRef]=\"loadMoreButtonTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [parentDataItem]=\"node\"\n [textField]=\"nextFields\"\n [loadMoreService]=\"loadMoreService\"\n [@toggle]=\"true\"\n [trackBy]=\"trackBy\"\n >\n </ul>\n </li>\n <li\n *ngIf=\"initialNodesLoaded && moreNodesAvailable\"\n class=\"k-treeview-item\"\n [class.k-treeview-load-more-checkboxes-container]=\"checkboxes\"\n kendoTreeViewItem\n role=\"button\"\n [selectable]=\"false\"\n [checkable]=\"false\"\n [expandable]=\"false\"\n [index]=\"loadMoreButtonIndex\"\n [parentDataItem]=\"parentDataItem\"\n [parentIndex]=\"parentIndex\"\n [attr.data-treeindex]=\"loadMoreButtonIndex\"\n >\n <div class=\"k-treeview-mid\">\n <span\n *ngIf=\"loadingMoreNodes\"\n class=\"k-icon k-i-loading k-i-expand\"\n >\n </span>\n <span\n class=\"k-treeview-leaf k-treeview-load-more-button\"\n [attr.data-treeindex]=\"loadMoreButtonIndex\"\n kendoTreeViewItemContent\n [index]=\"loadMoreButtonIndex\"\n >\n <span class=\"k-treeview-leaf-text\">\n <ng-template\n *ngIf=\"loadMoreButtonTemplateRef\"\n [ngTemplateOutlet]=\"loadMoreButtonTemplateRef\"\n [ngTemplateOutletContext]=\"{\n index: loadMoreButtonIndex\n }\"\n >\n </ng-template>\n <ng-container *ngIf=\"!loadMoreButtonTemplateRef\">\n Load more\n </ng-container>\n </span>\n </span>\n </div>\n </li>\n "
2206
2258
  }),
2207
2259
  __metadata("design:paramtypes", [ExpandStateService,
2208
2260
  LoadingNotificationService,
@@ -3103,12 +3155,12 @@ var getDropPosition = function (draggedItem, target, clientY, targetTreeView, co
3103
3155
  if (!(isPresent(draggedItem) && isPresent(target) && isPresent(targetTreeView) && isPresent(containerOffset))) {
3104
3156
  return;
3105
3157
  }
3106
- // the .k-mid element starts just after the checkbox/expand arrow and stretches till the end of the treeview on the right
3107
- var item = closestWithMatch(target, '.k-mid');
3158
+ // the .k-treeview-mid element starts just after the checkbox/expand arrow and stretches till the end of the treeview on the right
3159
+ var item = closestWithMatch(target, '.k-treeview-mid');
3108
3160
  if (!isPresent(item)) {
3109
3161
  return;
3110
3162
  }
3111
- // the content element (.k-in:not(.k-treeview-load-more-button)) holds just the treeview item text
3163
+ // the content element (.k-treeview-leaf:not(.k-treeview-load-more-button)) holds just the treeview item text
3112
3164
  var content = getContentElement(item);
3113
3165
  var targetChildOfDraggedItem = hasParent(item, closestNode(draggedItem));
3114
3166
  if (!isPresent(content) || (content === draggedItem) || targetChildOfDraggedItem) {
@@ -3825,7 +3877,7 @@ var DragAndDropDirective = /** @class */ (function () {
3825
3877
  return;
3826
3878
  }
3827
3879
  // store the drag target on press, show it only when it's actually dragged
3828
- this.draggedItem = closestWithMatch(originalEvent.target, '.k-in');
3880
+ this.draggedItem = closestWithMatch(originalEvent.target, '.k-treeview-leaf');
3829
3881
  // record the current pointer down coords - copared to the `startDragAfter` value to calculate whether to initiate dragging
3830
3882
  this.pendingDragStartEvent = originalEvent;
3831
3883
  };
@@ -3847,7 +3899,7 @@ var DragAndDropDirective = /** @class */ (function () {
3847
3899
  }
3848
3900
  var targetTreeView = this.getTargetTreeView(dropTarget);
3849
3901
  var dropPosition = getDropPosition(this.draggedItem, dropTarget, clientY, targetTreeView, this.containerOffset);
3850
- var dropHintAnchor = closestWithMatch(dropTarget, '.k-mid');
3902
+ var dropHintAnchor = closestWithMatch(dropTarget, '.k-treeview-mid');
3851
3903
  var dropAction = getDropAction(dropPosition, dropTarget);
3852
3904
  var sourceItem = treeItemFromEventTarget(this.treeview, this.draggedItem);
3853
3905
  var destinationItem = treeItemFromEventTarget(targetTreeView, dropTarget);
@@ -4748,9 +4800,9 @@ var TreeViewItemDirective = /** @class */ (function () {
4748
4800
  var _this = this;
4749
4801
  this.subscriptions = [
4750
4802
  this.navigationService.moves
4751
- .subscribe(function () {
4803
+ .subscribe(function (navState) {
4752
4804
  _this.updateTabIndex();
4753
- _this.focusItem();
4805
+ _this.focusItem(navState.shouldScroll);
4754
4806
  }),
4755
4807
  this.navigationService.expands
4756
4808
  .pipe(filter(function (_a) {
@@ -4785,9 +4837,10 @@ var TreeViewItemDirective = /** @class */ (function () {
4785
4837
  TreeViewItemDirective.prototype.isFocusable = function () {
4786
4838
  return !this.isDisabled && this.navigationService.isFocusable(this.index);
4787
4839
  };
4788
- TreeViewItemDirective.prototype.focusItem = function () {
4840
+ TreeViewItemDirective.prototype.focusItem = function (scrollIntoView) {
4841
+ if (scrollIntoView === void 0) { scrollIntoView = false; }
4789
4842
  if (this.isInitialized && this.navigationService.isActive(this.index)) {
4790
- this.element.nativeElement.focus();
4843
+ this.element.nativeElement.focus({ preventScroll: !scrollIntoView });
4791
4844
  }
4792
4845
  };
4793
4846
  TreeViewItemDirective.prototype.moveLookupItem = function (changes) {
@@ -4827,7 +4880,7 @@ var TreeViewItemDirective = /** @class */ (function () {
4827
4880
  this.setAttribute('aria-checked', this.checkable ? this.ariaChecked : null);
4828
4881
  };
4829
4882
  TreeViewItemDirective.prototype.setDisabledClass = function () {
4830
- this.setClass('k-state-disabled', this.isDisabled);
4883
+ this.setClass('k-disabled', this.isDisabled);
4831
4884
  };
4832
4885
  TreeViewItemDirective.prototype.setClass = function (className, toggle) {
4833
4886
  var action = toggle ? 'addClass' : 'removeClass';
@@ -4954,10 +5007,10 @@ var TreeViewItemContentDirective = /** @class */ (function () {
4954
5007
  this.subscriptions.unsubscribe();
4955
5008
  };
4956
5009
  TreeViewItemContentDirective.prototype.updateFocusClass = function () {
4957
- this.render(this.navigationService.isActive(this.index), 'k-state-focused');
5010
+ this.render(this.navigationService.isActive(this.index), 'k-focus');
4958
5011
  };
4959
5012
  TreeViewItemContentDirective.prototype.updateSelectionClass = function (selected) {
4960
- this.render(selected, 'k-state-selected');
5013
+ this.render(selected, 'k-selected');
4961
5014
  };
4962
5015
  TreeViewItemContentDirective.prototype.render = function (addClass, className) {
4963
5016
  var action = addClass ? 'addClass' : 'removeClass';
@@ -5008,6 +5061,10 @@ var CheckBoxComponent = /** @class */ (function () {
5008
5061
  * Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
5009
5062
  */
5010
5063
  this.tabindex = 0;
5064
+ /**
5065
+ * Specifies the size of the component.
5066
+ */
5067
+ this.size = 'medium';
5011
5068
  /**
5012
5069
  * Fires when the user changes the check state of the component.
5013
5070
  */
@@ -5035,6 +5092,13 @@ var CheckBoxComponent = /** @class */ (function () {
5035
5092
  enumerable: true,
5036
5093
  configurable: true
5037
5094
  });
5095
+ Object.defineProperty(CheckBoxComponent.prototype, "checkBoxClasses", {
5096
+ get: function () {
5097
+ return "k-checkbox " + (this.size ? getSizeClass('checkbox', this.size) : '') + " k-rounded-md";
5098
+ },
5099
+ enumerable: true,
5100
+ configurable: true
5101
+ });
5038
5102
  CheckBoxComponent.prototype.ngOnInit = function () {
5039
5103
  this.renderer.removeAttribute(this.element.nativeElement, "tabindex");
5040
5104
  };
@@ -5077,6 +5141,10 @@ var CheckBoxComponent = /** @class */ (function () {
5077
5141
  Input(),
5078
5142
  __metadata("design:type", Number)
5079
5143
  ], CheckBoxComponent.prototype, "tabindex", void 0);
5144
+ __decorate([
5145
+ Input(),
5146
+ __metadata("design:type", String)
5147
+ ], CheckBoxComponent.prototype, "size", void 0);
5080
5148
  __decorate([
5081
5149
  Output(),
5082
5150
  __metadata("design:type", EventEmitter)
@@ -5084,7 +5152,7 @@ var CheckBoxComponent = /** @class */ (function () {
5084
5152
  CheckBoxComponent = __decorate([
5085
5153
  Component({
5086
5154
  selector: 'kendo-checkbox',
5087
- template: "\n <input\n class=\"k-checkbox\"\n type=\"checkbox\"\n [id]=\"id\"\n [checked]=\"checked\"\n [indeterminate]=\"indeterminate\"\n [tabindex]=\"tabindex\"\n (change)=\"handleChange($event)\"\n />\n <label\n class=\"k-checkbox-label\"\n tabindex=\"-1\"\n [for]=\"id\"\n >{{labelText}}</label>\n "
5155
+ template: "\n <input\n type=\"checkbox\"\n [class]=\"checkBoxClasses\"\n [id]=\"id\"\n [checked]=\"checked\"\n [indeterminate]=\"indeterminate\"\n [tabindex]=\"tabindex\"\n (change)=\"handleChange($event)\"\n />\n <label\n class=\"k-checkbox-label\"\n tabindex=\"-1\"\n [for]=\"id\"\n >{{labelText}}</label>\n "
5088
5156
  }),
5089
5157
  __metadata("design:paramtypes", [ElementRef,
5090
5158
  Renderer2,
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  var tslib_1 = require("tslib");
8
8
  var core_1 = require("@angular/core");
9
9
  var kendo_angular_common_1 = require("@progress/kendo-angular-common");
10
+ var utils_1 = require("../utils");
10
11
  /**
11
12
  * @hidden
12
13
  *
@@ -26,6 +27,10 @@ var CheckBoxComponent = /** @class */ (function () {
26
27
  * Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
27
28
  */
28
29
  this.tabindex = 0;
30
+ /**
31
+ * Specifies the size of the component.
32
+ */
33
+ this.size = 'medium';
29
34
  /**
30
35
  * Fires when the user changes the check state of the component.
31
36
  */
@@ -53,6 +58,13 @@ var CheckBoxComponent = /** @class */ (function () {
53
58
  enumerable: true,
54
59
  configurable: true
55
60
  });
61
+ Object.defineProperty(CheckBoxComponent.prototype, "checkBoxClasses", {
62
+ get: function () {
63
+ return "k-checkbox " + (this.size ? utils_1.getSizeClass('checkbox', this.size) : '') + " k-rounded-md";
64
+ },
65
+ enumerable: true,
66
+ configurable: true
67
+ });
56
68
  CheckBoxComponent.prototype.ngOnInit = function () {
57
69
  this.renderer.removeAttribute(this.element.nativeElement, "tabindex");
58
70
  };
@@ -95,6 +107,10 @@ var CheckBoxComponent = /** @class */ (function () {
95
107
  core_1.Input(),
96
108
  tslib_1.__metadata("design:type", Number)
97
109
  ], CheckBoxComponent.prototype, "tabindex", void 0);
110
+ tslib_1.__decorate([
111
+ core_1.Input(),
112
+ tslib_1.__metadata("design:type", String)
113
+ ], CheckBoxComponent.prototype, "size", void 0);
98
114
  tslib_1.__decorate([
99
115
  core_1.Output(),
100
116
  tslib_1.__metadata("design:type", core_1.EventEmitter)
@@ -102,7 +118,7 @@ var CheckBoxComponent = /** @class */ (function () {
102
118
  CheckBoxComponent = tslib_1.__decorate([
103
119
  core_1.Component({
104
120
  selector: 'kendo-checkbox',
105
- template: "\n <input\n class=\"k-checkbox\"\n type=\"checkbox\"\n [id]=\"id\"\n [checked]=\"checked\"\n [indeterminate]=\"indeterminate\"\n [tabindex]=\"tabindex\"\n (change)=\"handleChange($event)\"\n />\n <label\n class=\"k-checkbox-label\"\n tabindex=\"-1\"\n [for]=\"id\"\n >{{labelText}}</label>\n "
121
+ template: "\n <input\n type=\"checkbox\"\n [class]=\"checkBoxClasses\"\n [id]=\"id\"\n [checked]=\"checked\"\n [indeterminate]=\"indeterminate\"\n [tabindex]=\"tabindex\"\n (change)=\"handleChange($event)\"\n />\n <label\n class=\"k-checkbox-label\"\n tabindex=\"-1\"\n [for]=\"id\"\n >{{labelText}}</label>\n "
106
122
  }),
107
123
  tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
108
124
  core_1.Renderer2,
@@ -99,12 +99,12 @@ exports.getDropPosition = function (draggedItem, target, clientY, targetTreeView
99
99
  if (!(utils_1.isPresent(draggedItem) && utils_1.isPresent(target) && utils_1.isPresent(targetTreeView) && utils_1.isPresent(containerOffset))) {
100
100
  return;
101
101
  }
102
- // the .k-mid element starts just after the checkbox/expand arrow and stretches till the end of the treeview on the right
103
- var item = utils_1.closestWithMatch(target, '.k-mid');
102
+ // the .k-treeview-mid element starts just after the checkbox/expand arrow and stretches till the end of the treeview on the right
103
+ var item = utils_1.closestWithMatch(target, '.k-treeview-mid');
104
104
  if (!utils_1.isPresent(item)) {
105
105
  return;
106
106
  }
107
- // the content element (.k-in:not(.k-treeview-load-more-button)) holds just the treeview item text
107
+ // the content element (.k-treeview-leaf:not(.k-treeview-load-more-button)) holds just the treeview item text
108
108
  var content = utils_1.getContentElement(item);
109
109
  var targetChildOfDraggedItem = utils_1.hasParent(item, utils_1.closestNode(draggedItem));
110
110
  if (!utils_1.isPresent(content) || (content === draggedItem) || targetChildOfDraggedItem) {
@@ -109,7 +109,7 @@ var DragAndDropDirective = /** @class */ (function () {
109
109
  return;
110
110
  }
111
111
  // store the drag target on press, show it only when it's actually dragged
112
- this.draggedItem = utils_1.closestWithMatch(originalEvent.target, '.k-in');
112
+ this.draggedItem = utils_1.closestWithMatch(originalEvent.target, '.k-treeview-leaf');
113
113
  // record the current pointer down coords - copared to the `startDragAfter` value to calculate whether to initiate dragging
114
114
  this.pendingDragStartEvent = originalEvent;
115
115
  };
@@ -131,7 +131,7 @@ var DragAndDropDirective = /** @class */ (function () {
131
131
  }
132
132
  var targetTreeView = this.getTargetTreeView(dropTarget);
133
133
  var dropPosition = drag_and_drop_utils_1.getDropPosition(this.draggedItem, dropTarget, clientY, targetTreeView, this.containerOffset);
134
- var dropHintAnchor = utils_1.closestWithMatch(dropTarget, '.k-mid');
134
+ var dropHintAnchor = utils_1.closestWithMatch(dropTarget, '.k-treeview-mid');
135
135
  var dropAction = drag_and_drop_utils_1.getDropAction(dropPosition, dropTarget);
136
136
  var sourceItem = drag_and_drop_utils_1.treeItemFromEventTarget(this.treeview, this.draggedItem);
137
137
  var destinationItem = drag_and_drop_utils_1.treeItemFromEventTarget(targetTreeView, dropTarget);
@@ -26,8 +26,8 @@ var NavigationService = /** @class */ (function () {
26
26
  this.loadMore = new rxjs_1.Subject();
27
27
  this.navigable = true;
28
28
  this.actions = (_a = {},
29
- _a[kendo_angular_common_1.Keys.ArrowUp] = function () { return _this.activate(_this.model.findVisiblePrev(_this.focusableItem)); },
30
- _a[kendo_angular_common_1.Keys.ArrowDown] = function () { return _this.activate(_this.model.findVisibleNext(_this.focusableItem)); },
29
+ _a[kendo_angular_common_1.Keys.ArrowUp] = function () { return _this.activate(_this.model.findVisiblePrev(_this.focusableItem), true); },
30
+ _a[kendo_angular_common_1.Keys.ArrowDown] = function () { return _this.activate(_this.model.findVisibleNext(_this.focusableItem), true); },
31
31
  _a[kendo_angular_common_1.Keys.ArrowLeft] = function () { return !_this.isLoadMoreButton && (_this.expand({
32
32
  expand: _this.localization.rtl,
33
33
  intercept: _this.localization.rtl ? _this.moveToFirstVisibleChild : _this.moveToParent
@@ -36,12 +36,13 @@ var NavigationService = /** @class */ (function () {
36
36
  expand: !_this.localization.rtl,
37
37
  intercept: _this.localization.rtl ? _this.moveToParent : _this.moveToFirstVisibleChild
38
38
  })); },
39
- _a[kendo_angular_common_1.Keys.Home] = function () { return _this.activate(_this.model.firstVisibleNode()); },
40
- _a[kendo_angular_common_1.Keys.End] = function () { return _this.activate(_this.model.lastVisibleNode()); },
39
+ _a[kendo_angular_common_1.Keys.Home] = function () { return _this.activate(_this.model.firstVisibleNode(), true); },
40
+ _a[kendo_angular_common_1.Keys.End] = function () { return _this.activate(_this.model.lastVisibleNode(), true); },
41
41
  _a[kendo_angular_common_1.Keys.Enter] = function () { return _this.handleEnter(); },
42
42
  _a[kendo_angular_common_1.Keys.Space] = function () { return _this.handleSpace(); },
43
43
  _a);
44
44
  this.isFocused = false;
45
+ this.shouldScroll = false;
45
46
  this._model = new navigation_model_1.NavigationModel();
46
47
  this.moveToFirstVisibleChild = this.moveToFirstVisibleChild.bind(this);
47
48
  this.moveToParent = this.moveToParent.bind(this);
@@ -84,12 +85,14 @@ var NavigationService = /** @class */ (function () {
84
85
  enumerable: true,
85
86
  configurable: true
86
87
  });
87
- NavigationService.prototype.activate = function (item) {
88
+ NavigationService.prototype.activate = function (item, shouldScroll) {
89
+ if (shouldScroll === void 0) { shouldScroll = false; }
88
90
  if (!this.navigable || !item || this.isActive(utils_1.nodeIndex(item))) {
89
91
  return;
90
92
  }
91
93
  this.isFocused = true;
92
94
  this.activeItem = item || this.activeItem;
95
+ this.shouldScroll = shouldScroll;
93
96
  this.notifyMove();
94
97
  };
95
98
  NavigationService.prototype.activateParent = function (index) {
@@ -209,7 +212,7 @@ var NavigationService = /** @class */ (function () {
209
212
  };
210
213
  NavigationService.prototype.navigationState = function (expand) {
211
214
  if (expand === void 0) { expand = false; }
212
- return ({ expand: expand, index: this.activeIndex, isFocused: this.isFocused });
215
+ return ({ expand: expand, index: this.activeIndex, isFocused: this.isFocused, shouldScroll: this.shouldScroll });
213
216
  };
214
217
  NavigationService.prototype.handleEnter = function () {
215
218
  if (!this.navigable) {
@@ -11,7 +11,7 @@ exports.packageMetadata = {
11
11
  name: '@progress/kendo-angular-treeview',
12
12
  productName: 'Kendo UI for Angular',
13
13
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
14
- publishDate: 1638442548,
14
+ publishDate: 1644923991,
15
15
  version: '',
16
16
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
17
17
  };
@@ -0,0 +1,6 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ "use strict";
6
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -35,6 +35,7 @@ var TreeViewGroupComponent = /** @class */ (function () {
35
35
  this.role = 'group';
36
36
  this.loadOnDemand = true;
37
37
  this.textField = "";
38
+ this.size = 'medium';
38
39
  this.initialNodesLoaded = false;
39
40
  this.loadingMoreNodes = false;
40
41
  this._data = [];
@@ -268,7 +269,7 @@ var TreeViewGroupComponent = /** @class */ (function () {
268
269
  this.emitChildrenLoaded(mappedChildren);
269
270
  };
270
271
  tslib_1.__decorate([
271
- core_1.HostBinding("class.k-group"),
272
+ core_1.HostBinding("class.k-treeview-group"),
272
273
  tslib_1.__metadata("design:type", Boolean)
273
274
  ], TreeViewGroupComponent.prototype, "kGroupClass", void 0);
274
275
  tslib_1.__decorate([
@@ -331,6 +332,10 @@ var TreeViewGroupComponent = /** @class */ (function () {
331
332
  core_1.Input(),
332
333
  tslib_1.__metadata("design:type", Object)
333
334
  ], TreeViewGroupComponent.prototype, "loadMoreService", void 0);
335
+ tslib_1.__decorate([
336
+ core_1.Input(),
337
+ tslib_1.__metadata("design:type", String)
338
+ ], TreeViewGroupComponent.prototype, "size", void 0);
334
339
  tslib_1.__decorate([
335
340
  core_1.Input(),
336
341
  tslib_1.__metadata("design:type", Function)
@@ -374,7 +379,7 @@ var TreeViewGroupComponent = /** @class */ (function () {
374
379
  ])
375
380
  ],
376
381
  selector: '[kendoTreeViewGroup]',
377
- template: "\n <li\n *ngFor=\"let node of data; let index = index; trackBy: trackBy\"\n class=\"k-item k-treeview-item\"\n [class.k-display-none]=\"!isVisible(node, nodeIndex(index))\"\n kendoTreeViewItem\n [attr.aria-setsize]=\"totalNodesCount\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [parentDataItem]=\"parentDataItem\"\n [parentIndex]=\"parentIndex\"\n [loadOnDemand]=\"loadOnDemand\"\n [checkable]=\"checkboxes\"\n [isChecked]=\"isChecked(node, nodeIndex(index))\"\n [isDisabled]=\"disabled || isDisabled(node, nodeIndex(index))\"\n [isVisible]=\"isVisible(node, nodeIndex(index))\"\n [expandable]=\"expandIcons && hasChildren(node)\"\n [isExpanded]=\"isExpanded(node, nodeIndex(index))\"\n [selectable]=\"selectable\"\n [isSelected]=\"isSelected(node, nodeIndex(index))\"\n [attr.data-treeindex]=\"nodeIndex(index)\"\n >\n <div class=\"k-mid\">\n <span\n class=\"k-icon\"\n [class.k-i-collapse]=\"isExpanded(node, nodeIndex(index))\"\n [class.k-i-expand]=\"!isExpanded(node, nodeIndex(index))\"\n [kendoTreeViewLoading]=\"nodeIndex(index)\"\n (click)=\"expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"expandIcons && hasChildren(node)\"\n >\n </span>\n <kendo-checkbox\n *ngIf=\"checkboxes\"\n [node]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isChecked]=\"isChecked\"\n (checkStateChange)=\"checkNode(nodeIndex(index))\"\n tabindex=\"-1\"\n ></kendo-checkbox>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [initialSelection]=\"isSelected(node, nodeIndex(index))\"\n [isSelected]=\"isSelected\"\n class=\"k-in\"\n [style.touch-action]=\"touchActions ? '' : 'none'\"\n >\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\"\n [ngTemplateOutletContext]=\"{\n $implicit: node,\n index: nodeIndex(index)\n }\"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </div>\n <ul\n *ngIf=\"isExpanded(node, nodeIndex(index)) && hasChildren(node)\"\n kendoTreeViewGroup\n role=\"group\"\n [nodes]=\"fetchChildren\"\n [loadOnDemand]=\"loadOnDemand\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [selectable]=\"selectable\"\n [touchActions]=\"touchActions\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isDisabled]=\"isDisabled\"\n [disabled]=\"disabled || isDisabled(node, nodeIndex(index))\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [isVisible]=\"isVisible\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [loadMoreButtonTemplateRef]=\"loadMoreButtonTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [parentDataItem]=\"node\"\n [textField]=\"nextFields\"\n [loadMoreService]=\"loadMoreService\"\n [@toggle]=\"true\"\n [trackBy]=\"trackBy\"\n >\n </ul>\n </li>\n <li\n *ngIf=\"initialNodesLoaded && moreNodesAvailable\"\n class=\"k-item k-treeview-item\"\n [class.k-treeview-load-more-checkboxes-container]=\"checkboxes\"\n kendoTreeViewItem\n role=\"button\"\n [selectable]=\"false\"\n [checkable]=\"false\"\n [expandable]=\"false\"\n [index]=\"loadMoreButtonIndex\"\n [parentDataItem]=\"parentDataItem\"\n [parentIndex]=\"parentIndex\"\n [attr.data-treeindex]=\"loadMoreButtonIndex\"\n >\n <div class=\"k-mid\">\n <span\n *ngIf=\"loadingMoreNodes\"\n class=\"k-icon k-i-loading k-i-expand\"\n >\n </span>\n <span\n class=\"k-in k-treeview-load-more-button\"\n [attr.data-treeindex]=\"loadMoreButtonIndex\"\n kendoTreeViewItemContent\n [index]=\"loadMoreButtonIndex\"\n >\n <ng-template\n *ngIf=\"loadMoreButtonTemplateRef\"\n [ngTemplateOutlet]=\"loadMoreButtonTemplateRef\"\n [ngTemplateOutletContext]=\"{\n index: loadMoreButtonIndex\n }\"\n >\n </ng-template>\n <ng-container *ngIf=\"!loadMoreButtonTemplateRef\">\n Load more\n </ng-container>\n </span>\n </div>\n </li>\n "
382
+ template: "\n <li\n *ngFor=\"let node of data; let index = index; trackBy: trackBy\"\n class=\"k-treeview-item\"\n [class.k-display-none]=\"!isVisible(node, nodeIndex(index))\"\n kendoTreeViewItem\n [attr.aria-setsize]=\"totalNodesCount\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [parentDataItem]=\"parentDataItem\"\n [parentIndex]=\"parentIndex\"\n [loadOnDemand]=\"loadOnDemand\"\n [checkable]=\"checkboxes\"\n [isChecked]=\"isChecked(node, nodeIndex(index))\"\n [isDisabled]=\"disabled || isDisabled(node, nodeIndex(index))\"\n [isVisible]=\"isVisible(node, nodeIndex(index))\"\n [expandable]=\"expandIcons && hasChildren(node)\"\n [isExpanded]=\"isExpanded(node, nodeIndex(index))\"\n [selectable]=\"selectable\"\n [isSelected]=\"isSelected(node, nodeIndex(index))\"\n [attr.data-treeindex]=\"nodeIndex(index)\"\n >\n <div class=\"k-treeview-mid\">\n <span\n class=\"k-treeview-toggle\"\n [kendoTreeViewLoading]=\"nodeIndex(index)\"\n (click)=\"expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))\"\n *ngIf=\"expandIcons && hasChildren(node)\"\n >\n <span\n class=\"k-icon\"\n [class.k-i-collapse]=\"isExpanded(node, nodeIndex(index))\"\n [class.k-i-expand]=\"!isExpanded(node, nodeIndex(index))\"\n >\n </span>\n </span>\n <kendo-checkbox\n *ngIf=\"checkboxes\"\n [size]=\"size\"\n [node]=\"node\"\n [index]=\"nodeIndex(index)\"\n [isChecked]=\"isChecked\"\n (checkStateChange)=\"checkNode(nodeIndex(index))\"\n tabindex=\"-1\"\n ></kendo-checkbox>\n <span kendoTreeViewItemContent\n [attr.data-treeindex]=\"nodeIndex(index)\"\n [dataItem]=\"node\"\n [index]=\"nodeIndex(index)\"\n [initialSelection]=\"isSelected(node, nodeIndex(index))\"\n [isSelected]=\"isSelected\"\n class=\"k-treeview-leaf\"\n [style.touch-action]=\"touchActions ? '' : 'none'\"\n >\n <span class=\"k-treeview-leaf-text\">\n <ng-container [ngSwitch]=\"hasTemplate\">\n <ng-container *ngSwitchCase=\"true\">\n <ng-template\n [ngTemplateOutlet]=\"nodeTemplateRef\"\n [ngTemplateOutletContext]=\"{\n $implicit: node,\n index: nodeIndex(index)\n }\"\n >\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{nodeText(node)}}\n </ng-container>\n </ng-container>\n </span>\n </span>\n </div>\n <ul\n *ngIf=\"isExpanded(node, nodeIndex(index)) && hasChildren(node)\"\n kendoTreeViewGroup\n role=\"group\"\n [nodes]=\"fetchChildren\"\n [loadOnDemand]=\"loadOnDemand\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [selectable]=\"selectable\"\n [touchActions]=\"touchActions\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isDisabled]=\"isDisabled\"\n [disabled]=\"disabled || isDisabled(node, nodeIndex(index))\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [isVisible]=\"isVisible\"\n [nodeTemplateRef]=\"nodeTemplateRef\"\n [loadMoreButtonTemplateRef]=\"loadMoreButtonTemplateRef\"\n [parentIndex]=\"nodeIndex(index)\"\n [parentDataItem]=\"node\"\n [textField]=\"nextFields\"\n [loadMoreService]=\"loadMoreService\"\n [@toggle]=\"true\"\n [trackBy]=\"trackBy\"\n >\n </ul>\n </li>\n <li\n *ngIf=\"initialNodesLoaded && moreNodesAvailable\"\n class=\"k-treeview-item\"\n [class.k-treeview-load-more-checkboxes-container]=\"checkboxes\"\n kendoTreeViewItem\n role=\"button\"\n [selectable]=\"false\"\n [checkable]=\"false\"\n [expandable]=\"false\"\n [index]=\"loadMoreButtonIndex\"\n [parentDataItem]=\"parentDataItem\"\n [parentIndex]=\"parentIndex\"\n [attr.data-treeindex]=\"loadMoreButtonIndex\"\n >\n <div class=\"k-treeview-mid\">\n <span\n *ngIf=\"loadingMoreNodes\"\n class=\"k-icon k-i-loading k-i-expand\"\n >\n </span>\n <span\n class=\"k-treeview-leaf k-treeview-load-more-button\"\n [attr.data-treeindex]=\"loadMoreButtonIndex\"\n kendoTreeViewItemContent\n [index]=\"loadMoreButtonIndex\"\n >\n <span class=\"k-treeview-leaf-text\">\n <ng-template\n *ngIf=\"loadMoreButtonTemplateRef\"\n [ngTemplateOutlet]=\"loadMoreButtonTemplateRef\"\n [ngTemplateOutletContext]=\"{\n index: loadMoreButtonIndex\n }\"\n >\n </ng-template>\n <ng-container *ngIf=\"!loadMoreButtonTemplateRef\">\n Load more\n </ng-container>\n </span>\n </span>\n </div>\n </li>\n "
378
383
  }),
379
384
  tslib_1.__metadata("design:paramtypes", [expand_state_service_1.ExpandStateService,
380
385
  loading_notification_service_1.LoadingNotificationService,