UNPKG

fabric8-planner

Version:
48 lines 2.19 kB
import { Component, Input, ViewEncapsulation } from '@angular/core'; import { CommentQuery } from './../../models/comment'; var WorkItemCommentWrapperComponent = /** @class */ (function () { function WorkItemCommentWrapperComponent(commentQuery) { this.commentQuery = commentQuery; this.workItem = null; this.comments = this.commentQuery.getCommentsWithChildren(); this.eventListeners = []; } Object.defineProperty(WorkItemCommentWrapperComponent.prototype, "workItemSetter", { set: function (workItem) { this.workItem = workItem; this.commentQuery.dispatchGet(workItem.commentLink); }, enumerable: true, configurable: true }); WorkItemCommentWrapperComponent.prototype.ngOnInit = function () { }; WorkItemCommentWrapperComponent.prototype.ngOnDestroy = function () { this.eventListeners.forEach(function (e) { return e.unsubscribe(); }); }; WorkItemCommentWrapperComponent.prototype.createComment = function (newComment) { this.commentQuery.createComment(this.workItem.commentLink, newComment); }; WorkItemCommentWrapperComponent.prototype.updateComment = function (comment) { this.commentQuery.updateComment(comment); }; WorkItemCommentWrapperComponent.prototype.deleteComment = function (event) { }; WorkItemCommentWrapperComponent.decorators = [ { type: Component, args: [{ encapsulation: ViewEncapsulation.None, selector: 'work-item-comment-wrapper', template: require('./work-item-comment-wrapper.component.html'), },] }, ]; /** @nocollapse */ WorkItemCommentWrapperComponent.ctorParameters = function () { return [ { type: CommentQuery, }, ]; }; WorkItemCommentWrapperComponent.propDecorators = { 'loggedIn': [{ type: Input },], 'loggedInUser': [{ type: Input },], 'workItemSetter': [{ type: Input, args: ['workItem',] },], }; return WorkItemCommentWrapperComponent; }()); export { WorkItemCommentWrapperComponent }; //# sourceMappingURL=work-item-comment-wrapper.component.js.map