@progress/kendo-angular-menu
Version:
Kendo UI Angular Menu component
97 lines (96 loc) • 3.63 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { Input, ContentChildren, QueryList, Component } from '@angular/core';
import { MenuItemComponent } from './menu-item.component';
import { ItemTemplateDirective } from './templates/item-template.directive';
import { ItemLinkTemplateDirective } from './templates/item-link-template.directive';
import * as i0 from "@angular/core";
/**
* @hidden
*/
export class MenuBase {
/**
* Specifies the Menu items.
*/
items;
/**
* Specifies if the Menu will be vertical ([see example]({% slug vertical_menu %})).
*/
vertical = false;
/**
* Specifies that the root items can be opened only on click
* ([see example]({% slug openclose_menu %}#toc-opening-on-click)).
*/
openOnClick = false;
/**
* Specifies the delay in milliseconds before the Menu items are opened or closed on item hover
* or leave ([see example]({% slug openclose_menu %}#toc-delay-on-hover)). Used to avoid the accidental
* opening or closing of the items.
*/
hoverDelay = 100;
/**
* Sets the Menu animation.
*/
animate = true;
/**
* Sets the Menu size.
*
* The possible values are:
* * `small`
* * `medium` (default)
* * `large`
* * `none`
*
*/
size = 'medium';
/**
* @hidden
*/
itemTemplate;
/**
* @hidden
*/
itemLinkTemplate;
/**
* @hidden
*/
children;
/**
* @hidden
*/
get rootItems() {
return this.items || (this.children ? this.children.toArray() : []);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
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 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuBase, decorators: [{
type: Component,
args: [{
selector: 'kendo-menu-base',
template: ``
}]
}], propDecorators: { items: [{
type: Input
}], vertical: [{
type: Input
}], openOnClick: [{
type: Input
}], hoverDelay: [{
type: Input
}], animate: [{
type: Input
}], size: [{
type: Input
}], itemTemplate: [{
type: ContentChildren,
args: [ItemTemplateDirective]
}], itemLinkTemplate: [{
type: ContentChildren,
args: [ItemLinkTemplateDirective]
}], children: [{
type: ContentChildren,
args: [MenuItemComponent]
}] } });