@progress/kendo-angular-toolbar 19.0.0-develop.8 → 19.0.0

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.
@@ -6,7 +6,7 @@ import * as i0 from '@angular/core';
6
6
  import { EventEmitter, Injectable, inject, ElementRef, Directive, ViewChild, Input, Output, forwardRef, Component, HostBinding, ViewContainerRef, ContentChildren, HostListener, isDevMode, ViewChildren, NgModule } from '@angular/core';
7
7
  import * as i2 from '@progress/kendo-angular-popup';
8
8
  import { PopupService } from '@progress/kendo-angular-popup';
9
- import { Keys, isDocumentAvailable, guid, ResizeSensorComponent, ResizeBatchService } from '@progress/kendo-angular-common';
9
+ import { Keys, isPresent as isPresent$1, isDocumentAvailable, guid, ResizeSensorComponent, ResizeBatchService } from '@progress/kendo-angular-common';
10
10
  import * as i1 from '@progress/kendo-angular-l10n';
11
11
  import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
12
12
  import { validatePackage } from '@progress/kendo-licensing';
@@ -16,7 +16,7 @@ import { caretAltLeftIcon, caretAltRightIcon, moreHorizontalIcon, moreVerticalIc
16
16
  import { ButtonComponent, ButtonGroupComponent, DropDownButtonComponent, SplitButtonComponent } from '@progress/kendo-angular-buttons';
17
17
  import { NgTemplateOutlet, NgFor, NgIf, NgClass, NgStyle } from '@angular/common';
18
18
  import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icons';
19
- import { BadgeComponent } from '@progress/kendo-angular-indicators';
19
+ import { BadgeComponent, BadgeContainerComponent } from '@progress/kendo-angular-indicators';
20
20
 
21
21
  /**
22
22
  * @hidden
@@ -26,8 +26,8 @@ const packageMetadata = {
26
26
  productName: 'Kendo UI for Angular',
27
27
  productCode: 'KENDOUIANGULAR',
28
28
  productCodes: ['KENDOUIANGULAR'],
29
- publishDate: 1746081163,
30
- version: '19.0.0-develop.8',
29
+ publishDate: 1748362403,
30
+ version: '19.0.0',
31
31
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
32
32
  };
33
33
 
@@ -222,8 +222,10 @@ const getValueForLocation = (property, displayMode, overflows) => {
222
222
  switch (displayMode) {
223
223
  case 'toolbar':
224
224
  return overflows ? undefined : property;
225
- case 'overflow':
225
+ case 'menu':
226
226
  return overflows ? property : undefined;
227
+ case 'never':
228
+ return;
227
229
  default:
228
230
  return property;
229
231
  }
@@ -447,6 +449,10 @@ class ToolBarToolComponent {
447
449
  visibility;
448
450
  element;
449
451
  isBuiltInTool = false;
452
+ /**
453
+ * @hidden
454
+ */
455
+ isHidden = false;
450
456
  /**
451
457
  * @hidden
452
458
  */
@@ -628,14 +634,8 @@ class ToolBarRendererComponent {
628
634
  this.viewContainer = viewContainer;
629
635
  }
630
636
  ngOnInit() {
631
- const viewContainerRootNodes = this.viewContainer.get(0)?.rootNodes?.filter(isElementOrTextNode);
632
- if (!viewContainerRootNodes || viewContainerRootNodes.length === 0) {
633
- return;
634
- }
635
637
  this.tool.location = this.location;
636
- this.internalComponentRef = viewContainerRootNodes[0];
637
638
  this.element = this.tool.element;
638
- this.internalComponentRef.addEventListener('click', this.onClick);
639
639
  this.rendererService.element = this.element;
640
640
  this.rendererService.renderer = this;
641
641
  this.refreshSubscription = this.refreshService.onRefresh.subscribe((tool) => {
@@ -643,34 +643,54 @@ class ToolBarRendererComponent {
643
643
  this.refresh();
644
644
  }
645
645
  });
646
+ }
647
+ ngOnDestroy() {
648
+ this.refreshSubscription?.unsubscribe();
649
+ this.internalComponentRef?.removeEventListener('click', this.onClick);
650
+ }
651
+ ngAfterViewInit() {
652
+ const viewContainerRootNodes = this.viewContainer.get(0)?.rootNodes?.filter(isElementOrTextNode);
653
+ if (!viewContainerRootNodes || viewContainerRootNodes.length === 0) {
654
+ return;
655
+ }
656
+ this.internalComponentRef = viewContainerRootNodes[0];
657
+ this.internalComponentRef.addEventListener('click', this.onClick);
646
658
  if (this.resizable) {
647
659
  if (this.location === 'toolbar') {
648
660
  this.template = this.tool.toolbarTemplate;
649
- this.renderer.setStyle(this.internalComponentRef, 'visibility', 'hidden');
650
- this.renderer.setStyle(this.internalComponentRef, 'display', 'none');
661
+ this.hideTool();
651
662
  }
652
663
  else if (this.location === 'section') {
653
664
  this.template = this.tool.toolbarTemplate;
654
- this.renderer.setStyle(this.internalComponentRef, 'visibility', 'visible');
655
- this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
665
+ if (this.tool.isHidden) {
666
+ this.hideTool();
667
+ }
668
+ else {
669
+ this.renderer.setStyle(this.internalComponentRef, 'visibility', 'visible');
670
+ this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
671
+ }
656
672
  }
657
673
  else {
658
674
  this.template = this.tool.popupTemplate;
659
- this.renderer.setStyle(this.internalComponentRef, 'display', 'none');
675
+ if (this.tool.isHidden) {
676
+ this.hideTool();
677
+ }
678
+ else {
679
+ this.renderer.setStyle(this.internalComponentRef, 'display', 'none');
680
+ }
660
681
  }
661
682
  }
662
683
  else {
663
684
  this.tool.overflows = false;
664
685
  this.template = this.tool.toolbarTemplate;
665
- this.renderer.setStyle(this.internalComponentRef, 'visibility', 'visible');
666
- this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
686
+ if (this.tool.isHidden) {
687
+ this.hideTool();
688
+ }
689
+ else {
690
+ this.renderer.setStyle(this.internalComponentRef, 'visibility', 'visible');
691
+ this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
692
+ }
667
693
  }
668
- }
669
- ngOnDestroy() {
670
- this.refreshSubscription && this.refreshSubscription.unsubscribe();
671
- this.internalComponentRef && this.internalComponentRef.removeEventListener('click', this.onClick);
672
- }
673
- ngAfterViewInit() {
674
694
  if (this.resizable) {
675
695
  this.refresh();
676
696
  }
@@ -683,6 +703,9 @@ class ToolBarRendererComponent {
683
703
  if (this.isSpacer) {
684
704
  return MIN_SPACER_WIDTH;
685
705
  }
706
+ if (!this.internalComponentRef) {
707
+ return;
708
+ }
686
709
  return this.tool.overflows ? 0 : outerWidth(this.internalComponentRef);
687
710
  }
688
711
  isDisplayed() {
@@ -690,7 +713,13 @@ class ToolBarRendererComponent {
690
713
  }
691
714
  refresh() {
692
715
  this.tool.location = this.location;
693
- if (this.resizable && this.internalComponentRef) {
716
+ if (!isPresent$1(this.internalComponentRef)) {
717
+ return;
718
+ }
719
+ if (this.tool.isHidden) {
720
+ this.hideTool();
721
+ }
722
+ else if (this.resizable) {
694
723
  if (this.location === 'toolbar') {
695
724
  this.renderer.setStyle(this.internalComponentRef, 'visibility', this.tool.visibility);
696
725
  this.renderer.setStyle(this.internalComponentRef, 'display', this.tool.toolbarDisplay);
@@ -698,8 +727,12 @@ class ToolBarRendererComponent {
698
727
  else {
699
728
  this.renderer.setStyle(this.internalComponentRef, 'display', this.tool.overflowDisplay);
700
729
  }
701
- this.updateTools();
702
730
  }
731
+ else {
732
+ this.renderer.setStyle(this.internalComponentRef, 'visibility', 'visible');
733
+ this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
734
+ }
735
+ this.updateTools();
703
736
  }
704
737
  setAttribute(element, attr, value) {
705
738
  this.renderer.setAttribute(element, attr, value);
@@ -725,6 +758,10 @@ class ToolBarRendererComponent {
725
758
  }
726
759
  }
727
760
  }
761
+ hideTool() {
762
+ this.renderer.setStyle(this.internalComponentRef, 'visibility', 'hidden');
763
+ this.renderer.setStyle(this.internalComponentRef, 'display', 'none');
764
+ }
728
765
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarRendererComponent, deps: [{ token: i0.Renderer2 }, { token: RendererService }, { token: RefreshService }, { token: ToolbarToolsService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
729
766
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarRendererComponent, isStandalone: true, selector: "[kendoToolbarRenderer]", inputs: { tool: "tool", location: "location", resizable: "resizable" }, outputs: { rendererClick: "rendererClick" }, providers: [RendererService], ngImport: i0 });
730
767
  }
@@ -1197,6 +1234,36 @@ class ToolBarComponent {
1197
1234
  get tabIndex() {
1198
1235
  return this.tabindex;
1199
1236
  }
1237
+ /**
1238
+ * Specifies the icons visibility for all tools in the ToolBar.
1239
+ * This can be overridden by the `showIcon` property of each tool.
1240
+ */
1241
+ set showIcon(value) {
1242
+ if (this._showIcon === value) {
1243
+ return;
1244
+ }
1245
+ const normalizedValue = this.normalizeDisplayValue(value);
1246
+ this._showIcon = value;
1247
+ this.propertyChange.emit({
1248
+ property: 'showIcon',
1249
+ value: normalizedValue
1250
+ });
1251
+ }
1252
+ /**
1253
+ * Specifies the text visibility for all tools in the ToolBar.
1254
+ * This can be overridden by the `showText` property of each tool.
1255
+ */
1256
+ set showText(value) {
1257
+ if (this._showText === value) {
1258
+ return;
1259
+ }
1260
+ const normalizedValue = this.normalizeDisplayValue(value);
1261
+ this._showText = value;
1262
+ this.propertyChange.emit({
1263
+ property: 'showText',
1264
+ value: normalizedValue
1265
+ });
1266
+ }
1200
1267
  /**
1201
1268
  * Fires when the overflow popup of the ToolBar is opened.
1202
1269
  */
@@ -1253,6 +1320,10 @@ class ToolBarComponent {
1253
1320
  * @hidden
1254
1321
  */
1255
1322
  nextButtonIcon = caretAltRightIcon;
1323
+ /**
1324
+ * @hidden
1325
+ */
1326
+ propertyChange = new EventEmitter();
1256
1327
  hostClass = true;
1257
1328
  get scrollableClass() {
1258
1329
  return this.isScrollMode;
@@ -1271,6 +1342,8 @@ class ToolBarComponent {
1271
1342
  cachedGap;
1272
1343
  _size = DEFAULT_SIZE;
1273
1344
  _fillMode = DEFAULT_FILL_MODE;
1345
+ _showText = 'always';
1346
+ _showIcon = 'always';
1274
1347
  overflowButtonClickedTime = null;
1275
1348
  showAutoButtons = false;
1276
1349
  scrollButtonStateChangeSub;
@@ -1808,10 +1881,10 @@ class ToolBarComponent {
1808
1881
  if (containerWidth > childrenWidth) {
1809
1882
  for (let i = this.overflowTools.length - 1; i >= 0; i--) {
1810
1883
  width = this.showFirstHiddenTool(containerWidth, childrenWidth);
1811
- if (width) {
1884
+ if (width > 0) {
1812
1885
  childrenWidth += width + this.gap;
1813
1886
  }
1814
- else {
1887
+ else if (width === 0) {
1815
1888
  break;
1816
1889
  }
1817
1890
  }
@@ -1846,7 +1919,7 @@ class ToolBarComponent {
1846
1919
  tool.overflows = true;
1847
1920
  }
1848
1921
  this.refreshService.refresh(tool);
1849
- return renderedElement.width; // returns 0 if `overflows` is true
1922
+ return tool.isHidden ? -1 : renderedElement.width; // returns 0 if `overflows` is true and -1 if the tool is hidden
1850
1923
  }
1851
1924
  setPopupContentDimensions(isSection) {
1852
1925
  const popupContentContainer = this.popupRef.popup.instance.contentContainer.nativeElement;
@@ -1972,8 +2045,14 @@ class ToolBarComponent {
1972
2045
  }
1973
2046
  });
1974
2047
  }
2048
+ normalizeDisplayValue(value) {
2049
+ if (typeof value === 'boolean') {
2050
+ return value ? 'always' : 'never';
2051
+ }
2052
+ return value;
2053
+ }
1975
2054
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarComponent, deps: [{ token: i1.LocalizationService }, { token: i2.PopupService }, { token: RefreshService }, { token: NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: ToolbarToolsService }, { token: ScrollService }], target: i0.ɵɵFactoryTarget.Component });
1976
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarComponent, isStandalone: true, selector: "kendo-toolbar", inputs: { overflow: "overflow", resizable: "resizable", popupSettings: "popupSettings", fillMode: "fillMode", tabindex: "tabindex", size: "size", tabIndex: "tabIndex" }, outputs: { open: "open", close: "close" }, host: { listeners: { "focus": "onFocus($event)", "focusout": "onFocusOut($event)" }, properties: { "class.k-toolbar": "this.hostClass", "class.k-toolbar-scrollable": "this.scrollableClass", "class.k-toolbar-section": "this.sectionClass", "attr.role": "this.role", "attr.dir": "this.getDir", "class.k-toolbar-resizable": "this.resizableClass" } }, providers: [
2055
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarComponent, isStandalone: true, selector: "kendo-toolbar", inputs: { overflow: "overflow", resizable: "resizable", popupSettings: "popupSettings", fillMode: "fillMode", tabindex: "tabindex", size: "size", tabIndex: "tabIndex", showIcon: "showIcon", showText: "showText" }, outputs: { open: "open", close: "close" }, host: { listeners: { "focus": "onFocus($event)", "focusout": "onFocusOut($event)" }, properties: { "class.k-toolbar": "this.hostClass", "class.k-toolbar-scrollable": "this.scrollableClass", "class.k-toolbar-section": "this.sectionClass", "attr.role": "this.role", "attr.dir": "this.getDir", "class.k-toolbar-resizable": "this.resizableClass" } }, providers: [
1977
2056
  RefreshService,
1978
2057
  NavigationService,
1979
2058
  LocalizationService,
@@ -2399,7 +2478,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2399
2478
  <kendo-resize-sensor *ngIf="overflowEnabled" #resizeSensor></kendo-resize-sensor>
2400
2479
  `,
2401
2480
  standalone: true,
2402
- imports: [NgTemplateOutlet, LocalizedToolbarMessagesDirective, NgFor, ToolBarRendererComponent, NgIf, ButtonComponent, NgClass, ResizeSensorComponent, ButtonGroupComponent, ToolbarScrollableButtonComponent]
2481
+ imports: [NgTemplateOutlet, LocalizedToolbarMessagesDirective, NgFor, ToolBarRendererComponent, NgIf, ButtonComponent, NgClass, ResizeSensorComponent, ToolbarScrollableButtonComponent]
2403
2482
  }]
2404
2483
  }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i2.PopupService }, { type: RefreshService }, { type: NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: ToolbarToolsService }, { type: ScrollService }]; }, propDecorators: { overflow: [{
2405
2484
  type: Input
@@ -2416,6 +2495,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2416
2495
  }], tabIndex: [{
2417
2496
  type: Input,
2418
2497
  args: ['tabIndex']
2498
+ }], showIcon: [{
2499
+ type: Input
2500
+ }], showText: [{
2501
+ type: Input
2419
2502
  }], open: [{
2420
2503
  type: Output
2421
2504
  }], close: [{
@@ -2488,9 +2571,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2488
2571
  class ToolBarButtonComponent extends ToolBarToolComponent {
2489
2572
  element;
2490
2573
  zone;
2574
+ host;
2491
2575
  // showText and showIcon showIcon should be declared first
2492
2576
  /**
2493
- * Specifies where button text should be displayed
2577
+ * Specifies the button text visibility.
2494
2578
  */
2495
2579
  set showText(value) {
2496
2580
  this._showText = value;
@@ -2500,9 +2584,15 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2500
2584
  return this._showText;
2501
2585
  }
2502
2586
  /**
2503
- * Specifies where button icon should be displayed
2587
+ * Specifies the button icon visibility.
2504
2588
  */
2505
- showIcon = 'both';
2589
+ set showIcon(value) {
2590
+ this._showIcon = value;
2591
+ this.setTextDisplayMode();
2592
+ }
2593
+ get showIcon() {
2594
+ return this._showIcon;
2595
+ }
2506
2596
  /**
2507
2597
  * Specifies the text of the Button ([see example]({% slug controltypes_toolbar %}#toc-buttons)).
2508
2598
  */
@@ -2513,6 +2603,12 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2513
2603
  get text() {
2514
2604
  return this._text;
2515
2605
  }
2606
+ /**
2607
+ * @hidden
2608
+ */
2609
+ get size() {
2610
+ return this.host.size;
2611
+ }
2516
2612
  /**
2517
2613
  * Specifies custom inline CSS styles of the Button.
2518
2614
  */
@@ -2656,6 +2752,10 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2656
2752
  svgIcon: null,
2657
2753
  imageUrl: ''
2658
2754
  };
2755
+ /**
2756
+ * @hidden
2757
+ */
2758
+ hasBadgeContainer = false;
2659
2759
  /**
2660
2760
  * @hidden
2661
2761
  */
@@ -2663,17 +2763,29 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2663
2763
  toolbarButtonElement;
2664
2764
  sectionButtonElement;
2665
2765
  overflowButtonElement;
2666
- _showText = 'both';
2766
+ _showText;
2767
+ _showIcon;
2667
2768
  _text;
2668
- constructor(element, zone) {
2769
+ propertyChangeSub;
2770
+ constructor(element, zone, host) {
2669
2771
  super();
2670
2772
  this.element = element;
2671
2773
  this.zone = zone;
2774
+ this.host = host;
2672
2775
  this.isBuiltInTool = true;
2776
+ this.propertyChangeSub = this.host.propertyChange.subscribe(change => {
2777
+ if (change.property === 'showText' || change.property === 'showIcon') {
2778
+ this[change.property] = change.value;
2779
+ }
2780
+ });
2673
2781
  }
2674
2782
  ngOnInit() {
2675
2783
  this.setTextDisplayMode();
2676
2784
  }
2785
+ ngOnDestroy() {
2786
+ this.propertyChangeSub.unsubscribe();
2787
+ this.propertyChangeSub = null;
2788
+ }
2677
2789
  /**
2678
2790
  * @hidden
2679
2791
  */
@@ -2720,25 +2832,60 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2720
2832
  this.selected = state;
2721
2833
  this.selectedChange.emit(state);
2722
2834
  }
2835
+ /**
2836
+ * @hidden
2837
+ */
2723
2838
  getButton() {
2724
2839
  return this[`${this.location}ButtonElement`]?.nativeElement;
2725
2840
  }
2726
2841
  setTextDisplayMode() {
2727
- this.toolbarOptions.text = this.showText === 'overflow' ? undefined : this.text;
2842
+ this.toolbarOptions.text = this.showText === 'menu' || this.showText === 'never' ? undefined : this.text;
2728
2843
  this.zone.onStable.pipe(take(1)).subscribe(() => {
2729
- this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
2844
+ this.overflowOptions.text = this.showText === 'toolbar' || this.showText === 'never' ? undefined : this.text;
2730
2845
  });
2731
2846
  }
2732
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
2847
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
2733
2848
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarButtonComponent, isStandalone: true, selector: "kendo-toolbar-button", inputs: { showText: "showText", showIcon: "showIcon", text: "text", style: "style", className: "className", title: "title", disabled: "disabled", toggleable: "toggleable", look: "look", togglable: "togglable", selected: "selected", fillMode: "fillMode", themeColor: "themeColor", icon: "icon", iconClass: "iconClass", svgIcon: "svgIcon", imageUrl: "imageUrl" }, outputs: { click: "click", pointerdown: "pointerdown", selectedChange: "selectedChange" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonComponent) }], viewQueries: [{ propertyName: "toolbarButtonElement", first: true, predicate: ["toolbarButton"], descendants: true, read: ElementRef }, { propertyName: "sectionButtonElement", first: true, predicate: ["sectionButton"], descendants: true, read: ElementRef }, { propertyName: "overflowButtonElement", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBarButton"], usesInheritance: true, ngImport: i0, template: `
2734
2849
  <ng-template #toolbarTemplate>
2735
- <button
2850
+ <kendo-badge-container *ngIf="hasBadgeContainer">
2851
+ <button
2852
+ #toolbarButton
2853
+ [class.k-toolbar-button]="!toggleable"
2854
+ [class.k-toolbar-toggle-button]="toggleable"
2855
+ [tabindex]="tabIndex"
2856
+ type="button"
2857
+ kendoButton
2858
+ [size]="size"
2859
+ [ngStyle]="style"
2860
+ [ngClass]="className"
2861
+ [attr.title]="title"
2862
+ [disabled]="disabled"
2863
+ [toggleable]="toggleable"
2864
+ [fillMode]="fillMode"
2865
+ [themeColor]="fillMode ? themeColor : null"
2866
+ [selected]="selected"
2867
+ [icon]="toolbarOptions.icon"
2868
+ [iconClass]="toolbarOptions.iconClass"
2869
+ [svgIcon]="toolbarOptions.svgIcon"
2870
+ [imageUrl]="toolbarOptions.imageUrl"
2871
+ (click)="click.emit($event)"
2872
+ (pointerdown)="pointerdown.emit($event)"
2873
+ (selectedChange)="selectedChangeHandler($event)"
2874
+ (blur)="onBlur()"
2875
+ >
2876
+ {{ toolbarOptions.text }}
2877
+ </button>
2878
+ <kendo-badge *ngIf="showBadge" [cutoutBorder]="true" rounded="full"></kendo-badge>
2879
+ </kendo-badge-container>
2880
+
2881
+ <button *ngIf="!hasBadgeContainer"
2736
2882
  #toolbarButton
2737
2883
  [class.k-toolbar-button]="!toggleable"
2738
2884
  [class.k-toolbar-toggle-button]="toggleable"
2739
2885
  [tabindex]="tabIndex"
2740
2886
  type="button"
2741
2887
  kendoButton
2888
+ [size]="size"
2742
2889
  [ngStyle]="style"
2743
2890
  [ngClass]="className"
2744
2891
  [attr.title]="title"
@@ -2757,7 +2904,6 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2757
2904
  (blur)="onBlur()"
2758
2905
  >
2759
2906
  {{ toolbarOptions.text }}
2760
- <kendo-badge *ngIf="showBadge"></kendo-badge>
2761
2907
  </button>
2762
2908
  </ng-template>
2763
2909
  <ng-template #popupTemplate>
@@ -2785,13 +2931,45 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2785
2931
  </div>
2786
2932
  </ng-template>
2787
2933
  <ng-template #sectionTemplate>
2934
+ <kendo-badge-container *ngIf="hasBadgeContainer">
2935
+ <button
2936
+ #sectionButton
2937
+ [class.k-toolbar-button]="!toggleable"
2938
+ [class.k-toolbar-toggle-button]="toggleable"
2939
+ [tabindex]="tabIndex"
2940
+ type="button"
2941
+ kendoButton
2942
+ [size]="size"
2943
+ [ngStyle]="style"
2944
+ [ngClass]="className"
2945
+ [attr.title]="title"
2946
+ [disabled]="disabled"
2947
+ [toggleable]="toggleable"
2948
+ [fillMode]="fillMode"
2949
+ [themeColor]="fillMode ? themeColor : null"
2950
+ [selected]="selected"
2951
+ [icon]="toolbarOptions.icon"
2952
+ [iconClass]="toolbarOptions.iconClass"
2953
+ [svgIcon]="toolbarOptions.svgIcon"
2954
+ [imageUrl]="toolbarOptions.imageUrl"
2955
+ (click)="click.emit($event)"
2956
+ (pointerdown)="pointerdown.emit($event)"
2957
+ (selectedChange)="selectedChangeHandler($event)"
2958
+ (blur)="onBlur()"
2959
+ >
2960
+ {{ toolbarOptions.text }}
2961
+ </button>
2962
+ <kendo-badge *ngIf="showBadge" [cutoutBorder]="true" rounded="full"></kendo-badge>
2963
+ </kendo-badge-container>
2788
2964
  <button
2965
+ *ngIf="!hasBadgeContainer"
2789
2966
  #sectionButton
2790
2967
  [class.k-toolbar-button]="!toggleable"
2791
2968
  [class.k-toolbar-toggle-button]="toggleable"
2792
2969
  [tabindex]="tabIndex"
2793
2970
  type="button"
2794
2971
  kendoButton
2972
+ [size]="size"
2795
2973
  [ngStyle]="style"
2796
2974
  [ngClass]="className"
2797
2975
  [attr.title]="title"
@@ -2812,7 +2990,7 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2812
2990
  {{ toolbarOptions.text }}
2813
2991
  </button>
2814
2992
  </ng-template>
2815
- `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: BadgeComponent, selector: "kendo-badge", inputs: ["align", "size", "fill", "themeColor", "rounded", "position", "cutoutBorder"] }] });
2993
+ `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: BadgeComponent, selector: "kendo-badge", inputs: ["align", "size", "fill", "themeColor", "rounded", "position", "cutoutBorder"] }, { kind: "component", type: BadgeContainerComponent, selector: "kendo-badge-container" }] });
2816
2994
  }
2817
2995
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonComponent, decorators: [{
2818
2996
  type: Component,
@@ -2822,13 +3000,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2822
3000
  selector: 'kendo-toolbar-button',
2823
3001
  template: `
2824
3002
  <ng-template #toolbarTemplate>
2825
- <button
3003
+ <kendo-badge-container *ngIf="hasBadgeContainer">
3004
+ <button
3005
+ #toolbarButton
3006
+ [class.k-toolbar-button]="!toggleable"
3007
+ [class.k-toolbar-toggle-button]="toggleable"
3008
+ [tabindex]="tabIndex"
3009
+ type="button"
3010
+ kendoButton
3011
+ [size]="size"
3012
+ [ngStyle]="style"
3013
+ [ngClass]="className"
3014
+ [attr.title]="title"
3015
+ [disabled]="disabled"
3016
+ [toggleable]="toggleable"
3017
+ [fillMode]="fillMode"
3018
+ [themeColor]="fillMode ? themeColor : null"
3019
+ [selected]="selected"
3020
+ [icon]="toolbarOptions.icon"
3021
+ [iconClass]="toolbarOptions.iconClass"
3022
+ [svgIcon]="toolbarOptions.svgIcon"
3023
+ [imageUrl]="toolbarOptions.imageUrl"
3024
+ (click)="click.emit($event)"
3025
+ (pointerdown)="pointerdown.emit($event)"
3026
+ (selectedChange)="selectedChangeHandler($event)"
3027
+ (blur)="onBlur()"
3028
+ >
3029
+ {{ toolbarOptions.text }}
3030
+ </button>
3031
+ <kendo-badge *ngIf="showBadge" [cutoutBorder]="true" rounded="full"></kendo-badge>
3032
+ </kendo-badge-container>
3033
+
3034
+ <button *ngIf="!hasBadgeContainer"
2826
3035
  #toolbarButton
2827
3036
  [class.k-toolbar-button]="!toggleable"
2828
3037
  [class.k-toolbar-toggle-button]="toggleable"
2829
3038
  [tabindex]="tabIndex"
2830
3039
  type="button"
2831
3040
  kendoButton
3041
+ [size]="size"
2832
3042
  [ngStyle]="style"
2833
3043
  [ngClass]="className"
2834
3044
  [attr.title]="title"
@@ -2847,7 +3057,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2847
3057
  (blur)="onBlur()"
2848
3058
  >
2849
3059
  {{ toolbarOptions.text }}
2850
- <kendo-badge *ngIf="showBadge"></kendo-badge>
2851
3060
  </button>
2852
3061
  </ng-template>
2853
3062
  <ng-template #popupTemplate>
@@ -2875,13 +3084,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2875
3084
  </div>
2876
3085
  </ng-template>
2877
3086
  <ng-template #sectionTemplate>
3087
+ <kendo-badge-container *ngIf="hasBadgeContainer">
3088
+ <button
3089
+ #sectionButton
3090
+ [class.k-toolbar-button]="!toggleable"
3091
+ [class.k-toolbar-toggle-button]="toggleable"
3092
+ [tabindex]="tabIndex"
3093
+ type="button"
3094
+ kendoButton
3095
+ [size]="size"
3096
+ [ngStyle]="style"
3097
+ [ngClass]="className"
3098
+ [attr.title]="title"
3099
+ [disabled]="disabled"
3100
+ [toggleable]="toggleable"
3101
+ [fillMode]="fillMode"
3102
+ [themeColor]="fillMode ? themeColor : null"
3103
+ [selected]="selected"
3104
+ [icon]="toolbarOptions.icon"
3105
+ [iconClass]="toolbarOptions.iconClass"
3106
+ [svgIcon]="toolbarOptions.svgIcon"
3107
+ [imageUrl]="toolbarOptions.imageUrl"
3108
+ (click)="click.emit($event)"
3109
+ (pointerdown)="pointerdown.emit($event)"
3110
+ (selectedChange)="selectedChangeHandler($event)"
3111
+ (blur)="onBlur()"
3112
+ >
3113
+ {{ toolbarOptions.text }}
3114
+ </button>
3115
+ <kendo-badge *ngIf="showBadge" [cutoutBorder]="true" rounded="full"></kendo-badge>
3116
+ </kendo-badge-container>
2878
3117
  <button
3118
+ *ngIf="!hasBadgeContainer"
2879
3119
  #sectionButton
2880
3120
  [class.k-toolbar-button]="!toggleable"
2881
3121
  [class.k-toolbar-toggle-button]="toggleable"
2882
3122
  [tabindex]="tabIndex"
2883
3123
  type="button"
2884
3124
  kendoButton
3125
+ [size]="size"
2885
3126
  [ngStyle]="style"
2886
3127
  [ngClass]="className"
2887
3128
  [attr.title]="title"
@@ -2904,9 +3145,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2904
3145
  </ng-template>
2905
3146
  `,
2906
3147
  standalone: true,
2907
- imports: [ButtonComponent, NgStyle, NgClass, NgIf, IconWrapperComponent, BadgeComponent],
3148
+ imports: [ButtonComponent, NgStyle, NgClass, NgIf, IconWrapperComponent, BadgeComponent, BadgeContainerComponent],
2908
3149
  }]
2909
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { showText: [{
3150
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: ToolBarComponent }]; }, propDecorators: { showText: [{
2910
3151
  type: Input
2911
3152
  }], showIcon: [{
2912
3153
  type: Input
@@ -2962,6 +3203,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2962
3203
  */
2963
3204
  class ToolBarButtonGroupComponent extends ToolBarToolComponent {
2964
3205
  localization;
3206
+ host;
2965
3207
  /**
2966
3208
  * By default, the ButtonGroup is enabled. To disable the whole group of buttons, set its `disabled`
2967
3209
  * attribute to `true`. To disable a specific button, set the `disabled` attribute of the button to
@@ -3018,9 +3260,10 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
3018
3260
  focusedIndex = -1;
3019
3261
  getNextKey;
3020
3262
  getPrevKey;
3021
- constructor(localization) {
3263
+ constructor(localization, host) {
3022
3264
  super();
3023
3265
  this.localization = localization;
3266
+ this.host = host;
3024
3267
  this.getNextKey = getNextKey(this.localization.rtl);
3025
3268
  this.getPrevKey = getPrevKey(this.localization.rtl);
3026
3269
  this.isBuiltInTool = true;
@@ -3115,13 +3358,19 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
3115
3358
  return button.overflowOptions.svgIcon;
3116
3359
  }
3117
3360
  }
3361
+ /**
3362
+ * @hidden
3363
+ */
3364
+ get size() {
3365
+ return this.host.size;
3366
+ }
3118
3367
  focusButton(index, ev) {
3119
3368
  // Guard against focusing twice on mousedown.
3120
3369
  if (!ev.type || ev.type === 'focus' || ev.type === 'keydown') {
3121
3370
  this.buttonElements[index]?.focus();
3122
3371
  }
3123
3372
  }
3124
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonGroupComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
3373
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonGroupComponent, deps: [{ token: i1.LocalizationService }, { token: ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
3125
3374
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarButtonGroupComponent, isStandalone: true, selector: "kendo-toolbar-buttongroup", inputs: { disabled: "disabled", fillMode: "fillMode", selection: "selection", width: "width", look: "look" }, providers: [LocalizationService, { provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonGroupComponent) }], queries: [{ propertyName: "buttonComponents", predicate: i0.forwardRef(function () { return ToolBarButtonComponent; }) }], viewQueries: [{ propertyName: "toolbarButtonGroup", first: true, predicate: ["toolbarButtonGroup"], descendants: true }, { propertyName: "sectionButtonGroup", first: true, predicate: ["sectionButtonGroup"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarButtonGroup"], usesInheritance: true, ngImport: i0, template: `
3126
3375
  <ng-template #toolbarTemplate>
3127
3376
  <kendo-buttongroup
@@ -3142,6 +3391,7 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
3142
3391
  [ngClass]="button.className"
3143
3392
  [attr.title]="button.title"
3144
3393
  [disabled]="button.disabled"
3394
+ [size]="size"
3145
3395
  [togglable]="button.togglable"
3146
3396
  [selected]="button.selected"
3147
3397
  [attr.aria-pressed]="button.selected ? true : false"
@@ -3203,6 +3453,7 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
3203
3453
  [ngClass]="button.className"
3204
3454
  [attr.title]="button.title"
3205
3455
  [disabled]="button.disabled"
3456
+ [size]="size"
3206
3457
  [togglable]="button.togglable"
3207
3458
  [selected]="button.selected"
3208
3459
  [attr.aria-pressed]="button.selected ? true : false"
@@ -3248,6 +3499,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3248
3499
  [ngClass]="button.className"
3249
3500
  [attr.title]="button.title"
3250
3501
  [disabled]="button.disabled"
3502
+ [size]="size"
3251
3503
  [togglable]="button.togglable"
3252
3504
  [selected]="button.selected"
3253
3505
  [attr.aria-pressed]="button.selected ? true : false"
@@ -3309,6 +3561,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3309
3561
  [ngClass]="button.className"
3310
3562
  [attr.title]="button.title"
3311
3563
  [disabled]="button.disabled"
3564
+ [size]="size"
3312
3565
  [togglable]="button.togglable"
3313
3566
  [selected]="button.selected"
3314
3567
  [attr.aria-pressed]="button.selected ? true : false"
@@ -3330,7 +3583,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3330
3583
  standalone: true,
3331
3584
  imports: [ButtonGroupComponent, NgFor, ButtonComponent, NgStyle, NgClass, NgIf, IconWrapperComponent]
3332
3585
  }]
3333
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { disabled: [{
3586
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: ToolBarComponent }]; }, propDecorators: { disabled: [{
3334
3587
  type: Input
3335
3588
  }], fillMode: [{
3336
3589
  type: Input
@@ -3360,6 +3613,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3360
3613
  class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3361
3614
  zone;
3362
3615
  renderer;
3616
+ host;
3363
3617
  /**
3364
3618
  * Allows showing the default arrow icon or providing alternative one instead.
3365
3619
  * @default false
@@ -3372,7 +3626,7 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3372
3626
  title = '';
3373
3627
  // showText and showIcon showIcon should be declared first
3374
3628
  /**
3375
- * Defines the location of the button text that will be displayed.
3629
+ * Specifies the button text visibility.
3376
3630
  */
3377
3631
  set showText(value) {
3378
3632
  this._showText = value;
@@ -3382,9 +3636,14 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3382
3636
  return this._showText;
3383
3637
  }
3384
3638
  /**
3385
- * Defines the location of the button icon that will be displayed.
3639
+ * Specifies the button icon visibility.
3386
3640
  */
3387
- showIcon = 'both';
3641
+ set showIcon(value) {
3642
+ this._showIcon = value;
3643
+ }
3644
+ get showIcon() {
3645
+ return this._showIcon;
3646
+ }
3388
3647
  /**
3389
3648
  * Sets the text of the DropDownButton
3390
3649
  * ([see example](slug:controltypes_toolbar#toc-drop-down-buttons)).
@@ -3559,26 +3818,40 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3559
3818
  _data;
3560
3819
  _popupSettings = { animate: true, popupClass: '' };
3561
3820
  focusedIndex = -1;
3562
- _showText = 'both';
3821
+ _showText;
3822
+ _showIcon;
3563
3823
  _text;
3824
+ propertyChangeSub;
3564
3825
  getNextKey;
3565
3826
  getPrevKey;
3566
- constructor(zone, renderer) {
3827
+ constructor(zone, renderer, host) {
3567
3828
  super();
3568
3829
  this.zone = zone;
3569
3830
  this.renderer = renderer;
3831
+ this.host = host;
3570
3832
  this.getNextKey = getNextKey();
3571
3833
  this.getPrevKey = getPrevKey();
3572
3834
  this.isBuiltInTool = true;
3835
+ this.propertyChangeSub = this.host.propertyChange.subscribe(change => {
3836
+ if (change.property === 'showText' || change.property === 'showIcon') {
3837
+ this[change.property] = change.value;
3838
+ }
3839
+ });
3573
3840
  }
3574
3841
  ngOnInit() {
3575
3842
  this.setTextDisplayMode();
3576
3843
  }
3844
+ ngOnDestroy() {
3845
+ if (this.propertyChangeSub) {
3846
+ this.propertyChangeSub.unsubscribe();
3847
+ this.propertyChangeSub = null;
3848
+ }
3849
+ }
3577
3850
  ngAfterViewInit() {
3578
3851
  this.zone.onStable.pipe(take(1)).subscribe(() => {
3579
- const dropDownButton = this[`${this.location}DropDownButton`];
3580
- if (dropDownButton) {
3581
- this.renderer.addClass(dropDownButton.button.nativeElement, 'k-toolbar-menu-button');
3852
+ const dropdownButton = this[`${this.location}DropDownButton`];
3853
+ if (dropdownButton?.button) {
3854
+ this.renderer.addClass(dropdownButton.button.nativeElement, 'k-toolbar-menu-button');
3582
3855
  }
3583
3856
  });
3584
3857
  }
@@ -3590,6 +3863,12 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3590
3863
  .toArray()
3591
3864
  .findIndex(b => b.nativeElement.contains(ev.target));
3592
3865
  }
3866
+ /**
3867
+ * @hidden
3868
+ */
3869
+ get size() {
3870
+ return this.host.size;
3871
+ }
3593
3872
  /**
3594
3873
  * @hidden
3595
3874
  */
@@ -3632,7 +3911,6 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3632
3911
  if (dataItem) {
3633
3912
  return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
3634
3913
  }
3635
- return undefined;
3636
3914
  }
3637
3915
  /**
3638
3916
  * @hidden
@@ -3651,10 +3929,10 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3651
3929
  }
3652
3930
  }
3653
3931
  setTextDisplayMode() {
3654
- this.toolbarOptions.text = this.showText === 'overflow' ? undefined : this.text;
3655
- this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
3932
+ this.toolbarOptions.text = this.showText === 'menu' || this.showText === 'never' ? undefined : this.text;
3933
+ this.overflowOptions.text = this.showText === 'toolbar' || this.showText === 'never' ? undefined : this.text;
3656
3934
  }
3657
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarDropDownButtonComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
3935
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarDropDownButtonComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
3658
3936
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarDropDownButtonComponent, isStandalone: true, selector: "kendo-toolbar-dropdownbutton", inputs: { arrowIcon: "arrowIcon", title: "title", showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", popupSettings: "popupSettings", look: "look", primary: "primary", fillMode: "fillMode", themeColor: "themeColor", buttonClass: "buttonClass", textField: "textField", disabled: "disabled", data: "data" }, outputs: { itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarDropDownButtonComponent) }], viewQueries: [{ propertyName: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "toolbarDropDownButton", first: true, predicate: ["toolbarDropDownButton"], descendants: true }, { propertyName: "sectionDropDownButton", first: true, predicate: ["sectionDropDownButton"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarDropDownButton"], usesInheritance: true, ngImport: i0, template: `
3659
3937
  <ng-template #toolbarTemplate>
3660
3938
  <kendo-dropdownbutton #toolbarDropDownButton
@@ -3665,6 +3943,7 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3665
3943
  [arrowIcon]="arrowIcon"
3666
3944
  [buttonClass]="buttonClass"
3667
3945
  [disabled]="disabled"
3946
+ [size]="size"
3668
3947
  [tabIndex]="-1"
3669
3948
  [data]="data"
3670
3949
  [buttonAttributes]="{'title': title}"
@@ -3730,6 +4009,7 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3730
4009
  [arrowIcon]="arrowIcon"
3731
4010
  [buttonClass]="buttonClass"
3732
4011
  [disabled]="disabled"
4012
+ [size]="size"
3733
4013
  [tabIndex]="-1"
3734
4014
  [data]="data"
3735
4015
  [buttonAttributes]="{'title': title}"
@@ -3762,6 +4042,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3762
4042
  [arrowIcon]="arrowIcon"
3763
4043
  [buttonClass]="buttonClass"
3764
4044
  [disabled]="disabled"
4045
+ [size]="size"
3765
4046
  [tabIndex]="-1"
3766
4047
  [data]="data"
3767
4048
  [buttonAttributes]="{'title': title}"
@@ -3827,6 +4108,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3827
4108
  [arrowIcon]="arrowIcon"
3828
4109
  [buttonClass]="buttonClass"
3829
4110
  [disabled]="disabled"
4111
+ [size]="size"
3830
4112
  [tabIndex]="-1"
3831
4113
  [data]="data"
3832
4114
  [buttonAttributes]="{'title': title}"
@@ -3845,7 +4127,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3845
4127
  standalone: true,
3846
4128
  imports: [DropDownButtonComponent, NgClass, NgIf, IconWrapperComponent, NgFor]
3847
4129
  }]
3848
- }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { arrowIcon: [{
4130
+ }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.Renderer2 }, { type: ToolBarComponent }]; }, propDecorators: { arrowIcon: [{
3849
4131
  type: Input
3850
4132
  }], title: [{
3851
4133
  type: Input
@@ -3905,9 +4187,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3905
4187
  * Represents the [Kendo UI ToolBar SplitButton for Angular](slug:controltypes_toolbar#toc-split-buttons).
3906
4188
  */
3907
4189
  class ToolBarSplitButtonComponent extends ToolBarToolComponent {
4190
+ host;
3908
4191
  // showText and showIcon showIcon should be declared first
3909
4192
  /**
3910
- * Specifies where button text should be displayed
4193
+ * Specifies the button text visibility.
3911
4194
  */
3912
4195
  set showText(value) {
3913
4196
  this._showText = value;
@@ -3917,9 +4200,15 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
3917
4200
  return this._showText;
3918
4201
  }
3919
4202
  /**
3920
- * Specifies where button icon should be displayed
4203
+ * Specifies the button icon visibility.
3921
4204
  */
3922
- showIcon = 'both';
4205
+ set showIcon(value) {
4206
+ this._showIcon = value;
4207
+ this.setTextDisplayMode();
4208
+ }
4209
+ get showIcon() {
4210
+ return this._showIcon;
4211
+ }
3923
4212
  /**
3924
4213
  * Sets the text of the SplitButton ([see example](slug:controltypes_toolbar#toc-split-buttons)).
3925
4214
  */
@@ -4100,25 +4389,39 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
4100
4389
  ngOnInit() {
4101
4390
  this.setTextDisplayMode();
4102
4391
  }
4392
+ ngOnDestroy() {
4393
+ if (this.propertyChangeSub) {
4394
+ this.propertyChangeSub.unsubscribe();
4395
+ this.propertyChangeSub = null;
4396
+ }
4397
+ }
4103
4398
  get overflowButtons() {
4104
4399
  return [this.overflowMainButton, ...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
4105
4400
  }
4106
4401
  _data;
4107
4402
  _popupSettings = { animate: true, popupClass: '' };
4108
4403
  focusedIndex = -1;
4109
- _showText = 'both';
4404
+ _showText;
4405
+ _showIcon;
4110
4406
  _text;
4407
+ propertyChangeSub;
4111
4408
  getNextKey;
4112
4409
  getPrevKey;
4113
4410
  toolbarSplitButton;
4114
4411
  sectionSplitButton;
4115
4412
  overflowMainButton;
4116
4413
  overflowListItems;
4117
- constructor() {
4414
+ constructor(host) {
4118
4415
  super();
4416
+ this.host = host;
4119
4417
  this.getNextKey = getNextKey();
4120
4418
  this.getPrevKey = getPrevKey();
4121
4419
  this.isBuiltInTool = true;
4420
+ this.propertyChangeSub = this.host.propertyChange.subscribe(change => {
4421
+ if (change.property === 'showText' || change.property === 'showIcon') {
4422
+ this[change.property] = change.value;
4423
+ }
4424
+ });
4122
4425
  }
4123
4426
  /**
4124
4427
  * @hidden
@@ -4139,6 +4442,12 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
4139
4442
  canFocus() {
4140
4443
  return !this.disabled;
4141
4444
  }
4445
+ /**
4446
+ * @hidden
4447
+ */
4448
+ get size() {
4449
+ return this.host.size;
4450
+ }
4142
4451
  /**
4143
4452
  * @hidden
4144
4453
  */
@@ -4175,7 +4484,6 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
4175
4484
  if (dataItem) {
4176
4485
  return this.textField ? dataItem[this.textField] : dataItem.text || dataItem;
4177
4486
  }
4178
- return undefined;
4179
4487
  }
4180
4488
  /**
4181
4489
  * @hidden
@@ -4194,10 +4502,10 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
4194
4502
  }
4195
4503
  }
4196
4504
  setTextDisplayMode() {
4197
- this.toolbarOptions.text = this.showText === 'overflow' ? undefined : this.text;
4198
- this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
4505
+ this.toolbarOptions.text = this.showText === 'menu' || this.showText === 'never' ? undefined : this.text;
4506
+ this.overflowOptions.text = this.showText === 'toolbar' || this.showText === 'never' ? undefined : this.text;
4199
4507
  }
4200
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarSplitButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4508
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarSplitButtonComponent, deps: [{ token: ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
4201
4509
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ToolBarSplitButtonComponent, isStandalone: true, selector: "kendo-toolbar-splitbutton", inputs: { showText: "showText", showIcon: "showIcon", text: "text", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", disabled: "disabled", popupSettings: "popupSettings", fillMode: "fillMode", themeColor: "themeColor", look: "look", buttonClass: "buttonClass", arrowButtonClass: "arrowButtonClass", arrowButtonIcon: "arrowButtonIcon", arrowButtonSvgIcon: "arrowButtonSvgIcon", textField: "textField", data: "data" }, outputs: { buttonClick: "buttonClick", itemClick: "itemClick", open: "open", close: "close" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarSplitButtonComponent) }], viewQueries: [{ propertyName: "toolbarSplitButton", first: true, predicate: ["toolbarSplitButton"], descendants: true }, { propertyName: "sectionSplitButton", first: true, predicate: ["sectionSplitButton"], descendants: true }, { propertyName: "overflowMainButton", first: true, predicate: ["overflowMainButton"], descendants: true, read: ElementRef }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarSplitButton"], usesInheritance: true, ngImport: i0, template: `
4202
4510
  <ng-template #toolbarTemplate>
4203
4511
  <kendo-splitbutton
@@ -4214,6 +4522,7 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
4214
4522
  [arrowButtonIcon]="arrowButtonIcon"
4215
4523
  [arrowButtonSvgIcon]="arrowButtonSvgIcon"
4216
4524
  [disabled]="disabled"
4525
+ [size]="size"
4217
4526
  [tabIndex]="-1"
4218
4527
  [textField]="textField"
4219
4528
  [popupSettings]="popupSettings"
@@ -4283,6 +4592,7 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
4283
4592
  [arrowButtonIcon]="arrowButtonIcon"
4284
4593
  [arrowButtonSvgIcon]="arrowButtonSvgIcon"
4285
4594
  [disabled]="disabled"
4595
+ [size]="size"
4286
4596
  [tabIndex]="-1"
4287
4597
  [textField]="textField"
4288
4598
  [popupSettings]="popupSettings"
@@ -4318,6 +4628,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4318
4628
  [arrowButtonIcon]="arrowButtonIcon"
4319
4629
  [arrowButtonSvgIcon]="arrowButtonSvgIcon"
4320
4630
  [disabled]="disabled"
4631
+ [size]="size"
4321
4632
  [tabIndex]="-1"
4322
4633
  [textField]="textField"
4323
4634
  [popupSettings]="popupSettings"
@@ -4387,6 +4698,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4387
4698
  [arrowButtonIcon]="arrowButtonIcon"
4388
4699
  [arrowButtonSvgIcon]="arrowButtonSvgIcon"
4389
4700
  [disabled]="disabled"
4701
+ [size]="size"
4390
4702
  [tabIndex]="-1"
4391
4703
  [textField]="textField"
4392
4704
  [popupSettings]="popupSettings"
@@ -4402,7 +4714,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4402
4714
  standalone: true,
4403
4715
  imports: [SplitButtonComponent, NgClass, NgIf, IconWrapperComponent, NgFor]
4404
4716
  }]
4405
- }], ctorParameters: function () { return []; }, propDecorators: { showText: [{
4717
+ }], ctorParameters: function () { return [{ type: ToolBarComponent }]; }, propDecorators: { showText: [{
4406
4718
  type: Input
4407
4719
  }], showIcon: [{
4408
4720
  type: Input