stream-chat-angular 4.5.3 → 4.7.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.
- package/assets/version.d.ts +1 -1
- package/bundles/stream-chat-angular.umd.js +46 -36
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/attachment-configuration.service.js +26 -23
- package/esm2015/lib/attachment-list/attachment-list.component.js +2 -2
- package/esm2015/lib/channel.service.js +19 -13
- package/esm2015/lib/types.js +1 -1
- package/fesm2015/stream-chat-angular.js +45 -36
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/attachment-configuration.service.d.ts +3 -3
- package/lib/attachment-list/attachment-list.component.d.ts +3 -3
- package/lib/types.d.ts +5 -1
- package/package.json +1 -1
- package/src/assets/styles/css/index.css +1 -1
- package/src/assets/styles/css/index.css.map +1 -1
- package/src/assets/styles/scss/Attachment.scss +45 -20
- package/src/assets/styles/scss/Audio.scss +1 -0
- package/src/assets/styles/scss/Message.scss +26 -41
- package/src/assets/styles/scss/MessageCommerce.scss +1 -1
- package/src/assets/styles/scss/Thread.scss +39 -2
- package/src/assets/styles/scss/VirtualMessage.scss +2 -6
- package/src/assets/styles/v2/css/index.css +1 -1
- package/src/assets/styles/v2/css/index.css.map +1 -1
- package/src/assets/styles/v2/css/index.layout.css +1 -1
- package/src/assets/styles/v2/css/index.layout.css.map +1 -1
- package/src/assets/styles/v2/scss/AttachmentList/AttachmentList-layout.scss +18 -13
- package/src/assets/styles/v2/scss/MessageList/MessageList-layout.scss +1 -4
- package/src/assets/styles/v2/scss/MessageList/VirtualizedMessageList-layout.scss +21 -0
- package/src/assets/styles/v2/scss/MessageList/VirtualizedMessageList-theme.scss +9 -0
- package/src/assets/styles/v2/scss/Notification/NotificationList-theme.scss +2 -2
- package/src/assets/styles/v2/scss/_utils.scss +8 -0
- package/src/assets/version.ts +1 -1
package/esm2015/lib/types.js
CHANGED
|
@@ -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ufTtcblxuZXhwb3J0IHR5cGUgVGhyZWFkSGVhZGVyQ29udGV4dCA9IHtcbiAgcGFyZW50TWVzc2FnZTogU3RyZWFtTWVzc2FnZSB8IHVuZGVmaW5lZDtcbiAgY2xvc2VUaHJlYWRIYW5kbGVyOiBGdW5jdGlvbjtcbn07XG5cbmV4cG9ydCB0eXBlIE1lc3NhZ2VSZWFjdGlvblR5cGUgPVxuICB8ICdhbmdyeSdcbiAgfCAnaGFoYSdcbiAgfCAnbGlrZSdcbiAgfCAnbG92ZSdcbiAgfCAnc2FkJ1xuICB8ICd3b3cnO1xuXG5leHBvcnQgdHlwZSBBdHRhY2htZW50Q29uZmlncmF0aW9uID0ge1xuICB1cmw6IHN0cmluZztcbiAgaGVpZ2h0OiBzdHJpbmc7XG4gIHdpZHRoOiBzdHJpbmc7XG59O1xuXG5leHBvcnQgdHlwZSBJbWFnZUF0dGFjaG1lbnRDb25maWd1cmF0aW9uID0gQXR0YWNobWVudENvbmZpZ3JhdGlvbiAmIHtcbiAgb3JpZ2luYWxIZWlnaHQ6IG51bWJlcjtcbiAgb3JpZ2luYWxXaWR0aDogbnVtYmVyO1xufTtcblxuZXhwb3J0IHR5cGUgVmlkZW9BdHRhY2htZW50Q29uZmlndXJhdGlvbiA9IEltYWdlQXR0YWNobWVudENvbmZpZ3VyYXRpb24gJiB7XG4gIHRodW1iVXJsPzogc3RyaW5nO1xufTtcbiJdfQ==
|
|
@@ -3,7 +3,7 @@ import * as i0 from '@angular/core';
|
|
|
3
3
|
import { Injectable, Component, Input, EventEmitter, Output, ViewChild, InjectionToken, Directive, HostBinding, Inject, NgModule } from '@angular/core';
|
|
4
4
|
import { BehaviorSubject, ReplaySubject, combineLatest, Subject, timer, of } from 'rxjs';
|
|
5
5
|
import { StreamChat } from 'stream-chat';
|
|
6
|
-
import { map, shareReplay,
|
|
6
|
+
import { map, shareReplay, first, take, tap, catchError, startWith, distinctUntilChanged, filter, debounceTime } from 'rxjs/operators';
|
|
7
7
|
import { v4 } from 'uuid';
|
|
8
8
|
import * as i6 from '@ngx-translate/core';
|
|
9
9
|
import { TranslateModule } from '@ngx-translate/core';
|
|
@@ -19,7 +19,7 @@ import transliterate from '@stream-io/transliterate';
|
|
|
19
19
|
import * as i8 from 'angular-mentions';
|
|
20
20
|
import { MentionModule } from 'angular-mentions';
|
|
21
21
|
|
|
22
|
-
const version = '4.
|
|
22
|
+
const version = '4.7.0';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](../components/NotificationListComponent.mdx) component displays the currently active notifications.
|
|
@@ -360,11 +360,6 @@ class ChannelService {
|
|
|
360
360
|
}), shareReplay());
|
|
361
361
|
this.messageToQuote$ = this.messageToQuoteSubject.asObservable();
|
|
362
362
|
this.jumpToMessage$ = this.jumpToMessageSubject.asObservable();
|
|
363
|
-
this.chatClientService.connectionState$
|
|
364
|
-
.pipe(filter((s) => s === 'online'))
|
|
365
|
-
.subscribe(() => {
|
|
366
|
-
void this.setAsActiveParentMessage(undefined);
|
|
367
|
-
});
|
|
368
363
|
this.usersTypingInChannel$ =
|
|
369
364
|
this.usersTypingInChannelSubject.asObservable();
|
|
370
365
|
this.usersTypingInThread$ = this.usersTypingInThreadSubject.asObservable();
|
|
@@ -870,9 +865,13 @@ class ChannelService {
|
|
|
870
865
|
return;
|
|
871
866
|
}
|
|
872
867
|
this.isStateRecoveryInProgress = true;
|
|
873
|
-
this.reset();
|
|
874
868
|
try {
|
|
875
|
-
|
|
869
|
+
if (this.options) {
|
|
870
|
+
this.options.offset = 0;
|
|
871
|
+
}
|
|
872
|
+
yield this.queryChannels(false, true);
|
|
873
|
+
// Thread messages are not refetched so active thread gets deselected to avoid displaying stale messages
|
|
874
|
+
void this.setAsActiveParentMessage(undefined);
|
|
876
875
|
this.isStateRecoveryInProgress = false;
|
|
877
876
|
}
|
|
878
877
|
catch (_a) {
|
|
@@ -1096,18 +1095,25 @@ class ChannelService {
|
|
|
1096
1095
|
this.activeChannelSubscriptions.forEach((s) => s.unsubscribe());
|
|
1097
1096
|
this.activeChannelSubscriptions = [];
|
|
1098
1097
|
}
|
|
1099
|
-
queryChannels(shouldSetActiveChannel) {
|
|
1098
|
+
queryChannels(shouldSetActiveChannel, recoverState = false) {
|
|
1100
1099
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1101
1100
|
try {
|
|
1102
|
-
const channels = yield this.chatClientService.chatClient.queryChannels(this.filters, this.sort, this.options);
|
|
1101
|
+
const channels = yield this.chatClientService.chatClient.queryChannels(this.filters, this.sort || {}, this.options);
|
|
1103
1102
|
channels.forEach((c) => this.watchForChannelEvents(c));
|
|
1104
|
-
const prevChannels =
|
|
1103
|
+
const prevChannels = recoverState
|
|
1104
|
+
? []
|
|
1105
|
+
: this.channelsSubject.getValue() || [];
|
|
1105
1106
|
this.channelsSubject.next([...prevChannels, ...channels]);
|
|
1107
|
+
const currentActiveChannel = this.activeChannelSubject.getValue();
|
|
1106
1108
|
if (channels.length > 0 &&
|
|
1107
|
-
!
|
|
1109
|
+
!currentActiveChannel &&
|
|
1108
1110
|
shouldSetActiveChannel) {
|
|
1109
1111
|
this.setAsActiveChannel(channels[0]);
|
|
1110
1112
|
}
|
|
1113
|
+
if (recoverState &&
|
|
1114
|
+
!channels.find((c) => c.cid === (currentActiveChannel === null || currentActiveChannel === void 0 ? void 0 : currentActiveChannel.cid))) {
|
|
1115
|
+
this.deselectActiveChannel();
|
|
1116
|
+
}
|
|
1111
1117
|
this.hasMoreChannelsSubject.next(channels.length >= this.options.limit);
|
|
1112
1118
|
return channels;
|
|
1113
1119
|
}
|
|
@@ -1716,8 +1722,14 @@ class AttachmentConfigurationService {
|
|
|
1716
1722
|
attachment.thumb_url ||
|
|
1717
1723
|
attachment.image_url ||
|
|
1718
1724
|
''));
|
|
1725
|
+
const originalHeight = Number(url.searchParams.get('oh')) > 1
|
|
1726
|
+
? Number(url.searchParams.get('oh'))
|
|
1727
|
+
: 1000000;
|
|
1728
|
+
const originalWidth = Number(url.searchParams.get('ow')) > 1
|
|
1729
|
+
? Number(url.searchParams.get('ow'))
|
|
1730
|
+
: 1000000;
|
|
1719
1731
|
const displayWarning = location === 'gallery' || location === 'single';
|
|
1720
|
-
const
|
|
1732
|
+
const sizeRestriction = this.getSizingRestrictions(url, element, displayWarning);
|
|
1721
1733
|
if (sizeRestriction) {
|
|
1722
1734
|
// Apply 2x for retina displays
|
|
1723
1735
|
sizeRestriction.height *= 2;
|
|
@@ -1727,7 +1739,9 @@ class AttachmentConfigurationService {
|
|
|
1727
1739
|
return {
|
|
1728
1740
|
url: url.href,
|
|
1729
1741
|
width: '',
|
|
1730
|
-
height,
|
|
1742
|
+
height: '',
|
|
1743
|
+
originalHeight,
|
|
1744
|
+
originalWidth,
|
|
1731
1745
|
};
|
|
1732
1746
|
}
|
|
1733
1747
|
/**
|
|
@@ -1739,29 +1753,35 @@ class AttachmentConfigurationService {
|
|
|
1739
1753
|
if (this.customVideoAttachmentConfigurationHandler) {
|
|
1740
1754
|
return this.customVideoAttachmentConfigurationHandler(attachment, element);
|
|
1741
1755
|
}
|
|
1742
|
-
let attachmentHeight = ``;
|
|
1743
1756
|
let thumbUrl = undefined;
|
|
1757
|
+
let originalHeight = 1000000;
|
|
1758
|
+
let originalWidth = 1000000;
|
|
1744
1759
|
if (attachment.thumb_url && this.shouldGenerateVideoThumbnail) {
|
|
1745
1760
|
const url = new URL(attachment.thumb_url);
|
|
1761
|
+
originalHeight =
|
|
1762
|
+
Number(url.searchParams.get('oh')) > 1
|
|
1763
|
+
? Number(url.searchParams.get('oh'))
|
|
1764
|
+
: originalHeight;
|
|
1765
|
+
originalWidth =
|
|
1766
|
+
Number(url.searchParams.get('ow')) > 1
|
|
1767
|
+
? Number(url.searchParams.get('ow'))
|
|
1768
|
+
: originalWidth;
|
|
1746
1769
|
const displayWarning = true;
|
|
1747
|
-
const
|
|
1770
|
+
const sizeRestriction = this.getSizingRestrictions(url, element, displayWarning);
|
|
1748
1771
|
if (sizeRestriction) {
|
|
1749
1772
|
sizeRestriction.height *= 2;
|
|
1750
1773
|
sizeRestriction.width *= 2;
|
|
1751
1774
|
this.addResizingParamsToUrl(sizeRestriction, url);
|
|
1752
1775
|
}
|
|
1753
1776
|
thumbUrl = url.href;
|
|
1754
|
-
attachmentHeight = height;
|
|
1755
|
-
}
|
|
1756
|
-
else {
|
|
1757
|
-
const cssSizeRestriction = this.getCSSSizeRestriction(element);
|
|
1758
|
-
attachmentHeight = `${cssSizeRestriction.maxHeight || cssSizeRestriction.height || ''}px`;
|
|
1759
1777
|
}
|
|
1760
1778
|
return {
|
|
1761
1779
|
url: attachment.asset_url || '',
|
|
1762
1780
|
width: '',
|
|
1763
|
-
height:
|
|
1781
|
+
height: '',
|
|
1764
1782
|
thumbUrl: thumbUrl,
|
|
1783
|
+
originalHeight,
|
|
1784
|
+
originalWidth,
|
|
1765
1785
|
};
|
|
1766
1786
|
}
|
|
1767
1787
|
/**
|
|
@@ -1804,20 +1824,9 @@ class AttachmentConfigurationService {
|
|
|
1804
1824
|
const originalWidth = Number(urlParams.get('ow')) || 1;
|
|
1805
1825
|
const cssSizeRestriction = this.getCSSSizeRestriction(htmlElement);
|
|
1806
1826
|
let sizeRestriction;
|
|
1807
|
-
let height = '';
|
|
1808
1827
|
if ((cssSizeRestriction.maxHeight || cssSizeRestriction.height) &&
|
|
1809
1828
|
cssSizeRestriction.maxWidth) {
|
|
1810
1829
|
sizeRestriction = this.getSizeRestrictions(originalHeight, originalWidth, (cssSizeRestriction.maxHeight || cssSizeRestriction.height), cssSizeRestriction.maxWidth);
|
|
1811
|
-
if (cssSizeRestriction.maxHeight) {
|
|
1812
|
-
const heightNum = originalHeight > 1 && originalWidth > 1
|
|
1813
|
-
? originalHeight <= cssSizeRestriction.maxHeight &&
|
|
1814
|
-
originalWidth <= cssSizeRestriction.maxWidth
|
|
1815
|
-
? originalHeight
|
|
1816
|
-
: Math.round(Math.min(cssSizeRestriction.maxHeight, (cssSizeRestriction.maxWidth / originalWidth) *
|
|
1817
|
-
originalHeight))
|
|
1818
|
-
: cssSizeRestriction.maxHeight;
|
|
1819
|
-
height = `${heightNum}px`;
|
|
1820
|
-
}
|
|
1821
1830
|
}
|
|
1822
1831
|
else {
|
|
1823
1832
|
sizeRestriction = undefined;
|
|
@@ -1825,7 +1834,7 @@ class AttachmentConfigurationService {
|
|
|
1825
1834
|
console.warn(`Invalid value set for height/max-height and/or max-width for HTML element, this can cause scrolling issues inside the message list, more info https://getstream.io/chat/docs/sdk/angular/components/AttachmentListComponent/#image-and-video-sizing`);
|
|
1826
1835
|
}
|
|
1827
1836
|
}
|
|
1828
|
-
return
|
|
1837
|
+
return sizeRestriction;
|
|
1829
1838
|
}
|
|
1830
1839
|
getSizeRestrictions(originalHeight, originalWidth, maxHeight, maxWidth) {
|
|
1831
1840
|
return {
|
|
@@ -2721,7 +2730,7 @@ class AttachmentListComponent {
|
|
|
2721
2730
|
}
|
|
2722
2731
|
}
|
|
2723
2732
|
AttachmentListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: AttachmentListComponent, deps: [{ token: CustomTemplatesService }, { token: ChannelService }, { token: AttachmentConfigurationService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2724
|
-
AttachmentListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: AttachmentListComponent, selector: "stream-attachment-list", inputs: { messageId: "messageId", parentMessageId: "parentMessageId", attachments: "attachments" }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"orderedAttachments.length > 0\" class=\"str-chat__attachment-list\">\n <ng-container\n *ngFor=\"let attachment of orderedAttachments; trackBy: trackByUrl\"\n >\n <div\n data-testclass=\"attachment-container\"\n class=\"str-chat__message-attachment str-chat__message-attachment--{{\n attachment.type\n }} str-chat__message-attachment-dynamic-size\"\n [class.str-chat__message-attachment--card]=\"isCard(attachment)\"\n [class.str-chat-angular__message-attachment-file-single]=\"\n isFile(attachment)\n \"\n [class.str-chat__message-attachment-with-actions]=\"\n attachment.actions && attachment.actions.length > 0\n \"\n [class.str-chat__message-attachment--svg-image]=\"isSvg(attachment)\"\n >\n <img\n #imgElement\n *ngIf=\"isImage(attachment)\"\n class=\"str-chat__message-attachment--img\"\n data-testclass=\"image\"\n [src]=\"\n getImageAttachmentConfiguration(attachment, 'single', imgElement).url\n \"\n [alt]=\"attachment?.fallback\"\n (click)=\"openImageModal([attachment])\"\n (keyup.enter)=\"openImageModal([attachment])\"\n [ngStyle]=\"{\n height: getImageAttachmentConfiguration(\n attachment,\n 'single',\n imgElement\n ).height,\n width: getImageAttachmentConfiguration(\n attachment,\n 'single',\n imgElement\n ).width\n }\"\n />\n <div\n class=\"str-chat__gallery\"\n data-testid=\"image-gallery\"\n *ngIf=\"isGallery(attachment)\"\n [class.str-chat__gallery--square]=\"(attachment?.images)!.length > 3\"\n [class.str-chat__gallery-two-rows]=\"(attachment?.images)!.length > 2\"\n >\n <ng-container\n *ngFor=\"\n let galleryImage of attachment.images;\n let index = index;\n let isLast = last;\n trackBy: trackByImageUrl\n \"\n >\n <button\n *ngIf=\"index < 3 || (index === 3 && isLast)\"\n class=\"str-chat__gallery-image\"\n data-testclass=\"gallery-image\"\n (click)=\"openImageModal(attachment.images!, index)\"\n (keyup.enter)=\"openImageModal(attachment.images!, index)\"\n [class.str-chat__message-attachment--svg-image]=\"\n isSvg(galleryImage)\n \"\n >\n <img\n #imgElement\n [src]=\"\n getImageAttachmentConfiguration(\n galleryImage,\n 'gallery',\n imgElement\n ).url\n \"\n [alt]=\"galleryImage.fallback\"\n [ngStyle]=\"{\n height: getImageAttachmentConfiguration(\n galleryImage,\n 'gallery',\n imgElement\n ).height,\n width: getImageAttachmentConfiguration(\n galleryImage,\n 'gallery',\n imgElement\n ).width\n }\"\n />\n </button>\n <button\n #element\n *ngIf=\"index === 3 && !isLast\"\n class=\"str-chat__gallery-placeholder\"\n data-testclass=\"gallery-image\"\n data-testid=\"more-image-button\"\n (click)=\"openImageModal(attachment.images!, index)\"\n (keyup.enter)=\"openImageModal(attachment.images!, index)\"\n [class.str-chat__message-attachment--svg-image]=\"\n isSvg(galleryImage)\n \"\n [ngStyle]=\"{\n 'background-image':\n 'url(' +\n getImageAttachmentConfiguration(\n galleryImage,\n 'gallery',\n element\n ).url +\n ')',\n height: getImageAttachmentConfiguration(\n galleryImage,\n 'gallery',\n element\n ).height,\n width: getImageAttachmentConfiguration(\n galleryImage,\n 'gallery',\n element\n ).width\n }\"\n >\n <p\n [innerHTML]=\"\n 'streamChat.{{ imageCount }} more'\n | translate: { imageCount: attachment!.images!.length - 4 }\n \"\n ></p>\n </button>\n </ng-container>\n </div>\n <div class=\"str-chat__player-wrapper\" *ngIf=\"isVideo(attachment)\">\n <video\n #videoElement\n class=\"str-chat__video-angular\"\n controls\n data-testclass=\"video-attachment\"\n [src]=\"getVideoAttachmentConfiguration(attachment, videoElement).url\"\n [ngStyle]=\"{\n height: getVideoAttachmentConfiguration(attachment, videoElement)\n .height,\n width: getVideoAttachmentConfiguration(attachment, videoElement)\n .width\n }\"\n [poster]=\"\n getVideoAttachmentConfiguration(attachment, videoElement).thumbUrl\n \"\n ></video>\n </div>\n <div\n *ngIf=\"isFile(attachment)\"\n class=\"\n str-chat__message-attachment-file--item\n str-chat-angular__message-attachment-file-single\n \"\n >\n <stream-icon-placeholder\n *ngIf=\"themeVersion === '1'\"\n icon=\"file\"\n [size]=\"30\"\n ></stream-icon-placeholder>\n <stream-icon-placeholder\n *ngIf=\"themeVersion === '2'\"\n icon=\"unspecified-filetype\"\n [size]=\"30\"\n ></stream-icon-placeholder>\n <div class=\"str-chat__message-attachment-file--item-text\">\n <div class=\"str-chat__message-attachment-file--item-first-row\">\n <div\n data-testclass=\"file-title\"\n class=\"str-chat__message-attachment-file--item-name\"\n >\n {{ attachment.title }}\n </div>\n <a\n class=\"str-chat__message-attachment-file--item-download\"\n data-testclass=\"file-link\"\n download\n href=\"{{ attachment.asset_url }}\"\n target=\"_blank\"\n >\n <stream-icon-placeholder\n class=\"str-chat__message-attachment-download-icon\"\n icon=\"download\"\n ></stream-icon-placeholder>\n </a>\n </div>\n <span\n class=\"str-chat__message-attachment-file--item-size\"\n data-testclass=\"size\"\n *ngIf=\"hasFileSize(attachment)\"\n >{{ getFileSize(attachment) }}</span\n >\n </div>\n </div>\n <div\n *ngIf=\"\n isCard(attachment) &&\n getCardAttachmentConfiguration(attachment) as attachmentConfiguration\n \"\n class=\"str-chat__message-attachment-card str-chat__message-attachment-card--{{\n attachment.type\n }}\"\n >\n <div\n *ngIf=\"attachmentConfiguration.url\"\n class=\"str-chat__message-attachment-card--header\"\n >\n <img\n data-testclass=\"card-img\"\n alt=\"{{ attachmentConfiguration.url }}\"\n src=\"{{ attachmentConfiguration.url }}\"\n [ngStyle]=\"{\n height: attachmentConfiguration.height,\n width: attachmentConfiguration.width\n }\"\n />\n </div>\n <div class=\"str-chat__message-attachment-card--content\">\n <div class=\"str-chat__message-attachment-card--flex\">\n <div\n *ngIf=\"attachment.title\"\n data-testclass=\"card-title\"\n class=\"str-chat__message-attachment-card--title\"\n >\n {{ attachment.title }}\n </div>\n <div\n *ngIf=\"attachment.text\"\n class=\"str-chat__message-attachment-card--text\"\n data-testclass=\"card-text\"\n >\n {{ attachment.text }}\n </div>\n <a\n class=\"str-chat__message-attachment-card--url\"\n *ngIf=\"attachment.title_link || attachment.og_scrape_url\"\n data-testclass=\"url-link\"\n noopener\n noreferrer\n href=\"{{ attachment.title_link || attachment.og_scrape_url }}\"\n target=\"_blank\"\n >\n {{ trimUrl(attachment.title_link || attachment.og_scrape_url) }}\n </a>\n </div>\n </div>\n </div>\n <div\n class=\"str-chat__message-attachment-actions\"\n *ngIf=\"attachment.actions && attachment.actions.length > 0\"\n >\n <div class=\"str-chat__message-attachment-actions-form\">\n <button\n *ngFor=\"\n let action of attachment.actions;\n trackBy: trackByActionValue\n \"\n class=\"str-chat__message-attachment-actions-button str-chat__message-attachment-actions-button--{{\n action.style\n }}\"\n data-testclass=\"attachment-action\"\n (click)=\"sendAction(action)\"\n (keyup.enter)=\"sendAction(action)\"\n >\n {{ action.text }}\n </button>\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"imagesToView && imagesToView.length > 0\">\n <ng-container\n *ngTemplateOutlet=\"\n (customTemplatesService.modalTemplate$ | async) || defaultModal;\n context: getModalContext()\n \"\n ></ng-container>\n </ng-container>\n</div>\n\n<ng-template\n #defaultModal\n let-isOpen=\"isOpen\"\n let-isOpenChangeHandler=\"isOpenChangeHandler\"\n let-content=\"content\"\n>\n <stream-modal\n class=\"stream-chat-angular__image-modal-host\"\n [isOpen]=\"isOpen\"\n (isOpenChange)=\"isOpenChangeHandler($event)\"\n [content]=\"content\"\n >\n </stream-modal>\n</ng-template>\n\n<ng-template #modalContent>\n <div class=\"stream-chat-angular__image-modal str-chat__image-carousel\">\n <button\n class=\"\n stream-chat-angular__image-modal-stepper\n str-chat__image-carousel-stepper\n \"\n [ngStyle]=\"{\n visibility: isImageModalPrevButtonVisible ? 'visible' : 'hidden'\n }\"\n data-testid=\"image-modal-prev\"\n type=\"button\"\n (click)=\"stepImages(-1)\"\n (keyup.enter)=\"stepImages(-1)\"\n >\n <stream-icon-placeholder icon=\"arrow-left\"></stream-icon-placeholder>\n </button>\n <img\n #imgElement\n class=\"\n stream-chat-angular__image-modal-image\n str-chat__image-carousel-image\n \"\n data-testid=\"modal-image\"\n [src]=\"\n getCarouselImageAttachmentConfiguration(\n imagesToView[imagesToViewCurrentIndex],\n imgElement\n ).url\n \"\n [alt]=\"imagesToView[imagesToViewCurrentIndex].fallback\"\n [ngStyle]=\"{\n width: getCarouselImageAttachmentConfiguration(\n imagesToView[imagesToViewCurrentIndex],\n imgElement\n ).width,\n height: getCarouselImageAttachmentConfiguration(\n imagesToView[imagesToViewCurrentIndex],\n imgElement\n ).height\n }\"\n />\n <button\n class=\"\n stream-chat-angular__image-modal-stepper\n str-chat__image-carousel-stepper\n \"\n type=\"button\"\n [ngStyle]=\"{\n visibility: isImageModalNextButtonVisible ? 'visible' : 'hidden'\n }\"\n data-testid=\"image-modal-next\"\n (click)=\"stepImages(1)\"\n (keyup.enter)=\"stepImages(1)\"\n >\n <stream-icon-placeholder icon=\"arrow-right\"></stream-icon-placeholder>\n </button>\n </div>\n</ng-template>\n", components: [{ type: IconPlaceholderComponent, selector: "stream-icon-placeholder", inputs: ["icon", "size"] }, { type: ModalComponent, selector: "stream-modal", inputs: ["isOpen", "content"], outputs: ["isOpenChange"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "translate": i6.TranslatePipe, "async": i4.AsyncPipe } });
|
|
2733
|
+
AttachmentListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: AttachmentListComponent, selector: "stream-attachment-list", inputs: { messageId: "messageId", parentMessageId: "parentMessageId", attachments: "attachments" }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"orderedAttachments.length > 0\" class=\"str-chat__attachment-list\">\n <ng-container\n *ngFor=\"let attachment of orderedAttachments; trackBy: trackByUrl\"\n >\n <div\n data-testclass=\"attachment-container\"\n class=\"str-chat__message-attachment str-chat__message-attachment--{{\n attachment.type\n }} str-chat__message-attachment-dynamic-size\"\n [class.str-chat__message-attachment--card]=\"isCard(attachment)\"\n [class.str-chat-angular__message-attachment-file-single]=\"\n isFile(attachment)\n \"\n [class.str-chat__message-attachment-with-actions]=\"\n attachment.actions && attachment.actions.length > 0\n \"\n [class.str-chat__message-attachment--svg-image]=\"isSvg(attachment)\"\n >\n <img\n #imgElement\n *ngIf=\"isImage(attachment)\"\n class=\"str-chat__message-attachment--img\"\n data-testclass=\"image\"\n [src]=\"\n getImageAttachmentConfiguration(attachment, 'single', imgElement).url\n \"\n [alt]=\"attachment?.fallback\"\n (click)=\"openImageModal([attachment])\"\n (keyup.enter)=\"openImageModal([attachment])\"\n [style.--original-height]=\"\n getImageAttachmentConfiguration(attachment, 'single', imgElement)\n .originalHeight\n \"\n [style.--original-width]=\"\n getImageAttachmentConfiguration(attachment, 'single', imgElement)\n .originalWidth\n \"\n [ngStyle]=\"{\n height: getImageAttachmentConfiguration(\n attachment,\n 'single',\n imgElement\n ).height,\n width: getImageAttachmentConfiguration(\n attachment,\n 'single',\n imgElement\n ).width\n }\"\n />\n <div\n class=\"str-chat__gallery\"\n data-testid=\"image-gallery\"\n *ngIf=\"isGallery(attachment)\"\n [class.str-chat__gallery--square]=\"(attachment?.images)!.length > 3\"\n [class.str-chat__gallery-two-rows]=\"(attachment?.images)!.length > 2\"\n >\n <ng-container\n *ngFor=\"\n let galleryImage of attachment.images;\n let index = index;\n let isLast = last;\n trackBy: trackByImageUrl\n \"\n >\n <button\n *ngIf=\"index < 3 || (index === 3 && isLast)\"\n class=\"str-chat__gallery-image\"\n data-testclass=\"gallery-image\"\n (click)=\"openImageModal(attachment.images!, index)\"\n (keyup.enter)=\"openImageModal(attachment.images!, index)\"\n [class.str-chat__message-attachment--svg-image]=\"\n isSvg(galleryImage)\n \"\n >\n <img\n #imgElement\n [src]=\"\n getImageAttachmentConfiguration(\n galleryImage,\n 'gallery',\n imgElement\n ).url\n \"\n [alt]=\"galleryImage.fallback\"\n [style.--original-height]=\"\n getImageAttachmentConfiguration(\n galleryImage,\n 'gallery',\n imgElement\n ).originalHeight\n \"\n [style.--original-width]=\"\n getImageAttachmentConfiguration(\n galleryImage,\n 'gallery',\n imgElement\n ).originalWidth\n \"\n [ngStyle]=\"{\n height: getImageAttachmentConfiguration(\n galleryImage,\n 'gallery',\n imgElement\n ).height,\n width: getImageAttachmentConfiguration(\n galleryImage,\n 'gallery',\n imgElement\n ).width\n }\"\n />\n </button>\n <button\n #element\n *ngIf=\"index === 3 && !isLast\"\n class=\"str-chat__gallery-placeholder\"\n data-testclass=\"gallery-image\"\n data-testid=\"more-image-button\"\n (click)=\"openImageModal(attachment.images!, index)\"\n (keyup.enter)=\"openImageModal(attachment.images!, index)\"\n [class.str-chat__message-attachment--svg-image]=\"\n isSvg(galleryImage)\n \"\n [style.--original-height]=\"\n getImageAttachmentConfiguration(galleryImage, 'gallery', element)\n .originalHeight\n \"\n [style.--original-width]=\"\n getImageAttachmentConfiguration(galleryImage, 'gallery', element)\n .originalWidth\n \"\n [ngStyle]=\"{\n 'background-image':\n 'url(' +\n getImageAttachmentConfiguration(\n galleryImage,\n 'gallery',\n element\n ).url +\n ')',\n height: getImageAttachmentConfiguration(\n galleryImage,\n 'gallery',\n element\n ).height,\n width: getImageAttachmentConfiguration(\n galleryImage,\n 'gallery',\n element\n ).width\n }\"\n >\n <p\n [innerHTML]=\"\n 'streamChat.{{ imageCount }} more'\n | translate: { imageCount: attachment!.images!.length - 4 }\n \"\n ></p>\n </button>\n </ng-container>\n </div>\n <div\n class=\"str-chat__player-wrapper\"\n *ngIf=\"isVideo(attachment)\"\n data-testclass=\"video-attachment-parent\"\n [style.--original-height]=\"\n getVideoAttachmentConfiguration(attachment, videoElement)\n .originalHeight\n \"\n [style.--original-width]=\"\n getVideoAttachmentConfiguration(attachment, videoElement)\n .originalWidth\n \"\n [ngStyle]=\"{\n height: getVideoAttachmentConfiguration(attachment, videoElement)\n .height,\n width: getVideoAttachmentConfiguration(attachment, videoElement).width\n }\"\n >\n <video\n #videoElement\n class=\"str-chat__video-angular\"\n controls\n data-testclass=\"video-attachment\"\n [src]=\"getVideoAttachmentConfiguration(attachment, videoElement).url\"\n [poster]=\"\n getVideoAttachmentConfiguration(attachment, videoElement).thumbUrl\n \"\n ></video>\n </div>\n <div\n *ngIf=\"isFile(attachment)\"\n class=\"\n str-chat__message-attachment-file--item\n str-chat-angular__message-attachment-file-single\n \"\n >\n <stream-icon-placeholder\n *ngIf=\"themeVersion === '1'\"\n icon=\"file\"\n [size]=\"30\"\n ></stream-icon-placeholder>\n <stream-icon-placeholder\n *ngIf=\"themeVersion === '2'\"\n icon=\"unspecified-filetype\"\n [size]=\"30\"\n ></stream-icon-placeholder>\n <div class=\"str-chat__message-attachment-file--item-text\">\n <div class=\"str-chat__message-attachment-file--item-first-row\">\n <div\n data-testclass=\"file-title\"\n class=\"str-chat__message-attachment-file--item-name\"\n >\n {{ attachment.title }}\n </div>\n <a\n class=\"str-chat__message-attachment-file--item-download\"\n data-testclass=\"file-link\"\n download\n href=\"{{ attachment.asset_url }}\"\n target=\"_blank\"\n >\n <stream-icon-placeholder\n class=\"str-chat__message-attachment-download-icon\"\n icon=\"download\"\n ></stream-icon-placeholder>\n </a>\n </div>\n <span\n class=\"str-chat__message-attachment-file--item-size\"\n data-testclass=\"size\"\n *ngIf=\"hasFileSize(attachment)\"\n >{{ getFileSize(attachment) }}</span\n >\n </div>\n </div>\n <div\n *ngIf=\"\n isCard(attachment) &&\n getCardAttachmentConfiguration(attachment) as attachmentConfiguration\n \"\n class=\"str-chat__message-attachment-card str-chat__message-attachment-card--{{\n attachment.type\n }}\"\n >\n <div\n *ngIf=\"attachmentConfiguration.url\"\n class=\"str-chat__message-attachment-card--header\"\n >\n <img\n data-testclass=\"card-img\"\n alt=\"{{ attachmentConfiguration.url }}\"\n src=\"{{ attachmentConfiguration.url }}\"\n [ngStyle]=\"{\n height: attachmentConfiguration.height,\n width: attachmentConfiguration.width\n }\"\n />\n </div>\n <div class=\"str-chat__message-attachment-card--content\">\n <div class=\"str-chat__message-attachment-card--flex\">\n <div\n *ngIf=\"attachment.title\"\n data-testclass=\"card-title\"\n class=\"str-chat__message-attachment-card--title\"\n >\n {{ attachment.title }}\n </div>\n <div\n *ngIf=\"attachment.text\"\n class=\"str-chat__message-attachment-card--text\"\n data-testclass=\"card-text\"\n >\n {{ attachment.text }}\n </div>\n <a\n class=\"str-chat__message-attachment-card--url\"\n *ngIf=\"attachment.title_link || attachment.og_scrape_url\"\n data-testclass=\"url-link\"\n noopener\n noreferrer\n href=\"{{ attachment.title_link || attachment.og_scrape_url }}\"\n target=\"_blank\"\n >\n {{ trimUrl(attachment.title_link || attachment.og_scrape_url) }}\n </a>\n </div>\n </div>\n </div>\n <div\n class=\"str-chat__message-attachment-actions\"\n *ngIf=\"attachment.actions && attachment.actions.length > 0\"\n >\n <div class=\"str-chat__message-attachment-actions-form\">\n <button\n *ngFor=\"\n let action of attachment.actions;\n trackBy: trackByActionValue\n \"\n class=\"str-chat__message-attachment-actions-button str-chat__message-attachment-actions-button--{{\n action.style\n }}\"\n data-testclass=\"attachment-action\"\n (click)=\"sendAction(action)\"\n (keyup.enter)=\"sendAction(action)\"\n >\n {{ action.text }}\n </button>\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"imagesToView && imagesToView.length > 0\">\n <ng-container\n *ngTemplateOutlet=\"\n (customTemplatesService.modalTemplate$ | async) || defaultModal;\n context: getModalContext()\n \"\n ></ng-container>\n </ng-container>\n</div>\n\n<ng-template\n #defaultModal\n let-isOpen=\"isOpen\"\n let-isOpenChangeHandler=\"isOpenChangeHandler\"\n let-content=\"content\"\n>\n <stream-modal\n class=\"stream-chat-angular__image-modal-host\"\n [isOpen]=\"isOpen\"\n (isOpenChange)=\"isOpenChangeHandler($event)\"\n [content]=\"content\"\n >\n </stream-modal>\n</ng-template>\n\n<ng-template #modalContent>\n <div class=\"stream-chat-angular__image-modal str-chat__image-carousel\">\n <button\n class=\"\n stream-chat-angular__image-modal-stepper\n str-chat__image-carousel-stepper\n \"\n [ngStyle]=\"{\n visibility: isImageModalPrevButtonVisible ? 'visible' : 'hidden'\n }\"\n data-testid=\"image-modal-prev\"\n type=\"button\"\n (click)=\"stepImages(-1)\"\n (keyup.enter)=\"stepImages(-1)\"\n >\n <stream-icon-placeholder icon=\"arrow-left\"></stream-icon-placeholder>\n </button>\n <img\n #imgElement\n class=\"\n stream-chat-angular__image-modal-image\n str-chat__image-carousel-image\n \"\n data-testid=\"modal-image\"\n [src]=\"\n getCarouselImageAttachmentConfiguration(\n imagesToView[imagesToViewCurrentIndex],\n imgElement\n ).url\n \"\n [style.--original-height]=\"\n getCarouselImageAttachmentConfiguration(\n imagesToView[imagesToViewCurrentIndex],\n imgElement\n ).originalHeight\n \"\n [style.--original-width]=\"\n getCarouselImageAttachmentConfiguration(\n imagesToView[imagesToViewCurrentIndex],\n imgElement\n ).originalWidth\n \"\n [alt]=\"imagesToView[imagesToViewCurrentIndex].fallback\"\n [ngStyle]=\"{\n width: getCarouselImageAttachmentConfiguration(\n imagesToView[imagesToViewCurrentIndex],\n imgElement\n ).width,\n height: getCarouselImageAttachmentConfiguration(\n imagesToView[imagesToViewCurrentIndex],\n imgElement\n ).height\n }\"\n />\n <button\n class=\"\n stream-chat-angular__image-modal-stepper\n str-chat__image-carousel-stepper\n \"\n type=\"button\"\n [ngStyle]=\"{\n visibility: isImageModalNextButtonVisible ? 'visible' : 'hidden'\n }\"\n data-testid=\"image-modal-next\"\n (click)=\"stepImages(1)\"\n (keyup.enter)=\"stepImages(1)\"\n >\n <stream-icon-placeholder icon=\"arrow-right\"></stream-icon-placeholder>\n </button>\n </div>\n</ng-template>\n", components: [{ type: IconPlaceholderComponent, selector: "stream-icon-placeholder", inputs: ["icon", "size"] }, { type: ModalComponent, selector: "stream-modal", inputs: ["isOpen", "content"], outputs: ["isOpenChange"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "translate": i6.TranslatePipe, "async": i4.AsyncPipe } });
|
|
2725
2734
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0, type: AttachmentListComponent, decorators: [{
|
|
2726
2735
|
type: Component,
|
|
2727
2736
|
args: [{
|