@progress/kendo-angular-toolbar 17.1.1-develop.2 → 17.1.1-develop.4

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,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-toolbar',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1732795301,
13
- version: '17.1.1-develop.2',
12
+ publishDate: 1733124434,
13
+ version: '17.1.1-develop.4',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -2,17 +2,19 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { Component, ElementRef, forwardRef, ViewChild, Input, EventEmitter, Output, QueryList, ViewChildren, isDevMode, Renderer2 } from '@angular/core';
5
+ import { Component, ElementRef, forwardRef, ViewChild, Input, EventEmitter, Output, QueryList, ViewChildren, isDevMode, Renderer2, NgZone } from '@angular/core';
6
6
  import { ToolBarToolComponent } from './toolbar-tool.component';
7
7
  import { DropDownButtonComponent } from '@progress/kendo-angular-buttons';
8
8
  import { getValueForLocation, makePeeker, getIndexOfFocused, getPrevKey, getNextKey, seekFocusedIndex, areEqual } from '../util';
9
9
  import { IconWrapperComponent } from '@progress/kendo-angular-icons';
10
10
  import { NgClass, NgIf, NgFor } from '@angular/common';
11
+ import { take } from 'rxjs/operators';
11
12
  import * as i0 from "@angular/core";
12
13
  /**
13
14
  * Represents the [Kendo UI ToolBar DropDownButton for Angular]({% slug controltypes_toolbar %}#toc-dropdownbuttons).
14
15
  */
15
16
  export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
17
+ zone;
16
18
  renderer;
17
19
  /**
18
20
  * Allows showing the default arrow icon or providing alternative one instead.
@@ -206,16 +208,9 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
206
208
  svgIcon: null,
207
209
  imageUrl: ''
208
210
  };
209
- ngOnInit() {
210
- this.setTextDisplayMode();
211
- }
212
- ngAfterViewInit() {
213
- this.renderer.addClass(this.toolbarDropDownButton.button.nativeElement, 'k-toolbar-menu-button');
214
- }
215
211
  get overflowButtons() {
216
212
  return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
217
213
  }
218
- toolbarDropDownButton;
219
214
  _data;
220
215
  _popupSettings = { animate: true, popupClass: '' };
221
216
  focusedIndex = -1;
@@ -223,13 +218,20 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
223
218
  _text;
224
219
  getNextKey;
225
220
  getPrevKey;
226
- constructor(renderer) {
221
+ constructor(zone, renderer) {
227
222
  super();
223
+ this.zone = zone;
228
224
  this.renderer = renderer;
229
225
  this.getNextKey = getNextKey();
230
226
  this.getPrevKey = getPrevKey();
231
227
  this.isBuiltInTool = true;
232
228
  }
229
+ ngOnInit() {
230
+ this.setTextDisplayMode();
231
+ }
232
+ ngAfterViewInit() {
233
+ this.zone.onStable.pipe(take(1)).subscribe(() => (this.renderer.addClass(this.dropDownButtonComponent.button.nativeElement, 'k-toolbar-menu-button')));
234
+ }
233
235
  /**
234
236
  * @hidden
235
237
  */
@@ -250,7 +252,7 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
250
252
  focus(ev = {}) {
251
253
  if (!this.overflows) {
252
254
  if (ev.type === 'focus' || ev.type === 'keydown') {
253
- this.toolbarDropDownButton.focus();
255
+ this.dropDownButtonComponent?.focus();
254
256
  }
255
257
  }
256
258
  else if (this.overflowButtons.length > 0) {
@@ -302,11 +304,10 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
302
304
  this.toolbarOptions.text = this.showText === 'overflow' ? undefined : this.text;
303
305
  this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
304
306
  }
305
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarDropDownButtonComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
306
- 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: "dropDownButtonComponent", first: true, predicate: DropDownButtonComponent, descendants: true }, { propertyName: "toolbarDropDownButton", first: true, predicate: ["toolbarDropDownButton"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarDropDownButton"], usesInheritance: true, ngImport: i0, template: `
307
+ 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 });
308
+ 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: "dropDownButtonComponent", first: true, predicate: DropDownButtonComponent, descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarDropDownButton"], usesInheritance: true, ngImport: i0, template: `
307
309
  <ng-template #toolbarTemplate>
308
310
  <kendo-dropdownbutton
309
- #toolbarDropDownButton
310
311
  [icon]="toolbarOptions.icon"
311
312
  [iconClass]="toolbarOptions.iconClass"
312
313
  [svgIcon]="toolbarOptions.svgIcon"
@@ -379,7 +380,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
379
380
  template: `
380
381
  <ng-template #toolbarTemplate>
381
382
  <kendo-dropdownbutton
382
- #toolbarDropDownButton
383
383
  [icon]="toolbarOptions.icon"
384
384
  [iconClass]="toolbarOptions.iconClass"
385
385
  [svgIcon]="toolbarOptions.svgIcon"
@@ -445,7 +445,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
445
445
  standalone: true,
446
446
  imports: [DropDownButtonComponent, NgClass, NgIf, IconWrapperComponent, NgFor]
447
447
  }]
448
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }]; }, propDecorators: { arrowIcon: [{
448
+ }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { arrowIcon: [{
449
449
  type: Input
450
450
  }], title: [{
451
451
  type: Input
@@ -496,7 +496,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
496
496
  }], overflowListItems: [{
497
497
  type: ViewChildren,
498
498
  args: ['listItem']
499
- }], toolbarDropDownButton: [{
500
- type: ViewChild,
501
- args: ['toolbarDropDownButton', { static: false }]
502
499
  }] } });
@@ -24,8 +24,8 @@ const packageMetadata = {
24
24
  name: '@progress/kendo-angular-toolbar',
25
25
  productName: 'Kendo UI for Angular',
26
26
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
27
- publishDate: 1732795301,
28
- version: '17.1.1-develop.2',
27
+ publishDate: 1733124434,
28
+ version: '17.1.1-develop.4',
29
29
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
30
30
  };
31
31
 
@@ -2292,6 +2292,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2292
2292
  * Represents the [Kendo UI ToolBar DropDownButton for Angular]({% slug controltypes_toolbar %}#toc-dropdownbuttons).
2293
2293
  */
2294
2294
  class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
2295
+ zone;
2295
2296
  renderer;
2296
2297
  /**
2297
2298
  * Allows showing the default arrow icon or providing alternative one instead.
@@ -2485,16 +2486,9 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
2485
2486
  svgIcon: null,
2486
2487
  imageUrl: ''
2487
2488
  };
2488
- ngOnInit() {
2489
- this.setTextDisplayMode();
2490
- }
2491
- ngAfterViewInit() {
2492
- this.renderer.addClass(this.toolbarDropDownButton.button.nativeElement, 'k-toolbar-menu-button');
2493
- }
2494
2489
  get overflowButtons() {
2495
2490
  return [...this.overflowListItems.toArray().filter(el => !el.nativeElement.classList.contains('k-disabled'))];
2496
2491
  }
2497
- toolbarDropDownButton;
2498
2492
  _data;
2499
2493
  _popupSettings = { animate: true, popupClass: '' };
2500
2494
  focusedIndex = -1;
@@ -2502,13 +2496,20 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
2502
2496
  _text;
2503
2497
  getNextKey;
2504
2498
  getPrevKey;
2505
- constructor(renderer) {
2499
+ constructor(zone, renderer) {
2506
2500
  super();
2501
+ this.zone = zone;
2507
2502
  this.renderer = renderer;
2508
2503
  this.getNextKey = getNextKey();
2509
2504
  this.getPrevKey = getPrevKey();
2510
2505
  this.isBuiltInTool = true;
2511
2506
  }
2507
+ ngOnInit() {
2508
+ this.setTextDisplayMode();
2509
+ }
2510
+ ngAfterViewInit() {
2511
+ this.zone.onStable.pipe(take(1)).subscribe(() => (this.renderer.addClass(this.dropDownButtonComponent.button.nativeElement, 'k-toolbar-menu-button')));
2512
+ }
2512
2513
  /**
2513
2514
  * @hidden
2514
2515
  */
@@ -2529,7 +2530,7 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
2529
2530
  focus(ev = {}) {
2530
2531
  if (!this.overflows) {
2531
2532
  if (ev.type === 'focus' || ev.type === 'keydown') {
2532
- this.toolbarDropDownButton.focus();
2533
+ this.dropDownButtonComponent?.focus();
2533
2534
  }
2534
2535
  }
2535
2536
  else if (this.overflowButtons.length > 0) {
@@ -2581,11 +2582,10 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
2581
2582
  this.toolbarOptions.text = this.showText === 'overflow' ? undefined : this.text;
2582
2583
  this.overflowOptions.text = this.showText === 'toolbar' ? undefined : this.text;
2583
2584
  }
2584
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolBarDropDownButtonComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
2585
- 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: "dropDownButtonComponent", first: true, predicate: DropDownButtonComponent, descendants: true }, { propertyName: "toolbarDropDownButton", first: true, predicate: ["toolbarDropDownButton"], descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarDropDownButton"], usesInheritance: true, ngImport: i0, template: `
2585
+ 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 });
2586
+ 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: "dropDownButtonComponent", first: true, predicate: DropDownButtonComponent, descendants: true }, { propertyName: "overflowListItems", predicate: ["listItem"], descendants: true }], exportAs: ["kendoToolBarDropDownButton"], usesInheritance: true, ngImport: i0, template: `
2586
2587
  <ng-template #toolbarTemplate>
2587
2588
  <kendo-dropdownbutton
2588
- #toolbarDropDownButton
2589
2589
  [icon]="toolbarOptions.icon"
2590
2590
  [iconClass]="toolbarOptions.iconClass"
2591
2591
  [svgIcon]="toolbarOptions.svgIcon"
@@ -2658,7 +2658,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2658
2658
  template: `
2659
2659
  <ng-template #toolbarTemplate>
2660
2660
  <kendo-dropdownbutton
2661
- #toolbarDropDownButton
2662
2661
  [icon]="toolbarOptions.icon"
2663
2662
  [iconClass]="toolbarOptions.iconClass"
2664
2663
  [svgIcon]="toolbarOptions.svgIcon"
@@ -2724,7 +2723,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2724
2723
  standalone: true,
2725
2724
  imports: [DropDownButtonComponent, NgClass, NgIf, IconWrapperComponent, NgFor]
2726
2725
  }]
2727
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }]; }, propDecorators: { arrowIcon: [{
2726
+ }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { arrowIcon: [{
2728
2727
  type: Input
2729
2728
  }], title: [{
2730
2729
  type: Input
@@ -2775,9 +2774,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2775
2774
  }], overflowListItems: [{
2776
2775
  type: ViewChildren,
2777
2776
  args: ['listItem']
2778
- }], toolbarDropDownButton: [{
2779
- type: ViewChild,
2780
- args: ['toolbarDropDownButton', { static: false }]
2781
2777
  }] } });
2782
2778
 
2783
2779
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-toolbar",
3
- "version": "17.1.1-develop.2",
3
+ "version": "17.1.1-develop.4",
4
4
  "description": "Kendo UI Angular Toolbar component - a single UI element that organizes buttons and other navigation elements",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -29,16 +29,16 @@
29
29
  "@angular/core": "16 - 19",
30
30
  "@angular/platform-browser": "16 - 19",
31
31
  "@progress/kendo-licensing": "^1.0.2",
32
- "@progress/kendo-angular-buttons": "17.1.1-develop.2",
33
- "@progress/kendo-angular-common": "17.1.1-develop.2",
34
- "@progress/kendo-angular-l10n": "17.1.1-develop.2",
35
- "@progress/kendo-angular-icons": "17.1.1-develop.2",
36
- "@progress/kendo-angular-popup": "17.1.1-develop.2",
32
+ "@progress/kendo-angular-buttons": "17.1.1-develop.4",
33
+ "@progress/kendo-angular-common": "17.1.1-develop.4",
34
+ "@progress/kendo-angular-l10n": "17.1.1-develop.4",
35
+ "@progress/kendo-angular-icons": "17.1.1-develop.4",
36
+ "@progress/kendo-angular-popup": "17.1.1-develop.4",
37
37
  "rxjs": "^6.5.3 || ^7.0.0"
38
38
  },
39
39
  "dependencies": {
40
40
  "tslib": "^2.3.1",
41
- "@progress/kendo-angular-schematics": "17.1.1-develop.2"
41
+ "@progress/kendo-angular-schematics": "17.1.1-develop.4"
42
42
  },
43
43
  "schematics": "./schematics/collection.json",
44
44
  "module": "fesm2022/progress-kendo-angular-toolbar.mjs",
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { ElementRef, EventEmitter, OnInit, QueryList, Renderer2 } from '@angular/core';
5
+ import { ElementRef, EventEmitter, OnInit, QueryList, Renderer2, NgZone } from '@angular/core';
6
6
  import { ToolBarToolComponent } from './toolbar-tool.component';
7
7
  import { PopupSettings } from '../popup-settings';
8
8
  import { ArrowIconSettings, ButtonFillMode, ButtonThemeColor, DropDownButtonComponent } from '@progress/kendo-angular-buttons';
@@ -15,6 +15,7 @@ import * as i0 from "@angular/core";
15
15
  * Represents the [Kendo UI ToolBar DropDownButton for Angular]({% slug controltypes_toolbar %}#toc-dropdownbuttons).
16
16
  */
17
17
  export declare class ToolBarDropDownButtonComponent extends ToolBarToolComponent implements OnInit {
18
+ private zone;
18
19
  private renderer;
19
20
  /**
20
21
  * Allows showing the default arrow icon or providing alternative one instead.
@@ -148,10 +149,7 @@ export declare class ToolBarDropDownButtonComponent extends ToolBarToolComponent
148
149
  overflowListItems: QueryList<ElementRef>;
149
150
  toolbarOptions: ToolOptions;
150
151
  overflowOptions: ToolOptions;
151
- ngOnInit(): void;
152
- ngAfterViewInit(): void;
153
152
  private get overflowButtons();
154
- private toolbarDropDownButton;
155
153
  private _data;
156
154
  private _popupSettings;
157
155
  private focusedIndex;
@@ -159,7 +157,9 @@ export declare class ToolBarDropDownButtonComponent extends ToolBarToolComponent
159
157
  private _text;
160
158
  private getNextKey;
161
159
  private getPrevKey;
162
- constructor(renderer: Renderer2);
160
+ constructor(zone: NgZone, renderer: Renderer2);
161
+ ngOnInit(): void;
162
+ ngAfterViewInit(): void;
163
163
  /**
164
164
  * @hidden
165
165
  */