@progress/kendo-angular-menu 17.0.0-develop.21 → 17.0.0-develop.23

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.
Files changed (59) hide show
  1. package/context-menu/context-menu-target.directive.d.ts +1 -1
  2. package/context-menu/context-menu.component.d.ts +1 -1
  3. package/data-binding/flat-binding.directive.d.ts +1 -1
  4. package/data-binding/hierachy-binding.directive.d.ts +1 -1
  5. package/{esm2020 → esm2022}/context-menu/context-menu-event.mjs +16 -0
  6. package/{esm2020 → esm2022}/context-menu/context-menu-items.service.mjs +4 -3
  7. package/{esm2020 → esm2022}/context-menu/context-menu-popup-event.mjs +12 -0
  8. package/{esm2020 → esm2022}/context-menu/context-menu-select-event.mjs +4 -0
  9. package/{esm2020 → esm2022}/context-menu/context-menu-target-container.directive.mjs +8 -3
  10. package/{esm2020 → esm2022}/context-menu/context-menu-target.directive.mjs +16 -7
  11. package/{esm2020 → esm2022}/context-menu/context-menu-target.service.mjs +4 -6
  12. package/{esm2020 → esm2022}/context-menu/context-menu-template.directive.mjs +4 -3
  13. package/{esm2020 → esm2022}/context-menu/context-menu.component.mjs +123 -60
  14. package/{esm2020 → esm2022}/context-menu/context-menu.module.mjs +4 -4
  15. package/{esm2020 → esm2022}/context-menu/context-menu.service.mjs +6 -6
  16. package/{esm2020 → esm2022}/data-binding/binding-directive-base.mjs +6 -3
  17. package/{esm2020 → esm2022}/data-binding/flat-binding.directive.mjs +47 -3
  18. package/{esm2020 → esm2022}/data-binding/hierachy-binding.directive.mjs +43 -3
  19. package/{esm2020 → esm2022}/menu-base.mjs +49 -35
  20. package/{esm2020 → esm2022}/menu-event.mjs +12 -0
  21. package/{esm2020 → esm2022}/menu-item.component.mjs +28 -3
  22. package/{esm2020 → esm2022}/menu-select-event.mjs +4 -0
  23. package/{esm2020 → esm2022}/menu.component.mjs +73 -51
  24. package/{esm2020 → esm2022}/menu.module.mjs +4 -4
  25. package/{esm2020 → esm2022}/menus.module.mjs +4 -4
  26. package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
  27. package/{esm2020 → esm2022}/preventable-event.mjs +7 -7
  28. package/{esm2020 → esm2022}/rendering/arrow.component.mjs +19 -5
  29. package/{esm2020 → esm2022}/rendering/link.directive.mjs +15 -9
  30. package/{esm2020 → esm2022}/rendering/list.component.mjs +73 -35
  31. package/{esm2020 → esm2022}/services/actions.service.mjs +19 -4
  32. package/{esm2020 → esm2022}/services/hover.service.mjs +13 -10
  33. package/{esm2020 → esm2022}/services/items.service.mjs +6 -8
  34. package/{esm2020 → esm2022}/services/navigation.service.mjs +16 -11
  35. package/{esm2020 → esm2022}/templates/item-content-template.directive.mjs +4 -3
  36. package/{esm2020 → esm2022}/templates/item-link-template.directive.mjs +4 -3
  37. package/{esm2020 → esm2022}/templates/item-template.directive.mjs +4 -3
  38. package/{fesm2020 → fesm2022}/progress-kendo-angular-menu.mjs +653 -298
  39. package/menu-base.d.ts +1 -1
  40. package/menu-item.component.d.ts +1 -1
  41. package/menu.component.d.ts +1 -1
  42. package/package.json +14 -20
  43. package/rendering/arrow.component.d.ts +1 -1
  44. package/rendering/link.directive.d.ts +1 -1
  45. package/rendering/list.component.d.ts +2 -2
  46. package/size.d.ts +1 -1
  47. package/fesm2015/progress-kendo-angular-menu.mjs +0 -3195
  48. /package/{esm2020 → esm2022}/constants.mjs +0 -0
  49. /package/{esm2020 → esm2022}/data-binding/utils.mjs +0 -0
  50. /package/{esm2020 → esm2022}/directives.mjs +0 -0
  51. /package/{esm2020 → esm2022}/dom-queries.mjs +0 -0
  52. /package/{esm2020 → esm2022}/index.mjs +0 -0
  53. /package/{esm2020 → esm2022}/menu-animation.interface.mjs +0 -0
  54. /package/{esm2020 → esm2022}/menu-item.interface.mjs +0 -0
  55. /package/{esm2020 → esm2022}/open-on-click-settings.mjs +0 -0
  56. /package/{esm2020 → esm2022}/progress-kendo-angular-menu.mjs +0 -0
  57. /package/{esm2020 → esm2022}/rendering/popup-settings.mjs +0 -0
  58. /package/{esm2020 → esm2022}/size.mjs +0 -0
  59. /package/{esm2020 → esm2022}/utils.mjs +0 -0
@@ -30,5 +30,5 @@ export declare class ContextMenuTargetDirective implements OnDestroy {
30
30
  constructor(elementRef: ElementRef, targetService: ContextMenuTargetService);
31
31
  ngOnDestroy(): void;
32
32
  static ɵfac: i0.ɵɵFactoryDeclaration<ContextMenuTargetDirective, never>;
33
- static ɵdir: i0.ɵɵDirectiveDeclaration<ContextMenuTargetDirective, "[kendoContextMenuTarget]", ["kendoContextMenuTarget"], { "data": "kendoContextMenuTarget"; }, {}, never, never, true, never>;
33
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ContextMenuTargetDirective, "[kendoContextMenuTarget]", ["kendoContextMenuTarget"], { "data": { "alias": "kendoContextMenuTarget"; "required": false; }; }, {}, never, never, true, never>;
34
34
  }
@@ -162,5 +162,5 @@ export declare class ContextMenuComponent extends MenuBase implements OnInit, On
162
162
  private popupAction;
163
163
  private get currentTargetElement();
164
164
  static ɵfac: i0.ɵɵFactoryDeclaration<ContextMenuComponent, never>;
165
- static ɵcmp: i0.ɵɵComponentDeclaration<ContextMenuComponent, "kendo-contextmenu", ["kendoContextMenu"], { "showOn": "showOn"; "target": "target"; "filter": "filter"; "alignToAnchor": "alignToAnchor"; "vertical": "vertical"; "popupAnimate": "popupAnimate"; "popupAlign": "popupAlign"; "anchorAlign": "anchorAlign"; "collision": "collision"; "appendTo": "appendTo"; "ariaLabel": "ariaLabel"; }, { "popupOpen": "popupOpen"; "popupClose": "popupClose"; "select": "select"; "open": "open"; "close": "close"; }, ["contentTemplate"], never, true, never>;
165
+ static ɵcmp: i0.ɵɵComponentDeclaration<ContextMenuComponent, "kendo-contextmenu", ["kendoContextMenu"], { "showOn": { "alias": "showOn"; "required": false; }; "target": { "alias": "target"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "alignToAnchor": { "alias": "alignToAnchor"; "required": false; }; "vertical": { "alias": "vertical"; "required": false; }; "popupAnimate": { "alias": "popupAnimate"; "required": false; }; "popupAlign": { "alias": "popupAlign"; "required": false; }; "anchorAlign": { "alias": "anchorAlign"; "required": false; }; "collision": { "alias": "collision"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "popupOpen": "popupOpen"; "popupClose": "popupClose"; "select": "select"; "open": "open"; "close": "close"; }, ["contentTemplate"], never, true, never>;
166
166
  }
@@ -57,5 +57,5 @@ export declare class FlatBindingDirective extends BindingDirectiveBase {
57
57
  protected mapItems(items: any[]): any[];
58
58
  protected createItem(dataItem: any): any;
59
59
  static ɵfac: i0.ɵɵFactoryDeclaration<FlatBindingDirective, never>;
60
- static ɵdir: i0.ɵɵDirectiveDeclaration<FlatBindingDirective, "[kendoMenuFlatBinding]", ["kendoMenuFlatBinding"], { "data": "kendoMenuFlatBinding"; "textField": "textField"; "urlField": "urlField"; "iconField": "iconField"; "svgIconField": "svgIconField"; "disabledField": "disabledField"; "cssClassField": "cssClassField"; "cssStyleField": "cssStyleField"; "separatorField": "separatorField"; "idField": "idField"; "parentIdField": "parentIdField"; }, {}, never, never, true, never>;
60
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FlatBindingDirective, "[kendoMenuFlatBinding]", ["kendoMenuFlatBinding"], { "data": { "alias": "kendoMenuFlatBinding"; "required": false; }; "textField": { "alias": "textField"; "required": false; }; "urlField": { "alias": "urlField"; "required": false; }; "iconField": { "alias": "iconField"; "required": false; }; "svgIconField": { "alias": "svgIconField"; "required": false; }; "disabledField": { "alias": "disabledField"; "required": false; }; "cssClassField": { "alias": "cssClassField"; "required": false; }; "cssStyleField": { "alias": "cssStyleField"; "required": false; }; "separatorField": { "alias": "separatorField"; "required": false; }; "idField": { "alias": "idField"; "required": false; }; "parentIdField": { "alias": "parentIdField"; "required": false; }; }, {}, never, never, true, never>;
61
61
  }
@@ -54,5 +54,5 @@ export declare class HierarchyBindingDirective extends BindingDirectiveBase {
54
54
  protected createItem(item: any, level: number): any;
55
55
  protected getChildren(item: any, level: number): any;
56
56
  static ɵfac: i0.ɵɵFactoryDeclaration<HierarchyBindingDirective, never>;
57
- static ɵdir: i0.ɵɵDirectiveDeclaration<HierarchyBindingDirective, "[kendoMenuHierarchyBinding]", ["kendoMenuHierarchyBinding"], { "data": "kendoMenuHierarchyBinding"; "textField": "textField"; "urlField": "urlField"; "iconField": "iconField"; "svgIconField": "svgIconField"; "disabledField": "disabledField"; "cssClassField": "cssClassField"; "cssStyleField": "cssStyleField"; "separatorField": "separatorField"; "childrenField": "childrenField"; }, {}, never, never, true, never>;
57
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HierarchyBindingDirective, "[kendoMenuHierarchyBinding]", ["kendoMenuHierarchyBinding"], { "data": { "alias": "kendoMenuHierarchyBinding"; "required": false; }; "textField": { "alias": "textField"; "required": false; }; "urlField": { "alias": "urlField"; "required": false; }; "iconField": { "alias": "iconField"; "required": false; }; "svgIconField": { "alias": "svgIconField"; "required": false; }; "disabledField": { "alias": "disabledField"; "required": false; }; "cssClassField": { "alias": "cssClassField"; "required": false; }; "cssStyleField": { "alias": "cssStyleField"; "required": false; }; "separatorField": { "alias": "separatorField"; "required": false; }; "childrenField": { "alias": "childrenField"; "required": false; }; }, {}, never, never, true, never>;
58
58
  }
@@ -6,4 +6,20 @@
6
6
  * Arguments for the `open` and `close` events of the ContextMenu.
7
7
  */
8
8
  export class ContextMenuEvent {
9
+ /**
10
+ * The target element for which the ContextMenu is opened.
11
+ */
12
+ target;
13
+ /**
14
+ * The ContextMenuComponent that triggered the event.
15
+ */
16
+ sender;
17
+ /**
18
+ * The item data of the event.
19
+ */
20
+ item;
21
+ /**
22
+ * The item index of the event.
23
+ */
24
+ index;
9
25
  }
@@ -10,6 +10,7 @@ import * as i1 from "./context-menu.service";
10
10
  * @hidden
11
11
  */
12
12
  export class ContextMenuItemsService {
13
+ contextService;
13
14
  constructor(contextService) {
14
15
  this.contextService = contextService;
15
16
  }
@@ -18,9 +19,9 @@ export class ContextMenuItemsService {
18
19
  return this.contextService.items.get(index);
19
20
  }
20
21
  }
22
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuItemsService, deps: [{ token: i1.ContextMenuService }], target: i0.ɵɵFactoryTarget.Injectable });
23
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuItemsService });
21
24
  }
22
- ContextMenuItemsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuItemsService, deps: [{ token: i1.ContextMenuService }], target: i0.ɵɵFactoryTarget.Injectable });
23
- ContextMenuItemsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuItemsService });
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuItemsService, decorators: [{
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuItemsService, decorators: [{
25
26
  type: Injectable
26
27
  }], ctorParameters: function () { return [{ type: i1.ContextMenuService }]; } });
@@ -7,4 +7,16 @@ import { PreventableEvent } from '../preventable-event';
7
7
  * Arguments for the `popupOpen` and `popupClose` events of the ContextMenu.
8
8
  */
9
9
  export class ContextMenuPopupEvent extends PreventableEvent {
10
+ /**
11
+ * The target element for which the ContextMenu is opened.
12
+ */
13
+ target;
14
+ /**
15
+ * The DOM event that started the action.
16
+ */
17
+ originalEvent;
18
+ /**
19
+ * The ContextMenuComponent that triggered the event.
20
+ */
21
+ sender;
10
22
  }
@@ -7,4 +7,8 @@ import { ContextMenuEvent } from './context-menu-event';
7
7
  * Arguments for the `select` event of the ContextMenu.
8
8
  */
9
9
  export class ContextMenuSelectEvent extends ContextMenuEvent {
10
+ /**
11
+ * The DOM event that triggered the selection.
12
+ */
13
+ originalEvent;
10
14
  }
@@ -10,6 +10,11 @@ import * as i1 from "./context-menu-target.service";
10
10
  * Specifies a container for the [targets]({% slug api_menu_contextmenutargetdirective %}) of the ContextMenu.
11
11
  */
12
12
  export class ContextMenuTargetContainerDirective {
13
+ targetService;
14
+ /**
15
+ * @hidden
16
+ */
17
+ element;
13
18
  /**
14
19
  * @hidden
15
20
  */
@@ -19,10 +24,10 @@ export class ContextMenuTargetContainerDirective {
19
24
  this.element = elementRef.nativeElement;
20
25
  }
21
26
  }
27
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuTargetContainerDirective, deps: [{ token: i0.ElementRef }, { token: i1.ContextMenuTargetService }], target: i0.ɵɵFactoryTarget.Directive });
28
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ContextMenuTargetContainerDirective, isStandalone: true, selector: "[kendoContextMenuTargetContainer]", providers: [ContextMenuTargetService], exportAs: ["kendoContextMenuTargetContainer"], ngImport: i0 });
22
29
  }
23
- ContextMenuTargetContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuTargetContainerDirective, deps: [{ token: i0.ElementRef }, { token: i1.ContextMenuTargetService }], target: i0.ɵɵFactoryTarget.Directive });
24
- ContextMenuTargetContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ContextMenuTargetContainerDirective, isStandalone: true, selector: "[kendoContextMenuTargetContainer]", providers: [ContextMenuTargetService], exportAs: ["kendoContextMenuTargetContainer"], ngImport: i0 });
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuTargetContainerDirective, decorators: [{
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuTargetContainerDirective, decorators: [{
26
31
  type: Directive,
27
32
  args: [{
28
33
  selector: '[kendoContextMenuTargetContainer]',
@@ -15,12 +15,21 @@ export const TARGET_CLASS = 'k-contextmenu-target';
15
15
  * ([see example]({% slug target_contextmenu %}#toc-directives)).
16
16
  */
17
17
  export class ContextMenuTargetDirective {
18
+ targetService;
19
+ /**
20
+ * The data which is associated with the target.
21
+ */
22
+ data;
23
+ /**
24
+ * The target DOM element.
25
+ */
26
+ element;
27
+ /**
28
+ * @hidden
29
+ */
30
+ hostClass = true;
18
31
  constructor(elementRef, targetService) {
19
32
  this.targetService = targetService;
20
- /**
21
- * @hidden
22
- */
23
- this.hostClass = true;
24
33
  if (elementRef) {
25
34
  this.element = elementRef.nativeElement;
26
35
  }
@@ -29,10 +38,10 @@ export class ContextMenuTargetDirective {
29
38
  ngOnDestroy() {
30
39
  this.targetService.remove(this);
31
40
  }
41
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuTargetDirective, deps: [{ token: i0.ElementRef }, { token: i1.ContextMenuTargetService }], target: i0.ɵɵFactoryTarget.Directive });
42
+ 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 });
32
43
  }
33
- ContextMenuTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuTargetDirective, deps: [{ token: i0.ElementRef }, { token: i1.ContextMenuTargetService }], target: i0.ɵɵFactoryTarget.Directive });
34
- 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 });
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuTargetDirective, decorators: [{
44
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuTargetDirective, decorators: [{
36
45
  type: Directive,
37
46
  args: [{
38
47
  selector: '[kendoContextMenuTarget]',
@@ -8,9 +8,7 @@ import * as i0 from "@angular/core";
8
8
  * @hidden
9
9
  */
10
10
  export class ContextMenuTargetService {
11
- constructor() {
12
- this.targets = [];
13
- }
11
+ targets = [];
14
12
  add(target) {
15
13
  this.targets.push(target);
16
14
  }
@@ -21,9 +19,9 @@ export class ContextMenuTargetService {
21
19
  find(targetElement) {
22
20
  return this.targets.find(target => target.element === targetElement);
23
21
  }
22
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuTargetService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
23
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuTargetService });
24
24
  }
25
- ContextMenuTargetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuTargetService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
26
- ContextMenuTargetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuTargetService });
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuTargetService, decorators: [{
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuTargetService, decorators: [{
28
26
  type: Injectable
29
27
  }] });
@@ -16,13 +16,14 @@ import * as i0 from "@angular/core";
16
16
  * {% endmeta %}
17
17
  */
18
18
  export class ContextMenuTemplateDirective {
19
+ templateRef;
19
20
  constructor(templateRef) {
20
21
  this.templateRef = templateRef;
21
22
  }
23
+ 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 });
24
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ContextMenuTemplateDirective, isStandalone: true, selector: "[kendoContextMenuTemplate]", ngImport: i0 });
22
25
  }
23
- ContextMenuTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
24
- ContextMenuTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ContextMenuTemplateDirective, isStandalone: true, selector: "[kendoContextMenuTemplate]", ngImport: i0 });
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuTemplateDirective, decorators: [{
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuTemplateDirective, decorators: [{
26
27
  type: Directive,
27
28
  args: [{
28
29
  selector: '[kendoContextMenuTemplate]',
@@ -46,48 +46,111 @@ const preventDefault = e => e.preventDefault();
46
46
  * ```
47
47
  */
48
48
  export class ContextMenuComponent extends MenuBase {
49
+ popupService;
50
+ service;
51
+ ngZone;
52
+ renderer;
53
+ /**
54
+ * Specifies the event on which the ContextMenu will open ([see example]({% slug showon_contextmenu %})).
55
+ * Accepts the name of a native DOM event. For example, `click`, `dblclick`, `mouseover`, etc.
56
+ * @default 'contextmenu'
57
+ */
58
+ showOn = CONTEXT_MENU;
59
+ /**
60
+ * Specifies the element for which the ContextMenu will open ([see example]({% slug target_contextmenu %}#toc-configuration)).
61
+ */
62
+ target;
63
+ /**
64
+ * Specifies a CSS selector which filters the elements in the target for which the ContextMenu will open
65
+ * ([see example](slug:target_contextmenu#toc-changing-items-for-specific-targets)).
66
+ */
67
+ filter;
68
+ /**
69
+ * Indicates that the ContextMenu will be aligned to the target or to the `filter` element (if specified).
70
+ * @default false
71
+ */
72
+ alignToAnchor = false;
73
+ /**
74
+ * Specifies if the Menu will be vertically rendered ([see example]({% slug orientation_contextmenu %})).
75
+ * @default true
76
+ */
77
+ vertical = true;
78
+ /**
79
+ * Specifies the popup animation.
80
+ * @default true
81
+ */
82
+ popupAnimate;
83
+ /**
84
+ * Specifies the pivot point of the popup.
85
+ * @default { horizontal: 'left', vertical: 'top' }
86
+ * The possible values are:
87
+ * - `horizontal`—`left`, `center`, `right`
88
+ * - `vertical`—`top`, `center`, `bottom`
89
+ */
90
+ popupAlign;
91
+ /**
92
+ * Specifies the pivot point of the anchor. Applicable if `alignToAnchor` is `true`.
93
+ * @default { horizontal: 'left', vertical: 'bottom' }
94
+ * The possible values are:
95
+ * - `horizontal`—`left`, `center`, `right`
96
+ * - `vertical`—`top`, `center`, `bottom`
97
+ */
98
+ anchorAlign;
99
+ /**
100
+ * Configures the collision behavior of the popup.
101
+ * @default { horizontal: 'fit', vertical: 'flip' }
102
+ */
103
+ collision;
104
+ /**
105
+ * Defines the container to which the popups will be appended.
106
+ */
107
+ appendTo;
108
+ /**
109
+ * Sets the value for the [`aria-label`](https://www.w3.org/TR/wai-aria-1.1/#aria-label) attribute of the ContextMenu.
110
+ */
111
+ ariaLabel;
112
+ /**
113
+ * Fires when the Menu is opened ([see example](slug:events_contextmenu)).
114
+ */
115
+ popupOpen = new EventEmitter();
116
+ /**
117
+ * Fires when the Menu is closed ([see example](slug:events_contextmenu)).
118
+ */
119
+ popupClose = new EventEmitter();
120
+ /**
121
+ * Fires when a Menu item is selected ([see example](slug:events_contextmenu)).
122
+ */
123
+ select = new EventEmitter();
124
+ /**
125
+ * Fires when a Menu item is opened ([see example](slug:events_contextmenu)).
126
+ */
127
+ open = new EventEmitter();
128
+ /**
129
+ * Fires when a Menu item is closed ([see example](slug:events_contextmenu)).
130
+ */
131
+ close = new EventEmitter();
132
+ /**
133
+ * @hidden
134
+ */
135
+ contentTemplate;
136
+ /**
137
+ * @hidden
138
+ */
139
+ defaultContentTemplate;
140
+ closeSubscription;
141
+ showSubscription;
142
+ keydownSubscription;
143
+ popupSubscriptions;
144
+ popupRef;
145
+ currentTarget;
146
+ directiveTarget;
147
+ activeTarget;
49
148
  constructor(popupService, service, ngZone, renderer) {
50
149
  super();
51
150
  this.popupService = popupService;
52
151
  this.service = service;
53
152
  this.ngZone = ngZone;
54
153
  this.renderer = renderer;
55
- /**
56
- * Specifies the event on which the ContextMenu will open ([see example]({% slug showon_contextmenu %})).
57
- * Accepts the name of a native DOM event. For example, `click`, `dblclick`, `mouseover`, etc.
58
- * @default 'contextmenu'
59
- */
60
- this.showOn = CONTEXT_MENU;
61
- /**
62
- * Indicates that the ContextMenu will be aligned to the target or to the `filter` element (if specified).
63
- * @default false
64
- */
65
- this.alignToAnchor = false;
66
- /**
67
- * Specifies if the Menu will be vertically rendered ([see example]({% slug orientation_contextmenu %})).
68
- * @default true
69
- */
70
- this.vertical = true;
71
- /**
72
- * Fires when the Menu is opened ([see example](slug:events_contextmenu)).
73
- */
74
- this.popupOpen = new EventEmitter();
75
- /**
76
- * Fires when the Menu is closed ([see example](slug:events_contextmenu)).
77
- */
78
- this.popupClose = new EventEmitter();
79
- /**
80
- * Fires when a Menu item is selected ([see example](slug:events_contextmenu)).
81
- */
82
- this.select = new EventEmitter();
83
- /**
84
- * Fires when a Menu item is opened ([see example](slug:events_contextmenu)).
85
- */
86
- this.open = new EventEmitter();
87
- /**
88
- * Fires when a Menu item is closed ([see example](slug:events_contextmenu)).
89
- */
90
- this.close = new EventEmitter();
91
154
  this.service.owner = this;
92
155
  this.popupKeyDownHandler = this.popupKeyDownHandler.bind(this);
93
156
  }
@@ -335,29 +398,28 @@ export class ContextMenuComponent extends MenuBase {
335
398
  get currentTargetElement() {
336
399
  return this.directiveTarget && this.currentTarget ? this.currentTarget.element : this.currentTarget;
337
400
  }
338
- }
339
- ContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuComponent, deps: [{ token: i1.PopupService }, { token: i2.ContextMenuService }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
340
- ContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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: [
341
- ContextMenuService,
342
- LocalizationService,
343
- {
344
- provide: L10N_PREFIX,
345
- useValue: 'kendo.contextmenu'
346
- },
347
- {
348
- provide: ItemsService,
349
- useClass: ContextMenuItemsService
350
- },
351
- {
352
- provide: MenuBase,
353
- useExisting: forwardRef(() => ContextMenuComponent)
354
- },
355
- PopupService,
356
- {
357
- provide: POPUP_CONTAINER,
358
- useFactory: bodyFactory
359
- }
360
- ], 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: `
401
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuComponent, deps: [{ token: i1.PopupService }, { token: i2.ContextMenuService }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
402
+ 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: [
403
+ ContextMenuService,
404
+ LocalizationService,
405
+ {
406
+ provide: L10N_PREFIX,
407
+ useValue: 'kendo.contextmenu'
408
+ },
409
+ {
410
+ provide: ItemsService,
411
+ useClass: ContextMenuItemsService
412
+ },
413
+ {
414
+ provide: MenuBase,
415
+ useExisting: forwardRef(() => ContextMenuComponent)
416
+ },
417
+ PopupService,
418
+ {
419
+ provide: POPUP_CONTAINER,
420
+ useFactory: bodyFactory
421
+ }
422
+ ], 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: `
361
423
  <ng-template #default>
362
424
  <kendo-menu [items]="rootItems"
363
425
  [appendTo]="appendTo"
@@ -372,7 +434,8 @@ ContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
372
434
  ></kendo-menu>
373
435
  </ng-template>
374
436
  `, isInline: true, dependencies: [{ kind: "component", type: MenuComponent, selector: "kendo-menu", inputs: ["appendTo", "menuItemTemplate", "ariaRole", "menuItemLinkTemplate"], outputs: ["select", "open", "close"], exportAs: ["kendoMenu"] }] });
375
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuComponent, decorators: [{
437
+ }
438
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuComponent, decorators: [{
376
439
  type: Component,
377
440
  args: [{
378
441
  exportAs: 'kendoContextMenu',
@@ -55,11 +55,11 @@ import * as i13 from "../rendering/arrow.component";
55
55
  * ```
56
56
  */
57
57
  export class ContextMenuModule {
58
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
59
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuModule, imports: [i1.ContextMenuComponent, i2.ContextMenuTemplateDirective, i3.ContextMenuTargetDirective, i4.ContextMenuTargetContainerDirective, i5.MenuComponent, i6.MenuItemComponent, i7.ItemTemplateDirective, i8.ItemLinkTemplateDirective, i9.ItemContentTemplateDirective, i10.HierarchyBindingDirective, i11.FlatBindingDirective, i12.LinkDirective, i13.ExpandArrowComponent], exports: [i1.ContextMenuComponent, i2.ContextMenuTemplateDirective, i3.ContextMenuTargetDirective, i4.ContextMenuTargetContainerDirective, i5.MenuComponent, i6.MenuItemComponent, i7.ItemTemplateDirective, i8.ItemLinkTemplateDirective, i9.ItemContentTemplateDirective, i10.HierarchyBindingDirective, i11.FlatBindingDirective, i12.LinkDirective, i13.ExpandArrowComponent] });
60
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuModule, providers: [PopupService, IconsService, ResizeBatchService], imports: [i1.ContextMenuComponent, i5.MenuComponent, i13.ExpandArrowComponent] });
58
61
  }
59
- ContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
60
- ContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuModule, imports: [i1.ContextMenuComponent, i2.ContextMenuTemplateDirective, i3.ContextMenuTargetDirective, i4.ContextMenuTargetContainerDirective, i5.MenuComponent, i6.MenuItemComponent, i7.ItemTemplateDirective, i8.ItemLinkTemplateDirective, i9.ItemContentTemplateDirective, i10.HierarchyBindingDirective, i11.FlatBindingDirective, i12.LinkDirective, i13.ExpandArrowComponent], exports: [i1.ContextMenuComponent, i2.ContextMenuTemplateDirective, i3.ContextMenuTargetDirective, i4.ContextMenuTargetContainerDirective, i5.MenuComponent, i6.MenuItemComponent, i7.ItemTemplateDirective, i8.ItemLinkTemplateDirective, i9.ItemContentTemplateDirective, i10.HierarchyBindingDirective, i11.FlatBindingDirective, i12.LinkDirective, i13.ExpandArrowComponent] });
61
- ContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuModule, providers: [PopupService, IconsService, ResizeBatchService], imports: [i1.ContextMenuComponent, i5.MenuComponent, i6.MenuItemComponent, i13.ExpandArrowComponent] });
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuModule, decorators: [{
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuModule, decorators: [{
63
63
  type: NgModule,
64
64
  args: [{
65
65
  exports: [...KENDO_CONTEXTMENU],
@@ -10,9 +10,9 @@ import * as i0 from "@angular/core";
10
10
  * @hidden
11
11
  */
12
12
  export class ContextMenuService {
13
- constructor() {
14
- this.keydown = new EventEmitter();
15
- }
13
+ keydown = new EventEmitter();
14
+ owner;
15
+ items;
16
16
  emit(name, args) {
17
17
  this.owner.emitMenuEvent(name, args);
18
18
  }
@@ -22,9 +22,9 @@ export class ContextMenuService {
22
22
  leaveMenu(e) {
23
23
  return this.items ? !inMenu(e.target, this.items) : true;
24
24
  }
25
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
26
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuService });
25
27
  }
26
- ContextMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
27
- ContextMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuService });
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ContextMenuService, decorators: [{
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextMenuService, decorators: [{
29
29
  type: Injectable
30
30
  }] });
@@ -11,6 +11,9 @@ const ITEM_FIELDS = ['textField', 'urlField', 'iconField', 'svgIconField', 'disa
11
11
  * @hidden
12
12
  */
13
13
  export class BindingDirectiveBase {
14
+ menu;
15
+ data;
16
+ fields;
14
17
  constructor(menu) {
15
18
  this.menu = menu;
16
19
  }
@@ -31,10 +34,10 @@ export class BindingDirectiveBase {
31
34
  }
32
35
  this.menu.items = this.data ? this.mapItems(this.data) : [];
33
36
  }
37
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BindingDirectiveBase, deps: [{ token: i1.MenuBase }], target: i0.ɵɵFactoryTarget.Directive });
38
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: BindingDirectiveBase, selector: "kendoBindingBase", usesOnChanges: true, ngImport: i0 });
34
39
  }
35
- BindingDirectiveBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BindingDirectiveBase, deps: [{ token: i1.MenuBase }], target: i0.ɵɵFactoryTarget.Directive });
36
- BindingDirectiveBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: BindingDirectiveBase, selector: "kendoBindingBase", usesOnChanges: true, ngImport: i0 });
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BindingDirectiveBase, decorators: [{
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BindingDirectiveBase, decorators: [{
38
41
  type: Directive,
39
42
  args: [{
40
43
  // eslint-disable-next-line
@@ -12,6 +12,50 @@ import * as i1 from "../menu-base";
12
12
  * A directive that converts the provided flat data to [MenuItems]({% slug api_menu_menuitem %}) and binds them to the Menu.
13
13
  */
14
14
  export class FlatBindingDirective extends BindingDirectiveBase {
15
+ /**
16
+ * The array of data which will be used to populate the Menu.
17
+ */
18
+ data;
19
+ /**
20
+ * Defines the `text` field of the items.
21
+ */
22
+ textField;
23
+ /**
24
+ * Defines the `url` field of the items.
25
+ */
26
+ urlField;
27
+ /**
28
+ * Defines the `icon` field of the items.
29
+ */
30
+ iconField;
31
+ /**
32
+ * Defines the `svgIcon` field of the items.
33
+ */
34
+ svgIconField;
35
+ /**
36
+ * Defines the `disabled` field of the items.
37
+ */
38
+ disabledField;
39
+ /**
40
+ * Defines the `cssClass` field of the items.
41
+ */
42
+ cssClassField;
43
+ /**
44
+ * Defines the `cssStyle` field of the items.
45
+ */
46
+ cssStyleField;
47
+ /**
48
+ * Defines the `separator` field of the items.
49
+ */
50
+ separatorField;
51
+ /**
52
+ * Defines the `id` field of the items.
53
+ */
54
+ idField;
55
+ /**
56
+ * Defines the parent `id` field of the items.
57
+ */
58
+ parentIdField;
15
59
  constructor(menu) {
16
60
  super(menu);
17
61
  }
@@ -50,10 +94,10 @@ export class FlatBindingDirective extends BindingDirectiveBase {
50
94
  }
51
95
  return result;
52
96
  }
97
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatBindingDirective, deps: [{ token: i1.MenuBase }], target: i0.ɵɵFactoryTarget.Directive });
98
+ 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 });
53
99
  }
54
- FlatBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FlatBindingDirective, deps: [{ token: i1.MenuBase }], target: i0.ɵɵFactoryTarget.Directive });
55
- 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 });
56
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FlatBindingDirective, decorators: [{
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatBindingDirective, decorators: [{
57
101
  type: Directive,
58
102
  args: [{
59
103
  exportAs: 'kendoMenuFlatBinding',