UNPKG

fabric8-planner

Version:
57 lines 2.5 kB
import { animate, state, style, transition, trigger } from '@angular/animations'; import { Component, EventEmitter, Input, Output } from '@angular/core'; var PlannerLayoutComponent = /** @class */ (function () { function PlannerLayoutComponent() { this.sidePanelStateChange = new EventEmitter(); this.contentHide = false; this.sidePanelState = 'out'; } PlannerLayoutComponent.prototype.ngOnInit = function () { }; PlannerLayoutComponent.prototype.getCurrentState = function () { return this.sidePanelState; }; PlannerLayoutComponent.prototype.toggleSidePanel = function () { this.sidePanelState = this.sidePanelState === 'in' ? 'out' : 'in'; this.sidePanelStateChange.emit(this.sidePanelState); }; PlannerLayoutComponent.decorators = [ { type: Component, args: [{ selector: 'alm-planner-layout', template: require('./planner-layout.component.html'), styles: [require('./planner-layout.component.css').toString()], animations: [ trigger('slideInOut', [ state('in', style({ width: '50px' })), state('out', style({ width: '320px' })), transition('in <=> out', animate('400ms ease-in-out')) ]), trigger('slideInOutContent', [ state('out', style({ marginLeft: '50px' })), state('in', style({ marginLeft: '320px' })), transition('in <=> out', animate('400ms ease-in-out')) ]) ] },] }, ]; /** @nocollapse */ PlannerLayoutComponent.ctorParameters = function () { return []; }; PlannerLayoutComponent.propDecorators = { 'itemName': [{ type: Input },], 'itemIcon': [{ type: Input },], 'sidePanelContent': [{ type: Input },], 'sectionContent': [{ type: Input },], 'sidePanelStateChange': [{ type: Output },], }; return PlannerLayoutComponent; }()); export { PlannerLayoutComponent }; //# sourceMappingURL=planner-layout.component.js.map