@progress/kendo-angular-menu 3.0.5-dev.202202251407 → 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.
- package/bundles/kendo-angular-menu.umd.js +5 -0
- package/{dist/es2015/constants.d.ts → constants.d.ts} +0 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu-event.d.ts +0 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu-items.service.d.ts +3 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu-popup-event.d.ts +0 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu-select-event.d.ts +0 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu-target-container.directive.d.ts +3 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu-target.directive.d.ts +3 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu-target.service.d.ts +3 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu-template.directive.d.ts +3 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu.component.d.ts +4 -1
- package/{dist/es2015/context-menu → context-menu}/context-menu.module.d.ts +11 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu.service.d.ts +3 -0
- package/{dist/es2015/data-binding → data-binding}/binding-directive-base.d.ts +3 -0
- package/{dist/es2015/data-binding → data-binding}/flat-binding.directive.d.ts +3 -0
- package/{dist/es2015/data-binding → data-binding}/hierachy-binding.directive.d.ts +3 -0
- package/{dist/es2015/data-binding → data-binding}/utils.d.ts +0 -0
- package/{dist/es2015/dom-queries.d.ts → dom-queries.d.ts} +0 -0
- package/{dist/es2015 → esm2015}/constants.js +0 -0
- package/{dist/es2015 → esm2015}/context-menu/context-menu-event.js +0 -0
- package/esm2015/context-menu/context-menu-items.service.js +25 -0
- package/{dist/es2015 → esm2015}/context-menu/context-menu-popup-event.js +0 -0
- package/{dist/es2015 → esm2015}/context-menu/context-menu-select-event.js +0 -0
- package/esm2015/context-menu/context-menu-target-container.directive.js +32 -0
- package/esm2015/context-menu/context-menu-target.directive.js +46 -0
- package/{dist/es2015 → esm2015}/context-menu/context-menu-target.service.js +8 -10
- package/esm2015/context-menu/context-menu-template.directive.js +32 -0
- package/{dist/es2015 → esm2015}/context-menu/context-menu.component.js +107 -113
- package/{dist/es2015 → esm2015}/context-menu/context-menu.module.js +20 -11
- package/{dist/es2015 → esm2015}/context-menu/context-menu.service.js +8 -10
- package/{dist/es2015 → esm2015}/data-binding/binding-directive-base.js +11 -0
- package/esm2015/data-binding/flat-binding.directive.js +83 -0
- package/esm2015/data-binding/hierachy-binding.directive.js +72 -0
- package/{dist/es2015 → esm2015}/data-binding/utils.js +1 -1
- package/{dist/es2015 → esm2015}/dom-queries.js +0 -3
- package/{dist/es/constants.js → esm2015/kendo-angular-menu.js} +2 -2
- package/{dist/es → esm2015}/main.js +3 -2
- package/{dist/es → esm2015}/menu-animation.interface.js +1 -0
- package/esm2015/menu-base.js +69 -0
- package/{dist/es2015 → esm2015}/menu-event.js +0 -0
- package/{dist/es2015 → esm2015}/menu-item.component.js +41 -60
- package/{dist/es → esm2015}/menu-item.interface.js +1 -0
- package/{dist/es2015 → esm2015}/menu-select-event.js +0 -0
- package/{dist/es2015 → esm2015}/menu.component.js +76 -63
- package/{dist/es2015 → esm2015}/menu.module.js +32 -13
- package/{dist/es2015 → esm2015}/menus.module.js +12 -9
- package/{dist/es2015 → esm2015}/open-on-click-settings.js +1 -1
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/{dist/es2015 → esm2015}/preventable-event.js +0 -0
- package/esm2015/rendering/arrow.directive.js +62 -0
- package/esm2015/rendering/link.directive.js +54 -0
- package/esm2015/rendering/list.component.js +546 -0
- package/{dist/es2015 → esm2015}/rendering/popup-settings.js +0 -0
- package/{dist/es2015 → esm2015}/services/actions.service.js +21 -14
- package/{dist/es2015 → esm2015}/services/hover.service.js +10 -10
- package/{dist/es2015 → esm2015}/services/items.service.js +8 -13
- package/{dist/es2015 → esm2015}/services/navigation.service.js +12 -15
- package/{dist/es2015 → esm2015}/templates/item-content-template.directive.js +14 -12
- package/{dist/es2015 → esm2015}/templates/item-link-template.directive.js +14 -12
- package/{dist/es2015 → esm2015}/templates/item-template.directive.js +14 -12
- package/{dist/es2015 → esm2015}/utils.js +0 -0
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-menu.js} +1116 -1113
- package/kendo-angular-menu.d.ts +9 -0
- package/{dist/es2015/main.d.ts → main.d.ts} +3 -2
- package/{dist/es2015/menu-animation.interface.d.ts → menu-animation.interface.d.ts} +0 -0
- package/{dist/es2015/menu-base.d.ts → menu-base.d.ts} +4 -1
- package/{dist/es2015/menu-event.d.ts → menu-event.d.ts} +0 -0
- package/{dist/es2015/menu-item.component.d.ts → menu-item.component.d.ts} +7 -4
- package/{dist/es2015/menu-item.interface.d.ts → menu-item.interface.d.ts} +0 -0
- package/{dist/es2015/menu-select-event.d.ts → menu-select-event.d.ts} +0 -0
- package/{dist/es2015/menu.component.d.ts → menu.component.d.ts} +7 -4
- package/menu.module.d.ts +54 -0
- package/{dist/es2015/menus.module.d.ts → menus.module.d.ts} +6 -0
- package/{dist/es2015/open-on-click-settings.d.ts → open-on-click-settings.d.ts} +0 -0
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +31 -106
- package/{dist/es2015/preventable-event.d.ts → preventable-event.d.ts} +0 -0
- package/{dist/es2015/rendering → rendering}/arrow.directive.d.ts +6 -3
- package/{dist/es2015/rendering → rendering}/link.directive.d.ts +4 -1
- package/rendering/list.component.d.ts +104 -0
- package/{dist/es2015/rendering → rendering}/popup-settings.d.ts +0 -0
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/{dist/es2015/services → services}/actions.service.d.ts +24 -1
- package/{dist/es2015/services → services}/hover.service.d.ts +7 -2
- package/{dist/es2015/services → services}/items.service.d.ts +4 -1
- package/{dist/es2015/services → services}/navigation.service.d.ts +6 -3
- package/{dist/es2015/templates → templates}/item-content-template.directive.d.ts +3 -0
- package/{dist/es2015/templates → templates}/item-link-template.directive.d.ts +3 -0
- package/{dist/es2015/templates → templates}/item-template.directive.d.ts +3 -0
- package/{dist/es2015/utils.d.ts → utils.d.ts} +1 -1
- package/dist/cdn/js/kendo-angular-menu.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/context-menu/context-menu-event.js +0 -13
- package/dist/es/context-menu/context-menu-items.service.js +0 -26
- package/dist/es/context-menu/context-menu-popup-event.js +0 -17
- package/dist/es/context-menu/context-menu-select-event.js +0 -17
- package/dist/es/context-menu/context-menu-target-container.directive.js +0 -31
- package/dist/es/context-menu/context-menu-target.directive.js +0 -48
- package/dist/es/context-menu/context-menu-target.service.js +0 -29
- package/dist/es/context-menu/context-menu-template.directive.js +0 -31
- package/dist/es/context-menu/context-menu.component.js +0 -456
- package/dist/es/context-menu/context-menu.module.js +0 -64
- package/dist/es/context-menu/context-menu.service.js +0 -30
- package/dist/es/data-binding/binding-directive-base.js +0 -32
- package/dist/es/data-binding/flat-binding.directive.js +0 -104
- package/dist/es/data-binding/hierachy-binding.directive.js +0 -94
- package/dist/es/data-binding/utils.js +0 -32
- package/dist/es/dom-queries.js +0 -107
- package/dist/es/index.js +0 -21
- package/dist/es/menu-base.js +0 -79
- package/dist/es/menu-event.js +0 -17
- package/dist/es/menu-item.component.js +0 -165
- package/dist/es/menu-select-event.js +0 -17
- package/dist/es/menu.component.js +0 -256
- package/dist/es/menu.module.js +0 -79
- package/dist/es/menus.module.js +0 -41
- package/dist/es/open-on-click-settings.js +0 -13
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/preventable-event.js +0 -36
- package/dist/es/rendering/arrow.directive.js +0 -81
- package/dist/es/rendering/item.component.js +0 -337
- package/dist/es/rendering/link.directive.js +0 -62
- package/dist/es/rendering/list.component.js +0 -219
- package/dist/es/rendering/popup-settings.js +0 -66
- package/dist/es/services/actions.service.js +0 -178
- package/dist/es/services/hover.service.js +0 -136
- package/dist/es/services/items.service.js +0 -140
- package/dist/es/services/navigation.service.js +0 -274
- package/dist/es/templates/item-content-template.directive.js +0 -50
- package/dist/es/templates/item-link-template.directive.js +0 -52
- package/dist/es/templates/item-template.directive.js +0 -51
- package/dist/es/utils.js +0 -18
- package/dist/es2015/context-menu/context-menu-items.service.js +0 -25
- package/dist/es2015/context-menu/context-menu-target-container.directive.js +0 -30
- package/dist/es2015/context-menu/context-menu-target.directive.js +0 -47
- package/dist/es2015/context-menu/context-menu-template.directive.js +0 -30
- package/dist/es2015/data-binding/flat-binding.directive.js +0 -101
- package/dist/es2015/data-binding/hierachy-binding.directive.js +0 -90
- package/dist/es2015/index.d.ts +0 -21
- package/dist/es2015/index.js +0 -21
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/main.js +0 -26
- package/dist/es2015/menu-animation.interface.js +0 -4
- package/dist/es2015/menu-base.js +0 -73
- package/dist/es2015/menu-item.interface.js +0 -4
- package/dist/es2015/menu.module.d.ts +0 -38
- package/dist/es2015/rendering/arrow.directive.js +0 -68
- package/dist/es2015/rendering/item.component.d.ts +0 -64
- package/dist/es2015/rendering/item.component.js +0 -327
- package/dist/es2015/rendering/link.directive.js +0 -57
- package/dist/es2015/rendering/list.component.d.ts +0 -41
- package/dist/es2015/rendering/list.component.js +0 -233
- package/dist/fesm5/index.js +0 -3222
- package/dist/npm/constants.js +0 -10
- package/dist/npm/context-menu/context-menu-event.js +0 -15
- package/dist/npm/context-menu/context-menu-items.service.js +0 -28
- package/dist/npm/context-menu/context-menu-popup-event.js +0 -19
- package/dist/npm/context-menu/context-menu-select-event.js +0 -19
- package/dist/npm/context-menu/context-menu-target-container.directive.js +0 -33
- package/dist/npm/context-menu/context-menu-target.directive.js +0 -50
- package/dist/npm/context-menu/context-menu-target.service.js +0 -31
- package/dist/npm/context-menu/context-menu-template.directive.js +0 -33
- package/dist/npm/context-menu/context-menu.component.js +0 -459
- package/dist/npm/context-menu/context-menu.module.js +0 -66
- package/dist/npm/context-menu/context-menu.service.js +0 -32
- package/dist/npm/data-binding/binding-directive-base.js +0 -34
- package/dist/npm/data-binding/flat-binding.directive.js +0 -106
- package/dist/npm/data-binding/hierachy-binding.directive.js +0 -96
- package/dist/npm/data-binding/utils.js +0 -34
- package/dist/npm/dom-queries.js +0 -110
- package/dist/npm/index.js +0 -37
- package/dist/npm/main.js +0 -50
- package/dist/npm/menu-animation.interface.js +0 -6
- package/dist/npm/menu-base.js +0 -81
- package/dist/npm/menu-event.js +0 -19
- package/dist/npm/menu-item.component.js +0 -167
- package/dist/npm/menu-item.interface.js +0 -6
- package/dist/npm/menu-select-event.js +0 -19
- package/dist/npm/menu.component.js +0 -258
- package/dist/npm/menu.module.js +0 -81
- package/dist/npm/menus.module.js +0 -43
- package/dist/npm/open-on-click-settings.js +0 -15
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/preventable-event.js +0 -38
- package/dist/npm/rendering/arrow.directive.js +0 -83
- package/dist/npm/rendering/item.component.js +0 -339
- package/dist/npm/rendering/link.directive.js +0 -64
- package/dist/npm/rendering/list.component.js +0 -221
- package/dist/npm/rendering/popup-settings.js +0 -68
- package/dist/npm/services/actions.service.js +0 -180
- package/dist/npm/services/hover.service.js +0 -138
- package/dist/npm/services/items.service.js +0 -143
- package/dist/npm/services/navigation.service.js +0 -276
- package/dist/npm/templates/item-content-template.directive.js +0 -52
- package/dist/npm/templates/item-link-template.directive.js +0 -54
- package/dist/npm/templates/item-template.directive.js +0 -53
- package/dist/npm/utils.js +0 -20
- 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
|
|
6
|
-
import { Injectable, NgZone,
|
|
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:
|
|
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
|
-
|
|
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 =
|
|
148
|
-
|
|
149
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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 =
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
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
|
-
|
|
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 =
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
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
|
-
|
|
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 =
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
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
|
-
/*
|
|
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
|
-
|
|
829
|
+
class ItemTemplateDirective {
|
|
879
830
|
constructor(templateRef) {
|
|
880
831
|
this.templateRef = templateRef;
|
|
881
832
|
}
|
|
882
|
-
}
|
|
883
|
-
ItemTemplateDirective =
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
]
|
|
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
|
-
|
|
877
|
+
class ItemLinkTemplateDirective {
|
|
924
878
|
constructor(templateRef) {
|
|
925
879
|
this.templateRef = templateRef;
|
|
926
880
|
}
|
|
927
|
-
}
|
|
928
|
-
ItemLinkTemplateDirective =
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
]
|
|
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
|
-
|
|
923
|
+
class ItemContentTemplateDirective {
|
|
967
924
|
constructor(templateRef) {
|
|
968
925
|
this.templateRef = templateRef;
|
|
969
926
|
}
|
|
970
|
-
}
|
|
971
|
-
ItemContentTemplateDirective =
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
]
|
|
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
|
-
|
|
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
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
]
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
],
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
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
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
]
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
]
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
]
|
|
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
|
-
*
|
|
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
|
-
|
|
1198
|
-
constructor(
|
|
1199
|
-
|
|
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.
|
|
1208
|
-
|
|
1209
|
-
|
|
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
|
-
|
|
1242
|
-
return this.
|
|
1231
|
+
hierarchyIndex(index) {
|
|
1232
|
+
return this.itemsService.itemIndex(this.index, index);
|
|
1243
1233
|
}
|
|
1244
|
-
|
|
1245
|
-
|
|
1234
|
+
ngOnInit() {
|
|
1235
|
+
this.itemsService.addList(this);
|
|
1236
|
+
this.initDomEvents();
|
|
1246
1237
|
}
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
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
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
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 \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
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
horizontal: 'fit'
|
|
1634
|
-
};
|
|
1635
|
-
const HORIZONTAL_COLLISION = {
|
|
1636
|
-
vertical: 'fit',
|
|
1637
|
-
horizontal: 'flip'
|
|
1638
|
-
};
|
|
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
|
+
}] } });
|
|
1639
1413
|
/**
|
|
1640
1414
|
* @hidden
|
|
1641
1415
|
*/
|
|
1642
|
-
|
|
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
|
-
|
|
1686
|
-
/**
|
|
1687
|
-
* @hidden
|
|
1688
|
-
*/
|
|
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
|
-
|
|
1818
|
-
if (!this.
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
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
|
-
|
|
1843
|
-
if (
|
|
1844
|
-
this.
|
|
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
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
link = this.element.nativeElement.querySelector('a.k-menu-link');
|
|
1878
|
+
contextKeyDown(e) {
|
|
1879
|
+
if (!this.itemsService.hasItems) {
|
|
1880
|
+
return;
|
|
1858
1881
|
}
|
|
1859
|
-
|
|
1860
|
-
|
|
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 (
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
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
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
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
|
-
{{ item.text }}
|
|
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
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
],
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
],
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
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
|
-
//
|
|
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
|
-
/*
|
|
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
|
-
|
|
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
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
]
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
],
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
],
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
],
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
],
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
]
|
|
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
|
-
/*
|
|
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
|
-
|
|
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
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
]
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
],
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
],
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
],
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
],
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
],
|
|
2338
|
-
|
|
2339
|
-
|
|
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
|
-
|
|
2407
|
-
}
|
|
2408
|
-
MenuModule =
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
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
|
-
|
|
2434
|
+
class ContextMenuTemplateDirective {
|
|
2446
2435
|
constructor(templateRef) {
|
|
2447
2436
|
this.templateRef = templateRef;
|
|
2448
2437
|
}
|
|
2449
|
-
}
|
|
2450
|
-
ContextMenuTemplateDirective =
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
]
|
|
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
|
-
|
|
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 =
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
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
|
-
|
|
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 =
|
|
2498
|
-
|
|
2499
|
-
|
|
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
|
-
|
|
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 =
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
]
|
|
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
|
-
|
|
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
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
]
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
]
|
|
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
|
-
|
|
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
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
]
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
]
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
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
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
],
|
|
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
|
|
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
|
-
|
|
3033
|
-
}
|
|
3034
|
-
ContextMenuModule =
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
imports: [PopupModule, CommonModule, MenuModule]
|
|
3039
|
-
|
|
3040
|
-
|
|
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
|
-
|
|
3065
|
-
}
|
|
3066
|
-
MenusModule =
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
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 {
|
|
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
|
+
|