stream-chat-angular 5.12.0 → 5.12.2
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/esm2020/assets/version.mjs +2 -2
- package/esm2020/lib/message/message.component.mjs +5 -2
- package/esm2020/lib/message-text/message-text.component.mjs +8 -2
- package/fesm2015/stream-chat-angular.mjs +13 -5
- package/fesm2015/stream-chat-angular.mjs.map +1 -1
- package/fesm2020/stream-chat-angular.mjs +13 -5
- package/fesm2020/stream-chat-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/src/assets/version.ts +1 -1
|
@@ -20,7 +20,7 @@ import transliterate from '@stream-io/transliterate';
|
|
|
20
20
|
import * as i8$1 from 'angular-mentions';
|
|
21
21
|
import { MentionModule } from 'angular-mentions';
|
|
22
22
|
|
|
23
|
-
const version = '5.12.
|
|
23
|
+
const version = '5.12.2';
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* 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.
|
|
@@ -4450,6 +4450,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
4450
4450
|
args: [{ selector: 'stream-channel-list', template: "<div\n #container\n data-testid=\"channel-list-container\"\n class=\"str-chat str-chat-angular__channel-list str-chat__channel-list str-chat-channel-list messaging str-chat__theme-{{\n theme$ | async\n }}\"\n>\n <div\n *ngIf=\"\n (isError$ | async) === false && (isInitializing$ | async) === false;\n else statusIndicator\n \"\n class=\"str-chat__channel-list-messenger\"\n >\n <div class=\"str-chat__channel-list-messenger__main\">\n <ng-content select=\"[channel-list-top]\"></ng-content>\n <div\n *ngIf=\"!(channels$ | async)?.length\"\n class=\"str-chat__channel-list-empty\"\n >\n <stream-icon icon=\"chat-bubble\"></stream-icon>\n <p data-testid=\"empty-channel-list-indicator\">\n {{ \"streamChat.You have no channels currently\" | translate }}\n </p>\n </div>\n <p\n *ngIf=\"!(channels$ | async)?.length\"\n class=\"str-chat__channel-list-empty-v1\"\n data-testid=\"empty-channel-list-indicator\"\n >\n {{ \"streamChat.You have no channels currently\" | translate }}\n </p>\n <stream-paginated-list\n [items]=\"(channels$ | async) ?? []\"\n [hasMore]=\"(hasMoreChannels$ | async) ?? false\"\n [isLoading]=\"isLoadingMoreChannels\"\n (loadMore)=\"loadMoreChannels()\"\n [trackBy]=\"trackByChannelId\"\n >\n <ng-template let-channel=\"item\">\n <ng-template #defaultTemplate let-channelInput=\"channel\">\n <stream-channel-preview\n data-testclass=\"channel-preview\"\n [channel]=\"channelInput\"\n ></stream-channel-preview>\n </ng-template>\n <div>\n <ng-container\n *ngTemplateOutlet=\"\n customChannelPreviewTemplate || defaultTemplate;\n context: { channel: channel }\n \"\n ></ng-container>\n </div>\n </ng-template>\n </stream-paginated-list>\n <ng-content select=\"[channel-list-bottom]\"></ng-content>\n </div>\n </div>\n</div>\n\n<ng-template #statusIndicator>\n <ng-container *ngIf=\"isError$ | async\">\n <ng-container *ngTemplateOutlet=\"chatDown\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"isInitializing$ | async\">\n <ng-container *ngTemplateOutlet=\"loadingChannels\"></ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #chatDown>\n <div data-testid=\"chatdown-container\" class=\"str-chat__down\">\n <ng-container *ngTemplateOutlet=\"loadingChannels\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #loadingChannels>\n <div\n data-testid=\"loading-indicator-full-size\"\n class=\"str-chat__loading-channels\"\n >\n <ng-container *ngTemplateOutlet=\"loadingChannel\"></ng-container>\n <ng-container *ngTemplateOutlet=\"loadingChannel\"></ng-container>\n <ng-container *ngTemplateOutlet=\"loadingChannel\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #loadingChannel>\n <div\n class=\"str-chat__loading-channels-item str-chat__channel-preview-loading\"\n >\n <div class=\"str-chat__loading-channels-avatar\"></div>\n <div\n class=\"str-chat__loading-channels-meta str-chat__channel-preview-end-loading\"\n >\n <div class=\"str-chat__loading-channels-username\"></div>\n <div class=\"str-chat__loading-channels-status\"></div>\n </div>\n </div>\n</ng-template>\n" }]
|
|
4451
4451
|
}], ctorParameters: function () { return [{ type: ChannelService }, { type: CustomTemplatesService }, { type: ThemeService }]; } });
|
|
4452
4452
|
|
|
4453
|
+
const isSafari = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
4454
|
+
|
|
4453
4455
|
const formatDuration = (durationInSeconds) => {
|
|
4454
4456
|
if (durationInSeconds === undefined || durationInSeconds <= 0)
|
|
4455
4457
|
return '00:00';
|
|
@@ -5160,9 +5162,15 @@ class MessageTextComponent {
|
|
|
5160
5162
|
*/
|
|
5161
5163
|
this.shouldTranslate = false;
|
|
5162
5164
|
this.messageTextParts = [];
|
|
5163
|
-
this.urlRegexp = /(?:(?:https?|ftp|file):\/\/|www\.|ftp\.|(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,})(?![^\s]*@[^\s]*)(?:[^\s()<>]+|\([\w\d]+\))*(?<!@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})/gim;
|
|
5164
5165
|
this.emojiRegexp = new RegExp(emojiRegex(), 'g');
|
|
5165
5166
|
this.displayAs = this.messageService.displayAs;
|
|
5167
|
+
try {
|
|
5168
|
+
this.urlRegexp = new RegExp('(?:(?:https?|ftp|file):\\/\\/|www\\.|ftp\\.|(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,})(?![^\\s]*@[^\\s]*)(?:[^\\s()<>]+|\\([\\w\\d]+\\))*(?<!@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,})', 'gim');
|
|
5169
|
+
}
|
|
5170
|
+
catch {
|
|
5171
|
+
this.urlRegexp =
|
|
5172
|
+
/(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#/%=~_|$?!:,.]*\)|[A-Z0-9+&@#/%=~_|$])/gim;
|
|
5173
|
+
}
|
|
5166
5174
|
}
|
|
5167
5175
|
ngOnChanges(changes) {
|
|
5168
5176
|
if (changes.message || changes.shouldTranslate) {
|
|
@@ -5321,7 +5329,9 @@ class MessageComponent {
|
|
|
5321
5329
|
};
|
|
5322
5330
|
this.areMessageOptionsOpen = false;
|
|
5323
5331
|
this.canDisplayReadStatus = false;
|
|
5324
|
-
this.hasTouchSupport =
|
|
5332
|
+
this.hasTouchSupport = isSafari()
|
|
5333
|
+
? 'ontouchstart' in window || navigator.maxTouchPoints > 0
|
|
5334
|
+
: window.matchMedia('(any-hover: none)').matches;
|
|
5325
5335
|
this.subscriptions = [];
|
|
5326
5336
|
this.isViewInited = false;
|
|
5327
5337
|
this.shouldPreventMessageMenuClose = false;
|
|
@@ -5907,8 +5917,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
5907
5917
|
}]
|
|
5908
5918
|
}], ctorParameters: function () { return []; } });
|
|
5909
5919
|
|
|
5910
|
-
const isSafari = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
5911
|
-
|
|
5912
5920
|
var MediaRecordingState;
|
|
5913
5921
|
(function (MediaRecordingState) {
|
|
5914
5922
|
MediaRecordingState["PAUSED"] = "paused";
|