stream-chat-angular 6.3.0 → 6.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,7 +22,7 @@ import { MentionModule } from 'angular-mentions';
22
22
  import * as i1$1 from '@angular/forms';
23
23
  import { FormGroup, FormControl, Validators, FormArray, ReactiveFormsModule } from '@angular/forms';
24
24
 
25
- const version = '6.3.0';
25
+ const version = '6.3.1';
26
26
 
27
27
  /**
28
28
  * The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](/chat/docs/sdk/angular/components/NotificationListComponent/) component displays the currently active notifications.
@@ -2910,6 +2910,7 @@ const en = {
2910
2910
  'Allow comments': 'Allow comments',
2911
2911
  'Failed to create poll': 'Failed to create poll',
2912
2912
  'Provide at least one option': 'Provide at least one option',
2913
+ 'Poll options': 'Poll options',
2913
2914
  },
2914
2915
  };
2915
2916
 
@@ -10083,10 +10084,10 @@ class PollActionsComponent extends BasePollComponent {
10083
10084
  }
10084
10085
  }
10085
10086
  PollActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PollActionsComponent, deps: [{ token: CustomTemplatesService }, { token: ChatClientService }, { token: i0.ChangeDetectorRef }, { token: ChannelService }, { token: NotificationService }, { token: MessageActionsService }], target: i0.ɵɵFactoryTarget.Component });
10086
- PollActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: PollActionsComponent, selector: "stream-poll-actions", inputs: { maxOptionsDisplayed: "maxOptionsDisplayed", maxPollOptions: "maxPollOptions" }, viewQueries: [{ propertyName: "allOptions", first: true, predicate: ["allOptions"], descendants: true }, { propertyName: "suggestOption", first: true, predicate: ["suggestOption"], descendants: true }, { propertyName: "addAnswer", first: true, predicate: ["addAnswer"], descendants: true }, { propertyName: "viewComments", first: true, predicate: ["viewComments"], descendants: true }, { propertyName: "viewResults", first: true, predicate: ["viewResults"], descendants: true }, { propertyName: "endVote", first: true, predicate: ["endVote"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"str-chat__poll-actions\">\n <ng-container\n *ngIf=\"maxOptionsDisplayed && options.length > maxOptionsDisplayed\"\n >\n <button class=\"str-chat__poll-action\" (click)=\"modalOpened('allOptions')\">\n {{ \"streamChat.See all options ({{count}})\" | translate:{count:\n options.length} }}\n </button>\n </ng-container>\n <ng-container\n *ngIf=\"\n allowUserSuggestions &&\n canVote &&\n !isClosed &&\n options.length < maxPollOptions\n \"\n >\n <button\n class=\"str-chat__poll-action\"\n (click)=\"modalOpened('suggestOption')\"\n >\n {{ \"streamChat.Suggest an option\" | translate }}\n </button>\n </ng-container>\n <ng-container *ngIf=\"allowAnswers && canVote && !isClosed\">\n <button\n class=\"str-chat__poll-action\"\n (click)=\"modalOpened('addAnswer')\"\n (keyup.enter)=\"modalOpened('addAnswer')\"\n >\n <ng-container *ngIf=\"ownAnwer; else newAnswer\">\n {{ \"streamChat.Update your comment\" | translate }}\n </ng-container>\n <ng-template #newAnswer>\n {{ \"streamChat.Add a comment\" | translate }}\n </ng-template>\n </button>\n </ng-container>\n <ng-container *ngIf=\"answerCount > 0 && canQueryVotes\">\n <button class=\"str-chat__poll-action\" (click)=\"modalOpened('viewComments')\">\n {{ (answerCount === 1 ? \"streamChat.View {{ count }} comment\" :\n \"streamChat.View {{ count }} comments\") | translate:{count: answerCount}\n }}\n </button>\n </ng-container>\n <ng-container *ngIf=\"canQueryVotes\">\n <button class=\"str-chat__poll-action\" (click)=\"modalOpened('viewResults')\">\n {{ \"streamChat.View results\" | translate }}\n </button>\n </ng-container>\n <ng-container *ngIf=\"isOwnPoll && !isClosed\">\n <button class=\"str-chat__poll-action\" (click)=\"modalOpened('endVote')\">\n {{ \"streamChat.End vote\" | translate }}\n </button>\n </ng-container>\n</div>\n\n<ng-container *ngIf=\"selectedAction\">\n <ng-container\n *ngTemplateOutlet=\"\n (customTemplatesService.modalTemplate$ | async) || defaultModal;\n context: getModalContext()\n \"\n ></ng-container>\n</ng-container>\n\n<ng-template\n #defaultModal\n let-isOpen=\"isOpen\"\n let-isOpenChangeHandler=\"isOpenChangeHandler\"\n let-content=\"content\"\n>\n <stream-modal\n class=\"str-chat__poll-actions str-chat-angular__poll-actions\"\n [isOpen]=\"isOpen\"\n [content]=\"content\"\n (isOpenChange)=\"isOpenChangeHandler($event)\"\n >\n </stream-modal>\n</ng-template>\n\n<ng-template #allOptions>\n <div class=\"str-chat__modal__poll-option-list str-chat-angular__poll-actions\">\n <div class=\"str-chat__modal-header\">\n <div class=\"str-chat__modal-header__title\" translate>\n streamChat.Poll options\n </div>\n </div>\n <div class=\"str-chat__modal__poll-option-list__body\">\n <div class=\"str-chat__modal__poll-option-list__title\">{{ name }}</div>\n <stream-poll-options-list\n [pollId]=\"pollId\"\n [messageId]=\"messageId\"\n [maxOptionsDisplayed]=\"undefined\"\n ></stream-poll-options-list>\n <stream-notification-list></stream-notification-list>\n </div>\n </div>\n</ng-template>\n<ng-template #suggestOption>\n <stream-add-option\n [pollId]=\"pollId\"\n [messageId]=\"messageId\"\n [closeModal]=\"modalClosed\"\n ></stream-add-option>\n <stream-notification-list></stream-notification-list>\n</ng-template>\n<ng-template #addAnswer>\n <stream-upsert-answer\n [pollId]=\"pollId\"\n [messageId]=\"messageId\"\n [answer]=\"ownAnwer\"\n [closeModal]=\"modalClosed\"\n ></stream-upsert-answer>\n <stream-notification-list></stream-notification-list>\n</ng-template>\n<ng-template #viewComments>\n <stream-poll-answers-list\n (upsertOwnAnswer)=\"modalOpened('addAnswer')\"\n [pollId]=\"pollId\"\n [messageId]=\"messageId\"\n ></stream-poll-answers-list>\n <stream-notification-list></stream-notification-list>\n</ng-template>\n<ng-template #viewResults>\n <stream-poll-results-list\n [messageId]=\"messageId\"\n [pollId]=\"pollId\"\n ></stream-poll-results-list>\n <stream-notification-list></stream-notification-list>\n</ng-template>\n<ng-template #endVote>\n <div\n class=\"str-chat__dialog str-chat__dialog--prompt str-chat__modal__end-vote\"\n >\n <div class=\"str-chat__dialog__body\">\n <div class=\"str-chat__dialog__title\" translate>streamChat.End vote</div>\n <div class=\"str-chat__dialog__prompt\" translate>\n streamChat.After a poll is closed, no more votes can be cast\n </div>\n <stream-notification-list></stream-notification-list>\n <div class=\"str-chat__dialog__controls\">\n <button\n class=\"str-chat__dialog__controls-button\"\n (click)=\"modalClosed()\"\n >\n {{ \"streamChat.Cancel\" | translate }}\n </button>\n <button class=\"str-chat__dialog__controls-button\" (click)=\"closePoll()\">\n {{ \"streamChat.End vote\" | translate }}\n </button>\n </div>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i6.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: ModalComponent, selector: "stream-modal", inputs: ["isOpen", "content"], outputs: ["isOpenChange"] }, { kind: "component", type: NotificationListComponent, selector: "stream-notification-list" }, { kind: "component", type: PollOptionsListComponent, selector: "stream-poll-options-list", inputs: ["maxOptionsDisplayed"] }, { kind: "component", type: PollResultsListComponent, selector: "stream-poll-results-list" }, { kind: "component", type: PollAnswersListComponent, selector: "stream-poll-answers-list", outputs: ["upsertOwnAnswer"] }, { kind: "component", type: UpsertAnswerComponent, selector: "stream-upsert-answer", inputs: ["answer", "closeModal"] }, { kind: "component", type: AddOptionComponent, selector: "stream-add-option", inputs: ["closeModal"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
10087
+ PollActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: PollActionsComponent, selector: "stream-poll-actions", inputs: { maxOptionsDisplayed: "maxOptionsDisplayed", maxPollOptions: "maxPollOptions" }, viewQueries: [{ propertyName: "allOptions", first: true, predicate: ["allOptions"], descendants: true }, { propertyName: "suggestOption", first: true, predicate: ["suggestOption"], descendants: true }, { propertyName: "addAnswer", first: true, predicate: ["addAnswer"], descendants: true }, { propertyName: "viewComments", first: true, predicate: ["viewComments"], descendants: true }, { propertyName: "viewResults", first: true, predicate: ["viewResults"], descendants: true }, { propertyName: "endVote", first: true, predicate: ["endVote"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"str-chat__poll-actions\">\n <ng-container\n *ngIf=\"maxOptionsDisplayed && options.length > maxOptionsDisplayed\"\n >\n <button class=\"str-chat__poll-action\" (click)=\"modalOpened('allOptions')\">\n {{ \"streamChat.See all options ({{count}})\" | translate:{count:\n options.length} }}\n </button>\n </ng-container>\n <ng-container\n *ngIf=\"\n allowUserSuggestions &&\n canVote &&\n !isClosed &&\n options.length < maxPollOptions\n \"\n >\n <button\n class=\"str-chat__poll-action\"\n (click)=\"modalOpened('suggestOption')\"\n >\n {{ \"streamChat.Suggest an option\" | translate }}\n </button>\n </ng-container>\n <ng-container *ngIf=\"allowAnswers && canVote && !isClosed\">\n <button\n class=\"str-chat__poll-action\"\n (click)=\"modalOpened('addAnswer')\"\n (keyup.enter)=\"modalOpened('addAnswer')\"\n >\n <ng-container *ngIf=\"ownAnwer; else newAnswer\">\n {{ \"streamChat.Update your comment\" | translate }}\n </ng-container>\n <ng-template #newAnswer>\n {{ \"streamChat.Add a comment\" | translate }}\n </ng-template>\n </button>\n </ng-container>\n <ng-container *ngIf=\"answerCount > 0 && canQueryVotes\">\n <button class=\"str-chat__poll-action\" (click)=\"modalOpened('viewComments')\">\n {{ (answerCount === 1 ? \"streamChat.View {{ count }} comment\" :\n \"streamChat.View {{ count }} comments\") | translate:{count: answerCount}\n }}\n </button>\n </ng-container>\n <ng-container *ngIf=\"canQueryVotes\">\n <button class=\"str-chat__poll-action\" (click)=\"modalOpened('viewResults')\">\n {{ \"streamChat.View results\" | translate }}\n </button>\n </ng-container>\n <ng-container *ngIf=\"isOwnPoll && !isClosed\">\n <button class=\"str-chat__poll-action\" (click)=\"modalOpened('endVote')\">\n {{ \"streamChat.End vote\" | translate }}\n </button>\n </ng-container>\n</div>\n\n<ng-container *ngIf=\"selectedAction\">\n <ng-container\n *ngTemplateOutlet=\"\n (customTemplatesService.modalTemplate$ | async) || defaultModal;\n context: getModalContext()\n \"\n ></ng-container>\n</ng-container>\n\n<ng-template\n #defaultModal\n let-isOpen=\"isOpen\"\n let-isOpenChangeHandler=\"isOpenChangeHandler\"\n let-content=\"content\"\n>\n <stream-modal\n class=\"str-chat__poll-actions str-chat-angular__poll-actions\"\n [isOpen]=\"isOpen\"\n [content]=\"content\"\n (isOpenChange)=\"isOpenChangeHandler($event)\"\n >\n </stream-modal>\n</ng-template>\n\n<ng-template #allOptions>\n <div class=\"str-chat__modal__poll-option-list str-chat-angular__poll-actions\">\n <div class=\"str-chat__modal-header\">\n <div class=\"str-chat__modal-header__title\">\n {{ \"streamChat.Poll options\" | translate }}\n </div>\n </div>\n <div class=\"str-chat__modal__poll-option-list__body\">\n <div class=\"str-chat__modal__poll-option-list__title\">{{ name }}</div>\n <stream-poll-options-list\n [pollId]=\"pollId\"\n [messageId]=\"messageId\"\n [maxOptionsDisplayed]=\"undefined\"\n ></stream-poll-options-list>\n <stream-notification-list></stream-notification-list>\n </div>\n </div>\n</ng-template>\n<ng-template #suggestOption>\n <stream-add-option\n [pollId]=\"pollId\"\n [messageId]=\"messageId\"\n [closeModal]=\"modalClosed\"\n ></stream-add-option>\n <stream-notification-list></stream-notification-list>\n</ng-template>\n<ng-template #addAnswer>\n <stream-upsert-answer\n [pollId]=\"pollId\"\n [messageId]=\"messageId\"\n [answer]=\"ownAnwer\"\n [closeModal]=\"modalClosed\"\n ></stream-upsert-answer>\n <stream-notification-list></stream-notification-list>\n</ng-template>\n<ng-template #viewComments>\n <stream-poll-answers-list\n (upsertOwnAnswer)=\"modalOpened('addAnswer')\"\n [pollId]=\"pollId\"\n [messageId]=\"messageId\"\n ></stream-poll-answers-list>\n <stream-notification-list></stream-notification-list>\n</ng-template>\n<ng-template #viewResults>\n <stream-poll-results-list\n [messageId]=\"messageId\"\n [pollId]=\"pollId\"\n ></stream-poll-results-list>\n <stream-notification-list></stream-notification-list>\n</ng-template>\n<ng-template #endVote>\n <div\n class=\"str-chat__dialog str-chat__dialog--prompt str-chat__modal__end-vote\"\n >\n <div class=\"str-chat__dialog__body\">\n <div class=\"str-chat__dialog__title\" translate>streamChat.End vote</div>\n <div class=\"str-chat__dialog__prompt\" translate>\n streamChat.After a poll is closed, no more votes can be cast\n </div>\n <stream-notification-list></stream-notification-list>\n <div class=\"str-chat__dialog__controls\">\n <button\n class=\"str-chat__dialog__controls-button\"\n (click)=\"modalClosed()\"\n >\n {{ \"streamChat.Cancel\" | translate }}\n </button>\n <button class=\"str-chat__dialog__controls-button\" (click)=\"closePoll()\">\n {{ \"streamChat.End vote\" | translate }}\n </button>\n </div>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i6.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: ModalComponent, selector: "stream-modal", inputs: ["isOpen", "content"], outputs: ["isOpenChange"] }, { kind: "component", type: NotificationListComponent, selector: "stream-notification-list" }, { kind: "component", type: PollOptionsListComponent, selector: "stream-poll-options-list", inputs: ["maxOptionsDisplayed"] }, { kind: "component", type: PollResultsListComponent, selector: "stream-poll-results-list" }, { kind: "component", type: PollAnswersListComponent, selector: "stream-poll-answers-list", outputs: ["upsertOwnAnswer"] }, { kind: "component", type: UpsertAnswerComponent, selector: "stream-upsert-answer", inputs: ["answer", "closeModal"] }, { kind: "component", type: AddOptionComponent, selector: "stream-add-option", inputs: ["closeModal"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
10087
10088
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PollActionsComponent, decorators: [{
10088
10089
  type: Component,
10089
- args: [{ selector: 'stream-poll-actions', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"str-chat__poll-actions\">\n <ng-container\n *ngIf=\"maxOptionsDisplayed && options.length > maxOptionsDisplayed\"\n >\n <button class=\"str-chat__poll-action\" (click)=\"modalOpened('allOptions')\">\n {{ \"streamChat.See all options ({{count}})\" | translate:{count:\n options.length} }}\n </button>\n </ng-container>\n <ng-container\n *ngIf=\"\n allowUserSuggestions &&\n canVote &&\n !isClosed &&\n options.length < maxPollOptions\n \"\n >\n <button\n class=\"str-chat__poll-action\"\n (click)=\"modalOpened('suggestOption')\"\n >\n {{ \"streamChat.Suggest an option\" | translate }}\n </button>\n </ng-container>\n <ng-container *ngIf=\"allowAnswers && canVote && !isClosed\">\n <button\n class=\"str-chat__poll-action\"\n (click)=\"modalOpened('addAnswer')\"\n (keyup.enter)=\"modalOpened('addAnswer')\"\n >\n <ng-container *ngIf=\"ownAnwer; else newAnswer\">\n {{ \"streamChat.Update your comment\" | translate }}\n </ng-container>\n <ng-template #newAnswer>\n {{ \"streamChat.Add a comment\" | translate }}\n </ng-template>\n </button>\n </ng-container>\n <ng-container *ngIf=\"answerCount > 0 && canQueryVotes\">\n <button class=\"str-chat__poll-action\" (click)=\"modalOpened('viewComments')\">\n {{ (answerCount === 1 ? \"streamChat.View {{ count }} comment\" :\n \"streamChat.View {{ count }} comments\") | translate:{count: answerCount}\n }}\n </button>\n </ng-container>\n <ng-container *ngIf=\"canQueryVotes\">\n <button class=\"str-chat__poll-action\" (click)=\"modalOpened('viewResults')\">\n {{ \"streamChat.View results\" | translate }}\n </button>\n </ng-container>\n <ng-container *ngIf=\"isOwnPoll && !isClosed\">\n <button class=\"str-chat__poll-action\" (click)=\"modalOpened('endVote')\">\n {{ \"streamChat.End vote\" | translate }}\n </button>\n </ng-container>\n</div>\n\n<ng-container *ngIf=\"selectedAction\">\n <ng-container\n *ngTemplateOutlet=\"\n (customTemplatesService.modalTemplate$ | async) || defaultModal;\n context: getModalContext()\n \"\n ></ng-container>\n</ng-container>\n\n<ng-template\n #defaultModal\n let-isOpen=\"isOpen\"\n let-isOpenChangeHandler=\"isOpenChangeHandler\"\n let-content=\"content\"\n>\n <stream-modal\n class=\"str-chat__poll-actions str-chat-angular__poll-actions\"\n [isOpen]=\"isOpen\"\n [content]=\"content\"\n (isOpenChange)=\"isOpenChangeHandler($event)\"\n >\n </stream-modal>\n</ng-template>\n\n<ng-template #allOptions>\n <div class=\"str-chat__modal__poll-option-list str-chat-angular__poll-actions\">\n <div class=\"str-chat__modal-header\">\n <div class=\"str-chat__modal-header__title\" translate>\n streamChat.Poll options\n </div>\n </div>\n <div class=\"str-chat__modal__poll-option-list__body\">\n <div class=\"str-chat__modal__poll-option-list__title\">{{ name }}</div>\n <stream-poll-options-list\n [pollId]=\"pollId\"\n [messageId]=\"messageId\"\n [maxOptionsDisplayed]=\"undefined\"\n ></stream-poll-options-list>\n <stream-notification-list></stream-notification-list>\n </div>\n </div>\n</ng-template>\n<ng-template #suggestOption>\n <stream-add-option\n [pollId]=\"pollId\"\n [messageId]=\"messageId\"\n [closeModal]=\"modalClosed\"\n ></stream-add-option>\n <stream-notification-list></stream-notification-list>\n</ng-template>\n<ng-template #addAnswer>\n <stream-upsert-answer\n [pollId]=\"pollId\"\n [messageId]=\"messageId\"\n [answer]=\"ownAnwer\"\n [closeModal]=\"modalClosed\"\n ></stream-upsert-answer>\n <stream-notification-list></stream-notification-list>\n</ng-template>\n<ng-template #viewComments>\n <stream-poll-answers-list\n (upsertOwnAnswer)=\"modalOpened('addAnswer')\"\n [pollId]=\"pollId\"\n [messageId]=\"messageId\"\n ></stream-poll-answers-list>\n <stream-notification-list></stream-notification-list>\n</ng-template>\n<ng-template #viewResults>\n <stream-poll-results-list\n [messageId]=\"messageId\"\n [pollId]=\"pollId\"\n ></stream-poll-results-list>\n <stream-notification-list></stream-notification-list>\n</ng-template>\n<ng-template #endVote>\n <div\n class=\"str-chat__dialog str-chat__dialog--prompt str-chat__modal__end-vote\"\n >\n <div class=\"str-chat__dialog__body\">\n <div class=\"str-chat__dialog__title\" translate>streamChat.End vote</div>\n <div class=\"str-chat__dialog__prompt\" translate>\n streamChat.After a poll is closed, no more votes can be cast\n </div>\n <stream-notification-list></stream-notification-list>\n <div class=\"str-chat__dialog__controls\">\n <button\n class=\"str-chat__dialog__controls-button\"\n (click)=\"modalClosed()\"\n >\n {{ \"streamChat.Cancel\" | translate }}\n </button>\n <button class=\"str-chat__dialog__controls-button\" (click)=\"closePoll()\">\n {{ \"streamChat.End vote\" | translate }}\n </button>\n </div>\n </div>\n </div>\n</ng-template>\n" }]
10090
+ args: [{ selector: 'stream-poll-actions', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"str-chat__poll-actions\">\n <ng-container\n *ngIf=\"maxOptionsDisplayed && options.length > maxOptionsDisplayed\"\n >\n <button class=\"str-chat__poll-action\" (click)=\"modalOpened('allOptions')\">\n {{ \"streamChat.See all options ({{count}})\" | translate:{count:\n options.length} }}\n </button>\n </ng-container>\n <ng-container\n *ngIf=\"\n allowUserSuggestions &&\n canVote &&\n !isClosed &&\n options.length < maxPollOptions\n \"\n >\n <button\n class=\"str-chat__poll-action\"\n (click)=\"modalOpened('suggestOption')\"\n >\n {{ \"streamChat.Suggest an option\" | translate }}\n </button>\n </ng-container>\n <ng-container *ngIf=\"allowAnswers && canVote && !isClosed\">\n <button\n class=\"str-chat__poll-action\"\n (click)=\"modalOpened('addAnswer')\"\n (keyup.enter)=\"modalOpened('addAnswer')\"\n >\n <ng-container *ngIf=\"ownAnwer; else newAnswer\">\n {{ \"streamChat.Update your comment\" | translate }}\n </ng-container>\n <ng-template #newAnswer>\n {{ \"streamChat.Add a comment\" | translate }}\n </ng-template>\n </button>\n </ng-container>\n <ng-container *ngIf=\"answerCount > 0 && canQueryVotes\">\n <button class=\"str-chat__poll-action\" (click)=\"modalOpened('viewComments')\">\n {{ (answerCount === 1 ? \"streamChat.View {{ count }} comment\" :\n \"streamChat.View {{ count }} comments\") | translate:{count: answerCount}\n }}\n </button>\n </ng-container>\n <ng-container *ngIf=\"canQueryVotes\">\n <button class=\"str-chat__poll-action\" (click)=\"modalOpened('viewResults')\">\n {{ \"streamChat.View results\" | translate }}\n </button>\n </ng-container>\n <ng-container *ngIf=\"isOwnPoll && !isClosed\">\n <button class=\"str-chat__poll-action\" (click)=\"modalOpened('endVote')\">\n {{ \"streamChat.End vote\" | translate }}\n </button>\n </ng-container>\n</div>\n\n<ng-container *ngIf=\"selectedAction\">\n <ng-container\n *ngTemplateOutlet=\"\n (customTemplatesService.modalTemplate$ | async) || defaultModal;\n context: getModalContext()\n \"\n ></ng-container>\n</ng-container>\n\n<ng-template\n #defaultModal\n let-isOpen=\"isOpen\"\n let-isOpenChangeHandler=\"isOpenChangeHandler\"\n let-content=\"content\"\n>\n <stream-modal\n class=\"str-chat__poll-actions str-chat-angular__poll-actions\"\n [isOpen]=\"isOpen\"\n [content]=\"content\"\n (isOpenChange)=\"isOpenChangeHandler($event)\"\n >\n </stream-modal>\n</ng-template>\n\n<ng-template #allOptions>\n <div class=\"str-chat__modal__poll-option-list str-chat-angular__poll-actions\">\n <div class=\"str-chat__modal-header\">\n <div class=\"str-chat__modal-header__title\">\n {{ \"streamChat.Poll options\" | translate }}\n </div>\n </div>\n <div class=\"str-chat__modal__poll-option-list__body\">\n <div class=\"str-chat__modal__poll-option-list__title\">{{ name }}</div>\n <stream-poll-options-list\n [pollId]=\"pollId\"\n [messageId]=\"messageId\"\n [maxOptionsDisplayed]=\"undefined\"\n ></stream-poll-options-list>\n <stream-notification-list></stream-notification-list>\n </div>\n </div>\n</ng-template>\n<ng-template #suggestOption>\n <stream-add-option\n [pollId]=\"pollId\"\n [messageId]=\"messageId\"\n [closeModal]=\"modalClosed\"\n ></stream-add-option>\n <stream-notification-list></stream-notification-list>\n</ng-template>\n<ng-template #addAnswer>\n <stream-upsert-answer\n [pollId]=\"pollId\"\n [messageId]=\"messageId\"\n [answer]=\"ownAnwer\"\n [closeModal]=\"modalClosed\"\n ></stream-upsert-answer>\n <stream-notification-list></stream-notification-list>\n</ng-template>\n<ng-template #viewComments>\n <stream-poll-answers-list\n (upsertOwnAnswer)=\"modalOpened('addAnswer')\"\n [pollId]=\"pollId\"\n [messageId]=\"messageId\"\n ></stream-poll-answers-list>\n <stream-notification-list></stream-notification-list>\n</ng-template>\n<ng-template #viewResults>\n <stream-poll-results-list\n [messageId]=\"messageId\"\n [pollId]=\"pollId\"\n ></stream-poll-results-list>\n <stream-notification-list></stream-notification-list>\n</ng-template>\n<ng-template #endVote>\n <div\n class=\"str-chat__dialog str-chat__dialog--prompt str-chat__modal__end-vote\"\n >\n <div class=\"str-chat__dialog__body\">\n <div class=\"str-chat__dialog__title\" translate>streamChat.End vote</div>\n <div class=\"str-chat__dialog__prompt\" translate>\n streamChat.After a poll is closed, no more votes can be cast\n </div>\n <stream-notification-list></stream-notification-list>\n <div class=\"str-chat__dialog__controls\">\n <button\n class=\"str-chat__dialog__controls-button\"\n (click)=\"modalClosed()\"\n >\n {{ \"streamChat.Cancel\" | translate }}\n </button>\n <button class=\"str-chat__dialog__controls-button\" (click)=\"closePoll()\">\n {{ \"streamChat.End vote\" | translate }}\n </button>\n </div>\n </div>\n </div>\n</ng-template>\n" }]
10090
10091
  }], ctorParameters: function () { return [{ type: CustomTemplatesService }, { type: ChatClientService }, { type: i0.ChangeDetectorRef }, { type: ChannelService }, { type: NotificationService }, { type: MessageActionsService }]; }, propDecorators: { maxOptionsDisplayed: [{
10091
10092
  type: Input
10092
10093
  }], maxPollOptions: [{