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
***/ 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. */ /** ** import {{'{'}} MenuModel {{'}'}} from 'cedrus-fusion' * import {{'{'}} MenuStylingModel {{'}'}} from 'cedrus-fusion' * <cf-menu></cf-menu> **
{{'{'}}
* 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: EventEmitterOn Menu component initialization next things are heppening:
*