@progress/kendo-angular-toolbar 19.0.0-develop.3 → 19.0.0-develop.31

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.
@@ -0,0 +1,53 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 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
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || function (mod) {
23
+ if (mod && mod.__esModule) return mod;
24
+ var result = {};
25
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
+ __setModuleDefault(result, mod);
27
+ return result;
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ const index_1 = require("../template-transformer/index");
31
+ const utils_1 = require("../utils");
32
+ const fs = __importStar(require("fs"));
33
+ function default_1(fileInfo, api) {
34
+ const filePath = fileInfo.path;
35
+ if (filePath.endsWith('.html')) {
36
+ let updatedContent = fileInfo.source;
37
+ updatedContent = (0, utils_1.htmlAttributeValueTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-toolbar-button', 'showIcon', 'overflow', 'menu');
38
+ updatedContent = (0, utils_1.htmlAttributeValueTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-toolbar-button', 'showIcon', 'both', 'always');
39
+ // Only write to file once after all transformations
40
+ fs.writeFileSync(filePath, updatedContent, 'utf-8');
41
+ return;
42
+ }
43
+ const j = api.jscodeshift;
44
+ const rootSource = j(fileInfo.source);
45
+ (0, index_1.templateTransformer)(rootSource, j, (root) => {
46
+ (0, utils_1.templateAttributeValueTransformer)(root, 'kendo-toolbar-button', 'showIcon', 'overflow', 'menu');
47
+ (0, utils_1.templateAttributeValueTransformer)(root, 'kendo-toolbar-button', 'showIcon', 'both', 'always');
48
+ });
49
+ (0, utils_1.tsPropertyValueTransformer)(rootSource, j, 'DisplayMode', 'overflow', 'menu');
50
+ (0, utils_1.tsPropertyValueTransformer)(rootSource, j, 'DisplayMode', 'both', 'always');
51
+ return rootSource.toSource();
52
+ }
53
+ exports.default = default_1;
@@ -0,0 +1,53 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 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
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || function (mod) {
23
+ if (mod && mod.__esModule) return mod;
24
+ var result = {};
25
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
+ __setModuleDefault(result, mod);
27
+ return result;
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ const index_1 = require("../template-transformer/index");
31
+ const utils_1 = require("../utils");
32
+ const fs = __importStar(require("fs"));
33
+ function default_1(fileInfo, api) {
34
+ const filePath = fileInfo.path;
35
+ if (filePath.endsWith('.html')) {
36
+ let updatedContent = fileInfo.source;
37
+ updatedContent = (0, utils_1.htmlAttributeValueTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-toolbar-button', 'showText', 'overflow', 'menu');
38
+ updatedContent = (0, utils_1.htmlAttributeValueTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-toolbar-button', 'showText', 'both', 'always');
39
+ // Only write to file once after all transformations
40
+ fs.writeFileSync(filePath, updatedContent, 'utf-8');
41
+ return;
42
+ }
43
+ const j = api.jscodeshift;
44
+ const rootSource = j(fileInfo.source);
45
+ (0, index_1.templateTransformer)(rootSource, j, (root) => {
46
+ (0, utils_1.templateAttributeValueTransformer)(root, 'kendo-toolbar-button', 'showText', 'overflow', 'menu');
47
+ (0, utils_1.templateAttributeValueTransformer)(root, 'kendo-toolbar-button', 'showText', 'both', 'always');
48
+ });
49
+ (0, utils_1.tsPropertyValueTransformer)(rootSource, j, 'DisplayMode', 'overflow', 'menu');
50
+ (0, utils_1.tsPropertyValueTransformer)(rootSource, j, 'DisplayMode', 'both', 'always');
51
+ return rootSource.toSource();
52
+ }
53
+ exports.default = default_1;
package/display-mode.d.ts CHANGED
@@ -3,8 +3,14 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
6
- * The position of the text inside the Toolbar buttons.
6
+ * Specifies the visibility of the toolbar tool text or icon.
7
7
  *
8
- * @default 'both'
8
+ * The possible values are:
9
+ * - `always`—The text or icon is always visible, regardless of the current overflow mode.
10
+ * - `toolbar`—The text or icon is displayed in the main ToolBar and in the overflow element when `section` overflow mode is used.
11
+ * - `menu`—The text or icon is displayed only in the overflow popup when `menu` overflow mode is used.
12
+ * - `never`—The text or icon is never rendered.
13
+ *
14
+ * @default 'always'
9
15
  */
10
- export type DisplayMode = 'both' | 'toolbar' | 'overflow';
16
+ export type DisplayMode = 'always' | 'toolbar' | 'menu' | 'never';
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1745498572,
14
- version: '19.0.0-develop.3',
13
+ publishDate: 1747923818,
14
+ version: '19.0.0-develop.31',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -3,6 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { Input, Renderer2 as Renderer, Output, EventEmitter, Directive, ViewContainerRef } from '@angular/core';
6
+ import { isPresent } from '@progress/kendo-angular-common';
6
7
  import { ToolBarToolComponent } from './tools/toolbar-tool.component';
7
8
  import { RefreshService } from './refresh.service';
8
9
  import { RendererService } from './renderer.service';
@@ -59,24 +60,38 @@ export class ToolBarRendererComponent {
59
60
  if (this.resizable) {
60
61
  if (this.location === 'toolbar') {
61
62
  this.template = this.tool.toolbarTemplate;
62
- this.renderer.setStyle(this.internalComponentRef, 'visibility', 'hidden');
63
- this.renderer.setStyle(this.internalComponentRef, 'display', 'none');
63
+ this.hideTool();
64
64
  }
65
65
  else if (this.location === 'section') {
66
66
  this.template = this.tool.toolbarTemplate;
67
- this.renderer.setStyle(this.internalComponentRef, 'visibility', 'visible');
68
- this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
67
+ if (this.tool.isHidden) {
68
+ this.hideTool();
69
+ }
70
+ else {
71
+ this.renderer.setStyle(this.internalComponentRef, 'visibility', 'visible');
72
+ this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
73
+ }
69
74
  }
70
75
  else {
71
76
  this.template = this.tool.popupTemplate;
72
- this.renderer.setStyle(this.internalComponentRef, 'display', 'none');
77
+ if (this.tool.isHidden) {
78
+ this.hideTool();
79
+ }
80
+ else {
81
+ this.renderer.setStyle(this.internalComponentRef, 'display', 'none');
82
+ }
73
83
  }
74
84
  }
75
85
  else {
76
86
  this.tool.overflows = false;
77
87
  this.template = this.tool.toolbarTemplate;
78
- this.renderer.setStyle(this.internalComponentRef, 'visibility', 'visible');
79
- this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
88
+ if (this.tool.isHidden) {
89
+ this.hideTool();
90
+ }
91
+ else {
92
+ this.renderer.setStyle(this.internalComponentRef, 'visibility', 'visible');
93
+ this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
94
+ }
80
95
  }
81
96
  }
82
97
  ngOnDestroy() {
@@ -103,7 +118,13 @@ export class ToolBarRendererComponent {
103
118
  }
104
119
  refresh() {
105
120
  this.tool.location = this.location;
106
- if (this.resizable && this.internalComponentRef) {
121
+ if (!isPresent(this.internalComponentRef)) {
122
+ return;
123
+ }
124
+ if (this.tool.isHidden) {
125
+ this.hideTool();
126
+ }
127
+ else if (this.resizable) {
107
128
  if (this.location === 'toolbar') {
108
129
  this.renderer.setStyle(this.internalComponentRef, 'visibility', this.tool.visibility);
109
130
  this.renderer.setStyle(this.internalComponentRef, 'display', this.tool.toolbarDisplay);
@@ -111,8 +132,12 @@ export class ToolBarRendererComponent {
111
132
  else {
112
133
  this.renderer.setStyle(this.internalComponentRef, 'display', this.tool.overflowDisplay);
113
134
  }
114
- this.updateTools();
115
135
  }
136
+ else {
137
+ this.renderer.setStyle(this.internalComponentRef, 'visibility', 'visible');
138
+ this.renderer.setStyle(this.internalComponentRef, 'display', 'inline-flex');
139
+ }
140
+ this.updateTools();
116
141
  }
117
142
  setAttribute(element, attr, value) {
118
143
  this.renderer.setAttribute(element, attr, value);
@@ -138,6 +163,10 @@ export class ToolBarRendererComponent {
138
163
  }
139
164
  }
140
165
  }
166
+ hideTool() {
167
+ this.renderer.setStyle(this.internalComponentRef, 'visibility', 'hidden');
168
+ this.renderer.setStyle(this.internalComponentRef, 'display', 'none');
169
+ }
141
170
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarRendererComponent, deps: [{ token: i0.Renderer2 }, { token: i1.RendererService }, { token: i2.RefreshService }, { token: i3.ToolbarToolsService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
142
171
  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 });
143
172
  }
@@ -21,7 +21,7 @@ import { take, takeUntil } from 'rxjs/operators';
21
21
  import { filter } from 'rxjs/operators';
22
22
  import { isDocumentAvailable } from '@progress/kendo-angular-common';
23
23
  import { caretAltLeftIcon, caretAltRightIcon, moreHorizontalIcon, moreVerticalIcon } from '@progress/kendo-svg-icons';
24
- import { ButtonComponent, ButtonGroupComponent } from '@progress/kendo-angular-buttons';
24
+ import { ButtonComponent } from '@progress/kendo-angular-buttons';
25
25
  import { NgFor, NgIf, NgClass, NgTemplateOutlet } from '@angular/common';
26
26
  import { LocalizedToolbarMessagesDirective } from './localization/localized-toolbar-messages.directive';
27
27
  import { ToolbarToolsService } from './tools/tools.service';
@@ -178,6 +178,36 @@ export class ToolBarComponent {
178
178
  get tabIndex() {
179
179
  return this.tabindex;
180
180
  }
181
+ /**
182
+ * Specifies the icons visibility for all tools in the ToolBar.
183
+ * This can be overridden by the `showIcon` property of each tool.
184
+ */
185
+ set showIcon(value) {
186
+ if (this._showIcon === value) {
187
+ return;
188
+ }
189
+ const normalizedValue = this.normalizeDisplayValue(value);
190
+ this._showIcon = value;
191
+ this.propertyChange.emit({
192
+ property: 'showIcon',
193
+ value: normalizedValue
194
+ });
195
+ }
196
+ /**
197
+ * Specifies the text visibility for all tools in the ToolBar.
198
+ * This can be overridden by the `showText` property of each tool.
199
+ */
200
+ set showText(value) {
201
+ if (this._showText === value) {
202
+ return;
203
+ }
204
+ const normalizedValue = this.normalizeDisplayValue(value);
205
+ this._showText = value;
206
+ this.propertyChange.emit({
207
+ property: 'showText',
208
+ value: normalizedValue
209
+ });
210
+ }
181
211
  /**
182
212
  * Fires when the overflow popup of the ToolBar is opened.
183
213
  */
@@ -234,6 +264,10 @@ export class ToolBarComponent {
234
264
  * @hidden
235
265
  */
236
266
  nextButtonIcon = caretAltRightIcon;
267
+ /**
268
+ * @hidden
269
+ */
270
+ propertyChange = new EventEmitter();
237
271
  hostClass = true;
238
272
  get scrollableClass() {
239
273
  return this.isScrollMode;
@@ -252,6 +286,8 @@ export class ToolBarComponent {
252
286
  cachedGap;
253
287
  _size = DEFAULT_SIZE;
254
288
  _fillMode = DEFAULT_FILL_MODE;
289
+ _showText = 'always';
290
+ _showIcon = 'always';
255
291
  overflowButtonClickedTime = null;
256
292
  showAutoButtons = false;
257
293
  scrollButtonStateChangeSub;
@@ -789,10 +825,10 @@ export class ToolBarComponent {
789
825
  if (containerWidth > childrenWidth) {
790
826
  for (let i = this.overflowTools.length - 1; i >= 0; i--) {
791
827
  width = this.showFirstHiddenTool(containerWidth, childrenWidth);
792
- if (width) {
828
+ if (width > 0) {
793
829
  childrenWidth += width + this.gap;
794
830
  }
795
- else {
831
+ else if (width === 0) {
796
832
  break;
797
833
  }
798
834
  }
@@ -827,7 +863,7 @@ export class ToolBarComponent {
827
863
  tool.overflows = true;
828
864
  }
829
865
  this.refreshService.refresh(tool);
830
- return renderedElement.width; // returns 0 if `overflows` is true
866
+ return tool.isHidden ? -1 : renderedElement.width; // returns 0 if `overflows` is true and -1 if the tool is hidden
831
867
  }
832
868
  setPopupContentDimensions(isSection) {
833
869
  const popupContentContainer = this.popupRef.popup.instance.contentContainer.nativeElement;
@@ -953,8 +989,14 @@ export class ToolBarComponent {
953
989
  }
954
990
  });
955
991
  }
992
+ normalizeDisplayValue(value) {
993
+ if (typeof value === 'boolean') {
994
+ return value ? 'always' : 'never';
995
+ }
996
+ return value;
997
+ }
956
998
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarComponent, deps: [{ token: i1.LocalizationService }, { token: i2.PopupService }, { token: i3.RefreshService }, { token: i4.NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i5.ToolbarToolsService }, { token: i6.ScrollService }], target: i0.ɵɵFactoryTarget.Component });
957
- 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: [
999
+ 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: [
958
1000
  RefreshService,
959
1001
  NavigationService,
960
1002
  LocalizationService,
@@ -1380,7 +1422,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1380
1422
  <kendo-resize-sensor *ngIf="overflowEnabled" #resizeSensor></kendo-resize-sensor>
1381
1423
  `,
1382
1424
  standalone: true,
1383
- imports: [NgTemplateOutlet, LocalizedToolbarMessagesDirective, NgFor, ToolBarRendererComponent, NgIf, ButtonComponent, NgClass, ResizeSensorComponent, ButtonGroupComponent, ToolbarScrollableButtonComponent]
1425
+ imports: [NgTemplateOutlet, LocalizedToolbarMessagesDirective, NgFor, ToolBarRendererComponent, NgIf, ButtonComponent, NgClass, ResizeSensorComponent, ToolbarScrollableButtonComponent]
1384
1426
  }]
1385
1427
  }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i2.PopupService }, { type: i3.RefreshService }, { type: i4.NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i5.ToolbarToolsService }, { type: i6.ScrollService }]; }, propDecorators: { overflow: [{
1386
1428
  type: Input
@@ -1397,6 +1439,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1397
1439
  }], tabIndex: [{
1398
1440
  type: Input,
1399
1441
  args: ['tabIndex']
1442
+ }], showIcon: [{
1443
+ type: Input
1444
+ }], showText: [{
1445
+ type: Input
1400
1446
  }], open: [{
1401
1447
  type: Output
1402
1448
  }], close: [{
@@ -10,16 +10,19 @@ import { take } from 'rxjs/operators';
10
10
  import { IconWrapperComponent } from '@progress/kendo-angular-icons';
11
11
  import { BadgeComponent } from '@progress/kendo-angular-indicators';
12
12
  import { NgStyle, NgClass, NgIf } from '@angular/common';
13
+ import { ToolBarComponent } from '../toolbar.component';
13
14
  import * as i0 from "@angular/core";
15
+ import * as i1 from "../toolbar.component";
14
16
  /**
15
17
  * Represents the [Kendo UI ToolBar Button tool for Angular]({% slug controltypes_toolbar %}#toc-buttons).
16
18
  */
17
19
  export class ToolBarButtonComponent extends ToolBarToolComponent {
18
20
  element;
19
21
  zone;
22
+ host;
20
23
  // showText and showIcon showIcon should be declared first
21
24
  /**
22
- * Specifies where button text should be displayed
25
+ * Specifies the button text visibility.
23
26
  */
24
27
  set showText(value) {
25
28
  this._showText = value;
@@ -29,9 +32,15 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
29
32
  return this._showText;
30
33
  }
31
34
  /**
32
- * Specifies where button icon should be displayed
35
+ * Specifies the button icon visibility.
33
36
  */
34
- showIcon = 'both';
37
+ set showIcon(value) {
38
+ this._showIcon = value;
39
+ this.setTextDisplayMode();
40
+ }
41
+ get showIcon() {
42
+ return this._showIcon;
43
+ }
35
44
  /**
36
45
  * Specifies the text of the Button ([see example]({% slug controltypes_toolbar %}#toc-buttons)).
37
46
  */
@@ -42,6 +51,12 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
42
51
  get text() {
43
52
  return this._text;
44
53
  }
54
+ /**
55
+ * @hidden
56
+ */
57
+ get size() {
58
+ return this.host.size;
59
+ }
45
60
  /**
46
61
  * Specifies custom inline CSS styles of the Button.
47
62
  */
@@ -192,17 +207,29 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
192
207
  toolbarButtonElement;
193
208
  sectionButtonElement;
194
209
  overflowButtonElement;
195
- _showText = 'both';
210
+ _showText;
211
+ _showIcon;
196
212
  _text;
197
- constructor(element, zone) {
213
+ propertyChangeSub;
214
+ constructor(element, zone, host) {
198
215
  super();
199
216
  this.element = element;
200
217
  this.zone = zone;
218
+ this.host = host;
201
219
  this.isBuiltInTool = true;
220
+ this.propertyChangeSub = this.host.propertyChange.subscribe(change => {
221
+ if (change.property === 'showText' || change.property === 'showIcon') {
222
+ this[change.property] = change.value;
223
+ }
224
+ });
202
225
  }
203
226
  ngOnInit() {
204
227
  this.setTextDisplayMode();
205
228
  }
229
+ ngOnDestroy() {
230
+ this.propertyChangeSub.unsubscribe();
231
+ this.propertyChangeSub = null;
232
+ }
206
233
  /**
207
234
  * @hidden
208
235
  */
@@ -249,16 +276,19 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
249
276
  this.selected = state;
250
277
  this.selectedChange.emit(state);
251
278
  }
279
+ /**
280
+ * @hidden
281
+ */
252
282
  getButton() {
253
283
  return this[`${this.location}ButtonElement`]?.nativeElement;
254
284
  }
255
285
  setTextDisplayMode() {
256
- this.toolbarOptions.text = this.showText === 'overflow' ? undefined : this.text;
286
+ this.toolbarOptions.text = this.showText === 'menu' || this.showText === 'never' ? undefined : this.text;
257
287
  this.zone.onStable.pipe(take(1)).subscribe(() => {
258
- this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
288
+ this.overflowOptions.text = this.showText === 'toolbar' || this.showText === 'never' ? undefined : this.text;
259
289
  });
260
290
  }
261
- 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 });
291
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
262
292
  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: `
263
293
  <ng-template #toolbarTemplate>
264
294
  <button
@@ -268,6 +298,7 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
268
298
  [tabindex]="tabIndex"
269
299
  type="button"
270
300
  kendoButton
301
+ [size]="size"
271
302
  [ngStyle]="style"
272
303
  [ngClass]="className"
273
304
  [attr.title]="title"
@@ -321,6 +352,7 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
321
352
  [tabindex]="tabIndex"
322
353
  type="button"
323
354
  kendoButton
355
+ [size]="size"
324
356
  [ngStyle]="style"
325
357
  [ngClass]="className"
326
358
  [attr.title]="title"
@@ -358,6 +390,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
358
390
  [tabindex]="tabIndex"
359
391
  type="button"
360
392
  kendoButton
393
+ [size]="size"
361
394
  [ngStyle]="style"
362
395
  [ngClass]="className"
363
396
  [attr.title]="title"
@@ -411,6 +444,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
411
444
  [tabindex]="tabIndex"
412
445
  type="button"
413
446
  kendoButton
447
+ [size]="size"
414
448
  [ngStyle]="style"
415
449
  [ngClass]="className"
416
450
  [attr.title]="title"
@@ -435,7 +469,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
435
469
  standalone: true,
436
470
  imports: [ButtonComponent, NgStyle, NgClass, NgIf, IconWrapperComponent, BadgeComponent],
437
471
  }]
438
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { showText: [{
472
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.ToolBarComponent }]; }, propDecorators: { showText: [{
439
473
  type: Input
440
474
  }], showIcon: [{
441
475
  type: Input
@@ -10,13 +10,16 @@ import { makePeeker, getIndexOfFocused, seekFocusedIndex, getNextKey, getPrevKey
10
10
  import { ButtonGroupComponent, ButtonComponent } from '@progress/kendo-angular-buttons';
11
11
  import { IconWrapperComponent } from '@progress/kendo-angular-icons';
12
12
  import { NgFor, NgStyle, NgClass, NgIf } from '@angular/common';
13
+ import { ToolBarComponent } from '../toolbar.component';
13
14
  import * as i0 from "@angular/core";
14
15
  import * as i1 from "@progress/kendo-angular-l10n";
16
+ import * as i2 from "../toolbar.component";
15
17
  /**
16
18
  * Represents the Kendo UI Toolbar ButtonGroup for Angular.
17
19
  */
18
20
  export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
19
21
  localization;
22
+ host;
20
23
  /**
21
24
  * By default, the ButtonGroup is enabled. To disable the whole group of buttons, set its `disabled`
22
25
  * attribute to `true`. To disable a specific button, set the `disabled` attribute of the button to
@@ -73,9 +76,10 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
73
76
  focusedIndex = -1;
74
77
  getNextKey;
75
78
  getPrevKey;
76
- constructor(localization) {
79
+ constructor(localization, host) {
77
80
  super();
78
81
  this.localization = localization;
82
+ this.host = host;
79
83
  this.getNextKey = getNextKey(this.localization.rtl);
80
84
  this.getPrevKey = getPrevKey(this.localization.rtl);
81
85
  this.isBuiltInTool = true;
@@ -170,13 +174,19 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
170
174
  return button.overflowOptions.svgIcon;
171
175
  }
172
176
  }
177
+ /**
178
+ * @hidden
179
+ */
180
+ get size() {
181
+ return this.host.size;
182
+ }
173
183
  focusButton(index, ev) {
174
184
  // Guard against focusing twice on mousedown.
175
185
  if (!ev.type || ev.type === 'focus' || ev.type === 'keydown') {
176
186
  this.buttonElements[index]?.focus();
177
187
  }
178
188
  }
179
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonGroupComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
189
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarButtonGroupComponent, deps: [{ token: i1.LocalizationService }, { token: i2.ToolBarComponent }], target: i0.ɵɵFactoryTarget.Component });
180
190
  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: `
181
191
  <ng-template #toolbarTemplate>
182
192
  <kendo-buttongroup
@@ -197,6 +207,7 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
197
207
  [ngClass]="button.className"
198
208
  [attr.title]="button.title"
199
209
  [disabled]="button.disabled"
210
+ [size]="size"
200
211
  [togglable]="button.togglable"
201
212
  [selected]="button.selected"
202
213
  [attr.aria-pressed]="button.selected ? true : false"
@@ -258,6 +269,7 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
258
269
  [ngClass]="button.className"
259
270
  [attr.title]="button.title"
260
271
  [disabled]="button.disabled"
272
+ [size]="size"
261
273
  [togglable]="button.togglable"
262
274
  [selected]="button.selected"
263
275
  [attr.aria-pressed]="button.selected ? true : false"
@@ -303,6 +315,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
303
315
  [ngClass]="button.className"
304
316
  [attr.title]="button.title"
305
317
  [disabled]="button.disabled"
318
+ [size]="size"
306
319
  [togglable]="button.togglable"
307
320
  [selected]="button.selected"
308
321
  [attr.aria-pressed]="button.selected ? true : false"
@@ -364,6 +377,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
364
377
  [ngClass]="button.className"
365
378
  [attr.title]="button.title"
366
379
  [disabled]="button.disabled"
380
+ [size]="size"
367
381
  [togglable]="button.togglable"
368
382
  [selected]="button.selected"
369
383
  [attr.aria-pressed]="button.selected ? true : false"
@@ -385,7 +399,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
385
399
  standalone: true,
386
400
  imports: [ButtonGroupComponent, NgFor, ButtonComponent, NgStyle, NgClass, NgIf, IconWrapperComponent]
387
401
  }]
388
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { disabled: [{
402
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i2.ToolBarComponent }]; }, propDecorators: { disabled: [{
389
403
  type: Input
390
404
  }], fillMode: [{
391
405
  type: Input