stream-chat-angular 6.3.0-beta.1 → 6.3.0

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-beta.1';
25
+ const version = '6.3.0';
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.
@@ -9373,7 +9373,6 @@ class BasePollComponent {
9373
9373
  markForCheck() {
9374
9374
  if (this.isViewInited) {
9375
9375
  this.cdRef.detectChanges();
9376
- this.capabilitySubscription?.unsubscribe();
9377
9376
  }
9378
9377
  }
9379
9378
  }
@@ -9491,7 +9490,7 @@ class PollOptionSelectorComponent extends BasePollComponent {
9491
9490
  }
9492
9491
  }
9493
9492
  async toggleVote() {
9494
- if (!this.canVote || !this.option?.id || !this.messageId)
9493
+ if (!this.canVote || !this.option?.id || !this.messageId || this.isClosed)
9495
9494
  return;
9496
9495
  const haveVotedForTheOption = !!this.ownVote;
9497
9496
  if (!haveVotedForTheOption &&
@@ -9586,10 +9585,10 @@ class PollOptionSelectorComponent extends BasePollComponent {
9586
9585
  }
9587
9586
  }
9588
9587
  PollOptionSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PollOptionSelectorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
9589
- PollOptionSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: PollOptionSelectorComponent, selector: "stream-poll-option-selector", inputs: { option: "option", displayAvatarCount: "displayAvatarCount", voteCountVerbose: "voteCountVerbose" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"str-chat__poll-option\"\n [class.str-chat__poll-option--votable]=\"\n canVote &&\n maxVoteAllowedCount &&\n ownVoteCount < maxVoteAllowedCount &&\n !ownVote\n \"\n (click)=\"toggleVote()\"\n (keyup.enter)=\"toggleVote()\"\n>\n <ng-container *ngIf=\"canVote\">\n <ng-container *ngTemplateOutlet=\"checkmark\"></ng-container>\n </ng-container>\n <div class=\"str-chat__poll-option-data\">\n <p class=\"str-chat__poll-option-text\">{{ option?.text }}</p>\n <ng-container *ngIf=\"displayAvatarCount && votingVisibility === 'public'\">\n <div\n *ngFor=\"let vote of latestVotes; trackBy: trackByVoteId\"\n class=\"str-chat__poll-option-voters\"\n >\n <stream-avatar-placeholder\n location=\"poll-voter\"\n [user]=\"vote.user\"\n [imageUrl]=\"vote.user?.image\"\n [name]=\"vote.user?.name\"\n type=\"user\"\n ></stream-avatar-placeholder>\n </div>\n </ng-container>\n <div class=\"str-chat__poll-option-vote-count\">\n <ng-container *ngIf=\"voteCountVerbose; else count\">\n {{ 'streamChat.{{ count }} votes' | translate:{count: voteCount} }}\n </ng-container>\n <ng-template #count>\n {{ voteCount }}\n </ng-template>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"amountBar\"></ng-container>\n</div>\n\n<ng-template #checkmark>\n <div\n class=\"str-chat__checkmark\"\n [class.str-chat__checkmark--checked]=\"!!ownVote\"\n ></div>\n</ng-template>\n\n<ng-template #amountBar>\n <div\n class=\"str-chat__amount-bar str-chat__poll-option__votes-bar\"\n [class.str-chat__poll-option__votes-bar--winner]=\"isClosed && isWinner\"\n role=\"progressbar\"\n [ngStyle]=\"{\n '--str-chat__amount-bar-fulfillment':\n (winningOptionCount && voteCount / winningOptionCount) * 100 + '%'\n }\"\n ></div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: AvatarPlaceholderComponent, selector: "stream-avatar-placeholder", inputs: ["name", "imageUrl", "location", "channel", "user", "type", "initialsType", "showOnlineIndicator"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9588
+ PollOptionSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: PollOptionSelectorComponent, selector: "stream-poll-option-selector", inputs: { option: "option", displayAvatarCount: "displayAvatarCount", voteCountVerbose: "voteCountVerbose" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"str-chat__poll-option\"\n [class.str-chat__poll-option--votable]=\"\n !isClosed &&\n canVote &&\n maxVoteAllowedCount &&\n ownVoteCount < maxVoteAllowedCount &&\n !ownVote\n \"\n (click)=\"toggleVote()\"\n (keyup.enter)=\"toggleVote()\"\n>\n <ng-container *ngIf=\"canVote\">\n <ng-container *ngTemplateOutlet=\"checkmark\"></ng-container>\n </ng-container>\n <div class=\"str-chat__poll-option-data\">\n <p class=\"str-chat__poll-option-text\">{{ option?.text }}</p>\n <ng-container *ngIf=\"displayAvatarCount && votingVisibility === 'public'\">\n <div\n *ngFor=\"let vote of latestVotes; trackBy: trackByVoteId\"\n class=\"str-chat__poll-option-voters\"\n >\n <stream-avatar-placeholder\n location=\"poll-voter\"\n [user]=\"vote.user\"\n [imageUrl]=\"vote.user?.image\"\n [name]=\"vote.user?.name\"\n type=\"user\"\n ></stream-avatar-placeholder>\n </div>\n </ng-container>\n <div class=\"str-chat__poll-option-vote-count\">\n <ng-container *ngIf=\"voteCountVerbose; else count\">\n {{ 'streamChat.{{ count }} votes' | translate:{count: voteCount} }}\n </ng-container>\n <ng-template #count>\n {{ voteCount }}\n </ng-template>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"amountBar\"></ng-container>\n</div>\n\n<ng-template #checkmark>\n <div\n class=\"str-chat__checkmark\"\n [class.str-chat__checkmark--checked]=\"!!ownVote\"\n ></div>\n</ng-template>\n\n<ng-template #amountBar>\n <div\n class=\"str-chat__amount-bar str-chat__poll-option__votes-bar\"\n [class.str-chat__poll-option__votes-bar--winner]=\"isClosed && isWinner\"\n role=\"progressbar\"\n [ngStyle]=\"{\n '--str-chat__amount-bar-fulfillment':\n (winningOptionCount && voteCount / winningOptionCount) * 100 + '%'\n }\"\n ></div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: AvatarPlaceholderComponent, selector: "stream-avatar-placeholder", inputs: ["name", "imageUrl", "location", "channel", "user", "type", "initialsType", "showOnlineIndicator"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9590
9589
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PollOptionSelectorComponent, decorators: [{
9591
9590
  type: Component,
9592
- args: [{ selector: 'stream-poll-option-selector', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"str-chat__poll-option\"\n [class.str-chat__poll-option--votable]=\"\n canVote &&\n maxVoteAllowedCount &&\n ownVoteCount < maxVoteAllowedCount &&\n !ownVote\n \"\n (click)=\"toggleVote()\"\n (keyup.enter)=\"toggleVote()\"\n>\n <ng-container *ngIf=\"canVote\">\n <ng-container *ngTemplateOutlet=\"checkmark\"></ng-container>\n </ng-container>\n <div class=\"str-chat__poll-option-data\">\n <p class=\"str-chat__poll-option-text\">{{ option?.text }}</p>\n <ng-container *ngIf=\"displayAvatarCount && votingVisibility === 'public'\">\n <div\n *ngFor=\"let vote of latestVotes; trackBy: trackByVoteId\"\n class=\"str-chat__poll-option-voters\"\n >\n <stream-avatar-placeholder\n location=\"poll-voter\"\n [user]=\"vote.user\"\n [imageUrl]=\"vote.user?.image\"\n [name]=\"vote.user?.name\"\n type=\"user\"\n ></stream-avatar-placeholder>\n </div>\n </ng-container>\n <div class=\"str-chat__poll-option-vote-count\">\n <ng-container *ngIf=\"voteCountVerbose; else count\">\n {{ 'streamChat.{{ count }} votes' | translate:{count: voteCount} }}\n </ng-container>\n <ng-template #count>\n {{ voteCount }}\n </ng-template>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"amountBar\"></ng-container>\n</div>\n\n<ng-template #checkmark>\n <div\n class=\"str-chat__checkmark\"\n [class.str-chat__checkmark--checked]=\"!!ownVote\"\n ></div>\n</ng-template>\n\n<ng-template #amountBar>\n <div\n class=\"str-chat__amount-bar str-chat__poll-option__votes-bar\"\n [class.str-chat__poll-option__votes-bar--winner]=\"isClosed && isWinner\"\n role=\"progressbar\"\n [ngStyle]=\"{\n '--str-chat__amount-bar-fulfillment':\n (winningOptionCount && voteCount / winningOptionCount) * 100 + '%'\n }\"\n ></div>\n</ng-template>\n" }]
9591
+ args: [{ selector: 'stream-poll-option-selector', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"str-chat__poll-option\"\n [class.str-chat__poll-option--votable]=\"\n !isClosed &&\n canVote &&\n maxVoteAllowedCount &&\n ownVoteCount < maxVoteAllowedCount &&\n !ownVote\n \"\n (click)=\"toggleVote()\"\n (keyup.enter)=\"toggleVote()\"\n>\n <ng-container *ngIf=\"canVote\">\n <ng-container *ngTemplateOutlet=\"checkmark\"></ng-container>\n </ng-container>\n <div class=\"str-chat__poll-option-data\">\n <p class=\"str-chat__poll-option-text\">{{ option?.text }}</p>\n <ng-container *ngIf=\"displayAvatarCount && votingVisibility === 'public'\">\n <div\n *ngFor=\"let vote of latestVotes; trackBy: trackByVoteId\"\n class=\"str-chat__poll-option-voters\"\n >\n <stream-avatar-placeholder\n location=\"poll-voter\"\n [user]=\"vote.user\"\n [imageUrl]=\"vote.user?.image\"\n [name]=\"vote.user?.name\"\n type=\"user\"\n ></stream-avatar-placeholder>\n </div>\n </ng-container>\n <div class=\"str-chat__poll-option-vote-count\">\n <ng-container *ngIf=\"voteCountVerbose; else count\">\n {{ 'streamChat.{{ count }} votes' | translate:{count: voteCount} }}\n </ng-container>\n <ng-template #count>\n {{ voteCount }}\n </ng-template>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"amountBar\"></ng-container>\n</div>\n\n<ng-template #checkmark>\n <div\n class=\"str-chat__checkmark\"\n [class.str-chat__checkmark--checked]=\"!!ownVote\"\n ></div>\n</ng-template>\n\n<ng-template #amountBar>\n <div\n class=\"str-chat__amount-bar str-chat__poll-option__votes-bar\"\n [class.str-chat__poll-option__votes-bar--winner]=\"isClosed && isWinner\"\n role=\"progressbar\"\n [ngStyle]=\"{\n '--str-chat__amount-bar-fulfillment':\n (winningOptionCount && voteCount / winningOptionCount) * 100 + '%'\n }\"\n ></div>\n</ng-template>\n" }]
9593
9592
  }], propDecorators: { option: [{
9594
9593
  type: Input
9595
9594
  }], displayAvatarCount: [{