@progress/kendo-angular-menu 17.0.0-develop.4 → 17.0.0-develop.40
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/README.md +35 -16
- package/context-menu/context-menu-target.directive.d.ts +1 -1
- package/context-menu/context-menu.component.d.ts +1 -1
- package/data-binding/flat-binding.directive.d.ts +1 -1
- package/data-binding/hierachy-binding.directive.d.ts +1 -1
- package/{esm2020 → esm2022}/context-menu/context-menu-event.mjs +16 -0
- package/{esm2020 → esm2022}/context-menu/context-menu-items.service.mjs +4 -3
- package/{esm2020 → esm2022}/context-menu/context-menu-popup-event.mjs +12 -0
- package/{esm2020 → esm2022}/context-menu/context-menu-select-event.mjs +4 -0
- package/{esm2020 → esm2022}/context-menu/context-menu-target-container.directive.mjs +8 -3
- package/{esm2020 → esm2022}/context-menu/context-menu-target.directive.mjs +16 -7
- package/{esm2020 → esm2022}/context-menu/context-menu-target.service.mjs +4 -6
- package/{esm2020 → esm2022}/context-menu/context-menu-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/context-menu/context-menu.component.mjs +123 -60
- package/{esm2020 → esm2022}/context-menu/context-menu.module.mjs +4 -4
- package/{esm2020 → esm2022}/context-menu/context-menu.service.mjs +6 -6
- package/{esm2020 → esm2022}/data-binding/binding-directive-base.mjs +6 -3
- package/{esm2020 → esm2022}/data-binding/flat-binding.directive.mjs +47 -3
- package/{esm2020 → esm2022}/data-binding/hierachy-binding.directive.mjs +43 -3
- package/{esm2020 → esm2022}/menu-base.mjs +49 -35
- package/{esm2020 → esm2022}/menu-event.mjs +12 -0
- package/{esm2020 → esm2022}/menu-item.component.mjs +28 -3
- package/{esm2020 → esm2022}/menu-select-event.mjs +4 -0
- package/{esm2020 → esm2022}/menu.component.mjs +73 -51
- package/{esm2020 → esm2022}/menu.module.mjs +4 -4
- package/{esm2020 → esm2022}/menus.module.mjs +4 -4
- package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
- package/{esm2020 → esm2022}/preventable-event.mjs +7 -7
- package/{esm2020 → esm2022}/rendering/arrow.component.mjs +19 -5
- package/{esm2020 → esm2022}/rendering/link.directive.mjs +15 -9
- package/{esm2020 → esm2022}/rendering/list.component.mjs +73 -35
- package/{esm2020 → esm2022}/services/actions.service.mjs +19 -4
- package/{esm2020 → esm2022}/services/hover.service.mjs +13 -10
- package/{esm2020 → esm2022}/services/items.service.mjs +6 -8
- package/{esm2020 → esm2022}/services/navigation.service.mjs +16 -11
- package/{esm2020 → esm2022}/templates/item-content-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/templates/item-link-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/templates/item-template.directive.mjs +4 -3
- package/{fesm2020 → fesm2022}/progress-kendo-angular-menu.mjs +653 -298
- package/menu-base.d.ts +1 -1
- package/menu-item.component.d.ts +1 -1
- package/menu.component.d.ts +1 -1
- package/package.json +14 -20
- package/rendering/arrow.component.d.ts +1 -1
- package/rendering/link.directive.d.ts +1 -1
- package/rendering/list.component.d.ts +2 -2
- package/size.d.ts +1 -1
- package/fesm2015/progress-kendo-angular-menu.mjs +0 -3195
- /package/{esm2020 → esm2022}/constants.mjs +0 -0
- /package/{esm2020 → esm2022}/data-binding/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/directives.mjs +0 -0
- /package/{esm2020 → esm2022}/dom-queries.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/menu-animation.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/menu-item.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/open-on-click-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/progress-kendo-angular-menu.mjs +0 -0
- /package/{esm2020 → esm2022}/rendering/popup-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/size.mjs +0 -0
- /package/{esm2020 → esm2022}/utils.mjs +0 -0
|
@@ -21,8 +21,8 @@ const packageMetadata = {
|
|
|
21
21
|
name: '@progress/kendo-angular-menu',
|
|
22
22
|
productName: 'Kendo UI for Angular',
|
|
23
23
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
24
|
-
publishDate:
|
|
25
|
-
version: '17.0.0-develop.
|
|
24
|
+
publishDate: 1730798916,
|
|
25
|
+
version: '17.0.0-develop.40',
|
|
26
26
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
27
27
|
};
|
|
28
28
|
|
|
@@ -50,11 +50,9 @@ const next = (idx, items, dir) => {
|
|
|
50
50
|
* @hidden
|
|
51
51
|
*/
|
|
52
52
|
class ItemsService {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
this.idPrefix = `k-menu${id++}`;
|
|
57
|
-
}
|
|
53
|
+
items = {};
|
|
54
|
+
lists = [];
|
|
55
|
+
idPrefix = `k-menu${id++}`;
|
|
58
56
|
get hasItems() {
|
|
59
57
|
return Object.keys(this.items).length > 0;
|
|
60
58
|
}
|
|
@@ -144,10 +142,10 @@ class ItemsService {
|
|
|
144
142
|
parentIndex(index) {
|
|
145
143
|
return index.replace(PARENT_REGEX, '');
|
|
146
144
|
}
|
|
145
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ItemsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
146
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ItemsService });
|
|
147
147
|
}
|
|
148
|
-
|
|
149
|
-
ItemsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ItemsService });
|
|
150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ItemsService, decorators: [{
|
|
148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ItemsService, decorators: [{
|
|
151
149
|
type: Injectable
|
|
152
150
|
}] });
|
|
153
151
|
|
|
@@ -157,6 +155,18 @@ const canPerformAction = (item, action) => !((action === 'open' && item.opened)
|
|
|
157
155
|
* @hidden
|
|
158
156
|
*/
|
|
159
157
|
class MenuStateEvent extends PreventableEvent$1 {
|
|
158
|
+
/**
|
|
159
|
+
* The MenuComponent that triggered the event.
|
|
160
|
+
*/
|
|
161
|
+
sender;
|
|
162
|
+
/**
|
|
163
|
+
* The item data of the event.
|
|
164
|
+
*/
|
|
165
|
+
item;
|
|
166
|
+
/**
|
|
167
|
+
* The item index of the event.
|
|
168
|
+
*/
|
|
169
|
+
index;
|
|
160
170
|
constructor(args) {
|
|
161
171
|
super();
|
|
162
172
|
Object.assign(this, args);
|
|
@@ -166,10 +176,13 @@ class MenuStateEvent extends PreventableEvent$1 {
|
|
|
166
176
|
* @hidden
|
|
167
177
|
*/
|
|
168
178
|
class ActionsService {
|
|
179
|
+
ngZone;
|
|
180
|
+
items;
|
|
181
|
+
owner;
|
|
182
|
+
actions = [];
|
|
169
183
|
constructor(ngZone, items) {
|
|
170
184
|
this.ngZone = ngZone;
|
|
171
185
|
this.items = items;
|
|
172
|
-
this.actions = [];
|
|
173
186
|
}
|
|
174
187
|
open(item, finished) {
|
|
175
188
|
if (item.disabled) {
|
|
@@ -313,10 +326,10 @@ class ActionsService {
|
|
|
313
326
|
this.close(items[idx]);
|
|
314
327
|
}
|
|
315
328
|
}
|
|
329
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ActionsService, deps: [{ token: i0.NgZone }, { token: ItemsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
330
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ActionsService });
|
|
316
331
|
}
|
|
317
|
-
|
|
318
|
-
ActionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionsService });
|
|
319
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ActionsService, decorators: [{
|
|
332
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ActionsService, decorators: [{
|
|
320
333
|
type: Injectable
|
|
321
334
|
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: ItemsService }]; } });
|
|
322
335
|
|
|
@@ -345,14 +358,13 @@ const resolvedPromise = Promise.resolve(null);
|
|
|
345
358
|
* @hidden
|
|
346
359
|
*/
|
|
347
360
|
class NavigationService {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
}
|
|
361
|
+
items;
|
|
362
|
+
actions;
|
|
363
|
+
localization;
|
|
364
|
+
ngZone;
|
|
365
|
+
vertical = false;
|
|
366
|
+
activeIndex = DEFAULT_ACTIVE;
|
|
367
|
+
focusedIdx;
|
|
356
368
|
get focusedItem() {
|
|
357
369
|
return this.items.get(this.focusedIdx);
|
|
358
370
|
}
|
|
@@ -362,6 +374,12 @@ class NavigationService {
|
|
|
362
374
|
get handlers() {
|
|
363
375
|
return this.localization.rtl ? handlersRTL : handlers;
|
|
364
376
|
}
|
|
377
|
+
constructor(items, actions, localization, ngZone) {
|
|
378
|
+
this.items = items;
|
|
379
|
+
this.actions = actions;
|
|
380
|
+
this.localization = localization;
|
|
381
|
+
this.ngZone = ngZone;
|
|
382
|
+
}
|
|
365
383
|
focus(item) {
|
|
366
384
|
if (item.index === this.focusedIdx) {
|
|
367
385
|
return;
|
|
@@ -561,10 +579,10 @@ class NavigationService {
|
|
|
561
579
|
}
|
|
562
580
|
}
|
|
563
581
|
}
|
|
582
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NavigationService, deps: [{ token: ItemsService }, { token: ActionsService }, { token: i3.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
583
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NavigationService });
|
|
564
584
|
}
|
|
565
|
-
|
|
566
|
-
NavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NavigationService });
|
|
567
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NavigationService, decorators: [{
|
|
585
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NavigationService, decorators: [{
|
|
568
586
|
type: Injectable
|
|
569
587
|
}], ctorParameters: function () { return [{ type: ItemsService }, { type: ActionsService }, { type: i3.LocalizationService }, { type: i0.NgZone }]; } });
|
|
570
588
|
|
|
@@ -573,13 +591,9 @@ const DISABLE_OPEN_ON_OVER_DELAY = 500;
|
|
|
573
591
|
* @hidden
|
|
574
592
|
*/
|
|
575
593
|
class HoverService {
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
this.delay = 100;
|
|
580
|
-
this._openOnOver = true;
|
|
581
|
-
this.scheduled = [];
|
|
582
|
-
}
|
|
594
|
+
actions;
|
|
595
|
+
items;
|
|
596
|
+
delay = 100;
|
|
583
597
|
get openOnOver() {
|
|
584
598
|
return this._openOnOver;
|
|
585
599
|
}
|
|
@@ -587,12 +601,19 @@ class HoverService {
|
|
|
587
601
|
this.cancelActions();
|
|
588
602
|
this._openOnOver = value;
|
|
589
603
|
}
|
|
604
|
+
_openOnOver = true;
|
|
605
|
+
hoveredIdx;
|
|
590
606
|
get hovered() {
|
|
591
607
|
return this.items.get(this.hoveredIdx);
|
|
592
608
|
}
|
|
593
609
|
set hovered(item) {
|
|
594
610
|
this.hoveredIdx = item ? item.index : null;
|
|
595
611
|
}
|
|
612
|
+
scheduled = [];
|
|
613
|
+
constructor(actions, items) {
|
|
614
|
+
this.actions = actions;
|
|
615
|
+
this.items = items;
|
|
616
|
+
}
|
|
596
617
|
ngOnDestroy() {
|
|
597
618
|
this.cancelActions();
|
|
598
619
|
}
|
|
@@ -676,10 +697,10 @@ class HoverService {
|
|
|
676
697
|
}
|
|
677
698
|
}
|
|
678
699
|
}
|
|
700
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HoverService, deps: [{ token: ActionsService }, { token: ItemsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
701
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HoverService });
|
|
679
702
|
}
|
|
680
|
-
|
|
681
|
-
HoverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HoverService });
|
|
682
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HoverService, decorators: [{
|
|
703
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HoverService, decorators: [{
|
|
683
704
|
type: Injectable
|
|
684
705
|
}], ctorParameters: function () { return [{ type: ActionsService }, { type: ItemsService }]; } });
|
|
685
706
|
|
|
@@ -799,9 +820,9 @@ const findInContainer = (element, selector, container) => {
|
|
|
799
820
|
* @hidden
|
|
800
821
|
*/
|
|
801
822
|
class ContextMenuService {
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
823
|
+
keydown = new EventEmitter();
|
|
824
|
+
owner;
|
|
825
|
+
items;
|
|
805
826
|
emit(name, args) {
|
|
806
827
|
this.owner.emitMenuEvent(name, args);
|
|
807
828
|
}
|
|
@@ -811,10 +832,10 @@ class ContextMenuService {
|
|
|
811
832
|
leaveMenu(e) {
|
|
812
833
|
return this.items ? !inMenu(e.target, this.items) : true;
|
|
813
834
|
}
|
|
835
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
836
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuService });
|
|
814
837
|
}
|
|
815
|
-
|
|
816
|
-
ContextMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuService });
|
|
817
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuService, decorators: [{
|
|
838
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuService, decorators: [{
|
|
818
839
|
type: Injectable
|
|
819
840
|
}] });
|
|
820
841
|
|
|
@@ -850,13 +871,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
850
871
|
* ```
|
|
851
872
|
*/
|
|
852
873
|
class ItemTemplateDirective {
|
|
874
|
+
templateRef;
|
|
853
875
|
constructor(templateRef) {
|
|
854
876
|
this.templateRef = templateRef;
|
|
855
877
|
}
|
|
878
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ItemTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
879
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ItemTemplateDirective, isStandalone: true, selector: "[kendoMenuItemTemplate]", ngImport: i0 });
|
|
856
880
|
}
|
|
857
|
-
|
|
858
|
-
ItemTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ItemTemplateDirective, isStandalone: true, selector: "[kendoMenuItemTemplate]", ngImport: i0 });
|
|
859
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ItemTemplateDirective, decorators: [{
|
|
881
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ItemTemplateDirective, decorators: [{
|
|
860
882
|
type: Directive,
|
|
861
883
|
args: [{
|
|
862
884
|
selector: '[kendoMenuItemTemplate]',
|
|
@@ -899,13 +921,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
899
921
|
* ```
|
|
900
922
|
*/
|
|
901
923
|
class ItemLinkTemplateDirective {
|
|
924
|
+
templateRef;
|
|
902
925
|
constructor(templateRef) {
|
|
903
926
|
this.templateRef = templateRef;
|
|
904
927
|
}
|
|
928
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ItemLinkTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
929
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ItemLinkTemplateDirective, isStandalone: true, selector: "[kendoMenuItemLinkTemplate]", ngImport: i0 });
|
|
905
930
|
}
|
|
906
|
-
|
|
907
|
-
ItemLinkTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ItemLinkTemplateDirective, isStandalone: true, selector: "[kendoMenuItemLinkTemplate]", ngImport: i0 });
|
|
908
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ItemLinkTemplateDirective, decorators: [{
|
|
931
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ItemLinkTemplateDirective, decorators: [{
|
|
909
932
|
type: Directive,
|
|
910
933
|
args: [{
|
|
911
934
|
selector: '[kendoMenuItemLinkTemplate]',
|
|
@@ -946,13 +969,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
946
969
|
* ```
|
|
947
970
|
*/
|
|
948
971
|
class ItemContentTemplateDirective {
|
|
972
|
+
templateRef;
|
|
949
973
|
constructor(templateRef) {
|
|
950
974
|
this.templateRef = templateRef;
|
|
951
975
|
}
|
|
976
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ItemContentTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
977
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ItemContentTemplateDirective, isStandalone: true, selector: "[kendoMenuItemContentTemplate]", ngImport: i0 });
|
|
952
978
|
}
|
|
953
|
-
|
|
954
|
-
ItemContentTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ItemContentTemplateDirective, isStandalone: true, selector: "[kendoMenuItemContentTemplate]", ngImport: i0 });
|
|
955
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ItemContentTemplateDirective, decorators: [{
|
|
979
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ItemContentTemplateDirective, decorators: [{
|
|
956
980
|
type: Directive,
|
|
957
981
|
args: [{
|
|
958
982
|
selector: '[kendoMenuItemContentTemplate]',
|
|
@@ -1008,6 +1032,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1008
1032
|
* ```
|
|
1009
1033
|
*/
|
|
1010
1034
|
class MenuItemComponent {
|
|
1035
|
+
text;
|
|
1036
|
+
url;
|
|
1037
|
+
disabled;
|
|
1038
|
+
cssClass;
|
|
1039
|
+
cssStyle;
|
|
1040
|
+
icon;
|
|
1041
|
+
svgIcon;
|
|
1042
|
+
data;
|
|
1043
|
+
separator;
|
|
1044
|
+
/**
|
|
1045
|
+
* @hidden
|
|
1046
|
+
*/
|
|
1047
|
+
itemTemplate;
|
|
1048
|
+
/**
|
|
1049
|
+
* @hidden
|
|
1050
|
+
*/
|
|
1051
|
+
itemLinkTemplate;
|
|
1052
|
+
/**
|
|
1053
|
+
* @hidden
|
|
1054
|
+
*/
|
|
1055
|
+
itemContentTemplate;
|
|
1056
|
+
/**
|
|
1057
|
+
* @hidden
|
|
1058
|
+
*/
|
|
1059
|
+
children;
|
|
1011
1060
|
/**
|
|
1012
1061
|
* @hidden
|
|
1013
1062
|
*/
|
|
@@ -1040,10 +1089,10 @@ class MenuItemComponent {
|
|
|
1040
1089
|
return this.children.toArray().filter(c => c !== this);
|
|
1041
1090
|
}
|
|
1042
1091
|
}
|
|
1092
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1093
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MenuItemComponent, isStandalone: true, selector: "kendo-menu-item", inputs: { text: "text", url: "url", disabled: "disabled", cssClass: "cssClass", cssStyle: "cssStyle", icon: "icon", svgIcon: "svgIcon", data: "data", separator: "separator" }, queries: [{ propertyName: "itemTemplate", predicate: ItemTemplateDirective }, { propertyName: "itemLinkTemplate", predicate: ItemLinkTemplateDirective }, { propertyName: "itemContentTemplate", predicate: ItemContentTemplateDirective }, { propertyName: "children", predicate: MenuItemComponent }], ngImport: i0, template: ``, isInline: true });
|
|
1043
1094
|
}
|
|
1044
|
-
|
|
1045
|
-
MenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MenuItemComponent, isStandalone: true, selector: "kendo-menu-item", inputs: { text: "text", url: "url", disabled: "disabled", cssClass: "cssClass", cssStyle: "cssStyle", icon: "icon", svgIcon: "svgIcon", data: "data", separator: "separator" }, queries: [{ propertyName: "itemTemplate", predicate: ItemTemplateDirective }, { propertyName: "itemLinkTemplate", predicate: ItemLinkTemplateDirective }, { propertyName: "itemContentTemplate", predicate: ItemContentTemplateDirective }, { propertyName: "children", predicate: MenuItemComponent }], ngImport: i0, template: ``, isInline: true });
|
|
1046
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MenuItemComponent, decorators: [{
|
|
1095
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuItemComponent, decorators: [{
|
|
1047
1096
|
type: Component,
|
|
1048
1097
|
args: [{
|
|
1049
1098
|
selector: 'kendo-menu-item',
|
|
@@ -1086,48 +1135,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1086
1135
|
* @hidden
|
|
1087
1136
|
*/
|
|
1088
1137
|
class MenuBase {
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1138
|
+
/**
|
|
1139
|
+
* Specifies the Menu items.
|
|
1140
|
+
*/
|
|
1141
|
+
items;
|
|
1142
|
+
/**
|
|
1143
|
+
* Specifies if the Menu will be vertical ([see example]({% slug vertical_menu %})).
|
|
1144
|
+
*/
|
|
1145
|
+
vertical = false;
|
|
1146
|
+
/**
|
|
1147
|
+
* Specifies that the root items can be opened only on click
|
|
1148
|
+
* ([see example]({% slug openclose_menu %}#toc-opening-on-click)).
|
|
1149
|
+
*/
|
|
1150
|
+
openOnClick = false;
|
|
1151
|
+
/**
|
|
1152
|
+
* Specifies the delay in milliseconds before the Menu items are opened or closed on item hover
|
|
1153
|
+
* or leave ([see example]({% slug openclose_menu %}#toc-delay-on-hover)). Used to avoid the accidental
|
|
1154
|
+
* opening or closing of the items.
|
|
1155
|
+
*/
|
|
1156
|
+
hoverDelay = 100;
|
|
1157
|
+
/**
|
|
1158
|
+
* Sets the Menu animation.
|
|
1159
|
+
*/
|
|
1160
|
+
animate = true;
|
|
1161
|
+
/**
|
|
1162
|
+
* Sets the Menu size.
|
|
1163
|
+
*
|
|
1164
|
+
* The possible values are:
|
|
1165
|
+
* * `small`
|
|
1166
|
+
* * `medium` (default)
|
|
1167
|
+
* * `large`
|
|
1168
|
+
* * `none`
|
|
1169
|
+
*
|
|
1170
|
+
*/
|
|
1171
|
+
size = 'medium';
|
|
1172
|
+
/**
|
|
1173
|
+
* @hidden
|
|
1174
|
+
*/
|
|
1175
|
+
itemTemplate;
|
|
1176
|
+
/**
|
|
1177
|
+
* @hidden
|
|
1178
|
+
*/
|
|
1179
|
+
itemLinkTemplate;
|
|
1180
|
+
/**
|
|
1181
|
+
* @hidden
|
|
1182
|
+
*/
|
|
1183
|
+
children;
|
|
1121
1184
|
/**
|
|
1122
1185
|
* @hidden
|
|
1123
1186
|
*/
|
|
1124
1187
|
get rootItems() {
|
|
1125
1188
|
return this.items || (this.children ? this.children.toArray() : []);
|
|
1126
1189
|
}
|
|
1190
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1191
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MenuBase, selector: "kendo-menu-base", inputs: { items: "items", vertical: "vertical", openOnClick: "openOnClick", hoverDelay: "hoverDelay", animate: "animate", size: "size" }, queries: [{ propertyName: "itemTemplate", predicate: ItemTemplateDirective }, { propertyName: "itemLinkTemplate", predicate: ItemLinkTemplateDirective }, { propertyName: "children", predicate: MenuItemComponent }], ngImport: i0, template: ``, isInline: true });
|
|
1127
1192
|
}
|
|
1128
|
-
|
|
1129
|
-
MenuBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MenuBase, selector: "kendo-menu-base", inputs: { items: "items", vertical: "vertical", openOnClick: "openOnClick", hoverDelay: "hoverDelay", animate: "animate", size: "size" }, queries: [{ propertyName: "itemTemplate", predicate: ItemTemplateDirective }, { propertyName: "itemLinkTemplate", predicate: ItemLinkTemplateDirective }, { propertyName: "children", predicate: MenuItemComponent }], ngImport: i0, template: ``, isInline: true });
|
|
1130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MenuBase, decorators: [{
|
|
1193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuBase, decorators: [{
|
|
1131
1194
|
type: Component,
|
|
1132
1195
|
args: [{
|
|
1133
1196
|
selector: 'kendo-menu-base',
|
|
@@ -1270,6 +1333,25 @@ const POPUP_SETTINGS = {
|
|
|
1270
1333
|
* @hidden
|
|
1271
1334
|
*/
|
|
1272
1335
|
class ListComponent {
|
|
1336
|
+
itemsService;
|
|
1337
|
+
hover;
|
|
1338
|
+
actions;
|
|
1339
|
+
navigation;
|
|
1340
|
+
renderer;
|
|
1341
|
+
ngZone;
|
|
1342
|
+
element;
|
|
1343
|
+
appendTo;
|
|
1344
|
+
items;
|
|
1345
|
+
level;
|
|
1346
|
+
index;
|
|
1347
|
+
animate = true;
|
|
1348
|
+
size = 'medium';
|
|
1349
|
+
vertical;
|
|
1350
|
+
rtl;
|
|
1351
|
+
openOnClick;
|
|
1352
|
+
itemTemplate;
|
|
1353
|
+
itemLinkTemplate;
|
|
1354
|
+
domSubscriptions;
|
|
1273
1355
|
constructor(itemsService, hover, actions, navigation, renderer, ngZone, element) {
|
|
1274
1356
|
this.itemsService = itemsService;
|
|
1275
1357
|
this.hover = hover;
|
|
@@ -1278,8 +1360,6 @@ class ListComponent {
|
|
|
1278
1360
|
this.renderer = renderer;
|
|
1279
1361
|
this.ngZone = ngZone;
|
|
1280
1362
|
this.element = element;
|
|
1281
|
-
this.animate = true;
|
|
1282
|
-
this.size = 'medium';
|
|
1283
1363
|
}
|
|
1284
1364
|
hierarchyIndex(index) {
|
|
1285
1365
|
return this.itemsService.itemIndex(this.index, index);
|
|
@@ -1419,10 +1499,10 @@ class ListComponent {
|
|
|
1419
1499
|
}
|
|
1420
1500
|
this.actions.execute();
|
|
1421
1501
|
}
|
|
1502
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ListComponent, deps: [{ token: ItemsService }, { token: HoverService }, { token: ActionsService }, { token: NavigationService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1503
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ListComponent, isStandalone: true, selector: "[kendoMenuList]", inputs: { appendTo: "appendTo", items: "items", level: "level", index: "index", animate: "animate", size: "size", vertical: "vertical", rtl: "rtl", openOnClick: "openOnClick", itemTemplate: "itemTemplate", itemLinkTemplate: "itemLinkTemplate" }, ngImport: i0, template: "\n <ng-container *ngFor=\"let item of items; let idx = index\">\n <li *ngIf=\"!item.separator\" \n kendoMenuItem\n [appendTo]=\"appendTo\"\n [item]=\"item\"\n [level]=\"level\"\n [size]=\"size\"\n [vertical]=\"vertical\"\n [animate]=\"animate\"\n [rtl]=\"rtl\"\n [itemTemplate]=\"itemTemplate\"\n [itemLinkTemplate]=\"itemLinkTemplate\"\n [openOnClick]=\"openOnClick\"\n [index]=\"hierarchyIndex(idx)\"\n [siblingIndex]=\"idx\"\n [attr.data-kendo-menu-index]=\"hierarchyIndex(idx)\"\n [ngClass]=\"item.cssClass\"\n [ngStyle]=\"item.cssStyle\"\n role=\"menuitem\"\n class=\"k-item k-menu-item\"\n [class.k-first]=\"idx === 0\"\n [class.k-last]=\"idx === items.length - 1\"\n [class.k-disabled]=\"item.disabled\"></li>\n <li \n *ngIf=\"item.separator\"\n class=\"k-separator k-item\"\n [ngClass]=\"item.cssClass\"\n aria-hidden=\"true\"\n [ngStyle]=\"item.cssStyle\">\n \n </li>\n </ng-container>\n ", isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return NgFor; }), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(function () { return NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i0.forwardRef(function () { return ItemComponent; }), selector: "[kendoMenuItem]", inputs: ["appendTo", "item", "level", "index", "siblingIndex", "animate", "size", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate"] }, { kind: "directive", type: i0.forwardRef(function () { return NgClass; }), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(function () { return NgStyle; }), selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
1422
1504
|
}
|
|
1423
|
-
|
|
1424
|
-
ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ListComponent, isStandalone: true, selector: "[kendoMenuList]", inputs: { appendTo: "appendTo", items: "items", level: "level", index: "index", animate: "animate", size: "size", vertical: "vertical", rtl: "rtl", openOnClick: "openOnClick", itemTemplate: "itemTemplate", itemLinkTemplate: "itemLinkTemplate" }, ngImport: i0, template: "\n <ng-container *ngFor=\"let item of items; let idx = index\">\n <li *ngIf=\"!item.separator\" \n kendoMenuItem\n [appendTo]=\"appendTo\"\n [item]=\"item\"\n [level]=\"level\"\n [size]=\"size\"\n [vertical]=\"vertical\"\n [animate]=\"animate\"\n [rtl]=\"rtl\"\n [itemTemplate]=\"itemTemplate\"\n [itemLinkTemplate]=\"itemLinkTemplate\"\n [openOnClick]=\"openOnClick\"\n [index]=\"hierarchyIndex(idx)\"\n [siblingIndex]=\"idx\"\n [attr.data-kendo-menu-index]=\"hierarchyIndex(idx)\"\n [ngClass]=\"item.cssClass\"\n [ngStyle]=\"item.cssStyle\"\n role=\"menuitem\"\n class=\"k-item k-menu-item\"\n [class.k-first]=\"idx === 0\"\n [class.k-last]=\"idx === items.length - 1\"\n [class.k-disabled]=\"item.disabled\"></li>\n <li \n *ngIf=\"item.separator\"\n class=\"k-separator k-item\"\n [ngClass]=\"item.cssClass\"\n aria-hidden=\"true\"\n [ngStyle]=\"item.cssStyle\">\n \n </li>\n </ng-container>\n ", isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return NgFor; }), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(function () { return NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i0.forwardRef(function () { return ItemComponent; }), selector: "[kendoMenuItem]", inputs: ["appendTo", "item", "level", "index", "siblingIndex", "animate", "size", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate"] }, { kind: "directive", type: i0.forwardRef(function () { return NgClass; }), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(function () { return NgStyle; }), selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
1425
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ListComponent, decorators: [{
|
|
1505
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ListComponent, decorators: [{
|
|
1426
1506
|
type: Component,
|
|
1427
1507
|
args: [{
|
|
1428
1508
|
selector: '[kendoMenuList]',
|
|
@@ -1490,29 +1570,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1490
1570
|
* @hidden
|
|
1491
1571
|
*/
|
|
1492
1572
|
class ItemComponent {
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
this.openOnClick = false;
|
|
1504
|
-
/**
|
|
1505
|
-
* @hidden
|
|
1506
|
-
*/
|
|
1507
|
-
this.fontIcon = getFontIcon;
|
|
1508
|
-
/**
|
|
1509
|
-
* @hidden
|
|
1510
|
-
*/
|
|
1511
|
-
this.SVGIcon = getSVGIcon;
|
|
1512
|
-
this.opened = false;
|
|
1513
|
-
this.navigating = false;
|
|
1514
|
-
this.destroyed = false;
|
|
1515
|
-
}
|
|
1573
|
+
itemsService;
|
|
1574
|
+
navigation;
|
|
1575
|
+
changeDetector;
|
|
1576
|
+
renderer;
|
|
1577
|
+
popupService;
|
|
1578
|
+
element;
|
|
1579
|
+
contextService;
|
|
1580
|
+
appendTo;
|
|
1581
|
+
item;
|
|
1582
|
+
level;
|
|
1516
1583
|
set index(index) {
|
|
1517
1584
|
if (this._index && this._index !== index) {
|
|
1518
1585
|
this.itemsService.remove(this);
|
|
@@ -1527,6 +1594,16 @@ class ItemComponent {
|
|
|
1527
1594
|
get index() {
|
|
1528
1595
|
return this._index;
|
|
1529
1596
|
}
|
|
1597
|
+
siblingIndex;
|
|
1598
|
+
animate = true;
|
|
1599
|
+
size = 'medium';
|
|
1600
|
+
vertical;
|
|
1601
|
+
rtl;
|
|
1602
|
+
openOnClick = false;
|
|
1603
|
+
itemTemplate;
|
|
1604
|
+
itemLinkTemplate;
|
|
1605
|
+
link;
|
|
1606
|
+
popupTemplate;
|
|
1530
1607
|
get disabled() {
|
|
1531
1608
|
return this.item.disabled;
|
|
1532
1609
|
}
|
|
@@ -1583,6 +1660,30 @@ class ItemComponent {
|
|
|
1583
1660
|
get template() {
|
|
1584
1661
|
return this.item.template || this.itemTemplate;
|
|
1585
1662
|
}
|
|
1663
|
+
/**
|
|
1664
|
+
* @hidden
|
|
1665
|
+
*/
|
|
1666
|
+
fontIcon = getFontIcon;
|
|
1667
|
+
/**
|
|
1668
|
+
* @hidden
|
|
1669
|
+
*/
|
|
1670
|
+
SVGIcon = getSVGIcon;
|
|
1671
|
+
opened = false;
|
|
1672
|
+
navigating = false;
|
|
1673
|
+
childId;
|
|
1674
|
+
contentItems;
|
|
1675
|
+
popupRef;
|
|
1676
|
+
_index;
|
|
1677
|
+
destroyed = false;
|
|
1678
|
+
constructor(itemsService, navigation, changeDetector, renderer, popupService, element, contextService) {
|
|
1679
|
+
this.itemsService = itemsService;
|
|
1680
|
+
this.navigation = navigation;
|
|
1681
|
+
this.changeDetector = changeDetector;
|
|
1682
|
+
this.renderer = renderer;
|
|
1683
|
+
this.popupService = popupService;
|
|
1684
|
+
this.element = element;
|
|
1685
|
+
this.contextService = contextService;
|
|
1686
|
+
}
|
|
1586
1687
|
hasContentTemplates() {
|
|
1587
1688
|
const item = this.item;
|
|
1588
1689
|
return this.itemTemplate || item.contentTemplate || this.itemLinkTemplate ||
|
|
@@ -1674,12 +1775,11 @@ class ItemComponent {
|
|
|
1674
1775
|
setAttribute(name, value) {
|
|
1675
1776
|
this.renderer.setAttribute(this.element.nativeElement, name, value);
|
|
1676
1777
|
}
|
|
1677
|
-
}
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
}], viewQueries: [{ propertyName: "link", first: true, predicate: ["link"], descendants: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }], ngImport: i0, template: `
|
|
1778
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ItemComponent, deps: [{ token: ItemsService }, { token: NavigationService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i5.PopupService }, { token: i0.ElementRef }, { token: ContextMenuService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1779
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ItemComponent, isStandalone: true, selector: "[kendoMenuItem]", inputs: { appendTo: "appendTo", item: "item", level: "level", index: "index", siblingIndex: "siblingIndex", animate: "animate", size: "size", vertical: "vertical", rtl: "rtl", openOnClick: "openOnClick", itemTemplate: "itemTemplate", itemLinkTemplate: "itemLinkTemplate" }, host: { properties: { "attr.aria-disabled": "this.disabled", "attr.aria-haspopup": "this.hasPopup", "attr.aria-label": "this.label" } }, providers: [PopupService, {
|
|
1780
|
+
provide: POPUP_CONTAINER,
|
|
1781
|
+
useFactory: bodyFactory
|
|
1782
|
+
}], viewQueries: [{ propertyName: "link", first: true, predicate: ["link"], descendants: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }], ngImport: i0, template: `
|
|
1683
1783
|
<span *ngIf="!hasLink && !item.content && !linkTemplate" class="k-link k-menu-link" #link
|
|
1684
1784
|
[class.k-active]="opened" role="presentation">
|
|
1685
1785
|
<ng-template [ngTemplateOutlet]="itemcontent">
|
|
@@ -1728,7 +1828,8 @@ ItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version:
|
|
|
1728
1828
|
<kendo-icon-wrapper *ngIf="hasContent" [name]="fontIcon(horizontal, rtl)" [svgIcon]="SVGIcon(horizontal, rtl)" class="k-menu-expand-arrow" aria-hidden="true"></kendo-icon-wrapper>
|
|
1729
1829
|
</ng-template>
|
|
1730
1830
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ListComponent, selector: "[kendoMenuList]", inputs: ["appendTo", "items", "level", "index", "animate", "size", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
1731
|
-
|
|
1831
|
+
}
|
|
1832
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ItemComponent, decorators: [{
|
|
1732
1833
|
type: Component,
|
|
1733
1834
|
args: [{
|
|
1734
1835
|
providers: [PopupService, {
|
|
@@ -1849,39 +1950,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1849
1950
|
* ```
|
|
1850
1951
|
*/
|
|
1851
1952
|
class MenuComponent extends MenuBase {
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1953
|
+
itemsService;
|
|
1954
|
+
hover;
|
|
1955
|
+
actions;
|
|
1956
|
+
navigation;
|
|
1957
|
+
localization;
|
|
1958
|
+
ngZone;
|
|
1959
|
+
renderer;
|
|
1960
|
+
contextService;
|
|
1961
|
+
/**
|
|
1962
|
+
* Defines the container to which the popups will be appended.
|
|
1963
|
+
*/
|
|
1964
|
+
appendTo;
|
|
1965
|
+
/**
|
|
1966
|
+
* @hidden
|
|
1967
|
+
*/
|
|
1968
|
+
menuItemTemplate;
|
|
1969
|
+
/**
|
|
1970
|
+
* @hidden
|
|
1971
|
+
*/
|
|
1972
|
+
ariaRole = 'menubar';
|
|
1973
|
+
/**
|
|
1974
|
+
* @hidden
|
|
1975
|
+
*/
|
|
1976
|
+
menuItemLinkTemplate;
|
|
1977
|
+
/**
|
|
1978
|
+
* Fires when a Menu item is selected ([see example](slug:events_menu)).
|
|
1979
|
+
*/
|
|
1980
|
+
select = new EventEmitter();
|
|
1981
|
+
/**
|
|
1982
|
+
* Fires when a Menu item is opened ([see example](slug:events_menu)).
|
|
1983
|
+
*/
|
|
1984
|
+
open = new EventEmitter();
|
|
1985
|
+
/**
|
|
1986
|
+
* Fires when a Menu item is closed ([see example](slug:events_menu)).
|
|
1987
|
+
*/
|
|
1988
|
+
close = new EventEmitter();
|
|
1885
1989
|
/**
|
|
1886
1990
|
* @hidden
|
|
1887
1991
|
*/
|
|
@@ -1913,6 +2017,25 @@ class MenuComponent extends MenuBase {
|
|
|
1913
2017
|
}
|
|
1914
2018
|
return `${staticClasses} k-menu-${this.vertical ? 'vertical' : 'horizontal'}`;
|
|
1915
2019
|
}
|
|
2020
|
+
closeClickSubscription;
|
|
2021
|
+
contextKeyDownSubscription;
|
|
2022
|
+
constructor(itemsService, hover, actions, navigation, localization, ngZone, renderer, contextService) {
|
|
2023
|
+
super();
|
|
2024
|
+
this.itemsService = itemsService;
|
|
2025
|
+
this.hover = hover;
|
|
2026
|
+
this.actions = actions;
|
|
2027
|
+
this.navigation = navigation;
|
|
2028
|
+
this.localization = localization;
|
|
2029
|
+
this.ngZone = ngZone;
|
|
2030
|
+
this.renderer = renderer;
|
|
2031
|
+
this.contextService = contextService;
|
|
2032
|
+
validatePackage(packageMetadata);
|
|
2033
|
+
this.actions.owner = this;
|
|
2034
|
+
if (contextService) {
|
|
2035
|
+
contextService.items = this.itemsService;
|
|
2036
|
+
this.contextKeyDownSubscription = contextService.keydown.subscribe(this.contextKeyDown.bind(this));
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
1916
2039
|
/**
|
|
1917
2040
|
* Opens or closes the specified Menu items.
|
|
1918
2041
|
*
|
|
@@ -2000,23 +2123,22 @@ class MenuComponent extends MenuBase {
|
|
|
2000
2123
|
this.focus(index);
|
|
2001
2124
|
}
|
|
2002
2125
|
}
|
|
2003
|
-
}
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
], exportAs: ["kendoMenu"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
|
2126
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuComponent, deps: [{ token: ItemsService }, { token: HoverService }, { token: ActionsService }, { token: NavigationService }, { token: i3.LocalizationService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: ContextMenuService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
2127
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MenuComponent, isStandalone: true, selector: "kendo-menu", inputs: { appendTo: "appendTo", menuItemTemplate: "menuItemTemplate", ariaRole: "ariaRole", menuItemLinkTemplate: "menuItemLinkTemplate" }, outputs: { select: "select", open: "open", close: "close" }, host: { properties: { "class.k-rtl": "this.direction" } }, providers: [
|
|
2128
|
+
ItemsService,
|
|
2129
|
+
ActionsService,
|
|
2130
|
+
NavigationService,
|
|
2131
|
+
HoverService,
|
|
2132
|
+
LocalizationService,
|
|
2133
|
+
{
|
|
2134
|
+
provide: L10N_PREFIX,
|
|
2135
|
+
useValue: 'kendo.menu'
|
|
2136
|
+
},
|
|
2137
|
+
{
|
|
2138
|
+
provide: MenuBase,
|
|
2139
|
+
useExisting: forwardRef(() => MenuComponent)
|
|
2140
|
+
}
|
|
2141
|
+
], exportAs: ["kendoMenu"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
|
2020
2142
|
<ul
|
|
2021
2143
|
[attr.role]="ariaRole"
|
|
2022
2144
|
[attr.aria-orientation]="ariaOrientation"
|
|
@@ -2027,7 +2149,8 @@ MenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version:
|
|
|
2027
2149
|
[ngClass]="menuClasses">
|
|
2028
2150
|
</ul>
|
|
2029
2151
|
`, isInline: true, dependencies: [{ kind: "component", type: ListComponent, selector: "[kendoMenuList]", inputs: ["appendTo", "items", "level", "index", "animate", "size", "vertical", "rtl", "openOnClick", "itemTemplate", "itemLinkTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
2030
|
-
|
|
2152
|
+
}
|
|
2153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuComponent, decorators: [{
|
|
2031
2154
|
type: Component,
|
|
2032
2155
|
args: [{
|
|
2033
2156
|
exportAs: 'kendoMenu',
|
|
@@ -2087,25 +2210,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2087
2210
|
* of the items to apply the default styling and behavior.
|
|
2088
2211
|
*/
|
|
2089
2212
|
class LinkDirective {
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2213
|
+
itemsService;
|
|
2214
|
+
/**
|
|
2215
|
+
* The index of the Menu item. The input is mandatory.
|
|
2216
|
+
*/
|
|
2217
|
+
index;
|
|
2218
|
+
hostClasses = true;
|
|
2219
|
+
role = 'presentation';
|
|
2220
|
+
tabindex = '-1';
|
|
2096
2221
|
get activeClass() {
|
|
2097
2222
|
return this.item.opened;
|
|
2098
2223
|
}
|
|
2224
|
+
item;
|
|
2225
|
+
constructor(itemsService) {
|
|
2226
|
+
this.itemsService = itemsService;
|
|
2227
|
+
}
|
|
2099
2228
|
ngOnInit() {
|
|
2100
2229
|
if (isDevMode() && !this.index) {
|
|
2101
2230
|
throw new Error('The kendoMenuItemLink directive requires the item index to be set.');
|
|
2102
2231
|
}
|
|
2103
2232
|
this.item = this.itemsService.get(this.index) || {};
|
|
2104
2233
|
}
|
|
2234
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LinkDirective, deps: [{ token: ItemsService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2235
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LinkDirective, isStandalone: true, selector: "[kendoMenuItemLink]", inputs: { index: ["kendoMenuItemLink", "index"] }, host: { properties: { "class.k-link": "this.hostClasses", "class.k-menu-link": "this.hostClasses", "attr.role": "this.role", "attr.tabindex": "this.tabindex", "class.k-active": "this.activeClass" } }, ngImport: i0 });
|
|
2105
2236
|
}
|
|
2106
|
-
|
|
2107
|
-
LinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LinkDirective, isStandalone: true, selector: "[kendoMenuItemLink]", inputs: { index: ["kendoMenuItemLink", "index"] }, host: { properties: { "class.k-link": "this.hostClasses", "class.k-menu-link": "this.hostClasses", "attr.role": "this.role", "attr.tabindex": "this.tabindex", "class.k-active": "this.activeClass" } }, ngImport: i0 });
|
|
2108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LinkDirective, decorators: [{
|
|
2237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LinkDirective, decorators: [{
|
|
2109
2238
|
type: Directive,
|
|
2110
2239
|
args: [{
|
|
2111
2240
|
selector: '[kendoMenuItemLink]',
|
|
@@ -2136,10 +2265,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2136
2265
|
* of the items to render the default expand arrow.
|
|
2137
2266
|
*/
|
|
2138
2267
|
class ExpandArrowComponent {
|
|
2268
|
+
itemsService;
|
|
2269
|
+
/**
|
|
2270
|
+
* The index of the Menu item. The input is mandatory.
|
|
2271
|
+
*/
|
|
2272
|
+
index;
|
|
2273
|
+
hostClasses = true;
|
|
2274
|
+
ariaHidden = 'true';
|
|
2275
|
+
item;
|
|
2276
|
+
/**
|
|
2277
|
+
* @hidden
|
|
2278
|
+
*/
|
|
2279
|
+
fontIcon;
|
|
2280
|
+
/**
|
|
2281
|
+
* @hidden
|
|
2282
|
+
*/
|
|
2283
|
+
SVGIcon;
|
|
2139
2284
|
constructor(itemsService) {
|
|
2140
2285
|
this.itemsService = itemsService;
|
|
2141
|
-
this.hostClasses = true;
|
|
2142
|
-
this.ariaHidden = 'true';
|
|
2143
2286
|
}
|
|
2144
2287
|
ngOnInit() {
|
|
2145
2288
|
if (isDevMode() && !this.index) {
|
|
@@ -2149,10 +2292,10 @@ class ExpandArrowComponent {
|
|
|
2149
2292
|
this.fontIcon = getFontIcon(this.item.horizontal, this.item.rtl);
|
|
2150
2293
|
this.SVGIcon = getSVGIcon(this.item.horizontal, this.item.rtl);
|
|
2151
2294
|
}
|
|
2295
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExpandArrowComponent, deps: [{ token: ItemsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2296
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ExpandArrowComponent, isStandalone: true, selector: "[kendoMenuExpandArrow]", inputs: { index: ["kendoMenuExpandArrow", "index"] }, host: { properties: { "class.k-menu-expand-arrow": "this.hostClasses", "attr.aria-hidden": "this.ariaHidden" } }, ngImport: i0, template: `<kendo-icon-wrapper [name]="fontIcon" [svgIcon]="SVGIcon"></kendo-icon-wrapper>`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
2152
2297
|
}
|
|
2153
|
-
|
|
2154
|
-
ExpandArrowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ExpandArrowComponent, isStandalone: true, selector: "[kendoMenuExpandArrow]", inputs: { index: ["kendoMenuExpandArrow", "index"] }, host: { properties: { "class.k-menu-expand-arrow": "this.hostClasses", "attr.aria-hidden": "this.ariaHidden" } }, ngImport: i0, template: `<kendo-icon-wrapper [name]="fontIcon" [svgIcon]="SVGIcon"></kendo-icon-wrapper>`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
2155
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ExpandArrowComponent, decorators: [{
|
|
2298
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExpandArrowComponent, decorators: [{
|
|
2156
2299
|
type: Component,
|
|
2157
2300
|
args: [{
|
|
2158
2301
|
selector: '[kendoMenuExpandArrow]',
|
|
@@ -2175,13 +2318,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2175
2318
|
* @hidden
|
|
2176
2319
|
*/
|
|
2177
2320
|
class PreventableEvent {
|
|
2178
|
-
|
|
2179
|
-
* @hidden
|
|
2180
|
-
*/
|
|
2181
|
-
constructor(args) {
|
|
2182
|
-
this.prevented = false;
|
|
2183
|
-
Object.assign(this, args);
|
|
2184
|
-
}
|
|
2321
|
+
prevented = false;
|
|
2185
2322
|
/**
|
|
2186
2323
|
* Prevents the default action for a specified event.
|
|
2187
2324
|
* In this way, the source component suppresses
|
|
@@ -2200,18 +2337,40 @@ class PreventableEvent {
|
|
|
2200
2337
|
isDefaultPrevented() {
|
|
2201
2338
|
return this.prevented;
|
|
2202
2339
|
}
|
|
2340
|
+
/**
|
|
2341
|
+
* @hidden
|
|
2342
|
+
*/
|
|
2343
|
+
constructor(args) {
|
|
2344
|
+
Object.assign(this, args);
|
|
2345
|
+
}
|
|
2203
2346
|
}
|
|
2204
2347
|
|
|
2205
2348
|
/**
|
|
2206
2349
|
* Arguments for the `open` and `close` events of the Menu.
|
|
2207
2350
|
*/
|
|
2208
2351
|
class MenuEvent extends PreventableEvent {
|
|
2352
|
+
/**
|
|
2353
|
+
* The MenuComponent that triggered the event.
|
|
2354
|
+
*/
|
|
2355
|
+
sender;
|
|
2356
|
+
/**
|
|
2357
|
+
* The item data of the event.
|
|
2358
|
+
*/
|
|
2359
|
+
item;
|
|
2360
|
+
/**
|
|
2361
|
+
* The item index of the event.
|
|
2362
|
+
*/
|
|
2363
|
+
index;
|
|
2209
2364
|
}
|
|
2210
2365
|
|
|
2211
2366
|
/**
|
|
2212
2367
|
* Arguments for the `select` event of the Menu.
|
|
2213
2368
|
*/
|
|
2214
2369
|
class MenuSelectEvent extends MenuEvent {
|
|
2370
|
+
/**
|
|
2371
|
+
* The DOM event that triggered the selection.
|
|
2372
|
+
*/
|
|
2373
|
+
originalEvent;
|
|
2215
2374
|
}
|
|
2216
2375
|
|
|
2217
2376
|
const ITEM_FIELDS = ['textField', 'urlField', 'iconField', 'svgIconField', 'disabledField', 'cssClassField', 'cssStyleField', 'separatorField'];
|
|
@@ -2219,6 +2378,9 @@ const ITEM_FIELDS = ['textField', 'urlField', 'iconField', 'svgIconField', 'disa
|
|
|
2219
2378
|
* @hidden
|
|
2220
2379
|
*/
|
|
2221
2380
|
class BindingDirectiveBase {
|
|
2381
|
+
menu;
|
|
2382
|
+
data;
|
|
2383
|
+
fields;
|
|
2222
2384
|
constructor(menu) {
|
|
2223
2385
|
this.menu = menu;
|
|
2224
2386
|
}
|
|
@@ -2239,10 +2401,10 @@ class BindingDirectiveBase {
|
|
|
2239
2401
|
}
|
|
2240
2402
|
this.menu.items = this.data ? this.mapItems(this.data) : [];
|
|
2241
2403
|
}
|
|
2404
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BindingDirectiveBase, deps: [{ token: MenuBase }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2405
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: BindingDirectiveBase, selector: "kendoBindingBase", usesOnChanges: true, ngImport: i0 });
|
|
2242
2406
|
}
|
|
2243
|
-
|
|
2244
|
-
BindingDirectiveBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: BindingDirectiveBase, selector: "kendoBindingBase", usesOnChanges: true, ngImport: i0 });
|
|
2245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BindingDirectiveBase, decorators: [{
|
|
2407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BindingDirectiveBase, decorators: [{
|
|
2246
2408
|
type: Directive,
|
|
2247
2409
|
args: [{
|
|
2248
2410
|
// eslint-disable-next-line
|
|
@@ -2283,6 +2445,46 @@ const getField = (field, level) => Array.isArray(field) ? field[level] || last(f
|
|
|
2283
2445
|
* A directive that converts the provided hierarchical data to [MenuItems]({% slug api_menu_menuitem %}) and binds them to the Menu.
|
|
2284
2446
|
*/
|
|
2285
2447
|
class HierarchyBindingDirective extends BindingDirectiveBase {
|
|
2448
|
+
/**
|
|
2449
|
+
* The array of data which will be used to populate the Menu.
|
|
2450
|
+
*/
|
|
2451
|
+
data;
|
|
2452
|
+
/**
|
|
2453
|
+
* Defines the `text` field (or fields) of an item.
|
|
2454
|
+
*/
|
|
2455
|
+
textField;
|
|
2456
|
+
/**
|
|
2457
|
+
* Defines the `url` field (or fields) of an item.
|
|
2458
|
+
*/
|
|
2459
|
+
urlField;
|
|
2460
|
+
/**
|
|
2461
|
+
* Defines the `icon` field (or fields) of an item.
|
|
2462
|
+
*/
|
|
2463
|
+
iconField;
|
|
2464
|
+
/**
|
|
2465
|
+
* Defines the `svgIcon` field of the items.
|
|
2466
|
+
*/
|
|
2467
|
+
svgIconField;
|
|
2468
|
+
/**
|
|
2469
|
+
* Defines the `disabled` field (or fields) of an item.
|
|
2470
|
+
*/
|
|
2471
|
+
disabledField;
|
|
2472
|
+
/**
|
|
2473
|
+
* Defines the `cssClass` field (or fields) of an item.
|
|
2474
|
+
*/
|
|
2475
|
+
cssClassField;
|
|
2476
|
+
/**
|
|
2477
|
+
* Defines the `cssStyle` field (or fields) of an item.
|
|
2478
|
+
*/
|
|
2479
|
+
cssStyleField;
|
|
2480
|
+
/**
|
|
2481
|
+
* Defines the `separator` field (or fields) of the items.
|
|
2482
|
+
*/
|
|
2483
|
+
separatorField;
|
|
2484
|
+
/**
|
|
2485
|
+
* Defines the `children` field (or fields) of the items.
|
|
2486
|
+
*/
|
|
2487
|
+
childrenField;
|
|
2286
2488
|
constructor(menu) {
|
|
2287
2489
|
super(menu);
|
|
2288
2490
|
}
|
|
@@ -2311,10 +2513,10 @@ class HierarchyBindingDirective extends BindingDirectiveBase {
|
|
|
2311
2513
|
return item[field];
|
|
2312
2514
|
}
|
|
2313
2515
|
}
|
|
2516
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HierarchyBindingDirective, deps: [{ token: MenuBase }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2517
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: HierarchyBindingDirective, isStandalone: true, selector: "[kendoMenuHierarchyBinding]", inputs: { data: ["kendoMenuHierarchyBinding", "data"], textField: "textField", urlField: "urlField", iconField: "iconField", svgIconField: "svgIconField", disabledField: "disabledField", cssClassField: "cssClassField", cssStyleField: "cssStyleField", separatorField: "separatorField", childrenField: "childrenField" }, exportAs: ["kendoMenuHierarchyBinding"], usesInheritance: true, ngImport: i0 });
|
|
2314
2518
|
}
|
|
2315
|
-
|
|
2316
|
-
HierarchyBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: HierarchyBindingDirective, isStandalone: true, selector: "[kendoMenuHierarchyBinding]", inputs: { data: ["kendoMenuHierarchyBinding", "data"], textField: "textField", urlField: "urlField", iconField: "iconField", svgIconField: "svgIconField", disabledField: "disabledField", cssClassField: "cssClassField", cssStyleField: "cssStyleField", separatorField: "separatorField", childrenField: "childrenField" }, exportAs: ["kendoMenuHierarchyBinding"], usesInheritance: true, ngImport: i0 });
|
|
2317
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HierarchyBindingDirective, decorators: [{
|
|
2519
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HierarchyBindingDirective, decorators: [{
|
|
2318
2520
|
type: Directive,
|
|
2319
2521
|
args: [{
|
|
2320
2522
|
exportAs: 'kendoMenuHierarchyBinding',
|
|
@@ -2348,6 +2550,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2348
2550
|
* A directive that converts the provided flat data to [MenuItems]({% slug api_menu_menuitem %}) and binds them to the Menu.
|
|
2349
2551
|
*/
|
|
2350
2552
|
class FlatBindingDirective extends BindingDirectiveBase {
|
|
2553
|
+
/**
|
|
2554
|
+
* The array of data which will be used to populate the Menu.
|
|
2555
|
+
*/
|
|
2556
|
+
data;
|
|
2557
|
+
/**
|
|
2558
|
+
* Defines the `text` field of the items.
|
|
2559
|
+
*/
|
|
2560
|
+
textField;
|
|
2561
|
+
/**
|
|
2562
|
+
* Defines the `url` field of the items.
|
|
2563
|
+
*/
|
|
2564
|
+
urlField;
|
|
2565
|
+
/**
|
|
2566
|
+
* Defines the `icon` field of the items.
|
|
2567
|
+
*/
|
|
2568
|
+
iconField;
|
|
2569
|
+
/**
|
|
2570
|
+
* Defines the `svgIcon` field of the items.
|
|
2571
|
+
*/
|
|
2572
|
+
svgIconField;
|
|
2573
|
+
/**
|
|
2574
|
+
* Defines the `disabled` field of the items.
|
|
2575
|
+
*/
|
|
2576
|
+
disabledField;
|
|
2577
|
+
/**
|
|
2578
|
+
* Defines the `cssClass` field of the items.
|
|
2579
|
+
*/
|
|
2580
|
+
cssClassField;
|
|
2581
|
+
/**
|
|
2582
|
+
* Defines the `cssStyle` field of the items.
|
|
2583
|
+
*/
|
|
2584
|
+
cssStyleField;
|
|
2585
|
+
/**
|
|
2586
|
+
* Defines the `separator` field of the items.
|
|
2587
|
+
*/
|
|
2588
|
+
separatorField;
|
|
2589
|
+
/**
|
|
2590
|
+
* Defines the `id` field of the items.
|
|
2591
|
+
*/
|
|
2592
|
+
idField;
|
|
2593
|
+
/**
|
|
2594
|
+
* Defines the parent `id` field of the items.
|
|
2595
|
+
*/
|
|
2596
|
+
parentIdField;
|
|
2351
2597
|
constructor(menu) {
|
|
2352
2598
|
super(menu);
|
|
2353
2599
|
}
|
|
@@ -2386,10 +2632,10 @@ class FlatBindingDirective extends BindingDirectiveBase {
|
|
|
2386
2632
|
}
|
|
2387
2633
|
return result;
|
|
2388
2634
|
}
|
|
2635
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatBindingDirective, deps: [{ token: MenuBase }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2636
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: FlatBindingDirective, isStandalone: true, selector: "[kendoMenuFlatBinding]", inputs: { data: ["kendoMenuFlatBinding", "data"], textField: "textField", urlField: "urlField", iconField: "iconField", svgIconField: "svgIconField", disabledField: "disabledField", cssClassField: "cssClassField", cssStyleField: "cssStyleField", separatorField: "separatorField", idField: "idField", parentIdField: "parentIdField" }, exportAs: ["kendoMenuFlatBinding"], usesInheritance: true, ngImport: i0 });
|
|
2389
2637
|
}
|
|
2390
|
-
|
|
2391
|
-
FlatBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: FlatBindingDirective, isStandalone: true, selector: "[kendoMenuFlatBinding]", inputs: { data: ["kendoMenuFlatBinding", "data"], textField: "textField", urlField: "urlField", iconField: "iconField", svgIconField: "svgIconField", disabledField: "disabledField", cssClassField: "cssClassField", cssStyleField: "cssStyleField", separatorField: "separatorField", idField: "idField", parentIdField: "parentIdField" }, exportAs: ["kendoMenuFlatBinding"], usesInheritance: true, ngImport: i0 });
|
|
2392
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FlatBindingDirective, decorators: [{
|
|
2638
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatBindingDirective, decorators: [{
|
|
2393
2639
|
type: Directive,
|
|
2394
2640
|
args: [{
|
|
2395
2641
|
exportAs: 'kendoMenuFlatBinding',
|
|
@@ -2425,12 +2671,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2425
2671
|
* Arguments for the `popupOpen` and `popupClose` events of the ContextMenu.
|
|
2426
2672
|
*/
|
|
2427
2673
|
class ContextMenuPopupEvent extends PreventableEvent {
|
|
2674
|
+
/**
|
|
2675
|
+
* The target element for which the ContextMenu is opened.
|
|
2676
|
+
*/
|
|
2677
|
+
target;
|
|
2678
|
+
/**
|
|
2679
|
+
* The DOM event that started the action.
|
|
2680
|
+
*/
|
|
2681
|
+
originalEvent;
|
|
2682
|
+
/**
|
|
2683
|
+
* The ContextMenuComponent that triggered the event.
|
|
2684
|
+
*/
|
|
2685
|
+
sender;
|
|
2428
2686
|
}
|
|
2429
2687
|
|
|
2430
2688
|
/**
|
|
2431
2689
|
* @hidden
|
|
2432
2690
|
*/
|
|
2433
2691
|
class ContextMenuItemsService {
|
|
2692
|
+
contextService;
|
|
2434
2693
|
constructor(contextService) {
|
|
2435
2694
|
this.contextService = contextService;
|
|
2436
2695
|
}
|
|
@@ -2439,10 +2698,10 @@ class ContextMenuItemsService {
|
|
|
2439
2698
|
return this.contextService.items.get(index);
|
|
2440
2699
|
}
|
|
2441
2700
|
}
|
|
2701
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuItemsService, deps: [{ token: ContextMenuService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2702
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuItemsService });
|
|
2442
2703
|
}
|
|
2443
|
-
|
|
2444
|
-
ContextMenuItemsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuItemsService });
|
|
2445
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuItemsService, decorators: [{
|
|
2704
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuItemsService, decorators: [{
|
|
2446
2705
|
type: Injectable
|
|
2447
2706
|
}], ctorParameters: function () { return [{ type: ContextMenuService }]; } });
|
|
2448
2707
|
|
|
@@ -2458,13 +2717,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2458
2717
|
* {% endmeta %}
|
|
2459
2718
|
*/
|
|
2460
2719
|
class ContextMenuTemplateDirective {
|
|
2720
|
+
templateRef;
|
|
2461
2721
|
constructor(templateRef) {
|
|
2462
2722
|
this.templateRef = templateRef;
|
|
2463
2723
|
}
|
|
2724
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2725
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ContextMenuTemplateDirective, isStandalone: true, selector: "[kendoContextMenuTemplate]", ngImport: i0 });
|
|
2464
2726
|
}
|
|
2465
|
-
|
|
2466
|
-
ContextMenuTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ContextMenuTemplateDirective, isStandalone: true, selector: "[kendoContextMenuTemplate]", ngImport: i0 });
|
|
2467
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuTemplateDirective, decorators: [{
|
|
2727
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuTemplateDirective, decorators: [{
|
|
2468
2728
|
type: Directive,
|
|
2469
2729
|
args: [{
|
|
2470
2730
|
selector: '[kendoContextMenuTemplate]',
|
|
@@ -2478,9 +2738,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2478
2738
|
* @hidden
|
|
2479
2739
|
*/
|
|
2480
2740
|
class ContextMenuTargetService {
|
|
2481
|
-
|
|
2482
|
-
this.targets = [];
|
|
2483
|
-
}
|
|
2741
|
+
targets = [];
|
|
2484
2742
|
add(target) {
|
|
2485
2743
|
this.targets.push(target);
|
|
2486
2744
|
}
|
|
@@ -2491,10 +2749,10 @@ class ContextMenuTargetService {
|
|
|
2491
2749
|
find(targetElement) {
|
|
2492
2750
|
return this.targets.find(target => target.element === targetElement);
|
|
2493
2751
|
}
|
|
2752
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuTargetService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2753
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuTargetService });
|
|
2494
2754
|
}
|
|
2495
|
-
|
|
2496
|
-
ContextMenuTargetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuTargetService });
|
|
2497
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuTargetService, decorators: [{
|
|
2755
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuTargetService, decorators: [{
|
|
2498
2756
|
type: Injectable
|
|
2499
2757
|
}] });
|
|
2500
2758
|
|
|
@@ -2502,6 +2760,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2502
2760
|
* Specifies a container for the [targets]({% slug api_menu_contextmenutargetdirective %}) of the ContextMenu.
|
|
2503
2761
|
*/
|
|
2504
2762
|
class ContextMenuTargetContainerDirective {
|
|
2763
|
+
targetService;
|
|
2764
|
+
/**
|
|
2765
|
+
* @hidden
|
|
2766
|
+
*/
|
|
2767
|
+
element;
|
|
2505
2768
|
/**
|
|
2506
2769
|
* @hidden
|
|
2507
2770
|
*/
|
|
@@ -2511,10 +2774,10 @@ class ContextMenuTargetContainerDirective {
|
|
|
2511
2774
|
this.element = elementRef.nativeElement;
|
|
2512
2775
|
}
|
|
2513
2776
|
}
|
|
2777
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuTargetContainerDirective, deps: [{ token: i0.ElementRef }, { token: ContextMenuTargetService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2778
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ContextMenuTargetContainerDirective, isStandalone: true, selector: "[kendoContextMenuTargetContainer]", providers: [ContextMenuTargetService], exportAs: ["kendoContextMenuTargetContainer"], ngImport: i0 });
|
|
2514
2779
|
}
|
|
2515
|
-
|
|
2516
|
-
ContextMenuTargetContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ContextMenuTargetContainerDirective, isStandalone: true, selector: "[kendoContextMenuTargetContainer]", providers: [ContextMenuTargetService], exportAs: ["kendoContextMenuTargetContainer"], ngImport: i0 });
|
|
2517
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuTargetContainerDirective, decorators: [{
|
|
2780
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuTargetContainerDirective, decorators: [{
|
|
2518
2781
|
type: Directive,
|
|
2519
2782
|
args: [{
|
|
2520
2783
|
selector: '[kendoContextMenuTargetContainer]',
|
|
@@ -2533,12 +2796,21 @@ const TARGET_CLASS = 'k-contextmenu-target';
|
|
|
2533
2796
|
* ([see example]({% slug target_contextmenu %}#toc-directives)).
|
|
2534
2797
|
*/
|
|
2535
2798
|
class ContextMenuTargetDirective {
|
|
2799
|
+
targetService;
|
|
2800
|
+
/**
|
|
2801
|
+
* The data which is associated with the target.
|
|
2802
|
+
*/
|
|
2803
|
+
data;
|
|
2804
|
+
/**
|
|
2805
|
+
* The target DOM element.
|
|
2806
|
+
*/
|
|
2807
|
+
element;
|
|
2808
|
+
/**
|
|
2809
|
+
* @hidden
|
|
2810
|
+
*/
|
|
2811
|
+
hostClass = true;
|
|
2536
2812
|
constructor(elementRef, targetService) {
|
|
2537
2813
|
this.targetService = targetService;
|
|
2538
|
-
/**
|
|
2539
|
-
* @hidden
|
|
2540
|
-
*/
|
|
2541
|
-
this.hostClass = true;
|
|
2542
2814
|
if (elementRef) {
|
|
2543
2815
|
this.element = elementRef.nativeElement;
|
|
2544
2816
|
}
|
|
@@ -2547,10 +2819,10 @@ class ContextMenuTargetDirective {
|
|
|
2547
2819
|
ngOnDestroy() {
|
|
2548
2820
|
this.targetService.remove(this);
|
|
2549
2821
|
}
|
|
2822
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuTargetDirective, deps: [{ token: i0.ElementRef }, { token: ContextMenuTargetService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2823
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ContextMenuTargetDirective, isStandalone: true, selector: "[kendoContextMenuTarget]", inputs: { data: ["kendoContextMenuTarget", "data"] }, host: { properties: { "class.k-contextmenu-target": "this.hostClass" } }, exportAs: ["kendoContextMenuTarget"], ngImport: i0 });
|
|
2550
2824
|
}
|
|
2551
|
-
|
|
2552
|
-
ContextMenuTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ContextMenuTargetDirective, isStandalone: true, selector: "[kendoContextMenuTarget]", inputs: { data: ["kendoContextMenuTarget", "data"] }, host: { properties: { "class.k-contextmenu-target": "this.hostClass" } }, exportAs: ["kendoContextMenuTarget"], ngImport: i0 });
|
|
2553
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuTargetDirective, decorators: [{
|
|
2825
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuTargetDirective, decorators: [{
|
|
2554
2826
|
type: Directive,
|
|
2555
2827
|
args: [{
|
|
2556
2828
|
selector: '[kendoContextMenuTarget]',
|
|
@@ -2590,48 +2862,111 @@ const preventDefault = e => e.preventDefault();
|
|
|
2590
2862
|
* ```
|
|
2591
2863
|
*/
|
|
2592
2864
|
class ContextMenuComponent extends MenuBase {
|
|
2865
|
+
popupService;
|
|
2866
|
+
service;
|
|
2867
|
+
ngZone;
|
|
2868
|
+
renderer;
|
|
2869
|
+
/**
|
|
2870
|
+
* Specifies the event on which the ContextMenu will open ([see example]({% slug showon_contextmenu %})).
|
|
2871
|
+
* Accepts the name of a native DOM event. For example, `click`, `dblclick`, `mouseover`, etc.
|
|
2872
|
+
* @default 'contextmenu'
|
|
2873
|
+
*/
|
|
2874
|
+
showOn = CONTEXT_MENU;
|
|
2875
|
+
/**
|
|
2876
|
+
* Specifies the element for which the ContextMenu will open ([see example]({% slug target_contextmenu %}#toc-configuration)).
|
|
2877
|
+
*/
|
|
2878
|
+
target;
|
|
2879
|
+
/**
|
|
2880
|
+
* Specifies a CSS selector which filters the elements in the target for which the ContextMenu will open
|
|
2881
|
+
* ([see example](slug:target_contextmenu#toc-changing-items-for-specific-targets)).
|
|
2882
|
+
*/
|
|
2883
|
+
filter;
|
|
2884
|
+
/**
|
|
2885
|
+
* Indicates that the ContextMenu will be aligned to the target or to the `filter` element (if specified).
|
|
2886
|
+
* @default false
|
|
2887
|
+
*/
|
|
2888
|
+
alignToAnchor = false;
|
|
2889
|
+
/**
|
|
2890
|
+
* Specifies if the Menu will be vertically rendered ([see example]({% slug orientation_contextmenu %})).
|
|
2891
|
+
* @default true
|
|
2892
|
+
*/
|
|
2893
|
+
vertical = true;
|
|
2894
|
+
/**
|
|
2895
|
+
* Specifies the popup animation.
|
|
2896
|
+
* @default true
|
|
2897
|
+
*/
|
|
2898
|
+
popupAnimate;
|
|
2899
|
+
/**
|
|
2900
|
+
* Specifies the pivot point of the popup.
|
|
2901
|
+
* @default { horizontal: 'left', vertical: 'top' }
|
|
2902
|
+
* The possible values are:
|
|
2903
|
+
* - `horizontal`—`left`, `center`, `right`
|
|
2904
|
+
* - `vertical`—`top`, `center`, `bottom`
|
|
2905
|
+
*/
|
|
2906
|
+
popupAlign;
|
|
2907
|
+
/**
|
|
2908
|
+
* Specifies the pivot point of the anchor. Applicable if `alignToAnchor` is `true`.
|
|
2909
|
+
* @default { horizontal: 'left', vertical: 'bottom' }
|
|
2910
|
+
* The possible values are:
|
|
2911
|
+
* - `horizontal`—`left`, `center`, `right`
|
|
2912
|
+
* - `vertical`—`top`, `center`, `bottom`
|
|
2913
|
+
*/
|
|
2914
|
+
anchorAlign;
|
|
2915
|
+
/**
|
|
2916
|
+
* Configures the collision behavior of the popup.
|
|
2917
|
+
* @default { horizontal: 'fit', vertical: 'flip' }
|
|
2918
|
+
*/
|
|
2919
|
+
collision;
|
|
2920
|
+
/**
|
|
2921
|
+
* Defines the container to which the popups will be appended.
|
|
2922
|
+
*/
|
|
2923
|
+
appendTo;
|
|
2924
|
+
/**
|
|
2925
|
+
* Sets the value for the [`aria-label`](https://www.w3.org/TR/wai-aria-1.1/#aria-label) attribute of the ContextMenu.
|
|
2926
|
+
*/
|
|
2927
|
+
ariaLabel;
|
|
2928
|
+
/**
|
|
2929
|
+
* Fires when the Menu is opened ([see example](slug:events_contextmenu)).
|
|
2930
|
+
*/
|
|
2931
|
+
popupOpen = new EventEmitter();
|
|
2932
|
+
/**
|
|
2933
|
+
* Fires when the Menu is closed ([see example](slug:events_contextmenu)).
|
|
2934
|
+
*/
|
|
2935
|
+
popupClose = new EventEmitter();
|
|
2936
|
+
/**
|
|
2937
|
+
* Fires when a Menu item is selected ([see example](slug:events_contextmenu)).
|
|
2938
|
+
*/
|
|
2939
|
+
select = new EventEmitter();
|
|
2940
|
+
/**
|
|
2941
|
+
* Fires when a Menu item is opened ([see example](slug:events_contextmenu)).
|
|
2942
|
+
*/
|
|
2943
|
+
open = new EventEmitter();
|
|
2944
|
+
/**
|
|
2945
|
+
* Fires when a Menu item is closed ([see example](slug:events_contextmenu)).
|
|
2946
|
+
*/
|
|
2947
|
+
close = new EventEmitter();
|
|
2948
|
+
/**
|
|
2949
|
+
* @hidden
|
|
2950
|
+
*/
|
|
2951
|
+
contentTemplate;
|
|
2952
|
+
/**
|
|
2953
|
+
* @hidden
|
|
2954
|
+
*/
|
|
2955
|
+
defaultContentTemplate;
|
|
2956
|
+
closeSubscription;
|
|
2957
|
+
showSubscription;
|
|
2958
|
+
keydownSubscription;
|
|
2959
|
+
popupSubscriptions;
|
|
2960
|
+
popupRef;
|
|
2961
|
+
currentTarget;
|
|
2962
|
+
directiveTarget;
|
|
2963
|
+
activeTarget;
|
|
2593
2964
|
constructor(popupService, service, ngZone, renderer) {
|
|
2594
2965
|
super();
|
|
2595
2966
|
this.popupService = popupService;
|
|
2596
2967
|
this.service = service;
|
|
2597
2968
|
this.ngZone = ngZone;
|
|
2598
2969
|
this.renderer = renderer;
|
|
2599
|
-
/**
|
|
2600
|
-
* Specifies the event on which the ContextMenu will open ([see example]({% slug showon_contextmenu %})).
|
|
2601
|
-
* Accepts the name of a native DOM event. For example, `click`, `dblclick`, `mouseover`, etc.
|
|
2602
|
-
* @default 'contextmenu'
|
|
2603
|
-
*/
|
|
2604
|
-
this.showOn = CONTEXT_MENU;
|
|
2605
|
-
/**
|
|
2606
|
-
* Indicates that the ContextMenu will be aligned to the target or to the `filter` element (if specified).
|
|
2607
|
-
* @default false
|
|
2608
|
-
*/
|
|
2609
|
-
this.alignToAnchor = false;
|
|
2610
|
-
/**
|
|
2611
|
-
* Specifies if the Menu will be vertically rendered ([see example]({% slug orientation_contextmenu %})).
|
|
2612
|
-
* @default true
|
|
2613
|
-
*/
|
|
2614
|
-
this.vertical = true;
|
|
2615
|
-
/**
|
|
2616
|
-
* Fires when the Menu is opened ([see example](slug:events_contextmenu)).
|
|
2617
|
-
*/
|
|
2618
|
-
this.popupOpen = new EventEmitter();
|
|
2619
|
-
/**
|
|
2620
|
-
* Fires when the Menu is closed ([see example](slug:events_contextmenu)).
|
|
2621
|
-
*/
|
|
2622
|
-
this.popupClose = new EventEmitter();
|
|
2623
|
-
/**
|
|
2624
|
-
* Fires when a Menu item is selected ([see example](slug:events_contextmenu)).
|
|
2625
|
-
*/
|
|
2626
|
-
this.select = new EventEmitter();
|
|
2627
|
-
/**
|
|
2628
|
-
* Fires when a Menu item is opened ([see example](slug:events_contextmenu)).
|
|
2629
|
-
*/
|
|
2630
|
-
this.open = new EventEmitter();
|
|
2631
|
-
/**
|
|
2632
|
-
* Fires when a Menu item is closed ([see example](slug:events_contextmenu)).
|
|
2633
|
-
*/
|
|
2634
|
-
this.close = new EventEmitter();
|
|
2635
2970
|
this.service.owner = this;
|
|
2636
2971
|
this.popupKeyDownHandler = this.popupKeyDownHandler.bind(this);
|
|
2637
2972
|
}
|
|
@@ -2879,29 +3214,28 @@ class ContextMenuComponent extends MenuBase {
|
|
|
2879
3214
|
get currentTargetElement() {
|
|
2880
3215
|
return this.directiveTarget && this.currentTarget ? this.currentTarget.element : this.currentTarget;
|
|
2881
3216
|
}
|
|
2882
|
-
}
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
}
|
|
2904
|
-
], 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: `
|
|
3217
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuComponent, deps: [{ token: i5.PopupService }, { token: ContextMenuService }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
3218
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ContextMenuComponent, isStandalone: true, 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: [
|
|
3219
|
+
ContextMenuService,
|
|
3220
|
+
LocalizationService,
|
|
3221
|
+
{
|
|
3222
|
+
provide: L10N_PREFIX,
|
|
3223
|
+
useValue: 'kendo.contextmenu'
|
|
3224
|
+
},
|
|
3225
|
+
{
|
|
3226
|
+
provide: ItemsService,
|
|
3227
|
+
useClass: ContextMenuItemsService
|
|
3228
|
+
},
|
|
3229
|
+
{
|
|
3230
|
+
provide: MenuBase,
|
|
3231
|
+
useExisting: forwardRef(() => ContextMenuComponent)
|
|
3232
|
+
},
|
|
3233
|
+
PopupService,
|
|
3234
|
+
{
|
|
3235
|
+
provide: POPUP_CONTAINER,
|
|
3236
|
+
useFactory: bodyFactory
|
|
3237
|
+
}
|
|
3238
|
+
], 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: `
|
|
2905
3239
|
<ng-template #default>
|
|
2906
3240
|
<kendo-menu [items]="rootItems"
|
|
2907
3241
|
[appendTo]="appendTo"
|
|
@@ -2916,7 +3250,8 @@ ContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
|
|
|
2916
3250
|
></kendo-menu>
|
|
2917
3251
|
</ng-template>
|
|
2918
3252
|
`, isInline: true, dependencies: [{ kind: "component", type: MenuComponent, selector: "kendo-menu", inputs: ["appendTo", "menuItemTemplate", "ariaRole", "menuItemLinkTemplate"], outputs: ["select", "open", "close"], exportAs: ["kendoMenu"] }] });
|
|
2919
|
-
|
|
3253
|
+
}
|
|
3254
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuComponent, decorators: [{
|
|
2920
3255
|
type: Component,
|
|
2921
3256
|
args: [{
|
|
2922
3257
|
exportAs: 'kendoContextMenu',
|
|
@@ -3066,11 +3401,11 @@ const KENDO_MENUS = [
|
|
|
3066
3401
|
* ```
|
|
3067
3402
|
*/
|
|
3068
3403
|
class MenuModule {
|
|
3404
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3405
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: MenuModule, imports: [MenuComponent, MenuItemComponent, ItemTemplateDirective, ItemLinkTemplateDirective, ItemContentTemplateDirective, HierarchyBindingDirective, FlatBindingDirective, LinkDirective, ExpandArrowComponent], exports: [MenuComponent, MenuItemComponent, ItemTemplateDirective, ItemLinkTemplateDirective, ItemContentTemplateDirective, HierarchyBindingDirective, FlatBindingDirective, LinkDirective, ExpandArrowComponent] });
|
|
3406
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuModule, providers: [PopupService, IconsService, ResizeBatchService], imports: [MenuComponent, ExpandArrowComponent] });
|
|
3069
3407
|
}
|
|
3070
|
-
|
|
3071
|
-
MenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MenuModule, imports: [MenuComponent, MenuItemComponent, ItemTemplateDirective, ItemLinkTemplateDirective, ItemContentTemplateDirective, HierarchyBindingDirective, FlatBindingDirective, LinkDirective, ExpandArrowComponent], exports: [MenuComponent, MenuItemComponent, ItemTemplateDirective, ItemLinkTemplateDirective, ItemContentTemplateDirective, HierarchyBindingDirective, FlatBindingDirective, LinkDirective, ExpandArrowComponent] });
|
|
3072
|
-
MenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MenuModule, providers: [PopupService, IconsService, ResizeBatchService], imports: [MenuComponent, MenuItemComponent, ExpandArrowComponent] });
|
|
3073
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MenuModule, decorators: [{
|
|
3408
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuModule, decorators: [{
|
|
3074
3409
|
type: NgModule,
|
|
3075
3410
|
args: [{
|
|
3076
3411
|
exports: [...KENDO_MENU],
|
|
@@ -3083,12 +3418,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3083
3418
|
* Arguments for the `open` and `close` events of the ContextMenu.
|
|
3084
3419
|
*/
|
|
3085
3420
|
class ContextMenuEvent {
|
|
3421
|
+
/**
|
|
3422
|
+
* The target element for which the ContextMenu is opened.
|
|
3423
|
+
*/
|
|
3424
|
+
target;
|
|
3425
|
+
/**
|
|
3426
|
+
* The ContextMenuComponent that triggered the event.
|
|
3427
|
+
*/
|
|
3428
|
+
sender;
|
|
3429
|
+
/**
|
|
3430
|
+
* The item data of the event.
|
|
3431
|
+
*/
|
|
3432
|
+
item;
|
|
3433
|
+
/**
|
|
3434
|
+
* The item index of the event.
|
|
3435
|
+
*/
|
|
3436
|
+
index;
|
|
3086
3437
|
}
|
|
3087
3438
|
|
|
3088
3439
|
/**
|
|
3089
3440
|
* Arguments for the `select` event of the ContextMenu.
|
|
3090
3441
|
*/
|
|
3091
3442
|
class ContextMenuSelectEvent extends ContextMenuEvent {
|
|
3443
|
+
/**
|
|
3444
|
+
* The DOM event that triggered the selection.
|
|
3445
|
+
*/
|
|
3446
|
+
originalEvent;
|
|
3092
3447
|
}
|
|
3093
3448
|
|
|
3094
3449
|
//IMPORTANT: NgModule export kept for backwards compatibility
|
|
@@ -3125,11 +3480,11 @@ class ContextMenuSelectEvent extends ContextMenuEvent {
|
|
|
3125
3480
|
* ```
|
|
3126
3481
|
*/
|
|
3127
3482
|
class ContextMenuModule {
|
|
3483
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3484
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuModule, imports: [ContextMenuComponent, ContextMenuTemplateDirective, ContextMenuTargetDirective, ContextMenuTargetContainerDirective, MenuComponent, MenuItemComponent, ItemTemplateDirective, ItemLinkTemplateDirective, ItemContentTemplateDirective, HierarchyBindingDirective, FlatBindingDirective, LinkDirective, ExpandArrowComponent], exports: [ContextMenuComponent, ContextMenuTemplateDirective, ContextMenuTargetDirective, ContextMenuTargetContainerDirective, MenuComponent, MenuItemComponent, ItemTemplateDirective, ItemLinkTemplateDirective, ItemContentTemplateDirective, HierarchyBindingDirective, FlatBindingDirective, LinkDirective, ExpandArrowComponent] });
|
|
3485
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuModule, providers: [PopupService, IconsService, ResizeBatchService], imports: [ContextMenuComponent, MenuComponent, ExpandArrowComponent] });
|
|
3128
3486
|
}
|
|
3129
|
-
|
|
3130
|
-
ContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuModule, imports: [ContextMenuComponent, ContextMenuTemplateDirective, ContextMenuTargetDirective, ContextMenuTargetContainerDirective, MenuComponent, MenuItemComponent, ItemTemplateDirective, ItemLinkTemplateDirective, ItemContentTemplateDirective, HierarchyBindingDirective, FlatBindingDirective, LinkDirective, ExpandArrowComponent], exports: [ContextMenuComponent, ContextMenuTemplateDirective, ContextMenuTargetDirective, ContextMenuTargetContainerDirective, MenuComponent, MenuItemComponent, ItemTemplateDirective, ItemLinkTemplateDirective, ItemContentTemplateDirective, HierarchyBindingDirective, FlatBindingDirective, LinkDirective, ExpandArrowComponent] });
|
|
3131
|
-
ContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuModule, providers: [PopupService, IconsService, ResizeBatchService], imports: [ContextMenuComponent, MenuComponent, MenuItemComponent, ExpandArrowComponent] });
|
|
3132
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuModule, decorators: [{
|
|
3487
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuModule, decorators: [{
|
|
3133
3488
|
type: NgModule,
|
|
3134
3489
|
args: [{
|
|
3135
3490
|
exports: [...KENDO_CONTEXTMENU],
|
|
@@ -3162,11 +3517,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3162
3517
|
* ```
|
|
3163
3518
|
*/
|
|
3164
3519
|
class MenusModule {
|
|
3520
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3521
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: MenusModule, imports: [MenuComponent, MenuItemComponent, ItemTemplateDirective, ItemLinkTemplateDirective, ItemContentTemplateDirective, HierarchyBindingDirective, FlatBindingDirective, LinkDirective, ExpandArrowComponent, ContextMenuComponent, ContextMenuTemplateDirective, ContextMenuTargetDirective, ContextMenuTargetContainerDirective, MenuComponent, MenuItemComponent, ItemTemplateDirective, ItemLinkTemplateDirective, ItemContentTemplateDirective, HierarchyBindingDirective, FlatBindingDirective, LinkDirective, ExpandArrowComponent], exports: [MenuComponent, MenuItemComponent, ItemTemplateDirective, ItemLinkTemplateDirective, ItemContentTemplateDirective, HierarchyBindingDirective, FlatBindingDirective, LinkDirective, ExpandArrowComponent, ContextMenuComponent, ContextMenuTemplateDirective, ContextMenuTargetDirective, ContextMenuTargetContainerDirective, MenuComponent, MenuItemComponent, ItemTemplateDirective, ItemLinkTemplateDirective, ItemContentTemplateDirective, HierarchyBindingDirective, FlatBindingDirective, LinkDirective, ExpandArrowComponent] });
|
|
3522
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenusModule, providers: [PopupService, IconsService, ResizeBatchService], imports: [MenuComponent, ExpandArrowComponent, ContextMenuComponent, MenuComponent, ExpandArrowComponent] });
|
|
3165
3523
|
}
|
|
3166
|
-
|
|
3167
|
-
MenusModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MenusModule, imports: [MenuComponent, MenuItemComponent, ItemTemplateDirective, ItemLinkTemplateDirective, ItemContentTemplateDirective, HierarchyBindingDirective, FlatBindingDirective, LinkDirective, ExpandArrowComponent, ContextMenuComponent, ContextMenuTemplateDirective, ContextMenuTargetDirective, ContextMenuTargetContainerDirective, MenuComponent, MenuItemComponent, ItemTemplateDirective, ItemLinkTemplateDirective, ItemContentTemplateDirective, HierarchyBindingDirective, FlatBindingDirective, LinkDirective, ExpandArrowComponent], exports: [MenuComponent, MenuItemComponent, ItemTemplateDirective, ItemLinkTemplateDirective, ItemContentTemplateDirective, HierarchyBindingDirective, FlatBindingDirective, LinkDirective, ExpandArrowComponent, ContextMenuComponent, ContextMenuTemplateDirective, ContextMenuTargetDirective, ContextMenuTargetContainerDirective, MenuComponent, MenuItemComponent, ItemTemplateDirective, ItemLinkTemplateDirective, ItemContentTemplateDirective, HierarchyBindingDirective, FlatBindingDirective, LinkDirective, ExpandArrowComponent] });
|
|
3168
|
-
MenusModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MenusModule, providers: [PopupService, IconsService, ResizeBatchService], imports: [MenuComponent, MenuItemComponent, ExpandArrowComponent, ContextMenuComponent, MenuComponent, MenuItemComponent, ExpandArrowComponent] });
|
|
3169
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MenusModule, decorators: [{
|
|
3524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenusModule, decorators: [{
|
|
3170
3525
|
type: NgModule,
|
|
3171
3526
|
args: [{
|
|
3172
3527
|
exports: [...KENDO_MENUS],
|