import { OnInit, Renderer, EventEmitter, ElementRef, QueryList } from '@angular/core'; import { MdMenuTrigger } from '@angular/material'; import { CfCoreComponent } from '../core/core.component'; import { CfMenuItemComponent } from '../menu-item/menu-item.component'; import { MenuModel } from '../../models/menu/menu.model'; import { MenuStylingModel } from '../../models/menu/menu-styling.model'; import { TemplateService } from '../../services/template-service/template.service'; /** *

CF Menu Component

*
 * 
 * import {{'{'}} MenuModel {{'}'}} from 'cedrus-fusion'
 * import {{'{'}} MenuStylingModel {{'}'}} from 'cedrus-fusion'
 * <cf-menu></cf-menu>
 * 
 * 
*/ export declare class CfMenuComponent extends CfCoreComponent implements OnInit { private _renderer; /**@hidden */ elementRef: ElementRef; /**@hidden */ notificationClickable: string; /**@hidden * It is an array with menu items generated by MenuItemModel Class and used in Menu component template to render list of menu items. */ /** *
{{'{'}}
       *  display: boolean,							// True or False Default: True
       *  disable: boolean,							// True or False Default: False
       *  triggerIcon: IconModel,				// Refer to icon component
       *  menuItems: any,								// Array of menu items with type any so each item can
       *                                  have any structure together with MenuItemModel properties
       *  itemsSource: string,				  // Type of items source. For current time exists only: fromModel
       *{{'}'}}
       * 
*

Example

*
{{'{'}}
       *	display: true,
       *	disable: false,
       *	itemsSource: 'fromModel',
       *  menuItems:[
       *   {{'{'}}
       *    buttonProperty:{{'{'}}
       *     label: "USD account",
       *     iconProperty:{{'{'}}
       *      name: 'fa-usd',
       *      size: '24px'
       *     {{'}'}},
       *     iconPosition:"left"
       *    {{'}'}}
       *   {{'}'}},
       *   {{'{'}}
       *    buttonProperty:{{'{'}}
       *     label: "EURO account",
       *     iconProperty:{{'{'}}
       *      name: 'fa-eur',
       *      size: '24px'
       *     {{'}'}},
       *     iconPosition:"left"
       *    {{'}'}}
       *	 {{'}'}}
       *  ]
       *  triggerIcon:{{'{'}}
       *   name: "account_balance",
       *   size: "30px"
       *  {{'}'}}
       *{{'}'}}
       * 
*/ properties: MenuModel; /** *

dynamicClass: function() -> string, // Function that returns name of the class

*

class: string // Name of the css class selector

*

themeColor: string // primary/accent/warn

*
        *{{'{'}}
        *	// Container surrounding the Menu
        *	container:{{'{'}}
        *   dynamicClass,
        *   class
        *	{{'}'}},
        *	// Check Icon Component
        *	iconStyling:IconStylingModel,
        *	// Toggle Icon styling with same structure as above
        *	menuItemStyling:{{'{'}}
        *   container: {{'{'}}{{'}'}},
        *   //Check Button Component
        *   buttonStyling:ButtonStylingModel
        * {{'}'}}
        *{{'}'}}
        * 
*/ styling: MenuStylingModel; /** *

Icon name of menu trigger

*/ iconName: string; /** *

Icon size of menu trigger

*/ iconSize: string; /** *

Items source type. For current time only one type exists: fromModel

*/ itemsSource: string; /** *

Menu items array

*/ menuItems: Object[]; /** *

Emit event on menu item click

*

Event has object with structure:

*
{{'{'}}
       * 	 cfIndex: index, // index of menu item clicked
       * 	 cfItem: item // menu of menu item clicked
       * {{'}'}}
       * 
*/ onItemClick: EventEmitter; /** @hidden * It is Menu trigger element (icon) in the DOM which give access to * open menu programmatically from other GCs Components (like GC Button) by calling function openMenu(). */ trigger: MdMenuTrigger; /**@hidden*/ itemsTemplate: any; /**@hidden * List of children menu items from html view */ contentItems: QueryList; /**@hidden */ itemClicked(i: number, it: Object): void; /** @hidden * It is function which is called after click on Menu icon (trigger) * from other GCs Components (like GC Button) to open list with menu items. */ openMenu(): void; /**@hidden * Function to add classes to menu dropdownPanel on open */ onOnen(): void; /** @hidden * It is function for creating Notification click events by using Core Component notificationAction event emmiter. * @param notification it is json notification object */ cfNotificationAction(notification: any): void; /**@hidden */ constructor(_renderer: Renderer, /**@hidden */ elementRef: ElementRef, /**@hidden */ templateService: TemplateService); /**@hidden *

On Menu component initialization next things are heppening:

* */ ngOnInit(): void; }