@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.
@@ -9,7 +9,6 @@ import { getValueForLocation, makePeeker, getIndexOfFocused, getPrevKey, getNext
9
9
  import { caretAltDownIcon } from '@progress/kendo-svg-icons';
10
10
  import { IconWrapperComponent } from '@progress/kendo-angular-icons';
11
11
  import { NgClass, NgIf, NgFor } from '@angular/common';
12
- import { isPresent } from '@progress/kendo-angular-common';
13
12
  import { ToolBarComponent } from '../toolbar.component';
14
13
  import * as i0 from "@angular/core";
15
14
  import * as i1 from "../toolbar.component";
@@ -23,31 +22,21 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
23
22
  * Specifies the button text visibility.
24
23
  */
25
24
  set showText(value) {
26
- if (!isPresent(value)) {
27
- this._showText = this.host.normalizedShowText;
28
- }
29
- else {
30
- this._showText = value;
31
- }
25
+ this._showText = value;
32
26
  this.setTextDisplayMode();
33
27
  }
34
28
  get showText() {
35
- return this._showText || this.host.normalizedShowText;
29
+ return this._showText;
36
30
  }
37
31
  /**
38
32
  * Specifies the button icon visibility.
39
33
  */
40
34
  set showIcon(value) {
41
- if (!isPresent(value)) {
42
- this._showIcon = this.host.normalizedShowIcon;
43
- }
44
- else {
45
- this._showIcon = value;
46
- }
35
+ this._showIcon = value;
47
36
  this.setTextDisplayMode();
48
37
  }
49
38
  get showIcon() {
50
- return this._showIcon || this.host.normalizedShowIcon;
39
+ return this._showIcon;
51
40
  }
52
41
  /**
53
42
  * Sets the text of the SplitButton ([see example](slug:controltypes_toolbar#toc-split-buttons)).
@@ -229,6 +218,12 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
229
218
  ngOnInit() {
230
219
  this.setTextDisplayMode();
231
220
  }
221
+ ngOnDestroy() {
222
+ if (this.propertyChangeSub) {
223
+ this.propertyChangeSub.unsubscribe();
224
+ this.propertyChangeSub = null;
225
+ }
226
+ }
232
227
  get overflowButtons() {
233
228
  return [this.overflowMainButton, ...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
234
229
  }
@@ -238,6 +233,7 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
238
233
  _showText;
239
234
  _showIcon;
240
235
  _text;
236
+ propertyChangeSub;
241
237
  getNextKey;
242
238
  getPrevKey;
243
239
  toolbarSplitButton;
@@ -250,6 +246,11 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
250
246
  this.getNextKey = getNextKey();
251
247
  this.getPrevKey = getPrevKey();
252
248
  this.isBuiltInTool = true;
249
+ this.propertyChangeSub = this.host.propertyChange.subscribe(change => {
250
+ if (change.property === 'showText' || change.property === 'showIcon') {
251
+ this[change.property] = change.value;
252
+ }
253
+ });
253
254
  }
254
255
  /**
255
256
  * @hidden
@@ -270,6 +271,12 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
270
271
  canFocus() {
271
272
  return !this.disabled;
272
273
  }
274
+ /**
275
+ * @hidden
276
+ */
277
+ get size() {
278
+ return this.host.size;
279
+ }
273
280
  /**
274
281
  * @hidden
275
282
  */
@@ -344,6 +351,7 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
344
351
  [arrowButtonIcon]="arrowButtonIcon"
345
352
  [arrowButtonSvgIcon]="arrowButtonSvgIcon"
346
353
  [disabled]="disabled"
354
+ [size]="size"
347
355
  [tabIndex]="-1"
348
356
  [textField]="textField"
349
357
  [popupSettings]="popupSettings"
@@ -413,6 +421,7 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
413
421
  [arrowButtonIcon]="arrowButtonIcon"
414
422
  [arrowButtonSvgIcon]="arrowButtonSvgIcon"
415
423
  [disabled]="disabled"
424
+ [size]="size"
416
425
  [tabIndex]="-1"
417
426
  [textField]="textField"
418
427
  [popupSettings]="popupSettings"
@@ -448,6 +457,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
448
457
  [arrowButtonIcon]="arrowButtonIcon"
449
458
  [arrowButtonSvgIcon]="arrowButtonSvgIcon"
450
459
  [disabled]="disabled"
460
+ [size]="size"
451
461
  [tabIndex]="-1"
452
462
  [textField]="textField"
453
463
  [popupSettings]="popupSettings"
@@ -517,6 +527,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
517
527
  [arrowButtonIcon]="arrowButtonIcon"
518
528
  [arrowButtonSvgIcon]="arrowButtonSvgIcon"
519
529
  [disabled]="disabled"
530
+ [size]="size"
520
531
  [tabIndex]="-1"
521
532
  [textField]="textField"
522
533
  [popupSettings]="popupSettings"