import { ElementRef, OnInit, OnChanges, EventEmitter } from '@angular/core'; import { FabModel } from '../../models/fab/fab.model'; import { FabStylingModel } from '../../models/fab/fab-styling.model'; import { FabButtonModel } from '../../models/fab/fab-button.model'; import { CfCoreComponent } from '../core/core.component'; import { TemplateService } from '../../services/template-service/template.service'; /** @hidden */ export declare type DirectionAnimateState = ('void' | 'right-show' | 'left-show' | 'up-show' | 'down-show'); /** *
Component is built using styling of Angular Material Fab button and has features like: * items (means mini fab buttons) direction, items stays opened on click and show items on component init.
***/ export declare class CfFabComponent extends CfCoreComponent implements OnInit, OnChanges { /**@hidden*/ elementRef: ElementRef; /**@hiddden * It is property to attach notification class when component has notifications actions. */ notificationClickable: string; /** ** import {{'{'}} FabButtonModel {{'}'}} from 'cedrus-fusion' * <cf-fab></cf-fab> **
Example:
*{{'{'}}
* direction: "down",
* showButtons: true,
* stayOpened: true,
* trigger: {{'{'}} icon: {{'{'}}name: 'fa-gear'{{'}'}} {{'}'}},
* actionButtons: [
* {{'{'}} icon: {{'{'}}name:"fa-apple"{{'}'}}, display: this.shown {{'}'}},
* {{'{'}} icon: {{'{'}}name:"fa-star"{{'}'}}, label: "Item", labelPosition: "left" {{'}'}},
* {{'{'}} icon: {{'{'}}name:"fa-home"{{'}'}}, disable: this.disabled {{'}'}}
* ]
* {{'}'}}
*
* {{'{'}}
* trigger?: FabButtonStylingModel; // FabButtonStylingModel for trigger icon.
* itemsContainer?: {{'{'}} // Styling for fab action items container.
* class?: string; // Classes for itemsContainer section.
* dynamicClass?: any; // Dynamic classes for itemsContainer section.
* item?: FabButtonStylingModel; // FabButtonStylingModel for each mini fab action item.
* {{'}'}};
* {{'}'}}
*
*/
styling: FabStylingModel;
/**
* Array of buttons with type FabButtonModel for the action mini fab buttons.
*/
actionButtons: FabButtonModel[];
/**
* Direction of opening Fab action buttons. Can be: up, right, down, left.
*/
direction: string;
/**
* Trigger button icon name.
*/
iconName: string;
/**
* Trigger button icon size.
*/
iconSize: string;
/**
* Trigger button tooltip text.
*/
label: string;
/**
* Trigger button tooltip text position.
*/
tooltipPosition: string;
/**
* Whether to display action mini fab buttons on component init.
*/
showButtons: boolean;
/**
* Whether to not hide action mini fab buttons on click events on them.
*/
stayOpened: boolean;
/**@hidden */
animateState: DirectionAnimateState;
/**
* Event to call when Fab trigger button was clicked
*/ onClick: EventEmitterEvent to call when Fab action button was clicked
*/ onItemClick: EventEmitter