@progress/kendo-angular-menu 11.0.0-develop.97 → 11.0.0-develop.99

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.
package/esm2020/index.mjs CHANGED
@@ -5,7 +5,7 @@
5
5
  export { MenuComponent } from './menu.component';
6
6
  export { ListComponent, ItemComponent } from './rendering/list.component';
7
7
  export { LinkDirective } from './rendering/link.directive';
8
- export { ExpandArrowDirective } from './rendering/arrow.directive';
8
+ export { ExpandArrowComponent } from './rendering/arrow.component';
9
9
  export { MenuItemComponent } from './menu-item.component';
10
10
  export { MenuEvent } from './menu-event';
11
11
  export { MenuSelectEvent } from './menu-select-event';
@@ -9,12 +9,13 @@ import { MenuComponent } from './menu.component';
9
9
  import { MenuItemComponent } from './menu-item.component';
10
10
  import { ListComponent, ItemComponent } from './rendering/list.component';
11
11
  import { LinkDirective } from './rendering/link.directive';
12
- import { ExpandArrowDirective } from './rendering/arrow.directive';
12
+ import { ExpandArrowComponent } from './rendering/arrow.component';
13
13
  import { ItemTemplateDirective } from './templates/item-template.directive';
14
14
  import { ItemLinkTemplateDirective } from './templates/item-link-template.directive';
15
15
  import { ItemContentTemplateDirective } from './templates/item-content-template.directive';
16
16
  import { HierarchyBindingDirective } from './data-binding/hierachy-binding.directive';
17
17
  import { FlatBindingDirective } from './data-binding/flat-binding.directive';
18
+ import { IconsModule } from '@progress/kendo-angular-icons';
18
19
  import * as i0 from "@angular/core";
19
20
  const COMPONENT_EXPORTS = [
20
21
  MenuComponent,
@@ -25,7 +26,7 @@ const COMPONENT_EXPORTS = [
25
26
  HierarchyBindingDirective,
26
27
  FlatBindingDirective,
27
28
  LinkDirective,
28
- ExpandArrowDirective
29
+ ExpandArrowComponent
29
30
  ];
30
31
  const COMPONENT_DIRECTIVES = [
31
32
  ...COMPONENT_EXPORTS,
@@ -75,8 +76,8 @@ MenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13
75
76
  HierarchyBindingDirective,
76
77
  FlatBindingDirective,
77
78
  LinkDirective,
78
- ExpandArrowDirective, ListComponent,
79
- ItemComponent], imports: [PopupModule, CommonModule], exports: [MenuComponent,
79
+ ExpandArrowComponent, ListComponent,
80
+ ItemComponent], imports: [PopupModule, CommonModule, IconsModule], exports: [MenuComponent,
80
81
  MenuItemComponent,
81
82
  ItemTemplateDirective,
82
83
  ItemLinkTemplateDirective,
@@ -84,13 +85,13 @@ MenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13
84
85
  HierarchyBindingDirective,
85
86
  FlatBindingDirective,
86
87
  LinkDirective,
87
- ExpandArrowDirective] });
88
- MenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MenuModule, imports: [[PopupModule, CommonModule]] });
88
+ ExpandArrowComponent] });
89
+ MenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MenuModule, imports: [[PopupModule, CommonModule, IconsModule]] });
89
90
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MenuModule, decorators: [{
90
91
  type: NgModule,
91
92
  args: [{
92
93
  declarations: [COMPONENT_DIRECTIVES],
93
94
  exports: [COMPONENT_EXPORTS],
94
- imports: [PopupModule, CommonModule]
95
+ imports: [PopupModule, CommonModule, IconsModule]
95
96
  }]
96
97
  }] });
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-menu',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1673459118,
12
+ publishDate: 1673466761,
13
13
  version: '',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -2,49 +2,40 @@
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 { Directive, Input, HostBinding, isDevMode, ElementRef, Renderer2 } from '@angular/core';
5
+ import { Input, HostBinding, isDevMode, Component } from '@angular/core';
6
6
  import { ItemsService } from '../services/items.service';
7
+ import { getFontIcon, getSVGIcon } from '../utils';
7
8
  import * as i0 from "@angular/core";
8
9
  import * as i1 from "../services/items.service";
10
+ import * as i2 from "@progress/kendo-angular-icons";
9
11
  /**
10
- * Represents a directive that can be used in the [`linkTemplate`]({% slug api_menu_itemlinktemplatedirective %})
12
+ * Represents a component that can be used in the [`linkTemplate`]({% slug api_menu_itemlinktemplatedirective %})
11
13
  * of the items to render the default expand arrow.
12
14
  */
13
- export class ExpandArrowDirective {
14
- constructor(itemsService, element, renderer) {
15
+ export class ExpandArrowComponent {
16
+ constructor(itemsService) {
15
17
  this.itemsService = itemsService;
16
- this.element = element;
17
- this.renderer = renderer;
18
18
  this.hostClasses = true;
19
19
  this.role = 'presentation';
20
20
  }
21
21
  ngOnInit() {
22
22
  if (isDevMode() && !this.index) {
23
- throw new Error('The kendoMenuExpandArrow directive requires the item index to be set.');
23
+ throw new Error('The kendoMenuExpandArrow component requires the item index to be set.');
24
24
  }
25
25
  this.item = this.itemsService.get(this.index) || {};
26
- this.createIconElement();
27
- }
28
- createIconElement() {
29
- const iconClass = this.item.horizontal ?
30
- this.item.rtl ?
31
- 'k-i-arrow-60-left' :
32
- 'k-i-arrow-60-right' :
33
- 'k-i-arrow-60-down';
34
- const iconElement = this.renderer.createElement('span');
35
- this.renderer.addClass(iconElement, 'k-icon');
36
- this.renderer.addClass(iconElement, iconClass);
37
- this.renderer.appendChild(this.element.nativeElement, iconElement);
26
+ this.fontIcon = getFontIcon(this.item.horizontal, this.item.rtl);
27
+ this.SVGIcon = getSVGIcon(this.item.horizontal, this.item.rtl);
38
28
  }
39
29
  }
40
- ExpandArrowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExpandArrowDirective, deps: [{ token: i1.ItemsService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
41
- ExpandArrowDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ExpandArrowDirective, selector: "[kendoMenuExpandArrow]", inputs: { index: ["kendoMenuExpandArrow", "index"] }, host: { properties: { "class.k-menu-expand-arrow": "this.hostClasses", "attr.role": "this.role" } }, ngImport: i0 });
42
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExpandArrowDirective, decorators: [{
43
- type: Directive,
30
+ ExpandArrowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExpandArrowComponent, deps: [{ token: i1.ItemsService }], target: i0.ɵɵFactoryTarget.Component });
31
+ ExpandArrowComponentcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ExpandArrowComponent, selector: "[kendoMenuExpandArrow]", inputs: { index: ["kendoMenuExpandArrow", "index"] }, host: { properties: { "class.k-menu-expand-arrow": "this.hostClasses", "attr.role": "this.role" } }, ngImport: i0, template: `<kendo-icon-wrapper [name]="fontIcon" [svgIcon]="SVGIcon"></kendo-icon-wrapper>`, isInline: true, components: [{ type: i2.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }] });
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExpandArrowComponent, decorators: [{
33
+ type: Component,
44
34
  args: [{
45
- selector: '[kendoMenuExpandArrow]'
35
+ selector: '[kendoMenuExpandArrow]',
36
+ template: `<kendo-icon-wrapper [name]="fontIcon" [svgIcon]="SVGIcon"></kendo-icon-wrapper>`
46
37
  }]
47
- }], ctorParameters: function () { return [{ type: i1.ItemsService }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { index: [{
38
+ }], ctorParameters: function () { return [{ type: i1.ItemsService }]; }, propDecorators: { index: [{
48
39
  type: Input,
49
40
  args: ['kendoMenuExpandArrow']
50
41
  }], hostClasses: [{
@@ -13,7 +13,7 @@ import { ActionsService } from '../services/actions.service';
13
13
  import { HoverService } from '../services/hover.service';
14
14
  import { ItemsService } from '../services/items.service';
15
15
  import { NavigationService } from '../services/navigation.service';
16
- import { bodyFactory, getSizeClass } from '../utils';
16
+ import { bodyFactory, getFontIcon, getSizeClass, getSVGIcon } from '../utils';
17
17
  import { POPUP_SETTINGS, POPUP_SETTINGS_RTL } from './popup-settings';
18
18
  import * as i0 from "@angular/core";
19
19
  import * as i1 from "../services/items.service";
@@ -23,6 +23,7 @@ import * as i4 from "../services/navigation.service";
23
23
  import * as i5 from "@angular/common";
24
24
  import * as i6 from "@progress/kendo-angular-popup";
25
25
  import * as i7 from "../context-menu/context-menu.service";
26
+ import * as i8 from "@progress/kendo-angular-icons";
26
27
  /* eslint-disable @angular-eslint/component-selector */
27
28
  /**
28
29
  * @hidden
@@ -238,6 +239,14 @@ export class ItemComponent {
238
239
  this.animate = true;
239
240
  this.size = 'medium';
240
241
  this.openOnClick = false;
242
+ /**
243
+ * @hidden
244
+ */
245
+ this.fontIcon = getFontIcon;
246
+ /**
247
+ * @hidden
248
+ */
249
+ this.SVGIcon = getSVGIcon;
241
250
  this.opened = false;
242
251
  this.navigating = false;
243
252
  this.destroyed = false;
@@ -452,16 +461,9 @@ ItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
452
461
  </ng-container>
453
462
  <ng-template *ngIf="template" [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ item: item, index: index }">
454
463
  </ng-template>
455
- <span *ngIf="hasContent" class="k-menu-expand-arrow" role="presentation">
456
- <span class="k-icon"
457
- [class.k-i-arrow-60-down]="!horizontal"
458
- [class.k-i-arrow-60-right]="horizontal && !rtl"
459
- [class.k-i-arrow-60-left]="horizontal && rtl"
460
- >
461
- </span>
462
- </span>
464
+ <kendo-icon-wrapper *ngIf="hasContent" [name]="fontIcon(horizontal, rtl)" [svgIcon]="SVGIcon(horizontal, rtl)" class="k-menu-expand-arrow" role="presentation"></kendo-icon-wrapper>
463
465
  </ng-template>
464
- `, isInline: true, components: [{ type: ListComponent, selector: "[kendoMenuList]", inputs: ["items", "level", "index", "animate", "size", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
466
+ `, isInline: true, components: [{ type: ListComponent, selector: "[kendoMenuList]", inputs: ["items", "level", "index", "animate", "size", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate"] }, { type: i8.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
465
467
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ItemComponent, decorators: [{
466
468
  type: Component,
467
469
  args: [{
@@ -515,14 +517,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
515
517
  </ng-container>
516
518
  <ng-template *ngIf="template" [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ item: item, index: index }">
517
519
  </ng-template>
518
- <span *ngIf="hasContent" class="k-menu-expand-arrow" role="presentation">
519
- <span class="k-icon"
520
- [class.k-i-arrow-60-down]="!horizontal"
521
- [class.k-i-arrow-60-right]="horizontal && !rtl"
522
- [class.k-i-arrow-60-left]="horizontal && rtl"
523
- >
524
- </span>
525
- </span>
520
+ <kendo-icon-wrapper *ngIf="hasContent" [name]="fontIcon(horizontal, rtl)" [svgIcon]="SVGIcon(horizontal, rtl)" class="k-menu-expand-arrow" role="presentation"></kendo-icon-wrapper>
526
521
  </ng-template>
527
522
  `
528
523
  }]
package/esm2020/utils.mjs CHANGED
@@ -4,6 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { ElementRef } from '@angular/core';
6
6
  import { isDocumentAvailable } from '@progress/kendo-angular-common';
7
+ import { caretAltDownIcon, caretAltLeftIcon, caretAltRightIcon } from '@progress/kendo-svg-icons';
7
8
  /**
8
9
  * @hidden
9
10
  */
@@ -27,3 +28,25 @@ export const getSizeClass = (size) => {
27
28
  };
28
29
  return SIZE_CLASSES[size];
29
30
  };
31
+ /**
32
+ * @hidden
33
+ */
34
+ export const getFontIcon = (horizontal, rtl) => {
35
+ const icon = horizontal ?
36
+ rtl ?
37
+ 'caret-alt-left' :
38
+ 'caret-alt-right' :
39
+ 'caret-alt-down';
40
+ return icon;
41
+ };
42
+ /**
43
+ * @hidden
44
+ */
45
+ export const getSVGIcon = (horizontal, rtl) => {
46
+ const icon = horizontal ?
47
+ rtl ?
48
+ caretAltLeftIcon :
49
+ caretAltRightIcon :
50
+ caretAltDownIcon;
51
+ return icon;
52
+ };
@@ -8,10 +8,13 @@ import * as i3 from '@progress/kendo-angular-l10n';
8
8
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
9
9
  import { validatePackage } from '@progress/kendo-licensing';
10
10
  import { PreventableEvent as PreventableEvent$1, hasObservers, isDocumentAvailable, Keys } from '@progress/kendo-angular-common';
11
+ import { caretAltLeftIcon, caretAltRightIcon, caretAltDownIcon } from '@progress/kendo-svg-icons';
11
12
  import * as i6 from '@progress/kendo-angular-popup';
12
13
  import { PopupService, POPUP_CONTAINER, PopupModule } from '@progress/kendo-angular-popup';
13
14
  import * as i5 from '@angular/common';
14
15
  import { CommonModule } from '@angular/common';
16
+ import * as i8 from '@progress/kendo-angular-icons';
17
+ import { IconsModule } from '@progress/kendo-angular-icons';
15
18
 
16
19
  /**
17
20
  * @hidden
@@ -20,7 +23,7 @@ const packageMetadata = {
20
23
  name: '@progress/kendo-angular-menu',
21
24
  productName: 'Kendo UI for Angular',
22
25
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
23
- publishDate: 1673459118,
26
+ publishDate: 1673466761,
24
27
  version: '',
25
28
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
26
29
  };
@@ -1155,6 +1158,28 @@ const getSizeClass = (size) => {
1155
1158
  };
1156
1159
  return SIZE_CLASSES[size];
1157
1160
  };
1161
+ /**
1162
+ * @hidden
1163
+ */
1164
+ const getFontIcon = (horizontal, rtl) => {
1165
+ const icon = horizontal ?
1166
+ rtl ?
1167
+ 'caret-alt-left' :
1168
+ 'caret-alt-right' :
1169
+ 'caret-alt-down';
1170
+ return icon;
1171
+ };
1172
+ /**
1173
+ * @hidden
1174
+ */
1175
+ const getSVGIcon = (horizontal, rtl) => {
1176
+ const icon = horizontal ?
1177
+ rtl ?
1178
+ caretAltLeftIcon :
1179
+ caretAltRightIcon :
1180
+ caretAltDownIcon;
1181
+ return icon;
1182
+ };
1158
1183
 
1159
1184
  /**
1160
1185
  * @hidden
@@ -1457,6 +1482,14 @@ class ItemComponent {
1457
1482
  this.animate = true;
1458
1483
  this.size = 'medium';
1459
1484
  this.openOnClick = false;
1485
+ /**
1486
+ * @hidden
1487
+ */
1488
+ this.fontIcon = getFontIcon;
1489
+ /**
1490
+ * @hidden
1491
+ */
1492
+ this.SVGIcon = getSVGIcon;
1460
1493
  this.opened = false;
1461
1494
  this.navigating = false;
1462
1495
  this.destroyed = false;
@@ -1671,16 +1704,9 @@ ItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
1671
1704
  </ng-container>
1672
1705
  <ng-template *ngIf="template" [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ item: item, index: index }">
1673
1706
  </ng-template>
1674
- <span *ngIf="hasContent" class="k-menu-expand-arrow" role="presentation">
1675
- <span class="k-icon"
1676
- [class.k-i-arrow-60-down]="!horizontal"
1677
- [class.k-i-arrow-60-right]="horizontal && !rtl"
1678
- [class.k-i-arrow-60-left]="horizontal && rtl"
1679
- >
1680
- </span>
1681
- </span>
1707
+ <kendo-icon-wrapper *ngIf="hasContent" [name]="fontIcon(horizontal, rtl)" [svgIcon]="SVGIcon(horizontal, rtl)" class="k-menu-expand-arrow" role="presentation"></kendo-icon-wrapper>
1682
1708
  </ng-template>
1683
- `, isInline: true, components: [{ type: ListComponent, selector: "[kendoMenuList]", inputs: ["items", "level", "index", "animate", "size", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1709
+ `, isInline: true, components: [{ type: ListComponent, selector: "[kendoMenuList]", inputs: ["items", "level", "index", "animate", "size", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate"] }, { type: i8.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1684
1710
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ItemComponent, decorators: [{
1685
1711
  type: Component,
1686
1712
  args: [{
@@ -1734,14 +1760,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1734
1760
  </ng-container>
1735
1761
  <ng-template *ngIf="template" [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ item: item, index: index }">
1736
1762
  </ng-template>
1737
- <span *ngIf="hasContent" class="k-menu-expand-arrow" role="presentation">
1738
- <span class="k-icon"
1739
- [class.k-i-arrow-60-down]="!horizontal"
1740
- [class.k-i-arrow-60-right]="horizontal && !rtl"
1741
- [class.k-i-arrow-60-left]="horizontal && rtl"
1742
- >
1743
- </span>
1744
- </span>
1763
+ <kendo-icon-wrapper *ngIf="hasContent" [name]="fontIcon(horizontal, rtl)" [svgIcon]="SVGIcon(horizontal, rtl)" class="k-menu-expand-arrow" role="presentation"></kendo-icon-wrapper>
1745
1764
  </ng-template>
1746
1765
  `
1747
1766
  }]
@@ -2083,44 +2102,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2083
2102
  }] } });
2084
2103
 
2085
2104
  /**
2086
- * Represents a directive that can be used in the [`linkTemplate`]({% slug api_menu_itemlinktemplatedirective %})
2105
+ * Represents a component that can be used in the [`linkTemplate`]({% slug api_menu_itemlinktemplatedirective %})
2087
2106
  * of the items to render the default expand arrow.
2088
2107
  */
2089
- class ExpandArrowDirective {
2090
- constructor(itemsService, element, renderer) {
2108
+ class ExpandArrowComponent {
2109
+ constructor(itemsService) {
2091
2110
  this.itemsService = itemsService;
2092
- this.element = element;
2093
- this.renderer = renderer;
2094
2111
  this.hostClasses = true;
2095
2112
  this.role = 'presentation';
2096
2113
  }
2097
2114
  ngOnInit() {
2098
2115
  if (isDevMode() && !this.index) {
2099
- throw new Error('The kendoMenuExpandArrow directive requires the item index to be set.');
2116
+ throw new Error('The kendoMenuExpandArrow component requires the item index to be set.');
2100
2117
  }
2101
2118
  this.item = this.itemsService.get(this.index) || {};
2102
- this.createIconElement();
2103
- }
2104
- createIconElement() {
2105
- const iconClass = this.item.horizontal ?
2106
- this.item.rtl ?
2107
- 'k-i-arrow-60-left' :
2108
- 'k-i-arrow-60-right' :
2109
- 'k-i-arrow-60-down';
2110
- const iconElement = this.renderer.createElement('span');
2111
- this.renderer.addClass(iconElement, 'k-icon');
2112
- this.renderer.addClass(iconElement, iconClass);
2113
- this.renderer.appendChild(this.element.nativeElement, iconElement);
2119
+ this.fontIcon = getFontIcon(this.item.horizontal, this.item.rtl);
2120
+ this.SVGIcon = getSVGIcon(this.item.horizontal, this.item.rtl);
2114
2121
  }
2115
2122
  }
2116
- ExpandArrowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExpandArrowDirective, deps: [{ token: ItemsService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
2117
- ExpandArrowDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ExpandArrowDirective, selector: "[kendoMenuExpandArrow]", inputs: { index: ["kendoMenuExpandArrow", "index"] }, host: { properties: { "class.k-menu-expand-arrow": "this.hostClasses", "attr.role": "this.role" } }, ngImport: i0 });
2118
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExpandArrowDirective, decorators: [{
2119
- type: Directive,
2123
+ ExpandArrowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExpandArrowComponent, deps: [{ token: ItemsService }], target: i0.ɵɵFactoryTarget.Component });
2124
+ ExpandArrowComponentcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ExpandArrowComponent, selector: "[kendoMenuExpandArrow]", inputs: { index: ["kendoMenuExpandArrow", "index"] }, host: { properties: { "class.k-menu-expand-arrow": "this.hostClasses", "attr.role": "this.role" } }, ngImport: i0, template: `<kendo-icon-wrapper [name]="fontIcon" [svgIcon]="SVGIcon"></kendo-icon-wrapper>`, isInline: true, components: [{ type: i8.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }] });
2125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExpandArrowComponent, decorators: [{
2126
+ type: Component,
2120
2127
  args: [{
2121
- selector: '[kendoMenuExpandArrow]'
2128
+ selector: '[kendoMenuExpandArrow]',
2129
+ template: `<kendo-icon-wrapper [name]="fontIcon" [svgIcon]="SVGIcon"></kendo-icon-wrapper>`
2122
2130
  }]
2123
- }], ctorParameters: function () { return [{ type: ItemsService }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { index: [{
2131
+ }], ctorParameters: function () { return [{ type: ItemsService }]; }, propDecorators: { index: [{
2124
2132
  type: Input,
2125
2133
  args: ['kendoMenuExpandArrow']
2126
2134
  }], hostClasses: [{
@@ -2384,7 +2392,7 @@ const COMPONENT_EXPORTS = [
2384
2392
  HierarchyBindingDirective,
2385
2393
  FlatBindingDirective,
2386
2394
  LinkDirective,
2387
- ExpandArrowDirective
2395
+ ExpandArrowComponent
2388
2396
  ];
2389
2397
  const COMPONENT_DIRECTIVES$1 = [
2390
2398
  ...COMPONENT_EXPORTS,
@@ -2434,8 +2442,8 @@ MenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13
2434
2442
  HierarchyBindingDirective,
2435
2443
  FlatBindingDirective,
2436
2444
  LinkDirective,
2437
- ExpandArrowDirective, ListComponent,
2438
- ItemComponent], imports: [PopupModule, CommonModule], exports: [MenuComponent,
2445
+ ExpandArrowComponent, ListComponent,
2446
+ ItemComponent], imports: [PopupModule, CommonModule, IconsModule], exports: [MenuComponent,
2439
2447
  MenuItemComponent,
2440
2448
  ItemTemplateDirective,
2441
2449
  ItemLinkTemplateDirective,
@@ -2443,14 +2451,14 @@ MenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13
2443
2451
  HierarchyBindingDirective,
2444
2452
  FlatBindingDirective,
2445
2453
  LinkDirective,
2446
- ExpandArrowDirective] });
2447
- MenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MenuModule, imports: [[PopupModule, CommonModule]] });
2454
+ ExpandArrowComponent] });
2455
+ MenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MenuModule, imports: [[PopupModule, CommonModule, IconsModule]] });
2448
2456
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MenuModule, decorators: [{
2449
2457
  type: NgModule,
2450
2458
  args: [{
2451
2459
  declarations: [COMPONENT_DIRECTIVES$1],
2452
2460
  exports: [COMPONENT_EXPORTS],
2453
- imports: [PopupModule, CommonModule]
2461
+ imports: [PopupModule, CommonModule, IconsModule]
2454
2462
  }]
2455
2463
  }] });
2456
2464
 
@@ -3131,5 +3139,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
3131
3139
  * Generated bundle index. Do not edit.
3132
3140
  */
3133
3141
 
3134
- export { ContextMenuComponent, ContextMenuEvent, ContextMenuModule, ContextMenuPopupEvent, ContextMenuSelectEvent, ContextMenuService, ContextMenuTargetContainerDirective, ContextMenuTargetDirective, ContextMenuTemplateDirective, ExpandArrowDirective, FlatBindingDirective, HierarchyBindingDirective, ItemComponent, ItemContentTemplateDirective, ItemLinkTemplateDirective, ItemTemplateDirective, ItemsService, LinkDirective, ListComponent, MenuComponent, MenuEvent, MenuItemComponent, MenuModule, MenuSelectEvent, MenusModule };
3142
+ export { ContextMenuComponent, ContextMenuEvent, ContextMenuModule, ContextMenuPopupEvent, ContextMenuSelectEvent, ContextMenuService, ContextMenuTargetContainerDirective, ContextMenuTargetDirective, ContextMenuTemplateDirective, ExpandArrowComponent, FlatBindingDirective, HierarchyBindingDirective, ItemComponent, ItemContentTemplateDirective, ItemLinkTemplateDirective, ItemTemplateDirective, ItemsService, LinkDirective, ListComponent, MenuComponent, MenuEvent, MenuItemComponent, MenuModule, MenuSelectEvent, MenusModule };
3135
3143
 
@@ -8,10 +8,13 @@ import * as i3 from '@progress/kendo-angular-l10n';
8
8
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
9
9
  import { validatePackage } from '@progress/kendo-licensing';
10
10
  import { PreventableEvent as PreventableEvent$1, hasObservers, isDocumentAvailable, Keys } from '@progress/kendo-angular-common';
11
+ import { caretAltLeftIcon, caretAltRightIcon, caretAltDownIcon } from '@progress/kendo-svg-icons';
11
12
  import * as i6 from '@progress/kendo-angular-popup';
12
13
  import { PopupService, POPUP_CONTAINER, PopupModule } from '@progress/kendo-angular-popup';
13
14
  import * as i5 from '@angular/common';
14
15
  import { CommonModule } from '@angular/common';
16
+ import * as i8 from '@progress/kendo-angular-icons';
17
+ import { IconsModule } from '@progress/kendo-angular-icons';
15
18
 
16
19
  /**
17
20
  * @hidden
@@ -20,7 +23,7 @@ const packageMetadata = {
20
23
  name: '@progress/kendo-angular-menu',
21
24
  productName: 'Kendo UI for Angular',
22
25
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
23
- publishDate: 1673459118,
26
+ publishDate: 1673466761,
24
27
  version: '',
25
28
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
26
29
  };
@@ -1172,6 +1175,28 @@ const getSizeClass = (size) => {
1172
1175
  };
1173
1176
  return SIZE_CLASSES[size];
1174
1177
  };
1178
+ /**
1179
+ * @hidden
1180
+ */
1181
+ const getFontIcon = (horizontal, rtl) => {
1182
+ const icon = horizontal ?
1183
+ rtl ?
1184
+ 'caret-alt-left' :
1185
+ 'caret-alt-right' :
1186
+ 'caret-alt-down';
1187
+ return icon;
1188
+ };
1189
+ /**
1190
+ * @hidden
1191
+ */
1192
+ const getSVGIcon = (horizontal, rtl) => {
1193
+ const icon = horizontal ?
1194
+ rtl ?
1195
+ caretAltLeftIcon :
1196
+ caretAltRightIcon :
1197
+ caretAltDownIcon;
1198
+ return icon;
1199
+ };
1175
1200
 
1176
1201
  const POPUP_ALIGN = {
1177
1202
  vertical: 'top',
@@ -1451,6 +1476,14 @@ class ItemComponent {
1451
1476
  this.animate = true;
1452
1477
  this.size = 'medium';
1453
1478
  this.openOnClick = false;
1479
+ /**
1480
+ * @hidden
1481
+ */
1482
+ this.fontIcon = getFontIcon;
1483
+ /**
1484
+ * @hidden
1485
+ */
1486
+ this.SVGIcon = getSVGIcon;
1454
1487
  this.opened = false;
1455
1488
  this.navigating = false;
1456
1489
  this.destroyed = false;
@@ -1665,16 +1698,9 @@ ItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
1665
1698
  </ng-container>
1666
1699
  <ng-template *ngIf="template" [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ item: item, index: index }">
1667
1700
  </ng-template>
1668
- <span *ngIf="hasContent" class="k-menu-expand-arrow" role="presentation">
1669
- <span class="k-icon"
1670
- [class.k-i-arrow-60-down]="!horizontal"
1671
- [class.k-i-arrow-60-right]="horizontal && !rtl"
1672
- [class.k-i-arrow-60-left]="horizontal && rtl"
1673
- >
1674
- </span>
1675
- </span>
1701
+ <kendo-icon-wrapper *ngIf="hasContent" [name]="fontIcon(horizontal, rtl)" [svgIcon]="SVGIcon(horizontal, rtl)" class="k-menu-expand-arrow" role="presentation"></kendo-icon-wrapper>
1676
1702
  </ng-template>
1677
- `, isInline: true, components: [{ type: ListComponent, selector: "[kendoMenuList]", inputs: ["items", "level", "index", "animate", "size", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1703
+ `, isInline: true, components: [{ type: ListComponent, selector: "[kendoMenuList]", inputs: ["items", "level", "index", "animate", "size", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate"] }, { type: i8.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1678
1704
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ItemComponent, decorators: [{
1679
1705
  type: Component,
1680
1706
  args: [{
@@ -1728,14 +1754,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1728
1754
  </ng-container>
1729
1755
  <ng-template *ngIf="template" [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ item: item, index: index }">
1730
1756
  </ng-template>
1731
- <span *ngIf="hasContent" class="k-menu-expand-arrow" role="presentation">
1732
- <span class="k-icon"
1733
- [class.k-i-arrow-60-down]="!horizontal"
1734
- [class.k-i-arrow-60-right]="horizontal && !rtl"
1735
- [class.k-i-arrow-60-left]="horizontal && rtl"
1736
- >
1737
- </span>
1738
- </span>
1757
+ <kendo-icon-wrapper *ngIf="hasContent" [name]="fontIcon(horizontal, rtl)" [svgIcon]="SVGIcon(horizontal, rtl)" class="k-menu-expand-arrow" role="presentation"></kendo-icon-wrapper>
1739
1758
  </ng-template>
1740
1759
  `
1741
1760
  }]
@@ -2073,44 +2092,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2073
2092
  }] } });
2074
2093
 
2075
2094
  /**
2076
- * Represents a directive that can be used in the [`linkTemplate`]({% slug api_menu_itemlinktemplatedirective %})
2095
+ * Represents a component that can be used in the [`linkTemplate`]({% slug api_menu_itemlinktemplatedirective %})
2077
2096
  * of the items to render the default expand arrow.
2078
2097
  */
2079
- class ExpandArrowDirective {
2080
- constructor(itemsService, element, renderer) {
2098
+ class ExpandArrowComponent {
2099
+ constructor(itemsService) {
2081
2100
  this.itemsService = itemsService;
2082
- this.element = element;
2083
- this.renderer = renderer;
2084
2101
  this.hostClasses = true;
2085
2102
  this.role = 'presentation';
2086
2103
  }
2087
2104
  ngOnInit() {
2088
2105
  if (isDevMode() && !this.index) {
2089
- throw new Error('The kendoMenuExpandArrow directive requires the item index to be set.');
2106
+ throw new Error('The kendoMenuExpandArrow component requires the item index to be set.');
2090
2107
  }
2091
2108
  this.item = this.itemsService.get(this.index) || {};
2092
- this.createIconElement();
2093
- }
2094
- createIconElement() {
2095
- const iconClass = this.item.horizontal ?
2096
- this.item.rtl ?
2097
- 'k-i-arrow-60-left' :
2098
- 'k-i-arrow-60-right' :
2099
- 'k-i-arrow-60-down';
2100
- const iconElement = this.renderer.createElement('span');
2101
- this.renderer.addClass(iconElement, 'k-icon');
2102
- this.renderer.addClass(iconElement, iconClass);
2103
- this.renderer.appendChild(this.element.nativeElement, iconElement);
2109
+ this.fontIcon = getFontIcon(this.item.horizontal, this.item.rtl);
2110
+ this.SVGIcon = getSVGIcon(this.item.horizontal, this.item.rtl);
2104
2111
  }
2105
2112
  }
2106
- ExpandArrowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExpandArrowDirective, deps: [{ token: ItemsService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
2107
- ExpandArrowDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ExpandArrowDirective, selector: "[kendoMenuExpandArrow]", inputs: { index: ["kendoMenuExpandArrow", "index"] }, host: { properties: { "class.k-menu-expand-arrow": "this.hostClasses", "attr.role": "this.role" } }, ngImport: i0 });
2108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExpandArrowDirective, decorators: [{
2109
- type: Directive,
2113
+ ExpandArrowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExpandArrowComponent, deps: [{ token: ItemsService }], target: i0.ɵɵFactoryTarget.Component });
2114
+ ExpandArrowComponentcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ExpandArrowComponent, selector: "[kendoMenuExpandArrow]", inputs: { index: ["kendoMenuExpandArrow", "index"] }, host: { properties: { "class.k-menu-expand-arrow": "this.hostClasses", "attr.role": "this.role" } }, ngImport: i0, template: `<kendo-icon-wrapper [name]="fontIcon" [svgIcon]="SVGIcon"></kendo-icon-wrapper>`, isInline: true, components: [{ type: i8.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }] });
2115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ExpandArrowComponent, decorators: [{
2116
+ type: Component,
2110
2117
  args: [{
2111
- selector: '[kendoMenuExpandArrow]'
2118
+ selector: '[kendoMenuExpandArrow]',
2119
+ template: `<kendo-icon-wrapper [name]="fontIcon" [svgIcon]="SVGIcon"></kendo-icon-wrapper>`
2112
2120
  }]
2113
- }], ctorParameters: function () { return [{ type: ItemsService }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { index: [{
2121
+ }], ctorParameters: function () { return [{ type: ItemsService }]; }, propDecorators: { index: [{
2114
2122
  type: Input,
2115
2123
  args: ['kendoMenuExpandArrow']
2116
2124
  }], hostClasses: [{
@@ -2374,7 +2382,7 @@ const COMPONENT_EXPORTS = [
2374
2382
  HierarchyBindingDirective,
2375
2383
  FlatBindingDirective,
2376
2384
  LinkDirective,
2377
- ExpandArrowDirective
2385
+ ExpandArrowComponent
2378
2386
  ];
2379
2387
  const COMPONENT_DIRECTIVES$1 = [
2380
2388
  ...COMPONENT_EXPORTS,
@@ -2424,8 +2432,8 @@ MenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13
2424
2432
  HierarchyBindingDirective,
2425
2433
  FlatBindingDirective,
2426
2434
  LinkDirective,
2427
- ExpandArrowDirective, ListComponent,
2428
- ItemComponent], imports: [PopupModule, CommonModule], exports: [MenuComponent,
2435
+ ExpandArrowComponent, ListComponent,
2436
+ ItemComponent], imports: [PopupModule, CommonModule, IconsModule], exports: [MenuComponent,
2429
2437
  MenuItemComponent,
2430
2438
  ItemTemplateDirective,
2431
2439
  ItemLinkTemplateDirective,
@@ -2433,14 +2441,14 @@ MenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13
2433
2441
  HierarchyBindingDirective,
2434
2442
  FlatBindingDirective,
2435
2443
  LinkDirective,
2436
- ExpandArrowDirective] });
2437
- MenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MenuModule, imports: [[PopupModule, CommonModule]] });
2444
+ ExpandArrowComponent] });
2445
+ MenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MenuModule, imports: [[PopupModule, CommonModule, IconsModule]] });
2438
2446
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MenuModule, decorators: [{
2439
2447
  type: NgModule,
2440
2448
  args: [{
2441
2449
  declarations: [COMPONENT_DIRECTIVES$1],
2442
2450
  exports: [COMPONENT_EXPORTS],
2443
- imports: [PopupModule, CommonModule]
2451
+ imports: [PopupModule, CommonModule, IconsModule]
2444
2452
  }]
2445
2453
  }] });
2446
2454
 
@@ -3119,5 +3127,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
3119
3127
  * Generated bundle index. Do not edit.
3120
3128
  */
3121
3129
 
3122
- export { ContextMenuComponent, ContextMenuEvent, ContextMenuModule, ContextMenuPopupEvent, ContextMenuSelectEvent, ContextMenuService, ContextMenuTargetContainerDirective, ContextMenuTargetDirective, ContextMenuTemplateDirective, ExpandArrowDirective, FlatBindingDirective, HierarchyBindingDirective, ItemComponent, ItemContentTemplateDirective, ItemLinkTemplateDirective, ItemTemplateDirective, ItemsService, LinkDirective, ListComponent, MenuComponent, MenuEvent, MenuItemComponent, MenuModule, MenuSelectEvent, MenusModule };
3130
+ export { ContextMenuComponent, ContextMenuEvent, ContextMenuModule, ContextMenuPopupEvent, ContextMenuSelectEvent, ContextMenuService, ContextMenuTargetContainerDirective, ContextMenuTargetDirective, ContextMenuTemplateDirective, ExpandArrowComponent, FlatBindingDirective, HierarchyBindingDirective, ItemComponent, ItemContentTemplateDirective, ItemLinkTemplateDirective, ItemTemplateDirective, ItemsService, LinkDirective, ListComponent, MenuComponent, MenuEvent, MenuItemComponent, MenuModule, MenuSelectEvent, MenusModule };
3123
3131
 
package/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  export { MenuComponent } from './menu.component';
6
6
  export { ListComponent, ItemComponent } from './rendering/list.component';
7
7
  export { LinkDirective } from './rendering/link.directive';
8
- export { ExpandArrowDirective } from './rendering/arrow.directive';
8
+ export { ExpandArrowComponent } from './rendering/arrow.component';
9
9
  export { MenuItemComponent } from './menu-item.component';
10
10
  export { MenuAnimation } from './menu-animation.interface';
11
11
  export { MenuItem } from './menu-item.interface';
package/menu.module.d.ts CHANGED
@@ -11,10 +11,11 @@ import * as i5 from "./templates/item-content-template.directive";
11
11
  import * as i6 from "./data-binding/hierachy-binding.directive";
12
12
  import * as i7 from "./data-binding/flat-binding.directive";
13
13
  import * as i8 from "./rendering/link.directive";
14
- import * as i9 from "./rendering/arrow.directive";
14
+ import * as i9 from "./rendering/arrow.component";
15
15
  import * as i10 from "./rendering/list.component";
16
16
  import * as i11 from "@progress/kendo-angular-popup";
17
17
  import * as i12 from "@angular/common";
18
+ import * as i13 from "@progress/kendo-angular-icons";
18
19
  /**
19
20
  * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
20
21
  * definition for the Menu component.
@@ -49,6 +50,6 @@ import * as i12 from "@angular/common";
49
50
  */
50
51
  export declare class MenuModule {
51
52
  static ɵfac: i0.ɵɵFactoryDeclaration<MenuModule, never>;
52
- static ɵmod: i0.ɵɵNgModuleDeclaration<MenuModule, [typeof i1.MenuComponent, typeof i2.MenuItemComponent, typeof i3.ItemTemplateDirective, typeof i4.ItemLinkTemplateDirective, typeof i5.ItemContentTemplateDirective, typeof i6.HierarchyBindingDirective, typeof i7.FlatBindingDirective, typeof i8.LinkDirective, typeof i9.ExpandArrowDirective, typeof i10.ListComponent, typeof i10.ItemComponent], [typeof i11.PopupModule, typeof i12.CommonModule], [typeof i1.MenuComponent, typeof i2.MenuItemComponent, typeof i3.ItemTemplateDirective, typeof i4.ItemLinkTemplateDirective, typeof i5.ItemContentTemplateDirective, typeof i6.HierarchyBindingDirective, typeof i7.FlatBindingDirective, typeof i8.LinkDirective, typeof i9.ExpandArrowDirective]>;
53
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MenuModule, [typeof i1.MenuComponent, typeof i2.MenuItemComponent, typeof i3.ItemTemplateDirective, typeof i4.ItemLinkTemplateDirective, typeof i5.ItemContentTemplateDirective, typeof i6.HierarchyBindingDirective, typeof i7.FlatBindingDirective, typeof i8.LinkDirective, typeof i9.ExpandArrowComponent, typeof i10.ListComponent, typeof i10.ItemComponent], [typeof i11.PopupModule, typeof i12.CommonModule, typeof i13.IconsModule], [typeof i1.MenuComponent, typeof i2.MenuItemComponent, typeof i3.ItemTemplateDirective, typeof i4.ItemLinkTemplateDirective, typeof i5.ItemContentTemplateDirective, typeof i6.HierarchyBindingDirective, typeof i7.FlatBindingDirective, typeof i8.LinkDirective, typeof i9.ExpandArrowComponent]>;
53
54
  static ɵinj: i0.ɵɵInjectorDeclaration<MenuModule>;
54
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-menu",
3
- "version": "11.0.0-develop.97",
3
+ "version": "11.0.0-develop.99",
4
4
  "description": "Kendo UI Angular Menu component",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -23,10 +23,11 @@
23
23
  "@angular/core": "13 - 15",
24
24
  "@angular/platform-browser": "13 - 15",
25
25
  "@progress/kendo-licensing": "^1.0.2",
26
- "@progress/kendo-angular-common": "11.0.0-develop.97",
27
- "@progress/kendo-angular-l10n": "11.0.0-develop.97",
28
- "@progress/kendo-angular-popup": "11.0.0-develop.97",
29
- "@progress/kendo-angular-schematics": "11.0.0-develop.97",
26
+ "@progress/kendo-angular-common": "11.0.0-develop.99",
27
+ "@progress/kendo-angular-l10n": "11.0.0-develop.99",
28
+ "@progress/kendo-angular-icons": "11.0.0-develop.99",
29
+ "@progress/kendo-angular-popup": "11.0.0-develop.99",
30
+ "@progress/kendo-angular-schematics": "11.0.0-develop.99",
30
31
  "rxjs": "^6.5.3 || ^7.0.0"
31
32
  },
32
33
  "dependencies": {
@@ -2,17 +2,16 @@
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 { OnInit, ElementRef, Renderer2 } from '@angular/core';
5
+ import { OnInit } from '@angular/core';
6
+ import { SVGIcon } from '@progress/kendo-svg-icons';
6
7
  import { ItemsService } from '../services/items.service';
7
8
  import * as i0 from "@angular/core";
8
9
  /**
9
- * Represents a directive that can be used in the [`linkTemplate`]({% slug api_menu_itemlinktemplatedirective %})
10
+ * Represents a component that can be used in the [`linkTemplate`]({% slug api_menu_itemlinktemplatedirective %})
10
11
  * of the items to render the default expand arrow.
11
12
  */
12
- export declare class ExpandArrowDirective implements OnInit {
13
+ export declare class ExpandArrowComponent implements OnInit {
13
14
  private itemsService;
14
- private element;
15
- private renderer;
16
15
  /**
17
16
  * The index of the Menu item. The input is mandatory.
18
17
  */
@@ -20,9 +19,16 @@ export declare class ExpandArrowDirective implements OnInit {
20
19
  hostClasses: boolean;
21
20
  role: string;
22
21
  private item;
23
- constructor(itemsService: ItemsService, element: ElementRef, renderer: Renderer2);
22
+ /**
23
+ * @hidden
24
+ */
25
+ fontIcon: string;
26
+ /**
27
+ * @hidden
28
+ */
29
+ SVGIcon: SVGIcon;
30
+ constructor(itemsService: ItemsService);
24
31
  ngOnInit(): void;
25
- private createIconElement;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<ExpandArrowDirective, never>;
27
- static ɵdir: i0.ɵɵDirectiveDeclaration<ExpandArrowDirective, "[kendoMenuExpandArrow]", never, { "index": "kendoMenuExpandArrow"; }, {}, never>;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExpandArrowComponent, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<ExpandArrowComponent, "[kendoMenuExpandArrow]", never, { "index": "kendoMenuExpandArrow"; }, {}, never, never>;
28
34
  }
@@ -12,6 +12,7 @@ import { ActionsService } from '../services/actions.service';
12
12
  import { HoverService } from '../services/hover.service';
13
13
  import { ItemsService } from '../services/items.service';
14
14
  import { NavigationService } from '../services/navigation.service';
15
+ import { SVGIcon } from '@progress/kendo-svg-icons';
15
16
  import * as i0 from "@angular/core";
16
17
  /**
17
18
  * @hidden
@@ -88,6 +89,14 @@ export declare class ItemComponent {
88
89
  get menuListClasses(): string;
89
90
  get children(): any[];
90
91
  get template(): TemplateRef<any>;
92
+ /**
93
+ * @hidden
94
+ */
95
+ fontIcon: (horizontal: boolean, rtl: boolean) => string;
96
+ /**
97
+ * @hidden
98
+ */
99
+ SVGIcon: (horizontal: boolean, rtl: boolean) => SVGIcon;
91
100
  opened: boolean;
92
101
  navigating: boolean;
93
102
  childId: string;
@@ -2,8 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const schematics_1 = require("@angular-devkit/schematics");
4
4
  function default_1(options) {
5
- const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'MenuModule', package: 'menu' //package name, e.g grid
6
- });
5
+ const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'MenuModule', package: 'menu', peerDependencies: {
6
+ // Peer dependency of icons
7
+ "@progress/kendo-svg-icons": "^1.0.0"
8
+ } });
7
9
  return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
8
10
  }
9
11
  exports.default = default_1;
package/utils.d.ts CHANGED
@@ -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 { ElementRef } from '@angular/core';
6
+ import { SVGIcon } from '@progress/kendo-svg-icons';
6
7
  import { MenuSize } from './size';
7
8
  /**
8
9
  * @hidden
@@ -16,3 +17,11 @@ export declare const bodyFactory: () => ElementRef;
16
17
  * @hidden
17
18
  */
18
19
  export declare const getSizeClass: (size: MenuSize) => string;
20
+ /**
21
+ * @hidden
22
+ */
23
+ export declare const getFontIcon: (horizontal: boolean, rtl: boolean) => string;
24
+ /**
25
+ * @hidden
26
+ */
27
+ export declare const getSVGIcon: (horizontal: boolean, rtl: boolean) => SVGIcon;