src/ui/menu/smart-toolbar-menu/smart-toolbar-menu.component.ts
| changeDetection | ChangeDetectionStrategy.Eager |
| providers |
SmartMenuStructureService
|
| selector | smart-toolbar-menu |
| styleUrls | ./smart-toolbar-menu.component.css |
| templateUrl | ./smart-toolbar-menu.component.html |
Properties |
Inputs |
Outputs |
Accessors |
constructor(smartMenuStructureService: SmartMenuStructureService)
|
||||||
|
Parameters :
|
| disableFirstLevelIcons |
Type : boolean
|
| expanded |
Type : boolean
|
|
If set to true, will expand the menu on initialization. |
| menu-structure-code |
Type : string
|
|
The structure code that the Smart Menu should use. |
| smart-instance-name |
Type : string
|
|
The instance name of the component |
| smart-object-name |
Type : string
|
|
The object name of the component |
| selected-item-changed |
Type : EventEmitter<any>
|
|
Fires when the menu's selection changes. |
| _extraItems |
Type : QueryList<SmartMenuItemDirective>
|
Decorators :
@ContentChildren(SmartMenuItemDirective)
|
| menuItems |
Type : any[]
|
| extraItems |
getextraItems()
|
|
Returns :
SmartMenuItemDirective[]
|
| hasExtraItems |
gethasExtraItems()
|
|
Returns :
boolean
|
<!--
**************************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") - *
* www.consultingwerk.com and other contributors as listed *
* below. All Rights Reserved. *
* *
* Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY *
* KIND, either express or implied. *
* *
* Contributors: *
* *
**************************************************************************
--------------------------------------------------------------------------
File : smart-toolbar-menu.component.html
Purpose : Template for Smart Toolbar Menu.
Author(s) : Radu Nicoara
Created : Sep 26, 2018
--------------------------------------------------------------------------
-->
<kendo-menu>
@for (item of menuItems; track item) {
<kendo-menu-item
[text]="item.title"
[cssStyle]="item.cssStyle"
[cssClass]="item.cssClass"
>
<ng-template kendoMenuItemTemplate>
<SmartToolbarMenuItemRenderer
cssClass="smart-toolbar-menu-item-header"
[item]="item"
[showIcon]="!disableFirstLevelIcons"
></SmartToolbarMenuItemRenderer>
</ng-template>
@if (!!item.children && item.children.length > 0) { @for (firstChild of
item.children; track firstChild) {
<kendo-menu-item [cssStyle]="item.cssStyle" [cssClass]="item.cssClass">
<ng-template kendoMenuItemTemplate>
<SmartToolbarMenuItemRenderer
cssClass="smart-toolbar-menu-item-label"
[item]="firstChild"
[showIcon]="true"
></SmartToolbarMenuItemRenderer>
</ng-template>
@if (!!firstChild.children && firstChild.children.length > 0) { @for
(grandChild of firstChild.children; track grandChild) {
<kendo-menu-item
[cssStyle]="item.cssStyle"
[cssClass]="item.cssClass"
>
<ng-template kendoMenuItemTemplate>
<SmartToolbarMenuItemRenderer
cssClass="smart-toolbar-menu-item-label"
[item]="grandChild"
[showIcon]="true"
></SmartToolbarMenuItemRenderer>
</ng-template>
</kendo-menu-item>
} }
</kendo-menu-item>
} }
</kendo-menu-item>
}
<ng-content></ng-content>
</kendo-menu>
./smart-toolbar-menu.component.css
/**********************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") - *
* www.consultingwerk.com and other contributors as listed *
* below. All Rights Reserved. *
* *
* Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY *
* KIND, either express or implied. *
* *
* Contributors: *
* *
**********************************************************************/
/*------------------------------------------------------------------------
File : smart-toolbar-menu.component.css
Purpose : Styles for Smart Toolbar Menu.
Author(s) : Radu Nicoara
Created : Sep 26, 2018
----------------------------------------------------------------------*/