@progress/kendo-angular-menu 3.0.6-dev.202203091409 → 4.0.0-dev.202204191048
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 +12 -0
- package/esm2015/data-binding/flat-binding.directive.js +82 -0
- package/esm2015/data-binding/hierachy-binding.directive.js +71 -0
- package/{dist/es2015 → esm2015}/data-binding/utils.js +0 -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 +0 -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} +1113 -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 -108
- 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,9 +2,7 @@
|
|
|
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
|
-
var ContextMenuComponent_1;
|
|
7
|
-
import { Component, Input, ContentChild, ViewChild, EventEmitter, Output, NgZone, Renderer2, TemplateRef, ViewContainerRef, forwardRef } from '@angular/core';
|
|
5
|
+
import { Component, Input, ContentChild, ViewChild, EventEmitter, Output, forwardRef } from '@angular/core';
|
|
8
6
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
9
7
|
import { PopupService, POPUP_CONTAINER } from '@progress/kendo-angular-popup';
|
|
10
8
|
import { hasObservers, Keys, isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
@@ -19,13 +17,15 @@ import { ItemsService } from '../services/items.service';
|
|
|
19
17
|
import { ContextMenuTargetContainerDirective } from './context-menu-target-container.directive';
|
|
20
18
|
import { TARGET_CLASS } from './context-menu-target.directive';
|
|
21
19
|
import { bodyFactory } from '../utils';
|
|
20
|
+
import * as i0 from "@angular/core";
|
|
21
|
+
import * as i1 from "@progress/kendo-angular-popup";
|
|
22
|
+
import * as i2 from "./context-menu.service";
|
|
23
|
+
import * as i3 from "../menu.component";
|
|
22
24
|
const CONTEXT_MENU = 'contextmenu';
|
|
23
25
|
const DEFAULT_ANCHOR_ALIGN = { horizontal: 'left', vertical: 'bottom' };
|
|
24
26
|
const DEFAULT_POPUP_ALIGN = { horizontal: 'left', vertical: 'top' };
|
|
25
27
|
const DEFAULT_COLLISION = { horizontal: 'fit', vertical: 'flip' };
|
|
26
28
|
const preventDefault = e => e.preventDefault();
|
|
27
|
-
const ɵ0 = preventDefault;
|
|
28
|
-
const ɵ1 = bodyFactory;
|
|
29
29
|
/**
|
|
30
30
|
* Represents the [Kendo UI ContextMenu component for Angular]({% slug overview_contextmenu %}).
|
|
31
31
|
*
|
|
@@ -45,7 +45,7 @@ const ɵ1 = bodyFactory;
|
|
|
45
45
|
* }
|
|
46
46
|
* ```
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
export class ContextMenuComponent extends MenuBase {
|
|
49
49
|
constructor(popupService, service, ngZone, renderer) {
|
|
50
50
|
super();
|
|
51
51
|
this.popupService = popupService;
|
|
@@ -332,105 +332,67 @@ let ContextMenuComponent = ContextMenuComponent_1 = class ContextMenuComponent e
|
|
|
332
332
|
get currentTargetElement() {
|
|
333
333
|
return this.directiveTarget && this.currentTarget ? this.currentTarget.element : this.currentTarget;
|
|
334
334
|
}
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
]
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
]
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
tslib_1.__decorate([
|
|
397
|
-
Output(),
|
|
398
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
399
|
-
], ContextMenuComponent.prototype, "close", void 0);
|
|
400
|
-
tslib_1.__decorate([
|
|
401
|
-
ContentChild(ContextMenuTemplateDirective, { static: false }),
|
|
402
|
-
tslib_1.__metadata("design:type", ContextMenuTemplateDirective)
|
|
403
|
-
], ContextMenuComponent.prototype, "contentTemplate", void 0);
|
|
404
|
-
tslib_1.__decorate([
|
|
405
|
-
ViewChild('default', { static: false }),
|
|
406
|
-
tslib_1.__metadata("design:type", TemplateRef)
|
|
407
|
-
], ContextMenuComponent.prototype, "defaultContentTemplate", void 0);
|
|
408
|
-
ContextMenuComponent = ContextMenuComponent_1 = tslib_1.__decorate([
|
|
409
|
-
Component({
|
|
410
|
-
exportAs: 'kendoContextMenu',
|
|
411
|
-
providers: [
|
|
412
|
-
ContextMenuService,
|
|
413
|
-
LocalizationService,
|
|
414
|
-
{
|
|
415
|
-
provide: L10N_PREFIX,
|
|
416
|
-
useValue: 'kendo.contextmenu'
|
|
417
|
-
},
|
|
418
|
-
{
|
|
419
|
-
provide: ItemsService,
|
|
420
|
-
useClass: ContextMenuItemsService
|
|
421
|
-
},
|
|
422
|
-
{
|
|
423
|
-
provide: MenuBase,
|
|
424
|
-
useExisting: forwardRef(() => ContextMenuComponent_1)
|
|
425
|
-
},
|
|
426
|
-
PopupService,
|
|
427
|
-
{
|
|
428
|
-
provide: POPUP_CONTAINER,
|
|
429
|
-
useFactory: ɵ1
|
|
430
|
-
}
|
|
431
|
-
],
|
|
432
|
-
selector: 'kendo-contextmenu',
|
|
433
|
-
template: `
|
|
335
|
+
}
|
|
336
|
+
ContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuComponent, deps: [{ token: i1.PopupService }, { token: i2.ContextMenuService }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
337
|
+
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: [
|
|
338
|
+
ContextMenuService,
|
|
339
|
+
LocalizationService,
|
|
340
|
+
{
|
|
341
|
+
provide: L10N_PREFIX,
|
|
342
|
+
useValue: 'kendo.contextmenu'
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
provide: ItemsService,
|
|
346
|
+
useClass: ContextMenuItemsService
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
provide: MenuBase,
|
|
350
|
+
useExisting: forwardRef(() => ContextMenuComponent)
|
|
351
|
+
},
|
|
352
|
+
PopupService,
|
|
353
|
+
{
|
|
354
|
+
provide: POPUP_CONTAINER,
|
|
355
|
+
useFactory: bodyFactory
|
|
356
|
+
}
|
|
357
|
+
], 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: `
|
|
358
|
+
<ng-template #default>
|
|
359
|
+
<kendo-menu [items]="rootItems"
|
|
360
|
+
[vertical]="vertical"
|
|
361
|
+
[openOnClick]="openOnClick"
|
|
362
|
+
[hoverDelay]="hoverDelay"
|
|
363
|
+
[animate]="animate"
|
|
364
|
+
[menuItemTemplate]="itemTemplate.first?.templateRef"
|
|
365
|
+
[menuItemLinkTemplate]="itemLinkTemplate.first?.templateRef"
|
|
366
|
+
></kendo-menu>
|
|
367
|
+
</ng-template>
|
|
368
|
+
`, isInline: true, components: [{ type: i3.MenuComponent, selector: "kendo-menu", inputs: ["menuItemTemplate", "menuItemLinkTemplate"], outputs: ["select", "open", "close"], exportAs: ["kendoMenu"] }] });
|
|
369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuComponent, decorators: [{
|
|
370
|
+
type: Component,
|
|
371
|
+
args: [{
|
|
372
|
+
exportAs: 'kendoContextMenu',
|
|
373
|
+
providers: [
|
|
374
|
+
ContextMenuService,
|
|
375
|
+
LocalizationService,
|
|
376
|
+
{
|
|
377
|
+
provide: L10N_PREFIX,
|
|
378
|
+
useValue: 'kendo.contextmenu'
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
provide: ItemsService,
|
|
382
|
+
useClass: ContextMenuItemsService
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
provide: MenuBase,
|
|
386
|
+
useExisting: forwardRef(() => ContextMenuComponent)
|
|
387
|
+
},
|
|
388
|
+
PopupService,
|
|
389
|
+
{
|
|
390
|
+
provide: POPUP_CONTAINER,
|
|
391
|
+
useFactory: bodyFactory
|
|
392
|
+
}
|
|
393
|
+
],
|
|
394
|
+
selector: 'kendo-contextmenu',
|
|
395
|
+
template: `
|
|
434
396
|
<ng-template #default>
|
|
435
397
|
<kendo-menu [items]="rootItems"
|
|
436
398
|
[vertical]="vertical"
|
|
@@ -442,11 +404,43 @@ ContextMenuComponent = ContextMenuComponent_1 = tslib_1.__decorate([
|
|
|
442
404
|
></kendo-menu>
|
|
443
405
|
</ng-template>
|
|
444
406
|
`
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
],
|
|
451
|
-
|
|
452
|
-
|
|
407
|
+
}]
|
|
408
|
+
}], ctorParameters: function () { return [{ type: i1.PopupService }, { type: i2.ContextMenuService }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { showOn: [{
|
|
409
|
+
type: Input
|
|
410
|
+
}], target: [{
|
|
411
|
+
type: Input
|
|
412
|
+
}], filter: [{
|
|
413
|
+
type: Input
|
|
414
|
+
}], alignToAnchor: [{
|
|
415
|
+
type: Input
|
|
416
|
+
}], vertical: [{
|
|
417
|
+
type: Input
|
|
418
|
+
}], popupAnimate: [{
|
|
419
|
+
type: Input
|
|
420
|
+
}], popupAlign: [{
|
|
421
|
+
type: Input
|
|
422
|
+
}], anchorAlign: [{
|
|
423
|
+
type: Input
|
|
424
|
+
}], collision: [{
|
|
425
|
+
type: Input
|
|
426
|
+
}], appendTo: [{
|
|
427
|
+
type: Input
|
|
428
|
+
}], ariaLabel: [{
|
|
429
|
+
type: Input
|
|
430
|
+
}], popupOpen: [{
|
|
431
|
+
type: Output
|
|
432
|
+
}], popupClose: [{
|
|
433
|
+
type: Output
|
|
434
|
+
}], select: [{
|
|
435
|
+
type: Output
|
|
436
|
+
}], open: [{
|
|
437
|
+
type: Output
|
|
438
|
+
}], close: [{
|
|
439
|
+
type: Output
|
|
440
|
+
}], contentTemplate: [{
|
|
441
|
+
type: ContentChild,
|
|
442
|
+
args: [ContextMenuTemplateDirective, { static: false }]
|
|
443
|
+
}], defaultContentTemplate: [{
|
|
444
|
+
type: ViewChild,
|
|
445
|
+
args: ['default', { static: false }]
|
|
446
|
+
}] } });
|
|
@@ -2,7 +2,6 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
5
|
import { NgModule } from '@angular/core';
|
|
7
6
|
import { CommonModule } from '@angular/common';
|
|
8
7
|
import { PopupModule } from '@progress/kendo-angular-popup';
|
|
@@ -11,6 +10,7 @@ import { ContextMenuComponent } from './context-menu.component';
|
|
|
11
10
|
import { ContextMenuTemplateDirective } from './context-menu-template.directive';
|
|
12
11
|
import { ContextMenuTargetDirective } from './context-menu-target.directive';
|
|
13
12
|
import { ContextMenuTargetContainerDirective } from './context-menu-target-container.directive';
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
14
14
|
const COMPONENT_DIRECTIVES = [
|
|
15
15
|
ContextMenuComponent,
|
|
16
16
|
ContextMenuTemplateDirective,
|
|
@@ -49,13 +49,22 @@ const COMPONENT_DIRECTIVES = [
|
|
|
49
49
|
*
|
|
50
50
|
* ```
|
|
51
51
|
*/
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
ContextMenuModule =
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
imports: [PopupModule, CommonModule, MenuModule]
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
52
|
+
export class ContextMenuModule {
|
|
53
|
+
}
|
|
54
|
+
ContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
55
|
+
ContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuModule, declarations: [ContextMenuComponent,
|
|
56
|
+
ContextMenuTemplateDirective,
|
|
57
|
+
ContextMenuTargetDirective,
|
|
58
|
+
ContextMenuTargetContainerDirective], imports: [PopupModule, CommonModule, MenuModule], exports: [ContextMenuComponent,
|
|
59
|
+
ContextMenuTemplateDirective,
|
|
60
|
+
ContextMenuTargetDirective,
|
|
61
|
+
ContextMenuTargetContainerDirective, MenuModule] });
|
|
62
|
+
ContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuModule, imports: [[PopupModule, CommonModule, MenuModule], MenuModule] });
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuModule, decorators: [{
|
|
64
|
+
type: NgModule,
|
|
65
|
+
args: [{
|
|
66
|
+
declarations: [COMPONENT_DIRECTIVES],
|
|
67
|
+
exports: [COMPONENT_DIRECTIVES, MenuModule],
|
|
68
|
+
imports: [PopupModule, CommonModule, MenuModule]
|
|
69
|
+
}]
|
|
70
|
+
}] });
|
|
@@ -2,17 +2,14 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
5
|
import { Injectable, EventEmitter } from '@angular/core';
|
|
7
6
|
import { hasObservers } from '@progress/kendo-angular-common';
|
|
8
7
|
import { inMenu } from '../dom-queries';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
9
|
/**
|
|
10
10
|
* @hidden
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
12
|
+
export class ContextMenuService {
|
|
16
13
|
constructor() {
|
|
17
14
|
this.keydown = new EventEmitter();
|
|
18
15
|
}
|
|
@@ -25,8 +22,9 @@ let ContextMenuService = class ContextMenuService {
|
|
|
25
22
|
leaveMenu(e) {
|
|
26
23
|
return this.items ? !inMenu(e.target, this.items) : true;
|
|
27
24
|
}
|
|
28
|
-
}
|
|
29
|
-
ContextMenuService =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
}
|
|
26
|
+
ContextMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
27
|
+
ContextMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuService });
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextMenuService, decorators: [{
|
|
29
|
+
type: Injectable
|
|
30
|
+
}] });
|
|
@@ -2,6 +2,9 @@
|
|
|
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 { Directive } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "../menu-base";
|
|
5
8
|
const ITEM_FIELDS = ['textField', 'urlField', 'iconField', 'disabledField', 'cssClassField', 'cssStyleField', 'separatorField'];
|
|
6
9
|
/**
|
|
7
10
|
* @hidden
|
|
@@ -28,3 +31,12 @@ export class BindingDirectiveBase {
|
|
|
28
31
|
this.menu.items = this.data ? this.mapItems(this.data) : [];
|
|
29
32
|
}
|
|
30
33
|
}
|
|
34
|
+
BindingDirectiveBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: BindingDirectiveBase, deps: [{ token: i1.MenuBase }], target: i0.ɵɵFactoryTarget.Directive });
|
|
35
|
+
BindingDirectiveBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: BindingDirectiveBase, selector: "kendoBindingBase", usesOnChanges: true, ngImport: i0 });
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: BindingDirectiveBase, decorators: [{
|
|
37
|
+
type: Directive,
|
|
38
|
+
args: [{
|
|
39
|
+
// eslint-disable-next-line
|
|
40
|
+
selector: 'kendoBindingBase'
|
|
41
|
+
}]
|
|
42
|
+
}], ctorParameters: function () { return [{ type: i1.MenuBase }]; } });
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive, Input } from '@angular/core';
|
|
6
|
+
import { BindingDirectiveBase } from './binding-directive-base';
|
|
7
|
+
import { getter } from './utils';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "../menu-base";
|
|
10
|
+
/**
|
|
11
|
+
* A directive that converts the provided flat data to [MenuItems]({% slug api_menu_menuitem %}) and binds them to the Menu.
|
|
12
|
+
*/
|
|
13
|
+
export class FlatBindingDirective extends BindingDirectiveBase {
|
|
14
|
+
constructor(menu) {
|
|
15
|
+
super(menu);
|
|
16
|
+
}
|
|
17
|
+
mapItems(items) {
|
|
18
|
+
if (!this.idField || !this.parentIdField) {
|
|
19
|
+
return items.map(item => this.createItem(item));
|
|
20
|
+
}
|
|
21
|
+
const result = [];
|
|
22
|
+
const map = {};
|
|
23
|
+
for (let idx = 0; idx < items.length; idx++) {
|
|
24
|
+
const item = items[idx];
|
|
25
|
+
const menuItem = this.createItem(item);
|
|
26
|
+
const id = getter(this.idField)(item);
|
|
27
|
+
const parentId = getter(this.parentIdField)(item);
|
|
28
|
+
if (parentId === null || parentId === undefined) {
|
|
29
|
+
result.push(menuItem);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
const parent = map[parentId] = map[parentId] || {};
|
|
33
|
+
parent.items = parent.items || [];
|
|
34
|
+
parent.items.push(menuItem);
|
|
35
|
+
}
|
|
36
|
+
if (map[id]) {
|
|
37
|
+
menuItem.items = map[id].items;
|
|
38
|
+
}
|
|
39
|
+
map[id] = menuItem;
|
|
40
|
+
}
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
createItem(dataItem) {
|
|
44
|
+
const result = { data: dataItem };
|
|
45
|
+
const fields = this.fields;
|
|
46
|
+
for (let idx = 0; idx < fields.length; idx++) {
|
|
47
|
+
const { source, target } = fields[idx];
|
|
48
|
+
result[target] = getter(source)(dataItem);
|
|
49
|
+
}
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
FlatBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FlatBindingDirective, deps: [{ token: i1.MenuBase }], target: i0.ɵɵFactoryTarget.Directive });
|
|
54
|
+
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 });
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FlatBindingDirective, decorators: [{
|
|
56
|
+
type: Directive,
|
|
57
|
+
args: [{
|
|
58
|
+
exportAs: 'kendoMenuFlatBinding',
|
|
59
|
+
selector: '[kendoMenuFlatBinding]'
|
|
60
|
+
}]
|
|
61
|
+
}], ctorParameters: function () { return [{ type: i1.MenuBase }]; }, propDecorators: { data: [{
|
|
62
|
+
type: Input,
|
|
63
|
+
args: ["kendoMenuFlatBinding"]
|
|
64
|
+
}], textField: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}], urlField: [{
|
|
67
|
+
type: Input
|
|
68
|
+
}], iconField: [{
|
|
69
|
+
type: Input
|
|
70
|
+
}], disabledField: [{
|
|
71
|
+
type: Input
|
|
72
|
+
}], cssClassField: [{
|
|
73
|
+
type: Input
|
|
74
|
+
}], cssStyleField: [{
|
|
75
|
+
type: Input
|
|
76
|
+
}], separatorField: [{
|
|
77
|
+
type: Input
|
|
78
|
+
}], idField: [{
|
|
79
|
+
type: Input
|
|
80
|
+
}], parentIdField: [{
|
|
81
|
+
type: Input
|
|
82
|
+
}] } });
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive, Input } from '@angular/core';
|
|
6
|
+
import { BindingDirectiveBase } from './binding-directive-base';
|
|
7
|
+
import { getter, last } from './utils';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "../menu-base";
|
|
10
|
+
const getField = (field, level) => Array.isArray(field) ? field[level] || last(field) : field;
|
|
11
|
+
/**
|
|
12
|
+
* A directive that converts the provided hierarchical data to [MenuItems]({% slug api_menu_menuitem %}) and binds them to the Menu.
|
|
13
|
+
*/
|
|
14
|
+
export class HierarchyBindingDirective extends BindingDirectiveBase {
|
|
15
|
+
constructor(menu) {
|
|
16
|
+
super(menu);
|
|
17
|
+
}
|
|
18
|
+
mapItems(items, level = 0) {
|
|
19
|
+
return items.map((item) => {
|
|
20
|
+
const menuItem = this.createItem(item, level);
|
|
21
|
+
const children = this.getChildren(item, level);
|
|
22
|
+
if (children) {
|
|
23
|
+
menuItem.items = this.mapItems(children, level + 1);
|
|
24
|
+
}
|
|
25
|
+
return menuItem;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
createItem(item, level) {
|
|
29
|
+
const result = { data: item };
|
|
30
|
+
const fields = this.fields;
|
|
31
|
+
for (let idx = 0; idx < fields.length; idx++) {
|
|
32
|
+
const { target, source } = fields[idx];
|
|
33
|
+
result[target] = getter(getField(source, level))(item);
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
getChildren(item, level) {
|
|
38
|
+
if (this.childrenField) {
|
|
39
|
+
const field = getField(this.childrenField, level);
|
|
40
|
+
return item[field];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
HierarchyBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HierarchyBindingDirective, deps: [{ token: i1.MenuBase }], target: i0.ɵɵFactoryTarget.Directive });
|
|
45
|
+
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 });
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HierarchyBindingDirective, decorators: [{
|
|
47
|
+
type: Directive,
|
|
48
|
+
args: [{
|
|
49
|
+
exportAs: 'kendoMenuHierarchyBinding',
|
|
50
|
+
selector: '[kendoMenuHierarchyBinding]'
|
|
51
|
+
}]
|
|
52
|
+
}], ctorParameters: function () { return [{ type: i1.MenuBase }]; }, propDecorators: { data: [{
|
|
53
|
+
type: Input,
|
|
54
|
+
args: ["kendoMenuHierarchyBinding"]
|
|
55
|
+
}], textField: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}], urlField: [{
|
|
58
|
+
type: Input
|
|
59
|
+
}], iconField: [{
|
|
60
|
+
type: Input
|
|
61
|
+
}], disabledField: [{
|
|
62
|
+
type: Input
|
|
63
|
+
}], cssClassField: [{
|
|
64
|
+
type: Input
|
|
65
|
+
}], cssStyleField: [{
|
|
66
|
+
type: Input
|
|
67
|
+
}], separatorField: [{
|
|
68
|
+
type: Input
|
|
69
|
+
}], childrenField: [{
|
|
70
|
+
type: Input
|
|
71
|
+
}] } });
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
const FIELD_REGEX = /\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;
|
|
6
6
|
const getterCache = {};
|
|
7
|
-
// tslint:disable-next-line:no-string-literal
|
|
8
7
|
getterCache['undefined'] = (obj) => obj;
|
|
9
8
|
/**
|
|
10
9
|
* @hidden
|
|
@@ -6,7 +6,6 @@ import { NODE_INDEX } from './constants';
|
|
|
6
6
|
const DEFAULT_ID = 'kendo-matches-container';
|
|
7
7
|
const focusableRegex = /^(?:a|input|select|option|textarea|button|object)$/i;
|
|
8
8
|
const matches = (element, selector) => (element.matches || element.msMatchesSelector).call(element, selector);
|
|
9
|
-
const ɵ0 = matches;
|
|
10
9
|
/**
|
|
11
10
|
* @hidden
|
|
12
11
|
*/
|
|
@@ -44,7 +43,6 @@ export const isFocusable = (element) => {
|
|
|
44
43
|
return false;
|
|
45
44
|
};
|
|
46
45
|
const toClassList = (classNames) => String(classNames).trim().split(' ');
|
|
47
|
-
const ɵ1 = toClassList;
|
|
48
46
|
/**
|
|
49
47
|
* @hidden
|
|
50
48
|
*/
|
|
@@ -104,4 +102,3 @@ export const findInContainer = (element, selector, container) => {
|
|
|
104
102
|
}
|
|
105
103
|
return match;
|
|
106
104
|
};
|
|
107
|
-
export { ɵ0, ɵ1 };
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Generated bundle index. Do not edit.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export * from './main';
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
export { MenuComponent } from './menu.component';
|
|
6
|
-
export { ListComponent } from './rendering/list.component';
|
|
7
|
-
export { ItemComponent } from './rendering/item.component';
|
|
6
|
+
export { ListComponent, ItemComponent } from './rendering/list.component';
|
|
8
7
|
export { LinkDirective } from './rendering/link.directive';
|
|
9
8
|
export { ExpandArrowDirective } from './rendering/arrow.directive';
|
|
10
9
|
export { MenuItemComponent } from './menu-item.component';
|
|
@@ -23,4 +22,6 @@ export { ContextMenuTemplateDirective } from './context-menu/context-menu-templa
|
|
|
23
22
|
export { ContextMenuComponent } from './context-menu/context-menu.component';
|
|
24
23
|
export { ContextMenuModule } from './context-menu/context-menu.module';
|
|
25
24
|
export { ContextMenuService } from './context-menu/context-menu.service';
|
|
25
|
+
export { ContextMenuTargetContainerDirective } from './context-menu/context-menu-target-container.directive';
|
|
26
|
+
export { ContextMenuTargetDirective } from './context-menu/context-menu-target.directive';
|
|
26
27
|
export { MenusModule } from './menus.module';
|
|
@@ -2,3 +2,4 @@
|
|
|
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
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Input, ContentChildren, Component } from '@angular/core';
|
|
6
|
+
import { MenuItemComponent } from './menu-item.component';
|
|
7
|
+
import { ItemTemplateDirective } from './templates/item-template.directive';
|
|
8
|
+
import { ItemLinkTemplateDirective } from './templates/item-link-template.directive';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export class MenuBase {
|
|
14
|
+
constructor() {
|
|
15
|
+
/**
|
|
16
|
+
* Specifies if the Menu will be vertical ([see example]({% slug vertical_menu %})).
|
|
17
|
+
*/
|
|
18
|
+
this.vertical = false;
|
|
19
|
+
/**
|
|
20
|
+
* Specifies that the root items can be opened only on click
|
|
21
|
+
* ([see example]({% slug openclose_menu %}#toc-opening-on-click)).
|
|
22
|
+
*/
|
|
23
|
+
this.openOnClick = false;
|
|
24
|
+
/**
|
|
25
|
+
* Specifies the delay in milliseconds before the Menu items are opened or closed on item hover
|
|
26
|
+
* or leave ([see example]({% slug openclose_menu %}#toc-delay-on-hover)). Used to avoid the accidental
|
|
27
|
+
* opening or closing of the items.
|
|
28
|
+
*/
|
|
29
|
+
this.hoverDelay = 100;
|
|
30
|
+
/**
|
|
31
|
+
* Sets the Menu animation.
|
|
32
|
+
*/
|
|
33
|
+
this.animate = true;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @hidden
|
|
37
|
+
*/
|
|
38
|
+
get rootItems() {
|
|
39
|
+
return this.items || (this.children ? this.children.toArray() : []);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
MenuBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
43
|
+
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 });
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MenuBase, decorators: [{
|
|
45
|
+
type: Component,
|
|
46
|
+
args: [{
|
|
47
|
+
selector: 'kendo-menu-base',
|
|
48
|
+
template: ``
|
|
49
|
+
}]
|
|
50
|
+
}], propDecorators: { items: [{
|
|
51
|
+
type: Input
|
|
52
|
+
}], vertical: [{
|
|
53
|
+
type: Input
|
|
54
|
+
}], openOnClick: [{
|
|
55
|
+
type: Input
|
|
56
|
+
}], hoverDelay: [{
|
|
57
|
+
type: Input
|
|
58
|
+
}], animate: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}], itemTemplate: [{
|
|
61
|
+
type: ContentChildren,
|
|
62
|
+
args: [ItemTemplateDirective]
|
|
63
|
+
}], itemLinkTemplate: [{
|
|
64
|
+
type: ContentChildren,
|
|
65
|
+
args: [ItemLinkTemplateDirective]
|
|
66
|
+
}], children: [{
|
|
67
|
+
type: ContentChildren,
|
|
68
|
+
args: [MenuItemComponent]
|
|
69
|
+
}] } });
|