@progress/kendo-angular-menu 3.0.6-dev.202203091409 → 4.0.0-next.202203140854

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.
Files changed (199) hide show
  1. package/bundles/kendo-angular-menu.umd.js +5 -0
  2. package/{dist/es2015/constants.d.ts → constants.d.ts} +0 -0
  3. package/{dist/es2015/context-menu → context-menu}/context-menu-event.d.ts +0 -0
  4. package/{dist/es2015/context-menu → context-menu}/context-menu-items.service.d.ts +3 -0
  5. package/{dist/es2015/context-menu → context-menu}/context-menu-popup-event.d.ts +0 -0
  6. package/{dist/es2015/context-menu → context-menu}/context-menu-select-event.d.ts +0 -0
  7. package/{dist/es2015/context-menu → context-menu}/context-menu-target-container.directive.d.ts +3 -0
  8. package/{dist/es2015/context-menu → context-menu}/context-menu-target.directive.d.ts +3 -0
  9. package/{dist/es2015/context-menu → context-menu}/context-menu-target.service.d.ts +3 -0
  10. package/{dist/es2015/context-menu → context-menu}/context-menu-template.directive.d.ts +3 -0
  11. package/{dist/es2015/context-menu → context-menu}/context-menu.component.d.ts +4 -1
  12. package/{dist/es2015/context-menu → context-menu}/context-menu.module.d.ts +11 -0
  13. package/{dist/es2015/context-menu → context-menu}/context-menu.service.d.ts +3 -0
  14. package/{dist/es2015/data-binding → data-binding}/binding-directive-base.d.ts +3 -0
  15. package/{dist/es2015/data-binding → data-binding}/flat-binding.directive.d.ts +3 -0
  16. package/{dist/es2015/data-binding → data-binding}/hierachy-binding.directive.d.ts +3 -0
  17. package/{dist/es2015/data-binding → data-binding}/utils.d.ts +0 -0
  18. package/{dist/es2015/dom-queries.d.ts → dom-queries.d.ts} +0 -0
  19. package/{dist/es2015 → esm2015}/constants.js +0 -0
  20. package/{dist/es2015 → esm2015}/context-menu/context-menu-event.js +0 -0
  21. package/esm2015/context-menu/context-menu-items.service.js +25 -0
  22. package/{dist/es2015 → esm2015}/context-menu/context-menu-popup-event.js +0 -0
  23. package/{dist/es2015 → esm2015}/context-menu/context-menu-select-event.js +0 -0
  24. package/esm2015/context-menu/context-menu-target-container.directive.js +32 -0
  25. package/esm2015/context-menu/context-menu-target.directive.js +46 -0
  26. package/{dist/es2015 → esm2015}/context-menu/context-menu-target.service.js +8 -10
  27. package/esm2015/context-menu/context-menu-template.directive.js +32 -0
  28. package/{dist/es2015 → esm2015}/context-menu/context-menu.component.js +107 -113
  29. package/{dist/es2015 → esm2015}/context-menu/context-menu.module.js +20 -11
  30. package/{dist/es2015 → esm2015}/context-menu/context-menu.service.js +8 -10
  31. package/{dist/es2015 → esm2015}/data-binding/binding-directive-base.js +11 -0
  32. package/esm2015/data-binding/flat-binding.directive.js +83 -0
  33. package/esm2015/data-binding/hierachy-binding.directive.js +72 -0
  34. package/{dist/es2015 → esm2015}/data-binding/utils.js +1 -1
  35. package/{dist/es2015 → esm2015}/dom-queries.js +0 -3
  36. package/{dist/es/constants.js → esm2015/kendo-angular-menu.js} +2 -2
  37. package/{dist/es → esm2015}/main.js +3 -2
  38. package/{dist/es → esm2015}/menu-animation.interface.js +1 -0
  39. package/esm2015/menu-base.js +69 -0
  40. package/{dist/es2015 → esm2015}/menu-event.js +0 -0
  41. package/{dist/es2015 → esm2015}/menu-item.component.js +41 -60
  42. package/{dist/es → esm2015}/menu-item.interface.js +1 -0
  43. package/{dist/es2015 → esm2015}/menu-select-event.js +0 -0
  44. package/{dist/es2015 → esm2015}/menu.component.js +76 -63
  45. package/{dist/es2015 → esm2015}/menu.module.js +32 -13
  46. package/{dist/es2015 → esm2015}/menus.module.js +12 -9
  47. package/{dist/es2015 → esm2015}/open-on-click-settings.js +1 -1
  48. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  49. package/{dist/es2015 → esm2015}/preventable-event.js +0 -0
  50. package/esm2015/rendering/arrow.directive.js +62 -0
  51. package/esm2015/rendering/link.directive.js +54 -0
  52. package/esm2015/rendering/list.component.js +546 -0
  53. package/{dist/es2015 → esm2015}/rendering/popup-settings.js +0 -0
  54. package/{dist/es2015 → esm2015}/services/actions.service.js +21 -14
  55. package/{dist/es2015 → esm2015}/services/hover.service.js +10 -10
  56. package/{dist/es2015 → esm2015}/services/items.service.js +8 -13
  57. package/{dist/es2015 → esm2015}/services/navigation.service.js +12 -15
  58. package/{dist/es2015 → esm2015}/templates/item-content-template.directive.js +14 -12
  59. package/{dist/es2015 → esm2015}/templates/item-link-template.directive.js +14 -12
  60. package/{dist/es2015 → esm2015}/templates/item-template.directive.js +14 -12
  61. package/{dist/es2015 → esm2015}/utils.js +0 -0
  62. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-menu.js} +1116 -1113
  63. package/kendo-angular-menu.d.ts +9 -0
  64. package/{dist/es2015/main.d.ts → main.d.ts} +3 -2
  65. package/{dist/es2015/menu-animation.interface.d.ts → menu-animation.interface.d.ts} +0 -0
  66. package/{dist/es2015/menu-base.d.ts → menu-base.d.ts} +4 -1
  67. package/{dist/es2015/menu-event.d.ts → menu-event.d.ts} +0 -0
  68. package/{dist/es2015/menu-item.component.d.ts → menu-item.component.d.ts} +7 -4
  69. package/{dist/es2015/menu-item.interface.d.ts → menu-item.interface.d.ts} +0 -0
  70. package/{dist/es2015/menu-select-event.d.ts → menu-select-event.d.ts} +0 -0
  71. package/{dist/es2015/menu.component.d.ts → menu.component.d.ts} +7 -4
  72. package/menu.module.d.ts +54 -0
  73. package/{dist/es2015/menus.module.d.ts → menus.module.d.ts} +6 -0
  74. package/{dist/es2015/open-on-click-settings.d.ts → open-on-click-settings.d.ts} +0 -0
  75. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  76. package/package.json +31 -106
  77. package/{dist/es2015/preventable-event.d.ts → preventable-event.d.ts} +0 -0
  78. package/{dist/es2015/rendering → rendering}/arrow.directive.d.ts +6 -3
  79. package/{dist/es2015/rendering → rendering}/link.directive.d.ts +4 -1
  80. package/rendering/list.component.d.ts +104 -0
  81. package/{dist/es2015/rendering → rendering}/popup-settings.d.ts +0 -0
  82. package/schematics/ngAdd/index.js +5 -2
  83. package/schematics/ngAdd/index.js.map +1 -1
  84. package/{dist/es2015/services → services}/actions.service.d.ts +24 -1
  85. package/{dist/es2015/services → services}/hover.service.d.ts +7 -2
  86. package/{dist/es2015/services → services}/items.service.d.ts +4 -1
  87. package/{dist/es2015/services → services}/navigation.service.d.ts +6 -3
  88. package/{dist/es2015/templates → templates}/item-content-template.directive.d.ts +3 -0
  89. package/{dist/es2015/templates → templates}/item-link-template.directive.d.ts +3 -0
  90. package/{dist/es2015/templates → templates}/item-template.directive.d.ts +3 -0
  91. package/{dist/es2015/utils.d.ts → utils.d.ts} +1 -1
  92. package/dist/cdn/js/kendo-angular-menu.js +0 -20
  93. package/dist/cdn/main.js +0 -5
  94. package/dist/es/context-menu/context-menu-event.js +0 -13
  95. package/dist/es/context-menu/context-menu-items.service.js +0 -26
  96. package/dist/es/context-menu/context-menu-popup-event.js +0 -17
  97. package/dist/es/context-menu/context-menu-select-event.js +0 -17
  98. package/dist/es/context-menu/context-menu-target-container.directive.js +0 -31
  99. package/dist/es/context-menu/context-menu-target.directive.js +0 -48
  100. package/dist/es/context-menu/context-menu-target.service.js +0 -29
  101. package/dist/es/context-menu/context-menu-template.directive.js +0 -31
  102. package/dist/es/context-menu/context-menu.component.js +0 -456
  103. package/dist/es/context-menu/context-menu.module.js +0 -64
  104. package/dist/es/context-menu/context-menu.service.js +0 -30
  105. package/dist/es/data-binding/binding-directive-base.js +0 -32
  106. package/dist/es/data-binding/flat-binding.directive.js +0 -104
  107. package/dist/es/data-binding/hierachy-binding.directive.js +0 -94
  108. package/dist/es/data-binding/utils.js +0 -32
  109. package/dist/es/dom-queries.js +0 -107
  110. package/dist/es/index.js +0 -21
  111. package/dist/es/menu-base.js +0 -79
  112. package/dist/es/menu-event.js +0 -17
  113. package/dist/es/menu-item.component.js +0 -165
  114. package/dist/es/menu-select-event.js +0 -17
  115. package/dist/es/menu.component.js +0 -256
  116. package/dist/es/menu.module.js +0 -79
  117. package/dist/es/menus.module.js +0 -41
  118. package/dist/es/open-on-click-settings.js +0 -13
  119. package/dist/es/package-metadata.js +0 -15
  120. package/dist/es/preventable-event.js +0 -36
  121. package/dist/es/rendering/arrow.directive.js +0 -81
  122. package/dist/es/rendering/item.component.js +0 -337
  123. package/dist/es/rendering/link.directive.js +0 -62
  124. package/dist/es/rendering/list.component.js +0 -219
  125. package/dist/es/rendering/popup-settings.js +0 -66
  126. package/dist/es/services/actions.service.js +0 -178
  127. package/dist/es/services/hover.service.js +0 -136
  128. package/dist/es/services/items.service.js +0 -140
  129. package/dist/es/services/navigation.service.js +0 -274
  130. package/dist/es/templates/item-content-template.directive.js +0 -50
  131. package/dist/es/templates/item-link-template.directive.js +0 -52
  132. package/dist/es/templates/item-template.directive.js +0 -51
  133. package/dist/es/utils.js +0 -18
  134. package/dist/es2015/context-menu/context-menu-items.service.js +0 -25
  135. package/dist/es2015/context-menu/context-menu-target-container.directive.js +0 -30
  136. package/dist/es2015/context-menu/context-menu-target.directive.js +0 -47
  137. package/dist/es2015/context-menu/context-menu-template.directive.js +0 -30
  138. package/dist/es2015/data-binding/flat-binding.directive.js +0 -101
  139. package/dist/es2015/data-binding/hierachy-binding.directive.js +0 -90
  140. package/dist/es2015/index.d.ts +0 -21
  141. package/dist/es2015/index.js +0 -21
  142. package/dist/es2015/index.metadata.json +0 -1
  143. package/dist/es2015/main.js +0 -26
  144. package/dist/es2015/menu-animation.interface.js +0 -4
  145. package/dist/es2015/menu-base.js +0 -73
  146. package/dist/es2015/menu-item.interface.js +0 -4
  147. package/dist/es2015/menu.module.d.ts +0 -38
  148. package/dist/es2015/rendering/arrow.directive.js +0 -68
  149. package/dist/es2015/rendering/item.component.d.ts +0 -64
  150. package/dist/es2015/rendering/item.component.js +0 -327
  151. package/dist/es2015/rendering/link.directive.js +0 -57
  152. package/dist/es2015/rendering/list.component.d.ts +0 -41
  153. package/dist/es2015/rendering/list.component.js +0 -233
  154. package/dist/fesm5/index.js +0 -3222
  155. package/dist/npm/constants.js +0 -10
  156. package/dist/npm/context-menu/context-menu-event.js +0 -15
  157. package/dist/npm/context-menu/context-menu-items.service.js +0 -28
  158. package/dist/npm/context-menu/context-menu-popup-event.js +0 -19
  159. package/dist/npm/context-menu/context-menu-select-event.js +0 -19
  160. package/dist/npm/context-menu/context-menu-target-container.directive.js +0 -33
  161. package/dist/npm/context-menu/context-menu-target.directive.js +0 -50
  162. package/dist/npm/context-menu/context-menu-target.service.js +0 -31
  163. package/dist/npm/context-menu/context-menu-template.directive.js +0 -33
  164. package/dist/npm/context-menu/context-menu.component.js +0 -459
  165. package/dist/npm/context-menu/context-menu.module.js +0 -66
  166. package/dist/npm/context-menu/context-menu.service.js +0 -32
  167. package/dist/npm/data-binding/binding-directive-base.js +0 -34
  168. package/dist/npm/data-binding/flat-binding.directive.js +0 -106
  169. package/dist/npm/data-binding/hierachy-binding.directive.js +0 -96
  170. package/dist/npm/data-binding/utils.js +0 -34
  171. package/dist/npm/dom-queries.js +0 -110
  172. package/dist/npm/index.js +0 -37
  173. package/dist/npm/main.js +0 -50
  174. package/dist/npm/menu-animation.interface.js +0 -6
  175. package/dist/npm/menu-base.js +0 -81
  176. package/dist/npm/menu-event.js +0 -19
  177. package/dist/npm/menu-item.component.js +0 -167
  178. package/dist/npm/menu-item.interface.js +0 -6
  179. package/dist/npm/menu-select-event.js +0 -19
  180. package/dist/npm/menu.component.js +0 -258
  181. package/dist/npm/menu.module.js +0 -81
  182. package/dist/npm/menus.module.js +0 -43
  183. package/dist/npm/open-on-click-settings.js +0 -15
  184. package/dist/npm/package-metadata.js +0 -17
  185. package/dist/npm/preventable-event.js +0 -38
  186. package/dist/npm/rendering/arrow.directive.js +0 -83
  187. package/dist/npm/rendering/item.component.js +0 -339
  188. package/dist/npm/rendering/link.directive.js +0 -64
  189. package/dist/npm/rendering/list.component.js +0 -221
  190. package/dist/npm/rendering/popup-settings.js +0 -68
  191. package/dist/npm/services/actions.service.js +0 -180
  192. package/dist/npm/services/hover.service.js +0 -138
  193. package/dist/npm/services/items.service.js +0 -143
  194. package/dist/npm/services/navigation.service.js +0 -276
  195. package/dist/npm/templates/item-content-template.directive.js +0 -52
  196. package/dist/npm/templates/item-link-template.directive.js +0 -54
  197. package/dist/npm/templates/item-template.directive.js +0 -53
  198. package/dist/npm/utils.js +0 -20
  199. package/dist/systemjs/kendo-angular-menu.js +0 -5
@@ -2,12 +2,15 @@
2
2
  * Copyright © 2021 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 { __decorate, __metadata, __param } from 'tslib';
6
- import { Injectable, NgZone, EventEmitter, Directive, Optional, TemplateRef, Input, ContentChildren, QueryList, Component, Output, HostBinding, forwardRef, Renderer2, ElementRef, ViewChild, ChangeDetectorRef, isDevMode, NgModule, ViewContainerRef, ContentChild } from '@angular/core';
5
+ import * as i0 from '@angular/core';
6
+ import { Injectable, NgZone, Directive, Optional, Component, Input, ContentChildren, EventEmitter, ElementRef, ViewChild, HostBinding, forwardRef, Output, isDevMode, NgModule, ContentChild } from '@angular/core';
7
+ import * as i3 from '@progress/kendo-angular-l10n';
7
8
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
8
9
  import { validatePackage } from '@progress/kendo-licensing';
9
- import { hasObservers, isDocumentAvailable, Keys } from '@progress/kendo-angular-common';
10
+ import { PreventableEvent as PreventableEvent$1, hasObservers, isDocumentAvailable, Keys } from '@progress/kendo-angular-common';
11
+ import * as i6 from '@progress/kendo-angular-popup';
10
12
  import { PopupService, POPUP_CONTAINER, PopupModule } from '@progress/kendo-angular-popup';
13
+ import * as i5 from '@angular/common';
11
14
  import { CommonModule } from '@angular/common';
12
15
 
13
16
  /**
@@ -17,7 +20,7 @@ const packageMetadata = {
17
20
  name: '@progress/kendo-angular-menu',
18
21
  productName: 'Kendo UI for Angular',
19
22
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
20
- publishDate: 1646834920,
23
+ publishDate: 1647247885,
21
24
  version: '',
22
25
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
23
26
  };
@@ -45,10 +48,7 @@ const next = (idx, items, dir) => {
45
48
  /**
46
49
  * @hidden
47
50
  */
48
- let ItemsService = class ItemsService {
49
- /**
50
- * @hidden
51
- */
51
+ class ItemsService {
52
52
  constructor() {
53
53
  this.items = {};
54
54
  this.lists = [];
@@ -143,53 +143,28 @@ let ItemsService = class ItemsService {
143
143
  parentIndex(index) {
144
144
  return index.replace(PARENT_REGEX, '');
145
145
  }
146
- };
147
- ItemsService = __decorate([
148
- Injectable()
149
- ], ItemsService);
146
+ }
147
+ ItemsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ItemsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
148
+ ItemsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ItemsService });
149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ItemsService, decorators: [{
150
+ type: Injectable
151
+ }] });
150
152
 
153
+ const canPerformAction = (item, action) => !((action === 'open' && item.opened) || (action === 'close' && !item.opened));
151
154
  /**
155
+ * Used to remove cyclic dependency error. Dublicates MenuEvent
152
156
  * @hidden
153
157
  */
154
- class PreventableEvent {
155
- /**
156
- * @hidden
157
- */
158
+ class MenuStateEvent extends PreventableEvent$1 {
158
159
  constructor(args) {
159
- this.prevented = false;
160
+ super();
160
161
  Object.assign(this, args);
161
162
  }
162
- /**
163
- * Prevents the default action for a specified event.
164
- * In this way, the source component suppresses
165
- * the built-in behavior that follows the event.
166
- */
167
- preventDefault() {
168
- this.prevented = true;
169
- }
170
- /**
171
- * Returns `true` if the event was prevented
172
- * by any of its subscribers.
173
- *
174
- * @returns `true` if the default action was prevented.
175
- * Otherwise, returns `false`.
176
- */
177
- isDefaultPrevented() {
178
- return this.prevented;
179
- }
180
- }
181
-
182
- /**
183
- * Arguments for the `open` and `close` events of the Menu.
184
- */
185
- class MenuEvent extends PreventableEvent {
186
163
  }
187
-
188
- const canPerformAction = (item, action) => !((action === 'open' && item.opened) || (action === 'close' && !item.opened));
189
164
  /**
190
165
  * @hidden
191
166
  */
192
- let ActionsService = class ActionsService {
167
+ class ActionsService {
193
168
  constructor(ngZone, items) {
194
169
  this.ngZone = ngZone;
195
170
  this.items = items;
@@ -258,7 +233,7 @@ let ActionsService = class ActionsService {
258
233
  }
259
234
  emit(name, item, domEvent) {
260
235
  const owner = this.owner;
261
- const eventArgs = new MenuEvent({
236
+ const eventArgs = new MenuStateEvent({
262
237
  sender: owner,
263
238
  item: item.item,
264
239
  index: item.index,
@@ -337,11 +312,12 @@ let ActionsService = class ActionsService {
337
312
  this.close(items[idx]);
338
313
  }
339
314
  }
340
- };
341
- ActionsService = __decorate([
342
- Injectable(),
343
- __metadata("design:paramtypes", [NgZone, ItemsService])
344
- ], ActionsService);
315
+ }
316
+ ActionsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionsService, deps: [{ token: i0.NgZone }, { token: ItemsService }], target: i0.ɵɵFactoryTarget.Injectable });
317
+ ActionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionsService });
318
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionsService, decorators: [{
319
+ type: Injectable
320
+ }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: ItemsService }]; } });
345
321
 
346
322
  const DEFAULT_ACTIVE = '0';
347
323
  const NO_SPACE_REGEX = /\S/;
@@ -367,7 +343,7 @@ const resolvedPromise = Promise.resolve(null);
367
343
  /**
368
344
  * @hidden
369
345
  */
370
- let NavigationService = class NavigationService {
346
+ class NavigationService {
371
347
  constructor(items, actions, localization, ngZone) {
372
348
  this.items = items;
373
349
  this.actions = actions;
@@ -584,20 +560,18 @@ let NavigationService = class NavigationService {
584
560
  }
585
561
  }
586
562
  }
587
- };
588
- NavigationService = __decorate([
589
- Injectable(),
590
- __metadata("design:paramtypes", [ItemsService,
591
- ActionsService,
592
- LocalizationService,
593
- NgZone])
594
- ], NavigationService);
563
+ }
564
+ NavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NavigationService, deps: [{ token: ItemsService }, { token: ActionsService }, { token: i3.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
565
+ NavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NavigationService });
566
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NavigationService, decorators: [{
567
+ type: Injectable
568
+ }], ctorParameters: function () { return [{ type: ItemsService }, { type: ActionsService }, { type: i3.LocalizationService }, { type: i0.NgZone }]; } });
595
569
 
596
570
  const DISABLE_OPEN_ON_OVER_DELAY = 500;
597
571
  /**
598
572
  * @hidden
599
573
  */
600
- let HoverService = class HoverService {
574
+ class HoverService {
601
575
  constructor(actions, items) {
602
576
  this.actions = actions;
603
577
  this.items = items;
@@ -701,13 +675,14 @@ let HoverService = class HoverService {
701
675
  }
702
676
  }
703
677
  }
704
- };
705
- HoverService = __decorate([
706
- Injectable(),
707
- __metadata("design:paramtypes", [ActionsService, ItemsService])
708
- ], HoverService);
678
+ }
679
+ HoverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HoverService, deps: [{ token: ActionsService }, { token: ItemsService }], target: i0.ɵɵFactoryTarget.Injectable });
680
+ HoverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HoverService });
681
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HoverService, decorators: [{
682
+ type: Injectable
683
+ }], ctorParameters: function () { return [{ type: ActionsService }, { type: ItemsService }]; } });
709
684
 
710
- /* tslint:disable:max-line-length */
685
+ /* eslint-disable max-line-length */
711
686
  /**
712
687
  * @hidden
713
688
  */
@@ -820,30 +795,6 @@ const findInContainer = (element, selector, container) => {
820
795
  return match;
821
796
  };
822
797
 
823
- /**
824
- * @hidden
825
- */
826
- let ContextMenuService = class ContextMenuService {
827
- /**
828
- * @hidden
829
- */
830
- constructor() {
831
- this.keydown = new EventEmitter();
832
- }
833
- emit(name, args) {
834
- this.owner.emitMenuEvent(name, args);
835
- }
836
- hasObservers(name) {
837
- return this.owner && hasObservers(this.owner[name]);
838
- }
839
- leaveMenu(e) {
840
- return this.items ? !inMenu(e.target, this.items) : true;
841
- }
842
- };
843
- ContextMenuService = __decorate([
844
- Injectable()
845
- ], ContextMenuService);
846
-
847
798
  /**
848
799
  * Represents a template for the Menu items ([see example]({% slug templates_menu %})). To define a template
849
800
  * for an item, nest an `<ng-template>` tag with the `kendoMenuItemTemplate` directive inside a `<kendo-menu-item>`
@@ -875,18 +826,21 @@ ContextMenuService = __decorate([
875
826
  * }
876
827
  * ```
877
828
  */
878
- let ItemTemplateDirective = class ItemTemplateDirective {
829
+ class ItemTemplateDirective {
879
830
  constructor(templateRef) {
880
831
  this.templateRef = templateRef;
881
832
  }
882
- };
883
- ItemTemplateDirective = __decorate([
884
- Directive({
885
- selector: '[kendoMenuItemTemplate]'
886
- }),
887
- __param(0, Optional()),
888
- __metadata("design:paramtypes", [TemplateRef])
889
- ], ItemTemplateDirective);
833
+ }
834
+ ItemTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ItemTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
835
+ ItemTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ItemTemplateDirective, selector: "[kendoMenuItemTemplate]", ngImport: i0 });
836
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ItemTemplateDirective, decorators: [{
837
+ type: Directive,
838
+ args: [{
839
+ selector: '[kendoMenuItemTemplate]'
840
+ }]
841
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
842
+ type: Optional
843
+ }] }]; } });
890
844
 
891
845
  /**
892
846
  * Represents a template for the links of the Menu items ([see example]({% slug templates_menu %})). To define a template
@@ -920,18 +874,21 @@ ItemTemplateDirective = __decorate([
920
874
  * }
921
875
  * ```
922
876
  */
923
- let ItemLinkTemplateDirective = class ItemLinkTemplateDirective {
877
+ class ItemLinkTemplateDirective {
924
878
  constructor(templateRef) {
925
879
  this.templateRef = templateRef;
926
880
  }
927
- };
928
- ItemLinkTemplateDirective = __decorate([
929
- Directive({
930
- selector: '[kendoMenuItemLinkTemplate]'
931
- }),
932
- __param(0, Optional()),
933
- __metadata("design:paramtypes", [TemplateRef])
934
- ], ItemLinkTemplateDirective);
881
+ }
882
+ ItemLinkTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ItemLinkTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
883
+ ItemLinkTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ItemLinkTemplateDirective, selector: "[kendoMenuItemLinkTemplate]", ngImport: i0 });
884
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ItemLinkTemplateDirective, decorators: [{
885
+ type: Directive,
886
+ args: [{
887
+ selector: '[kendoMenuItemLinkTemplate]'
888
+ }]
889
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
890
+ type: Optional
891
+ }] }]; } });
935
892
 
936
893
  /**
937
894
  * Represents a template for the content of the Menu items ([see example]({% slug templates_menu %})). To define the template,
@@ -963,20 +920,22 @@ ItemLinkTemplateDirective = __decorate([
963
920
  * }
964
921
  * ```
965
922
  */
966
- let ItemContentTemplateDirective = class ItemContentTemplateDirective {
923
+ class ItemContentTemplateDirective {
967
924
  constructor(templateRef) {
968
925
  this.templateRef = templateRef;
969
926
  }
970
- };
971
- ItemContentTemplateDirective = __decorate([
972
- Directive({
973
- selector: '[kendoMenuItemContentTemplate]'
974
- }),
975
- __param(0, Optional()),
976
- __metadata("design:paramtypes", [TemplateRef])
977
- ], ItemContentTemplateDirective);
927
+ }
928
+ ItemContentTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ItemContentTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
929
+ ItemContentTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ItemContentTemplateDirective, selector: "[kendoMenuItemContentTemplate]", ngImport: i0 });
930
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ItemContentTemplateDirective, decorators: [{
931
+ type: Directive,
932
+ args: [{
933
+ selector: '[kendoMenuItemContentTemplate]'
934
+ }]
935
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
936
+ type: Optional
937
+ }] }]; } });
978
938
 
979
- var MenuItemComponent_1;
980
939
  /**
981
940
  * A component that can be used to specify the Menu items
982
941
  * ([more information and examples]({% slug items_menu %})).
@@ -1022,7 +981,7 @@ var MenuItemComponent_1;
1022
981
  * }
1023
982
  * ```
1024
983
  */
1025
- let MenuItemComponent = MenuItemComponent_1 = class MenuItemComponent {
984
+ class MenuItemComponent {
1026
985
  /**
1027
986
  * @hidden
1028
987
  */
@@ -1055,61 +1014,44 @@ let MenuItemComponent = MenuItemComponent_1 = class MenuItemComponent {
1055
1014
  return this.children.toArray().filter(c => c !== this);
1056
1015
  }
1057
1016
  }
1058
- };
1059
- __decorate([
1060
- Input(),
1061
- __metadata("design:type", String)
1062
- ], MenuItemComponent.prototype, "text", void 0);
1063
- __decorate([
1064
- Input(),
1065
- __metadata("design:type", String)
1066
- ], MenuItemComponent.prototype, "url", void 0);
1067
- __decorate([
1068
- Input(),
1069
- __metadata("design:type", Boolean)
1070
- ], MenuItemComponent.prototype, "disabled", void 0);
1071
- __decorate([
1072
- Input(),
1073
- __metadata("design:type", Object)
1074
- ], MenuItemComponent.prototype, "cssClass", void 0);
1075
- __decorate([
1076
- Input(),
1077
- __metadata("design:type", Object)
1078
- ], MenuItemComponent.prototype, "cssStyle", void 0);
1079
- __decorate([
1080
- Input(),
1081
- __metadata("design:type", String)
1082
- ], MenuItemComponent.prototype, "icon", void 0);
1083
- __decorate([
1084
- Input(),
1085
- __metadata("design:type", Object)
1086
- ], MenuItemComponent.prototype, "data", void 0);
1087
- __decorate([
1088
- Input(),
1089
- __metadata("design:type", Boolean)
1090
- ], MenuItemComponent.prototype, "separator", void 0);
1091
- __decorate([
1092
- ContentChildren(ItemTemplateDirective),
1093
- __metadata("design:type", QueryList)
1094
- ], MenuItemComponent.prototype, "itemTemplate", void 0);
1095
- __decorate([
1096
- ContentChildren(ItemLinkTemplateDirective),
1097
- __metadata("design:type", QueryList)
1098
- ], MenuItemComponent.prototype, "itemLinkTemplate", void 0);
1099
- __decorate([
1100
- ContentChildren(ItemContentTemplateDirective),
1101
- __metadata("design:type", QueryList)
1102
- ], MenuItemComponent.prototype, "itemContentTemplate", void 0);
1103
- __decorate([
1104
- ContentChildren(MenuItemComponent_1),
1105
- __metadata("design:type", QueryList)
1106
- ], MenuItemComponent.prototype, "children", void 0);
1107
- MenuItemComponent = MenuItemComponent_1 = __decorate([
1108
- Component({
1109
- selector: 'kendo-menu-item',
1110
- template: ``
1111
- })
1112
- ], MenuItemComponent);
1017
+ }
1018
+ MenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1019
+ MenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MenuItemComponent, selector: "kendo-menu-item", inputs: { text: "text", url: "url", disabled: "disabled", cssClass: "cssClass", cssStyle: "cssStyle", icon: "icon", data: "data", separator: "separator" }, queries: [{ propertyName: "itemTemplate", predicate: ItemTemplateDirective }, { propertyName: "itemLinkTemplate", predicate: ItemLinkTemplateDirective }, { propertyName: "itemContentTemplate", predicate: ItemContentTemplateDirective }, { propertyName: "children", predicate: MenuItemComponent }], ngImport: i0, template: ``, isInline: true });
1020
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuItemComponent, decorators: [{
1021
+ type: Component,
1022
+ args: [{
1023
+ selector: 'kendo-menu-item',
1024
+ template: ``
1025
+ }]
1026
+ }], propDecorators: { text: [{
1027
+ type: Input
1028
+ }], url: [{
1029
+ type: Input
1030
+ }], disabled: [{
1031
+ type: Input
1032
+ }], cssClass: [{
1033
+ type: Input
1034
+ }], cssStyle: [{
1035
+ type: Input
1036
+ }], icon: [{
1037
+ type: Input
1038
+ }], data: [{
1039
+ type: Input
1040
+ }], separator: [{
1041
+ type: Input
1042
+ }], itemTemplate: [{
1043
+ type: ContentChildren,
1044
+ args: [ItemTemplateDirective]
1045
+ }], itemLinkTemplate: [{
1046
+ type: ContentChildren,
1047
+ args: [ItemLinkTemplateDirective]
1048
+ }], itemContentTemplate: [{
1049
+ type: ContentChildren,
1050
+ args: [ItemContentTemplateDirective]
1051
+ }], children: [{
1052
+ type: ContentChildren,
1053
+ args: [MenuItemComponent]
1054
+ }] } });
1113
1055
 
1114
1056
  /**
1115
1057
  * @hidden
@@ -1143,289 +1085,160 @@ class MenuBase {
1143
1085
  return this.items || (this.children ? this.children.toArray() : []);
1144
1086
  }
1145
1087
  }
1146
- __decorate([
1147
- Input(),
1148
- __metadata("design:type", Array)
1149
- ], MenuBase.prototype, "items", void 0);
1150
- __decorate([
1151
- Input(),
1152
- __metadata("design:type", Boolean)
1153
- ], MenuBase.prototype, "vertical", void 0);
1154
- __decorate([
1155
- Input(),
1156
- __metadata("design:type", Object)
1157
- ], MenuBase.prototype, "openOnClick", void 0);
1158
- __decorate([
1159
- Input(),
1160
- __metadata("design:type", Number)
1161
- ], MenuBase.prototype, "hoverDelay", void 0);
1162
- __decorate([
1163
- Input(),
1164
- __metadata("design:type", Object)
1165
- ], MenuBase.prototype, "animate", void 0);
1166
- __decorate([
1167
- ContentChildren(ItemTemplateDirective),
1168
- __metadata("design:type", QueryList)
1169
- ], MenuBase.prototype, "itemTemplate", void 0);
1170
- __decorate([
1171
- ContentChildren(ItemLinkTemplateDirective),
1172
- __metadata("design:type", QueryList)
1173
- ], MenuBase.prototype, "itemLinkTemplate", void 0);
1174
- __decorate([
1175
- ContentChildren(MenuItemComponent),
1176
- __metadata("design:type", QueryList)
1177
- ], MenuBase.prototype, "children", void 0);
1088
+ MenuBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
1089
+ MenuBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MenuBase, selector: "kendo-menu-base", inputs: { items: "items", vertical: "vertical", openOnClick: "openOnClick", hoverDelay: "hoverDelay", animate: "animate" }, queries: [{ propertyName: "itemTemplate", predicate: ItemTemplateDirective }, { propertyName: "itemLinkTemplate", predicate: ItemLinkTemplateDirective }, { propertyName: "children", predicate: MenuItemComponent }], ngImport: i0, template: ``, isInline: true });
1090
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuBase, decorators: [{
1091
+ type: Component,
1092
+ args: [{
1093
+ selector: 'kendo-menu-base',
1094
+ template: ``
1095
+ }]
1096
+ }], propDecorators: { items: [{
1097
+ type: Input
1098
+ }], vertical: [{
1099
+ type: Input
1100
+ }], openOnClick: [{
1101
+ type: Input
1102
+ }], hoverDelay: [{
1103
+ type: Input
1104
+ }], animate: [{
1105
+ type: Input
1106
+ }], itemTemplate: [{
1107
+ type: ContentChildren,
1108
+ args: [ItemTemplateDirective]
1109
+ }], itemLinkTemplate: [{
1110
+ type: ContentChildren,
1111
+ args: [ItemLinkTemplateDirective]
1112
+ }], children: [{
1113
+ type: ContentChildren,
1114
+ args: [MenuItemComponent]
1115
+ }] } });
1178
1116
 
1179
- var MenuComponent_1;
1180
1117
  /**
1181
- * Represents the [Kendo UI Menu component for Angular]({% slug overview_menu %}).
1182
- *
1183
- * @example
1184
- * ```ts
1185
- * _@Component({
1186
- * selector: 'my-app',
1187
- * template: `
1188
- * <kendo-menu [items]="items">
1189
- * </kendo-menu>
1190
- * `
1191
- * })
1192
- * class AppComponent {
1193
- * public items: any[] = [{ text: 'item1', items: [{ text: 'item1.1' }] }, { text: 'item2', disabled: true }];
1194
- * }
1195
- * ```
1118
+ * @hidden
1196
1119
  */
1197
- let MenuComponent = MenuComponent_1 = class MenuComponent extends MenuBase {
1198
- constructor(itemsService, hover, actions, navigation, localization, ngZone, renderer, contextService) {
1199
- super();
1120
+ class ContextMenuService {
1121
+ constructor() {
1122
+ this.keydown = new EventEmitter();
1123
+ }
1124
+ emit(name, args) {
1125
+ this.owner.emitMenuEvent(name, args);
1126
+ }
1127
+ hasObservers(name) {
1128
+ return this.owner && hasObservers(this.owner[name]);
1129
+ }
1130
+ leaveMenu(e) {
1131
+ return this.items ? !inMenu(e.target, this.items) : true;
1132
+ }
1133
+ }
1134
+ ContextMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1135
+ ContextMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuService });
1136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuService, decorators: [{
1137
+ type: Injectable
1138
+ }] });
1139
+
1140
+ /**
1141
+ * @hidden
1142
+ */
1143
+ const defined = (value) => typeof value !== 'undefined';
1144
+ /**
1145
+ * @hidden
1146
+ */
1147
+ const bodyFactory = () => {
1148
+ if (isDocumentAvailable()) {
1149
+ return new ElementRef(document.body);
1150
+ }
1151
+ };
1152
+
1153
+ const POPUP_ALIGN = {
1154
+ vertical: 'top',
1155
+ horizontal: 'left'
1156
+ };
1157
+ const POPUP_ALIGN_RTL = {
1158
+ vertical: 'top',
1159
+ horizontal: 'right'
1160
+ };
1161
+ const VERTICAL_COLLISION = {
1162
+ vertical: 'flip',
1163
+ horizontal: 'fit'
1164
+ };
1165
+ const HORIZONTAL_COLLISION = {
1166
+ vertical: 'fit',
1167
+ horizontal: 'flip'
1168
+ };
1169
+ /**
1170
+ * @hidden
1171
+ */
1172
+ const POPUP_SETTINGS_RTL = {
1173
+ vertical: {
1174
+ anchor: {
1175
+ vertical: 'bottom',
1176
+ horizontal: 'right'
1177
+ },
1178
+ popup: POPUP_ALIGN_RTL,
1179
+ collision: VERTICAL_COLLISION,
1180
+ animate: 'down'
1181
+ },
1182
+ horizontal: {
1183
+ anchor: {
1184
+ vertical: 'top',
1185
+ horizontal: 'left'
1186
+ },
1187
+ popup: POPUP_ALIGN_RTL,
1188
+ collision: HORIZONTAL_COLLISION,
1189
+ animate: 'left'
1190
+ }
1191
+ };
1192
+ /**
1193
+ * @hidden
1194
+ */
1195
+ const POPUP_SETTINGS = {
1196
+ vertical: {
1197
+ anchor: {
1198
+ vertical: 'bottom',
1199
+ horizontal: 'left'
1200
+ },
1201
+ popup: POPUP_ALIGN,
1202
+ collision: VERTICAL_COLLISION,
1203
+ animate: 'down'
1204
+ },
1205
+ horizontal: {
1206
+ anchor: {
1207
+ vertical: 'top',
1208
+ horizontal: 'right'
1209
+ },
1210
+ popup: POPUP_ALIGN,
1211
+ collision: HORIZONTAL_COLLISION,
1212
+ animate: 'right'
1213
+ }
1214
+ };
1215
+
1216
+ /* eslint-disable @angular-eslint/component-selector */
1217
+ /**
1218
+ * @hidden
1219
+ */
1220
+ class ListComponent {
1221
+ constructor(itemsService, hover, actions, navigation, renderer, ngZone, element) {
1200
1222
  this.itemsService = itemsService;
1201
1223
  this.hover = hover;
1202
1224
  this.actions = actions;
1203
1225
  this.navigation = navigation;
1204
- this.localization = localization;
1205
- this.ngZone = ngZone;
1206
1226
  this.renderer = renderer;
1207
- this.contextService = contextService;
1208
- /**
1209
- * Fires when a Menu item is selected ([see example]({% slug routing_menu %})).
1210
- */
1211
- this.select = new EventEmitter();
1212
- /**
1213
- * Fires when a Menu item is opened.
1214
- */
1215
- this.open = new EventEmitter();
1216
- /**
1217
- * Fires when a Menu item is closed.
1218
- */
1219
- this.close = new EventEmitter();
1220
- validatePackage(packageMetadata);
1221
- this.actions.owner = this;
1222
- if (contextService) {
1223
- contextService.items = this.itemsService;
1224
- this.contextKeyDownSubscription = contextService.keydown.subscribe(this.contextKeyDown.bind(this));
1225
- }
1226
- }
1227
- /**
1228
- * @hidden
1229
- */
1230
- get ariaOrientation() {
1231
- if (this.vertical) {
1232
- return 'vertical';
1233
- }
1234
- }
1235
- /**
1236
- * @hidden
1237
- */
1238
- get contextMenuClass() {
1239
- return Boolean(this.contextService);
1227
+ this.ngZone = ngZone;
1228
+ this.element = element;
1229
+ this.animate = true;
1240
1230
  }
1241
- get direction() {
1242
- return this.rtl;
1231
+ hierarchyIndex(index) {
1232
+ return this.itemsService.itemIndex(this.index, index);
1243
1233
  }
1244
- get rtl() {
1245
- return this.localization.rtl;
1234
+ ngOnInit() {
1235
+ this.itemsService.addList(this);
1236
+ this.initDomEvents();
1246
1237
  }
1247
- /**
1248
- * Opens or closes the specified Menu items.
1249
- *
1250
- * @param open - A Boolean value which indicates if the items will be opened or closed.
1251
- * @param indices - One or more values which represent the hierarchical indices of the items that will be opened or closed.
1252
- */
1253
- toggle(open, ...indices) {
1254
- for (let idx = 0; idx < indices.length; idx++) {
1255
- const item = this.itemsService.get(indices[idx]);
1256
- if (item && !item.disabled) {
1257
- if (open) {
1258
- item.open();
1259
- }
1260
- else {
1261
- item.close();
1262
- }
1263
- }
1264
- }
1265
- }
1266
- /**
1267
- * @hidden
1268
- */
1269
- focus(index) {
1270
- this.navigation.focusIndex(index);
1271
- }
1272
- ngOnChanges(changes) {
1273
- this.navigation.vertical = this.vertical;
1274
- this.hover.delay = this.hoverDelay;
1275
- if (changes.openOnClick) {
1276
- const openOnClick = this.openOnClick = normalize(this.openOnClick);
1277
- this.hover.openOnOver = !openOnClick;
1278
- if (openOnClick && openOnClick.toggle === 'click') {
1279
- this.attachCloseClick();
1280
- }
1281
- else {
1282
- this.unsubscribeClick();
1283
- }
1284
- }
1285
- }
1286
- ngAfterViewChecked() {
1287
- this.navigation.updateActive();
1288
- }
1289
- ngOnDestroy() {
1290
- this.unsubscribeClick();
1291
- if (this.contextService) {
1292
- this.contextService.items = null;
1293
- this.contextKeyDownSubscription.unsubscribe();
1294
- }
1295
- }
1296
- attachCloseClick() {
1297
- if (!this.closeClickSubscription && isDocumentAvailable()) {
1298
- this.ngZone.runOutsideAngular(() => {
1299
- this.closeClickSubscription = this.renderer.listen('document', 'click', (e) => {
1300
- if (!inMenu(e.target, this.itemsService)) {
1301
- this.hover.openOnOver = false;
1302
- this.actions.closeAll();
1303
- this.actions.execute();
1304
- }
1305
- });
1306
- });
1307
- }
1308
- }
1309
- unsubscribeClick() {
1310
- if (this.closeClickSubscription) {
1311
- this.closeClickSubscription();
1312
- }
1313
- }
1314
- contextKeyDown(e) {
1315
- if (!this.itemsService.hasItems) {
1316
- return;
1317
- }
1318
- const keyCode = e.keyCode;
1319
- const rtl = this.localization.rtl;
1320
- const first = keyCode === Keys.ArrowDown || keyCode === Keys.ArrowRight;
1321
- const last = keyCode === Keys.ArrowUp || keyCode === Keys.ArrowLeft;
1322
- let index;
1323
- if ((first && !rtl) || (last && rtl)) {
1324
- index = 'first';
1325
- }
1326
- else if ((first && rtl) || (last && !rtl)) {
1327
- index = 'last';
1328
- }
1329
- if (index) {
1330
- e.preventDefault();
1331
- this.focus(index);
1332
- }
1333
- }
1334
- };
1335
- __decorate([
1336
- Input(),
1337
- __metadata("design:type", TemplateRef)
1338
- ], MenuComponent.prototype, "menuItemTemplate", void 0);
1339
- __decorate([
1340
- Input(),
1341
- __metadata("design:type", TemplateRef)
1342
- ], MenuComponent.prototype, "menuItemLinkTemplate", void 0);
1343
- __decorate([
1344
- Output(),
1345
- __metadata("design:type", EventEmitter)
1346
- ], MenuComponent.prototype, "select", void 0);
1347
- __decorate([
1348
- Output(),
1349
- __metadata("design:type", EventEmitter)
1350
- ], MenuComponent.prototype, "open", void 0);
1351
- __decorate([
1352
- Output(),
1353
- __metadata("design:type", EventEmitter)
1354
- ], MenuComponent.prototype, "close", void 0);
1355
- __decorate([
1356
- HostBinding('class.k-rtl'),
1357
- __metadata("design:type", Boolean),
1358
- __metadata("design:paramtypes", [])
1359
- ], MenuComponent.prototype, "direction", null);
1360
- MenuComponent = MenuComponent_1 = __decorate([
1361
- Component({
1362
- exportAs: 'kendoMenu',
1363
- providers: [
1364
- ItemsService,
1365
- ActionsService,
1366
- NavigationService,
1367
- HoverService,
1368
- LocalizationService,
1369
- {
1370
- provide: L10N_PREFIX,
1371
- useValue: 'kendo.menu'
1372
- },
1373
- {
1374
- provide: MenuBase,
1375
- useExisting: forwardRef(() => MenuComponent_1)
1376
- }
1377
- ],
1378
- selector: 'kendo-menu',
1379
- template: `
1380
- <ul role="menubar"
1381
- [attr.aria-orientation]="ariaOrientation"
1382
- kendoMenuList [items]="rootItems" [level]="0" class="k-widget k-reset k-header k-menu"
1383
- [vertical]="vertical" [rtl]="rtl" [animate]="animate" [openOnClick]="openOnClick"
1384
- [itemTemplate]="itemTemplate.first?.templateRef || menuItemTemplate"
1385
- [itemLinkTemplate]="itemLinkTemplate.first?.templateRef || menuItemLinkTemplate"
1386
- [class.k-menu-horizontal]="!vertical"
1387
- [class.k-menu-vertical]="vertical"
1388
- [class.k-context-menu]="contextMenuClass">
1389
- </ul>
1390
- `
1391
- }),
1392
- __param(7, Optional()),
1393
- __metadata("design:paramtypes", [ItemsService,
1394
- HoverService,
1395
- ActionsService,
1396
- NavigationService,
1397
- LocalizationService,
1398
- NgZone,
1399
- Renderer2,
1400
- ContextMenuService])
1401
- ], MenuComponent);
1402
-
1403
- /* tslint:disable:component-selector */
1404
- /**
1405
- * @hidden
1406
- */
1407
- let ListComponent = class ListComponent {
1408
- constructor(itemsService, hover, actions, navigation, renderer, ngZone, element) {
1409
- this.itemsService = itemsService;
1410
- this.hover = hover;
1411
- this.actions = actions;
1412
- this.navigation = navigation;
1413
- this.renderer = renderer;
1414
- this.ngZone = ngZone;
1415
- this.element = element;
1416
- this.animate = true;
1417
- }
1418
- hierarchyIndex(index) {
1419
- return this.itemsService.itemIndex(this.index, index);
1420
- }
1421
- ngOnInit() {
1422
- this.itemsService.addList(this);
1423
- this.initDomEvents();
1424
- }
1425
- ngOnDestroy() {
1426
- this.itemsService.removeList(this);
1427
- if (this.domSubscriptions) {
1428
- this.domSubscriptions();
1238
+ ngOnDestroy() {
1239
+ this.itemsService.removeList(this);
1240
+ if (this.domSubscriptions) {
1241
+ this.domSubscriptions();
1429
1242
  }
1430
1243
  }
1431
1244
  initDomEvents() {
@@ -1553,47 +1366,14 @@ let ListComponent = class ListComponent {
1553
1366
  }
1554
1367
  this.actions.execute();
1555
1368
  }
1556
- };
1557
- __decorate([
1558
- Input(),
1559
- __metadata("design:type", Array)
1560
- ], ListComponent.prototype, "items", void 0);
1561
- __decorate([
1562
- Input(),
1563
- __metadata("design:type", Number)
1564
- ], ListComponent.prototype, "level", void 0);
1565
- __decorate([
1566
- Input(),
1567
- __metadata("design:type", String)
1568
- ], ListComponent.prototype, "index", void 0);
1569
- __decorate([
1570
- Input(),
1571
- __metadata("design:type", Object)
1572
- ], ListComponent.prototype, "animate", void 0);
1573
- __decorate([
1574
- Input(),
1575
- __metadata("design:type", Boolean)
1576
- ], ListComponent.prototype, "vertical", void 0);
1577
- __decorate([
1578
- Input(),
1579
- __metadata("design:type", Boolean)
1580
- ], ListComponent.prototype, "rtl", void 0);
1581
- __decorate([
1582
- Input(),
1583
- __metadata("design:type", Object)
1584
- ], ListComponent.prototype, "openOnClick", void 0);
1585
- __decorate([
1586
- Input(),
1587
- __metadata("design:type", TemplateRef)
1588
- ], ListComponent.prototype, "itemTemplate", void 0);
1589
- __decorate([
1590
- Input(),
1591
- __metadata("design:type", TemplateRef)
1592
- ], ListComponent.prototype, "itemLinkTemplate", void 0);
1593
- ListComponent = __decorate([
1594
- Component({
1595
- selector: '[kendoMenuList]',
1596
- template: `
1369
+ }
1370
+ ListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ListComponent, deps: [{ token: ItemsService }, { token: HoverService }, { token: ActionsService }, { token: NavigationService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1371
+ ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ListComponent, selector: "[kendoMenuList]", inputs: { items: "items", level: "level", index: "index", animate: "animate", vertical: "vertical", rtl: "rtl", openOnClick: "openOnClick", itemTemplate: "itemTemplate", itemLinkTemplate: "itemLinkTemplate" }, ngImport: i0, template: "\n <ng-container *ngFor=\"let item of items; let idx = index\">\n <li *ngIf=\"!item.separator\" kendoMenuItem\n [item]=\"item\" [level]=\"level\" [vertical]=\"vertical\" [animate]=\"animate\" [rtl]=\"rtl\"\n [itemTemplate]=\"itemTemplate\" [itemLinkTemplate]=\"itemLinkTemplate\" [openOnClick]=\"openOnClick\"\n [index]=\"hierarchyIndex(idx)\" [siblingIndex]=\"idx\" [attr.data-kendo-menu-index]=\"hierarchyIndex(idx)\"\n [ngClass]=\"item.cssClass\" [ngStyle]=\"item.cssStyle\"\n role=\"menuitem\"\n class=\"k-item k-menu-item\"\n [class.k-first]=\"idx === 0\" [class.k-last]=\"idx === items.length - 1\"\n [class.k-state-disabled]=\"item.disabled\"></li>\n <li *ngIf=\"item.separator\" class=\"k-separator k-item\"\n role=\"separator\" [ngClass]=\"item.cssClass\" [ngStyle]=\"item.cssStyle\">\n &nbsp;\n </li>\n </ng-container>\n ", isInline: true, components: [{ type: i0.forwardRef(function () { return ItemComponent; }), selector: "[kendoMenuItem]", inputs: ["item", "level", "index", "siblingIndex", "animate", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate"] }], directives: [{ type: i0.forwardRef(function () { return i5.NgForOf; }), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i0.forwardRef(function () { return i5.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i0.forwardRef(function () { return i5.NgClass; }), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i0.forwardRef(function () { return i5.NgStyle; }), selector: "[ngStyle]", inputs: ["ngStyle"] }] });
1372
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ListComponent, decorators: [{
1373
+ type: Component,
1374
+ args: [{
1375
+ selector: '[kendoMenuList]',
1376
+ template: `
1597
1377
  <ng-container *ngFor="let item of items; let idx = index">
1598
1378
  <li *ngIf="!item.separator" kendoMenuItem
1599
1379
  [item]="item" [level]="level" [vertical]="vertical" [animate]="animate" [rtl]="rtl"
@@ -1610,98 +1390,30 @@ ListComponent = __decorate([
1610
1390
  </li>
1611
1391
  </ng-container>
1612
1392
  `
1613
- }),
1614
- __metadata("design:paramtypes", [ItemsService,
1615
- HoverService,
1616
- ActionsService,
1617
- NavigationService,
1618
- Renderer2,
1619
- NgZone,
1620
- ElementRef])
1621
- ], ListComponent);
1622
-
1623
- const POPUP_ALIGN = {
1624
- vertical: 'top',
1625
- horizontal: 'left'
1626
- };
1627
- const POPUP_ALIGN_RTL = {
1628
- vertical: 'top',
1629
- horizontal: 'right'
1630
- };
1631
- const VERTICAL_COLLISION = {
1632
- vertical: 'flip',
1633
- horizontal: 'fit'
1634
- };
1635
- const HORIZONTAL_COLLISION = {
1636
- vertical: 'fit',
1637
- horizontal: 'flip'
1638
- };
1639
- /**
1640
- * @hidden
1641
- */
1642
- const POPUP_SETTINGS_RTL = {
1643
- vertical: {
1644
- anchor: {
1645
- vertical: 'bottom',
1646
- horizontal: 'right'
1647
- },
1648
- popup: POPUP_ALIGN_RTL,
1649
- collision: VERTICAL_COLLISION,
1650
- animate: 'down'
1651
- },
1652
- horizontal: {
1653
- anchor: {
1654
- vertical: 'top',
1655
- horizontal: 'left'
1656
- },
1657
- popup: POPUP_ALIGN_RTL,
1658
- collision: HORIZONTAL_COLLISION,
1659
- animate: 'left'
1660
- }
1661
- };
1662
- /**
1663
- * @hidden
1664
- */
1665
- const POPUP_SETTINGS = {
1666
- vertical: {
1667
- anchor: {
1668
- vertical: 'bottom',
1669
- horizontal: 'left'
1670
- },
1671
- popup: POPUP_ALIGN,
1672
- collision: VERTICAL_COLLISION,
1673
- animate: 'down'
1674
- },
1675
- horizontal: {
1676
- anchor: {
1677
- vertical: 'top',
1678
- horizontal: 'right'
1679
- },
1680
- popup: POPUP_ALIGN,
1681
- collision: HORIZONTAL_COLLISION,
1682
- animate: 'right'
1683
- }
1684
- };
1685
-
1393
+ }]
1394
+ }], ctorParameters: function () { return [{ type: ItemsService }, { type: HoverService }, { type: ActionsService }, { type: NavigationService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ElementRef }]; }, propDecorators: { items: [{
1395
+ type: Input
1396
+ }], level: [{
1397
+ type: Input
1398
+ }], index: [{
1399
+ type: Input
1400
+ }], animate: [{
1401
+ type: Input
1402
+ }], vertical: [{
1403
+ type: Input
1404
+ }], rtl: [{
1405
+ type: Input
1406
+ }], openOnClick: [{
1407
+ type: Input
1408
+ }], itemTemplate: [{
1409
+ type: Input
1410
+ }], itemLinkTemplate: [{
1411
+ type: Input
1412
+ }] } });
1686
1413
  /**
1687
1414
  * @hidden
1688
1415
  */
1689
- const defined = (value) => typeof value !== 'undefined';
1690
- /**
1691
- * @hidden
1692
- */
1693
- const bodyFactory = () => {
1694
- if (isDocumentAvailable()) {
1695
- return new ElementRef(document.body);
1696
- }
1697
- };
1698
-
1699
- const ɵ0$3 = bodyFactory;
1700
- /* tslint:disable:component-selector */
1701
- /**
1702
- * @hidden
1703
- */
1704
- let ItemComponent = class ItemComponent {
1416
+ class ItemComponent {
1705
1417
  constructor(itemsService, navigation, changeDetector, renderer, popupService, element) {
1706
1418
  this.itemsService = itemsService;
1707
1419
  this.navigation = navigation;
@@ -1810,212 +1522,462 @@ let ItemComponent = class ItemComponent {
1810
1522
  if (isActive) {
1811
1523
  this.setAttribute('tabindex', '0');
1812
1524
  }
1813
- else {
1814
- this.setAttribute('tabindex', '-1');
1525
+ else {
1526
+ this.setAttribute('tabindex', '-1');
1527
+ }
1528
+ }
1529
+ open() {
1530
+ if (!this.destroyed && this.hasContent && !this.opened) {
1531
+ const popupSettings = this.popupSettings;
1532
+ const animate = this.animate ? Object.assign({}, this.animate, {
1533
+ direction: popupSettings.animate
1534
+ }) : false;
1535
+ this.opened = true;
1536
+ this.popupRef = this.popupService.open({
1537
+ popupAlign: popupSettings.popup,
1538
+ anchorAlign: popupSettings.anchor,
1539
+ collision: popupSettings.collision,
1540
+ anchor: this.element,
1541
+ positionMode: 'absolute',
1542
+ content: this.popupTemplate,
1543
+ popupClass: {
1544
+ 'k-rtl': this.rtl,
1545
+ 'k-menu-popup': true
1546
+ },
1547
+ animate: animate
1548
+ });
1549
+ this.setAttribute('aria-expanded', 'true');
1550
+ this.setAttribute('aria-owns', this.childId);
1551
+ this.changeDetector.detectChanges();
1552
+ }
1553
+ }
1554
+ close() {
1555
+ if (!this.destroyed && this.opened) {
1556
+ this.opened = false;
1557
+ if (this.popupRef) {
1558
+ this.popupRef.close();
1559
+ this.popupRef = null;
1560
+ }
1561
+ this.changeDetector.detectChanges();
1562
+ this.setAttribute('aria-expanded', 'false');
1563
+ this.renderer.removeAttribute(this.element.nativeElement, 'aria-owns');
1564
+ }
1565
+ }
1566
+ navigate() {
1567
+ let link;
1568
+ if (this.linkTemplate) {
1569
+ link = this.element.nativeElement.querySelector('a.k-menu-link');
1570
+ }
1571
+ else if (this.hasLink) {
1572
+ link = this.link.nativeElement;
1573
+ }
1574
+ if (link) {
1575
+ this.navigating = true;
1576
+ link.click();
1577
+ this.navigating = false;
1578
+ }
1579
+ }
1580
+ setAttribute(name, value) {
1581
+ this.renderer.setAttribute(this.element.nativeElement, name, value);
1582
+ }
1583
+ }
1584
+ ItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ItemComponent, deps: [{ token: ItemsService }, { token: NavigationService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i6.PopupService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1585
+ ItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ItemComponent, selector: "[kendoMenuItem]", inputs: { item: "item", level: "level", index: "index", siblingIndex: "siblingIndex", animate: "animate", vertical: "vertical", rtl: "rtl", openOnClick: "openOnClick", itemTemplate: "itemTemplate", itemLinkTemplate: "itemLinkTemplate" }, host: { properties: { "attr.aria-disabled": "this.disabled", "attr.aria-haspopup": "this.hasPopup", "attr.aria-expanded": "this.expanded", "attr.aria-label": "this.label", "attr.tabindex": "this.activeId" } }, providers: [PopupService, {
1586
+ provide: POPUP_CONTAINER,
1587
+ useFactory: bodyFactory
1588
+ }], viewQueries: [{ propertyName: "link", first: true, predicate: ["link"], descendants: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }], ngImport: i0, template: `
1589
+ <span *ngIf="!hasLink && !item.content && !linkTemplate" class="k-link k-menu-link" #link
1590
+ [class.k-state-active]="opened" role="presentation">
1591
+ <ng-template [ngTemplateOutlet]="itemcontent">
1592
+ </ng-template>
1593
+ </span>
1594
+ <a *ngIf="item.url && !linkTemplate" class="k-link k-menu-link" #link [attr.href]="item.url"
1595
+ [class.k-state-active]="opened" tabindex="-1" role="presentation">
1596
+ <ng-template [ngTemplateOutlet]="itemcontent">
1597
+ </ng-template>
1598
+ </a>
1599
+ <ng-template *ngIf="linkTemplate && !item.content" [ngTemplateOutlet]="linkTemplate"
1600
+ [ngTemplateOutletContext]="{ item: item, index: index }">
1601
+ </ng-template>
1602
+
1603
+ <div class="k-content" *ngIf="item.content" role="presentation">
1604
+ <ng-template [ngTemplateOutlet]="item.content" [ngTemplateOutletContext]="{ item: item.owner, index: item.ownerIndex }">
1605
+ </ng-template>
1606
+ </div>
1607
+
1608
+ <ng-template #popupTemplate>
1609
+ <ul kendoMenuList
1610
+ [attr.id]="childId"
1611
+ [animate]="animate"
1612
+ [rtl]="rtl"
1613
+ [vertical]="vertical"
1614
+ [openOnClick]="openOnClick"
1615
+ [items]="children"
1616
+ [level]="level + 1"
1617
+ [index]="index"
1618
+ [itemTemplate]="itemTemplate"
1619
+ [itemLinkTemplate]="itemLinkTemplate"
1620
+ role="menu"
1621
+ class="k-group k-menu-group k-reset">
1622
+ </ul>
1623
+ </ng-template>
1624
+
1625
+ <ng-template #itemcontent>
1626
+ <span *ngIf="item.icon" class="k-icon" [ngClass]="iconClass" role="presentation"></span>
1627
+ <ng-container *ngIf="!template">
1628
+ <span class="k-menu-link-text">{{ item.text }}</span>
1629
+ </ng-container>
1630
+ <ng-template *ngIf="template" [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ item: item, index: index }">
1631
+ </ng-template>
1632
+ <span class="k-icon k-menu-expand-arrow" *ngIf="hasContent"
1633
+ role="presentation"
1634
+ [class.k-i-arrow-60-down]="!horizontal"
1635
+ [class.k-i-arrow-60-right]="horizontal && !rtl"
1636
+ [class.k-i-arrow-60-left]="horizontal && rtl">
1637
+ </span>
1638
+ </ng-template>
1639
+ `, isInline: true, components: [{ type: ListComponent, selector: "[kendoMenuList]", inputs: ["items", "level", "index", "animate", "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"] }] });
1640
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ItemComponent, decorators: [{
1641
+ type: Component,
1642
+ args: [{
1643
+ providers: [PopupService, {
1644
+ provide: POPUP_CONTAINER,
1645
+ useFactory: bodyFactory
1646
+ }],
1647
+ selector: '[kendoMenuItem]',
1648
+ template: `
1649
+ <span *ngIf="!hasLink && !item.content && !linkTemplate" class="k-link k-menu-link" #link
1650
+ [class.k-state-active]="opened" role="presentation">
1651
+ <ng-template [ngTemplateOutlet]="itemcontent">
1652
+ </ng-template>
1653
+ </span>
1654
+ <a *ngIf="item.url && !linkTemplate" class="k-link k-menu-link" #link [attr.href]="item.url"
1655
+ [class.k-state-active]="opened" tabindex="-1" role="presentation">
1656
+ <ng-template [ngTemplateOutlet]="itemcontent">
1657
+ </ng-template>
1658
+ </a>
1659
+ <ng-template *ngIf="linkTemplate && !item.content" [ngTemplateOutlet]="linkTemplate"
1660
+ [ngTemplateOutletContext]="{ item: item, index: index }">
1661
+ </ng-template>
1662
+
1663
+ <div class="k-content" *ngIf="item.content" role="presentation">
1664
+ <ng-template [ngTemplateOutlet]="item.content" [ngTemplateOutletContext]="{ item: item.owner, index: item.ownerIndex }">
1665
+ </ng-template>
1666
+ </div>
1667
+
1668
+ <ng-template #popupTemplate>
1669
+ <ul kendoMenuList
1670
+ [attr.id]="childId"
1671
+ [animate]="animate"
1672
+ [rtl]="rtl"
1673
+ [vertical]="vertical"
1674
+ [openOnClick]="openOnClick"
1675
+ [items]="children"
1676
+ [level]="level + 1"
1677
+ [index]="index"
1678
+ [itemTemplate]="itemTemplate"
1679
+ [itemLinkTemplate]="itemLinkTemplate"
1680
+ role="menu"
1681
+ class="k-group k-menu-group k-reset">
1682
+ </ul>
1683
+ </ng-template>
1684
+
1685
+ <ng-template #itemcontent>
1686
+ <span *ngIf="item.icon" class="k-icon" [ngClass]="iconClass" role="presentation"></span>
1687
+ <ng-container *ngIf="!template">
1688
+ <span class="k-menu-link-text">{{ item.text }}</span>
1689
+ </ng-container>
1690
+ <ng-template *ngIf="template" [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ item: item, index: index }">
1691
+ </ng-template>
1692
+ <span class="k-icon k-menu-expand-arrow" *ngIf="hasContent"
1693
+ role="presentation"
1694
+ [class.k-i-arrow-60-down]="!horizontal"
1695
+ [class.k-i-arrow-60-right]="horizontal && !rtl"
1696
+ [class.k-i-arrow-60-left]="horizontal && rtl">
1697
+ </span>
1698
+ </ng-template>
1699
+ `
1700
+ }]
1701
+ }], ctorParameters: function () { return [{ type: ItemsService }, { type: NavigationService }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i6.PopupService }, { type: i0.ElementRef }]; }, propDecorators: { item: [{
1702
+ type: Input
1703
+ }], level: [{
1704
+ type: Input
1705
+ }], index: [{
1706
+ type: Input
1707
+ }], siblingIndex: [{
1708
+ type: Input
1709
+ }], animate: [{
1710
+ type: Input
1711
+ }], vertical: [{
1712
+ type: Input
1713
+ }], rtl: [{
1714
+ type: Input
1715
+ }], openOnClick: [{
1716
+ type: Input
1717
+ }], itemTemplate: [{
1718
+ type: Input
1719
+ }], itemLinkTemplate: [{
1720
+ type: Input
1721
+ }], link: [{
1722
+ type: ViewChild,
1723
+ args: ['link', { static: false }]
1724
+ }], popupTemplate: [{
1725
+ type: ViewChild,
1726
+ args: ['popupTemplate', { static: true }]
1727
+ }], disabled: [{
1728
+ type: HostBinding,
1729
+ args: ['attr.aria-disabled']
1730
+ }], hasPopup: [{
1731
+ type: HostBinding,
1732
+ args: ['attr.aria-haspopup']
1733
+ }], expanded: [{
1734
+ type: HostBinding,
1735
+ args: ['attr.aria-expanded']
1736
+ }], label: [{
1737
+ type: HostBinding,
1738
+ args: ['attr.aria-label']
1739
+ }], activeId: [{
1740
+ type: HostBinding,
1741
+ args: ['attr.tabindex']
1742
+ }] } });
1743
+
1744
+ /**
1745
+ * Represents the [Kendo UI Menu component for Angular]({% slug overview_menu %}).
1746
+ *
1747
+ * @example
1748
+ * ```ts
1749
+ * _@Component({
1750
+ * selector: 'my-app',
1751
+ * template: `
1752
+ * <kendo-menu [items]="items">
1753
+ * </kendo-menu>
1754
+ * `
1755
+ * })
1756
+ * class AppComponent {
1757
+ * public items: any[] = [{ text: 'item1', items: [{ text: 'item1.1' }] }, { text: 'item2', disabled: true }];
1758
+ * }
1759
+ * ```
1760
+ */
1761
+ class MenuComponent extends MenuBase {
1762
+ constructor(itemsService, hover, actions, navigation, localization, ngZone, renderer, contextService) {
1763
+ super();
1764
+ this.itemsService = itemsService;
1765
+ this.hover = hover;
1766
+ this.actions = actions;
1767
+ this.navigation = navigation;
1768
+ this.localization = localization;
1769
+ this.ngZone = ngZone;
1770
+ this.renderer = renderer;
1771
+ this.contextService = contextService;
1772
+ /**
1773
+ * Fires when a Menu item is selected ([see example]({% slug routing_menu %})).
1774
+ */
1775
+ this.select = new EventEmitter();
1776
+ /**
1777
+ * Fires when a Menu item is opened.
1778
+ */
1779
+ this.open = new EventEmitter();
1780
+ /**
1781
+ * Fires when a Menu item is closed.
1782
+ */
1783
+ this.close = new EventEmitter();
1784
+ validatePackage(packageMetadata);
1785
+ this.actions.owner = this;
1786
+ if (contextService) {
1787
+ contextService.items = this.itemsService;
1788
+ this.contextKeyDownSubscription = contextService.keydown.subscribe(this.contextKeyDown.bind(this));
1789
+ }
1790
+ }
1791
+ /**
1792
+ * @hidden
1793
+ */
1794
+ get ariaOrientation() {
1795
+ if (this.vertical) {
1796
+ return 'vertical';
1797
+ }
1798
+ }
1799
+ /**
1800
+ * @hidden
1801
+ */
1802
+ get contextMenuClass() {
1803
+ return Boolean(this.contextService);
1804
+ }
1805
+ get direction() {
1806
+ return this.rtl;
1807
+ }
1808
+ get rtl() {
1809
+ return this.localization.rtl;
1810
+ }
1811
+ /**
1812
+ * Opens or closes the specified Menu items.
1813
+ *
1814
+ * @param open - A Boolean value which indicates if the items will be opened or closed.
1815
+ * @param indices - One or more values which represent the hierarchical indices of the items that will be opened or closed.
1816
+ */
1817
+ toggle(open, ...indices) {
1818
+ for (let idx = 0; idx < indices.length; idx++) {
1819
+ const item = this.itemsService.get(indices[idx]);
1820
+ if (item && !item.disabled) {
1821
+ if (open) {
1822
+ item.open();
1823
+ }
1824
+ else {
1825
+ item.close();
1826
+ }
1827
+ }
1828
+ }
1829
+ }
1830
+ /**
1831
+ * @hidden
1832
+ */
1833
+ focus(index) {
1834
+ this.navigation.focusIndex(index);
1835
+ }
1836
+ ngOnChanges(changes) {
1837
+ this.navigation.vertical = this.vertical;
1838
+ this.hover.delay = this.hoverDelay;
1839
+ if (changes.openOnClick) {
1840
+ const openOnClick = this.openOnClick = normalize(this.openOnClick);
1841
+ this.hover.openOnOver = !openOnClick;
1842
+ if (openOnClick && openOnClick.toggle === 'click') {
1843
+ this.attachCloseClick();
1844
+ }
1845
+ else {
1846
+ this.unsubscribeClick();
1847
+ }
1848
+ }
1849
+ }
1850
+ ngAfterViewChecked() {
1851
+ this.navigation.updateActive();
1852
+ }
1853
+ ngOnDestroy() {
1854
+ this.unsubscribeClick();
1855
+ if (this.contextService) {
1856
+ this.contextService.items = null;
1857
+ this.contextKeyDownSubscription.unsubscribe();
1815
1858
  }
1816
1859
  }
1817
- open() {
1818
- if (!this.destroyed && this.hasContent && !this.opened) {
1819
- const popupSettings = this.popupSettings;
1820
- const animate = this.animate ? Object.assign({}, this.animate, {
1821
- direction: popupSettings.animate
1822
- }) : false;
1823
- this.opened = true;
1824
- this.popupRef = this.popupService.open({
1825
- popupAlign: popupSettings.popup,
1826
- anchorAlign: popupSettings.anchor,
1827
- collision: popupSettings.collision,
1828
- anchor: this.element,
1829
- positionMode: 'absolute',
1830
- content: this.popupTemplate,
1831
- popupClass: {
1832
- 'k-rtl': this.rtl,
1833
- 'k-menu-popup': true
1834
- },
1835
- animate: animate
1860
+ attachCloseClick() {
1861
+ if (!this.closeClickSubscription && isDocumentAvailable()) {
1862
+ this.ngZone.runOutsideAngular(() => {
1863
+ this.closeClickSubscription = this.renderer.listen('document', 'click', (e) => {
1864
+ if (!inMenu(e.target, this.itemsService)) {
1865
+ this.hover.openOnOver = false;
1866
+ this.actions.closeAll();
1867
+ this.actions.execute();
1868
+ }
1869
+ });
1836
1870
  });
1837
- this.setAttribute('aria-expanded', 'true');
1838
- this.setAttribute('aria-owns', this.childId);
1839
- this.changeDetector.detectChanges();
1840
1871
  }
1841
1872
  }
1842
- close() {
1843
- if (!this.destroyed && this.opened) {
1844
- this.opened = false;
1845
- if (this.popupRef) {
1846
- this.popupRef.close();
1847
- this.popupRef = null;
1848
- }
1849
- this.changeDetector.detectChanges();
1850
- this.setAttribute('aria-expanded', 'false');
1851
- this.renderer.removeAttribute(this.element.nativeElement, 'aria-owns');
1873
+ unsubscribeClick() {
1874
+ if (this.closeClickSubscription) {
1875
+ this.closeClickSubscription();
1852
1876
  }
1853
1877
  }
1854
- navigate() {
1855
- let link;
1856
- if (this.linkTemplate) {
1857
- link = this.element.nativeElement.querySelector('a.k-menu-link');
1878
+ contextKeyDown(e) {
1879
+ if (!this.itemsService.hasItems) {
1880
+ return;
1858
1881
  }
1859
- else if (this.hasLink) {
1860
- link = this.link.nativeElement;
1882
+ const keyCode = e.keyCode;
1883
+ const rtl = this.localization.rtl;
1884
+ const first = keyCode === Keys.ArrowDown || keyCode === Keys.ArrowRight;
1885
+ const last = keyCode === Keys.ArrowUp || keyCode === Keys.ArrowLeft;
1886
+ let index;
1887
+ if ((first && !rtl) || (last && rtl)) {
1888
+ index = 'first';
1861
1889
  }
1862
- if (link) {
1863
- this.navigating = true;
1864
- link.click();
1865
- this.navigating = false;
1890
+ else if ((first && rtl) || (last && !rtl)) {
1891
+ index = 'last';
1892
+ }
1893
+ if (index) {
1894
+ e.preventDefault();
1895
+ this.focus(index);
1866
1896
  }
1867
1897
  }
1868
- setAttribute(name, value) {
1869
- this.renderer.setAttribute(this.element.nativeElement, name, value);
1870
- }
1871
- };
1872
- __decorate([
1873
- Input(),
1874
- __metadata("design:type", Object)
1875
- ], ItemComponent.prototype, "item", void 0);
1876
- __decorate([
1877
- Input(),
1878
- __metadata("design:type", Number)
1879
- ], ItemComponent.prototype, "level", void 0);
1880
- __decorate([
1881
- Input(),
1882
- __metadata("design:type", String),
1883
- __metadata("design:paramtypes", [String])
1884
- ], ItemComponent.prototype, "index", null);
1885
- __decorate([
1886
- Input(),
1887
- __metadata("design:type", Number)
1888
- ], ItemComponent.prototype, "siblingIndex", void 0);
1889
- __decorate([
1890
- Input(),
1891
- __metadata("design:type", Object)
1892
- ], ItemComponent.prototype, "animate", void 0);
1893
- __decorate([
1894
- Input(),
1895
- __metadata("design:type", Boolean)
1896
- ], ItemComponent.prototype, "vertical", void 0);
1897
- __decorate([
1898
- Input(),
1899
- __metadata("design:type", Boolean)
1900
- ], ItemComponent.prototype, "rtl", void 0);
1901
- __decorate([
1902
- Input(),
1903
- __metadata("design:type", Boolean)
1904
- ], ItemComponent.prototype, "openOnClick", void 0);
1905
- __decorate([
1906
- Input(),
1907
- __metadata("design:type", TemplateRef)
1908
- ], ItemComponent.prototype, "itemTemplate", void 0);
1909
- __decorate([
1910
- Input(),
1911
- __metadata("design:type", TemplateRef)
1912
- ], ItemComponent.prototype, "itemLinkTemplate", void 0);
1913
- __decorate([
1914
- ViewChild('link', { static: false }),
1915
- __metadata("design:type", ElementRef)
1916
- ], ItemComponent.prototype, "link", void 0);
1917
- __decorate([
1918
- ViewChild('popupTemplate', { static: true }),
1919
- __metadata("design:type", TemplateRef)
1920
- ], ItemComponent.prototype, "popupTemplate", void 0);
1921
- __decorate([
1922
- HostBinding('attr.aria-disabled'),
1923
- __metadata("design:type", Boolean),
1924
- __metadata("design:paramtypes", [])
1925
- ], ItemComponent.prototype, "disabled", null);
1926
- __decorate([
1927
- HostBinding('attr.aria-haspopup'),
1928
- __metadata("design:type", Boolean),
1929
- __metadata("design:paramtypes", [])
1930
- ], ItemComponent.prototype, "hasPopup", null);
1931
- __decorate([
1932
- HostBinding('attr.aria-expanded'),
1933
- __metadata("design:type", Boolean),
1934
- __metadata("design:paramtypes", [])
1935
- ], ItemComponent.prototype, "expanded", null);
1936
- __decorate([
1937
- HostBinding('attr.aria-label'),
1938
- __metadata("design:type", Boolean),
1939
- __metadata("design:paramtypes", [])
1940
- ], ItemComponent.prototype, "label", null);
1941
- __decorate([
1942
- HostBinding('attr.tabindex'),
1943
- __metadata("design:type", String),
1944
- __metadata("design:paramtypes", [])
1945
- ], ItemComponent.prototype, "activeId", null);
1946
- ItemComponent = __decorate([
1947
- Component({
1948
- providers: [PopupService, {
1949
- provide: POPUP_CONTAINER,
1950
- useFactory: ɵ0$3
1951
- }],
1952
- selector: '[kendoMenuItem]',
1953
- template: `
1954
- <span *ngIf="!hasLink && !item.content && !linkTemplate" class="k-link k-menu-link" #link
1955
- [class.k-state-active]="opened" role="presentation">
1956
- <ng-template [ngTemplateOutlet]="itemcontent">
1957
- </ng-template>
1958
- </span>
1959
- <a *ngIf="item.url && !linkTemplate" class="k-link k-menu-link" #link [attr.href]="item.url"
1960
- [class.k-state-active]="opened" tabindex="-1" role="presentation">
1961
- <ng-template [ngTemplateOutlet]="itemcontent">
1962
- </ng-template>
1963
- </a>
1964
- <ng-template *ngIf="linkTemplate && !item.content" [ngTemplateOutlet]="linkTemplate"
1965
- [ngTemplateOutletContext]="{ item: item, index: index }">
1966
- </ng-template>
1967
-
1968
- <div class="k-content" *ngIf="item.content" role="presentation">
1969
- <ng-template [ngTemplateOutlet]="item.content" [ngTemplateOutletContext]="{ item: item.owner, index: item.ownerIndex }">
1970
- </ng-template>
1971
- </div>
1972
-
1973
- <ng-template #popupTemplate>
1974
- <ul kendoMenuList
1975
- [attr.id]="childId"
1976
- [animate]="animate"
1977
- [rtl]="rtl"
1978
- [vertical]="vertical"
1979
- [openOnClick]="openOnClick"
1980
- [items]="children"
1981
- [level]="level + 1"
1982
- [index]="index"
1983
- [itemTemplate]="itemTemplate"
1984
- [itemLinkTemplate]="itemLinkTemplate"
1985
- role="menu"
1986
- class="k-group k-menu-group k-reset">
1987
- </ul>
1988
- </ng-template>
1989
-
1990
- <ng-template #itemcontent>
1991
- <span *ngIf="item.icon" class="k-icon" [ngClass]="iconClass" role="presentation"></span>
1992
- <ng-container *ngIf="!template">
1993
- <span class="k-menu-link-text">{{ item.text }}</span>
1994
- </ng-container>
1995
- <ng-template *ngIf="template" [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ item: item, index: index }">
1996
- </ng-template>
1997
- <span class="k-icon k-menu-expand-arrow" *ngIf="hasContent"
1998
- role="presentation"
1999
- [class.k-i-arrow-60-down]="!horizontal"
2000
- [class.k-i-arrow-60-right]="horizontal && !rtl"
2001
- [class.k-i-arrow-60-left]="horizontal && rtl">
2002
- </span>
2003
- </ng-template>
2004
- `
2005
- }),
2006
- __metadata("design:paramtypes", [ItemsService,
1898
+ }
1899
+ MenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuComponent, deps: [{ token: ItemsService }, { token: HoverService }, { token: ActionsService }, { token: NavigationService }, { token: i3.LocalizationService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: ContextMenuService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1900
+ MenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MenuComponent, selector: "kendo-menu", inputs: { menuItemTemplate: "menuItemTemplate", menuItemLinkTemplate: "menuItemLinkTemplate" }, outputs: { select: "select", open: "open", close: "close" }, host: { properties: { "class.k-rtl": "this.direction" } }, providers: [
1901
+ ItemsService,
1902
+ ActionsService,
2007
1903
  NavigationService,
2008
- ChangeDetectorRef,
2009
- Renderer2,
2010
- PopupService,
2011
- ElementRef])
2012
- ], ItemComponent);
1904
+ HoverService,
1905
+ LocalizationService,
1906
+ {
1907
+ provide: L10N_PREFIX,
1908
+ useValue: 'kendo.menu'
1909
+ },
1910
+ {
1911
+ provide: MenuBase,
1912
+ useExisting: forwardRef(() => MenuComponent)
1913
+ }
1914
+ ], exportAs: ["kendoMenu"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
1915
+ <ul role="menubar"
1916
+ [attr.aria-orientation]="ariaOrientation"
1917
+ kendoMenuList [items]="rootItems" [level]="0" class="k-widget k-reset k-header k-menu"
1918
+ [vertical]="vertical" [rtl]="rtl" [animate]="animate" [openOnClick]="openOnClick"
1919
+ [itemTemplate]="itemTemplate.first?.templateRef || menuItemTemplate"
1920
+ [itemLinkTemplate]="itemLinkTemplate.first?.templateRef || menuItemLinkTemplate"
1921
+ [class.k-menu-horizontal]="!vertical"
1922
+ [class.k-menu-vertical]="vertical"
1923
+ [class.k-context-menu]="contextMenuClass">
1924
+ </ul>
1925
+ `, isInline: true, components: [{ type: ListComponent, selector: "[kendoMenuList]", inputs: ["items", "level", "index", "animate", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate"] }] });
1926
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuComponent, decorators: [{
1927
+ type: Component,
1928
+ args: [{
1929
+ exportAs: 'kendoMenu',
1930
+ providers: [
1931
+ ItemsService,
1932
+ ActionsService,
1933
+ NavigationService,
1934
+ HoverService,
1935
+ LocalizationService,
1936
+ {
1937
+ provide: L10N_PREFIX,
1938
+ useValue: 'kendo.menu'
1939
+ },
1940
+ {
1941
+ provide: MenuBase,
1942
+ useExisting: forwardRef(() => MenuComponent)
1943
+ }
1944
+ ],
1945
+ selector: 'kendo-menu',
1946
+ template: `
1947
+ <ul role="menubar"
1948
+ [attr.aria-orientation]="ariaOrientation"
1949
+ kendoMenuList [items]="rootItems" [level]="0" class="k-widget k-reset k-header k-menu"
1950
+ [vertical]="vertical" [rtl]="rtl" [animate]="animate" [openOnClick]="openOnClick"
1951
+ [itemTemplate]="itemTemplate.first?.templateRef || menuItemTemplate"
1952
+ [itemLinkTemplate]="itemLinkTemplate.first?.templateRef || menuItemLinkTemplate"
1953
+ [class.k-menu-horizontal]="!vertical"
1954
+ [class.k-menu-vertical]="vertical"
1955
+ [class.k-context-menu]="contextMenuClass">
1956
+ </ul>
1957
+ `
1958
+ }]
1959
+ }], ctorParameters: function () { return [{ type: ItemsService }, { type: HoverService }, { type: ActionsService }, { type: NavigationService }, { type: i3.LocalizationService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: ContextMenuService, decorators: [{
1960
+ type: Optional
1961
+ }] }]; }, propDecorators: { menuItemTemplate: [{
1962
+ type: Input
1963
+ }], menuItemLinkTemplate: [{
1964
+ type: Input
1965
+ }], select: [{
1966
+ type: Output
1967
+ }], open: [{
1968
+ type: Output
1969
+ }], close: [{
1970
+ type: Output
1971
+ }], direction: [{
1972
+ type: HostBinding,
1973
+ args: ['class.k-rtl']
1974
+ }] } });
2013
1975
 
2014
1976
  /**
2015
1977
  * Represents a directive that can be used in the [`linkTemplate`]({% slug api_menu_itemlinktemplatedirective %})
2016
1978
  * of the items to apply the default styling and behavior.
2017
1979
  */
2018
- let LinkDirective = class LinkDirective {
1980
+ class LinkDirective {
2019
1981
  constructor(itemsService) {
2020
1982
  this.itemsService = itemsService;
2021
1983
  this.hostClasses = true;
@@ -2031,41 +1993,39 @@ let LinkDirective = class LinkDirective {
2031
1993
  }
2032
1994
  this.item = this.itemsService.get(this.index) || {};
2033
1995
  }
2034
- };
2035
- __decorate([
2036
- Input('kendoMenuItemLink'),
2037
- __metadata("design:type", String)
2038
- ], LinkDirective.prototype, "index", void 0);
2039
- __decorate([
2040
- HostBinding('class.k-link'),
2041
- HostBinding('class.k-menu-link'),
2042
- __metadata("design:type", Boolean)
2043
- ], LinkDirective.prototype, "hostClasses", void 0);
2044
- __decorate([
2045
- HostBinding('attr.role'),
2046
- __metadata("design:type", String)
2047
- ], LinkDirective.prototype, "role", void 0);
2048
- __decorate([
2049
- HostBinding('attr.tabindex'),
2050
- __metadata("design:type", String)
2051
- ], LinkDirective.prototype, "tabindex", void 0);
2052
- __decorate([
2053
- HostBinding('class.k-state-active'),
2054
- __metadata("design:type", Boolean),
2055
- __metadata("design:paramtypes", [])
2056
- ], LinkDirective.prototype, "activeClass", null);
2057
- LinkDirective = __decorate([
2058
- Directive({
2059
- selector: '[kendoMenuItemLink]'
2060
- }),
2061
- __metadata("design:paramtypes", [ItemsService])
2062
- ], LinkDirective);
1996
+ }
1997
+ LinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LinkDirective, deps: [{ token: ItemsService }], target: i0.ɵɵFactoryTarget.Directive });
1998
+ LinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: LinkDirective, selector: "[kendoMenuItemLink]", inputs: { index: ["kendoMenuItemLink", "index"] }, host: { properties: { "class.k-link": "this.hostClasses", "class.k-menu-link": "this.hostClasses", "attr.role": "this.role", "attr.tabindex": "this.tabindex", "class.k-state-active": "this.activeClass" } }, ngImport: i0 });
1999
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LinkDirective, decorators: [{
2000
+ type: Directive,
2001
+ args: [{
2002
+ selector: '[kendoMenuItemLink]'
2003
+ }]
2004
+ }], ctorParameters: function () { return [{ type: ItemsService }]; }, propDecorators: { index: [{
2005
+ type: Input,
2006
+ args: ['kendoMenuItemLink']
2007
+ }], hostClasses: [{
2008
+ type: HostBinding,
2009
+ args: ['class.k-link']
2010
+ }, {
2011
+ type: HostBinding,
2012
+ args: ['class.k-menu-link']
2013
+ }], role: [{
2014
+ type: HostBinding,
2015
+ args: ['attr.role']
2016
+ }], tabindex: [{
2017
+ type: HostBinding,
2018
+ args: ['attr.tabindex']
2019
+ }], activeClass: [{
2020
+ type: HostBinding,
2021
+ args: ['class.k-state-active']
2022
+ }] } });
2063
2023
 
2064
2024
  /**
2065
2025
  * Represents a directive that can be used in the [`linkTemplate`]({% slug api_menu_itemlinktemplatedirective %})
2066
2026
  * of the items to render the default expand arrow.
2067
2027
  */
2068
- let ExpandArrowDirective = class ExpandArrowDirective {
2028
+ class ExpandArrowDirective {
2069
2029
  constructor(itemsService) {
2070
2030
  this.itemsService = itemsService;
2071
2031
  this.hostClasses = true;
@@ -2086,41 +2046,73 @@ let ExpandArrowDirective = class ExpandArrowDirective {
2086
2046
  }
2087
2047
  this.item = this.itemsService.get(this.index) || {};
2088
2048
  }
2089
- };
2090
- __decorate([
2091
- Input('kendoMenuExpandArrow'),
2092
- __metadata("design:type", String)
2093
- ], ExpandArrowDirective.prototype, "index", void 0);
2094
- __decorate([
2095
- HostBinding('class.k-icon'),
2096
- HostBinding('class.k-menu-expand-arrow'),
2097
- __metadata("design:type", Boolean)
2098
- ], ExpandArrowDirective.prototype, "hostClasses", void 0);
2099
- __decorate([
2100
- HostBinding('attr.role'),
2101
- __metadata("design:type", String)
2102
- ], ExpandArrowDirective.prototype, "role", void 0);
2103
- __decorate([
2104
- HostBinding('class.k-i-arrow-60-down'),
2105
- __metadata("design:type", Boolean),
2106
- __metadata("design:paramtypes", [])
2107
- ], ExpandArrowDirective.prototype, "arrowDown", null);
2108
- __decorate([
2109
- HostBinding('class.k-i-arrow-60-right'),
2110
- __metadata("design:type", Boolean),
2111
- __metadata("design:paramtypes", [])
2112
- ], ExpandArrowDirective.prototype, "arrowRight", null);
2113
- __decorate([
2114
- HostBinding('class.k-i-arrow-60-left'),
2115
- __metadata("design:type", Boolean),
2116
- __metadata("design:paramtypes", [])
2117
- ], ExpandArrowDirective.prototype, "arrowLeft", null);
2118
- ExpandArrowDirective = __decorate([
2119
- Directive({
2120
- selector: '[kendoMenuExpandArrow]'
2121
- }),
2122
- __metadata("design:paramtypes", [ItemsService])
2123
- ], ExpandArrowDirective);
2049
+ }
2050
+ ExpandArrowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ExpandArrowDirective, deps: [{ token: ItemsService }], target: i0.ɵɵFactoryTarget.Directive });
2051
+ ExpandArrowDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ExpandArrowDirective, selector: "[kendoMenuExpandArrow]", inputs: { index: ["kendoMenuExpandArrow", "index"] }, host: { properties: { "class.k-icon": "this.hostClasses", "class.k-menu-expand-arrow": "this.hostClasses", "attr.role": "this.role", "class.k-i-arrow-60-down": "this.arrowDown", "class.k-i-arrow-60-right": "this.arrowRight", "class.k-i-arrow-60-left": "this.arrowLeft" } }, ngImport: i0 });
2052
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ExpandArrowDirective, decorators: [{
2053
+ type: Directive,
2054
+ args: [{
2055
+ selector: '[kendoMenuExpandArrow]'
2056
+ }]
2057
+ }], ctorParameters: function () { return [{ type: ItemsService }]; }, propDecorators: { index: [{
2058
+ type: Input,
2059
+ args: ['kendoMenuExpandArrow']
2060
+ }], hostClasses: [{
2061
+ type: HostBinding,
2062
+ args: ['class.k-icon']
2063
+ }, {
2064
+ type: HostBinding,
2065
+ args: ['class.k-menu-expand-arrow']
2066
+ }], role: [{
2067
+ type: HostBinding,
2068
+ args: ['attr.role']
2069
+ }], arrowDown: [{
2070
+ type: HostBinding,
2071
+ args: ['class.k-i-arrow-60-down']
2072
+ }], arrowRight: [{
2073
+ type: HostBinding,
2074
+ args: ['class.k-i-arrow-60-right']
2075
+ }], arrowLeft: [{
2076
+ type: HostBinding,
2077
+ args: ['class.k-i-arrow-60-left']
2078
+ }] } });
2079
+
2080
+ /**
2081
+ * @hidden
2082
+ */
2083
+ class PreventableEvent {
2084
+ /**
2085
+ * @hidden
2086
+ */
2087
+ constructor(args) {
2088
+ this.prevented = false;
2089
+ Object.assign(this, args);
2090
+ }
2091
+ /**
2092
+ * Prevents the default action for a specified event.
2093
+ * In this way, the source component suppresses
2094
+ * the built-in behavior that follows the event.
2095
+ */
2096
+ preventDefault() {
2097
+ this.prevented = true;
2098
+ }
2099
+ /**
2100
+ * Returns `true` if the event was prevented
2101
+ * by any of its subscribers.
2102
+ *
2103
+ * @returns `true` if the default action was prevented.
2104
+ * Otherwise, returns `false`.
2105
+ */
2106
+ isDefaultPrevented() {
2107
+ return this.prevented;
2108
+ }
2109
+ }
2110
+
2111
+ /**
2112
+ * Arguments for the `open` and `close` events of the Menu.
2113
+ */
2114
+ class MenuEvent extends PreventableEvent {
2115
+ }
2124
2116
 
2125
2117
  /**
2126
2118
  * Arguments for the `select` event of the Menu.
@@ -2154,10 +2146,18 @@ class BindingDirectiveBase {
2154
2146
  this.menu.items = this.data ? this.mapItems(this.data) : [];
2155
2147
  }
2156
2148
  }
2149
+ BindingDirectiveBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: BindingDirectiveBase, deps: [{ token: MenuBase }], target: i0.ɵɵFactoryTarget.Directive });
2150
+ BindingDirectiveBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: BindingDirectiveBase, selector: "kendoBindingBase", usesOnChanges: true, ngImport: i0 });
2151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: BindingDirectiveBase, decorators: [{
2152
+ type: Directive,
2153
+ args: [{
2154
+ selector: 'kendoBindingBase'
2155
+ }]
2156
+ }], ctorParameters: function () { return [{ type: MenuBase }]; } });
2157
2157
 
2158
2158
  const FIELD_REGEX = /\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;
2159
2159
  const getterCache = {};
2160
- // tslint:disable-next-line:no-string-literal
2160
+ // eslint-disable-next-line no-string-literal
2161
2161
  getterCache['undefined'] = (obj) => obj;
2162
2162
  /**
2163
2163
  * @hidden
@@ -2185,11 +2185,11 @@ const getter = (field) => {
2185
2185
  const last = (arr) => arr[arr.length - 1];
2186
2186
 
2187
2187
  const getField = (field, level) => Array.isArray(field) ? field[level] || last(field) : field;
2188
- /* tslint:disable:no-input-rename */
2188
+ /* eslint-disable no-input-rename */
2189
2189
  /**
2190
2190
  * A directive that converts the provided hierarchical data to [MenuItems]({% slug api_menu_menuitem %}) and binds them to the Menu.
2191
2191
  */
2192
- let HierarchyBindingDirective = class HierarchyBindingDirective extends BindingDirectiveBase {
2192
+ class HierarchyBindingDirective extends BindingDirectiveBase {
2193
2193
  constructor(menu) {
2194
2194
  super(menu);
2195
2195
  }
@@ -2218,56 +2218,41 @@ let HierarchyBindingDirective = class HierarchyBindingDirective extends BindingD
2218
2218
  return item[field];
2219
2219
  }
2220
2220
  }
2221
- };
2222
- __decorate([
2223
- Input("kendoMenuHierarchyBinding"),
2224
- __metadata("design:type", Array)
2225
- ], HierarchyBindingDirective.prototype, "data", void 0);
2226
- __decorate([
2227
- Input(),
2228
- __metadata("design:type", Object)
2229
- ], HierarchyBindingDirective.prototype, "textField", void 0);
2230
- __decorate([
2231
- Input(),
2232
- __metadata("design:type", Object)
2233
- ], HierarchyBindingDirective.prototype, "urlField", void 0);
2234
- __decorate([
2235
- Input(),
2236
- __metadata("design:type", Object)
2237
- ], HierarchyBindingDirective.prototype, "iconField", void 0);
2238
- __decorate([
2239
- Input(),
2240
- __metadata("design:type", Object)
2241
- ], HierarchyBindingDirective.prototype, "disabledField", void 0);
2242
- __decorate([
2243
- Input(),
2244
- __metadata("design:type", Object)
2245
- ], HierarchyBindingDirective.prototype, "cssClassField", void 0);
2246
- __decorate([
2247
- Input(),
2248
- __metadata("design:type", Object)
2249
- ], HierarchyBindingDirective.prototype, "cssStyleField", void 0);
2250
- __decorate([
2251
- Input(),
2252
- __metadata("design:type", Object)
2253
- ], HierarchyBindingDirective.prototype, "separatorField", void 0);
2254
- __decorate([
2255
- Input(),
2256
- __metadata("design:type", Object)
2257
- ], HierarchyBindingDirective.prototype, "childrenField", void 0);
2258
- HierarchyBindingDirective = __decorate([
2259
- Directive({
2260
- exportAs: 'kendoMenuHierarchyBinding',
2261
- selector: '[kendoMenuHierarchyBinding]'
2262
- }),
2263
- __metadata("design:paramtypes", [MenuBase])
2264
- ], HierarchyBindingDirective);
2221
+ }
2222
+ HierarchyBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HierarchyBindingDirective, deps: [{ token: MenuBase }], target: i0.ɵɵFactoryTarget.Directive });
2223
+ HierarchyBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: HierarchyBindingDirective, selector: "[kendoMenuHierarchyBinding]", inputs: { data: ["kendoMenuHierarchyBinding", "data"], textField: "textField", urlField: "urlField", iconField: "iconField", disabledField: "disabledField", cssClassField: "cssClassField", cssStyleField: "cssStyleField", separatorField: "separatorField", childrenField: "childrenField" }, exportAs: ["kendoMenuHierarchyBinding"], usesInheritance: true, ngImport: i0 });
2224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HierarchyBindingDirective, decorators: [{
2225
+ type: Directive,
2226
+ args: [{
2227
+ exportAs: 'kendoMenuHierarchyBinding',
2228
+ selector: '[kendoMenuHierarchyBinding]'
2229
+ }]
2230
+ }], ctorParameters: function () { return [{ type: MenuBase }]; }, propDecorators: { data: [{
2231
+ type: Input,
2232
+ args: ["kendoMenuHierarchyBinding"]
2233
+ }], textField: [{
2234
+ type: Input
2235
+ }], urlField: [{
2236
+ type: Input
2237
+ }], iconField: [{
2238
+ type: Input
2239
+ }], disabledField: [{
2240
+ type: Input
2241
+ }], cssClassField: [{
2242
+ type: Input
2243
+ }], cssStyleField: [{
2244
+ type: Input
2245
+ }], separatorField: [{
2246
+ type: Input
2247
+ }], childrenField: [{
2248
+ type: Input
2249
+ }] } });
2265
2250
 
2266
- /* tslint:disable:no-input-rename */
2251
+ /* eslint-disable no-input-rename */
2267
2252
  /**
2268
2253
  * A directive that converts the provided flat data to [MenuItems]({% slug api_menu_menuitem %}) and binds them to the Menu.
2269
2254
  */
2270
- let FlatBindingDirective = class FlatBindingDirective extends BindingDirectiveBase {
2255
+ class FlatBindingDirective extends BindingDirectiveBase {
2271
2256
  constructor(menu) {
2272
2257
  super(menu);
2273
2258
  }
@@ -2306,54 +2291,37 @@ let FlatBindingDirective = class FlatBindingDirective extends BindingDirectiveBa
2306
2291
  }
2307
2292
  return result;
2308
2293
  }
2309
- };
2310
- __decorate([
2311
- Input("kendoMenuFlatBinding"),
2312
- __metadata("design:type", Array)
2313
- ], FlatBindingDirective.prototype, "data", void 0);
2314
- __decorate([
2315
- Input(),
2316
- __metadata("design:type", String)
2317
- ], FlatBindingDirective.prototype, "textField", void 0);
2318
- __decorate([
2319
- Input(),
2320
- __metadata("design:type", String)
2321
- ], FlatBindingDirective.prototype, "urlField", void 0);
2322
- __decorate([
2323
- Input(),
2324
- __metadata("design:type", Object)
2325
- ], FlatBindingDirective.prototype, "iconField", void 0);
2326
- __decorate([
2327
- Input(),
2328
- __metadata("design:type", String)
2329
- ], FlatBindingDirective.prototype, "disabledField", void 0);
2330
- __decorate([
2331
- Input(),
2332
- __metadata("design:type", String)
2333
- ], FlatBindingDirective.prototype, "cssClassField", void 0);
2334
- __decorate([
2335
- Input(),
2336
- __metadata("design:type", String)
2337
- ], FlatBindingDirective.prototype, "cssStyleField", void 0);
2338
- __decorate([
2339
- Input(),
2340
- __metadata("design:type", String)
2341
- ], FlatBindingDirective.prototype, "separatorField", void 0);
2342
- __decorate([
2343
- Input(),
2344
- __metadata("design:type", String)
2345
- ], FlatBindingDirective.prototype, "idField", void 0);
2346
- __decorate([
2347
- Input(),
2348
- __metadata("design:type", String)
2349
- ], FlatBindingDirective.prototype, "parentIdField", void 0);
2350
- FlatBindingDirective = __decorate([
2351
- Directive({
2352
- exportAs: 'kendoMenuFlatBinding',
2353
- selector: '[kendoMenuFlatBinding]'
2354
- }),
2355
- __metadata("design:paramtypes", [MenuBase])
2356
- ], FlatBindingDirective);
2294
+ }
2295
+ FlatBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FlatBindingDirective, deps: [{ token: MenuBase }], target: i0.ɵɵFactoryTarget.Directive });
2296
+ FlatBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FlatBindingDirective, selector: "[kendoMenuFlatBinding]", inputs: { data: ["kendoMenuFlatBinding", "data"], textField: "textField", urlField: "urlField", iconField: "iconField", disabledField: "disabledField", cssClassField: "cssClassField", cssStyleField: "cssStyleField", separatorField: "separatorField", idField: "idField", parentIdField: "parentIdField" }, exportAs: ["kendoMenuFlatBinding"], usesInheritance: true, ngImport: i0 });
2297
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FlatBindingDirective, decorators: [{
2298
+ type: Directive,
2299
+ args: [{
2300
+ exportAs: 'kendoMenuFlatBinding',
2301
+ selector: '[kendoMenuFlatBinding]'
2302
+ }]
2303
+ }], ctorParameters: function () { return [{ type: MenuBase }]; }, propDecorators: { data: [{
2304
+ type: Input,
2305
+ args: ["kendoMenuFlatBinding"]
2306
+ }], textField: [{
2307
+ type: Input
2308
+ }], urlField: [{
2309
+ type: Input
2310
+ }], iconField: [{
2311
+ type: Input
2312
+ }], disabledField: [{
2313
+ type: Input
2314
+ }], cssClassField: [{
2315
+ type: Input
2316
+ }], cssStyleField: [{
2317
+ type: Input
2318
+ }], separatorField: [{
2319
+ type: Input
2320
+ }], idField: [{
2321
+ type: Input
2322
+ }], parentIdField: [{
2323
+ type: Input
2324
+ }] } });
2357
2325
 
2358
2326
  const COMPONENT_EXPORTS = [
2359
2327
  MenuComponent,
@@ -2366,7 +2334,7 @@ const COMPONENT_EXPORTS = [
2366
2334
  LinkDirective,
2367
2335
  ExpandArrowDirective
2368
2336
  ];
2369
- const COMPONENT_DIRECTIVES = [
2337
+ const COMPONENT_DIRECTIVES$1 = [
2370
2338
  ...COMPONENT_EXPORTS,
2371
2339
  ListComponent,
2372
2340
  ItemComponent
@@ -2403,15 +2371,36 @@ const COMPONENT_DIRECTIVES = [
2403
2371
  *
2404
2372
  * ```
2405
2373
  */
2406
- let MenuModule = class MenuModule {
2407
- };
2408
- MenuModule = __decorate([
2409
- NgModule({
2410
- declarations: [COMPONENT_DIRECTIVES],
2411
- exports: [COMPONENT_EXPORTS],
2412
- imports: [PopupModule, CommonModule]
2413
- })
2414
- ], MenuModule);
2374
+ class MenuModule {
2375
+ }
2376
+ MenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2377
+ MenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuModule, declarations: [MenuComponent,
2378
+ MenuItemComponent,
2379
+ ItemTemplateDirective,
2380
+ ItemLinkTemplateDirective,
2381
+ ItemContentTemplateDirective,
2382
+ HierarchyBindingDirective,
2383
+ FlatBindingDirective,
2384
+ LinkDirective,
2385
+ ExpandArrowDirective, ListComponent,
2386
+ ItemComponent], imports: [PopupModule, CommonModule], exports: [MenuComponent,
2387
+ MenuItemComponent,
2388
+ ItemTemplateDirective,
2389
+ ItemLinkTemplateDirective,
2390
+ ItemContentTemplateDirective,
2391
+ HierarchyBindingDirective,
2392
+ FlatBindingDirective,
2393
+ LinkDirective,
2394
+ ExpandArrowDirective] });
2395
+ MenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuModule, imports: [[PopupModule, CommonModule]] });
2396
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuModule, decorators: [{
2397
+ type: NgModule,
2398
+ args: [{
2399
+ declarations: [COMPONENT_DIRECTIVES$1],
2400
+ exports: [COMPONENT_EXPORTS],
2401
+ imports: [PopupModule, CommonModule]
2402
+ }]
2403
+ }] });
2415
2404
 
2416
2405
  /**
2417
2406
  * Arguments for the `open` and `close` events of the ContextMenu.
@@ -2442,23 +2431,26 @@ class ContextMenuPopupEvent extends PreventableEvent {
2442
2431
  * {% embed_file shared/main.ts %}
2443
2432
  * {% endmeta %}
2444
2433
  */
2445
- let ContextMenuTemplateDirective = class ContextMenuTemplateDirective {
2434
+ class ContextMenuTemplateDirective {
2446
2435
  constructor(templateRef) {
2447
2436
  this.templateRef = templateRef;
2448
2437
  }
2449
- };
2450
- ContextMenuTemplateDirective = __decorate([
2451
- Directive({
2452
- selector: '[kendoContextMenuTemplate]'
2453
- }),
2454
- __param(0, Optional()),
2455
- __metadata("design:paramtypes", [TemplateRef])
2456
- ], ContextMenuTemplateDirective);
2438
+ }
2439
+ ContextMenuTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
2440
+ ContextMenuTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ContextMenuTemplateDirective, selector: "[kendoContextMenuTemplate]", ngImport: i0 });
2441
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuTemplateDirective, decorators: [{
2442
+ type: Directive,
2443
+ args: [{
2444
+ selector: '[kendoContextMenuTemplate]'
2445
+ }]
2446
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
2447
+ type: Optional
2448
+ }] }]; } });
2457
2449
 
2458
2450
  /**
2459
2451
  * @hidden
2460
2452
  */
2461
- let ContextMenuItemsService = class ContextMenuItemsService {
2453
+ class ContextMenuItemsService {
2462
2454
  constructor(contextService) {
2463
2455
  this.contextService = contextService;
2464
2456
  }
@@ -2467,19 +2459,17 @@ let ContextMenuItemsService = class ContextMenuItemsService {
2467
2459
  return this.contextService.items.get(index);
2468
2460
  }
2469
2461
  }
2470
- };
2471
- ContextMenuItemsService = __decorate([
2472
- Injectable(),
2473
- __metadata("design:paramtypes", [ContextMenuService])
2474
- ], ContextMenuItemsService);
2462
+ }
2463
+ ContextMenuItemsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuItemsService, deps: [{ token: ContextMenuService }], target: i0.ɵɵFactoryTarget.Injectable });
2464
+ ContextMenuItemsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuItemsService });
2465
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuItemsService, decorators: [{
2466
+ type: Injectable
2467
+ }], ctorParameters: function () { return [{ type: ContextMenuService }]; } });
2475
2468
 
2476
2469
  /**
2477
2470
  * @hidden
2478
2471
  */
2479
- let ContextMenuTargetService = class ContextMenuTargetService {
2480
- /**
2481
- * @hidden
2482
- */
2472
+ class ContextMenuTargetService {
2483
2473
  constructor() {
2484
2474
  this.targets = [];
2485
2475
  }
@@ -2493,15 +2483,17 @@ let ContextMenuTargetService = class ContextMenuTargetService {
2493
2483
  find(targetElement) {
2494
2484
  return this.targets.find(target => target.element === targetElement);
2495
2485
  }
2496
- };
2497
- ContextMenuTargetService = __decorate([
2498
- Injectable()
2499
- ], ContextMenuTargetService);
2486
+ }
2487
+ ContextMenuTargetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuTargetService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2488
+ ContextMenuTargetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuTargetService });
2489
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuTargetService, decorators: [{
2490
+ type: Injectable
2491
+ }] });
2500
2492
 
2501
2493
  /**
2502
2494
  * Specifies a container for the [targets]({% slug api_menu_contextmenutargetdirective %}) of the ContextMenu.
2503
2495
  */
2504
- let ContextMenuTargetContainerDirective = class ContextMenuTargetContainerDirective {
2496
+ class ContextMenuTargetContainerDirective {
2505
2497
  /**
2506
2498
  * @hidden
2507
2499
  */
@@ -2511,15 +2503,17 @@ let ContextMenuTargetContainerDirective = class ContextMenuTargetContainerDirect
2511
2503
  this.element = elementRef.nativeElement;
2512
2504
  }
2513
2505
  }
2514
- };
2515
- ContextMenuTargetContainerDirective = __decorate([
2516
- Directive({
2517
- selector: '[kendoContextMenuTargetContainer]',
2518
- exportAs: 'kendoContextMenuTargetContainer',
2519
- providers: [ContextMenuTargetService]
2520
- }),
2521
- __metadata("design:paramtypes", [ElementRef, ContextMenuTargetService])
2522
- ], ContextMenuTargetContainerDirective);
2506
+ }
2507
+ ContextMenuTargetContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuTargetContainerDirective, deps: [{ token: i0.ElementRef }, { token: ContextMenuTargetService }], target: i0.ɵɵFactoryTarget.Directive });
2508
+ ContextMenuTargetContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ContextMenuTargetContainerDirective, selector: "[kendoContextMenuTargetContainer]", providers: [ContextMenuTargetService], exportAs: ["kendoContextMenuTargetContainer"], ngImport: i0 });
2509
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuTargetContainerDirective, decorators: [{
2510
+ type: Directive,
2511
+ args: [{
2512
+ selector: '[kendoContextMenuTargetContainer]',
2513
+ exportAs: 'kendoContextMenuTargetContainer',
2514
+ providers: [ContextMenuTargetService]
2515
+ }]
2516
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ContextMenuTargetService }]; } });
2523
2517
 
2524
2518
  /**
2525
2519
  * @hidden
@@ -2529,7 +2523,7 @@ const TARGET_CLASS = 'k-contextmenu-target';
2529
2523
  * Specifies a [target]({% slug api_menu_contextmenutargetdirective %}) for the ContextMenu
2530
2524
  * ([see example]({% slug target_contextmenu %}#toc-directives)).
2531
2525
  */
2532
- let ContextMenuTargetDirective = class ContextMenuTargetDirective {
2526
+ class ContextMenuTargetDirective {
2533
2527
  constructor(elementRef, targetService) {
2534
2528
  this.targetService = targetService;
2535
2529
  /**
@@ -2544,30 +2538,28 @@ let ContextMenuTargetDirective = class ContextMenuTargetDirective {
2544
2538
  ngOnDestroy() {
2545
2539
  this.targetService.remove(this);
2546
2540
  }
2547
- };
2548
- __decorate([
2549
- Input('kendoContextMenuTarget'),
2550
- __metadata("design:type", Object)
2551
- ], ContextMenuTargetDirective.prototype, "data", void 0);
2552
- __decorate([
2553
- HostBinding(`class.${TARGET_CLASS}`),
2554
- __metadata("design:type", Boolean)
2555
- ], ContextMenuTargetDirective.prototype, "hostClass", void 0);
2556
- ContextMenuTargetDirective = __decorate([
2557
- Directive({
2558
- selector: '[kendoContextMenuTarget]',
2559
- exportAs: 'kendoContextMenuTarget'
2560
- }),
2561
- __metadata("design:paramtypes", [ElementRef, ContextMenuTargetService])
2562
- ], ContextMenuTargetDirective);
2541
+ }
2542
+ ContextMenuTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuTargetDirective, deps: [{ token: i0.ElementRef }, { token: ContextMenuTargetService }], target: i0.ɵɵFactoryTarget.Directive });
2543
+ ContextMenuTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ContextMenuTargetDirective, selector: "[kendoContextMenuTarget]", inputs: { data: ["kendoContextMenuTarget", "data"] }, host: { properties: { "class.k-contextmenu-target": "this.hostClass" } }, exportAs: ["kendoContextMenuTarget"], ngImport: i0 });
2544
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuTargetDirective, decorators: [{
2545
+ type: Directive,
2546
+ args: [{
2547
+ selector: '[kendoContextMenuTarget]',
2548
+ exportAs: 'kendoContextMenuTarget'
2549
+ }]
2550
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ContextMenuTargetService }]; }, propDecorators: { data: [{
2551
+ type: Input,
2552
+ args: ['kendoContextMenuTarget']
2553
+ }], hostClass: [{
2554
+ type: HostBinding,
2555
+ args: [`class.${TARGET_CLASS}`]
2556
+ }] } });
2563
2557
 
2564
- var ContextMenuComponent_1;
2565
2558
  const CONTEXT_MENU = 'contextmenu';
2566
2559
  const DEFAULT_ANCHOR_ALIGN = { horizontal: 'left', vertical: 'bottom' };
2567
2560
  const DEFAULT_POPUP_ALIGN = { horizontal: 'left', vertical: 'top' };
2568
2561
  const DEFAULT_COLLISION = { horizontal: 'fit', vertical: 'flip' };
2569
2562
  const preventDefault = e => e.preventDefault();
2570
- const ɵ1$2 = bodyFactory;
2571
2563
  /**
2572
2564
  * Represents the [Kendo UI ContextMenu component for Angular]({% slug overview_contextmenu %}).
2573
2565
  *
@@ -2587,7 +2579,7 @@ const ɵ1$2 = bodyFactory;
2587
2579
  * }
2588
2580
  * ```
2589
2581
  */
2590
- let ContextMenuComponent = ContextMenuComponent_1 = class ContextMenuComponent extends MenuBase {
2582
+ class ContextMenuComponent extends MenuBase {
2591
2583
  constructor(popupService, service, ngZone, renderer) {
2592
2584
  super();
2593
2585
  this.popupService = popupService;
@@ -2874,105 +2866,67 @@ let ContextMenuComponent = ContextMenuComponent_1 = class ContextMenuComponent e
2874
2866
  get currentTargetElement() {
2875
2867
  return this.directiveTarget && this.currentTarget ? this.currentTarget.element : this.currentTarget;
2876
2868
  }
2877
- };
2878
- __decorate([
2879
- Input(),
2880
- __metadata("design:type", String)
2881
- ], ContextMenuComponent.prototype, "showOn", void 0);
2882
- __decorate([
2883
- Input(),
2884
- __metadata("design:type", Object)
2885
- ], ContextMenuComponent.prototype, "target", void 0);
2886
- __decorate([
2887
- Input(),
2888
- __metadata("design:type", String)
2889
- ], ContextMenuComponent.prototype, "filter", void 0);
2890
- __decorate([
2891
- Input(),
2892
- __metadata("design:type", Boolean)
2893
- ], ContextMenuComponent.prototype, "alignToAnchor", void 0);
2894
- __decorate([
2895
- Input(),
2896
- __metadata("design:type", Boolean)
2897
- ], ContextMenuComponent.prototype, "vertical", void 0);
2898
- __decorate([
2899
- Input(),
2900
- __metadata("design:type", Object)
2901
- ], ContextMenuComponent.prototype, "popupAnimate", void 0);
2902
- __decorate([
2903
- Input(),
2904
- __metadata("design:type", Object)
2905
- ], ContextMenuComponent.prototype, "popupAlign", void 0);
2906
- __decorate([
2907
- Input(),
2908
- __metadata("design:type", Object)
2909
- ], ContextMenuComponent.prototype, "anchorAlign", void 0);
2910
- __decorate([
2911
- Input(),
2912
- __metadata("design:type", Object)
2913
- ], ContextMenuComponent.prototype, "collision", void 0);
2914
- __decorate([
2915
- Input(),
2916
- __metadata("design:type", ViewContainerRef)
2917
- ], ContextMenuComponent.prototype, "appendTo", void 0);
2918
- __decorate([
2919
- Input(),
2920
- __metadata("design:type", String)
2921
- ], ContextMenuComponent.prototype, "ariaLabel", void 0);
2922
- __decorate([
2923
- Output(),
2924
- __metadata("design:type", EventEmitter)
2925
- ], ContextMenuComponent.prototype, "popupOpen", void 0);
2926
- __decorate([
2927
- Output(),
2928
- __metadata("design:type", EventEmitter)
2929
- ], ContextMenuComponent.prototype, "popupClose", void 0);
2930
- __decorate([
2931
- Output(),
2932
- __metadata("design:type", EventEmitter)
2933
- ], ContextMenuComponent.prototype, "select", void 0);
2934
- __decorate([
2935
- Output(),
2936
- __metadata("design:type", EventEmitter)
2937
- ], ContextMenuComponent.prototype, "open", void 0);
2938
- __decorate([
2939
- Output(),
2940
- __metadata("design:type", EventEmitter)
2941
- ], ContextMenuComponent.prototype, "close", void 0);
2942
- __decorate([
2943
- ContentChild(ContextMenuTemplateDirective, { static: false }),
2944
- __metadata("design:type", ContextMenuTemplateDirective)
2945
- ], ContextMenuComponent.prototype, "contentTemplate", void 0);
2946
- __decorate([
2947
- ViewChild('default', { static: false }),
2948
- __metadata("design:type", TemplateRef)
2949
- ], ContextMenuComponent.prototype, "defaultContentTemplate", void 0);
2950
- ContextMenuComponent = ContextMenuComponent_1 = __decorate([
2951
- Component({
2952
- exportAs: 'kendoContextMenu',
2953
- providers: [
2954
- ContextMenuService,
2955
- LocalizationService,
2956
- {
2957
- provide: L10N_PREFIX,
2958
- useValue: 'kendo.contextmenu'
2959
- },
2960
- {
2961
- provide: ItemsService,
2962
- useClass: ContextMenuItemsService
2963
- },
2964
- {
2965
- provide: MenuBase,
2966
- useExisting: forwardRef(() => ContextMenuComponent_1)
2967
- },
2968
- PopupService,
2969
- {
2970
- provide: POPUP_CONTAINER,
2971
- useFactory: ɵ1$2
2972
- }
2973
- ],
2974
- selector: 'kendo-contextmenu',
2975
- template: `
2869
+ }
2870
+ ContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuComponent, deps: [{ token: i6.PopupService }, { token: ContextMenuService }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
2871
+ ContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ContextMenuComponent, selector: "kendo-contextmenu", inputs: { showOn: "showOn", target: "target", filter: "filter", alignToAnchor: "alignToAnchor", vertical: "vertical", popupAnimate: "popupAnimate", popupAlign: "popupAlign", anchorAlign: "anchorAlign", collision: "collision", appendTo: "appendTo", ariaLabel: "ariaLabel" }, outputs: { popupOpen: "popupOpen", popupClose: "popupClose", select: "select", open: "open", close: "close" }, providers: [
2872
+ ContextMenuService,
2873
+ LocalizationService,
2874
+ {
2875
+ provide: L10N_PREFIX,
2876
+ useValue: 'kendo.contextmenu'
2877
+ },
2878
+ {
2879
+ provide: ItemsService,
2880
+ useClass: ContextMenuItemsService
2881
+ },
2882
+ {
2883
+ provide: MenuBase,
2884
+ useExisting: forwardRef(() => ContextMenuComponent)
2885
+ },
2886
+ PopupService,
2887
+ {
2888
+ provide: POPUP_CONTAINER,
2889
+ useFactory: bodyFactory
2890
+ }
2891
+ ], queries: [{ propertyName: "contentTemplate", first: true, predicate: ContextMenuTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "defaultContentTemplate", first: true, predicate: ["default"], descendants: true }], exportAs: ["kendoContextMenu"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
2892
+ <ng-template #default>
2893
+ <kendo-menu [items]="rootItems"
2894
+ [vertical]="vertical"
2895
+ [openOnClick]="openOnClick"
2896
+ [hoverDelay]="hoverDelay"
2897
+ [animate]="animate"
2898
+ [menuItemTemplate]="itemTemplate.first?.templateRef"
2899
+ [menuItemLinkTemplate]="itemLinkTemplate.first?.templateRef"
2900
+ ></kendo-menu>
2901
+ </ng-template>
2902
+ `, isInline: true, components: [{ type: MenuComponent, selector: "kendo-menu", inputs: ["menuItemTemplate", "menuItemLinkTemplate"], outputs: ["select", "open", "close"], exportAs: ["kendoMenu"] }] });
2903
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuComponent, decorators: [{
2904
+ type: Component,
2905
+ args: [{
2906
+ exportAs: 'kendoContextMenu',
2907
+ providers: [
2908
+ ContextMenuService,
2909
+ LocalizationService,
2910
+ {
2911
+ provide: L10N_PREFIX,
2912
+ useValue: 'kendo.contextmenu'
2913
+ },
2914
+ {
2915
+ provide: ItemsService,
2916
+ useClass: ContextMenuItemsService
2917
+ },
2918
+ {
2919
+ provide: MenuBase,
2920
+ useExisting: forwardRef(() => ContextMenuComponent)
2921
+ },
2922
+ PopupService,
2923
+ {
2924
+ provide: POPUP_CONTAINER,
2925
+ useFactory: bodyFactory
2926
+ }
2927
+ ],
2928
+ selector: 'kendo-contextmenu',
2929
+ template: `
2976
2930
  <ng-template #default>
2977
2931
  <kendo-menu [items]="rootItems"
2978
2932
  [vertical]="vertical"
@@ -2984,14 +2938,48 @@ ContextMenuComponent = ContextMenuComponent_1 = __decorate([
2984
2938
  ></kendo-menu>
2985
2939
  </ng-template>
2986
2940
  `
2987
- }),
2988
- __metadata("design:paramtypes", [PopupService,
2989
- ContextMenuService,
2990
- NgZone,
2991
- Renderer2])
2992
- ], ContextMenuComponent);
2941
+ }]
2942
+ }], ctorParameters: function () { return [{ type: i6.PopupService }, { type: ContextMenuService }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { showOn: [{
2943
+ type: Input
2944
+ }], target: [{
2945
+ type: Input
2946
+ }], filter: [{
2947
+ type: Input
2948
+ }], alignToAnchor: [{
2949
+ type: Input
2950
+ }], vertical: [{
2951
+ type: Input
2952
+ }], popupAnimate: [{
2953
+ type: Input
2954
+ }], popupAlign: [{
2955
+ type: Input
2956
+ }], anchorAlign: [{
2957
+ type: Input
2958
+ }], collision: [{
2959
+ type: Input
2960
+ }], appendTo: [{
2961
+ type: Input
2962
+ }], ariaLabel: [{
2963
+ type: Input
2964
+ }], popupOpen: [{
2965
+ type: Output
2966
+ }], popupClose: [{
2967
+ type: Output
2968
+ }], select: [{
2969
+ type: Output
2970
+ }], open: [{
2971
+ type: Output
2972
+ }], close: [{
2973
+ type: Output
2974
+ }], contentTemplate: [{
2975
+ type: ContentChild,
2976
+ args: [ContextMenuTemplateDirective, { static: false }]
2977
+ }], defaultContentTemplate: [{
2978
+ type: ViewChild,
2979
+ args: ['default', { static: false }]
2980
+ }] } });
2993
2981
 
2994
- const COMPONENT_DIRECTIVES$1 = [
2982
+ const COMPONENT_DIRECTIVES = [
2995
2983
  ContextMenuComponent,
2996
2984
  ContextMenuTemplateDirective,
2997
2985
  ContextMenuTargetDirective,
@@ -3029,15 +3017,25 @@ const COMPONENT_DIRECTIVES$1 = [
3029
3017
  *
3030
3018
  * ```
3031
3019
  */
3032
- let ContextMenuModule = class ContextMenuModule {
3033
- };
3034
- ContextMenuModule = __decorate([
3035
- NgModule({
3036
- declarations: [COMPONENT_DIRECTIVES$1],
3037
- exports: [COMPONENT_DIRECTIVES$1, MenuModule],
3038
- imports: [PopupModule, CommonModule, MenuModule]
3039
- })
3040
- ], ContextMenuModule);
3020
+ class ContextMenuModule {
3021
+ }
3022
+ ContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3023
+ ContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuModule, declarations: [ContextMenuComponent,
3024
+ ContextMenuTemplateDirective,
3025
+ ContextMenuTargetDirective,
3026
+ ContextMenuTargetContainerDirective], imports: [PopupModule, CommonModule, MenuModule], exports: [ContextMenuComponent,
3027
+ ContextMenuTemplateDirective,
3028
+ ContextMenuTargetDirective,
3029
+ ContextMenuTargetContainerDirective, MenuModule] });
3030
+ ContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuModule, imports: [[PopupModule, CommonModule, MenuModule], MenuModule] });
3031
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuModule, decorators: [{
3032
+ type: NgModule,
3033
+ args: [{
3034
+ declarations: [COMPONENT_DIRECTIVES],
3035
+ exports: [COMPONENT_DIRECTIVES, MenuModule],
3036
+ imports: [PopupModule, CommonModule, MenuModule]
3037
+ }]
3038
+ }] });
3041
3039
 
3042
3040
  /**
3043
3041
  * A [module]({{ site.data.urls.angular['ngmoduleapi'] }}) that includes the Menu and ContextMenu components and directives.
@@ -3061,16 +3059,21 @@ ContextMenuModule = __decorate([
3061
3059
  * }
3062
3060
  * ```
3063
3061
  */
3064
- let MenusModule = class MenusModule {
3065
- };
3066
- MenusModule = __decorate([
3067
- NgModule({
3068
- exports: [MenuModule, ContextMenuModule]
3069
- })
3070
- ], MenusModule);
3062
+ class MenusModule {
3063
+ }
3064
+ MenusModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3065
+ MenusModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenusModule, exports: [MenuModule, ContextMenuModule] });
3066
+ MenusModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenusModule, imports: [MenuModule, ContextMenuModule] });
3067
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenusModule, decorators: [{
3068
+ type: NgModule,
3069
+ args: [{
3070
+ exports: [MenuModule, ContextMenuModule]
3071
+ }]
3072
+ }] });
3071
3073
 
3072
3074
  /**
3073
3075
  * Generated bundle index. Do not edit.
3074
3076
  */
3075
3077
 
3076
- export { NODE_INDEX, ContextMenuItemsService, ContextMenuTargetContainerDirective, ContextMenuTargetDirective, ContextMenuTargetService, BindingDirectiveBase, MenuBase, PreventableEvent, ActionsService, HoverService, ItemsService, NavigationService, bodyFactory, MenuComponent, ListComponent, ItemComponent, LinkDirective, ExpandArrowDirective, MenuItemComponent, MenuEvent, MenuSelectEvent, ItemContentTemplateDirective, ItemTemplateDirective, ItemLinkTemplateDirective, HierarchyBindingDirective, FlatBindingDirective, MenuModule, ContextMenuEvent, ContextMenuSelectEvent, ContextMenuPopupEvent, ContextMenuTemplateDirective, ContextMenuComponent, ContextMenuModule, ContextMenuService, MenusModule };
3078
+ export { ContextMenuComponent, ContextMenuEvent, ContextMenuModule, ContextMenuPopupEvent, ContextMenuSelectEvent, ContextMenuService, ContextMenuTargetContainerDirective, ContextMenuTargetDirective, ContextMenuTemplateDirective, ExpandArrowDirective, FlatBindingDirective, HierarchyBindingDirective, ItemComponent, ItemContentTemplateDirective, ItemLinkTemplateDirective, ItemTemplateDirective, LinkDirective, ListComponent, MenuComponent, MenuEvent, MenuItemComponent, MenuModule, MenuSelectEvent, MenusModule };
3079
+