@progress/kendo-angular-menu 3.0.6 → 4.0.0-next.202203230842
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/kendo-angular-menu.umd.js +5 -0
- package/{dist/es2015/constants.d.ts → constants.d.ts} +0 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu-event.d.ts +0 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu-items.service.d.ts +3 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu-popup-event.d.ts +0 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu-select-event.d.ts +0 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu-target-container.directive.d.ts +3 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu-target.directive.d.ts +3 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu-target.service.d.ts +3 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu-template.directive.d.ts +3 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu.component.d.ts +4 -1
- package/{dist/es2015/context-menu → context-menu}/context-menu.module.d.ts +11 -0
- package/{dist/es2015/context-menu → context-menu}/context-menu.service.d.ts +3 -0
- package/{dist/es2015/data-binding → data-binding}/binding-directive-base.d.ts +3 -0
- package/{dist/es2015/data-binding → data-binding}/flat-binding.directive.d.ts +3 -0
- package/{dist/es2015/data-binding → data-binding}/hierachy-binding.directive.d.ts +3 -0
- package/{dist/es2015/data-binding → data-binding}/utils.d.ts +0 -0
- package/{dist/es2015/dom-queries.d.ts → dom-queries.d.ts} +0 -0
- package/{dist/es2015 → esm2015}/constants.js +0 -0
- package/{dist/es2015 → esm2015}/context-menu/context-menu-event.js +0 -0
- package/esm2015/context-menu/context-menu-items.service.js +25 -0
- package/{dist/es2015 → esm2015}/context-menu/context-menu-popup-event.js +0 -0
- package/{dist/es2015 → esm2015}/context-menu/context-menu-select-event.js +0 -0
- package/esm2015/context-menu/context-menu-target-container.directive.js +32 -0
- package/esm2015/context-menu/context-menu-target.directive.js +46 -0
- package/{dist/es2015 → esm2015}/context-menu/context-menu-target.service.js +8 -10
- package/esm2015/context-menu/context-menu-template.directive.js +32 -0
- package/{dist/es2015 → esm2015}/context-menu/context-menu.component.js +107 -113
- package/{dist/es2015 → esm2015}/context-menu/context-menu.module.js +20 -11
- package/{dist/es2015 → esm2015}/context-menu/context-menu.service.js +8 -10
- package/{dist/es2015 → esm2015}/data-binding/binding-directive-base.js +11 -0
- package/esm2015/data-binding/flat-binding.directive.js +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} +1112 -1113
- package/kendo-angular-menu.d.ts +9 -0
- package/{dist/es2015/main.d.ts → main.d.ts} +3 -2
- package/{dist/es2015/menu-animation.interface.d.ts → menu-animation.interface.d.ts} +0 -0
- package/{dist/es2015/menu-base.d.ts → menu-base.d.ts} +4 -1
- package/{dist/es2015/menu-event.d.ts → menu-event.d.ts} +0 -0
- package/{dist/es2015/menu-item.component.d.ts → menu-item.component.d.ts} +7 -4
- package/{dist/es2015/menu-item.interface.d.ts → menu-item.interface.d.ts} +0 -0
- package/{dist/es2015/menu-select-event.d.ts → menu-select-event.d.ts} +0 -0
- package/{dist/es2015/menu.component.d.ts → menu.component.d.ts} +7 -4
- package/menu.module.d.ts +54 -0
- package/{dist/es2015/menus.module.d.ts → menus.module.d.ts} +6 -0
- package/{dist/es2015/open-on-click-settings.d.ts → open-on-click-settings.d.ts} +0 -0
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +31 -106
- package/{dist/es2015/preventable-event.d.ts → preventable-event.d.ts} +0 -0
- package/{dist/es2015/rendering → rendering}/arrow.directive.d.ts +6 -3
- package/{dist/es2015/rendering → rendering}/link.directive.d.ts +4 -1
- package/rendering/list.component.d.ts +104 -0
- package/{dist/es2015/rendering → rendering}/popup-settings.d.ts +0 -0
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/{dist/es2015/services → services}/actions.service.d.ts +24 -1
- package/{dist/es2015/services → services}/hover.service.d.ts +7 -2
- package/{dist/es2015/services → services}/items.service.d.ts +4 -1
- package/{dist/es2015/services → services}/navigation.service.d.ts +6 -3
- package/{dist/es2015/templates → templates}/item-content-template.directive.d.ts +3 -0
- package/{dist/es2015/templates → templates}/item-link-template.directive.d.ts +3 -0
- package/{dist/es2015/templates → templates}/item-template.directive.d.ts +3 -0
- package/{dist/es2015/utils.d.ts → utils.d.ts} +1 -1
- package/dist/cdn/js/kendo-angular-menu.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/context-menu/context-menu-event.js +0 -13
- package/dist/es/context-menu/context-menu-items.service.js +0 -26
- package/dist/es/context-menu/context-menu-popup-event.js +0 -17
- package/dist/es/context-menu/context-menu-select-event.js +0 -17
- package/dist/es/context-menu/context-menu-target-container.directive.js +0 -31
- package/dist/es/context-menu/context-menu-target.directive.js +0 -48
- package/dist/es/context-menu/context-menu-target.service.js +0 -29
- package/dist/es/context-menu/context-menu-template.directive.js +0 -31
- package/dist/es/context-menu/context-menu.component.js +0 -456
- package/dist/es/context-menu/context-menu.module.js +0 -64
- package/dist/es/context-menu/context-menu.service.js +0 -30
- package/dist/es/data-binding/binding-directive-base.js +0 -32
- package/dist/es/data-binding/flat-binding.directive.js +0 -104
- package/dist/es/data-binding/hierachy-binding.directive.js +0 -94
- package/dist/es/data-binding/utils.js +0 -32
- package/dist/es/dom-queries.js +0 -107
- package/dist/es/index.js +0 -21
- package/dist/es/menu-base.js +0 -79
- package/dist/es/menu-event.js +0 -17
- package/dist/es/menu-item.component.js +0 -165
- package/dist/es/menu-select-event.js +0 -17
- package/dist/es/menu.component.js +0 -256
- package/dist/es/menu.module.js +0 -79
- package/dist/es/menus.module.js +0 -41
- package/dist/es/open-on-click-settings.js +0 -13
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/preventable-event.js +0 -36
- package/dist/es/rendering/arrow.directive.js +0 -81
- package/dist/es/rendering/item.component.js +0 -337
- package/dist/es/rendering/link.directive.js +0 -62
- package/dist/es/rendering/list.component.js +0 -219
- package/dist/es/rendering/popup-settings.js +0 -66
- package/dist/es/services/actions.service.js +0 -178
- package/dist/es/services/hover.service.js +0 -136
- package/dist/es/services/items.service.js +0 -140
- package/dist/es/services/navigation.service.js +0 -274
- package/dist/es/templates/item-content-template.directive.js +0 -50
- package/dist/es/templates/item-link-template.directive.js +0 -52
- package/dist/es/templates/item-template.directive.js +0 -51
- package/dist/es/utils.js +0 -18
- package/dist/es2015/context-menu/context-menu-items.service.js +0 -25
- package/dist/es2015/context-menu/context-menu-target-container.directive.js +0 -30
- package/dist/es2015/context-menu/context-menu-target.directive.js +0 -47
- package/dist/es2015/context-menu/context-menu-template.directive.js +0 -30
- package/dist/es2015/data-binding/flat-binding.directive.js +0 -101
- package/dist/es2015/data-binding/hierachy-binding.directive.js +0 -90
- package/dist/es2015/index.d.ts +0 -21
- package/dist/es2015/index.js +0 -21
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/main.js +0 -26
- package/dist/es2015/menu-animation.interface.js +0 -4
- package/dist/es2015/menu-base.js +0 -73
- package/dist/es2015/menu-item.interface.js +0 -4
- package/dist/es2015/menu.module.d.ts +0 -38
- package/dist/es2015/rendering/arrow.directive.js +0 -68
- package/dist/es2015/rendering/item.component.d.ts +0 -64
- package/dist/es2015/rendering/item.component.js +0 -327
- package/dist/es2015/rendering/link.directive.js +0 -57
- package/dist/es2015/rendering/list.component.d.ts +0 -41
- package/dist/es2015/rendering/list.component.js +0 -233
- package/dist/fesm5/index.js +0 -3222
- package/dist/npm/constants.js +0 -10
- package/dist/npm/context-menu/context-menu-event.js +0 -15
- package/dist/npm/context-menu/context-menu-items.service.js +0 -28
- package/dist/npm/context-menu/context-menu-popup-event.js +0 -19
- package/dist/npm/context-menu/context-menu-select-event.js +0 -19
- package/dist/npm/context-menu/context-menu-target-container.directive.js +0 -33
- package/dist/npm/context-menu/context-menu-target.directive.js +0 -50
- package/dist/npm/context-menu/context-menu-target.service.js +0 -31
- package/dist/npm/context-menu/context-menu-template.directive.js +0 -33
- package/dist/npm/context-menu/context-menu.component.js +0 -459
- package/dist/npm/context-menu/context-menu.module.js +0 -66
- package/dist/npm/context-menu/context-menu.service.js +0 -32
- package/dist/npm/data-binding/binding-directive-base.js +0 -34
- package/dist/npm/data-binding/flat-binding.directive.js +0 -106
- package/dist/npm/data-binding/hierachy-binding.directive.js +0 -96
- package/dist/npm/data-binding/utils.js +0 -34
- package/dist/npm/dom-queries.js +0 -110
- package/dist/npm/index.js +0 -37
- package/dist/npm/main.js +0 -50
- package/dist/npm/menu-animation.interface.js +0 -6
- package/dist/npm/menu-base.js +0 -81
- package/dist/npm/menu-event.js +0 -19
- package/dist/npm/menu-item.component.js +0 -167
- package/dist/npm/menu-item.interface.js +0 -6
- package/dist/npm/menu-select-event.js +0 -19
- package/dist/npm/menu.component.js +0 -258
- package/dist/npm/menu.module.js +0 -81
- package/dist/npm/menus.module.js +0 -43
- package/dist/npm/open-on-click-settings.js +0 -15
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/preventable-event.js +0 -38
- package/dist/npm/rendering/arrow.directive.js +0 -83
- package/dist/npm/rendering/item.component.js +0 -339
- package/dist/npm/rendering/link.directive.js +0 -64
- package/dist/npm/rendering/list.component.js +0 -221
- package/dist/npm/rendering/popup-settings.js +0 -68
- package/dist/npm/services/actions.service.js +0 -180
- package/dist/npm/services/hover.service.js +0 -138
- package/dist/npm/services/items.service.js +0 -143
- package/dist/npm/services/navigation.service.js +0 -276
- package/dist/npm/templates/item-content-template.directive.js +0 -52
- package/dist/npm/templates/item-link-template.directive.js +0 -54
- package/dist/npm/templates/item-template.directive.js +0 -53
- package/dist/npm/utils.js +0 -20
- package/dist/systemjs/kendo-angular-menu.js +0 -5
|
@@ -1,256 +0,0 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
-
import { Component, Input, HostBinding, EventEmitter, Output, NgZone, Renderer2, Optional, TemplateRef, forwardRef } from '@angular/core';
|
|
7
|
-
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
8
|
-
import { validatePackage } from '@progress/kendo-licensing';
|
|
9
|
-
import { packageMetadata } from './package-metadata';
|
|
10
|
-
import { ItemsService } from './services/items.service';
|
|
11
|
-
import { ActionsService } from './services/actions.service';
|
|
12
|
-
import { NavigationService } from './services/navigation.service';
|
|
13
|
-
import { HoverService } from './services/hover.service';
|
|
14
|
-
import { normalize } from './open-on-click-settings';
|
|
15
|
-
import { inMenu } from './dom-queries';
|
|
16
|
-
import { ContextMenuService } from './context-menu/context-menu.service';
|
|
17
|
-
import { MenuBase } from './menu-base';
|
|
18
|
-
import { Keys, isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
19
|
-
/**
|
|
20
|
-
* Represents the [Kendo UI Menu component for Angular]({% slug overview_menu %}).
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```ts
|
|
24
|
-
* _@Component({
|
|
25
|
-
* selector: 'my-app',
|
|
26
|
-
* template: `
|
|
27
|
-
* <kendo-menu [items]="items">
|
|
28
|
-
* </kendo-menu>
|
|
29
|
-
* `
|
|
30
|
-
* })
|
|
31
|
-
* class AppComponent {
|
|
32
|
-
* public items: any[] = [{ text: 'item1', items: [{ text: 'item1.1' }] }, { text: 'item2', disabled: true }];
|
|
33
|
-
* }
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
var MenuComponent = /** @class */ (function (_super) {
|
|
37
|
-
tslib_1.__extends(MenuComponent, _super);
|
|
38
|
-
function MenuComponent(itemsService, hover, actions, navigation, localization, ngZone, renderer, contextService) {
|
|
39
|
-
var _this = _super.call(this) || this;
|
|
40
|
-
_this.itemsService = itemsService;
|
|
41
|
-
_this.hover = hover;
|
|
42
|
-
_this.actions = actions;
|
|
43
|
-
_this.navigation = navigation;
|
|
44
|
-
_this.localization = localization;
|
|
45
|
-
_this.ngZone = ngZone;
|
|
46
|
-
_this.renderer = renderer;
|
|
47
|
-
_this.contextService = contextService;
|
|
48
|
-
/**
|
|
49
|
-
* Fires when a Menu item is selected ([see example]({% slug routing_menu %})).
|
|
50
|
-
*/
|
|
51
|
-
_this.select = new EventEmitter();
|
|
52
|
-
/**
|
|
53
|
-
* Fires when a Menu item is opened.
|
|
54
|
-
*/
|
|
55
|
-
_this.open = new EventEmitter();
|
|
56
|
-
/**
|
|
57
|
-
* Fires when a Menu item is closed.
|
|
58
|
-
*/
|
|
59
|
-
_this.close = new EventEmitter();
|
|
60
|
-
validatePackage(packageMetadata);
|
|
61
|
-
_this.actions.owner = _this;
|
|
62
|
-
if (contextService) {
|
|
63
|
-
contextService.items = _this.itemsService;
|
|
64
|
-
_this.contextKeyDownSubscription = contextService.keydown.subscribe(_this.contextKeyDown.bind(_this));
|
|
65
|
-
}
|
|
66
|
-
return _this;
|
|
67
|
-
}
|
|
68
|
-
MenuComponent_1 = MenuComponent;
|
|
69
|
-
Object.defineProperty(MenuComponent.prototype, "ariaOrientation", {
|
|
70
|
-
/**
|
|
71
|
-
* @hidden
|
|
72
|
-
*/
|
|
73
|
-
get: function () {
|
|
74
|
-
if (this.vertical) {
|
|
75
|
-
return 'vertical';
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
enumerable: true,
|
|
79
|
-
configurable: true
|
|
80
|
-
});
|
|
81
|
-
Object.defineProperty(MenuComponent.prototype, "contextMenuClass", {
|
|
82
|
-
/**
|
|
83
|
-
* @hidden
|
|
84
|
-
*/
|
|
85
|
-
get: function () {
|
|
86
|
-
return Boolean(this.contextService);
|
|
87
|
-
},
|
|
88
|
-
enumerable: true,
|
|
89
|
-
configurable: true
|
|
90
|
-
});
|
|
91
|
-
Object.defineProperty(MenuComponent.prototype, "direction", {
|
|
92
|
-
get: function () {
|
|
93
|
-
return this.rtl;
|
|
94
|
-
},
|
|
95
|
-
enumerable: true,
|
|
96
|
-
configurable: true
|
|
97
|
-
});
|
|
98
|
-
Object.defineProperty(MenuComponent.prototype, "rtl", {
|
|
99
|
-
get: function () {
|
|
100
|
-
return this.localization.rtl;
|
|
101
|
-
},
|
|
102
|
-
enumerable: true,
|
|
103
|
-
configurable: true
|
|
104
|
-
});
|
|
105
|
-
/**
|
|
106
|
-
* Opens or closes the specified Menu items.
|
|
107
|
-
*
|
|
108
|
-
* @param open - A Boolean value which indicates if the items will be opened or closed.
|
|
109
|
-
* @param indices - One or more values which represent the hierarchical indices of the items that will be opened or closed.
|
|
110
|
-
*/
|
|
111
|
-
MenuComponent.prototype.toggle = function (open) {
|
|
112
|
-
var indices = [];
|
|
113
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
114
|
-
indices[_i - 1] = arguments[_i];
|
|
115
|
-
}
|
|
116
|
-
for (var idx = 0; idx < indices.length; idx++) {
|
|
117
|
-
var item = this.itemsService.get(indices[idx]);
|
|
118
|
-
if (item && !item.disabled) {
|
|
119
|
-
if (open) {
|
|
120
|
-
item.open();
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
item.close();
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
/**
|
|
129
|
-
* @hidden
|
|
130
|
-
*/
|
|
131
|
-
MenuComponent.prototype.focus = function (index) {
|
|
132
|
-
this.navigation.focusIndex(index);
|
|
133
|
-
};
|
|
134
|
-
MenuComponent.prototype.ngOnChanges = function (changes) {
|
|
135
|
-
this.navigation.vertical = this.vertical;
|
|
136
|
-
this.hover.delay = this.hoverDelay;
|
|
137
|
-
if (changes.openOnClick) {
|
|
138
|
-
var openOnClick = this.openOnClick = normalize(this.openOnClick);
|
|
139
|
-
this.hover.openOnOver = !openOnClick;
|
|
140
|
-
if (openOnClick && openOnClick.toggle === 'click') {
|
|
141
|
-
this.attachCloseClick();
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
this.unsubscribeClick();
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
MenuComponent.prototype.ngAfterViewChecked = function () {
|
|
149
|
-
this.navigation.updateActive();
|
|
150
|
-
};
|
|
151
|
-
MenuComponent.prototype.ngOnDestroy = function () {
|
|
152
|
-
this.unsubscribeClick();
|
|
153
|
-
if (this.contextService) {
|
|
154
|
-
this.contextService.items = null;
|
|
155
|
-
this.contextKeyDownSubscription.unsubscribe();
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
MenuComponent.prototype.attachCloseClick = function () {
|
|
159
|
-
var _this = this;
|
|
160
|
-
if (!this.closeClickSubscription && isDocumentAvailable()) {
|
|
161
|
-
this.ngZone.runOutsideAngular(function () {
|
|
162
|
-
_this.closeClickSubscription = _this.renderer.listen('document', 'click', function (e) {
|
|
163
|
-
if (!inMenu(e.target, _this.itemsService)) {
|
|
164
|
-
_this.hover.openOnOver = false;
|
|
165
|
-
_this.actions.closeAll();
|
|
166
|
-
_this.actions.execute();
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
MenuComponent.prototype.unsubscribeClick = function () {
|
|
173
|
-
if (this.closeClickSubscription) {
|
|
174
|
-
this.closeClickSubscription();
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
MenuComponent.prototype.contextKeyDown = function (e) {
|
|
178
|
-
if (!this.itemsService.hasItems) {
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
var keyCode = e.keyCode;
|
|
182
|
-
var rtl = this.localization.rtl;
|
|
183
|
-
var first = keyCode === Keys.ArrowDown || keyCode === Keys.ArrowRight;
|
|
184
|
-
var last = keyCode === Keys.ArrowUp || keyCode === Keys.ArrowLeft;
|
|
185
|
-
var index;
|
|
186
|
-
if ((first && !rtl) || (last && rtl)) {
|
|
187
|
-
index = 'first';
|
|
188
|
-
}
|
|
189
|
-
else if ((first && rtl) || (last && !rtl)) {
|
|
190
|
-
index = 'last';
|
|
191
|
-
}
|
|
192
|
-
if (index) {
|
|
193
|
-
e.preventDefault();
|
|
194
|
-
this.focus(index);
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
var MenuComponent_1;
|
|
198
|
-
tslib_1.__decorate([
|
|
199
|
-
Input(),
|
|
200
|
-
tslib_1.__metadata("design:type", TemplateRef)
|
|
201
|
-
], MenuComponent.prototype, "menuItemTemplate", void 0);
|
|
202
|
-
tslib_1.__decorate([
|
|
203
|
-
Input(),
|
|
204
|
-
tslib_1.__metadata("design:type", TemplateRef)
|
|
205
|
-
], MenuComponent.prototype, "menuItemLinkTemplate", void 0);
|
|
206
|
-
tslib_1.__decorate([
|
|
207
|
-
Output(),
|
|
208
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
209
|
-
], MenuComponent.prototype, "select", void 0);
|
|
210
|
-
tslib_1.__decorate([
|
|
211
|
-
Output(),
|
|
212
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
213
|
-
], MenuComponent.prototype, "open", void 0);
|
|
214
|
-
tslib_1.__decorate([
|
|
215
|
-
Output(),
|
|
216
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
217
|
-
], MenuComponent.prototype, "close", void 0);
|
|
218
|
-
tslib_1.__decorate([
|
|
219
|
-
HostBinding('class.k-rtl'),
|
|
220
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
221
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
222
|
-
], MenuComponent.prototype, "direction", null);
|
|
223
|
-
MenuComponent = MenuComponent_1 = tslib_1.__decorate([
|
|
224
|
-
Component({
|
|
225
|
-
exportAs: 'kendoMenu',
|
|
226
|
-
providers: [
|
|
227
|
-
ItemsService,
|
|
228
|
-
ActionsService,
|
|
229
|
-
NavigationService,
|
|
230
|
-
HoverService,
|
|
231
|
-
LocalizationService,
|
|
232
|
-
{
|
|
233
|
-
provide: L10N_PREFIX,
|
|
234
|
-
useValue: 'kendo.menu'
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
provide: MenuBase,
|
|
238
|
-
useExisting: forwardRef(function () { return MenuComponent_1; })
|
|
239
|
-
}
|
|
240
|
-
],
|
|
241
|
-
selector: 'kendo-menu',
|
|
242
|
-
template: "\n <ul role=\"menubar\"\n [attr.aria-orientation]=\"ariaOrientation\"\n kendoMenuList [items]=\"rootItems\" [level]=\"0\" class=\"k-widget k-reset k-header k-menu\"\n [vertical]=\"vertical\" [rtl]=\"rtl\" [animate]=\"animate\" [openOnClick]=\"openOnClick\"\n [itemTemplate]=\"itemTemplate.first?.templateRef || menuItemTemplate\"\n [itemLinkTemplate]=\"itemLinkTemplate.first?.templateRef || menuItemLinkTemplate\"\n [class.k-menu-horizontal]=\"!vertical\"\n [class.k-menu-vertical]=\"vertical\"\n [class.k-context-menu]=\"contextMenuClass\">\n </ul>\n "
|
|
243
|
-
}),
|
|
244
|
-
tslib_1.__param(7, Optional()),
|
|
245
|
-
tslib_1.__metadata("design:paramtypes", [ItemsService,
|
|
246
|
-
HoverService,
|
|
247
|
-
ActionsService,
|
|
248
|
-
NavigationService,
|
|
249
|
-
LocalizationService,
|
|
250
|
-
NgZone,
|
|
251
|
-
Renderer2,
|
|
252
|
-
ContextMenuService])
|
|
253
|
-
], MenuComponent);
|
|
254
|
-
return MenuComponent;
|
|
255
|
-
}(MenuBase));
|
|
256
|
-
export { MenuComponent };
|
package/dist/es/menu.module.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
-
import { NgModule } from '@angular/core';
|
|
7
|
-
import { CommonModule } from '@angular/common';
|
|
8
|
-
import { PopupModule } from '@progress/kendo-angular-popup';
|
|
9
|
-
import { MenuComponent } from './menu.component';
|
|
10
|
-
import { MenuItemComponent } from './menu-item.component';
|
|
11
|
-
import { ListComponent } from './rendering/list.component';
|
|
12
|
-
import { ItemComponent } from './rendering/item.component';
|
|
13
|
-
import { LinkDirective } from './rendering/link.directive';
|
|
14
|
-
import { ExpandArrowDirective } from './rendering/arrow.directive';
|
|
15
|
-
import { ItemTemplateDirective } from './templates/item-template.directive';
|
|
16
|
-
import { ItemLinkTemplateDirective } from './templates/item-link-template.directive';
|
|
17
|
-
import { ItemContentTemplateDirective } from './templates/item-content-template.directive';
|
|
18
|
-
import { HierarchyBindingDirective } from './data-binding/hierachy-binding.directive';
|
|
19
|
-
import { FlatBindingDirective } from './data-binding/flat-binding.directive';
|
|
20
|
-
var COMPONENT_EXPORTS = [
|
|
21
|
-
MenuComponent,
|
|
22
|
-
MenuItemComponent,
|
|
23
|
-
ItemTemplateDirective,
|
|
24
|
-
ItemLinkTemplateDirective,
|
|
25
|
-
ItemContentTemplateDirective,
|
|
26
|
-
HierarchyBindingDirective,
|
|
27
|
-
FlatBindingDirective,
|
|
28
|
-
LinkDirective,
|
|
29
|
-
ExpandArrowDirective
|
|
30
|
-
];
|
|
31
|
-
var COMPONENT_DIRECTIVES = COMPONENT_EXPORTS.concat([
|
|
32
|
-
ListComponent,
|
|
33
|
-
ItemComponent
|
|
34
|
-
]);
|
|
35
|
-
/**
|
|
36
|
-
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
37
|
-
* definition for the Menu component.
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
*
|
|
41
|
-
* ```ts-no-run
|
|
42
|
-
* // Import the Menu module
|
|
43
|
-
* import { MenuModule } from '@progress/kendo-angular-menu';
|
|
44
|
-
*
|
|
45
|
-
* // The browser platform with a compiler
|
|
46
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
47
|
-
* import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
48
|
-
*
|
|
49
|
-
* import { NgModule } from '@angular/core';
|
|
50
|
-
*
|
|
51
|
-
* // Import the app component
|
|
52
|
-
* import { AppComponent } from './app.component';
|
|
53
|
-
*
|
|
54
|
-
* // Define the app module
|
|
55
|
-
* _@NgModule({
|
|
56
|
-
* declarations: [AppComponent], // declare app component
|
|
57
|
-
* imports: [BrowserModule, BrowserAnimationsModule, MenuModule], // import Menu module
|
|
58
|
-
* bootstrap: [AppComponent]
|
|
59
|
-
* })
|
|
60
|
-
* export class AppModule {}
|
|
61
|
-
*
|
|
62
|
-
* // Compile and launch the module
|
|
63
|
-
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
64
|
-
*
|
|
65
|
-
* ```
|
|
66
|
-
*/
|
|
67
|
-
var MenuModule = /** @class */ (function () {
|
|
68
|
-
function MenuModule() {
|
|
69
|
-
}
|
|
70
|
-
MenuModule = tslib_1.__decorate([
|
|
71
|
-
NgModule({
|
|
72
|
-
declarations: [COMPONENT_DIRECTIVES],
|
|
73
|
-
exports: [COMPONENT_EXPORTS],
|
|
74
|
-
imports: [PopupModule, CommonModule]
|
|
75
|
-
})
|
|
76
|
-
], MenuModule);
|
|
77
|
-
return MenuModule;
|
|
78
|
-
}());
|
|
79
|
-
export { MenuModule };
|
package/dist/es/menus.module.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
-
import { NgModule } from '@angular/core';
|
|
7
|
-
import { MenuModule } from './menu.module';
|
|
8
|
-
import { ContextMenuModule } from './context-menu/context-menu.module';
|
|
9
|
-
/**
|
|
10
|
-
* A [module]({{ site.data.urls.angular['ngmoduleapi'] }}) that includes the Menu and ContextMenu components and directives.
|
|
11
|
-
* Imports the MenusModule into your application [root module]({{ site.data.urls.angular['ngmodules'] }}#angular-modularity)
|
|
12
|
-
* or any other sub-module that will use the Menu and ContextMenu components.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts-no-run
|
|
16
|
-
* import { NgModule } from '@angular/core';
|
|
17
|
-
* import { BrowserModule } from '@angular/platform-browser';
|
|
18
|
-
* import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
19
|
-
* import { MenusModule } from '@progress/kendo-angular-menu';
|
|
20
|
-
* import { AppComponent } from './app.component';
|
|
21
|
-
*
|
|
22
|
-
* _@NgModule({
|
|
23
|
-
* bootstrap: [AppComponent],
|
|
24
|
-
* declarations: [AppComponent],
|
|
25
|
-
* imports: [BrowserModule, BrowserAnimationsModule, MenusModule]
|
|
26
|
-
* })
|
|
27
|
-
* export class AppModule {
|
|
28
|
-
* }
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
var MenusModule = /** @class */ (function () {
|
|
32
|
-
function MenusModule() {
|
|
33
|
-
}
|
|
34
|
-
MenusModule = tslib_1.__decorate([
|
|
35
|
-
NgModule({
|
|
36
|
-
exports: [MenuModule, ContextMenuModule]
|
|
37
|
-
})
|
|
38
|
-
], MenusModule);
|
|
39
|
-
return MenusModule;
|
|
40
|
-
}());
|
|
41
|
-
export { MenusModule };
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
/* tslint:disable:max-line-length */
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export var normalize = function (settings) {
|
|
10
|
-
return settings && Object.assign({
|
|
11
|
-
toggle: 'select'
|
|
12
|
-
}, settings);
|
|
13
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export var packageMetadata = {
|
|
9
|
-
name: '@progress/kendo-angular-menu',
|
|
10
|
-
productName: 'Kendo UI for Angular',
|
|
11
|
-
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate: 1647359300,
|
|
13
|
-
version: '',
|
|
14
|
-
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
var PreventableEvent = /** @class */ (function () {
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
function PreventableEvent(args) {
|
|
13
|
-
this.prevented = false;
|
|
14
|
-
Object.assign(this, args);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Prevents the default action for a specified event.
|
|
18
|
-
* In this way, the source component suppresses
|
|
19
|
-
* the built-in behavior that follows the event.
|
|
20
|
-
*/
|
|
21
|
-
PreventableEvent.prototype.preventDefault = function () {
|
|
22
|
-
this.prevented = true;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Returns `true` if the event was prevented
|
|
26
|
-
* by any of its subscribers.
|
|
27
|
-
*
|
|
28
|
-
* @returns `true` if the default action was prevented.
|
|
29
|
-
* Otherwise, returns `false`.
|
|
30
|
-
*/
|
|
31
|
-
PreventableEvent.prototype.isDefaultPrevented = function () {
|
|
32
|
-
return this.prevented;
|
|
33
|
-
};
|
|
34
|
-
return PreventableEvent;
|
|
35
|
-
}());
|
|
36
|
-
export { PreventableEvent };
|
|
@@ -1,81 +0,0 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
-
import { Directive, Input, HostBinding, isDevMode } from '@angular/core';
|
|
7
|
-
import { ItemsService } from '../services/items.service';
|
|
8
|
-
/**
|
|
9
|
-
* Represents a directive that can be used in the [`linkTemplate`]({% slug api_menu_itemlinktemplatedirective %})
|
|
10
|
-
* of the items to render the default expand arrow.
|
|
11
|
-
*/
|
|
12
|
-
var ExpandArrowDirective = /** @class */ (function () {
|
|
13
|
-
function ExpandArrowDirective(itemsService) {
|
|
14
|
-
this.itemsService = itemsService;
|
|
15
|
-
this.hostClasses = true;
|
|
16
|
-
this.role = 'presentation';
|
|
17
|
-
}
|
|
18
|
-
Object.defineProperty(ExpandArrowDirective.prototype, "arrowDown", {
|
|
19
|
-
get: function () {
|
|
20
|
-
return !this.item.horizontal;
|
|
21
|
-
},
|
|
22
|
-
enumerable: true,
|
|
23
|
-
configurable: true
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(ExpandArrowDirective.prototype, "arrowRight", {
|
|
26
|
-
get: function () {
|
|
27
|
-
return this.item.horizontal && !this.item.rtl;
|
|
28
|
-
},
|
|
29
|
-
enumerable: true,
|
|
30
|
-
configurable: true
|
|
31
|
-
});
|
|
32
|
-
Object.defineProperty(ExpandArrowDirective.prototype, "arrowLeft", {
|
|
33
|
-
get: function () {
|
|
34
|
-
return this.item.horizontal && this.item.rtl;
|
|
35
|
-
},
|
|
36
|
-
enumerable: true,
|
|
37
|
-
configurable: true
|
|
38
|
-
});
|
|
39
|
-
ExpandArrowDirective.prototype.ngOnInit = function () {
|
|
40
|
-
if (isDevMode() && !this.index) {
|
|
41
|
-
throw new Error('The kendoMenuExpandArrow directive requires the item index to be set.');
|
|
42
|
-
}
|
|
43
|
-
this.item = this.itemsService.get(this.index) || {};
|
|
44
|
-
};
|
|
45
|
-
tslib_1.__decorate([
|
|
46
|
-
Input('kendoMenuExpandArrow'),
|
|
47
|
-
tslib_1.__metadata("design:type", String)
|
|
48
|
-
], ExpandArrowDirective.prototype, "index", void 0);
|
|
49
|
-
tslib_1.__decorate([
|
|
50
|
-
HostBinding('class.k-icon'),
|
|
51
|
-
HostBinding('class.k-menu-expand-arrow'),
|
|
52
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
53
|
-
], ExpandArrowDirective.prototype, "hostClasses", void 0);
|
|
54
|
-
tslib_1.__decorate([
|
|
55
|
-
HostBinding('attr.role'),
|
|
56
|
-
tslib_1.__metadata("design:type", String)
|
|
57
|
-
], ExpandArrowDirective.prototype, "role", void 0);
|
|
58
|
-
tslib_1.__decorate([
|
|
59
|
-
HostBinding('class.k-i-arrow-60-down'),
|
|
60
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
61
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
62
|
-
], ExpandArrowDirective.prototype, "arrowDown", null);
|
|
63
|
-
tslib_1.__decorate([
|
|
64
|
-
HostBinding('class.k-i-arrow-60-right'),
|
|
65
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
66
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
67
|
-
], ExpandArrowDirective.prototype, "arrowRight", null);
|
|
68
|
-
tslib_1.__decorate([
|
|
69
|
-
HostBinding('class.k-i-arrow-60-left'),
|
|
70
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
71
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
72
|
-
], ExpandArrowDirective.prototype, "arrowLeft", null);
|
|
73
|
-
ExpandArrowDirective = tslib_1.__decorate([
|
|
74
|
-
Directive({
|
|
75
|
-
selector: '[kendoMenuExpandArrow]'
|
|
76
|
-
}),
|
|
77
|
-
tslib_1.__metadata("design:paramtypes", [ItemsService])
|
|
78
|
-
], ExpandArrowDirective);
|
|
79
|
-
return ExpandArrowDirective;
|
|
80
|
-
}());
|
|
81
|
-
export { ExpandArrowDirective };
|