@progress/kendo-angular-toolbar 11.0.0-develop.106 → 11.0.0-develop.107

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: 1673542209,
12
+ publishDate: 1673545261,
13
13
  version: '',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -18,15 +18,17 @@ import { Subscription, fromEvent, Subject, merge } from 'rxjs';
18
18
  import { takeUntil } from 'rxjs/operators';
19
19
  import { filter } from 'rxjs/operators';
20
20
  import { isDocumentAvailable } from '@progress/kendo-angular-common';
21
+ import { moreVerticalIcon } from '@progress/kendo-svg-icons';
21
22
  import * as i0 from "@angular/core";
22
23
  import * as i1 from "@progress/kendo-angular-l10n";
23
24
  import * as i2 from "@progress/kendo-angular-popup";
24
25
  import * as i3 from "./refresh.service";
25
26
  import * as i4 from "./navigation.service";
26
27
  import * as i5 from "./renderer.component";
27
- import * as i6 from "@progress/kendo-angular-common";
28
- import * as i7 from "./localization/localized-toolbar-messages.directive";
29
- import * as i8 from "@angular/common";
28
+ import * as i6 from "@progress/kendo-angular-buttons";
29
+ import * as i7 from "@progress/kendo-angular-common";
30
+ import * as i8 from "./localization/localized-toolbar-messages.directive";
31
+ import * as i9 from "@angular/common";
30
32
  const DEFAULT_SIZE = 'medium';
31
33
  const getInitialPopupSettings = (isRtl) => ({
32
34
  animate: true,
@@ -70,6 +72,7 @@ export class ToolBarComponent {
70
72
  this.subscriptions = new Subscription();
71
73
  this.popupSubs = new Subscription();
72
74
  this.role = 'toolbar';
75
+ this.moreVerticalIcon = moreVerticalIcon;
73
76
  /**
74
77
  * @hidden
75
78
  */
@@ -557,7 +560,7 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
557
560
  provide: L10N_PREFIX,
558
561
  useValue: 'kendo.toolbar'
559
562
  }
560
- ], queries: [{ propertyName: "allTools", predicate: ToolBarToolComponent }], viewQueries: [{ propertyName: "overflowButton", first: true, predicate: ["overflowButton"], descendants: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "resizeSensor", first: true, predicate: ["resizeSensor"], descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "renderedTools", predicate: ["toolbarRenderer"], descendants: true }, { propertyName: "overflowRenderedTools", predicate: ["overflowRenderer"], descendants: true }], exportAs: ["kendoToolBar"], usesOnChanges: true, ngImport: i0, template: `
563
+ ], queries: [{ propertyName: "allTools", predicate: ToolBarToolComponent }], viewQueries: [{ propertyName: "overflowButton", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "resizeSensor", first: true, predicate: ["resizeSensor"], descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "renderedTools", predicate: ["toolbarRenderer"], descendants: true }, { propertyName: "overflowRenderedTools", predicate: ["overflowRenderer"], descendants: true }], exportAs: ["kendoToolBar"], usesOnChanges: true, ngImport: i0, template: `
561
564
  <ng-container kendoToolbarLocalizedMessages
562
565
  i18n-moreToolsTitle="kendo.toolbar.moreToolsTitle|The title of the **more tools** button in a responsive ToolBar"
563
566
  moreToolsTitle="More tools"
@@ -573,8 +576,12 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
573
576
  ></kendo-toolbar-renderer>
574
577
  </ng-container>
575
578
  <button
579
+ kendoButton
580
+ fillMode="flat"
576
581
  #overflowButton
577
582
  type="button"
583
+ icon="more-vertical"
584
+ [svgIcon]="moreVerticalIcon"
578
585
  tabindex="-1"
579
586
  [title]="moreToolsTitle"
580
587
  [attr.aria-label]="moreToolsTitle"
@@ -585,11 +592,10 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
585
592
  [style.visibility]="'hidden'"
586
593
  [style.position]="'relative'"
587
594
  [style.margin-inline-start]="'auto'"
588
- class="k-toolbar-overflow-button k-button k-button-flat k-button-flat-base k-icon-button"
595
+ class="k-toolbar-overflow-button"
589
596
  [ngClass]="overflowClass"
590
597
  (click)="showPopup()"
591
598
  >
592
- <span class="k-button-icon k-icon k-i-more-vertical"></span>
593
599
  </button>
594
600
  <ng-template #popupTemplate>
595
601
  <div
@@ -610,7 +616,7 @@ ToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
610
616
  </ng-template>
611
617
  <ng-container #container></ng-container>
612
618
  <kendo-resize-sensor *ngIf="overflow" #resizeSensor></kendo-resize-sensor>
613
- `, isInline: true, components: [{ type: i5.ToolBarRendererComponent, selector: "kendo-toolbar-renderer", inputs: ["tool", "location", "resizable"], outputs: ["rendererClick"], exportAs: ["kendoToolBarRenderer"] }, { type: i6.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: i7.LocalizedToolbarMessagesDirective, selector: "[kendoToolbarLocalizedMessages]" }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
619
+ `, isInline: true, components: [{ type: i5.ToolBarRendererComponent, selector: "kendo-toolbar-renderer", inputs: ["tool", "location", "resizable"], outputs: ["rendererClick"], exportAs: ["kendoToolBarRenderer"] }, { type: i6.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i7.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: i8.LocalizedToolbarMessagesDirective, selector: "[kendoToolbarLocalizedMessages]" }, { type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
614
620
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarComponent, decorators: [{
615
621
  type: Component,
616
622
  args: [{
@@ -641,8 +647,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
641
647
  ></kendo-toolbar-renderer>
642
648
  </ng-container>
643
649
  <button
650
+ kendoButton
651
+ fillMode="flat"
644
652
  #overflowButton
645
653
  type="button"
654
+ icon="more-vertical"
655
+ [svgIcon]="moreVerticalIcon"
646
656
  tabindex="-1"
647
657
  [title]="moreToolsTitle"
648
658
  [attr.aria-label]="moreToolsTitle"
@@ -653,11 +663,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
653
663
  [style.visibility]="'hidden'"
654
664
  [style.position]="'relative'"
655
665
  [style.margin-inline-start]="'auto'"
656
- class="k-toolbar-overflow-button k-button k-button-flat k-button-flat-base k-icon-button"
666
+ class="k-toolbar-overflow-button"
657
667
  [ngClass]="overflowClass"
658
668
  (click)="showPopup()"
659
669
  >
660
- <span class="k-button-icon k-icon k-i-more-vertical"></span>
661
670
  </button>
662
671
  <ng-template #popupTemplate>
663
672
  <div
@@ -702,7 +711,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
702
711
  args: [ToolBarToolComponent]
703
712
  }], overflowButton: [{
704
713
  type: ViewChild,
705
- args: ['overflowButton', { static: false }]
714
+ args: ['overflowButton', { static: false, read: ElementRef }]
706
715
  }], popupTemplate: [{
707
716
  type: ViewChild,
708
717
  args: ['popupTemplate', { static: true }]
@@ -19,6 +19,7 @@ import { ToolBarRendererComponent } from './renderer.component';
19
19
  import { ToolBarButtonListComponent } from './tools/toolbar-buttonlist.component';
20
20
  import { LocalizedToolbarMessagesDirective } from './localization/localized-toolbar-messages.directive';
21
21
  import { ToolbarCustomMessagesComponent } from './localization/custom-messages.component';
22
+ import { IconsModule } from '@progress/kendo-angular-icons';
22
23
  import * as i0 from "@angular/core";
23
24
  const TOOLBAR_TOOLS = [
24
25
  ToolBarToolComponent,
@@ -59,19 +60,19 @@ ToolBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
59
60
  ToolBarSpacerComponent, ToolBarRendererComponent,
60
61
  ToolBarButtonListComponent,
61
62
  ToolbarCustomMessagesComponent,
62
- LocalizedToolbarMessagesDirective], imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule], exports: [ToolBarComponent, ToolBarToolComponent,
63
+ LocalizedToolbarMessagesDirective], imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule, IconsModule], exports: [ToolBarComponent, ToolBarToolComponent,
63
64
  ToolBarButtonComponent,
64
65
  ToolBarButtonGroupComponent,
65
66
  ToolBarDropDownButtonComponent,
66
67
  ToolBarSplitButtonComponent,
67
68
  ToolBarSeparatorComponent,
68
69
  ToolBarSpacerComponent, ToolbarCustomMessagesComponent, LocalizedToolbarMessagesDirective] });
69
- ToolBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarModule, imports: [[CommonModule, ButtonsModule, PopupModule, ResizeSensorModule]] });
70
+ ToolBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarModule, imports: [[CommonModule, ButtonsModule, PopupModule, ResizeSensorModule, IconsModule]] });
70
71
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarModule, decorators: [{
71
72
  type: NgModule,
72
73
  args: [{
73
74
  declarations: [ToolBarComponent, TOOLBAR_TOOLS, TOOLBAR_COMMON],
74
75
  exports: [ToolBarComponent, TOOLBAR_TOOLS, ToolbarCustomMessagesComponent, LocalizedToolbarMessagesDirective],
75
- imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule]
76
+ imports: [CommonModule, ButtonsModule, PopupModule, ResizeSensorModule, IconsModule]
76
77
  }]
77
78
  }] });
@@ -2,12 +2,13 @@
2
2
  * Copyright © 2023 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, TemplateRef, forwardRef, ViewChild, Input, Output, EventEmitter, ElementRef } from '@angular/core';
5
+ import { Component, TemplateRef, forwardRef, ViewChild, Input, Output, EventEmitter, ElementRef, isDevMode } from '@angular/core';
6
6
  import { ToolBarToolComponent } from './toolbar-tool.component';
7
7
  import { getValueForLocation } from '../util';
8
8
  import * as i0 from "@angular/core";
9
9
  import * as i1 from "@progress/kendo-angular-buttons";
10
- import * as i2 from "@angular/common";
10
+ import * as i2 from "@progress/kendo-angular-icons";
11
+ import * as i3 from "@angular/common";
11
12
  /**
12
13
  * Represents the [Kendo UI ToolBar Button tool for Angular]({% slug controltypes_toolbar %}#toc-buttons).
13
14
  */
@@ -77,12 +78,14 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
77
78
  text: '',
78
79
  icon: '',
79
80
  iconClass: '',
81
+ svgIcon: null,
80
82
  imageUrl: ''
81
83
  };
82
84
  this.overflowOptions = {
83
85
  text: '',
84
86
  icon: '',
85
87
  iconClass: '',
88
+ svgIcon: null,
86
89
  imageUrl: ''
87
90
  };
88
91
  this._showText = 'both';
@@ -133,6 +136,20 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
133
136
  this.toolbarOptions.iconClass = getValueForLocation(iconClass, this.showIcon, false);
134
137
  this.overflowOptions.iconClass = getValueForLocation(iconClass, this.showIcon, true);
135
138
  }
139
+ /**
140
+ * Defines an SVGIcon to be rendered within the button.
141
+ * The input can take either an [existing Kendo SVG icon](slug:svgicon_list) or a custom one.
142
+ */
143
+ set svgIcon(icon) {
144
+ if (isDevMode() &&
145
+ icon &&
146
+ (this.toolbarOptions.icon || this.overflowOptions.icon) &&
147
+ (this.toolbarOptions.iconClass || this.overflowOptions.iconClass)) {
148
+ throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
149
+ }
150
+ this.toolbarOptions.svgIcon = getValueForLocation(icon, this.showIcon, false);
151
+ this.overflowOptions.svgIcon = getValueForLocation(icon, this.showIcon, true);
152
+ }
136
153
  /**
137
154
  * Defines a URL which is used for an `img` element inside the Button.
138
155
  * The URL can be relative or absolute. If relative, it is evaluated with relation to the web page URL.
@@ -189,17 +206,6 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
189
206
  this.selectedChange.emit(this.selected);
190
207
  }
191
208
  }
192
- /**
193
- * @hidden
194
- */
195
- getIconClasses() {
196
- if (this.overflowOptions.icon) {
197
- return `k-icon k-i-${this.overflowOptions.icon}`;
198
- }
199
- else if (this.overflowOptions.iconClass) {
200
- return this.overflowOptions.iconClass;
201
- }
202
- }
203
209
  /**
204
210
  * @hidden
205
211
  */
@@ -216,7 +222,7 @@ export class ToolBarButtonComponent extends ToolBarToolComponent {
216
222
  }
217
223
  }
218
224
  ToolBarButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
219
- ToolBarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarButtonComponent, 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", imageUrl: "imageUrl" }, outputs: { click: "click", pointerdown: "pointerdown", selectedChange: "selectedChange" }, providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => ToolBarButtonComponent) }], viewQueries: [{ propertyName: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "toolbarButtonElement", first: true, predicate: ["toolbarButton"], descendants: true, read: ElementRef }, { propertyName: "overflowButtonElement", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBarButton"], usesInheritance: true, ngImport: i0, template: `
225
+ ToolBarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ToolBarButtonComponent, 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: "toolbarTemplate", first: true, predicate: ["toolbarTemplate"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "toolbarButtonElement", first: true, predicate: ["toolbarButton"], descendants: true, read: ElementRef }, { propertyName: "overflowButtonElement", first: true, predicate: ["overflowButton"], descendants: true, read: ElementRef }], exportAs: ["kendoToolBarButton"], usesInheritance: true, ngImport: i0, template: `
220
226
  <ng-template #toolbarTemplate>
221
227
  <button
222
228
  #toolbarButton
@@ -234,6 +240,7 @@ ToolBarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
234
240
  [selected]="selected"
235
241
  [icon]="toolbarOptions.icon"
236
242
  [iconClass]="toolbarOptions.iconClass"
243
+ [svgIcon]="svgIcon"
237
244
  [imageUrl]="toolbarOptions.imageUrl"
238
245
  (click)="click.emit($event)"
239
246
  (pointerdown)="pointerdown.emit($event)"
@@ -255,13 +262,19 @@ ToolBarButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
255
262
  (click)="handleClick($event)">
256
263
  <span
257
264
  class="k-link k-menu-link"
258
- [class.k-selected]="selected">
259
- <span *ngIf="overflowOptions.icon || overflowOptions.iconClass" [ngClass]="getIconClasses()"></span>
265
+ [class.k-selected]="selected"
266
+ >
267
+ <kendo-icon-wrapper
268
+ *ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
269
+ [name]="overflowOptions.icon"
270
+ [customFontClass]="overflowOptions.iconClass"
271
+ [svgIcon]="overflowOptions.svgIcon"
272
+ ></kendo-icon-wrapper>
260
273
  <span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
261
274
  </span>
262
275
  </div>
263
276
  </ng-template>
264
- `, isInline: true, components: [{ type: i1.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
277
+ `, isInline: true, components: [{ type: i1.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i2.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
265
278
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonComponent, decorators: [{
266
279
  type: Component,
267
280
  args: [{
@@ -286,6 +299,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
286
299
  [selected]="selected"
287
300
  [icon]="toolbarOptions.icon"
288
301
  [iconClass]="toolbarOptions.iconClass"
302
+ [svgIcon]="svgIcon"
289
303
  [imageUrl]="toolbarOptions.imageUrl"
290
304
  (click)="click.emit($event)"
291
305
  (pointerdown)="pointerdown.emit($event)"
@@ -307,8 +321,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
307
321
  (click)="handleClick($event)">
308
322
  <span
309
323
  class="k-link k-menu-link"
310
- [class.k-selected]="selected">
311
- <span *ngIf="overflowOptions.icon || overflowOptions.iconClass" [ngClass]="getIconClasses()"></span>
324
+ [class.k-selected]="selected"
325
+ >
326
+ <kendo-icon-wrapper
327
+ *ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
328
+ [name]="overflowOptions.icon"
329
+ [customFontClass]="overflowOptions.iconClass"
330
+ [svgIcon]="overflowOptions.svgIcon"
331
+ ></kendo-icon-wrapper>
312
332
  <span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
313
333
  </span>
314
334
  </div>
@@ -345,6 +365,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
345
365
  type: Input
346
366
  }], iconClass: [{
347
367
  type: Input
368
+ }], svgIcon: [{
369
+ type: Input
348
370
  }], imageUrl: [{
349
371
  type: Input
350
372
  }], click: [{
@@ -11,7 +11,8 @@ import { ButtonGroupComponent } from '@progress/kendo-angular-buttons';
11
11
  import * as i0 from "@angular/core";
12
12
  import * as i1 from "@progress/kendo-angular-l10n";
13
13
  import * as i2 from "@progress/kendo-angular-buttons";
14
- import * as i3 from "@angular/common";
14
+ import * as i3 from "@progress/kendo-angular-icons";
15
+ import * as i4 from "@angular/common";
15
16
  /**
16
17
  * Represents the Kendo UI Toolbar ButtonGroup for Angular.
17
18
  */
@@ -126,11 +127,14 @@ export class ToolBarButtonGroupComponent extends ToolBarToolComponent {
126
127
  */
127
128
  getIconClasses(button) {
128
129
  if (button.overflowOptions.icon) {
129
- return `k-icon k-i-${button.overflowOptions.icon}`;
130
+ return `${button.overflowOptions.icon}`;
130
131
  }
131
- else if (button.overflowOptions.iconClass) {
132
+ if (button.overflowOptions.iconClass) {
132
133
  return button.overflowOptions.iconClass;
133
134
  }
135
+ if (button.overflowOptions.svgIcon) {
136
+ return button.overflowOptions.svgIcon;
137
+ }
134
138
  }
135
139
  focusButton(index, ev) {
136
140
  // Guard against focusing twice on mousedown.
@@ -165,6 +169,7 @@ ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
165
169
  [themeColor]="button.fillMode ? button.themeColor : null"
166
170
  [icon]="button.toolbarOptions.icon"
167
171
  [iconClass]="button.toolbarOptions.iconClass"
172
+ [svgIcon]="button.toolbarOptions.svgIcon"
168
173
  [imageUrl]="button.toolbarOptions.imageUrl"
169
174
  (click)="button.click.emit($event); onButtonClick($event)"
170
175
  (pointerdown)="button.pointerdown.emit($event)"
@@ -186,14 +191,20 @@ ToolBarButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
186
191
  (click)="handleClick($event, button)">
187
192
  <span
188
193
  class="k-link k-menu-link"
189
- [class.k-selected]="button.selected">
190
- <span *ngIf="button.overflowOptions.icon || button.overflowOptions.iconClass" [ngClass]="getIconClasses(button)"></span>
194
+ [class.k-selected]="button.selected"
195
+ >
196
+ <kendo-icon-wrapper
197
+ *ngIf="button.overflowOptions.icon || button.overflowOptions.iconClass || button.overflowOptions.svgIcon"
198
+ [name]="button.overflowOptions.icon"
199
+ [customFontClass]="button.overflowOptions.iconClass"
200
+ [svgIcon]="button.overflowOptions.svgIcon"
201
+ ></kendo-icon-wrapper>
191
202
  <span *ngIf="button.overflowOptions.text" class="k-menu-link-text">{{button.overflowOptions.text}}</span>
192
203
  </span>
193
204
  </div>
194
205
  </ng-container>
195
206
  </ng-template>
196
- `, isInline: true, components: [{ type: i2.ButtonGroupComponent, selector: "kendo-buttongroup", inputs: ["disabled", "selection", "width", "tabIndex", "navigable"], outputs: ["navigate"], exportAs: ["kendoButtonGroup"] }, { type: i2.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
207
+ `, isInline: true, components: [{ type: i2.ButtonGroupComponent, selector: "kendo-buttongroup", inputs: ["disabled", "selection", "width", "tabIndex", "navigable"], outputs: ["navigate"], exportAs: ["kendoButtonGroup"] }, { type: i2.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i3.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
197
208
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarButtonGroupComponent, decorators: [{
198
209
  type: Component,
199
210
  args: [{
@@ -225,6 +236,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
225
236
  [themeColor]="button.fillMode ? button.themeColor : null"
226
237
  [icon]="button.toolbarOptions.icon"
227
238
  [iconClass]="button.toolbarOptions.iconClass"
239
+ [svgIcon]="button.toolbarOptions.svgIcon"
228
240
  [imageUrl]="button.toolbarOptions.imageUrl"
229
241
  (click)="button.click.emit($event); onButtonClick($event)"
230
242
  (pointerdown)="button.pointerdown.emit($event)"
@@ -246,8 +258,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
246
258
  (click)="handleClick($event, button)">
247
259
  <span
248
260
  class="k-link k-menu-link"
249
- [class.k-selected]="button.selected">
250
- <span *ngIf="button.overflowOptions.icon || button.overflowOptions.iconClass" [ngClass]="getIconClasses(button)"></span>
261
+ [class.k-selected]="button.selected"
262
+ >
263
+ <kendo-icon-wrapper
264
+ *ngIf="button.overflowOptions.icon || button.overflowOptions.iconClass || button.overflowOptions.svgIcon"
265
+ [name]="button.overflowOptions.icon"
266
+ [customFontClass]="button.overflowOptions.iconClass"
267
+ [svgIcon]="button.overflowOptions.svgIcon"
268
+ ></kendo-icon-wrapper>
251
269
  <span *ngIf="button.overflowOptions.text" class="k-menu-link-text">{{button.overflowOptions.text}}</span>
252
270
  </span>
253
271
  </div>
@@ -43,6 +43,7 @@ ToolBarButtonListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
43
43
  [disabled]="disabled || item.disabled"
44
44
  [icon]="item.icon"
45
45
  [iconClass]="item.iconClass"
46
+ [svgIcon]="item.svgIcon"
46
47
  [imageUrl]="item.imageUrl"
47
48
  [fillMode]="fillMode"
48
49
  [themeColor]="fillMode ? themeColor : null"
@@ -67,6 +68,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
67
68
  [disabled]="disabled || item.disabled"
68
69
  [icon]="item.icon"
69
70
  [iconClass]="item.iconClass"
71
+ [svgIcon]="item.svgIcon"
70
72
  [imageUrl]="item.imageUrl"
71
73
  [fillMode]="fillMode"
72
74
  [themeColor]="fillMode ? themeColor : null"
@@ -8,7 +8,8 @@ import { DropDownButtonComponent } from '@progress/kendo-angular-buttons';
8
8
  import { getValueForLocation, makePeeker, getIndexOfFocused, getPrevKey, getNextKey, seekFocusedIndex, areEqual } from '../util';
9
9
  import * as i0 from "@angular/core";
10
10
  import * as i1 from "@progress/kendo-angular-buttons";
11
- import * as i2 from "@angular/common";
11
+ import * as i2 from "@progress/kendo-angular-icons";
12
+ import * as i3 from "@angular/common";
12
13
  /**
13
14
  * Represents the [Kendo UI ToolBar DropDownButton for Angular]({% slug controltypes_toolbar %}#toc-dropdownbuttons).
14
15
  */
@@ -69,12 +70,14 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
69
70
  text: '',
70
71
  icon: '',
71
72
  iconClass: '',
73
+ svgIcon: null,
72
74
  imageUrl: ''
73
75
  };
74
76
  this.overflowOptions = {
75
77
  text: '',
76
78
  icon: '',
77
79
  iconClass: '',
80
+ svgIcon: null,
78
81
  imageUrl: ''
79
82
  };
80
83
  this._popupSettings = { animate: true, popupClass: '' };
@@ -207,27 +210,6 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
207
210
  return !isUnmodified(this.focusedIndex);
208
211
  }
209
212
  }
210
- /**
211
- * @hidden
212
- */
213
- getIconClasses(item) {
214
- if (item) {
215
- if (item.icon) {
216
- return `k-icon k-i-${item.icon}`;
217
- }
218
- else if (item.iconClass) {
219
- return item.iconClass;
220
- }
221
- }
222
- else {
223
- if (this.overflowOptions.icon) {
224
- return `k-icon k-i-${this.overflowOptions.icon}`;
225
- }
226
- else if (this.overflowOptions.iconClass) {
227
- return this.overflowOptions.iconClass;
228
- }
229
- }
230
- }
231
213
  /**
232
214
  * @hidden
233
215
  */
@@ -266,6 +248,7 @@ ToolBarDropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
266
248
  class="k-toolbar-menu-button"
267
249
  [icon]="toolbarOptions.icon"
268
250
  [iconClass]="toolbarOptions.iconClass"
251
+ [svgIcon]="toolbarOptions.svgIcon"
269
252
  [imageUrl]="toolbarOptions.imageUrl"
270
253
  [buttonClass]="buttonClass"
271
254
  [disabled]="disabled"
@@ -289,8 +272,14 @@ ToolBarDropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
289
272
  class="k-item k-menu-item k-disabled"
290
273
  [ngClass]="buttonClass">
291
274
  <span
292
- [ngClass]="{'k-link': true, 'k-menu-link': true}">
293
- <span *ngIf="overflowOptions.icon || overflowOptions.iconClass" [ngClass]="getIconClasses()"></span>
275
+ [ngClass]="{'k-link': true, 'k-menu-link': true}"
276
+ >
277
+ <kendo-icon-wrapper
278
+ *ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
279
+ [name]="overflowOptions.icon"
280
+ [customFontClass]="overflowOptions.iconClass"
281
+ [svgIcon]="overflowOptions.svgIcon"
282
+ ></kendo-icon-wrapper>
294
283
  <span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
295
284
  </span>
296
285
  </div>
@@ -302,14 +291,20 @@ ToolBarDropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
302
291
  [class.k-disabled]="disabled || item.disabled"
303
292
  (click)="handleClick($event, item, i)">
304
293
  <span
305
- class="k-link k-menu-link">
306
- <span *ngIf="item.icon || item.iconClass" [ngClass]="getIconClasses(item)"></span>
294
+ class="k-link k-menu-link"
295
+ >
296
+ <kendo-icon-wrapper
297
+ *ngIf="item.icon || item.iconClass || item.svgIcon"
298
+ [name]="item.icon"
299
+ [customFontClass]="item.iconClass"
300
+ [svgIcon]="item.svgIcon"
301
+ ></kendo-icon-wrapper>
307
302
  <span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
308
303
  </span>
309
304
  </div>
310
305
  </ng-container>
311
306
  </ng-template>
312
- `, isInline: true, components: [{ type: i1.DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
307
+ `, isInline: true, components: [{ type: i1.DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }, { type: i2.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
313
308
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ToolBarDropDownButtonComponent, decorators: [{
314
309
  type: Component,
315
310
  args: [{
@@ -323,6 +318,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
323
318
  class="k-toolbar-menu-button"
324
319
  [icon]="toolbarOptions.icon"
325
320
  [iconClass]="toolbarOptions.iconClass"
321
+ [svgIcon]="toolbarOptions.svgIcon"
326
322
  [imageUrl]="toolbarOptions.imageUrl"
327
323
  [buttonClass]="buttonClass"
328
324
  [disabled]="disabled"
@@ -346,8 +342,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
346
342
  class="k-item k-menu-item k-disabled"
347
343
  [ngClass]="buttonClass">
348
344
  <span
349
- [ngClass]="{'k-link': true, 'k-menu-link': true}">
350
- <span *ngIf="overflowOptions.icon || overflowOptions.iconClass" [ngClass]="getIconClasses()"></span>
345
+ [ngClass]="{'k-link': true, 'k-menu-link': true}"
346
+ >
347
+ <kendo-icon-wrapper
348
+ *ngIf="overflowOptions.icon || overflowOptions.iconClass || overflowOptions.svgIcon"
349
+ [name]="overflowOptions.icon"
350
+ [customFontClass]="overflowOptions.iconClass"
351
+ [svgIcon]="overflowOptions.svgIcon"
352
+ ></kendo-icon-wrapper>
351
353
  <span *ngIf="overflowOptions.text" class="k-menu-link-text">{{overflowOptions.text}}</span>
352
354
  </span>
353
355
  </div>
@@ -359,8 +361,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
359
361
  [class.k-disabled]="disabled || item.disabled"
360
362
  (click)="handleClick($event, item, i)">
361
363
  <span
362
- class="k-link k-menu-link">
363
- <span *ngIf="item.icon || item.iconClass" [ngClass]="getIconClasses(item)"></span>
364
+ class="k-link k-menu-link"
365
+ >
366
+ <kendo-icon-wrapper
367
+ *ngIf="item.icon || item.iconClass || item.svgIcon"
368
+ [name]="item.icon"
369
+ [customFontClass]="item.iconClass"
370
+ [svgIcon]="item.svgIcon"
371
+ ></kendo-icon-wrapper>
364
372
  <span *ngIf="getText(item)" class="k-menu-link-text">{{ getText(item) }}</span>
365
373
  </span>
366
374
  </div>