@progress/kendo-angular-menu 24.2.2 → 25.0.0-develop.1
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/fesm2022/progress-kendo-angular-menu.mjs +86 -86
- package/index.d.ts +1421 -30
- package/package-metadata.mjs +2 -2
- package/package.json +11 -11
- package/constants.d.ts +0 -8
- package/context-menu/context-menu-event.d.ts +0 -26
- package/context-menu/context-menu-items.service.d.ts +0 -16
- package/context-menu/context-menu-popup-event.d.ts +0 -27
- package/context-menu/context-menu-select-event.d.ts +0 -14
- package/context-menu/context-menu-target-container.directive.d.ts +0 -34
- package/context-menu/context-menu-target.directive.d.ts +0 -39
- package/context-menu/context-menu-target.service.d.ts +0 -16
- package/context-menu/context-menu-template.directive.d.ts +0 -28
- package/context-menu/context-menu.component.d.ts +0 -171
- package/context-menu/context-menu.module.d.ts +0 -55
- package/context-menu/context-menu.service.d.ts +0 -19
- package/data-binding/binding-directive-base.d.ts +0 -24
- package/data-binding/flat-binding.directive.d.ts +0 -70
- package/data-binding/hierachy-binding.directive.d.ts +0 -67
- package/data-binding/utils.d.ts +0 -12
- package/directives.d.ts +0 -29
- package/dom-queries.d.ts +0 -44
- package/menu-animation.interface.d.ts +0 -21
- package/menu-base.d.ts +0 -79
- package/menu-event.d.ts +0 -23
- package/menu-item.component.d.ts +0 -97
- package/menu-item.interface.d.ts +0 -65
- package/menu-select-event.d.ts +0 -14
- package/menu.component.d.ts +0 -109
- package/menu.module.d.ts +0 -51
- package/menus.module.d.ts +0 -45
- package/open-on-click-settings.d.ts +0 -24
- package/package-metadata.d.ts +0 -9
- package/preventable-event.d.ts +0 -28
- package/rendering/arrow.component.d.ts +0 -41
- package/rendering/link.directive.d.ts +0 -34
- package/rendering/list.component.d.ts +0 -127
- package/rendering/popup-settings.d.ts +0 -84
- package/services/actions.service.d.ts +0 -54
- package/services/hover.service.d.ts +0 -33
- package/services/items.service.d.ts +0 -37
- package/services/navigation.service.d.ts +0 -47
- package/size.d.ts +0 -8
- package/templates/item-content-template.directive.d.ts +0 -42
- package/templates/item-link-template.directive.d.ts +0 -46
- package/templates/item-template.directive.d.ts +0 -43
- package/utils.d.ts +0 -31
package/index.d.ts
CHANGED
|
@@ -2,33 +2,1424 @@
|
|
|
2
2
|
* Copyright © 2026 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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { NgZone, EventEmitter, TemplateRef, QueryList, TrackByFunction, OnChanges, AfterViewChecked, ViewContainerRef, Renderer2, OnInit, AfterViewInit, OnDestroy, ElementRef, ChangeDetectorRef, SimpleChanges } from '@angular/core';
|
|
7
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
+
import * as _progress_kendo_angular_icons from '@progress/kendo-angular-icons';
|
|
9
|
+
import { SVGIcon } from '@progress/kendo-angular-icons';
|
|
10
|
+
import { SVGIcon as SVGIcon$1 } from '@progress/kendo-svg-icons';
|
|
11
|
+
import { Margin, PopupService, PopupAnimation, Align, Collision, Offset } from '@progress/kendo-angular-popup';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
declare class ItemsService {
|
|
17
|
+
items: any;
|
|
18
|
+
lists: any[];
|
|
19
|
+
private idPrefix;
|
|
20
|
+
get hasItems(): boolean;
|
|
21
|
+
childId(index: string): string;
|
|
22
|
+
itemIndex(parentIndex: string, index: any): string;
|
|
23
|
+
get(index: string): any;
|
|
24
|
+
add(item: any): any;
|
|
25
|
+
remove(item: any): any;
|
|
26
|
+
addList(list: any): any;
|
|
27
|
+
removeList(list: any): any;
|
|
28
|
+
containsList(element: any): boolean;
|
|
29
|
+
siblings(item: any): any[];
|
|
30
|
+
otherSiblings(item: any): any[];
|
|
31
|
+
children(item: any): any[];
|
|
32
|
+
parent(item: any): any;
|
|
33
|
+
root(item: any): any;
|
|
34
|
+
indices(index: string): string[];
|
|
35
|
+
filter(predicate: any): any[];
|
|
36
|
+
previous(item: any): any;
|
|
37
|
+
next(item: any): any;
|
|
38
|
+
hasParent(item: any, parent: any): boolean;
|
|
39
|
+
areSiblings(item1: any, item2: any): boolean;
|
|
40
|
+
forEach(callback: any): void;
|
|
41
|
+
private parentIndex;
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ItemsService, never>;
|
|
43
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ItemsService>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @hidden
|
|
48
|
+
*/
|
|
49
|
+
declare class ActionsService {
|
|
50
|
+
private ngZone;
|
|
51
|
+
private items;
|
|
52
|
+
owner: any;
|
|
53
|
+
actions: any[];
|
|
54
|
+
constructor(ngZone: NgZone, items: ItemsService);
|
|
55
|
+
open(item: any, finished?: any): void;
|
|
56
|
+
close(item: any): void;
|
|
57
|
+
closeItem(item: any): void;
|
|
58
|
+
closeToRoot(item: any): void;
|
|
59
|
+
closeOthers(item: any): void;
|
|
60
|
+
closeAll(): void;
|
|
61
|
+
select(item: any, domEvent: any, prevented?: any, finished?: any): void;
|
|
62
|
+
emit(name: string, item: any, domEvent?: any): boolean;
|
|
63
|
+
get hasPending(): boolean;
|
|
64
|
+
execute(toExecute?: any[]): void;
|
|
65
|
+
clear(): any[];
|
|
66
|
+
private executeActions;
|
|
67
|
+
private requiresZone;
|
|
68
|
+
private closeChildren;
|
|
69
|
+
private closeItems;
|
|
70
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ActionsService, never>;
|
|
71
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ActionsService>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @hidden
|
|
76
|
+
*/
|
|
77
|
+
declare class NavigationService {
|
|
78
|
+
private items;
|
|
79
|
+
private actions;
|
|
80
|
+
private localization;
|
|
81
|
+
private ngZone;
|
|
82
|
+
vertical: boolean;
|
|
83
|
+
activeIndex: string;
|
|
84
|
+
focusedIdx: string;
|
|
85
|
+
get focusedItem(): any;
|
|
86
|
+
private get activeItem();
|
|
87
|
+
private get handlers();
|
|
88
|
+
constructor(items: ItemsService, actions: ActionsService, localization: LocalizationService, ngZone: NgZone);
|
|
89
|
+
focus(item: any): void;
|
|
90
|
+
setFocus(item: any): void;
|
|
91
|
+
focusLeave(): void;
|
|
92
|
+
updateActive(): void;
|
|
93
|
+
keydown(e: KeyboardEvent): void;
|
|
94
|
+
focusIndex(index?: string): void;
|
|
95
|
+
focusFirst(): void;
|
|
96
|
+
focusLast(): void;
|
|
97
|
+
search(current: any, key: string): void;
|
|
98
|
+
down(current: any): void;
|
|
99
|
+
up(current: any): void;
|
|
100
|
+
left(current: any): void;
|
|
101
|
+
right(current: any): void;
|
|
102
|
+
home(current: any): void;
|
|
103
|
+
end(current: any): void;
|
|
104
|
+
enter(current: any, domEvent: any): void;
|
|
105
|
+
esc(current: any): void;
|
|
106
|
+
tab(current: any): void;
|
|
107
|
+
private focusChild;
|
|
108
|
+
private setActive;
|
|
109
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationService, never>;
|
|
110
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NavigationService>;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @hidden
|
|
115
|
+
*/
|
|
116
|
+
declare class HoverService {
|
|
117
|
+
private actions;
|
|
118
|
+
private items;
|
|
119
|
+
delay: number;
|
|
120
|
+
get openOnOver(): boolean;
|
|
121
|
+
set openOnOver(value: boolean);
|
|
122
|
+
private _openOnOver;
|
|
123
|
+
private hoveredIdx;
|
|
124
|
+
private get hovered();
|
|
125
|
+
private set hovered(value);
|
|
126
|
+
private scheduled;
|
|
127
|
+
constructor(actions: ActionsService, items: ItemsService);
|
|
128
|
+
ngOnDestroy(): void;
|
|
129
|
+
over(item: any): void;
|
|
130
|
+
leave(disableOpenOnOver?: boolean): void;
|
|
131
|
+
closeCurrent(): void;
|
|
132
|
+
private scheduleActions;
|
|
133
|
+
private scheduleDisableOpenOnOver;
|
|
134
|
+
private removeScheduled;
|
|
135
|
+
private cancelActions;
|
|
136
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HoverService, never>;
|
|
137
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HoverService>;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @hidden
|
|
142
|
+
*/
|
|
143
|
+
declare class PreventableEvent {
|
|
144
|
+
private prevented;
|
|
145
|
+
/**
|
|
146
|
+
* Prevents the default action for a specified event.
|
|
147
|
+
* In this way, the source component suppresses
|
|
148
|
+
* the built-in behavior that follows the event.
|
|
149
|
+
*/
|
|
150
|
+
preventDefault(): void;
|
|
151
|
+
/**
|
|
152
|
+
* Returns `true` if the event was prevented
|
|
153
|
+
* by any of its subscribers.
|
|
154
|
+
*
|
|
155
|
+
* @returns `true` if the default action was prevented.
|
|
156
|
+
* Otherwise, returns `false`.
|
|
157
|
+
*/
|
|
158
|
+
isDefaultPrevented(): boolean;
|
|
159
|
+
/**
|
|
160
|
+
* @hidden
|
|
161
|
+
*/
|
|
162
|
+
constructor(args?: any);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Represents the arguments for the `open` and `close` events of the Menu.
|
|
167
|
+
*/
|
|
168
|
+
declare class MenuEvent extends PreventableEvent {
|
|
169
|
+
/**
|
|
170
|
+
* Specifies the MenuComponent that triggered the event.
|
|
171
|
+
*/
|
|
172
|
+
sender: MenuComponent;
|
|
173
|
+
/**
|
|
174
|
+
* Specifies the item data of the event.
|
|
175
|
+
*/
|
|
176
|
+
item: any;
|
|
177
|
+
/**
|
|
178
|
+
* Specifies the item index of the event.
|
|
179
|
+
*/
|
|
180
|
+
index: string;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Arguments for the `select` event of the Menu.
|
|
185
|
+
*/
|
|
186
|
+
declare class MenuSelectEvent extends MenuEvent {
|
|
187
|
+
/**
|
|
188
|
+
* The DOM event that triggered the selection.
|
|
189
|
+
*/
|
|
190
|
+
originalEvent: any;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* @hidden
|
|
195
|
+
*/
|
|
196
|
+
declare class ContextMenuService {
|
|
197
|
+
keydown: EventEmitter<any>;
|
|
198
|
+
owner: any;
|
|
199
|
+
items: any;
|
|
200
|
+
emit(name: string, args: any): void;
|
|
201
|
+
hasObservers(name: string): boolean;
|
|
202
|
+
leaveMenu(e: any): boolean;
|
|
203
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContextMenuService, never>;
|
|
204
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ContextMenuService>;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Represents a template for the Menu items ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/templates)). To define a template
|
|
209
|
+
* for an item, nest an `<ng-template>` tag with the `kendoMenuItemTemplate` directive inside a `<kendo-menu-item>`
|
|
210
|
+
* component. To define a template for all Menu items, nest the template inside the `<kendo-menu>` component.
|
|
211
|
+
*
|
|
212
|
+
* The available fields in the template context are:
|
|
213
|
+
* - `item`—The item data.
|
|
214
|
+
* - `index`—The item index.
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* ```ts-preview
|
|
218
|
+
*
|
|
219
|
+
* _@Component({
|
|
220
|
+
* selector: 'my-app',
|
|
221
|
+
* template: `
|
|
222
|
+
* <kendo-menu>
|
|
223
|
+
* <kendo-menu-item text="item2">
|
|
224
|
+
* <ng-template kendoMenuItemTemplate let-item="item" let-index="index">
|
|
225
|
+
* <div style="padding: 10px;">
|
|
226
|
+
* My Template for: {{ item.text }} at index: {{ index }}
|
|
227
|
+
* </div>
|
|
228
|
+
* </ng-template>
|
|
229
|
+
* </kendo-menu-item>
|
|
230
|
+
* </kendo-menu>
|
|
231
|
+
* `
|
|
232
|
+
* })
|
|
233
|
+
*
|
|
234
|
+
* class AppComponent {
|
|
235
|
+
* }
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
declare class ItemTemplateDirective {
|
|
239
|
+
templateRef: TemplateRef<any>;
|
|
240
|
+
constructor(templateRef: TemplateRef<any>);
|
|
241
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ItemTemplateDirective, [{ optional: true; }]>;
|
|
242
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ItemTemplateDirective, "[kendoMenuItemTemplate]", never, {}, {}, never, never, true, never>;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Represents a template for the links of the Menu items ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/templates)). To define a template
|
|
247
|
+
* for an item, nest an `<ng-template>` tag with the `kendoMenuItemLinkTemplate` directive inside a `<kendo-menu-item>`
|
|
248
|
+
* component. To define a template for all Menu items, nest the template inside the `<kendo-menu>` component.
|
|
249
|
+
*
|
|
250
|
+
* The available fields in the template context are:
|
|
251
|
+
* - `item`—The item data.
|
|
252
|
+
* - `index`—The item index.
|
|
253
|
+
*
|
|
254
|
+
* @example
|
|
255
|
+
* ```ts-preview
|
|
256
|
+
*
|
|
257
|
+
* _@Component({
|
|
258
|
+
* selector: 'my-app',
|
|
259
|
+
* template: `
|
|
260
|
+
* <kendo-menu>
|
|
261
|
+
* <kendo-menu-item text="item2">
|
|
262
|
+
* <ng-template kendoMenuItemLinkTemplate let-item="item" let-index="index">
|
|
263
|
+
* <span [kendoMenuItemLink]="index">
|
|
264
|
+
* {{ item.text }}
|
|
265
|
+
* @if (item.items && item.items.length) {
|
|
266
|
+
* <span [kendoMenuExpandArrow]="index"></span>
|
|
267
|
+
* }
|
|
268
|
+
* </span>
|
|
269
|
+
* </ng-template>
|
|
270
|
+
* </kendo-menu-item>
|
|
271
|
+
* </kendo-menu>
|
|
272
|
+
* `
|
|
273
|
+
* })
|
|
274
|
+
*
|
|
275
|
+
* class AppComponent {
|
|
276
|
+
* }
|
|
277
|
+
* ```
|
|
278
|
+
*/
|
|
279
|
+
declare class ItemLinkTemplateDirective {
|
|
280
|
+
templateRef: TemplateRef<any>;
|
|
281
|
+
constructor(templateRef: TemplateRef<any>);
|
|
282
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ItemLinkTemplateDirective, [{ optional: true; }]>;
|
|
283
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ItemLinkTemplateDirective, "[kendoMenuItemLinkTemplate]", never, {}, {}, never, never, true, never>;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Represents a template for the content of the Menu items ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/templates)). To define the template,
|
|
288
|
+
* nest an `<ng-template>` tag with the `kendoMenuItemContentTemplate` directive inside a `<kendo-menu-item>` component.
|
|
289
|
+
*
|
|
290
|
+
* The available fields in the template context are:
|
|
291
|
+
* - `item`—The item data.
|
|
292
|
+
* - `index`—The item index.
|
|
293
|
+
*
|
|
294
|
+
* @example
|
|
295
|
+
* ```ts-preview
|
|
296
|
+
*
|
|
297
|
+
* _@Component({
|
|
298
|
+
* selector: 'my-app',
|
|
299
|
+
* template: `
|
|
300
|
+
* <kendo-menu>
|
|
301
|
+
* <kendo-menu-item text="item2">
|
|
302
|
+
* <ng-template kendoMenuItemContentTemplate let-item="item" let-index="index">
|
|
303
|
+
* <div style="padding: 10px;">
|
|
304
|
+
* My Content Template for: {{ item.text }} at index: {{ index }}
|
|
305
|
+
* </div>
|
|
306
|
+
* </ng-template>
|
|
307
|
+
* </kendo-menu-item>
|
|
308
|
+
* </kendo-menu>
|
|
309
|
+
* `
|
|
310
|
+
* })
|
|
311
|
+
*
|
|
312
|
+
* class AppComponent {
|
|
313
|
+
* }
|
|
314
|
+
* ```
|
|
315
|
+
*/
|
|
316
|
+
declare class ItemContentTemplateDirective {
|
|
317
|
+
templateRef: TemplateRef<any>;
|
|
318
|
+
constructor(templateRef: TemplateRef<any>);
|
|
319
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ItemContentTemplateDirective, [{ optional: true; }]>;
|
|
320
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ItemContentTemplateDirective, "[kendoMenuItemContentTemplate]", never, {}, {}, never, never, true, never>;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Represents an interface for the Menu items.
|
|
325
|
+
*/
|
|
326
|
+
interface MenuItem {
|
|
327
|
+
/**
|
|
328
|
+
* Specifies the item text ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/items#showing-text)).
|
|
329
|
+
*/
|
|
330
|
+
text?: string;
|
|
331
|
+
/**
|
|
332
|
+
* Specifies a URL which is rendered as a `href` attribute on the item link
|
|
333
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/items#rendering-urls)).
|
|
334
|
+
*/
|
|
335
|
+
url?: string;
|
|
336
|
+
/**
|
|
337
|
+
* Specifies the name of the [font icon](https://www.telerik.com/kendo-angular-ui/components/styling/icons#icons-list) that will
|
|
338
|
+
* be rendered for the item ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/items#displaying-font-icons)).
|
|
339
|
+
*/
|
|
340
|
+
icon?: string;
|
|
341
|
+
/**
|
|
342
|
+
* Defines an [`SVGIcon`](https://www.telerik.com/kendo-angular-ui/components/icons/api/svgicon) that will be
|
|
343
|
+
* rendered for the item using a [`KendoSVGIcon`](https://www.telerik.com/kendo-angular-ui/components/icons/api/svgiconcomponent) component ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/items#displaying-svg-icons)).
|
|
344
|
+
*/
|
|
345
|
+
svgIcon?: SVGIcon;
|
|
346
|
+
/**
|
|
347
|
+
* Specifies if the item is disabled ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/items#disabling-items)).
|
|
348
|
+
*/
|
|
349
|
+
disabled?: boolean;
|
|
350
|
+
/**
|
|
351
|
+
* Specifies the CSS classes that will be rendered on the item element ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/items#adding-styles-and-classes)).
|
|
352
|
+
* Supports the type of values that are supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
|
|
353
|
+
*/
|
|
354
|
+
cssClass?: any;
|
|
355
|
+
/**
|
|
356
|
+
* Specifies the CSS styles that will be rendered on the item element ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/items#adding-styles-and-classes)).
|
|
357
|
+
* Supports the type of values that are supported by [`ngStyle`](link:site.data.urls.angular['ngstyleapi']).
|
|
358
|
+
*/
|
|
359
|
+
cssStyle?: any;
|
|
360
|
+
/**
|
|
361
|
+
* Specifies a template for the item.
|
|
362
|
+
*/
|
|
363
|
+
template?: TemplateRef<any>;
|
|
364
|
+
/**
|
|
365
|
+
* Specifies a template for the item content.
|
|
366
|
+
*/
|
|
367
|
+
contentTemplate?: TemplateRef<any>;
|
|
368
|
+
/**
|
|
369
|
+
* Specifies the children of the item ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/data-binding)).
|
|
370
|
+
*/
|
|
371
|
+
items?: any[];
|
|
372
|
+
/**
|
|
373
|
+
* Represents the additional data that is associated with the Menu item.
|
|
374
|
+
*/
|
|
375
|
+
data?: any;
|
|
376
|
+
/**
|
|
377
|
+
* Specifies if this is a separator item.
|
|
378
|
+
* If set to true only the `cssClass` and `cssStyle` fields are rendered.
|
|
379
|
+
*/
|
|
380
|
+
separator?: boolean;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Represents a component that can be used to specify the Menu items
|
|
385
|
+
* ([more information and examples](https://www.telerik.com/kendo-angular-ui/components/menus/menu/items)).
|
|
386
|
+
*
|
|
387
|
+
* @example
|
|
388
|
+
* ```html
|
|
389
|
+
* <kendo-menu>
|
|
390
|
+
* <kendo-menu-item text="item1">
|
|
391
|
+
* <kendo-menu-item text="item1.1" url="https://example.com">
|
|
392
|
+
* </kendo-menu-item>
|
|
393
|
+
* <kendo-menu-item text="item1.2" [disabled]="true">
|
|
394
|
+
* </kendo-menu-item>
|
|
395
|
+
* </kendo-menu-item>
|
|
396
|
+
* <kendo-menu-item text="item2">
|
|
397
|
+
* <ng-template kendoMenuItemContentTemplate let-item="item">
|
|
398
|
+
* <div style="padding: 10px;">
|
|
399
|
+
* My Content Template: {{ item.text }}
|
|
400
|
+
* </div>
|
|
401
|
+
* </ng-template>
|
|
402
|
+
* <ng-template kendoMenuItemTemplate let-item="item">
|
|
403
|
+
* <div style="padding: 10px;">
|
|
404
|
+
* My Template: {{ item.text }}
|
|
405
|
+
* </div>
|
|
406
|
+
* </ng-template>
|
|
407
|
+
* </kendo-menu-item>
|
|
408
|
+
* <kendo-menu-item text="item3">
|
|
409
|
+
* <ng-template kendoMenuItemLinkTemplate let-item="item" let-index="index">
|
|
410
|
+
* <span [kendoMenuItemLink]="index">
|
|
411
|
+
* {{ item.text }}
|
|
412
|
+
* @if (item.items && item.items.length) {
|
|
413
|
+
* <span [kendoMenuExpandArrow]="index"></span>
|
|
414
|
+
* }
|
|
415
|
+
* </span>
|
|
416
|
+
* </ng-template>
|
|
417
|
+
* </kendo-menu-item>
|
|
418
|
+
* </kendo-menu>
|
|
419
|
+
* ```
|
|
420
|
+
*
|
|
421
|
+
* @remarks
|
|
422
|
+
* Supported children components are: {@link MenuItemComponent}.
|
|
423
|
+
*/
|
|
424
|
+
declare class MenuItemComponent implements MenuItem {
|
|
425
|
+
text: string;
|
|
426
|
+
url: string;
|
|
427
|
+
disabled: boolean;
|
|
428
|
+
cssClass: any;
|
|
429
|
+
cssStyle: any;
|
|
430
|
+
icon: string;
|
|
431
|
+
svgIcon: SVGIcon$1;
|
|
432
|
+
data: any;
|
|
433
|
+
separator: boolean;
|
|
434
|
+
/**
|
|
435
|
+
* @hidden
|
|
436
|
+
*/
|
|
437
|
+
itemTemplate: QueryList<ItemTemplateDirective>;
|
|
438
|
+
/**
|
|
439
|
+
* @hidden
|
|
440
|
+
*/
|
|
441
|
+
itemLinkTemplate: QueryList<ItemLinkTemplateDirective>;
|
|
442
|
+
/**
|
|
443
|
+
* @hidden
|
|
444
|
+
*/
|
|
445
|
+
itemContentTemplate: QueryList<ItemContentTemplateDirective>;
|
|
446
|
+
/**
|
|
447
|
+
* @hidden
|
|
448
|
+
*/
|
|
449
|
+
children: QueryList<MenuItemComponent>;
|
|
450
|
+
/**
|
|
451
|
+
* @hidden
|
|
452
|
+
*/
|
|
453
|
+
get template(): TemplateRef<any>;
|
|
454
|
+
/**
|
|
455
|
+
* @hidden
|
|
456
|
+
*/
|
|
457
|
+
get linkTemplate(): TemplateRef<any>;
|
|
458
|
+
/**
|
|
459
|
+
* @hidden
|
|
460
|
+
*/
|
|
461
|
+
get contentTemplate(): TemplateRef<any>;
|
|
462
|
+
/**
|
|
463
|
+
* @hidden
|
|
464
|
+
*/
|
|
465
|
+
get items(): any[];
|
|
466
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuItemComponent, never>;
|
|
467
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuItemComponent, "kendo-menu-item", never, { "text": { "alias": "text"; "required": false; }; "url": { "alias": "url"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "cssClass": { "alias": "cssClass"; "required": false; }; "cssStyle": { "alias": "cssStyle"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "svgIcon": { "alias": "svgIcon"; "required": false; }; "data": { "alias": "data"; "required": false; }; "separator": { "alias": "separator"; "required": false; }; }, {}, ["itemTemplate", "itemLinkTemplate", "itemContentTemplate", "children"], never, true, never>;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Represents the animation settings for the Popup component.
|
|
472
|
+
*/
|
|
473
|
+
interface MenuAnimation {
|
|
474
|
+
/**
|
|
475
|
+
* Specifies the type of the animation.
|
|
476
|
+
*
|
|
477
|
+
* @default 'slide'
|
|
478
|
+
*/
|
|
479
|
+
type?: 'slide' | 'expand' | 'zoom' | 'fade';
|
|
480
|
+
/**
|
|
481
|
+
* Specifies the animation duration in milliseconds.
|
|
482
|
+
*
|
|
483
|
+
* @default 100
|
|
484
|
+
*/
|
|
485
|
+
duration: number;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* The settings for the `openOnClick` option.
|
|
490
|
+
*/
|
|
491
|
+
interface OpenOnClickSettings {
|
|
492
|
+
/**
|
|
493
|
+
* Specifies the way in which you can toggle the open-on-click behavior.
|
|
494
|
+
*
|
|
495
|
+
* The supported values are:
|
|
496
|
+
* - `"select"`—The user opens an item with a click and the Menu items open on hover until one of them is selected.
|
|
497
|
+
* - `"leave"`—The user opens an item with a click and the Menu items open on hover until either one of them is selected, or the mouse pointer leaves the Menu and the predefined delay passes.
|
|
498
|
+
* - `"click"`—The user opens an item with a click and the Menu items open on hover but do not close when the mouse pointer leaves the Menu. To close the items, the user has to either select an item, or click a random place on the page.
|
|
499
|
+
*
|
|
500
|
+
* @default 'select'
|
|
501
|
+
*/
|
|
502
|
+
toggle: 'select' | 'leave' | 'click';
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Represents the possible size options of the menu.
|
|
507
|
+
*/
|
|
508
|
+
type MenuSize = 'small' | 'medium' | 'large';
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Settings for the Menu and ContextMenu popups.
|
|
512
|
+
*/
|
|
513
|
+
interface PopupSettings {
|
|
514
|
+
/**
|
|
515
|
+
* The CSS class that will be applied to the popup container.
|
|
516
|
+
*/
|
|
517
|
+
popupClass?: string | string[] | object | Set<string>;
|
|
518
|
+
/**
|
|
519
|
+
* The margin of the popup container.
|
|
520
|
+
*/
|
|
521
|
+
margin?: Margin;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* @hidden
|
|
526
|
+
*/
|
|
527
|
+
declare class MenuBase {
|
|
528
|
+
/**
|
|
529
|
+
* Specifies the Menu items.
|
|
530
|
+
*/
|
|
531
|
+
items: any[];
|
|
532
|
+
/**
|
|
533
|
+
* Specifies if the Menu will be vertical ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/vertical)).
|
|
534
|
+
*/
|
|
535
|
+
vertical: boolean;
|
|
536
|
+
/**
|
|
537
|
+
* Specifies that the root items can be opened only on click
|
|
538
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/open-close#opening-on-click)).
|
|
539
|
+
*/
|
|
540
|
+
openOnClick: boolean | OpenOnClickSettings;
|
|
541
|
+
/**
|
|
542
|
+
* Specifies the delay in milliseconds before the Menu items are opened or closed on item hover
|
|
543
|
+
* or leave ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/open-close#delay-on-hover)). Used to avoid the accidental
|
|
544
|
+
* opening or closing of the items.
|
|
545
|
+
*/
|
|
546
|
+
hoverDelay: number;
|
|
547
|
+
/**
|
|
548
|
+
* Sets the Menu animation.
|
|
549
|
+
*/
|
|
550
|
+
animate: boolean | MenuAnimation;
|
|
551
|
+
/**
|
|
552
|
+
* Sets the Menu size.
|
|
553
|
+
*
|
|
554
|
+
* The possible values are:
|
|
555
|
+
* * `small`
|
|
556
|
+
* * `medium`
|
|
557
|
+
* * `large`
|
|
558
|
+
*
|
|
559
|
+
*/
|
|
560
|
+
size: MenuSize;
|
|
561
|
+
/**
|
|
562
|
+
* Configures the popup settings for the Menu items.
|
|
563
|
+
* Allows customization of the popup class and margin.
|
|
564
|
+
*/
|
|
565
|
+
popupSettings: PopupSettings;
|
|
566
|
+
/**
|
|
567
|
+
* Defines a function that determines how to track changes for the menu items.
|
|
568
|
+
* By default, the component tracks changes by index.
|
|
569
|
+
*/
|
|
570
|
+
trackBy: TrackByFunction<any>;
|
|
571
|
+
/**
|
|
572
|
+
* @hidden
|
|
573
|
+
*/
|
|
574
|
+
itemTemplate: QueryList<ItemTemplateDirective>;
|
|
575
|
+
/**
|
|
576
|
+
* @hidden
|
|
577
|
+
*/
|
|
578
|
+
itemLinkTemplate: QueryList<ItemLinkTemplateDirective>;
|
|
579
|
+
/**
|
|
580
|
+
* @hidden
|
|
581
|
+
*/
|
|
582
|
+
children: QueryList<MenuItemComponent>;
|
|
583
|
+
/**
|
|
584
|
+
* @hidden
|
|
585
|
+
*/
|
|
586
|
+
get rootItems(): any[];
|
|
587
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuBase, never>;
|
|
588
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuBase, "kendo-menu-base", never, { "items": { "alias": "items"; "required": false; }; "vertical": { "alias": "vertical"; "required": false; }; "openOnClick": { "alias": "openOnClick"; "required": false; }; "hoverDelay": { "alias": "hoverDelay"; "required": false; }; "animate": { "alias": "animate"; "required": false; }; "size": { "alias": "size"; "required": false; }; "popupSettings": { "alias": "popupSettings"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; }, {}, ["itemTemplate", "itemLinkTemplate", "children"], never, true, never>;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Represents the [Kendo UI Menu component for Angular](https://www.telerik.com/kendo-angular-ui/components/menus/menu).
|
|
593
|
+
*
|
|
594
|
+
* @example
|
|
595
|
+
* ```ts
|
|
596
|
+
* _@Component({
|
|
597
|
+
* selector: 'my-app',
|
|
598
|
+
* template: `
|
|
599
|
+
* <kendo-menu [items]="items">
|
|
600
|
+
* </kendo-menu>
|
|
601
|
+
* `
|
|
602
|
+
* })
|
|
603
|
+
* class AppComponent {
|
|
604
|
+
* public items: any[] = [{ text: 'item1', items: [{ text: 'item1.1' }] }, { text: 'item2', disabled: true }];
|
|
605
|
+
* }
|
|
606
|
+
* ```
|
|
607
|
+
*
|
|
608
|
+
* @remarks
|
|
609
|
+
* Supported children components are: {@link MenuItemComponent}.
|
|
610
|
+
*/
|
|
611
|
+
declare class MenuComponent extends MenuBase implements OnChanges, AfterViewChecked {
|
|
612
|
+
private itemsService;
|
|
613
|
+
private hover;
|
|
614
|
+
private actions;
|
|
615
|
+
private navigation;
|
|
616
|
+
private localization;
|
|
617
|
+
private ngZone;
|
|
618
|
+
private renderer;
|
|
619
|
+
private contextService?;
|
|
620
|
+
/**
|
|
621
|
+
* Defines the container to which the popups will be appended.
|
|
622
|
+
*/
|
|
623
|
+
appendTo: ViewContainerRef;
|
|
624
|
+
/**
|
|
625
|
+
* @hidden
|
|
626
|
+
*/
|
|
627
|
+
menuItemTemplate: TemplateRef<any>;
|
|
628
|
+
/**
|
|
629
|
+
* @hidden
|
|
630
|
+
*/
|
|
631
|
+
ariaRole: string;
|
|
632
|
+
/**
|
|
633
|
+
* @hidden
|
|
634
|
+
*/
|
|
635
|
+
menuItemLinkTemplate: TemplateRef<any>;
|
|
636
|
+
/**
|
|
637
|
+
* Fires when a Menu item is selected ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/events)).
|
|
638
|
+
*/
|
|
639
|
+
select: EventEmitter<MenuSelectEvent>;
|
|
640
|
+
/**
|
|
641
|
+
* Fires when a Menu item is opened ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/events)).
|
|
642
|
+
*/
|
|
643
|
+
open: EventEmitter<MenuEvent>;
|
|
644
|
+
/**
|
|
645
|
+
* Fires when a Menu item is closed ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/menu/events)).
|
|
646
|
+
*/
|
|
647
|
+
close: EventEmitter<MenuEvent>;
|
|
648
|
+
/**
|
|
649
|
+
* @hidden
|
|
650
|
+
*/
|
|
651
|
+
get ariaOrientation(): string | null;
|
|
652
|
+
/**
|
|
653
|
+
* @hidden
|
|
654
|
+
*/
|
|
655
|
+
get isContextMenu(): boolean;
|
|
656
|
+
get direction(): boolean;
|
|
657
|
+
get rtl(): boolean;
|
|
658
|
+
/**
|
|
659
|
+
* @hidden
|
|
660
|
+
*/
|
|
661
|
+
get menuClasses(): string;
|
|
662
|
+
private closeClickSubscription;
|
|
663
|
+
private contextKeyDownSubscription;
|
|
664
|
+
constructor(itemsService: ItemsService, hover: HoverService, actions: ActionsService, navigation: NavigationService, localization: LocalizationService, ngZone: NgZone, renderer: Renderer2, contextService?: ContextMenuService);
|
|
665
|
+
/**
|
|
666
|
+
* Opens or closes the specified Menu items.
|
|
667
|
+
*
|
|
668
|
+
* @param open - A Boolean value which indicates if the items will be opened or closed.
|
|
669
|
+
* @param indices - One or more values which represent the hierarchical indices of the items that will be opened or closed.
|
|
670
|
+
*/
|
|
671
|
+
toggle(open: boolean, ...indices: string[]): void;
|
|
672
|
+
/**
|
|
673
|
+
* @hidden
|
|
674
|
+
*/
|
|
675
|
+
focus(index?: string): void;
|
|
676
|
+
ngOnChanges(changes: any): void;
|
|
677
|
+
ngAfterViewChecked(): void;
|
|
678
|
+
ngOnDestroy(): void;
|
|
679
|
+
private attachCloseClick;
|
|
680
|
+
private unsubscribeClick;
|
|
681
|
+
private contextKeyDown;
|
|
682
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuComponent, [null, null, null, null, null, null, null, { optional: true; }]>;
|
|
683
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuComponent, "kendo-menu", ["kendoMenu"], { "appendTo": { "alias": "appendTo"; "required": false; }; "menuItemTemplate": { "alias": "menuItemTemplate"; "required": false; }; "ariaRole": { "alias": "ariaRole"; "required": false; }; "menuItemLinkTemplate": { "alias": "menuItemLinkTemplate"; "required": false; }; }, { "select": "select"; "open": "open"; "close": "close"; }, never, never, true, never>;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* @hidden
|
|
688
|
+
*/
|
|
689
|
+
declare class ListComponent implements OnInit, OnDestroy {
|
|
690
|
+
private itemsService;
|
|
691
|
+
private hover;
|
|
692
|
+
private actions;
|
|
693
|
+
private navigation;
|
|
694
|
+
private renderer;
|
|
695
|
+
private ngZone;
|
|
696
|
+
element: ElementRef;
|
|
697
|
+
appendTo: ViewContainerRef;
|
|
698
|
+
items: any[];
|
|
699
|
+
level: number;
|
|
700
|
+
index: string;
|
|
701
|
+
animate: boolean | MenuAnimation;
|
|
702
|
+
size: MenuSize;
|
|
703
|
+
vertical: boolean;
|
|
704
|
+
rtl: boolean;
|
|
705
|
+
openOnClick: any;
|
|
706
|
+
itemTemplate: TemplateRef<any>;
|
|
707
|
+
itemLinkTemplate: TemplateRef<any>;
|
|
708
|
+
popupSettings: PopupSettings;
|
|
709
|
+
trackBy: TrackByFunction<any>;
|
|
710
|
+
private domSubscriptions;
|
|
711
|
+
constructor(itemsService: ItemsService, hover: HoverService, actions: ActionsService, navigation: NavigationService, renderer: Renderer2, ngZone: NgZone, element: ElementRef);
|
|
712
|
+
trackByWrapper(index: number, item: any): any;
|
|
713
|
+
hierarchyIndex(index: number): string;
|
|
714
|
+
ngOnInit(): void;
|
|
715
|
+
ngOnDestroy(): void;
|
|
716
|
+
private initDomEvents;
|
|
717
|
+
private leavesMenu;
|
|
718
|
+
private onLeave;
|
|
719
|
+
private nodeItem;
|
|
720
|
+
private clickHandler;
|
|
721
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ListComponent, never>;
|
|
722
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ListComponent, "[kendoMenuList]", never, { "appendTo": { "alias": "appendTo"; "required": false; }; "items": { "alias": "items"; "required": false; }; "level": { "alias": "level"; "required": false; }; "index": { "alias": "index"; "required": false; }; "animate": { "alias": "animate"; "required": false; }; "size": { "alias": "size"; "required": false; }; "vertical": { "alias": "vertical"; "required": false; }; "rtl": { "alias": "rtl"; "required": false; }; "openOnClick": { "alias": "openOnClick"; "required": false; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; }; "itemLinkTemplate": { "alias": "itemLinkTemplate"; "required": false; }; "popupSettings": { "alias": "popupSettings"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; }, {}, never, never, true, never>;
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* @hidden
|
|
726
|
+
*/
|
|
727
|
+
declare class ItemComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
728
|
+
private itemsService;
|
|
729
|
+
private navigation;
|
|
730
|
+
private changeDetector;
|
|
731
|
+
private renderer;
|
|
732
|
+
private popupService;
|
|
733
|
+
element: ElementRef;
|
|
734
|
+
private contextService?;
|
|
735
|
+
appendTo: ViewContainerRef;
|
|
736
|
+
item: any;
|
|
737
|
+
level: number;
|
|
738
|
+
set index(index: string);
|
|
739
|
+
get index(): string;
|
|
740
|
+
siblingIndex: number;
|
|
741
|
+
animate: boolean | MenuAnimation;
|
|
742
|
+
size: MenuSize;
|
|
743
|
+
vertical: boolean;
|
|
744
|
+
rtl: boolean;
|
|
745
|
+
openOnClick: boolean;
|
|
746
|
+
itemTemplate: TemplateRef<any>;
|
|
747
|
+
itemLinkTemplate: TemplateRef<any>;
|
|
748
|
+
popupSettings: PopupSettings;
|
|
749
|
+
trackBy: TrackByFunction<any>;
|
|
750
|
+
link: ElementRef;
|
|
751
|
+
popupTemplate: TemplateRef<any>;
|
|
752
|
+
get disabled(): boolean;
|
|
753
|
+
get hasPopup(): string;
|
|
754
|
+
get defaultPopupSettings(): any;
|
|
755
|
+
get horizontal(): boolean;
|
|
756
|
+
get hasLink(): boolean;
|
|
757
|
+
get linkTemplate(): TemplateRef<any>;
|
|
758
|
+
get hasContent(): boolean;
|
|
759
|
+
get isContent(): boolean;
|
|
760
|
+
get iconClass(): string;
|
|
761
|
+
get isContextMenu(): boolean;
|
|
762
|
+
get menuListClasses(): string;
|
|
763
|
+
get children(): any[];
|
|
764
|
+
get template(): TemplateRef<any>;
|
|
765
|
+
/**
|
|
766
|
+
* @hidden
|
|
767
|
+
*/
|
|
768
|
+
fontIcon: (horizontal: boolean, rtl: boolean) => string;
|
|
769
|
+
/**
|
|
770
|
+
* @hidden
|
|
771
|
+
*/
|
|
772
|
+
SVGIcon: (horizontal: boolean, rtl: boolean) => _progress_kendo_angular_icons.SVGIcon;
|
|
773
|
+
opened: boolean;
|
|
774
|
+
navigating: boolean;
|
|
775
|
+
childId: string;
|
|
776
|
+
private contentItems;
|
|
777
|
+
private popupRef;
|
|
778
|
+
private _index;
|
|
779
|
+
private destroyed;
|
|
780
|
+
constructor(itemsService: ItemsService, navigation: NavigationService, changeDetector: ChangeDetectorRef, renderer: Renderer2, popupService: PopupService, element: ElementRef, contextService?: ContextMenuService);
|
|
781
|
+
hasContentTemplates(): boolean;
|
|
782
|
+
ngOnInit(): void;
|
|
783
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
784
|
+
ngAfterViewInit(): void;
|
|
785
|
+
ngOnDestroy(): void;
|
|
786
|
+
focus(): void;
|
|
787
|
+
blur(): void;
|
|
788
|
+
toggleActive(isActive: boolean): void;
|
|
789
|
+
open(): void;
|
|
790
|
+
close(): void;
|
|
791
|
+
navigate(): void;
|
|
792
|
+
private setAttribute;
|
|
793
|
+
private getMergedPopupSettings;
|
|
794
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ItemComponent, [null, null, null, null, null, null, { optional: true; }]>;
|
|
795
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ItemComponent, "[kendoMenuItem]", never, { "appendTo": { "alias": "appendTo"; "required": false; }; "item": { "alias": "item"; "required": false; }; "level": { "alias": "level"; "required": false; }; "index": { "alias": "index"; "required": false; }; "siblingIndex": { "alias": "siblingIndex"; "required": false; }; "animate": { "alias": "animate"; "required": false; }; "size": { "alias": "size"; "required": false; }; "vertical": { "alias": "vertical"; "required": false; }; "rtl": { "alias": "rtl"; "required": false; }; "openOnClick": { "alias": "openOnClick"; "required": false; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; }; "itemLinkTemplate": { "alias": "itemLinkTemplate"; "required": false; }; "popupSettings": { "alias": "popupSettings"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; }, {}, never, never, true, never>;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* Represents a directive that can be used in the [`linkTemplate`](https://www.telerik.com/kendo-angular-ui/components/menus/api/itemlinktemplatedirective)
|
|
800
|
+
* of the items to apply the default styling and behavior.
|
|
801
|
+
*
|
|
802
|
+
* @example
|
|
803
|
+
* ```html
|
|
804
|
+
* <ng-template kendoMenuItemLinkTemplate let-item="item" let-index="index">
|
|
805
|
+
* <a [kendoMenuItemLink]="index">{{ item.text }}</a>
|
|
806
|
+
* </ng-template>
|
|
807
|
+
* ```
|
|
808
|
+
*/
|
|
809
|
+
declare class LinkDirective implements OnInit {
|
|
810
|
+
private itemsService;
|
|
811
|
+
/**
|
|
812
|
+
* Specifies the index of the Menu item. The input is mandatory.
|
|
813
|
+
*/
|
|
814
|
+
index: string;
|
|
815
|
+
hostClasses: boolean;
|
|
816
|
+
role: string;
|
|
817
|
+
tabindex: string;
|
|
818
|
+
get activeClass(): boolean;
|
|
819
|
+
private item;
|
|
820
|
+
constructor(itemsService: ItemsService);
|
|
821
|
+
ngOnInit(): void;
|
|
822
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LinkDirective, never>;
|
|
823
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<LinkDirective, "[kendoMenuItemLink]", never, { "index": { "alias": "kendoMenuItemLink"; "required": false; }; }, {}, never, never, true, never>;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* Represents a component that can be used in the [`linkTemplate`](https://www.telerik.com/kendo-angular-ui/components/menus/api/itemlinktemplatedirective)
|
|
828
|
+
* of the items to render the default expand arrow.
|
|
829
|
+
*
|
|
830
|
+
* @example
|
|
831
|
+
* ```html
|
|
832
|
+
* <ng-template kendoMenuItemLinkTemplate let-item="item" let-index="index">
|
|
833
|
+
* <span [kendoMenuExpandArrow]="index"></span>
|
|
834
|
+
* </ng-template>
|
|
835
|
+
* ```
|
|
836
|
+
*/
|
|
837
|
+
declare class ExpandArrowComponent implements OnInit {
|
|
838
|
+
private itemsService;
|
|
839
|
+
/**
|
|
840
|
+
* Specifies the index of the Menu item. The input is mandatory.
|
|
841
|
+
*/
|
|
842
|
+
index: string;
|
|
843
|
+
hostClasses: boolean;
|
|
844
|
+
ariaHidden: string;
|
|
845
|
+
private item;
|
|
846
|
+
/**
|
|
847
|
+
* @hidden
|
|
848
|
+
*/
|
|
849
|
+
fontIcon: string;
|
|
850
|
+
/**
|
|
851
|
+
* @hidden
|
|
852
|
+
*/
|
|
853
|
+
SVGIcon: SVGIcon$1;
|
|
854
|
+
constructor(itemsService: ItemsService);
|
|
855
|
+
ngOnInit(): void;
|
|
856
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExpandArrowComponent, never>;
|
|
857
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ExpandArrowComponent, "[kendoMenuExpandArrow]", never, { "index": { "alias": "kendoMenuExpandArrow"; "required": false; }; }, {}, never, never, true, never>;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* @hidden
|
|
862
|
+
*/
|
|
863
|
+
declare abstract class BindingDirectiveBase implements OnChanges {
|
|
864
|
+
protected menu: MenuBase;
|
|
865
|
+
data: any[];
|
|
866
|
+
protected fields: any[];
|
|
867
|
+
constructor(menu: MenuBase);
|
|
868
|
+
ngOnChanges(): void;
|
|
869
|
+
/**
|
|
870
|
+
* Rebinds the Menu items.
|
|
871
|
+
*/
|
|
872
|
+
rebind(): void;
|
|
873
|
+
protected abstract mapItems(items: any[]): any[];
|
|
874
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BindingDirectiveBase, never>;
|
|
875
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BindingDirectiveBase, "kendoBindingBase", never, {}, {}, never, never, true, never>;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* Represents a directive that converts the provided hierarchical data to [MenuItems](https://www.telerik.com/kendo-angular-ui/components/menus/api/menuitem) and binds them to the Menu.
|
|
880
|
+
*
|
|
881
|
+
* @example
|
|
882
|
+
* ```html
|
|
883
|
+
* <kendo-menu [kendoMenuHierarchyBinding]="hierarchicalData" [textField]="'text'" [childrenField]="'items'">
|
|
884
|
+
* </kendo-menu>
|
|
885
|
+
* ```
|
|
886
|
+
*
|
|
887
|
+
* @remarks
|
|
888
|
+
* Applied to: {@link MenuComponent}.
|
|
889
|
+
*/
|
|
890
|
+
declare class HierarchyBindingDirective extends BindingDirectiveBase {
|
|
891
|
+
/**
|
|
892
|
+
* Specifies the array of data which will be used to populate the Menu.
|
|
893
|
+
*/
|
|
894
|
+
data: any[];
|
|
895
|
+
/**
|
|
896
|
+
* Defines the `text` field (or fields) of an item.
|
|
897
|
+
*/
|
|
898
|
+
textField: string | string[];
|
|
899
|
+
/**
|
|
900
|
+
* Defines the `url` field (or fields) of an item.
|
|
901
|
+
*/
|
|
902
|
+
urlField: string | string[];
|
|
903
|
+
/**
|
|
904
|
+
* Defines the `icon` field (or fields) of an item.
|
|
905
|
+
*/
|
|
906
|
+
iconField: string | string[];
|
|
907
|
+
/**
|
|
908
|
+
* Defines the `svgIcon` field of the items.
|
|
909
|
+
*/
|
|
910
|
+
svgIconField: string | string[];
|
|
911
|
+
/**
|
|
912
|
+
* Defines the `disabled` field (or fields) of an item.
|
|
913
|
+
*/
|
|
914
|
+
disabledField: string | string[];
|
|
915
|
+
/**
|
|
916
|
+
* Defines the `cssClass` field (or fields) of an item.
|
|
917
|
+
*/
|
|
918
|
+
cssClassField: string | string[];
|
|
919
|
+
/**
|
|
920
|
+
* Defines the `cssStyle` field (or fields) of an item.
|
|
921
|
+
*/
|
|
922
|
+
cssStyleField: string | string[];
|
|
923
|
+
/**
|
|
924
|
+
* Defines the `separator` field (or fields) of the items.
|
|
925
|
+
*/
|
|
926
|
+
separatorField: string | string[];
|
|
927
|
+
/**
|
|
928
|
+
* Defines the `children` field (or fields) of the items.
|
|
929
|
+
*/
|
|
930
|
+
childrenField: string | string[];
|
|
931
|
+
constructor(menu: MenuBase);
|
|
932
|
+
protected mapItems(items: any[], level?: number): any[];
|
|
933
|
+
protected createItem(item: any, level: number): any;
|
|
934
|
+
protected getChildren(item: any, level: number): any;
|
|
935
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HierarchyBindingDirective, never>;
|
|
936
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HierarchyBindingDirective, "[kendoMenuHierarchyBinding]", ["kendoMenuHierarchyBinding"], { "data": { "alias": "kendoMenuHierarchyBinding"; "required": false; }; "textField": { "alias": "textField"; "required": false; }; "urlField": { "alias": "urlField"; "required": false; }; "iconField": { "alias": "iconField"; "required": false; }; "svgIconField": { "alias": "svgIconField"; "required": false; }; "disabledField": { "alias": "disabledField"; "required": false; }; "cssClassField": { "alias": "cssClassField"; "required": false; }; "cssStyleField": { "alias": "cssStyleField"; "required": false; }; "separatorField": { "alias": "separatorField"; "required": false; }; "childrenField": { "alias": "childrenField"; "required": false; }; }, {}, never, never, true, never>;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
/**
|
|
940
|
+
* Represents a directive that converts the provided flat data to [MenuItems](https://www.telerik.com/kendo-angular-ui/components/menus/api/menuitem) and binds them to the Menu.
|
|
941
|
+
*
|
|
942
|
+
* @example
|
|
943
|
+
* ```html
|
|
944
|
+
* <kendo-menu [kendoMenuFlatBinding]="flatData" [textField]="'text'" [idField]="'id'" [parentIdField]="'parentId'">
|
|
945
|
+
* </kendo-menu>
|
|
946
|
+
* ```
|
|
947
|
+
*
|
|
948
|
+
* @remarks
|
|
949
|
+
* Applied to: {@link MenuComponent}.
|
|
950
|
+
*/
|
|
951
|
+
declare class FlatBindingDirective extends BindingDirectiveBase {
|
|
952
|
+
/**
|
|
953
|
+
* Specifies the array of data which will be used to populate the Menu.
|
|
954
|
+
*/
|
|
955
|
+
data: any[];
|
|
956
|
+
/**
|
|
957
|
+
* Defines the `text` field of the items.
|
|
958
|
+
*/
|
|
959
|
+
textField: string;
|
|
960
|
+
/**
|
|
961
|
+
* Defines the `url` field of the items.
|
|
962
|
+
*/
|
|
963
|
+
urlField: string;
|
|
964
|
+
/**
|
|
965
|
+
* Defines the `icon` field of the items.
|
|
966
|
+
*/
|
|
967
|
+
iconField: string | string[];
|
|
968
|
+
/**
|
|
969
|
+
* Defines the `svgIcon` field of the items.
|
|
970
|
+
*/
|
|
971
|
+
svgIconField: string | string[];
|
|
972
|
+
/**
|
|
973
|
+
* Defines the `disabled` field of the items.
|
|
974
|
+
*/
|
|
975
|
+
disabledField: string;
|
|
976
|
+
/**
|
|
977
|
+
* Defines the `cssClass` field of the items.
|
|
978
|
+
*/
|
|
979
|
+
cssClassField: string;
|
|
980
|
+
/**
|
|
981
|
+
* Defines the `cssStyle` field of the items.
|
|
982
|
+
*/
|
|
983
|
+
cssStyleField: string;
|
|
984
|
+
/**
|
|
985
|
+
* Defines the `separator` field of the items.
|
|
986
|
+
*/
|
|
987
|
+
separatorField: string;
|
|
988
|
+
/**
|
|
989
|
+
* Defines the `id` field of the items.
|
|
990
|
+
*/
|
|
991
|
+
idField: string;
|
|
992
|
+
/**
|
|
993
|
+
* Defines the parent `id` field of the items.
|
|
994
|
+
*/
|
|
995
|
+
parentIdField: string;
|
|
996
|
+
constructor(menu: MenuBase);
|
|
997
|
+
protected mapItems(items: any[]): any[];
|
|
998
|
+
protected createItem(dataItem: any): any;
|
|
999
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FlatBindingDirective, never>;
|
|
1000
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FlatBindingDirective, "[kendoMenuFlatBinding]", ["kendoMenuFlatBinding"], { "data": { "alias": "kendoMenuFlatBinding"; "required": false; }; "textField": { "alias": "textField"; "required": false; }; "urlField": { "alias": "urlField"; "required": false; }; "iconField": { "alias": "iconField"; "required": false; }; "svgIconField": { "alias": "svgIconField"; "required": false; }; "disabledField": { "alias": "disabledField"; "required": false; }; "cssClassField": { "alias": "cssClassField"; "required": false; }; "cssStyleField": { "alias": "cssStyleField"; "required": false; }; "separatorField": { "alias": "separatorField"; "required": false; }; "idField": { "alias": "idField"; "required": false; }; "parentIdField": { "alias": "parentIdField"; "required": false; }; }, {}, never, never, true, never>;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
1005
|
+
* definition for the Menu component.
|
|
1006
|
+
*
|
|
1007
|
+
* @example
|
|
1008
|
+
*
|
|
1009
|
+
* ```ts-no-run
|
|
1010
|
+
* // Import the Menu module
|
|
1011
|
+
* import { MenuModule } from '@progress/kendo-angular-menu';
|
|
1012
|
+
*
|
|
1013
|
+
* // The browser platform with a compiler
|
|
1014
|
+
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
1015
|
+
* import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
1016
|
+
*
|
|
1017
|
+
* import { NgModule } from '@angular/core';
|
|
1018
|
+
*
|
|
1019
|
+
* // Import the app component
|
|
1020
|
+
* import { AppComponent } from './app.component';
|
|
1021
|
+
*
|
|
1022
|
+
* // Define the app module
|
|
1023
|
+
* _@NgModule({
|
|
1024
|
+
* declarations: [AppComponent], // declare app component
|
|
1025
|
+
* imports: [BrowserModule, BrowserAnimationsModule, MenuModule], // import Menu module
|
|
1026
|
+
* bootstrap: [AppComponent]
|
|
1027
|
+
* })
|
|
1028
|
+
* export class AppModule {}
|
|
1029
|
+
*
|
|
1030
|
+
* // Compile and launch the module
|
|
1031
|
+
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
1032
|
+
*
|
|
1033
|
+
* ```
|
|
1034
|
+
*/
|
|
1035
|
+
declare class MenuModule {
|
|
1036
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuModule, never>;
|
|
1037
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MenuModule, never, [typeof MenuComponent, typeof MenuItemComponent, typeof ItemTemplateDirective, typeof ItemLinkTemplateDirective, typeof ItemContentTemplateDirective, typeof HierarchyBindingDirective, typeof FlatBindingDirective, typeof LinkDirective, typeof ExpandArrowComponent], [typeof MenuComponent, typeof MenuItemComponent, typeof ItemTemplateDirective, typeof ItemLinkTemplateDirective, typeof ItemContentTemplateDirective, typeof HierarchyBindingDirective, typeof FlatBindingDirective, typeof LinkDirective, typeof ExpandArrowComponent]>;
|
|
1038
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MenuModule>;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* Represents the arguments for the `select` event of the ContextMenu.
|
|
1043
|
+
*/
|
|
1044
|
+
declare class ContextMenuSelectEvent extends ContextMenuEvent {
|
|
1045
|
+
/**
|
|
1046
|
+
* Specifies the DOM event that triggered the selection.
|
|
1047
|
+
*/
|
|
1048
|
+
originalEvent: any;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* Represents the arguments for the `popupOpen` and `popupClose` events of the ContextMenu.
|
|
1053
|
+
*/
|
|
1054
|
+
declare class ContextMenuPopupEvent extends PreventableEvent {
|
|
1055
|
+
/**
|
|
1056
|
+
* Specifies the target element for which the ContextMenu is opened.
|
|
1057
|
+
*/
|
|
1058
|
+
target: any;
|
|
1059
|
+
/**
|
|
1060
|
+
* Specifies the DOM event that started the action.
|
|
1061
|
+
*/
|
|
1062
|
+
originalEvent: any;
|
|
1063
|
+
/**
|
|
1064
|
+
* Specifies the ContextMenuComponent that triggered the event.
|
|
1065
|
+
*/
|
|
1066
|
+
sender: ContextMenuComponent;
|
|
1067
|
+
/**
|
|
1068
|
+
* @hidden
|
|
1069
|
+
*/
|
|
1070
|
+
constructor(args: any);
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
/**
|
|
1074
|
+
* Represents a template for the content of the ContextMenu. To define a template, nest an `<ng-template>`
|
|
1075
|
+
* tag with the `kendoContextMenuTemplate` directive inside a `<kendo-contextmenu>` component
|
|
1076
|
+
* ([more information and examples](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/templates)).
|
|
1077
|
+
*
|
|
1078
|
+
* <demo metaUrl="menus/context-menu/template/" height="200"></demo>
|
|
1079
|
+
*
|
|
1080
|
+
* @example
|
|
1081
|
+
* ```html
|
|
1082
|
+
* <kendo-contextmenu>
|
|
1083
|
+
* <ng-template kendoContextMenuTemplate let-item="item">
|
|
1084
|
+
* <span>{{ item.text }}</span>
|
|
1085
|
+
* </ng-template>
|
|
1086
|
+
* </kendo-contextmenu>
|
|
1087
|
+
* ```
|
|
1088
|
+
*/
|
|
1089
|
+
declare class ContextMenuTemplateDirective {
|
|
1090
|
+
templateRef: TemplateRef<any>;
|
|
1091
|
+
constructor(templateRef: TemplateRef<any>);
|
|
1092
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContextMenuTemplateDirective, [{ optional: true; }]>;
|
|
1093
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ContextMenuTemplateDirective, "[kendoContextMenuTemplate]", never, {}, {}, never, never, true, never>;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
/**
|
|
1097
|
+
* @hidden
|
|
1098
|
+
*/
|
|
1099
|
+
declare class ContextMenuTargetService {
|
|
1100
|
+
targets: any[];
|
|
1101
|
+
add(target: any): void;
|
|
1102
|
+
remove(target: any): void;
|
|
1103
|
+
find(targetElement: any): any;
|
|
1104
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContextMenuTargetService, never>;
|
|
1105
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ContextMenuTargetService>;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
/**
|
|
1109
|
+
* Represents a container for the [targets](https://www.telerik.com/kendo-angular-ui/components/menus/api/contextmenutargetdirective) of the ContextMenu.
|
|
1110
|
+
*
|
|
1111
|
+
* @example
|
|
1112
|
+
* ```html
|
|
1113
|
+
* <div
|
|
1114
|
+
* #target="kendoContextMenuTargetContainer"
|
|
1115
|
+
* kendoContextMenuTargetContainer
|
|
1116
|
+
* >
|
|
1117
|
+
* <div kendoContextMenuTarget></div>
|
|
1118
|
+
* <div kendoContextMenuTarget></div>
|
|
1119
|
+
* </div>
|
|
1120
|
+
* ```
|
|
1121
|
+
*/
|
|
1122
|
+
declare class ContextMenuTargetContainerDirective {
|
|
1123
|
+
targetService: ContextMenuTargetService;
|
|
1124
|
+
/**
|
|
1125
|
+
* @hidden
|
|
1126
|
+
*/
|
|
1127
|
+
element: any;
|
|
1128
|
+
/**
|
|
1129
|
+
* @hidden
|
|
1130
|
+
*/
|
|
1131
|
+
constructor(elementRef: ElementRef, targetService: ContextMenuTargetService);
|
|
1132
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContextMenuTargetContainerDirective, never>;
|
|
1133
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ContextMenuTargetContainerDirective, "[kendoContextMenuTargetContainer]", ["kendoContextMenuTargetContainer"], {}, {}, never, never, true, never>;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
/**
|
|
1137
|
+
* Represents the [Kendo UI ContextMenu component for Angular](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu).
|
|
1138
|
+
*
|
|
1139
|
+
* @example
|
|
1140
|
+
* ```ts
|
|
1141
|
+
* _@Component({
|
|
1142
|
+
* selector: 'my-app',
|
|
1143
|
+
* template: `
|
|
1144
|
+
* <div #target>
|
|
1145
|
+
* Right-click to open Context menu</p>
|
|
1146
|
+
* </div>
|
|
1147
|
+
* <kendo-contextmenu [target]="target" [items]="items"> </kendo-contextmenu>
|
|
1148
|
+
* `
|
|
1149
|
+
* })
|
|
1150
|
+
* class AppComponent {
|
|
1151
|
+
* public items: any[] = [{ text: 'item1', items: [{ text: 'item1.1' }] }, { text: 'item2', disabled: true }];
|
|
1152
|
+
* }
|
|
1153
|
+
* ```
|
|
1154
|
+
*/
|
|
1155
|
+
declare class ContextMenuComponent extends MenuBase implements OnInit, OnChanges, OnDestroy {
|
|
1156
|
+
private popupService;
|
|
1157
|
+
private service;
|
|
1158
|
+
private ngZone;
|
|
1159
|
+
private renderer;
|
|
1160
|
+
/**
|
|
1161
|
+
* Specifies the event on which the ContextMenu will open ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/opening)).
|
|
1162
|
+
* Accepts the name of a native DOM event. For example, `click`, `dblclick`, `mouseover`, etc.
|
|
1163
|
+
*
|
|
1164
|
+
* @default 'contextmenu'
|
|
1165
|
+
*/
|
|
1166
|
+
showOn: string;
|
|
1167
|
+
/**
|
|
1168
|
+
* Specifies the element for which the ContextMenu will open ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/target#configuration)).
|
|
1169
|
+
*/
|
|
1170
|
+
target: HTMLElement | ElementRef | ContextMenuTargetContainerDirective | string;
|
|
1171
|
+
/**
|
|
1172
|
+
* Specifies a CSS selector which filters the elements in the target for which the ContextMenu will open
|
|
1173
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/target#changing-items-for-specific-targets)).
|
|
1174
|
+
*/
|
|
1175
|
+
filter: string;
|
|
1176
|
+
/**
|
|
1177
|
+
* Specifies if the ContextMenu will be aligned to the target or to the `filter` element (if specified).
|
|
1178
|
+
*
|
|
1179
|
+
* @default false
|
|
1180
|
+
*/
|
|
1181
|
+
alignToAnchor: boolean;
|
|
1182
|
+
/**
|
|
1183
|
+
* Specifies if the Menu will be vertically rendered ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/orientation)).
|
|
1184
|
+
*
|
|
1185
|
+
* @default true
|
|
1186
|
+
*/
|
|
1187
|
+
vertical: boolean;
|
|
1188
|
+
/**
|
|
1189
|
+
* Specifies the popup animation.
|
|
1190
|
+
*
|
|
1191
|
+
* @default true
|
|
1192
|
+
*/
|
|
1193
|
+
popupAnimate: boolean | PopupAnimation;
|
|
1194
|
+
/**
|
|
1195
|
+
* Specifies the pivot point of the popup.
|
|
1196
|
+
*
|
|
1197
|
+
* @default { horizontal: 'left', vertical: 'top' }
|
|
1198
|
+
*/
|
|
1199
|
+
popupAlign: Align;
|
|
1200
|
+
/**
|
|
1201
|
+
* Specifies the pivot point of the anchor. Applicable if `alignToAnchor` is `true`.
|
|
1202
|
+
*
|
|
1203
|
+
* @default { horizontal: 'left', vertical: 'bottom' }
|
|
1204
|
+
*/
|
|
1205
|
+
anchorAlign: Align;
|
|
1206
|
+
/**
|
|
1207
|
+
* Configures the collision behavior of the popup.
|
|
1208
|
+
*
|
|
1209
|
+
* @default { horizontal: 'fit', vertical: 'flip' }
|
|
1210
|
+
*/
|
|
1211
|
+
collision: Collision;
|
|
1212
|
+
/**
|
|
1213
|
+
* Defines the container to which the popups will be appended.
|
|
1214
|
+
*/
|
|
1215
|
+
appendTo: ViewContainerRef;
|
|
1216
|
+
/**
|
|
1217
|
+
* Sets the value for the [`aria-label`](https://www.w3.org/TR/wai-aria-1.1/#aria-label) attribute of the ContextMenu.
|
|
1218
|
+
*
|
|
1219
|
+
* @remarks
|
|
1220
|
+
* This property is related to accessibility.
|
|
1221
|
+
*/
|
|
1222
|
+
ariaLabel: string;
|
|
1223
|
+
/**
|
|
1224
|
+
* Fires when the Menu is opened ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/events)).
|
|
1225
|
+
*/
|
|
1226
|
+
popupOpen: EventEmitter<ContextMenuPopupEvent>;
|
|
1227
|
+
/**
|
|
1228
|
+
* Fires when the Menu is closed ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/events)).
|
|
1229
|
+
*/
|
|
1230
|
+
popupClose: EventEmitter<ContextMenuPopupEvent>;
|
|
1231
|
+
/**
|
|
1232
|
+
* Fires when a Menu item is selected ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/events)).
|
|
1233
|
+
*/
|
|
1234
|
+
select: EventEmitter<ContextMenuSelectEvent>;
|
|
1235
|
+
/**
|
|
1236
|
+
* Fires when a Menu item is opened ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/events)).
|
|
1237
|
+
*/
|
|
1238
|
+
open: EventEmitter<ContextMenuEvent>;
|
|
1239
|
+
/**
|
|
1240
|
+
* Fires when a Menu item is closed ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/events)).
|
|
1241
|
+
*/
|
|
1242
|
+
close: EventEmitter<ContextMenuEvent>;
|
|
1243
|
+
/**
|
|
1244
|
+
* @hidden
|
|
1245
|
+
*/
|
|
1246
|
+
contentTemplate: ContextMenuTemplateDirective;
|
|
1247
|
+
/**
|
|
1248
|
+
* @hidden
|
|
1249
|
+
*/
|
|
1250
|
+
defaultContentTemplate: TemplateRef<any>;
|
|
1251
|
+
private closeSubscription;
|
|
1252
|
+
private showSubscription;
|
|
1253
|
+
private keydownSubscription;
|
|
1254
|
+
private popupSubscriptions;
|
|
1255
|
+
private popupRef;
|
|
1256
|
+
private currentTarget;
|
|
1257
|
+
private directiveTarget;
|
|
1258
|
+
private activeTarget;
|
|
1259
|
+
constructor(popupService: PopupService, service: ContextMenuService, ngZone: NgZone, renderer: Renderer2);
|
|
1260
|
+
/**
|
|
1261
|
+
* Hides the ContextMenu.
|
|
1262
|
+
*/
|
|
1263
|
+
hide(): void;
|
|
1264
|
+
/**
|
|
1265
|
+
* Shows the ContextMenu for the specified target.
|
|
1266
|
+
*
|
|
1267
|
+
* @param target - The offset or the target element for which the ContextMenu will open.
|
|
1268
|
+
*/
|
|
1269
|
+
show(target: Offset | HTMLElement | ElementRef): void;
|
|
1270
|
+
ngOnChanges(changes: any): void;
|
|
1271
|
+
ngOnInit(): void;
|
|
1272
|
+
ngOnDestroy(): void;
|
|
1273
|
+
/**
|
|
1274
|
+
* @hidden
|
|
1275
|
+
*/
|
|
1276
|
+
emitMenuEvent(name: string, args: any): void;
|
|
1277
|
+
private bindShowHandler;
|
|
1278
|
+
private showContextMenu;
|
|
1279
|
+
private unbindShowHandler;
|
|
1280
|
+
private targetElement;
|
|
1281
|
+
private targetFilter;
|
|
1282
|
+
private closePopup;
|
|
1283
|
+
private removePopup;
|
|
1284
|
+
private openPopup;
|
|
1285
|
+
private createPopup;
|
|
1286
|
+
private closeAndFocus;
|
|
1287
|
+
private popupKeyDownHandler;
|
|
1288
|
+
private popupAction;
|
|
1289
|
+
private get currentTargetElement();
|
|
1290
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContextMenuComponent, never>;
|
|
1291
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ContextMenuComponent, "kendo-contextmenu", ["kendoContextMenu"], { "showOn": { "alias": "showOn"; "required": false; }; "target": { "alias": "target"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "alignToAnchor": { "alias": "alignToAnchor"; "required": false; }; "vertical": { "alias": "vertical"; "required": false; }; "popupAnimate": { "alias": "popupAnimate"; "required": false; }; "popupAlign": { "alias": "popupAlign"; "required": false; }; "anchorAlign": { "alias": "anchorAlign"; "required": false; }; "collision": { "alias": "collision"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "popupOpen": "popupOpen"; "popupClose": "popupClose"; "select": "select"; "open": "open"; "close": "close"; }, ["contentTemplate"], never, true, never>;
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
/**
|
|
1295
|
+
* Represents the arguments for the `open` and `close` events of the ContextMenu.
|
|
1296
|
+
*/
|
|
1297
|
+
declare class ContextMenuEvent {
|
|
1298
|
+
/**
|
|
1299
|
+
* Specifies the target element for which the ContextMenu is opened.
|
|
1300
|
+
*/
|
|
1301
|
+
target: any;
|
|
1302
|
+
/**
|
|
1303
|
+
* Specifies the ContextMenuComponent that triggered the event.
|
|
1304
|
+
*/
|
|
1305
|
+
sender: ContextMenuComponent;
|
|
1306
|
+
/**
|
|
1307
|
+
* Specifies the item data of the event.
|
|
1308
|
+
*/
|
|
1309
|
+
item: any;
|
|
1310
|
+
/**
|
|
1311
|
+
* Specifies the item index of the event.
|
|
1312
|
+
*/
|
|
1313
|
+
index: string;
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
/**
|
|
1317
|
+
* Represents a [target](https://www.telerik.com/kendo-angular-ui/components/menus/api/contextmenutargetdirective) for the ContextMenu
|
|
1318
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/menus/contextmenu/target#directives)).
|
|
1319
|
+
*
|
|
1320
|
+
* @example
|
|
1321
|
+
* ```html
|
|
1322
|
+
* <div kendoContextMenuTarget> </div>
|
|
1323
|
+
* ```
|
|
1324
|
+
*/
|
|
1325
|
+
declare class ContextMenuTargetDirective implements OnDestroy {
|
|
1326
|
+
targetService: ContextMenuTargetService;
|
|
1327
|
+
/**
|
|
1328
|
+
* Specifies the data which is associated with the target.
|
|
1329
|
+
*/
|
|
1330
|
+
data: any;
|
|
1331
|
+
/**
|
|
1332
|
+
* Specifies the target DOM element.
|
|
1333
|
+
*/
|
|
1334
|
+
element: any;
|
|
1335
|
+
/**
|
|
1336
|
+
* @hidden
|
|
1337
|
+
*/
|
|
1338
|
+
hostClass: boolean;
|
|
1339
|
+
constructor(elementRef: ElementRef, targetService: ContextMenuTargetService);
|
|
1340
|
+
ngOnDestroy(): void;
|
|
1341
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContextMenuTargetDirective, never>;
|
|
1342
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ContextMenuTargetDirective, "[kendoContextMenuTarget]", ["kendoContextMenuTarget"], { "data": { "alias": "kendoContextMenuTarget"; "required": false; }; }, {}, never, never, true, never>;
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
/**
|
|
1346
|
+
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
1347
|
+
* definition for the ContextMenu component.
|
|
1348
|
+
*
|
|
1349
|
+
* @example
|
|
1350
|
+
*
|
|
1351
|
+
* ```ts-no-run
|
|
1352
|
+
* // Import the ContextMenu module
|
|
1353
|
+
* import { ContextMenuModule } from '@progress/kendo-angular-menu';
|
|
1354
|
+
*
|
|
1355
|
+
* // The browser platform with a compiler
|
|
1356
|
+
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
1357
|
+
* import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
1358
|
+
*
|
|
1359
|
+
* import { NgModule } from '@angular/core';
|
|
1360
|
+
*
|
|
1361
|
+
* // Import the app component
|
|
1362
|
+
* import { AppComponent } from './app.component';
|
|
1363
|
+
*
|
|
1364
|
+
* // Define the app module
|
|
1365
|
+
* _@NgModule({
|
|
1366
|
+
* declarations: [AppComponent], // declare app component
|
|
1367
|
+
* imports: [BrowserModule, BrowserAnimationsModule, ContextMenuModule], // import ContextMenuModule module
|
|
1368
|
+
* bootstrap: [AppComponent]
|
|
1369
|
+
* })
|
|
1370
|
+
* export class AppModule {}
|
|
1371
|
+
*
|
|
1372
|
+
* // Compile and launch the module
|
|
1373
|
+
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
1374
|
+
*
|
|
1375
|
+
* ```
|
|
1376
|
+
*/
|
|
1377
|
+
declare class ContextMenuModule {
|
|
1378
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContextMenuModule, never>;
|
|
1379
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ContextMenuModule, never, [typeof ContextMenuComponent, typeof ContextMenuTemplateDirective, typeof ContextMenuTargetDirective, typeof ContextMenuTargetContainerDirective, typeof MenuComponent, typeof MenuItemComponent, typeof ItemTemplateDirective, typeof ItemLinkTemplateDirective, typeof ItemContentTemplateDirective, typeof HierarchyBindingDirective, typeof FlatBindingDirective, typeof LinkDirective, typeof ExpandArrowComponent], [typeof ContextMenuComponent, typeof ContextMenuTemplateDirective, typeof ContextMenuTargetDirective, typeof ContextMenuTargetContainerDirective, typeof MenuComponent, typeof MenuItemComponent, typeof ItemTemplateDirective, typeof ItemLinkTemplateDirective, typeof ItemContentTemplateDirective, typeof HierarchyBindingDirective, typeof FlatBindingDirective, typeof LinkDirective, typeof ExpandArrowComponent]>;
|
|
1380
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ContextMenuModule>;
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
/**
|
|
1384
|
+
* A [module](link:site.data.urls.angular['ngmoduleapi']) that includes the Menu and ContextMenu components and directives.
|
|
1385
|
+
* Imports the MenusModule into your application [root module](link:site.data.urls.angular['ngmodules']#angular-modularity)
|
|
1386
|
+
* or any other sub-module that will use the Menu and ContextMenu components.
|
|
1387
|
+
*
|
|
1388
|
+
* @example
|
|
1389
|
+
* ```ts-no-run
|
|
1390
|
+
* import { NgModule } from '@angular/core';
|
|
1391
|
+
* import { BrowserModule } from '@angular/platform-browser';
|
|
1392
|
+
* import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
1393
|
+
* import { MenusModule } from '@progress/kendo-angular-menu';
|
|
1394
|
+
* import { AppComponent } from './app.component';
|
|
1395
|
+
*
|
|
1396
|
+
* _@NgModule({
|
|
1397
|
+
* bootstrap: [AppComponent],
|
|
1398
|
+
* declarations: [AppComponent],
|
|
1399
|
+
* imports: [BrowserModule, BrowserAnimationsModule, MenusModule]
|
|
1400
|
+
* })
|
|
1401
|
+
* export class AppModule {
|
|
1402
|
+
* }
|
|
1403
|
+
* ```
|
|
1404
|
+
*/
|
|
1405
|
+
declare class MenusModule {
|
|
1406
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenusModule, never>;
|
|
1407
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MenusModule, never, [typeof MenuComponent, typeof MenuItemComponent, typeof ItemTemplateDirective, typeof ItemLinkTemplateDirective, typeof ItemContentTemplateDirective, typeof HierarchyBindingDirective, typeof FlatBindingDirective, typeof LinkDirective, typeof ExpandArrowComponent, typeof ContextMenuComponent, typeof ContextMenuTemplateDirective, typeof ContextMenuTargetDirective, typeof ContextMenuTargetContainerDirective, typeof MenuComponent, typeof MenuItemComponent, typeof ItemTemplateDirective, typeof ItemLinkTemplateDirective, typeof ItemContentTemplateDirective, typeof HierarchyBindingDirective, typeof FlatBindingDirective, typeof LinkDirective, typeof ExpandArrowComponent], [typeof MenuComponent, typeof MenuItemComponent, typeof ItemTemplateDirective, typeof ItemLinkTemplateDirective, typeof ItemContentTemplateDirective, typeof HierarchyBindingDirective, typeof FlatBindingDirective, typeof LinkDirective, typeof ExpandArrowComponent, typeof ContextMenuComponent, typeof ContextMenuTemplateDirective, typeof ContextMenuTargetDirective, typeof ContextMenuTargetContainerDirective, typeof MenuComponent, typeof MenuItemComponent, typeof ItemTemplateDirective, typeof ItemLinkTemplateDirective, typeof ItemContentTemplateDirective, typeof HierarchyBindingDirective, typeof FlatBindingDirective, typeof LinkDirective, typeof ExpandArrowComponent]>;
|
|
1408
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MenusModule>;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
/**
|
|
1412
|
+
* Represents a utility array that contains all `Menu` related components and directives.
|
|
1413
|
+
*/
|
|
1414
|
+
declare const KENDO_MENU: readonly [typeof MenuComponent, typeof MenuItemComponent, typeof ItemTemplateDirective, typeof ItemLinkTemplateDirective, typeof ItemContentTemplateDirective, typeof HierarchyBindingDirective, typeof FlatBindingDirective, typeof LinkDirective, typeof ExpandArrowComponent];
|
|
1415
|
+
/**
|
|
1416
|
+
* Represents a utility array that contains all `ContextMenu` related components and directives.
|
|
1417
|
+
*/
|
|
1418
|
+
declare const KENDO_CONTEXTMENU: readonly [typeof ContextMenuComponent, typeof ContextMenuTemplateDirective, typeof ContextMenuTargetDirective, typeof ContextMenuTargetContainerDirective, typeof MenuComponent, typeof MenuItemComponent, typeof ItemTemplateDirective, typeof ItemLinkTemplateDirective, typeof ItemContentTemplateDirective, typeof HierarchyBindingDirective, typeof FlatBindingDirective, typeof LinkDirective, typeof ExpandArrowComponent];
|
|
1419
|
+
/**
|
|
1420
|
+
* Represents a utility array that contains all `@progress/kendo-angular-menu` related components and directives.
|
|
1421
|
+
*/
|
|
1422
|
+
declare const KENDO_MENUS: readonly [typeof MenuComponent, typeof MenuItemComponent, typeof ItemTemplateDirective, typeof ItemLinkTemplateDirective, typeof ItemContentTemplateDirective, typeof HierarchyBindingDirective, typeof FlatBindingDirective, typeof LinkDirective, typeof ExpandArrowComponent, typeof ContextMenuComponent, typeof ContextMenuTemplateDirective, typeof ContextMenuTargetDirective, typeof ContextMenuTargetContainerDirective, typeof MenuComponent, typeof MenuItemComponent, typeof ItemTemplateDirective, typeof ItemLinkTemplateDirective, typeof ItemContentTemplateDirective, typeof HierarchyBindingDirective, typeof FlatBindingDirective, typeof LinkDirective, typeof ExpandArrowComponent];
|
|
1423
|
+
|
|
1424
|
+
export { ContextMenuComponent, ContextMenuEvent, ContextMenuModule, ContextMenuPopupEvent, ContextMenuSelectEvent, ContextMenuService, ContextMenuTargetContainerDirective, ContextMenuTargetDirective, ContextMenuTemplateDirective, ExpandArrowComponent, FlatBindingDirective, HierarchyBindingDirective, ItemComponent, ItemContentTemplateDirective, ItemLinkTemplateDirective, ItemTemplateDirective, ItemsService, KENDO_CONTEXTMENU, KENDO_MENU, KENDO_MENUS, LinkDirective, ListComponent, MenuComponent, MenuEvent, MenuItemComponent, MenuModule, MenuSelectEvent, MenusModule };
|
|
1425
|
+
export type { MenuAnimation, MenuItem, MenuSize, OpenOnClickSettings, PopupSettings };
|