@progress/kendo-angular-toolbar 19.0.0-develop.30 → 19.0.0-develop.32

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.
@@ -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: 1747836229,
30
- version: '19.0.0-develop.30',
29
+ publishDate: 1748002104,
30
+ version: '19.0.0-develop.32',
31
31
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
32
32
  };
33
33
 
@@ -634,14 +634,8 @@ class ToolBarRendererComponent {
634
634
  this.viewContainer = viewContainer;
635
635
  }
636
636
  ngOnInit() {
637
- const viewContainerRootNodes = this.viewContainer.get(0)?.rootNodes?.filter(isElementOrTextNode);
638
- if (!viewContainerRootNodes || viewContainerRootNodes.length === 0) {
639
- return;
640
- }
641
637
  this.tool.location = this.location;
642
- this.internalComponentRef = viewContainerRootNodes[0];
643
638
  this.element = this.tool.element;
644
- this.internalComponentRef.addEventListener('click', this.onClick);
645
639
  this.rendererService.element = this.element;
646
640
  this.rendererService.renderer = this;
647
641
  this.refreshSubscription = this.refreshService.onRefresh.subscribe((tool) => {
@@ -649,6 +643,18 @@ class ToolBarRendererComponent {
649
643
  this.refresh();
650
644
  }
651
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);
652
658
  if (this.resizable) {
653
659
  if (this.location === 'toolbar') {
654
660
  this.template = this.tool.toolbarTemplate;
@@ -685,12 +691,6 @@ class ToolBarRendererComponent {
685
691
  this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
686
692
  }
687
693
  }
688
- }
689
- ngOnDestroy() {
690
- this.refreshSubscription && this.refreshSubscription.unsubscribe();
691
- this.internalComponentRef && this.internalComponentRef.removeEventListener('click', this.onClick);
692
- }
693
- ngAfterViewInit() {
694
694
  if (this.resizable) {
695
695
  this.refresh();
696
696
  }
@@ -703,6 +703,9 @@ class ToolBarRendererComponent {
703
703
  if (this.isSpacer) {
704
704
  return MIN_SPACER_WIDTH;
705
705
  }
706
+ if (!this.internalComponentRef) {
707
+ return;
708
+ }
706
709
  return this.tool.overflows ? 0 : outerWidth(this.internalComponentRef);
707
710
  }
708
711
  isDisplayed() {
@@ -1235,29 +1238,31 @@ class ToolBarComponent {
1235
1238
  * Specifies the icons visibility for all tools in the ToolBar.
1236
1239
  * This can be overridden by the `showIcon` property of each tool.
1237
1240
  */
1238
- showIcon = 'always';
1239
- /**
1240
- * @hidden
1241
- */
1242
- get normalizedShowIcon() {
1243
- if (typeof this.showIcon === 'boolean') {
1244
- return this.showIcon ? 'always' : 'never';
1241
+ set showIcon(value) {
1242
+ if (this._showIcon === value) {
1243
+ return;
1245
1244
  }
1246
- return this.showIcon;
1245
+ const normalizedValue = this.normalizeDisplayValue(value);
1246
+ this._showIcon = value;
1247
+ this.propertyChange.emit({
1248
+ property: 'showIcon',
1249
+ value: normalizedValue
1250
+ });
1247
1251
  }
1248
1252
  /**
1249
1253
  * Specifies the text visibility for all tools in the ToolBar.
1250
1254
  * This can be overridden by the `showText` property of each tool.
1251
1255
  */
1252
- showText = 'always';
1253
- /**
1254
- * @hidden
1255
- */
1256
- get normalizedShowText() {
1257
- if (typeof this.showText === 'boolean') {
1258
- return this.showText ? 'always' : 'never';
1256
+ set showText(value) {
1257
+ if (this._showText === value) {
1258
+ return;
1259
1259
  }
1260
- return this.showText;
1260
+ const normalizedValue = this.normalizeDisplayValue(value);
1261
+ this._showText = value;
1262
+ this.propertyChange.emit({
1263
+ property: 'showText',
1264
+ value: normalizedValue
1265
+ });
1261
1266
  }
1262
1267
  /**
1263
1268
  * Fires when the overflow popup of the ToolBar is opened.
@@ -1315,6 +1320,10 @@ class ToolBarComponent {
1315
1320
  * @hidden
1316
1321
  */
1317
1322
  nextButtonIcon = caretAltRightIcon;
1323
+ /**
1324
+ * @hidden
1325
+ */
1326
+ propertyChange = new EventEmitter();
1318
1327
  hostClass = true;
1319
1328
  get scrollableClass() {
1320
1329
  return this.isScrollMode;
@@ -1333,6 +1342,8 @@ class ToolBarComponent {
1333
1342
  cachedGap;
1334
1343
  _size = DEFAULT_SIZE;
1335
1344
  _fillMode = DEFAULT_FILL_MODE;
1345
+ _showText = 'always';
1346
+ _showIcon = 'always';
1336
1347
  overflowButtonClickedTime = null;
1337
1348
  showAutoButtons = false;
1338
1349
  scrollButtonStateChangeSub;
@@ -2034,6 +2045,12 @@ class ToolBarComponent {
2034
2045
  }
2035
2046
  });
2036
2047
  }
2048
+ normalizeDisplayValue(value) {
2049
+ if (typeof value === 'boolean') {
2050
+ return value ? 'always' : 'never';
2051
+ }
2052
+ return value;
2053
+ }
2037
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 });
2038
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: [
2039
2056
  RefreshService,
@@ -2461,7 +2478,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2461
2478
  <kendo-resize-sensor *ngIf="overflowEnabled" #resizeSensor></kendo-resize-sensor>
2462
2479
  `,
2463
2480
  standalone: true,
2464
- imports: [NgTemplateOutlet, LocalizedToolbarMessagesDirective, NgFor, ToolBarRendererComponent, NgIf, ButtonComponent, NgClass, ResizeSensorComponent, ButtonGroupComponent, ToolbarScrollableButtonComponent]
2481
+ imports: [NgTemplateOutlet, LocalizedToolbarMessagesDirective, NgFor, ToolBarRendererComponent, NgIf, ButtonComponent, NgClass, ResizeSensorComponent, ToolbarScrollableButtonComponent]
2465
2482
  }]
2466
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: [{
2467
2484
  type: Input
@@ -2564,7 +2581,7 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2564
2581
  this.setTextDisplayMode();
2565
2582
  }
2566
2583
  get showText() {
2567
- return this._showText || this.host.normalizedShowText;
2584
+ return this._showText;
2568
2585
  }
2569
2586
  /**
2570
2587
  * Specifies the button icon visibility.
@@ -2574,7 +2591,7 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2574
2591
  this.setTextDisplayMode();
2575
2592
  }
2576
2593
  get showIcon() {
2577
- return this._showIcon || this.host.normalizedShowIcon;
2594
+ return this._showIcon;
2578
2595
  }
2579
2596
  /**
2580
2597
  * Specifies the text of the Button ([see example]({% slug controltypes_toolbar %}#toc-buttons)).
@@ -2586,6 +2603,12 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2586
2603
  get text() {
2587
2604
  return this._text;
2588
2605
  }
2606
+ /**
2607
+ * @hidden
2608
+ */
2609
+ get size() {
2610
+ return this.host.size;
2611
+ }
2589
2612
  /**
2590
2613
  * Specifies custom inline CSS styles of the Button.
2591
2614
  */
@@ -2729,6 +2752,10 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2729
2752
  svgIcon: null,
2730
2753
  imageUrl: ''
2731
2754
  };
2755
+ /**
2756
+ * @hidden
2757
+ */
2758
+ hasBadgeContainer = false;
2732
2759
  /**
2733
2760
  * @hidden
2734
2761
  */
@@ -2739,16 +2766,26 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2739
2766
  _showText;
2740
2767
  _showIcon;
2741
2768
  _text;
2769
+ propertyChangeSub;
2742
2770
  constructor(element, zone, host) {
2743
2771
  super();
2744
2772
  this.element = element;
2745
2773
  this.zone = zone;
2746
2774
  this.host = host;
2747
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
+ });
2748
2781
  }
2749
2782
  ngOnInit() {
2750
2783
  this.setTextDisplayMode();
2751
2784
  }
2785
+ ngOnDestroy() {
2786
+ this.propertyChangeSub.unsubscribe();
2787
+ this.propertyChangeSub = null;
2788
+ }
2752
2789
  /**
2753
2790
  * @hidden
2754
2791
  */
@@ -2810,13 +2847,45 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2810
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 });
2811
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: `
2812
2849
  <ng-template #toolbarTemplate>
2813
- <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"
2814
2882
  #toolbarButton
2815
2883
  [class.k-toolbar-button]="!toggleable"
2816
2884
  [class.k-toolbar-toggle-button]="toggleable"
2817
2885
  [tabindex]="tabIndex"
2818
2886
  type="button"
2819
2887
  kendoButton
2888
+ [size]="size"
2820
2889
  [ngStyle]="style"
2821
2890
  [ngClass]="className"
2822
2891
  [attr.title]="title"
@@ -2835,7 +2904,6 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2835
2904
  (blur)="onBlur()"
2836
2905
  >
2837
2906
  {{ toolbarOptions.text }}
2838
- <kendo-badge *ngIf="showBadge"></kendo-badge>
2839
2907
  </button>
2840
2908
  </ng-template>
2841
2909
  <ng-template #popupTemplate>
@@ -2863,13 +2931,45 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2863
2931
  </div>
2864
2932
  </ng-template>
2865
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>
2866
2964
  <button
2965
+ *ngIf="!hasBadgeContainer"
2867
2966
  #sectionButton
2868
2967
  [class.k-toolbar-button]="!toggleable"
2869
2968
  [class.k-toolbar-toggle-button]="toggleable"
2870
2969
  [tabindex]="tabIndex"
2871
2970
  type="button"
2872
2971
  kendoButton
2972
+ [size]="size"
2873
2973
  [ngStyle]="style"
2874
2974
  [ngClass]="className"
2875
2975
  [attr.title]="title"
@@ -2890,7 +2990,7 @@ class ToolBarButtonComponent extends ToolBarToolComponent {
2890
2990
  {{ toolbarOptions.text }}
2891
2991
  </button>
2892
2992
  </ng-template>
2893
- `, 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" }] });
2894
2994
  }
2895
2995
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonComponent, decorators: [{
2896
2996
  type: Component,
@@ -2900,13 +3000,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2900
3000
  selector: 'kendo-toolbar-button',
2901
3001
  template: `
2902
3002
  <ng-template #toolbarTemplate>
2903
- <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"
2904
3035
  #toolbarButton
2905
3036
  [class.k-toolbar-button]="!toggleable"
2906
3037
  [class.k-toolbar-toggle-button]="toggleable"
2907
3038
  [tabindex]="tabIndex"
2908
3039
  type="button"
2909
3040
  kendoButton
3041
+ [size]="size"
2910
3042
  [ngStyle]="style"
2911
3043
  [ngClass]="className"
2912
3044
  [attr.title]="title"
@@ -2925,7 +3057,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2925
3057
  (blur)="onBlur()"
2926
3058
  >
2927
3059
  {{ toolbarOptions.text }}
2928
- <kendo-badge *ngIf="showBadge"></kendo-badge>
2929
3060
  </button>
2930
3061
  </ng-template>
2931
3062
  <ng-template #popupTemplate>
@@ -2953,13 +3084,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2953
3084
  </div>
2954
3085
  </ng-template>
2955
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>
2956
3117
  <button
3118
+ *ngIf="!hasBadgeContainer"
2957
3119
  #sectionButton
2958
3120
  [class.k-toolbar-button]="!toggleable"
2959
3121
  [class.k-toolbar-toggle-button]="toggleable"
2960
3122
  [tabindex]="tabIndex"
2961
3123
  type="button"
2962
3124
  kendoButton
3125
+ [size]="size"
2963
3126
  [ngStyle]="style"
2964
3127
  [ngClass]="className"
2965
3128
  [attr.title]="title"
@@ -2982,7 +3145,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2982
3145
  </ng-template>
2983
3146
  `,
2984
3147
  standalone: true,
2985
- imports: [ButtonComponent, NgStyle, NgClass, NgIf, IconWrapperComponent, BadgeComponent],
3148
+ imports: [ButtonComponent, NgStyle, NgClass, NgIf, IconWrapperComponent, BadgeComponent, BadgeContainerComponent],
2986
3149
  }]
2987
3150
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: ToolBarComponent }]; }, propDecorators: { showText: [{
2988
3151
  type: Input
@@ -3040,6 +3203,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3040
3203
  */
3041
3204
  class ToolBarButtonGroupComponent extends ToolBarToolComponent {
3042
3205
  localization;
3206
+ host;
3043
3207
  /**
3044
3208
  * By default, the ButtonGroup is enabled. To disable the whole group of buttons, set its `disabled`
3045
3209
  * attribute to `true`. To disable a specific button, set the `disabled` attribute of the button to
@@ -3096,9 +3260,10 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
3096
3260
  focusedIndex = -1;
3097
3261
  getNextKey;
3098
3262
  getPrevKey;
3099
- constructor(localization) {
3263
+ constructor(localization, host) {
3100
3264
  super();
3101
3265
  this.localization = localization;
3266
+ this.host = host;
3102
3267
  this.getNextKey = getNextKey(this.localization.rtl);
3103
3268
  this.getPrevKey = getPrevKey(this.localization.rtl);
3104
3269
  this.isBuiltInTool = true;
@@ -3193,13 +3358,19 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
3193
3358
  return button.overflowOptions.svgIcon;
3194
3359
  }
3195
3360
  }
3361
+ /**
3362
+ * @hidden
3363
+ */
3364
+ get size() {
3365
+ return this.host.size;
3366
+ }
3196
3367
  focusButton(index, ev) {
3197
3368
  // Guard against focusing twice on mousedown.
3198
3369
  if (!ev.type || ev.type === 'focus' || ev.type === 'keydown') {
3199
3370
  this.buttonElements[index]?.focus();
3200
3371
  }
3201
3372
  }
3202
- 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 });
3203
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: `
3204
3375
  <ng-template #toolbarTemplate>
3205
3376
  <kendo-buttongroup
@@ -3220,6 +3391,7 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
3220
3391
  [ngClass]="button.className"
3221
3392
  [attr.title]="button.title"
3222
3393
  [disabled]="button.disabled"
3394
+ [size]="size"
3223
3395
  [togglable]="button.togglable"
3224
3396
  [selected]="button.selected"
3225
3397
  [attr.aria-pressed]="button.selected ? true : false"
@@ -3281,6 +3453,7 @@ class ToolBarButtonGroupComponent extends ToolBarToolComponent {
3281
3453
  [ngClass]="button.className"
3282
3454
  [attr.title]="button.title"
3283
3455
  [disabled]="button.disabled"
3456
+ [size]="size"
3284
3457
  [togglable]="button.togglable"
3285
3458
  [selected]="button.selected"
3286
3459
  [attr.aria-pressed]="button.selected ? true : false"
@@ -3326,6 +3499,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3326
3499
  [ngClass]="button.className"
3327
3500
  [attr.title]="button.title"
3328
3501
  [disabled]="button.disabled"
3502
+ [size]="size"
3329
3503
  [togglable]="button.togglable"
3330
3504
  [selected]="button.selected"
3331
3505
  [attr.aria-pressed]="button.selected ? true : false"
@@ -3387,6 +3561,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3387
3561
  [ngClass]="button.className"
3388
3562
  [attr.title]="button.title"
3389
3563
  [disabled]="button.disabled"
3564
+ [size]="size"
3390
3565
  [togglable]="button.togglable"
3391
3566
  [selected]="button.selected"
3392
3567
  [attr.aria-pressed]="button.selected ? true : false"
@@ -3408,7 +3583,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3408
3583
  standalone: true,
3409
3584
  imports: [ButtonGroupComponent, NgFor, ButtonComponent, NgStyle, NgClass, NgIf, IconWrapperComponent]
3410
3585
  }]
3411
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { disabled: [{
3586
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: ToolBarComponent }]; }, propDecorators: { disabled: [{
3412
3587
  type: Input
3413
3588
  }], fillMode: [{
3414
3589
  type: Input
@@ -3458,7 +3633,7 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3458
3633
  this.setTextDisplayMode();
3459
3634
  }
3460
3635
  get showText() {
3461
- return this._showText || this.host.normalizedShowText;
3636
+ return this._showText;
3462
3637
  }
3463
3638
  /**
3464
3639
  * Specifies the button icon visibility.
@@ -3467,7 +3642,7 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3467
3642
  this._showIcon = value;
3468
3643
  }
3469
3644
  get showIcon() {
3470
- return this._showIcon || this.host.normalizedShowIcon;
3645
+ return this._showIcon;
3471
3646
  }
3472
3647
  /**
3473
3648
  * Sets the text of the DropDownButton
@@ -3646,6 +3821,7 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3646
3821
  _showText;
3647
3822
  _showIcon;
3648
3823
  _text;
3824
+ propertyChangeSub;
3649
3825
  getNextKey;
3650
3826
  getPrevKey;
3651
3827
  constructor(zone, renderer, host) {
@@ -3656,10 +3832,21 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3656
3832
  this.getNextKey = getNextKey();
3657
3833
  this.getPrevKey = getPrevKey();
3658
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
+ });
3659
3840
  }
3660
3841
  ngOnInit() {
3661
3842
  this.setTextDisplayMode();
3662
3843
  }
3844
+ ngOnDestroy() {
3845
+ if (this.propertyChangeSub) {
3846
+ this.propertyChangeSub.unsubscribe();
3847
+ this.propertyChangeSub = null;
3848
+ }
3849
+ }
3663
3850
  ngAfterViewInit() {
3664
3851
  this.zone.onStable.pipe(take(1)).subscribe(() => {
3665
3852
  const dropdownButton = this[`${this.location}DropDownButton`];
@@ -3676,6 +3863,12 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3676
3863
  .toArray()
3677
3864
  .findIndex(b => b.nativeElement.contains(ev.target));
3678
3865
  }
3866
+ /**
3867
+ * @hidden
3868
+ */
3869
+ get size() {
3870
+ return this.host.size;
3871
+ }
3679
3872
  /**
3680
3873
  * @hidden
3681
3874
  */
@@ -3750,6 +3943,7 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3750
3943
  [arrowIcon]="arrowIcon"
3751
3944
  [buttonClass]="buttonClass"
3752
3945
  [disabled]="disabled"
3946
+ [size]="size"
3753
3947
  [tabIndex]="-1"
3754
3948
  [data]="data"
3755
3949
  [buttonAttributes]="{'title': title}"
@@ -3815,6 +4009,7 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
3815
4009
  [arrowIcon]="arrowIcon"
3816
4010
  [buttonClass]="buttonClass"
3817
4011
  [disabled]="disabled"
4012
+ [size]="size"
3818
4013
  [tabIndex]="-1"
3819
4014
  [data]="data"
3820
4015
  [buttonAttributes]="{'title': title}"
@@ -3847,6 +4042,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3847
4042
  [arrowIcon]="arrowIcon"
3848
4043
  [buttonClass]="buttonClass"
3849
4044
  [disabled]="disabled"
4045
+ [size]="size"
3850
4046
  [tabIndex]="-1"
3851
4047
  [data]="data"
3852
4048
  [buttonAttributes]="{'title': title}"
@@ -3912,6 +4108,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3912
4108
  [arrowIcon]="arrowIcon"
3913
4109
  [buttonClass]="buttonClass"
3914
4110
  [disabled]="disabled"
4111
+ [size]="size"
3915
4112
  [tabIndex]="-1"
3916
4113
  [data]="data"
3917
4114
  [buttonAttributes]="{'title': title}"
@@ -3996,31 +4193,21 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
3996
4193
  * Specifies the button text visibility.
3997
4194
  */
3998
4195
  set showText(value) {
3999
- if (!isPresent$1(value)) {
4000
- this._showText = this.host.normalizedShowText;
4001
- }
4002
- else {
4003
- this._showText = value;
4004
- }
4196
+ this._showText = value;
4005
4197
  this.setTextDisplayMode();
4006
4198
  }
4007
4199
  get showText() {
4008
- return this._showText || this.host.normalizedShowText;
4200
+ return this._showText;
4009
4201
  }
4010
4202
  /**
4011
4203
  * Specifies the button icon visibility.
4012
4204
  */
4013
4205
  set showIcon(value) {
4014
- if (!isPresent$1(value)) {
4015
- this._showIcon = this.host.normalizedShowIcon;
4016
- }
4017
- else {
4018
- this._showIcon = value;
4019
- }
4206
+ this._showIcon = value;
4020
4207
  this.setTextDisplayMode();
4021
4208
  }
4022
4209
  get showIcon() {
4023
- return this._showIcon || this.host.normalizedShowIcon;
4210
+ return this._showIcon;
4024
4211
  }
4025
4212
  /**
4026
4213
  * Sets the text of the SplitButton ([see example](slug:controltypes_toolbar#toc-split-buttons)).
@@ -4202,6 +4389,12 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
4202
4389
  ngOnInit() {
4203
4390
  this.setTextDisplayMode();
4204
4391
  }
4392
+ ngOnDestroy() {
4393
+ if (this.propertyChangeSub) {
4394
+ this.propertyChangeSub.unsubscribe();
4395
+ this.propertyChangeSub = null;
4396
+ }
4397
+ }
4205
4398
  get overflowButtons() {
4206
4399
  return [this.overflowMainButton, ...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
4207
4400
  }
@@ -4211,6 +4404,7 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
4211
4404
  _showText;
4212
4405
  _showIcon;
4213
4406
  _text;
4407
+ propertyChangeSub;
4214
4408
  getNextKey;
4215
4409
  getPrevKey;
4216
4410
  toolbarSplitButton;
@@ -4223,6 +4417,11 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
4223
4417
  this.getNextKey = getNextKey();
4224
4418
  this.getPrevKey = getPrevKey();
4225
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
+ });
4226
4425
  }
4227
4426
  /**
4228
4427
  * @hidden
@@ -4243,6 +4442,12 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
4243
4442
  canFocus() {
4244
4443
  return !this.disabled;
4245
4444
  }
4445
+ /**
4446
+ * @hidden
4447
+ */
4448
+ get size() {
4449
+ return this.host.size;
4450
+ }
4246
4451
  /**
4247
4452
  * @hidden
4248
4453
  */
@@ -4317,6 +4522,7 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
4317
4522
  [arrowButtonIcon]="arrowButtonIcon"
4318
4523
  [arrowButtonSvgIcon]="arrowButtonSvgIcon"
4319
4524
  [disabled]="disabled"
4525
+ [size]="size"
4320
4526
  [tabIndex]="-1"
4321
4527
  [textField]="textField"
4322
4528
  [popupSettings]="popupSettings"
@@ -4386,6 +4592,7 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
4386
4592
  [arrowButtonIcon]="arrowButtonIcon"
4387
4593
  [arrowButtonSvgIcon]="arrowButtonSvgIcon"
4388
4594
  [disabled]="disabled"
4595
+ [size]="size"
4389
4596
  [tabIndex]="-1"
4390
4597
  [textField]="textField"
4391
4598
  [popupSettings]="popupSettings"
@@ -4421,6 +4628,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4421
4628
  [arrowButtonIcon]="arrowButtonIcon"
4422
4629
  [arrowButtonSvgIcon]="arrowButtonSvgIcon"
4423
4630
  [disabled]="disabled"
4631
+ [size]="size"
4424
4632
  [tabIndex]="-1"
4425
4633
  [textField]="textField"
4426
4634
  [popupSettings]="popupSettings"
@@ -4490,6 +4698,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4490
4698
  [arrowButtonIcon]="arrowButtonIcon"
4491
4699
  [arrowButtonSvgIcon]="arrowButtonSvgIcon"
4492
4700
  [disabled]="disabled"
4701
+ [size]="size"
4493
4702
  [tabIndex]="-1"
4494
4703
  [textField]="textField"
4495
4704
  [popupSettings]="popupSettings"