stream-chat-angular 2.5.1 → 2.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/README.md +2 -2
- package/assets/i18n/en.d.ts +1 -0
- package/assets/version.d.ts +1 -1
- package/bundles/stream-chat-angular.umd.js +323 -207
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/i18n/en.js +2 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/attachment.service.js +3 -3
- package/esm2015/lib/channel-preview/channel-preview.component.js +22 -17
- package/esm2015/lib/channel.service.js +93 -87
- package/esm2015/lib/chat-client.service.js +35 -35
- package/esm2015/lib/is-image-file.js +5 -0
- package/esm2015/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.js +18 -11
- package/esm2015/lib/message-input/message-input-config.service.js +1 -1
- package/esm2015/lib/message-input/message-input.component.js +67 -10
- package/esm2015/lib/notification-list/notification-list.component.js +2 -2
- package/esm2015/lib/notification.service.js +7 -7
- package/esm2015/public-api.js +2 -1
- package/fesm2015/stream-chat-angular.js +251 -173
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/channel-preview/channel-preview.component.d.ts +3 -2
- package/lib/channel.service.d.ts +2 -3
- package/lib/chat-client.service.d.ts +9 -6
- package/lib/is-image-file.d.ts +1 -0
- package/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.d.ts +2 -2
- package/lib/message-input/message-input-config.service.d.ts +3 -0
- package/lib/message-input/message-input.component.d.ts +8 -1
- package/lib/notification.service.d.ts +3 -2
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/src/assets/i18n/en.ts +1 -0
- package/src/assets/version.ts +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('stream-chat'), require('rxjs/operators'), require('uuid'), require('@ngx-translate/core'), require('@angular/common'), require('dayjs'), require('dayjs/plugin/calendar'), require('pretty-bytes'), require('@stream-io/transliterate'), require('angular-mentions')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('stream-chat-angular', ['exports', '@angular/core', 'rxjs', 'stream-chat', 'rxjs/operators', 'uuid', '@ngx-translate/core', '@angular/common', 'dayjs', 'dayjs/plugin/calendar', 'pretty-bytes', '@stream-io/transliterate', 'angular-mentions'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['stream-chat-angular'] = {}, global.ng.core, global.rxjs, global.streamChat, global.rxjs.operators, global.uuid, global.
|
|
5
|
-
}(this, (function (exports, i0, rxjs, streamChat, operators, uuid,
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['stream-chat-angular'] = {}, global.ng.core, global.rxjs, global.streamChat, global.rxjs.operators, global.uuid, global.i10, global.ng.common, global.Dayjs, global.calendar, global.prettybytes, global.transliterate, global.i5));
|
|
5
|
+
}(this, (function (exports, i0, rxjs, streamChat, operators, uuid, i10, i3, Dayjs, calendar, prettybytes, transliterate, i5) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
30
|
-
var
|
|
30
|
+
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
31
31
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
32
32
|
var Dayjs__default = /*#__PURE__*/_interopDefaultLegacy(Dayjs);
|
|
33
33
|
var calendar__default = /*#__PURE__*/_interopDefaultLegacy(calendar);
|
|
@@ -353,33 +353,33 @@
|
|
|
353
353
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
-
var version = '2.
|
|
356
|
+
var version = '2.7.0';
|
|
357
357
|
|
|
358
358
|
var NotificationService = /** @class */ (function () {
|
|
359
359
|
function NotificationService() {
|
|
360
360
|
this.notificationsSubject = new rxjs.BehaviorSubject([]);
|
|
361
361
|
this.notifications$ = this.notificationsSubject.asObservable();
|
|
362
362
|
}
|
|
363
|
-
NotificationService.prototype.addTemporaryNotification = function (text, type, timeout) {
|
|
363
|
+
NotificationService.prototype.addTemporaryNotification = function (text, type, timeout, translateParams) {
|
|
364
364
|
var _this = this;
|
|
365
365
|
if (type === void 0) { type = 'error'; }
|
|
366
366
|
if (timeout === void 0) { timeout = 5000; }
|
|
367
|
-
this.addNotification(text, type);
|
|
367
|
+
this.addNotification(text, type, translateParams);
|
|
368
368
|
var id = setTimeout(function () { return _this.removeNotification(text); }, timeout);
|
|
369
369
|
return function () {
|
|
370
370
|
clearTimeout(id);
|
|
371
371
|
_this.removeNotification(text);
|
|
372
372
|
};
|
|
373
373
|
};
|
|
374
|
-
NotificationService.prototype.addPermanentNotification = function (text, type) {
|
|
374
|
+
NotificationService.prototype.addPermanentNotification = function (text, type, translateParams) {
|
|
375
375
|
var _this = this;
|
|
376
376
|
if (type === void 0) { type = 'error'; }
|
|
377
|
-
this.addNotification(text, type);
|
|
377
|
+
this.addNotification(text, type, translateParams);
|
|
378
378
|
return function () { return _this.removeNotification(text); };
|
|
379
379
|
};
|
|
380
|
-
NotificationService.prototype.addNotification = function (text, type) {
|
|
380
|
+
NotificationService.prototype.addNotification = function (text, type, translateParams) {
|
|
381
381
|
this.notificationsSubject.next(__spreadArray(__spreadArray([], __read(this.notificationsSubject.getValue())), [
|
|
382
|
-
{ text: text, type: type },
|
|
382
|
+
{ text: text, type: type, translateParams: translateParams },
|
|
383
383
|
]));
|
|
384
384
|
};
|
|
385
385
|
NotificationService.prototype.removeNotification = function (text) {
|
|
@@ -403,16 +403,17 @@
|
|
|
403
403
|
}], ctorParameters: function () { return []; } });
|
|
404
404
|
|
|
405
405
|
var ChatClientService = /** @class */ (function () {
|
|
406
|
-
function ChatClientService(ngZone,
|
|
406
|
+
function ChatClientService(ngZone, notificationService) {
|
|
407
407
|
this.ngZone = ngZone;
|
|
408
|
-
this.appRef = appRef;
|
|
409
408
|
this.notificationService = notificationService;
|
|
410
409
|
this.notificationSubject = new rxjs.ReplaySubject(1);
|
|
411
410
|
this.connectionStateSubject = new rxjs.ReplaySubject(1);
|
|
411
|
+
this.appSettingsSubject = new rxjs.BehaviorSubject(undefined);
|
|
412
412
|
this.notification$ = this.notificationSubject.asObservable();
|
|
413
413
|
this.connectionState$ = this.connectionStateSubject.asObservable();
|
|
414
|
+
this.appSettings$ = this.appSettingsSubject.asObservable();
|
|
414
415
|
}
|
|
415
|
-
ChatClientService.prototype.init = function (apiKey,
|
|
416
|
+
ChatClientService.prototype.init = function (apiKey, userOrId, userTokenOrProvider) {
|
|
416
417
|
return __awaiter(this, void 0, void 0, function () {
|
|
417
418
|
var removeNotification;
|
|
418
419
|
var _this = this;
|
|
@@ -421,57 +422,67 @@
|
|
|
421
422
|
case 0:
|
|
422
423
|
this.chatClient = streamChat.StreamChat.getInstance(apiKey);
|
|
423
424
|
return [4 /*yield*/, this.ngZone.runOutsideAngular(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
425
|
+
var user;
|
|
424
426
|
return __generator(this, function (_a) {
|
|
425
427
|
switch (_a.label) {
|
|
426
|
-
case 0:
|
|
428
|
+
case 0:
|
|
429
|
+
user = typeof userOrId === 'string' ? { id: userOrId } : userOrId;
|
|
430
|
+
return [4 /*yield*/, this.chatClient.connectUser(user, userTokenOrProvider)];
|
|
427
431
|
case 1:
|
|
428
432
|
_a.sent();
|
|
429
433
|
this.chatClient.setUserAgent("stream-chat-angular-" + version + "-" + this.chatClient.getUserAgent());
|
|
434
|
+
this.chatClient.getAppSettings;
|
|
430
435
|
return [2 /*return*/];
|
|
431
436
|
}
|
|
432
437
|
});
|
|
433
438
|
}); })];
|
|
434
439
|
case 1:
|
|
435
440
|
_a.sent();
|
|
436
|
-
this.
|
|
441
|
+
this.appSettingsSubject.next(undefined);
|
|
442
|
+
this.chatClient.on(function (e) {
|
|
437
443
|
_this.notificationSubject.next({
|
|
438
|
-
eventType:
|
|
444
|
+
eventType: e.type,
|
|
439
445
|
event: e,
|
|
440
446
|
});
|
|
441
|
-
_this.appRef.tick();
|
|
442
|
-
});
|
|
443
|
-
this.chatClient.on('notification.message_new', function (e) {
|
|
444
|
-
_this.notificationSubject.next({
|
|
445
|
-
eventType: 'notification.message_new',
|
|
446
|
-
event: e,
|
|
447
|
-
});
|
|
448
|
-
_this.appRef.tick();
|
|
449
|
-
});
|
|
450
|
-
this.chatClient.on('notification.removed_from_channel', function (e) {
|
|
451
|
-
_this.notificationSubject.next({
|
|
452
|
-
eventType: 'notification.removed_from_channel',
|
|
453
|
-
event: e,
|
|
454
|
-
});
|
|
455
|
-
_this.appRef.tick();
|
|
456
447
|
});
|
|
457
448
|
this.chatClient.on('connection.changed', function (e) {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
if (
|
|
461
|
-
removeNotification
|
|
449
|
+
_this.ngZone.run(function () {
|
|
450
|
+
var isOnline = e.online;
|
|
451
|
+
if (isOnline) {
|
|
452
|
+
if (removeNotification) {
|
|
453
|
+
removeNotification();
|
|
454
|
+
}
|
|
462
455
|
}
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
456
|
+
else {
|
|
457
|
+
removeNotification =
|
|
458
|
+
_this.notificationService.addPermanentNotification('streamChat.Connection failure, reconnecting now...');
|
|
459
|
+
}
|
|
460
|
+
_this.connectionStateSubject.next(isOnline ? 'online' : 'offline');
|
|
461
|
+
});
|
|
469
462
|
});
|
|
470
463
|
return [2 /*return*/];
|
|
471
464
|
}
|
|
472
465
|
});
|
|
473
466
|
});
|
|
474
467
|
};
|
|
468
|
+
ChatClientService.prototype.getAppSettings = function () {
|
|
469
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
470
|
+
var settings;
|
|
471
|
+
return __generator(this, function (_a) {
|
|
472
|
+
switch (_a.label) {
|
|
473
|
+
case 0:
|
|
474
|
+
if (this.appSettingsSubject.getValue()) {
|
|
475
|
+
return [2 /*return*/];
|
|
476
|
+
}
|
|
477
|
+
return [4 /*yield*/, this.chatClient.getAppSettings()];
|
|
478
|
+
case 1:
|
|
479
|
+
settings = _a.sent();
|
|
480
|
+
this.appSettingsSubject.next(settings.app || {});
|
|
481
|
+
return [2 /*return*/];
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
});
|
|
485
|
+
};
|
|
475
486
|
ChatClientService.prototype.flagMessage = function (messageId) {
|
|
476
487
|
return __awaiter(this, void 0, void 0, function () {
|
|
477
488
|
return __generator(this, function (_a) {
|
|
@@ -509,14 +520,14 @@
|
|
|
509
520
|
};
|
|
510
521
|
return ChatClientService;
|
|
511
522
|
}());
|
|
512
|
-
ChatClientService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChatClientService, deps: [{ token: i0__namespace.NgZone }, { token:
|
|
523
|
+
ChatClientService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChatClientService, deps: [{ token: i0__namespace.NgZone }, { token: NotificationService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
513
524
|
ChatClientService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChatClientService, providedIn: 'root' });
|
|
514
525
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChatClientService, decorators: [{
|
|
515
526
|
type: i0.Injectable,
|
|
516
527
|
args: [{
|
|
517
528
|
providedIn: 'root',
|
|
518
529
|
}]
|
|
519
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.NgZone }, { type:
|
|
530
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.NgZone }, { type: NotificationService }]; } });
|
|
520
531
|
|
|
521
532
|
var createMessagePreview = function (user, text, attachments, mentionedUsers) {
|
|
522
533
|
var clientSideId = user.id + "-" + uuid.v4();
|
|
@@ -549,10 +560,9 @@
|
|
|
549
560
|
};
|
|
550
561
|
|
|
551
562
|
var ChannelService = /** @class */ (function () {
|
|
552
|
-
function ChannelService(chatClientService,
|
|
563
|
+
function ChannelService(chatClientService, ngZone) {
|
|
553
564
|
var _this = this;
|
|
554
565
|
this.chatClientService = chatClientService;
|
|
555
|
-
this.appRef = appRef;
|
|
556
566
|
this.ngZone = ngZone;
|
|
557
567
|
this.channelsSubject = new rxjs.BehaviorSubject(undefined);
|
|
558
568
|
this.activeChannelSubject = new rxjs.BehaviorSubject(undefined);
|
|
@@ -819,10 +829,7 @@
|
|
|
819
829
|
return [2 /*return*/, []];
|
|
820
830
|
}
|
|
821
831
|
return [4 /*yield*/, activeChannel.queryMembers({
|
|
822
|
-
$
|
|
823
|
-
{ id: { $autocomplete: searchTerm } },
|
|
824
|
-
{ name: { $autocomplete: searchTerm } },
|
|
825
|
-
],
|
|
832
|
+
name: { $autocomplete: searchTerm },
|
|
826
833
|
id: { $ne: this.chatClientService.chatClient.userID },
|
|
827
834
|
})];
|
|
828
835
|
case 2:
|
|
@@ -870,55 +877,73 @@
|
|
|
870
877
|
ChannelService.prototype.handleNotification = function (notification) {
|
|
871
878
|
return __awaiter(this, void 0, void 0, function () {
|
|
872
879
|
var _e;
|
|
880
|
+
var _this = this;
|
|
873
881
|
return __generator(this, function (_f) {
|
|
874
882
|
switch (_f.label) {
|
|
875
883
|
case 0:
|
|
876
884
|
_e = notification.eventType;
|
|
877
885
|
switch (_e) {
|
|
878
886
|
case 'notification.message_new': return [3 /*break*/, 1];
|
|
879
|
-
case 'notification.added_to_channel': return [3 /*break*/,
|
|
880
|
-
case 'notification.removed_from_channel': return [3 /*break*/,
|
|
887
|
+
case 'notification.added_to_channel': return [3 /*break*/, 3];
|
|
888
|
+
case 'notification.removed_from_channel': return [3 /*break*/, 5];
|
|
881
889
|
}
|
|
882
|
-
return [3 /*break*/,
|
|
883
|
-
case 1:
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
890
|
+
return [3 /*break*/, 6];
|
|
891
|
+
case 1: return [4 /*yield*/, this.ngZone.run(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
892
|
+
return __generator(this, function (_e) {
|
|
893
|
+
switch (_e.label) {
|
|
894
|
+
case 0:
|
|
895
|
+
if (!this.customNewMessageNotificationHandler) return [3 /*break*/, 1];
|
|
896
|
+
this.customNewMessageNotificationHandler(notification, this.channelListSetter);
|
|
897
|
+
return [3 /*break*/, 3];
|
|
898
|
+
case 1: return [4 /*yield*/, this.handleNewMessageNotification(notification)];
|
|
899
|
+
case 2:
|
|
900
|
+
_e.sent();
|
|
901
|
+
_e.label = 3;
|
|
902
|
+
case 3: return [2 /*return*/];
|
|
903
|
+
}
|
|
904
|
+
});
|
|
905
|
+
}); })];
|
|
906
|
+
case 2:
|
|
889
907
|
_f.sent();
|
|
890
|
-
|
|
891
|
-
case
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
908
|
+
return [3 /*break*/, 6];
|
|
909
|
+
case 3: return [4 /*yield*/, this.ngZone.run(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
910
|
+
return __generator(this, function (_e) {
|
|
911
|
+
switch (_e.label) {
|
|
912
|
+
case 0:
|
|
913
|
+
if (!this.customAddedToChannelNotificationHandler) return [3 /*break*/, 1];
|
|
914
|
+
this.customAddedToChannelNotificationHandler(notification, this.channelListSetter);
|
|
915
|
+
return [3 /*break*/, 3];
|
|
916
|
+
case 1: return [4 /*yield*/, this.handleAddedToChannelNotification(notification)];
|
|
917
|
+
case 2:
|
|
918
|
+
_e.sent();
|
|
919
|
+
_e.label = 3;
|
|
920
|
+
case 3: return [2 /*return*/];
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
}); })];
|
|
924
|
+
case 4:
|
|
898
925
|
_f.sent();
|
|
899
|
-
|
|
900
|
-
case
|
|
901
|
-
case 9:
|
|
926
|
+
return [3 /*break*/, 6];
|
|
927
|
+
case 5:
|
|
902
928
|
{
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
929
|
+
this.ngZone.run(function () {
|
|
930
|
+
if (_this.customRemovedFromChannelNotificationHandler) {
|
|
931
|
+
_this.customRemovedFromChannelNotificationHandler(notification, _this.channelListSetter);
|
|
932
|
+
}
|
|
933
|
+
else {
|
|
934
|
+
_this.handleRemovedFromChannelNotification(notification);
|
|
935
|
+
}
|
|
936
|
+
});
|
|
909
937
|
}
|
|
910
|
-
_f.label =
|
|
911
|
-
case
|
|
938
|
+
_f.label = 6;
|
|
939
|
+
case 6: return [2 /*return*/];
|
|
912
940
|
}
|
|
913
941
|
});
|
|
914
942
|
});
|
|
915
943
|
};
|
|
916
944
|
ChannelService.prototype.handleRemovedFromChannelNotification = function (notification) {
|
|
917
|
-
var
|
|
918
|
-
this.
|
|
919
|
-
var channelIdToBeRemoved = notification.event.channel.cid;
|
|
920
|
-
_this.removeFromChannelList(channelIdToBeRemoved);
|
|
921
|
-
});
|
|
945
|
+
var channelIdToBeRemoved = notification.event.channel.cid;
|
|
946
|
+
this.removeFromChannelList(channelIdToBeRemoved);
|
|
922
947
|
};
|
|
923
948
|
ChannelService.prototype.handleNewMessageNotification = function (notification) {
|
|
924
949
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -948,7 +973,6 @@
|
|
|
948
973
|
var _a, _b;
|
|
949
974
|
return __awaiter(this, void 0, void 0, function () {
|
|
950
975
|
var channel;
|
|
951
|
-
var _this = this;
|
|
952
976
|
return __generator(this, function (_e) {
|
|
953
977
|
switch (_e.label) {
|
|
954
978
|
case 0:
|
|
@@ -957,11 +981,9 @@
|
|
|
957
981
|
case 1:
|
|
958
982
|
_e.sent();
|
|
959
983
|
this.watchForChannelEvents(channel);
|
|
960
|
-
this.
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
], __read((_this.channelsSubject.getValue() || []))));
|
|
964
|
-
});
|
|
984
|
+
this.channelsSubject.next(__spreadArray([
|
|
985
|
+
channel
|
|
986
|
+
], __read((this.channelsSubject.getValue() || []))));
|
|
965
987
|
return [2 /*return*/];
|
|
966
988
|
}
|
|
967
989
|
});
|
|
@@ -994,15 +1016,17 @@
|
|
|
994
1016
|
this.activeChannelSubscriptions.push(channel.on('reaction.deleted', function (e) { return _this.messageReactionEventReceived(e); }));
|
|
995
1017
|
this.activeChannelSubscriptions.push(channel.on('reaction.updated', function (e) { return _this.messageReactionEventReceived(e); }));
|
|
996
1018
|
this.activeChannelSubscriptions.push(channel.on('message.read', function (e) {
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1019
|
+
_this.ngZone.run(function () {
|
|
1020
|
+
var latestMessage;
|
|
1021
|
+
_this.activeChannelMessages$.pipe(operators.first()).subscribe(function (messages) {
|
|
1022
|
+
latestMessage = messages[messages.length - 1];
|
|
1023
|
+
});
|
|
1024
|
+
if (!latestMessage || !e.user) {
|
|
1025
|
+
return;
|
|
1026
|
+
}
|
|
1027
|
+
latestMessage.readBy = getReadBy(latestMessage, channel);
|
|
1028
|
+
_this.activeChannelMessagesSubject.next(_this.activeChannelMessagesSubject.getValue());
|
|
1000
1029
|
});
|
|
1001
|
-
if (!latestMessage || !e.user) {
|
|
1002
|
-
return;
|
|
1003
|
-
}
|
|
1004
|
-
latestMessage.readBy = getReadBy(latestMessage, channel);
|
|
1005
|
-
_this.activeChannelMessagesSubject.next(_this.activeChannelMessagesSubject.getValue());
|
|
1006
1030
|
}));
|
|
1007
1031
|
};
|
|
1008
1032
|
ChannelService.prototype.messageUpdated = function (event) {
|
|
@@ -1091,66 +1115,72 @@
|
|
|
1091
1115
|
channel.on(function (event) {
|
|
1092
1116
|
switch (event.type) {
|
|
1093
1117
|
case 'message.new': {
|
|
1094
|
-
|
|
1095
|
-
_this.customNewMessageHandler
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1118
|
+
_this.ngZone.run(function () {
|
|
1119
|
+
if (_this.customNewMessageHandler) {
|
|
1120
|
+
_this.customNewMessageHandler(event, channel, _this.channelListSetter, _this.messageListSetter);
|
|
1121
|
+
}
|
|
1122
|
+
else {
|
|
1123
|
+
_this.handleNewMessage(event, channel);
|
|
1124
|
+
}
|
|
1125
|
+
});
|
|
1100
1126
|
break;
|
|
1101
1127
|
}
|
|
1102
1128
|
case 'channel.hidden': {
|
|
1103
|
-
|
|
1104
|
-
_this.customChannelHiddenHandler
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1129
|
+
_this.ngZone.run(function () {
|
|
1130
|
+
if (_this.customChannelHiddenHandler) {
|
|
1131
|
+
_this.customChannelHiddenHandler(event, channel, _this.channelListSetter, _this.messageListSetter);
|
|
1132
|
+
}
|
|
1133
|
+
else {
|
|
1134
|
+
_this.handleChannelHidden(event);
|
|
1135
|
+
}
|
|
1136
|
+
});
|
|
1110
1137
|
break;
|
|
1111
1138
|
}
|
|
1112
1139
|
case 'channel.deleted': {
|
|
1113
|
-
|
|
1114
|
-
_this.customChannelDeletedHandler
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1140
|
+
_this.ngZone.run(function () {
|
|
1141
|
+
if (_this.customChannelDeletedHandler) {
|
|
1142
|
+
_this.customChannelDeletedHandler(event, channel, _this.channelListSetter, _this.messageListSetter);
|
|
1143
|
+
}
|
|
1144
|
+
else {
|
|
1145
|
+
_this.handleChannelDeleted(event);
|
|
1146
|
+
}
|
|
1147
|
+
});
|
|
1120
1148
|
break;
|
|
1121
1149
|
}
|
|
1122
1150
|
case 'channel.visible': {
|
|
1123
|
-
|
|
1124
|
-
_this.customChannelVisibleHandler
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1151
|
+
_this.ngZone.run(function () {
|
|
1152
|
+
if (_this.customChannelVisibleHandler) {
|
|
1153
|
+
_this.customChannelVisibleHandler(event, channel, _this.channelListSetter, _this.messageListSetter);
|
|
1154
|
+
}
|
|
1155
|
+
else {
|
|
1156
|
+
_this.handleChannelVisible(event, channel);
|
|
1157
|
+
}
|
|
1158
|
+
});
|
|
1130
1159
|
break;
|
|
1131
1160
|
}
|
|
1132
1161
|
case 'channel.updated': {
|
|
1133
|
-
|
|
1134
|
-
_this.customChannelUpdatedHandler
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1162
|
+
_this.ngZone.run(function () {
|
|
1163
|
+
if (_this.customChannelUpdatedHandler) {
|
|
1164
|
+
_this.customChannelUpdatedHandler(event, channel, _this.channelListSetter, _this.messageListSetter);
|
|
1165
|
+
}
|
|
1166
|
+
else {
|
|
1167
|
+
_this.handleChannelUpdate(event);
|
|
1168
|
+
}
|
|
1169
|
+
});
|
|
1140
1170
|
break;
|
|
1141
1171
|
}
|
|
1142
1172
|
case 'channel.truncated': {
|
|
1143
|
-
|
|
1144
|
-
_this.customChannelTruncatedHandler
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1173
|
+
_this.ngZone.run(function () {
|
|
1174
|
+
if (_this.customChannelTruncatedHandler) {
|
|
1175
|
+
_this.customChannelTruncatedHandler(event, channel, _this.channelListSetter, _this.messageListSetter);
|
|
1176
|
+
}
|
|
1177
|
+
else {
|
|
1178
|
+
_this.handleChannelTruncate(event);
|
|
1179
|
+
}
|
|
1180
|
+
});
|
|
1150
1181
|
break;
|
|
1151
1182
|
}
|
|
1152
1183
|
}
|
|
1153
|
-
setTimeout(function () { return _this.appRef.tick(); }, 0);
|
|
1154
1184
|
});
|
|
1155
1185
|
};
|
|
1156
1186
|
ChannelService.prototype.handleNewMessage = function (_, channel) {
|
|
@@ -1219,14 +1249,14 @@
|
|
|
1219
1249
|
});
|
|
1220
1250
|
return ChannelService;
|
|
1221
1251
|
}());
|
|
1222
|
-
ChannelService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChannelService, deps: [{ token: ChatClientService }, { token: i0__namespace.
|
|
1252
|
+
ChannelService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChannelService, deps: [{ token: ChatClientService }, { token: i0__namespace.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1223
1253
|
ChannelService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChannelService, providedIn: 'root' });
|
|
1224
1254
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChannelService, decorators: [{
|
|
1225
1255
|
type: i0.Injectable,
|
|
1226
1256
|
args: [{
|
|
1227
1257
|
providedIn: 'root',
|
|
1228
1258
|
}]
|
|
1229
|
-
}], ctorParameters: function () { return [{ type: ChatClientService }, { type: i0__namespace.
|
|
1259
|
+
}], ctorParameters: function () { return [{ type: ChatClientService }, { type: i0__namespace.NgZone }]; } });
|
|
1230
1260
|
|
|
1231
1261
|
var ThemeService = /** @class */ (function () {
|
|
1232
1262
|
function ThemeService() {
|
|
@@ -1316,6 +1346,11 @@
|
|
|
1316
1346
|
}]
|
|
1317
1347
|
}], ctorParameters: function () { return []; } });
|
|
1318
1348
|
|
|
1349
|
+
var isImageFile = function (file) {
|
|
1350
|
+
// photoshop files begin with 'image/'
|
|
1351
|
+
return file.type.startsWith('image/') && !file.type.endsWith('.photoshop');
|
|
1352
|
+
};
|
|
1353
|
+
|
|
1319
1354
|
var isImageAttachment = function (attachment) {
|
|
1320
1355
|
return (attachment.type === 'image' &&
|
|
1321
1356
|
!attachment.title_link &&
|
|
@@ -1348,8 +1383,7 @@
|
|
|
1348
1383
|
imageFiles = [];
|
|
1349
1384
|
dataFiles = [];
|
|
1350
1385
|
Array.from(fileList).forEach(function (file) {
|
|
1351
|
-
if (
|
|
1352
|
-
// photoshop files begin with 'image/'
|
|
1386
|
+
if (isImageFile(file)) {
|
|
1353
1387
|
imageFiles.push(file);
|
|
1354
1388
|
}
|
|
1355
1389
|
else {
|
|
@@ -1621,6 +1655,7 @@
|
|
|
1621
1655
|
test: 'success',
|
|
1622
1656
|
'Sending links is not allowed in this conversation': 'Sending links is not allowed in this conversation',
|
|
1623
1657
|
"You can't send messages in this channel": "You can't send messages in this channel",
|
|
1658
|
+
'Unsupported file type: {{type}}': 'Unsupported file type: {{type}}',
|
|
1624
1659
|
},
|
|
1625
1660
|
};
|
|
1626
1661
|
|
|
@@ -1637,14 +1672,14 @@
|
|
|
1637
1672
|
};
|
|
1638
1673
|
return StreamI18nService;
|
|
1639
1674
|
}());
|
|
1640
|
-
StreamI18nService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamI18nService, deps: [{ token:
|
|
1675
|
+
StreamI18nService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamI18nService, deps: [{ token: i10__namespace.TranslateService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1641
1676
|
StreamI18nService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamI18nService, providedIn: 'root' });
|
|
1642
1677
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamI18nService, decorators: [{
|
|
1643
1678
|
type: i0.Injectable,
|
|
1644
1679
|
args: [{
|
|
1645
1680
|
providedIn: 'root',
|
|
1646
1681
|
}]
|
|
1647
|
-
}], ctorParameters: function () { return [{ type:
|
|
1682
|
+
}], ctorParameters: function () { return [{ type: i10__namespace.TranslateService }]; } });
|
|
1648
1683
|
|
|
1649
1684
|
var AvatarComponent = /** @class */ (function () {
|
|
1650
1685
|
function AvatarComponent() {
|
|
@@ -1685,7 +1720,7 @@
|
|
|
1685
1720
|
return IconComponent;
|
|
1686
1721
|
}());
|
|
1687
1722
|
IconComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: IconComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1688
|
-
IconComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: IconComponent, selector: "stream-icon", inputs: { icon: "icon", size: "size" }, ngImport: i0__namespace, template: "<svg\n data-testid=\"action-icon\"\n *ngIf=\"icon === 'action-icon'\"\n height=\"4\"\n viewBox=\"0 0 11 4\"\n width=\"11\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <path\n d=\"M1.5 3a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm4 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm4 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z\"\n fillRule=\"nonzero\"\n />\n</svg>\n<svg\n *ngIf=\"icon === 'delivered-icon'\"\n height=\"16\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n data-testid=\"delivered-icon\"\n>\n <path\n d=\"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm3.72 6.633a.955.955 0 1 0-1.352-1.352L6.986 8.663 5.633 7.31A.956.956 0 1 0 4.28 8.663l2.029 2.028a.956.956 0 0 0 1.353 0l4.058-4.058z\"\n fill=\"#006CFF\"\n fillRule=\"evenodd\"\n />\n</svg>\n<svg\n *ngIf=\"icon === 'reaction-icon'\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n width=\"12\"\n xmlns=\"http://www.w3.org/2000/svg\"\n data-testid=\"reaction-icon\"\n>\n <g clipRule=\"evenodd\" fillRule=\"evenodd\">\n <path\n d=\"M6 1.2C3.3 1.2 1.2 3.3 1.2 6c0 2.7 2.1 4.8 4.8 4.8 2.7 0 4.8-2.1 4.8-4.8 0-2.7-2.1-4.8-4.8-4.8zM0 6c0-3.3 2.7-6 6-6s6 2.7 6 6-2.7 6-6 6-6-2.7-6-6z\"\n ></path>\n <path\n d=\"M5.4 4.5c0 .5-.4.9-.9.9s-.9-.4-.9-.9.4-.9.9-.9.9.4.9.9zM8.4 4.5c0 .5-.4.9-.9.9s-.9-.4-.9-.9.4-.9.9-.9.9.4.9.9zM3.3 6.7c.3-.2.6-.1.8.1.3.4.8.9 1.5 1 .6.2 1.4.1 2.4-1 .2-.2.6-.3.8 0 .2.2.3.6 0 .8-1.1 1.3-2.4 1.7-3.5 1.5-1-.2-1.8-.9-2.2-1.5-.2-.3-.1-.7.2-.9z\"\n ></path>\n </g>\n</svg>\n<svg\n data-testid=\"connection-error\"\n *ngIf=\"icon === 'connection-error'\"\n width=\"78px\"\n height=\"78px\"\n viewBox=\"0 0 78 78\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n>\n <!-- Generator: Sketch 52.6 (67491) - http://www.bohemiancoding.com/sketch -->\n <title>Combined Shape</title>\n <desc>Created with Sketch.</desc>\n <g\n id=\"Interactions\"\n stroke=\"none\"\n stroke-width=\"1\"\n fill=\"none\"\n fill-rule=\"evenodd\"\n >\n <g\n id=\"Connection-Error-_-Connectivity\"\n transform=\"translate(-270.000000, -30.000000)\"\n fill=\"#CF1F25\"\n >\n <g\n id=\"109-network-connection\"\n transform=\"translate(270.000000, 30.000000)\"\n >\n <path\n d=\"M66.4609744,11.414231 C81.6225232,26.5757798 81.6225232,51.157545 66.4609744,66.3188467 C51.2994256,81.4803954 26.7176604,81.4803954 11.5563587,66.3188467 C-3.60519004,51.1572979 -3.60519004,26.5755327 11.5563587,11.414231 C26.7179075,-3.74731776 51.2996727,-3.74731776 66.4609744,11.414231 Z M54.7853215,45.8823776 L54.7853215,40.5882574 C54.7853215,39.613638 53.9952341,38.8235506 53.0206147,38.8235506 L44.9576695,38.8235506 L41.428256,42.3529641 L51.255555,42.3529641 L51.255555,45.8823776 L54.7853215,45.8823776 Z M40.6659027,43.1153174 L37.8988425,45.8823776 L40.6659027,45.8823776 L40.6659027,43.1153174 Z M51.1764962,56.4702653 L58.2353232,56.4702653 C59.2099355,56.4702653 60.00003,55.6801708 60.00003,54.7055585 L60.00003,51.176145 C60.00003,50.2015327 59.2099355,49.4114382 58.2353232,49.4114382 L51.1764962,49.4114382 C50.2018839,49.4114382 49.4117894,50.2015327 49.4117894,51.176145 L49.4117894,54.7055585 C49.4117894,55.6801708 50.2018839,56.4702653 51.1764962,56.4702653 Z M35.2941353,56.4702653 L42.3529624,56.4702653 C43.3275746,56.4702653 44.1176691,55.6801708 44.1176691,54.7055585 L44.1176691,51.176145 C44.1176691,50.2015327 43.3275746,49.4114382 42.3529624,49.4114382 L35.2941353,49.4114382 C34.319523,49.4114382 33.5294285,50.2015327 33.5294285,51.176145 L33.5294285,54.7055585 C33.5294285,55.6801708 34.319523,56.4702653 35.2941353,56.4702653 Z M56.6964989,19.0874231 C56.007381,18.3985134 54.8903216,18.3985134 54.2012036,19.087423 L45.882376,27.4062507 L45.882376,19.4117761 C45.882376,18.4371568 45.0922885,17.6470693 44.1176692,17.6470693 L33.5294286,17.6470693 C32.5548092,17.6470694 31.7647218,18.4371568 31.7647218,19.4117761 L31.7647218,30.0000167 C31.7647219,30.9746363 32.5548092,31.7647237 33.5294285,31.7647237 L41.5239031,31.7647237 L34.4650761,38.8235508 L24.7058947,38.8235508 C23.7312753,38.8235508 22.9411879,39.6136382 22.9411879,40.5882575 L22.9411879,45.8823778 L26.4706014,45.8823778 L26.4706014,42.3529643 L30.9356624,42.3529643 L23.8768354,49.4117914 L19.4117743,49.4117914 C18.4371549,49.4117914 17.6470675,50.2018788 17.6470675,51.1764981 L17.6470675,54.7059117 C17.6504049,54.9674302 17.7129076,55.2248042 17.8298886,55.4587302 L16.4456526,56.8429662 C15.7446193,57.5200453 15.7252005,58.6372282 16.4022825,59.3382615 C17.0793616,60.0392948 18.1965445,60.0587136 18.8975778,59.3816316 C18.9122847,59.3674273 18.9267436,59.3529684 18.940948,59.3382615 L56.6964963,21.5830662 C57.3856425,20.8939094 57.3856425,19.7765747 56.6964963,19.0874179 Z\"\n id=\"Combined-Shape\"\n ></path>\n </g>\n </g>\n </g>\n</svg>\n<svg\n *ngIf=\"icon === 'send'\"\n data-testid=\"send\"\n height=\"17\"\n viewBox=\"0 0 18 17\"\n width=\"18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <title translate>streamChat.Send</title>\n <path\n d=\"M0 17.015l17.333-8.508L0 0v6.617l12.417 1.89L0 10.397z\"\n fill=\"#006cff\"\n fillRule=\"evenodd\"\n />\n</svg>\n<svg\n *ngIf=\"icon === 'file-upload'\"\n data-testid=\"file-upload\"\n height=\"14\"\n width=\"14\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <title translate>streamChat.Attach files</title>\n <path\n d=\"M1.667.333h10.666c.737 0 1.334.597 1.334 1.334v10.666c0 .737-.597 1.334-1.334 1.334H1.667a1.333 1.333 0 0 1-1.334-1.334V1.667C.333.93.93.333 1.667.333zm2 1.334a1.667 1.667 0 1 0 0 3.333 1.667 1.667 0 0 0 0-3.333zm-2 9.333v1.333h10.666v-4l-2-2-4 4-2-2L1.667 11z\"\n fillRule=\"nonzero\"\n />\n</svg>\n<svg\n data-testid=\"retry\"\n *ngIf=\"icon === 'retry'\"\n width=\"22\"\n height=\"20\"\n viewBox=\"0 0 22 20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <path\n d=\"M20 5.535V2a1 1 0 0 1 2 0v6a1 1 0 0 1-1 1h-6a1 1 0 0 1 0-2h3.638l-2.975-2.653a8 8 0 1 0 1.884 8.32 1 1 0 1 1 1.886.666A10 10 0 1 1 5.175 1.245c3.901-2.15 8.754-1.462 11.88 1.667L20 5.535z\"\n fill=\"#FFF\"\n fill-rule=\"nonzero\"\n />\n</svg>\n<svg\n *ngIf=\"icon === 'close'\"\n data-testid=\"close\"\n width=\"28\"\n height=\"28\"\n viewBox=\"0 0 28 28\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n>\n <defs>\n <path\n d=\"M465 5c5.53 0 10 4.47 10 10s-4.47 10-10 10-10-4.47-10-10 4.47-10 10-10zm3.59 5L465 13.59 461.41 10 460 11.41l3.59 3.59-3.59 3.59 1.41 1.41 3.59-3.59 3.59 3.59 1.41-1.41-3.59-3.59 3.59-3.59-1.41-1.41z\"\n id=\"b\"\n />\n <filter\n x=\"-30%\"\n y=\"-30%\"\n width=\"160%\"\n height=\"160%\"\n filterUnits=\"objectBoundingBox\"\n id=\"a\"\n >\n <feOffset in=\"SourceAlpha\" result=\"shadowOffsetOuter1\" />\n <feGaussianBlur\n stdDeviation=\"2\"\n in=\"shadowOffsetOuter1\"\n result=\"shadowBlurOuter1\"\n />\n <feColorMatrix\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0\"\n in=\"shadowBlurOuter1\"\n />\n </filter>\n </defs>\n <g transform=\"translate(-451 -1)\" fill-rule=\"nonzero\" fill=\"none\">\n <use fill=\"#000\" filter=\"url(#a)\" xlink:href=\"#b\" />\n <use fill=\"#FFF\" fill-rule=\"evenodd\" xlink:href=\"#b\" />\n </g>\n</svg>\n<svg\n *ngIf=\"icon === 'file'\"\n data-testid=\"file\"\n className=\"rfu-file-icon--small fa-file-fallback\"\n [attr.height]=\"size || 20\"\n [attr.width]=\"size || 20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 384 512\"\n>\n <path\n d=\"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z\"\n fill=\"#414D54\"\n />\n</svg>\n", directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type:
|
|
1723
|
+
IconComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: IconComponent, selector: "stream-icon", inputs: { icon: "icon", size: "size" }, ngImport: i0__namespace, template: "<svg\n data-testid=\"action-icon\"\n *ngIf=\"icon === 'action-icon'\"\n height=\"4\"\n viewBox=\"0 0 11 4\"\n width=\"11\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <path\n d=\"M1.5 3a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm4 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm4 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z\"\n fillRule=\"nonzero\"\n />\n</svg>\n<svg\n *ngIf=\"icon === 'delivered-icon'\"\n height=\"16\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n data-testid=\"delivered-icon\"\n>\n <path\n d=\"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm3.72 6.633a.955.955 0 1 0-1.352-1.352L6.986 8.663 5.633 7.31A.956.956 0 1 0 4.28 8.663l2.029 2.028a.956.956 0 0 0 1.353 0l4.058-4.058z\"\n fill=\"#006CFF\"\n fillRule=\"evenodd\"\n />\n</svg>\n<svg\n *ngIf=\"icon === 'reaction-icon'\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n width=\"12\"\n xmlns=\"http://www.w3.org/2000/svg\"\n data-testid=\"reaction-icon\"\n>\n <g clipRule=\"evenodd\" fillRule=\"evenodd\">\n <path\n d=\"M6 1.2C3.3 1.2 1.2 3.3 1.2 6c0 2.7 2.1 4.8 4.8 4.8 2.7 0 4.8-2.1 4.8-4.8 0-2.7-2.1-4.8-4.8-4.8zM0 6c0-3.3 2.7-6 6-6s6 2.7 6 6-2.7 6-6 6-6-2.7-6-6z\"\n ></path>\n <path\n d=\"M5.4 4.5c0 .5-.4.9-.9.9s-.9-.4-.9-.9.4-.9.9-.9.9.4.9.9zM8.4 4.5c0 .5-.4.9-.9.9s-.9-.4-.9-.9.4-.9.9-.9.9.4.9.9zM3.3 6.7c.3-.2.6-.1.8.1.3.4.8.9 1.5 1 .6.2 1.4.1 2.4-1 .2-.2.6-.3.8 0 .2.2.3.6 0 .8-1.1 1.3-2.4 1.7-3.5 1.5-1-.2-1.8-.9-2.2-1.5-.2-.3-.1-.7.2-.9z\"\n ></path>\n </g>\n</svg>\n<svg\n data-testid=\"connection-error\"\n *ngIf=\"icon === 'connection-error'\"\n width=\"78px\"\n height=\"78px\"\n viewBox=\"0 0 78 78\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n>\n <!-- Generator: Sketch 52.6 (67491) - http://www.bohemiancoding.com/sketch -->\n <title>Combined Shape</title>\n <desc>Created with Sketch.</desc>\n <g\n id=\"Interactions\"\n stroke=\"none\"\n stroke-width=\"1\"\n fill=\"none\"\n fill-rule=\"evenodd\"\n >\n <g\n id=\"Connection-Error-_-Connectivity\"\n transform=\"translate(-270.000000, -30.000000)\"\n fill=\"#CF1F25\"\n >\n <g\n id=\"109-network-connection\"\n transform=\"translate(270.000000, 30.000000)\"\n >\n <path\n d=\"M66.4609744,11.414231 C81.6225232,26.5757798 81.6225232,51.157545 66.4609744,66.3188467 C51.2994256,81.4803954 26.7176604,81.4803954 11.5563587,66.3188467 C-3.60519004,51.1572979 -3.60519004,26.5755327 11.5563587,11.414231 C26.7179075,-3.74731776 51.2996727,-3.74731776 66.4609744,11.414231 Z M54.7853215,45.8823776 L54.7853215,40.5882574 C54.7853215,39.613638 53.9952341,38.8235506 53.0206147,38.8235506 L44.9576695,38.8235506 L41.428256,42.3529641 L51.255555,42.3529641 L51.255555,45.8823776 L54.7853215,45.8823776 Z M40.6659027,43.1153174 L37.8988425,45.8823776 L40.6659027,45.8823776 L40.6659027,43.1153174 Z M51.1764962,56.4702653 L58.2353232,56.4702653 C59.2099355,56.4702653 60.00003,55.6801708 60.00003,54.7055585 L60.00003,51.176145 C60.00003,50.2015327 59.2099355,49.4114382 58.2353232,49.4114382 L51.1764962,49.4114382 C50.2018839,49.4114382 49.4117894,50.2015327 49.4117894,51.176145 L49.4117894,54.7055585 C49.4117894,55.6801708 50.2018839,56.4702653 51.1764962,56.4702653 Z M35.2941353,56.4702653 L42.3529624,56.4702653 C43.3275746,56.4702653 44.1176691,55.6801708 44.1176691,54.7055585 L44.1176691,51.176145 C44.1176691,50.2015327 43.3275746,49.4114382 42.3529624,49.4114382 L35.2941353,49.4114382 C34.319523,49.4114382 33.5294285,50.2015327 33.5294285,51.176145 L33.5294285,54.7055585 C33.5294285,55.6801708 34.319523,56.4702653 35.2941353,56.4702653 Z M56.6964989,19.0874231 C56.007381,18.3985134 54.8903216,18.3985134 54.2012036,19.087423 L45.882376,27.4062507 L45.882376,19.4117761 C45.882376,18.4371568 45.0922885,17.6470693 44.1176692,17.6470693 L33.5294286,17.6470693 C32.5548092,17.6470694 31.7647218,18.4371568 31.7647218,19.4117761 L31.7647218,30.0000167 C31.7647219,30.9746363 32.5548092,31.7647237 33.5294285,31.7647237 L41.5239031,31.7647237 L34.4650761,38.8235508 L24.7058947,38.8235508 C23.7312753,38.8235508 22.9411879,39.6136382 22.9411879,40.5882575 L22.9411879,45.8823778 L26.4706014,45.8823778 L26.4706014,42.3529643 L30.9356624,42.3529643 L23.8768354,49.4117914 L19.4117743,49.4117914 C18.4371549,49.4117914 17.6470675,50.2018788 17.6470675,51.1764981 L17.6470675,54.7059117 C17.6504049,54.9674302 17.7129076,55.2248042 17.8298886,55.4587302 L16.4456526,56.8429662 C15.7446193,57.5200453 15.7252005,58.6372282 16.4022825,59.3382615 C17.0793616,60.0392948 18.1965445,60.0587136 18.8975778,59.3816316 C18.9122847,59.3674273 18.9267436,59.3529684 18.940948,59.3382615 L56.6964963,21.5830662 C57.3856425,20.8939094 57.3856425,19.7765747 56.6964963,19.0874179 Z\"\n id=\"Combined-Shape\"\n ></path>\n </g>\n </g>\n </g>\n</svg>\n<svg\n *ngIf=\"icon === 'send'\"\n data-testid=\"send\"\n height=\"17\"\n viewBox=\"0 0 18 17\"\n width=\"18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <title translate>streamChat.Send</title>\n <path\n d=\"M0 17.015l17.333-8.508L0 0v6.617l12.417 1.89L0 10.397z\"\n fill=\"#006cff\"\n fillRule=\"evenodd\"\n />\n</svg>\n<svg\n *ngIf=\"icon === 'file-upload'\"\n data-testid=\"file-upload\"\n height=\"14\"\n width=\"14\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <title translate>streamChat.Attach files</title>\n <path\n d=\"M1.667.333h10.666c.737 0 1.334.597 1.334 1.334v10.666c0 .737-.597 1.334-1.334 1.334H1.667a1.333 1.333 0 0 1-1.334-1.334V1.667C.333.93.93.333 1.667.333zm2 1.334a1.667 1.667 0 1 0 0 3.333 1.667 1.667 0 0 0 0-3.333zm-2 9.333v1.333h10.666v-4l-2-2-4 4-2-2L1.667 11z\"\n fillRule=\"nonzero\"\n />\n</svg>\n<svg\n data-testid=\"retry\"\n *ngIf=\"icon === 'retry'\"\n width=\"22\"\n height=\"20\"\n viewBox=\"0 0 22 20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <path\n d=\"M20 5.535V2a1 1 0 0 1 2 0v6a1 1 0 0 1-1 1h-6a1 1 0 0 1 0-2h3.638l-2.975-2.653a8 8 0 1 0 1.884 8.32 1 1 0 1 1 1.886.666A10 10 0 1 1 5.175 1.245c3.901-2.15 8.754-1.462 11.88 1.667L20 5.535z\"\n fill=\"#FFF\"\n fill-rule=\"nonzero\"\n />\n</svg>\n<svg\n *ngIf=\"icon === 'close'\"\n data-testid=\"close\"\n width=\"28\"\n height=\"28\"\n viewBox=\"0 0 28 28\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n>\n <defs>\n <path\n d=\"M465 5c5.53 0 10 4.47 10 10s-4.47 10-10 10-10-4.47-10-10 4.47-10 10-10zm3.59 5L465 13.59 461.41 10 460 11.41l3.59 3.59-3.59 3.59 1.41 1.41 3.59-3.59 3.59 3.59 1.41-1.41-3.59-3.59 3.59-3.59-1.41-1.41z\"\n id=\"b\"\n />\n <filter\n x=\"-30%\"\n y=\"-30%\"\n width=\"160%\"\n height=\"160%\"\n filterUnits=\"objectBoundingBox\"\n id=\"a\"\n >\n <feOffset in=\"SourceAlpha\" result=\"shadowOffsetOuter1\" />\n <feGaussianBlur\n stdDeviation=\"2\"\n in=\"shadowOffsetOuter1\"\n result=\"shadowBlurOuter1\"\n />\n <feColorMatrix\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0\"\n in=\"shadowBlurOuter1\"\n />\n </filter>\n </defs>\n <g transform=\"translate(-451 -1)\" fill-rule=\"nonzero\" fill=\"none\">\n <use fill=\"#000\" filter=\"url(#a)\" xlink:href=\"#b\" />\n <use fill=\"#FFF\" fill-rule=\"evenodd\" xlink:href=\"#b\" />\n </g>\n</svg>\n<svg\n *ngIf=\"icon === 'file'\"\n data-testid=\"file\"\n className=\"rfu-file-icon--small fa-file-fallback\"\n [attr.height]=\"size || 20\"\n [attr.width]=\"size || 20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 384 512\"\n>\n <path\n d=\"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z\"\n fill=\"#414D54\"\n />\n</svg>\n", directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }] });
|
|
1689
1724
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: IconComponent, decorators: [{
|
|
1690
1725
|
type: i0.Component,
|
|
1691
1726
|
args: [{
|
|
@@ -1854,7 +1889,7 @@
|
|
|
1854
1889
|
return AttachmentPreviewListComponent;
|
|
1855
1890
|
}());
|
|
1856
1891
|
AttachmentPreviewListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: AttachmentPreviewListComponent, deps: [{ token: AttachmentService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1857
|
-
AttachmentPreviewListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: AttachmentPreviewListComponent, selector: "stream-attachment-preview-list", ngImport: i0__namespace, template: "<div class=\"rfu-image-previewer\">\n <ng-container\n *ngFor=\"\n let attachmentUpload of attachmentUploads$ | async;\n trackBy: trackByFile\n \"\n >\n <div\n *ngIf=\"attachmentUpload.type === 'image'\"\n class=\"rfu-image-previewer__image\"\n [class.rfu-image-previewer__image--loaded]=\"\n attachmentUpload.state === 'success'\n \"\n data-testclass=\"attachment-image-preview\"\n >\n <div\n *ngIf=\"attachmentUpload.state === 'error'\"\n class=\"rfu-image-previewer__retry\"\n (click)=\"retryAttachmentUpload(attachmentUpload.file)\"\n (keyup.enter)=\"retryAttachmentUpload(attachmentUpload.file)\"\n data-testclass=\"upload-error\"\n >\n <stream-icon icon=\"retry\"></stream-icon>\n </div>\n <div class=\"rfu-thumbnail__wrapper\" style=\"width: 100; height: 100\">\n <div class=\"rfu-thumbnail__overlay\">\n <div\n class=\"rfu-icon-button\"\n data-testclass=\"delete-attachment\"\n role=\"button\"\n (click)=\"deleteAttachment(attachmentUpload)\"\n (keyup.enter)=\"deleteAttachment(attachmentUpload)\"\n >\n <stream-icon icon=\"close\"></stream-icon>\n </div>\n </div>\n <img\n *ngIf=\"attachmentUpload.url || attachmentUpload.previewUri\"\n src=\"{{\n attachmentUpload.url\n ? attachmentUpload.url\n : attachmentUpload.previewUri\n }}\"\n alt=\"attachmentUpload.file.name\"\n class=\"rfu-thumbnail__image\"\n data-testclass=\"attachment-image\"\n />\n </div>\n <stream-loading-indicator\n data-testclass=\"loading-indicator\"\n color=\"rgba(255,255,255,0.7)\"\n *ngIf=\"attachmentUpload.state === 'uploading'\"\n ></stream-loading-indicator>\n </div>\n <div\n class=\"rfu-file-previewer\"\n *ngIf=\"attachmentUpload.type === 'file'\"\n data-testclass=\"attachment-file-preview\"\n >\n <ol>\n <li\n class=\"rfu-file-previewer__file\"\n [class.rfu-file-previewer__file--uploading]=\"\n attachmentUpload.state === 'uploading'\n \"\n [class.rfu-file-previewer__file--failed]=\"\n attachmentUpload.state === 'error'\n \"\n >\n <stream-icon icon=\"file\"></stream-icon>\n\n <a\n data-testclass=\"file-download-link\"\n href=\"{{ attachmentUpload.url }}\"\n (click)=\"attachmentUpload.url ? null : $event.preventDefault()\"\n (keyup.enter)=\"\n attachmentUpload.url ? null : $event.preventDefault()\n \"\n download\n >\n {{ attachmentUpload.file.name }}\n <ng-container *ngIf=\"attachmentUpload.state === 'error'\">\n <div\n data-testclass=\"file-upload-retry\"\n class=\"rfu-file-previewer__failed\"\n (click)=\"retryAttachmentUpload(attachmentUpload.file)\"\n (keyup.enter)=\"retryAttachmentUpload(attachmentUpload.file)\"\n translate\n >\n streamChat.failed\n </div>\n <div\n class=\"rfu-file-previewer__retry\"\n (click)=\"retryAttachmentUpload(attachmentUpload.file)\"\n (keyup.enter)=\"retryAttachmentUpload(attachmentUpload.file)\"\n translate\n >\n streamChat.retry\n </div>\n </ng-container>\n </a>\n\n <span\n data-testclass=\"file-delete\"\n class=\"rfu-file-previewer__close-button\"\n (click)=\"deleteAttachment(attachmentUpload)\"\n (keyup.enter)=\"deleteAttachment(attachmentUpload)\"\n >\n \u2718\n </span>\n <div\n *ngIf=\"attachmentUpload.state === 'uploading'\"\n class=\"rfu-file-previewer__loading-indicator\"\n >\n <stream-loading-indicator></stream-loading-indicator>\n </div>\n </li>\n </ol>\n </div>\n </ng-container>\n</div>\n", components: [{ type: IconComponent, selector: "stream-icon", inputs: ["icon", "size"] }, { type: LoadingIndicatorComponent, selector: "stream-loading-indicator", inputs: ["size", "color"] }], directives: [{ type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type:
|
|
1892
|
+
AttachmentPreviewListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: AttachmentPreviewListComponent, selector: "stream-attachment-preview-list", ngImport: i0__namespace, template: "<div class=\"rfu-image-previewer\">\n <ng-container\n *ngFor=\"\n let attachmentUpload of attachmentUploads$ | async;\n trackBy: trackByFile\n \"\n >\n <div\n *ngIf=\"attachmentUpload.type === 'image'\"\n class=\"rfu-image-previewer__image\"\n [class.rfu-image-previewer__image--loaded]=\"\n attachmentUpload.state === 'success'\n \"\n data-testclass=\"attachment-image-preview\"\n >\n <div\n *ngIf=\"attachmentUpload.state === 'error'\"\n class=\"rfu-image-previewer__retry\"\n (click)=\"retryAttachmentUpload(attachmentUpload.file)\"\n (keyup.enter)=\"retryAttachmentUpload(attachmentUpload.file)\"\n data-testclass=\"upload-error\"\n >\n <stream-icon icon=\"retry\"></stream-icon>\n </div>\n <div class=\"rfu-thumbnail__wrapper\" style=\"width: 100; height: 100\">\n <div class=\"rfu-thumbnail__overlay\">\n <div\n class=\"rfu-icon-button\"\n data-testclass=\"delete-attachment\"\n role=\"button\"\n (click)=\"deleteAttachment(attachmentUpload)\"\n (keyup.enter)=\"deleteAttachment(attachmentUpload)\"\n >\n <stream-icon icon=\"close\"></stream-icon>\n </div>\n </div>\n <img\n *ngIf=\"attachmentUpload.url || attachmentUpload.previewUri\"\n src=\"{{\n attachmentUpload.url\n ? attachmentUpload.url\n : attachmentUpload.previewUri\n }}\"\n alt=\"attachmentUpload.file.name\"\n class=\"rfu-thumbnail__image\"\n data-testclass=\"attachment-image\"\n />\n </div>\n <stream-loading-indicator\n data-testclass=\"loading-indicator\"\n color=\"rgba(255,255,255,0.7)\"\n *ngIf=\"attachmentUpload.state === 'uploading'\"\n ></stream-loading-indicator>\n </div>\n <div\n class=\"rfu-file-previewer\"\n *ngIf=\"attachmentUpload.type === 'file'\"\n data-testclass=\"attachment-file-preview\"\n >\n <ol>\n <li\n class=\"rfu-file-previewer__file\"\n [class.rfu-file-previewer__file--uploading]=\"\n attachmentUpload.state === 'uploading'\n \"\n [class.rfu-file-previewer__file--failed]=\"\n attachmentUpload.state === 'error'\n \"\n >\n <stream-icon icon=\"file\"></stream-icon>\n\n <a\n data-testclass=\"file-download-link\"\n href=\"{{ attachmentUpload.url }}\"\n (click)=\"attachmentUpload.url ? null : $event.preventDefault()\"\n (keyup.enter)=\"\n attachmentUpload.url ? null : $event.preventDefault()\n \"\n download\n >\n {{ attachmentUpload.file.name }}\n <ng-container *ngIf=\"attachmentUpload.state === 'error'\">\n <div\n data-testclass=\"file-upload-retry\"\n class=\"rfu-file-previewer__failed\"\n (click)=\"retryAttachmentUpload(attachmentUpload.file)\"\n (keyup.enter)=\"retryAttachmentUpload(attachmentUpload.file)\"\n translate\n >\n streamChat.failed\n </div>\n <div\n class=\"rfu-file-previewer__retry\"\n (click)=\"retryAttachmentUpload(attachmentUpload.file)\"\n (keyup.enter)=\"retryAttachmentUpload(attachmentUpload.file)\"\n translate\n >\n streamChat.retry\n </div>\n </ng-container>\n </a>\n\n <span\n data-testclass=\"file-delete\"\n class=\"rfu-file-previewer__close-button\"\n (click)=\"deleteAttachment(attachmentUpload)\"\n (keyup.enter)=\"deleteAttachment(attachmentUpload)\"\n >\n \u2718\n </span>\n <div\n *ngIf=\"attachmentUpload.state === 'uploading'\"\n class=\"rfu-file-previewer__loading-indicator\"\n >\n <stream-loading-indicator></stream-loading-indicator>\n </div>\n </li>\n </ol>\n </div>\n </ng-container>\n</div>\n", components: [{ type: IconComponent, selector: "stream-icon", inputs: ["icon", "size"] }, { type: LoadingIndicatorComponent, selector: "stream-loading-indicator", inputs: ["size", "color"] }], directives: [{ type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], pipes: { "async": i3__namespace.AsyncPipe } });
|
|
1858
1893
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: AttachmentPreviewListComponent, decorators: [{
|
|
1859
1894
|
type: i0.Component,
|
|
1860
1895
|
args: [{
|
|
@@ -1865,7 +1900,7 @@
|
|
|
1865
1900
|
}], ctorParameters: function () { return [{ type: AttachmentService }]; } });
|
|
1866
1901
|
|
|
1867
1902
|
var MessageInputComponent = /** @class */ (function () {
|
|
1868
|
-
function MessageInputComponent(channelService, notificationService, attachmentService, configService, textareaType, componentFactoryResolver, cdRef) {
|
|
1903
|
+
function MessageInputComponent(channelService, notificationService, attachmentService, configService, textareaType, componentFactoryResolver, cdRef, chatClient) {
|
|
1869
1904
|
var _this = this;
|
|
1870
1905
|
this.channelService = channelService;
|
|
1871
1906
|
this.notificationService = notificationService;
|
|
@@ -1874,6 +1909,7 @@
|
|
|
1874
1909
|
this.textareaType = textareaType;
|
|
1875
1910
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
1876
1911
|
this.cdRef = cdRef;
|
|
1912
|
+
this.chatClient = chatClient;
|
|
1877
1913
|
this.messageUpdate = new i0.EventEmitter();
|
|
1878
1914
|
this.textareaValue = '';
|
|
1879
1915
|
this.mentionedUsers = [];
|
|
@@ -1901,6 +1937,7 @@
|
|
|
1901
1937
|
}
|
|
1902
1938
|
}
|
|
1903
1939
|
}));
|
|
1940
|
+
this.subscriptions.push(this.chatClient.appSettings$.subscribe(function (appSettings) { return (_this.appSettings = appSettings); }));
|
|
1904
1941
|
this.attachmentUploads$ = this.attachmentService.attachmentUploads$;
|
|
1905
1942
|
this.isFileUploadEnabled = this.configService.isFileUploadEnabled;
|
|
1906
1943
|
this.acceptedFileTypes = this.configService.acceptedFileTypes;
|
|
@@ -1950,8 +1987,8 @@
|
|
|
1950
1987
|
MessageInputComponent.prototype.messageSent = function () {
|
|
1951
1988
|
return __awaiter(this, void 0, void 0, function () {
|
|
1952
1989
|
var attachmentUploadInProgressCounter, attachments, text, error_1;
|
|
1953
|
-
return __generator(this, function (
|
|
1954
|
-
switch (
|
|
1990
|
+
return __generator(this, function (_12) {
|
|
1991
|
+
switch (_12.label) {
|
|
1955
1992
|
case 0:
|
|
1956
1993
|
this.attachmentService.attachmentUploadInProgressCounter$
|
|
1957
1994
|
.pipe(operators.first())
|
|
@@ -1975,21 +2012,21 @@
|
|
|
1975
2012
|
if (!this.isUpdate) {
|
|
1976
2013
|
this.textareaValue = '';
|
|
1977
2014
|
}
|
|
1978
|
-
|
|
2015
|
+
_12.label = 1;
|
|
1979
2016
|
case 1:
|
|
1980
|
-
|
|
2017
|
+
_12.trys.push([1, 3, , 4]);
|
|
1981
2018
|
return [4 /*yield*/, (this.isUpdate
|
|
1982
2019
|
? this.channelService.updateMessage(Object.assign(Object.assign({}, this.message), { text: text, attachments: attachments }))
|
|
1983
2020
|
: this.channelService.sendMessage(text, attachments, this.mentionedUsers))];
|
|
1984
2021
|
case 2:
|
|
1985
|
-
|
|
2022
|
+
_12.sent();
|
|
1986
2023
|
this.messageUpdate.emit();
|
|
1987
2024
|
if (!this.isUpdate) {
|
|
1988
2025
|
this.attachmentService.resetAttachmentUploads();
|
|
1989
2026
|
}
|
|
1990
2027
|
return [3 /*break*/, 4];
|
|
1991
2028
|
case 3:
|
|
1992
|
-
error_1 =
|
|
2029
|
+
error_1 = _12.sent();
|
|
1993
2030
|
if (this.isUpdate) {
|
|
1994
2031
|
this.notificationService.addTemporaryNotification('streamChat.Edit message request failed');
|
|
1995
2032
|
}
|
|
@@ -2016,11 +2053,16 @@
|
|
|
2016
2053
|
});
|
|
2017
2054
|
MessageInputComponent.prototype.filesSelected = function (fileList) {
|
|
2018
2055
|
return __awaiter(this, void 0, void 0, function () {
|
|
2019
|
-
return __generator(this, function (
|
|
2020
|
-
switch (
|
|
2021
|
-
case 0: return [4 /*yield*/, this.
|
|
2056
|
+
return __generator(this, function (_12) {
|
|
2057
|
+
switch (_12.label) {
|
|
2058
|
+
case 0: return [4 /*yield*/, this.areAttachemntsValid(fileList)];
|
|
2022
2059
|
case 1:
|
|
2023
|
-
|
|
2060
|
+
if (!(_12.sent())) {
|
|
2061
|
+
return [2 /*return*/];
|
|
2062
|
+
}
|
|
2063
|
+
return [4 /*yield*/, this.attachmentService.filesSelected(fileList)];
|
|
2064
|
+
case 2:
|
|
2065
|
+
_12.sent();
|
|
2024
2066
|
this.clearFileInput();
|
|
2025
2067
|
return [2 /*return*/];
|
|
2026
2068
|
}
|
|
@@ -2046,10 +2088,70 @@
|
|
|
2046
2088
|
this.textareaAnchor.viewContainerRef.createComponent(componentFactory);
|
|
2047
2089
|
this.cdRef.detectChanges();
|
|
2048
2090
|
};
|
|
2091
|
+
MessageInputComponent.prototype.areAttachemntsValid = function (fileList) {
|
|
2092
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2093
|
+
var isValid;
|
|
2094
|
+
var _this = this;
|
|
2095
|
+
return __generator(this, function (_12) {
|
|
2096
|
+
switch (_12.label) {
|
|
2097
|
+
case 0:
|
|
2098
|
+
if (!fileList || this.acceptedFileTypes) {
|
|
2099
|
+
return [2 /*return*/, true];
|
|
2100
|
+
}
|
|
2101
|
+
if (!!this.appSettings) return [3 /*break*/, 2];
|
|
2102
|
+
return [4 /*yield*/, this.chatClient.getAppSettings()];
|
|
2103
|
+
case 1:
|
|
2104
|
+
_12.sent();
|
|
2105
|
+
_12.label = 2;
|
|
2106
|
+
case 2:
|
|
2107
|
+
isValid = true;
|
|
2108
|
+
Array.from(fileList).forEach(function (f) {
|
|
2109
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
|
|
2110
|
+
var hasBlockedExtension;
|
|
2111
|
+
var hasBlockedMimeType;
|
|
2112
|
+
var hasNotAllowedExtension;
|
|
2113
|
+
var hasNotAllowedMimeType;
|
|
2114
|
+
if (isImageFile(f)) {
|
|
2115
|
+
hasBlockedExtension =
|
|
2116
|
+
!!((_c = (_b = (_a = _this.appSettings) === null || _a === void 0 ? void 0 : _a.image_upload_config) === null || _b === void 0 ? void 0 : _b.blocked_file_extensions) === null || _c === void 0 ? void 0 : _c.find(function (ext) { return f.name.endsWith(ext); }));
|
|
2117
|
+
hasBlockedMimeType =
|
|
2118
|
+
!!((_f = (_e = (_d = _this.appSettings) === null || _d === void 0 ? void 0 : _d.image_upload_config) === null || _e === void 0 ? void 0 : _e.blocked_mime_types) === null || _f === void 0 ? void 0 : _f.find(function (type) { return f.type === type; }));
|
|
2119
|
+
hasNotAllowedExtension =
|
|
2120
|
+
!!((_j = (_h = (_g = _this.appSettings) === null || _g === void 0 ? void 0 : _g.image_upload_config) === null || _h === void 0 ? void 0 : _h.allowed_file_extensions) === null || _j === void 0 ? void 0 : _j.length) &&
|
|
2121
|
+
!((_m = (_l = (_k = _this.appSettings) === null || _k === void 0 ? void 0 : _k.image_upload_config) === null || _l === void 0 ? void 0 : _l.allowed_file_extensions) === null || _m === void 0 ? void 0 : _m.find(function (ext) { return f.name.endsWith(ext); }));
|
|
2122
|
+
hasNotAllowedMimeType =
|
|
2123
|
+
!!((_q = (_p = (_o = _this.appSettings) === null || _o === void 0 ? void 0 : _o.image_upload_config) === null || _p === void 0 ? void 0 : _p.allowed_mime_types) === null || _q === void 0 ? void 0 : _q.length) &&
|
|
2124
|
+
!((_t = (_s = (_r = _this.appSettings) === null || _r === void 0 ? void 0 : _r.image_upload_config) === null || _s === void 0 ? void 0 : _s.allowed_mime_types) === null || _t === void 0 ? void 0 : _t.find(function (type) { return f.type === type; }));
|
|
2125
|
+
}
|
|
2126
|
+
else {
|
|
2127
|
+
hasBlockedExtension =
|
|
2128
|
+
!!((_w = (_v = (_u = _this.appSettings) === null || _u === void 0 ? void 0 : _u.file_upload_config) === null || _v === void 0 ? void 0 : _v.blocked_file_extensions) === null || _w === void 0 ? void 0 : _w.find(function (ext) { return f.name.endsWith(ext); }));
|
|
2129
|
+
hasBlockedMimeType =
|
|
2130
|
+
!!((_z = (_y = (_x = _this.appSettings) === null || _x === void 0 ? void 0 : _x.file_upload_config) === null || _y === void 0 ? void 0 : _y.blocked_mime_types) === null || _z === void 0 ? void 0 : _z.find(function (type) { return f.type === type; }));
|
|
2131
|
+
hasNotAllowedExtension =
|
|
2132
|
+
!!((_2 = (_1 = (_0 = _this.appSettings) === null || _0 === void 0 ? void 0 : _0.file_upload_config) === null || _1 === void 0 ? void 0 : _1.allowed_file_extensions) === null || _2 === void 0 ? void 0 : _2.length) &&
|
|
2133
|
+
!((_5 = (_4 = (_3 = _this.appSettings) === null || _3 === void 0 ? void 0 : _3.file_upload_config) === null || _4 === void 0 ? void 0 : _4.allowed_file_extensions) === null || _5 === void 0 ? void 0 : _5.find(function (ext) { return f.name.endsWith(ext); }));
|
|
2134
|
+
hasNotAllowedMimeType =
|
|
2135
|
+
!!((_8 = (_7 = (_6 = _this.appSettings) === null || _6 === void 0 ? void 0 : _6.file_upload_config) === null || _7 === void 0 ? void 0 : _7.allowed_mime_types) === null || _8 === void 0 ? void 0 : _8.length) &&
|
|
2136
|
+
!((_11 = (_10 = (_9 = _this.appSettings) === null || _9 === void 0 ? void 0 : _9.file_upload_config) === null || _10 === void 0 ? void 0 : _10.allowed_mime_types) === null || _11 === void 0 ? void 0 : _11.find(function (type) { return f.type === type; }));
|
|
2137
|
+
}
|
|
2138
|
+
if (hasBlockedExtension ||
|
|
2139
|
+
hasBlockedMimeType ||
|
|
2140
|
+
hasNotAllowedExtension ||
|
|
2141
|
+
hasNotAllowedMimeType) {
|
|
2142
|
+
_this.notificationService.addTemporaryNotification('streamChat.Unsupported file type: {{type}}', undefined, undefined, { type: f.type });
|
|
2143
|
+
isValid = false;
|
|
2144
|
+
}
|
|
2145
|
+
});
|
|
2146
|
+
return [2 /*return*/, isValid];
|
|
2147
|
+
}
|
|
2148
|
+
});
|
|
2149
|
+
});
|
|
2150
|
+
};
|
|
2049
2151
|
return MessageInputComponent;
|
|
2050
2152
|
}());
|
|
2051
|
-
MessageInputComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageInputComponent, deps: [{ token: ChannelService }, { token: NotificationService }, { token: AttachmentService }, { token: MessageInputConfigService }, { token: textareaInjectionToken }, { token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2052
|
-
MessageInputComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: MessageInputComponent, selector: "stream-message-input", inputs: { isFileUploadEnabled: "isFileUploadEnabled", areMentionsEnabled: "areMentionsEnabled", mentionScope: "mentionScope", mentionAutocompleteItemTemplate: "mentionAutocompleteItemTemplate", acceptedFileTypes: "acceptedFileTypes", isMultipleFileUploadEnabled: "isMultipleFileUploadEnabled", message: "message" }, outputs: { messageUpdate: "messageUpdate" }, providers: [AttachmentService], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }, { propertyName: "textareaAnchor", first: true, predicate: TextareaDirective, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"str-chat__input-flat\"\n [class.str-chat__input-flat-has-attachments]=\"\n (attachmentUploads$ | async)!.length > 0\n \"\n>\n <div class=\"str-chat__input-flat-wrapper\">\n <div class=\"str-chat__input-flat--textarea-wrapper\">\n <stream-attachment-preview-list\n class=\"rfu-image-previewer-angular-host\"\n ></stream-attachment-preview-list>\n <div class=\"rta str-chat__textarea\">\n <ng-template\n *ngIf=\"canSendMessages; else notAllowed\"\n streamTextarea\n [(value)]=\"textareaValue\"\n (send)=\"messageSent()\"\n [componentRef]=\"textareaRef\"\n (userMentions)=\"mentionedUsers = $event\"\n [areMentionsEnabled]=\"areMentionsEnabled\"\n [mentionAutocompleteItemTemplate]=\"mentionAutocompleteItemTemplate\"\n [mentionScope]=\"mentionScope\"\n ></ng-template>\n <ng-template #notAllowed>\n <textarea\n disabled\n rows=\"1\"\n [value]=\"\n 'streamChat.You can\\'t send messages in this channel' | translate\n \"\n class=\"rta__textarea str-chat__textarea__textarea\"\n ></textarea>\n </ng-template>\n </div>\n <div\n *ngIf=\"isFileUploadEnabled && isFileUploadAuthorized && canSendMessages\"\n class=\"str-chat__fileupload-wrapper\"\n data-testid=\"file-upload-button\"\n >\n <div class=\"str-chat__tooltip\">\n {{ \"streamChat.Attach files\" | translate }}\n </div>\n <div class=\"rfu-file-upload-button\">\n <label>\n <input\n #fileInput\n type=\"file\"\n class=\"rfu-file-input\"\n data-testid=\"file-input\"\n [accept]=\"accept\"\n [multiple]=\"isMultipleFileUploadEnabled\"\n (change)=\"filesSelected(fileInput.files)\"\n />\n <span class=\"str-chat__input-flat-fileupload\">\n <stream-icon icon=\"file-upload\"></stream-icon>\n </span>\n </label>\n </div>\n </div>\n </div>\n <button\n *ngIf=\"canSendMessages\"\n data-testid=\"send-button\"\n class=\"str-chat__send-button\"\n (click)=\"messageSent()\"\n (keyup.enter)=\"messageSent()\"\n >\n <stream-icon icon=\"send\"></stream-icon>\n </button>\n </div>\n</div>\n", components: [{ type: AttachmentPreviewListComponent, selector: "stream-attachment-preview-list" }, { type: IconComponent, selector: "stream-icon", inputs: ["icon", "size"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: TextareaDirective, selector: "[streamTextarea]", inputs: ["componentRef", "areMentionsEnabled", "mentionAutocompleteItemTemplate", "mentionScope", "value"], outputs: ["valueChange", "send", "userMentions"] }], pipes: { "async": i3__namespace.AsyncPipe, "translate":
|
|
2153
|
+
MessageInputComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageInputComponent, deps: [{ token: ChannelService }, { token: NotificationService }, { token: AttachmentService }, { token: MessageInputConfigService }, { token: textareaInjectionToken }, { token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ChangeDetectorRef }, { token: ChatClientService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2154
|
+
MessageInputComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: MessageInputComponent, selector: "stream-message-input", inputs: { isFileUploadEnabled: "isFileUploadEnabled", areMentionsEnabled: "areMentionsEnabled", mentionScope: "mentionScope", mentionAutocompleteItemTemplate: "mentionAutocompleteItemTemplate", acceptedFileTypes: "acceptedFileTypes", isMultipleFileUploadEnabled: "isMultipleFileUploadEnabled", message: "message" }, outputs: { messageUpdate: "messageUpdate" }, providers: [AttachmentService], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }, { propertyName: "textareaAnchor", first: true, predicate: TextareaDirective, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n class=\"str-chat__input-flat\"\n [class.str-chat__input-flat-has-attachments]=\"\n (attachmentUploads$ | async)!.length > 0\n \"\n>\n <div class=\"str-chat__input-flat-wrapper\">\n <div class=\"str-chat__input-flat--textarea-wrapper\">\n <stream-attachment-preview-list\n class=\"rfu-image-previewer-angular-host\"\n ></stream-attachment-preview-list>\n <div class=\"rta str-chat__textarea\">\n <ng-template\n *ngIf=\"canSendMessages; else notAllowed\"\n streamTextarea\n [(value)]=\"textareaValue\"\n (send)=\"messageSent()\"\n [componentRef]=\"textareaRef\"\n (userMentions)=\"mentionedUsers = $event\"\n [areMentionsEnabled]=\"areMentionsEnabled\"\n [mentionAutocompleteItemTemplate]=\"mentionAutocompleteItemTemplate\"\n [mentionScope]=\"mentionScope\"\n ></ng-template>\n <ng-template #notAllowed>\n <textarea\n disabled\n rows=\"1\"\n [value]=\"\n 'streamChat.You can\\'t send messages in this channel' | translate\n \"\n class=\"rta__textarea str-chat__textarea__textarea\"\n ></textarea>\n </ng-template>\n </div>\n <div\n *ngIf=\"isFileUploadEnabled && isFileUploadAuthorized && canSendMessages\"\n class=\"str-chat__fileupload-wrapper\"\n data-testid=\"file-upload-button\"\n >\n <div class=\"str-chat__tooltip\">\n {{ \"streamChat.Attach files\" | translate }}\n </div>\n <div class=\"rfu-file-upload-button\">\n <label>\n <input\n #fileInput\n type=\"file\"\n class=\"rfu-file-input\"\n data-testid=\"file-input\"\n [accept]=\"accept\"\n [multiple]=\"isMultipleFileUploadEnabled\"\n (change)=\"filesSelected(fileInput.files)\"\n />\n <span class=\"str-chat__input-flat-fileupload\">\n <stream-icon icon=\"file-upload\"></stream-icon>\n </span>\n </label>\n </div>\n </div>\n </div>\n <button\n *ngIf=\"canSendMessages\"\n data-testid=\"send-button\"\n class=\"str-chat__send-button\"\n (click)=\"messageSent()\"\n (keyup.enter)=\"messageSent()\"\n >\n <stream-icon icon=\"send\"></stream-icon>\n </button>\n </div>\n</div>\n", components: [{ type: AttachmentPreviewListComponent, selector: "stream-attachment-preview-list" }, { type: IconComponent, selector: "stream-icon", inputs: ["icon", "size"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: TextareaDirective, selector: "[streamTextarea]", inputs: ["componentRef", "areMentionsEnabled", "mentionAutocompleteItemTemplate", "mentionScope", "value"], outputs: ["valueChange", "send", "userMentions"] }], pipes: { "async": i3__namespace.AsyncPipe, "translate": i10__namespace.TranslatePipe } });
|
|
2053
2155
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageInputComponent, decorators: [{
|
|
2054
2156
|
type: i0.Component,
|
|
2055
2157
|
args: [{
|
|
@@ -2062,7 +2164,7 @@
|
|
|
2062
2164
|
return [{ type: ChannelService }, { type: NotificationService }, { type: AttachmentService }, { type: MessageInputConfigService }, { type: i0__namespace.Type, decorators: [{
|
|
2063
2165
|
type: i0.Inject,
|
|
2064
2166
|
args: [textareaInjectionToken]
|
|
2065
|
-
}] }, { type: i0__namespace.ComponentFactoryResolver }, { type: i0__namespace.ChangeDetectorRef }];
|
|
2167
|
+
}] }, { type: i0__namespace.ComponentFactoryResolver }, { type: i0__namespace.ChangeDetectorRef }, { type: ChatClientService }];
|
|
2066
2168
|
}, propDecorators: { isFileUploadEnabled: [{
|
|
2067
2169
|
type: i0.Input
|
|
2068
2170
|
}], areMentionsEnabled: [{
|
|
@@ -2132,7 +2234,7 @@
|
|
|
2132
2234
|
return ModalComponent;
|
|
2133
2235
|
}());
|
|
2134
2236
|
ModalComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ModalComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2135
|
-
ModalComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: ModalComponent, selector: "stream-modal", inputs: { isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n data-testid=\"modal\"\n class=\"str-chat__modal str-chat__modal--{{ isOpen ? 'open' : 'close' }}\"\n>\n <div\n data-testid=\"close\"\n class=\"str-chat__modal__close-button\"\n (click)=\"close()\"\n (keyup.enter)=\"close()\"\n translate\n >\n streamChat.Close\n <stream-icon icon=\"close\"></stream-icon>\n </div>\n <div class=\"str-chat__modal__inner\" #content>\n <ng-content></ng-content>\n </div>\n</div>\n", components: [{ type: IconComponent, selector: "stream-icon", inputs: ["icon", "size"] }], directives: [{ type:
|
|
2237
|
+
ModalComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: ModalComponent, selector: "stream-modal", inputs: { isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n data-testid=\"modal\"\n class=\"str-chat__modal str-chat__modal--{{ isOpen ? 'open' : 'close' }}\"\n>\n <div\n data-testid=\"close\"\n class=\"str-chat__modal__close-button\"\n (click)=\"close()\"\n (keyup.enter)=\"close()\"\n translate\n >\n streamChat.Close\n <stream-icon icon=\"close\"></stream-icon>\n </div>\n <div class=\"str-chat__modal__inner\" #content>\n <ng-content></ng-content>\n </div>\n</div>\n", components: [{ type: IconComponent, selector: "stream-icon", inputs: ["icon", "size"] }], directives: [{ type: i10__namespace.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }] });
|
|
2136
2238
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ModalComponent, decorators: [{
|
|
2137
2239
|
type: i0.Component,
|
|
2138
2240
|
args: [{
|
|
@@ -2178,7 +2280,7 @@
|
|
|
2178
2280
|
return NotificationListComponent;
|
|
2179
2281
|
}());
|
|
2180
2282
|
NotificationListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: NotificationListComponent, deps: [{ token: NotificationService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2181
|
-
NotificationListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: NotificationListComponent, selector: "stream-notification-list", ngImport: i0__namespace, template: "<div class=\"str-chat__list-notifications\">\n <stream-notification\n *ngFor=\"let notification of notifications$ | async; trackBy: trackByItem\"\n [type]=\"notification.type\"\n ><div data-testclass=\"notification-content\"
|
|
2283
|
+
NotificationListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: NotificationListComponent, selector: "stream-notification-list", ngImport: i0__namespace, template: "<div class=\"str-chat__list-notifications\">\n <stream-notification\n *ngFor=\"let notification of notifications$ | async; trackBy: trackByItem\"\n [type]=\"notification.type\"\n ><div data-testclass=\"notification-content\">\n {{ notification.text | translate: notification.translateParams }}\n </div></stream-notification\n >\n</div>\n", components: [{ type: NotificationComponent, selector: "stream-notification", inputs: ["type"] }], directives: [{ type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i3__namespace.AsyncPipe, "translate": i10__namespace.TranslatePipe } });
|
|
2182
2284
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: NotificationListComponent, decorators: [{
|
|
2183
2285
|
type: i0.Component,
|
|
2184
2286
|
args: [{
|
|
@@ -2334,7 +2436,7 @@
|
|
|
2334
2436
|
return MessageActionsBoxComponent;
|
|
2335
2437
|
}());
|
|
2336
2438
|
MessageActionsBoxComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageActionsBoxComponent, deps: [{ token: ChatClientService }, { token: NotificationService }, { token: ChannelService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2337
|
-
MessageActionsBoxComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: MessageActionsBoxComponent, selector: "stream-message-actions-box", inputs: { messageInputTemplate: "messageInputTemplate", isOpen: "isOpen", isMine: "isMine", message: "message", enabledActions: "enabledActions" }, outputs: { displayedActionsCount: "displayedActionsCount", isEditing: "isEditing" }, viewQueries: [{ propertyName: "messageInput", first: true, predicate: MessageInputComponent, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n data-testid=\"action-box\"\n class=\"str-chat__message-actions-box\"\n [class.str-chat__message-actions-box--open]=\"isOpen\"\n [class.str-chat__message-actions-box--mine]=\"isMine\"\n>\n <ul class=\"str-chat__message-actions-list\">\n <button\n data-testid=\"quote-action\"\n *ngIf=\"isQuoteVisible\"\n (click)=\"quoteClicked()\"\n >\n <li class=\"str-chat__message-actions-list-item\">\n {{ \"streamChat.Reply\" | translate }}\n </li>\n </button>\n <button\n data-testid=\"pin-action\"\n *ngIf=\"isPinVisible\"\n (click)=\"pinClicked()\"\n >\n <li class=\"str-chat__message-actions-list-item\">\n {{\n (message?.pinned ? \"streamChat.Unpin\" : \"streamChat.Pin\") | translate\n }}\n </li>\n </button>\n <button\n data-testid=\"flag-action\"\n *ngIf=\"isFlagVisible\"\n (click)=\"flagClicked()\"\n >\n <li class=\"str-chat__message-actions-list-item\">\n {{ \"streamChat.Flag\" | translate }}\n </li>\n </button>\n <button\n data-testid=\"mute-action\"\n *ngIf=\"isMuteVisible\"\n (click)=\"muteClicked()\"\n >\n <li class=\"str-chat__message-actions-list-item\">\n {{ \"streamChat.Mute\" | translate }}\n </li>\n </button>\n <button\n data-testid=\"edit-action\"\n *ngIf=\"isEditVisible\"\n (click)=\"editClicked()\"\n >\n <li class=\"str-chat__message-actions-list-item\">\n {{ \"streamChat.Edit Message\" | translate }}\n </li>\n </button>\n <button\n data-testid=\"delete-action\"\n *ngIf=\"isDeleteVisible\"\n (click)=\"deleteClicked()\"\n >\n <li class=\"str-chat__message-actions-list-item\">\n {{ \"streamChat.Delete\" | translate }}\n </li>\n </button>\n </ul>\n</div>\n\n<stream-modal\n [isOpen]=\"isEditModalOpen\"\n (isOpenChange)=\"\n isEditModalOpen = $event; isEditModalOpen ? '' : modalClosed()\n \"\n>\n <div class=\"str-chat__edit-message-form\" *ngIf=\"isEditModalOpen\">\n <ng-container *ngIf=\"messageInputTemplate; else defaultInput\">\n <ng-container\n *ngTemplateOutlet=\"\n messageInputTemplate;\n context: {\n message: message,\n messageUpdateHandler: modalClosed\n }\n \"\n ></ng-container>\n </ng-container>\n <ng-template #defaultInput>\n <stream-message-input\n [message]=\"message\"\n (messageUpdate)=\"modalClosed()\"\n ></stream-message-input>\n </ng-template>\n <stream-notification-list></stream-notification-list>\n <div class=\"str-chat__message-team-form-footer\">\n <div></div>\n <div>\n <button translate data-testid=\"cancel-button\" (click)=\"modalClosed()\">\n streamChat.Cancel\n </button>\n <button\n type=\"submit\"\n translate\n data-testid=\"send-button\"\n (click)=\"sendClicked()\"\n (keyup.enter)=\"sendClicked()\"\n >\n streamChat.Send\n </button>\n </div>\n </div>\n </div>\n</stream-modal>\n", components: [{ type: ModalComponent, selector: "stream-modal", inputs: ["isOpen"], outputs: ["isOpenChange"] }, { type: MessageInputComponent, selector: "stream-message-input", inputs: ["isFileUploadEnabled", "areMentionsEnabled", "mentionScope", "mentionAutocompleteItemTemplate", "acceptedFileTypes", "isMultipleFileUploadEnabled", "message"], outputs: ["messageUpdate"] }, { type: NotificationListComponent, selector: "stream-notification-list" }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type:
|
|
2439
|
+
MessageActionsBoxComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: MessageActionsBoxComponent, selector: "stream-message-actions-box", inputs: { messageInputTemplate: "messageInputTemplate", isOpen: "isOpen", isMine: "isMine", message: "message", enabledActions: "enabledActions" }, outputs: { displayedActionsCount: "displayedActionsCount", isEditing: "isEditing" }, viewQueries: [{ propertyName: "messageInput", first: true, predicate: MessageInputComponent, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n data-testid=\"action-box\"\n class=\"str-chat__message-actions-box\"\n [class.str-chat__message-actions-box--open]=\"isOpen\"\n [class.str-chat__message-actions-box--mine]=\"isMine\"\n>\n <ul class=\"str-chat__message-actions-list\">\n <button\n data-testid=\"quote-action\"\n *ngIf=\"isQuoteVisible\"\n (click)=\"quoteClicked()\"\n >\n <li class=\"str-chat__message-actions-list-item\">\n {{ \"streamChat.Reply\" | translate }}\n </li>\n </button>\n <button\n data-testid=\"pin-action\"\n *ngIf=\"isPinVisible\"\n (click)=\"pinClicked()\"\n >\n <li class=\"str-chat__message-actions-list-item\">\n {{\n (message?.pinned ? \"streamChat.Unpin\" : \"streamChat.Pin\") | translate\n }}\n </li>\n </button>\n <button\n data-testid=\"flag-action\"\n *ngIf=\"isFlagVisible\"\n (click)=\"flagClicked()\"\n >\n <li class=\"str-chat__message-actions-list-item\">\n {{ \"streamChat.Flag\" | translate }}\n </li>\n </button>\n <button\n data-testid=\"mute-action\"\n *ngIf=\"isMuteVisible\"\n (click)=\"muteClicked()\"\n >\n <li class=\"str-chat__message-actions-list-item\">\n {{ \"streamChat.Mute\" | translate }}\n </li>\n </button>\n <button\n data-testid=\"edit-action\"\n *ngIf=\"isEditVisible\"\n (click)=\"editClicked()\"\n >\n <li class=\"str-chat__message-actions-list-item\">\n {{ \"streamChat.Edit Message\" | translate }}\n </li>\n </button>\n <button\n data-testid=\"delete-action\"\n *ngIf=\"isDeleteVisible\"\n (click)=\"deleteClicked()\"\n >\n <li class=\"str-chat__message-actions-list-item\">\n {{ \"streamChat.Delete\" | translate }}\n </li>\n </button>\n </ul>\n</div>\n\n<stream-modal\n [isOpen]=\"isEditModalOpen\"\n (isOpenChange)=\"\n isEditModalOpen = $event; isEditModalOpen ? '' : modalClosed()\n \"\n>\n <div class=\"str-chat__edit-message-form\" *ngIf=\"isEditModalOpen\">\n <ng-container *ngIf=\"messageInputTemplate; else defaultInput\">\n <ng-container\n *ngTemplateOutlet=\"\n messageInputTemplate;\n context: {\n message: message,\n messageUpdateHandler: modalClosed\n }\n \"\n ></ng-container>\n </ng-container>\n <ng-template #defaultInput>\n <stream-message-input\n [message]=\"message\"\n (messageUpdate)=\"modalClosed()\"\n ></stream-message-input>\n </ng-template>\n <stream-notification-list></stream-notification-list>\n <div class=\"str-chat__message-team-form-footer\">\n <div></div>\n <div>\n <button translate data-testid=\"cancel-button\" (click)=\"modalClosed()\">\n streamChat.Cancel\n </button>\n <button\n type=\"submit\"\n translate\n data-testid=\"send-button\"\n (click)=\"sendClicked()\"\n (keyup.enter)=\"sendClicked()\"\n >\n streamChat.Send\n </button>\n </div>\n </div>\n </div>\n</stream-modal>\n", components: [{ type: ModalComponent, selector: "stream-modal", inputs: ["isOpen"], outputs: ["isOpenChange"] }, { type: MessageInputComponent, selector: "stream-message-input", inputs: ["isFileUploadEnabled", "areMentionsEnabled", "mentionScope", "mentionAutocompleteItemTemplate", "acceptedFileTypes", "isMultipleFileUploadEnabled", "message"], outputs: ["messageUpdate"] }, { type: NotificationListComponent, selector: "stream-notification-list" }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i10__namespace.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], pipes: { "translate": i10__namespace.TranslatePipe } });
|
|
2338
2440
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageActionsBoxComponent, decorators: [{
|
|
2339
2441
|
type: i0.Component,
|
|
2340
2442
|
args: [{
|
|
@@ -2484,7 +2586,7 @@
|
|
|
2484
2586
|
return ChannelHeaderComponent;
|
|
2485
2587
|
}());
|
|
2486
2588
|
ChannelHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChannelHeaderComponent, deps: [{ token: ChannelService }, { token: ChannelListToggleService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2487
|
-
ChannelHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: ChannelHeaderComponent, selector: "stream-channel-header", ngImport: i0__namespace, template: "<div class=\"str-chat__header-livestream\">\n <div\n class=\"str-chat__header-hamburger\"\n (click)=\"toggleMenu($event)\"\n (keyup.enter)=\"toggleMenu($event)\"\n >\n <span class=\"str-chat__header-hamburger--line\"></span>\n <span class=\"str-chat__header-hamburger--line\"></span>\n <span class=\"str-chat__header-hamburger--line\"></span>\n </div>\n <stream-avatar\n imageUrl=\"{{ activeChannel?.data?.image }}\"\n name=\"{{ activeChannel?.data?.name }}\"\n ></stream-avatar>\n <div class=\"str-chat__header-livestream-left\">\n <p data-testid=\"name\" class=\"str-chat__header-livestream-left--title\">\n {{ activeChannel?.data?.name }}\n </p>\n <p data-testid=\"info\" class=\"str-chat__header-livestream-left--members\">\n {{'streamChat.{{ memberCount }} members' | translate:memberCountParam}}\n {{canReceiveConnectEvents ? ('streamChat.{{ watcherCount }} online' |\n translate:watcherCountParam) : ''}}\n </p>\n </div>\n</div>\n", components: [{ type: AvatarComponent, selector: "stream-avatar", inputs: ["name", "imageUrl", "size"] }], pipes: { "translate":
|
|
2589
|
+
ChannelHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: ChannelHeaderComponent, selector: "stream-channel-header", ngImport: i0__namespace, template: "<div class=\"str-chat__header-livestream\">\n <div\n class=\"str-chat__header-hamburger\"\n (click)=\"toggleMenu($event)\"\n (keyup.enter)=\"toggleMenu($event)\"\n >\n <span class=\"str-chat__header-hamburger--line\"></span>\n <span class=\"str-chat__header-hamburger--line\"></span>\n <span class=\"str-chat__header-hamburger--line\"></span>\n </div>\n <stream-avatar\n imageUrl=\"{{ activeChannel?.data?.image }}\"\n name=\"{{ activeChannel?.data?.name }}\"\n ></stream-avatar>\n <div class=\"str-chat__header-livestream-left\">\n <p data-testid=\"name\" class=\"str-chat__header-livestream-left--title\">\n {{ activeChannel?.data?.name }}\n </p>\n <p data-testid=\"info\" class=\"str-chat__header-livestream-left--members\">\n {{'streamChat.{{ memberCount }} members' | translate:memberCountParam}}\n {{canReceiveConnectEvents ? ('streamChat.{{ watcherCount }} online' |\n translate:watcherCountParam) : ''}}\n </p>\n </div>\n</div>\n", components: [{ type: AvatarComponent, selector: "stream-avatar", inputs: ["name", "imageUrl", "size"] }], pipes: { "translate": i10__namespace.TranslatePipe } });
|
|
2488
2590
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChannelHeaderComponent, decorators: [{
|
|
2489
2591
|
type: i0.Component,
|
|
2490
2592
|
args: [{
|
|
@@ -2495,8 +2597,9 @@
|
|
|
2495
2597
|
}], ctorParameters: function () { return [{ type: ChannelService }, { type: ChannelListToggleService }]; } });
|
|
2496
2598
|
|
|
2497
2599
|
var ChannelPreviewComponent = /** @class */ (function () {
|
|
2498
|
-
function ChannelPreviewComponent(channelService) {
|
|
2600
|
+
function ChannelPreviewComponent(channelService, ngZone) {
|
|
2499
2601
|
this.channelService = channelService;
|
|
2602
|
+
this.ngZone = ngZone;
|
|
2500
2603
|
this.isActive = false;
|
|
2501
2604
|
this.isUnread = false;
|
|
2502
2605
|
this.latestMessage = 'Nothing yet...';
|
|
@@ -2518,8 +2621,10 @@
|
|
|
2518
2621
|
this.subscriptions.push(this.channel.on('message.updated', this.handleMessageEvent.bind(this)));
|
|
2519
2622
|
this.subscriptions.push(this.channel.on('message.deleted', this.handleMessageEvent.bind(this)));
|
|
2520
2623
|
this.subscriptions.push(this.channel.on('channel.truncated', this.handleMessageEvent.bind(this)));
|
|
2521
|
-
this.subscriptions.push(this.channel.on('message.read', function () { return
|
|
2522
|
-
|
|
2624
|
+
this.subscriptions.push(this.channel.on('message.read', function () { return _this.ngZone.run(function () {
|
|
2625
|
+
_this.isUnread =
|
|
2626
|
+
!!_this.channel.countUnread() && _this.canSendReadEvents;
|
|
2627
|
+
}); }));
|
|
2523
2628
|
};
|
|
2524
2629
|
ChannelPreviewComponent.prototype.ngOnDestroy = function () {
|
|
2525
2630
|
this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
|
|
@@ -2552,17 +2657,20 @@
|
|
|
2552
2657
|
void this.channelService.setAsActiveChannel(this.channel);
|
|
2553
2658
|
};
|
|
2554
2659
|
ChannelPreviewComponent.prototype.handleMessageEvent = function (event) {
|
|
2555
|
-
var
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2660
|
+
var _this = this;
|
|
2661
|
+
this.ngZone.run(function () {
|
|
2662
|
+
var _a, _b, _c;
|
|
2663
|
+
if (((_a = _this.channel) === null || _a === void 0 ? void 0 : _a.state.messages.length) === 0) {
|
|
2664
|
+
_this.latestMessage = 'Nothing yet...';
|
|
2665
|
+
return;
|
|
2666
|
+
}
|
|
2667
|
+
if (!event.message ||
|
|
2668
|
+
((_b = _this.channel) === null || _b === void 0 ? void 0 : _b.state.messages[((_c = _this.channel) === null || _c === void 0 ? void 0 : _c.state.messages.length) - 1].id) !== event.message.id) {
|
|
2669
|
+
return;
|
|
2670
|
+
}
|
|
2671
|
+
_this.setLatestMessage(event.message);
|
|
2672
|
+
_this.isUnread = !!_this.channel.countUnread() && _this.canSendReadEvents;
|
|
2673
|
+
});
|
|
2566
2674
|
};
|
|
2567
2675
|
ChannelPreviewComponent.prototype.setLatestMessage = function (message) {
|
|
2568
2676
|
if (message === null || message === void 0 ? void 0 : message.deleted_at) {
|
|
@@ -2577,8 +2685,8 @@
|
|
|
2577
2685
|
};
|
|
2578
2686
|
return ChannelPreviewComponent;
|
|
2579
2687
|
}());
|
|
2580
|
-
ChannelPreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChannelPreviewComponent, deps: [{ token: ChannelService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2581
|
-
ChannelPreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: ChannelPreviewComponent, selector: "stream-channel-preview", inputs: { channel: "channel" }, ngImport: i0__namespace, template: "<button\n class=\"str-chat__channel-preview-messenger\"\n [class.str-chat__channel-preview-messenger--active]=\"isActive\"\n [class.str-chat__channel-preview-messenger--unread]=\"isUnread\"\n (click)=\"setAsActiveChannel()\"\n data-testid=\"channel-preview-container\"\n>\n <div class=\"str-chat__channel-preview-messenger--left\">\n <stream-avatar\n imageUrl=\"{{ avatarImage }}\"\n name=\"{{ avatarName }}\"\n [size]=\"40\"\n ></stream-avatar>\n </div>\n <div class=\"str-chat__channel-preview-messenger--right\">\n <div class=\"str-chat__channel-preview-messenger--name\">\n <span data-testid=\"channel-preview-title\">{{ title }}</span>\n </div>\n <div\n data-testid=\"latest-message\"\n class=\"str-chat__channel-preview-messenger--last-message\"\n >\n {{ latestMessage | translate }}\n </div>\n </div>\n</button>\n", components: [{ type: AvatarComponent, selector: "stream-avatar", inputs: ["name", "imageUrl", "size"] }], pipes: { "translate":
|
|
2688
|
+
ChannelPreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChannelPreviewComponent, deps: [{ token: ChannelService }, { token: i0__namespace.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2689
|
+
ChannelPreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: ChannelPreviewComponent, selector: "stream-channel-preview", inputs: { channel: "channel" }, ngImport: i0__namespace, template: "<button\n class=\"str-chat__channel-preview-messenger\"\n [class.str-chat__channel-preview-messenger--active]=\"isActive\"\n [class.str-chat__channel-preview-messenger--unread]=\"isUnread\"\n (click)=\"setAsActiveChannel()\"\n data-testid=\"channel-preview-container\"\n>\n <div class=\"str-chat__channel-preview-messenger--left\">\n <stream-avatar\n imageUrl=\"{{ avatarImage }}\"\n name=\"{{ avatarName }}\"\n [size]=\"40\"\n ></stream-avatar>\n </div>\n <div class=\"str-chat__channel-preview-messenger--right\">\n <div class=\"str-chat__channel-preview-messenger--name\">\n <span data-testid=\"channel-preview-title\">{{ title }}</span>\n </div>\n <div\n data-testid=\"latest-message\"\n class=\"str-chat__channel-preview-messenger--last-message\"\n >\n {{ latestMessage | translate }}\n </div>\n </div>\n</button>\n", components: [{ type: AvatarComponent, selector: "stream-avatar", inputs: ["name", "imageUrl", "size"] }], pipes: { "translate": i10__namespace.TranslatePipe } });
|
|
2582
2690
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChannelPreviewComponent, decorators: [{
|
|
2583
2691
|
type: i0.Component,
|
|
2584
2692
|
args: [{
|
|
@@ -2586,7 +2694,7 @@
|
|
|
2586
2694
|
templateUrl: './channel-preview.component.html',
|
|
2587
2695
|
styles: [],
|
|
2588
2696
|
}]
|
|
2589
|
-
}], ctorParameters: function () { return [{ type: ChannelService }]; }, propDecorators: { channel: [{
|
|
2697
|
+
}], ctorParameters: function () { return [{ type: ChannelService }, { type: i0__namespace.NgZone }]; }, propDecorators: { channel: [{
|
|
2590
2698
|
type: i0.Input
|
|
2591
2699
|
}] } });
|
|
2592
2700
|
|
|
@@ -2628,7 +2736,7 @@
|
|
|
2628
2736
|
return ChannelListComponent;
|
|
2629
2737
|
}());
|
|
2630
2738
|
ChannelListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChannelListComponent, deps: [{ token: ChannelService }, { token: ChannelListToggleService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2631
|
-
ChannelListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: ChannelListComponent, selector: "stream-channel-list", inputs: { customChannelPreviewTemplate: "customChannelPreviewTemplate" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], ngImport: i0__namespace, template: "<div\n #container\n data-testid=\"channel-list-container\"\n class=\"str-chat str-chat-channel-list messaging\"\n [class.str-chat-channel-list--open]=\"(isOpen$ | async) === true\"\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 <p\n data-testid=\"empty-channel-list-indicator\"\n *ngIf=\"!(channels$ | async)?.length\"\n >\n {{ \"streamChat.You have no channels currently\" | translate }}\n </p>\n <ng-container\n *ngFor=\"let channel of channels$ | async; trackBy: trackByChannelId\"\n >\n <ng-container\n *ngIf=\"customChannelPreviewTemplate; else defaultTemplate\"\n >\n <div (click)=\"channelSelected()\" (keyup.enter)=\"channelSelected()\">\n <ng-container\n *ngTemplateOutlet=\"\n customChannelPreviewTemplate;\n context: { channel: channel }\n \"\n ></ng-container>\n </div>\n </ng-container>\n <ng-template #defaultTemplate>\n <stream-channel-preview\n data-testclass=\"channel-preview\"\n [channel]=\"channel\"\n (click)=\"channelSelected()\"\n (keyup.enter)=\"channelSelected()\"\n ></stream-channel-preview>\n </ng-template>\n </ng-container>\n <div\n *ngIf=\"hasMoreChannels$ | async\"\n class=\"str-chat__load-more-button\"\n (click)=\"loadMoreChannels()\"\n (keyup.enter)=\"loadMoreChannels()\"\n data-testid=\"load-more\"\n >\n <button\n class=\"str-chat__load-more-button__button\"\n data-testid=\"load-more-button\"\n [disabled]=\"isLoadingMoreChannels\"\n >\n <span *ngIf=\"!isLoadingMoreChannels; else loadingIndicator\">{{\n \"Load more\" | translate\n }}</span>\n <ng-template #loadingIndicator\n ><stream-loading-indicator></stream-loading-indicator\n ></ng-template>\n </button>\n </div>\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 class=\"str-chat__down-main\">\n <stream-icon icon=\"connection-error\"></stream-icon>\n <h1>{{ \"streamChat.Connection error\" | translate }}</h1>\n <h3>\n {{\n \"streamChat.Error connecting to chat, refresh the page to try again.\"\n | translate\n }}\n </h3>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingChannels>\n <div data-testid=\"loading-indicator\" class=\"str-chat__loading-channels\">\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 class=\"str-chat__loading-channels-item\">\n <div class=\"str-chat__loading-channels-avatar\"></div>\n <div class=\"str-chat__loading-channels-meta\">\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", components: [{ type: ChannelPreviewComponent, selector: "stream-channel-preview", inputs: ["channel"] }, { type: LoadingIndicatorComponent, selector: "stream-loading-indicator", inputs: ["size", "color"] }, { type: IconComponent, selector: "stream-icon", inputs: ["icon", "size"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i3__namespace.AsyncPipe, "translate":
|
|
2739
|
+
ChannelListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: ChannelListComponent, selector: "stream-channel-list", inputs: { customChannelPreviewTemplate: "customChannelPreviewTemplate" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], ngImport: i0__namespace, template: "<div\n #container\n data-testid=\"channel-list-container\"\n class=\"str-chat str-chat-channel-list messaging\"\n [class.str-chat-channel-list--open]=\"(isOpen$ | async) === true\"\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 <p\n data-testid=\"empty-channel-list-indicator\"\n *ngIf=\"!(channels$ | async)?.length\"\n >\n {{ \"streamChat.You have no channels currently\" | translate }}\n </p>\n <ng-container\n *ngFor=\"let channel of channels$ | async; trackBy: trackByChannelId\"\n >\n <ng-container\n *ngIf=\"customChannelPreviewTemplate; else defaultTemplate\"\n >\n <div (click)=\"channelSelected()\" (keyup.enter)=\"channelSelected()\">\n <ng-container\n *ngTemplateOutlet=\"\n customChannelPreviewTemplate;\n context: { channel: channel }\n \"\n ></ng-container>\n </div>\n </ng-container>\n <ng-template #defaultTemplate>\n <stream-channel-preview\n data-testclass=\"channel-preview\"\n [channel]=\"channel\"\n (click)=\"channelSelected()\"\n (keyup.enter)=\"channelSelected()\"\n ></stream-channel-preview>\n </ng-template>\n </ng-container>\n <div\n *ngIf=\"hasMoreChannels$ | async\"\n class=\"str-chat__load-more-button\"\n (click)=\"loadMoreChannels()\"\n (keyup.enter)=\"loadMoreChannels()\"\n data-testid=\"load-more\"\n >\n <button\n class=\"str-chat__load-more-button__button\"\n data-testid=\"load-more-button\"\n [disabled]=\"isLoadingMoreChannels\"\n >\n <span *ngIf=\"!isLoadingMoreChannels; else loadingIndicator\">{{\n \"Load more\" | translate\n }}</span>\n <ng-template #loadingIndicator\n ><stream-loading-indicator></stream-loading-indicator\n ></ng-template>\n </button>\n </div>\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 class=\"str-chat__down-main\">\n <stream-icon icon=\"connection-error\"></stream-icon>\n <h1>{{ \"streamChat.Connection error\" | translate }}</h1>\n <h3>\n {{\n \"streamChat.Error connecting to chat, refresh the page to try again.\"\n | translate\n }}\n </h3>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingChannels>\n <div data-testid=\"loading-indicator\" class=\"str-chat__loading-channels\">\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 class=\"str-chat__loading-channels-item\">\n <div class=\"str-chat__loading-channels-avatar\"></div>\n <div class=\"str-chat__loading-channels-meta\">\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", components: [{ type: ChannelPreviewComponent, selector: "stream-channel-preview", inputs: ["channel"] }, { type: LoadingIndicatorComponent, selector: "stream-loading-indicator", inputs: ["size", "color"] }, { type: IconComponent, selector: "stream-icon", inputs: ["icon", "size"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i3__namespace.AsyncPipe, "translate": i10__namespace.TranslatePipe } });
|
|
2632
2740
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChannelListComponent, decorators: [{
|
|
2633
2741
|
type: i0.Component,
|
|
2634
2742
|
args: [{
|
|
@@ -3066,7 +3174,7 @@
|
|
|
3066
3174
|
return MessageComponent;
|
|
3067
3175
|
}());
|
|
3068
3176
|
MessageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageComponent, deps: [{ token: ChatClientService }, { token: ChannelService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3069
|
-
MessageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: MessageComponent, selector: "stream-message", inputs: { messageInputTemplate: "messageInputTemplate", mentionTemplate: "mentionTemplate", message: "message", enabledMessageActions: "enabledMessageActions", areReactionsEnabled: "areReactionsEnabled", canReactToMessage: "canReactToMessage", isLastSentMessage: "isLastSentMessage", canReceiveReadEvents: "canReceiveReadEvents" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n #container\n class=\"str-chat__message-simple str-chat__message str-chat__message--{{\n message?.type\n }} str-chat__message--{{ message?.status }} {{\n message?.text ? 'str-chat__message--has-text' : 'has-no-text'\n }}\"\n [class.str-chat__message--me]=\"isSentByCurrentUser\"\n [class.str-chat__message-simple--me]=\"isSentByCurrentUser\"\n [class.mobile-press]=\"isPressedOnMobile\"\n [class.str-chat__message--has-attachment]=\"hasAttachment\"\n [class.str-chat__message--with-reactions]=\"\n areReactionsEnabled && hasReactions\n \"\n data-testid=\"message-container\"\n>\n <ng-container *ngIf=\"!message?.deleted_at; else deletedMessage\">\n <ng-container *ngIf=\"message?.type !== 'system'; else systemMessage\">\n <ng-container\n *ngIf=\"\n isSentByCurrentUser &&\n ((isLastSentMessage && message?.status === 'received') ||\n message?.status === 'sending')\n \"\n >\n <ng-container *ngIf=\"message?.status === 'sending'; else sentStatus\">\n <ng-container *ngTemplateOutlet=\"sendingStatus\"></ng-container>\n </ng-container>\n <ng-template #sentStatus>\n <ng-container\n *ngIf=\"\n isMessageDeliveredAndRead && canReceiveReadEvents;\n else deliveredStatus\n \"\n >\n <ng-container *ngTemplateOutlet=\"readStatus\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n <stream-avatar\n data-testid=\"avatar\"\n class=\"str-chat-angular__avatar-host\"\n [imageUrl]=\"message?.user?.image\"\n [name]=\"message?.user?.name || message?.user?.id\"\n ></stream-avatar>\n <div class=\"str-chat__message-inner\">\n <div\n class=\"str-chat__message-simple__actions\"\n data-testid=\"message-options\"\n *ngIf=\"areOptionsVisible\"\n >\n <div\n data-testid=\"message-actions-container\"\n class=\"\n str-chat__message-simple__actions__action\n str-chat__message-simple__actions__action--options\n \"\n [class.str-chat-angular__message-simple__actions__action--options--editing]=\"\n isEditing\n \"\n >\n <stream-message-actions-box\n [isOpen]=\"isActionBoxOpen\"\n [isMine]=\"isSentByCurrentUser\"\n [enabledActions]=\"enabledMessageActions\"\n [message]=\"message\"\n (displayedActionsCount)=\"visibleMessageActionsCount = $event\"\n (isEditing)=\"isEditing = $event; isActionBoxOpen = !isEditing\"\n [messageInputTemplate]=\"messageInputTemplate\"\n ></stream-message-actions-box>\n <stream-icon\n *ngIf=\"visibleMessageActionsCount > 0\"\n data-testid=\"action-icon\"\n icon=\"action-icon\"\n (keyup.enter)=\"isActionBoxOpen = !isActionBoxOpen\"\n (click)=\"isActionBoxOpen = !isActionBoxOpen\"\n ></stream-icon>\n </div>\n <div\n *ngIf=\"areReactionsEnabled && canReactToMessage\"\n class=\"\n str-chat__message-simple__actions__action\n str-chat__message-simple__actions__action--reactions\n \"\n data-testid=\"reaction-icon\"\n (click)=\"isReactionSelectorOpen = !isReactionSelectorOpen\"\n (keyup.enter)=\"isReactionSelectorOpen = !isReactionSelectorOpen\"\n >\n <stream-icon icon=\"reaction-icon\"></stream-icon>\n </div>\n </div>\n <stream-message-reactions\n *ngIf=\"areReactionsEnabled\"\n [messageReactionCounts]=\"message?.reaction_counts || {}\"\n [latestReactions]=\"message?.latest_reactions || []\"\n [(isSelectorOpen)]=\"isReactionSelectorOpen\"\n [messageId]=\"message?.id\"\n [ownReactions]=\"message?.own_reactions || []\"\n ></stream-message-reactions>\n <stream-attachment-list\n *ngIf=\"hasAttachment\"\n [attachments]=\"message!.attachments!\"\n ></stream-attachment-list>\n <div class=\"str-chat__message-text\" *ngIf=\"message?.text\">\n <div\n data-testid=\"inner-message\"\n class=\"\n str-chat__message-text-inner str-chat__message-simple-text-inner\n \"\n [class.str-chat__message-light-text-inner--has-attachment]=\"\n hasAttachment\n \"\n (click)=\"\n message?.status === 'failed' && message?.errorStatusCode !== 403\n ? resendMessage()\n : undefined\n \"\n (keyup.enter)=\"\n message?.status === 'failed' && message?.errorStatusCode !== 403\n ? resendMessage()\n : undefined\n \"\n >\n <div\n data-testid=\"client-error-message\"\n *ngIf=\"message?.type === 'error'\"\n class=\"str-chat__simple-message--error-message\"\n >\n {{ \"streamChat.Error \u00B7 Unsent\" | translate }}\n </div>\n <div\n data-testid=\"error-message\"\n *ngIf=\"message?.status === 'failed'\"\n class=\"str-chat__simple-message--error-message\"\n >\n {{\n (message?.errorStatusCode === 403\n ? \"streamChat.Message Failed \u00B7 Unauthorized\"\n : \"streamChat.Message Failed \u00B7 Click to try again\"\n ) | translate\n }}\n </div>\n <div\n (click)=\"textClicked()\"\n (keyup.enter)=\"textClicked()\"\n data-testid=\"text\"\n >\n <p>\n <!-- eslint-disable-next-line @angular-eslint/template/use-track-by-function -->\n <ng-container *ngFor=\"let part of messageTextParts\">\n <span\n *ngIf=\"part.type === 'text'; else mention\"\n [innerHTML]=\"part.content\"\n ></span>\n <ng-template #mention>\n <ng-container *ngIf=\"mentionTemplate; else defaultMention\">\n <ng-container\n *ngTemplateOutlet=\"\n mentionTemplate;\n context: { user: part.user! }\n \"\n ></ng-container>\n </ng-container>\n <ng-template #defaultMention>\n <b>{{ part.content }}</b>\n </ng-template>\n </ng-template>\n </ng-container>\n </p>\n </div>\n </div>\n </div>\n <div class=\"str-chat__message-data str-chat__message-simple-data\">\n <span\n data-testid=\"sender\"\n *ngIf=\"!isSentByCurrentUser\"\n class=\"str-chat__message-simple-name\"\n >\n {{ message?.user?.name ? message?.user?.name : message?.user?.id }}\n </span>\n <span data-testid=\"date\" class=\"str-chat__message-simple-timestamp\">\n {{ parsedDate }}\n </span>\n </div>\n </div>\n </ng-container>\n </ng-container>\n</div>\n\n<ng-template #sendingStatus>\n <span class=\"str-chat__message-simple-status\" data-testid=\"sending-indicator\">\n <div class=\"str-chat__tooltip\">\n {{ \"streamChat.Sending...\" | translate }}\n </div>\n <stream-loading-indicator\n data-testid=\"loading-indicator\"\n ></stream-loading-indicator>\n </span>\n</ng-template>\n<ng-template #readStatus>\n <span class=\"str-chat__message-simple-status\" data-testid=\"read-indicator\">\n <div class=\"str-chat__tooltip\" data-testid=\"read-by-tooltip\">\n {{ readByText }}\n </div>\n <stream-avatar\n class=\"str-chat-angular__avatar-host\"\n data-test-id=\"last-read-user-avatar\"\n [size]=\"15\"\n [imageUrl]=\"lastReadUser?.image\"\n [name]=\"lastReadUser?.name || lastReadUser?.id\"\n ></stream-avatar>\n <span\n data-test-id=\"read-by-length\"\n *ngIf=\"isReadByMultipleUsers\"\n class=\"str-chat__message-simple-status-number\"\n >\n {{ (message?.readBy)!.length }}\n </span>\n </span>\n</ng-template>\n<ng-template #deliveredStatus>\n <span\n class=\"str-chat__message-simple-status\"\n data-testid=\"delivered-indicator\"\n >\n <div class=\"str-chat__tooltip\">\n {{ \"streamChat.Delivered\" | translate }}\n </div>\n <stream-icon\n data-testid=\"delivered-icon\"\n icon=\"delivered-icon\"\n ></stream-icon>\n </span>\n</ng-template>\n\n<ng-template #deletedMessage>\n <div data-testid=\"message-deleted-component\">\n <div class=\"str-chat__message--deleted-inner\" translate>\n streamChat.This message was deleted...\n </div>\n </div>\n</ng-template>\n\n<ng-template #systemMessage>\n <div data-testid=\"system-message\" class=\"str-chat__message--system\">\n <div class=\"str-chat__message--system__text\">\n <div class=\"str-chat__message--system__line\"></div>\n <p>{{ message?.text }}</p>\n <div class=\"str-chat__message--system__line\"></div>\n </div>\n <div class=\"str-chat__message--system__date\">\n {{ parsedDate }}\n </div>\n </div>\n</ng-template>\n", components: [{ type: AvatarComponent, selector: "stream-avatar", inputs: ["name", "imageUrl", "size"] }, { type: MessageActionsBoxComponent, selector: "stream-message-actions-box", inputs: ["messageInputTemplate", "isOpen", "isMine", "message", "enabledActions"], outputs: ["displayedActionsCount", "isEditing"] }, { type: IconComponent, selector: "stream-icon", inputs: ["icon", "size"] }, { type: MessageReactionsComponent, selector: "stream-message-reactions", inputs: ["messageId", "messageReactionCounts", "isSelectorOpen", "latestReactions", "ownReactions"], outputs: ["isSelectorOpenChange"] }, { type: AttachmentListComponent, selector: "stream-attachment-list", inputs: ["attachments"] }, { type: LoadingIndicatorComponent, selector: "stream-loading-indicator", inputs: ["size", "color"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], pipes: { "translate": i1__namespace.TranslatePipe } });
|
|
3177
|
+
MessageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: MessageComponent, selector: "stream-message", inputs: { messageInputTemplate: "messageInputTemplate", mentionTemplate: "mentionTemplate", message: "message", enabledMessageActions: "enabledMessageActions", areReactionsEnabled: "areReactionsEnabled", canReactToMessage: "canReactToMessage", isLastSentMessage: "isLastSentMessage", canReceiveReadEvents: "canReceiveReadEvents" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n #container\n class=\"str-chat__message-simple str-chat__message str-chat__message--{{\n message?.type\n }} str-chat__message--{{ message?.status }} {{\n message?.text ? 'str-chat__message--has-text' : 'has-no-text'\n }}\"\n [class.str-chat__message--me]=\"isSentByCurrentUser\"\n [class.str-chat__message-simple--me]=\"isSentByCurrentUser\"\n [class.mobile-press]=\"isPressedOnMobile\"\n [class.str-chat__message--has-attachment]=\"hasAttachment\"\n [class.str-chat__message--with-reactions]=\"\n areReactionsEnabled && hasReactions\n \"\n data-testid=\"message-container\"\n>\n <ng-container *ngIf=\"!message?.deleted_at; else deletedMessage\">\n <ng-container *ngIf=\"message?.type !== 'system'; else systemMessage\">\n <ng-container\n *ngIf=\"\n isSentByCurrentUser &&\n ((isLastSentMessage && message?.status === 'received') ||\n message?.status === 'sending')\n \"\n >\n <ng-container *ngIf=\"message?.status === 'sending'; else sentStatus\">\n <ng-container *ngTemplateOutlet=\"sendingStatus\"></ng-container>\n </ng-container>\n <ng-template #sentStatus>\n <ng-container\n *ngIf=\"\n isMessageDeliveredAndRead && canReceiveReadEvents;\n else deliveredStatus\n \"\n >\n <ng-container *ngTemplateOutlet=\"readStatus\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n <stream-avatar\n data-testid=\"avatar\"\n class=\"str-chat-angular__avatar-host\"\n [imageUrl]=\"message?.user?.image\"\n [name]=\"message?.user?.name || message?.user?.id\"\n ></stream-avatar>\n <div class=\"str-chat__message-inner\">\n <div\n class=\"str-chat__message-simple__actions\"\n data-testid=\"message-options\"\n *ngIf=\"areOptionsVisible\"\n >\n <div\n data-testid=\"message-actions-container\"\n class=\"\n str-chat__message-simple__actions__action\n str-chat__message-simple__actions__action--options\n \"\n [class.str-chat-angular__message-simple__actions__action--options--editing]=\"\n isEditing\n \"\n >\n <stream-message-actions-box\n [isOpen]=\"isActionBoxOpen\"\n [isMine]=\"isSentByCurrentUser\"\n [enabledActions]=\"enabledMessageActions\"\n [message]=\"message\"\n (displayedActionsCount)=\"visibleMessageActionsCount = $event\"\n (isEditing)=\"isEditing = $event; isActionBoxOpen = !isEditing\"\n [messageInputTemplate]=\"messageInputTemplate\"\n ></stream-message-actions-box>\n <stream-icon\n *ngIf=\"visibleMessageActionsCount > 0\"\n data-testid=\"action-icon\"\n icon=\"action-icon\"\n (keyup.enter)=\"isActionBoxOpen = !isActionBoxOpen\"\n (click)=\"isActionBoxOpen = !isActionBoxOpen\"\n ></stream-icon>\n </div>\n <div\n *ngIf=\"areReactionsEnabled && canReactToMessage\"\n class=\"\n str-chat__message-simple__actions__action\n str-chat__message-simple__actions__action--reactions\n \"\n data-testid=\"reaction-icon\"\n (click)=\"isReactionSelectorOpen = !isReactionSelectorOpen\"\n (keyup.enter)=\"isReactionSelectorOpen = !isReactionSelectorOpen\"\n >\n <stream-icon icon=\"reaction-icon\"></stream-icon>\n </div>\n </div>\n <stream-message-reactions\n *ngIf=\"areReactionsEnabled\"\n [messageReactionCounts]=\"message?.reaction_counts || {}\"\n [latestReactions]=\"message?.latest_reactions || []\"\n [(isSelectorOpen)]=\"isReactionSelectorOpen\"\n [messageId]=\"message?.id\"\n [ownReactions]=\"message?.own_reactions || []\"\n ></stream-message-reactions>\n <stream-attachment-list\n *ngIf=\"hasAttachment\"\n [attachments]=\"message!.attachments!\"\n ></stream-attachment-list>\n <div class=\"str-chat__message-text\" *ngIf=\"message?.text\">\n <div\n data-testid=\"inner-message\"\n class=\"\n str-chat__message-text-inner str-chat__message-simple-text-inner\n \"\n [class.str-chat__message-light-text-inner--has-attachment]=\"\n hasAttachment\n \"\n (click)=\"\n message?.status === 'failed' && message?.errorStatusCode !== 403\n ? resendMessage()\n : undefined\n \"\n (keyup.enter)=\"\n message?.status === 'failed' && message?.errorStatusCode !== 403\n ? resendMessage()\n : undefined\n \"\n >\n <div\n data-testid=\"client-error-message\"\n *ngIf=\"message?.type === 'error'\"\n class=\"str-chat__simple-message--error-message\"\n >\n {{ \"streamChat.Error \u00B7 Unsent\" | translate }}\n </div>\n <div\n data-testid=\"error-message\"\n *ngIf=\"message?.status === 'failed'\"\n class=\"str-chat__simple-message--error-message\"\n >\n {{\n (message?.errorStatusCode === 403\n ? \"streamChat.Message Failed \u00B7 Unauthorized\"\n : \"streamChat.Message Failed \u00B7 Click to try again\"\n ) | translate\n }}\n </div>\n <div\n (click)=\"textClicked()\"\n (keyup.enter)=\"textClicked()\"\n data-testid=\"text\"\n >\n <p>\n <!-- eslint-disable-next-line @angular-eslint/template/use-track-by-function -->\n <ng-container *ngFor=\"let part of messageTextParts\">\n <span\n *ngIf=\"part.type === 'text'; else mention\"\n [innerHTML]=\"part.content\"\n ></span>\n <ng-template #mention>\n <ng-container *ngIf=\"mentionTemplate; else defaultMention\">\n <ng-container\n *ngTemplateOutlet=\"\n mentionTemplate;\n context: { user: part.user! }\n \"\n ></ng-container>\n </ng-container>\n <ng-template #defaultMention>\n <b>{{ part.content }}</b>\n </ng-template>\n </ng-template>\n </ng-container>\n </p>\n </div>\n </div>\n </div>\n <div class=\"str-chat__message-data str-chat__message-simple-data\">\n <span\n data-testid=\"sender\"\n *ngIf=\"!isSentByCurrentUser\"\n class=\"str-chat__message-simple-name\"\n >\n {{ message?.user?.name ? message?.user?.name : message?.user?.id }}\n </span>\n <span data-testid=\"date\" class=\"str-chat__message-simple-timestamp\">\n {{ parsedDate }}\n </span>\n </div>\n </div>\n </ng-container>\n </ng-container>\n</div>\n\n<ng-template #sendingStatus>\n <span class=\"str-chat__message-simple-status\" data-testid=\"sending-indicator\">\n <div class=\"str-chat__tooltip\">\n {{ \"streamChat.Sending...\" | translate }}\n </div>\n <stream-loading-indicator\n data-testid=\"loading-indicator\"\n ></stream-loading-indicator>\n </span>\n</ng-template>\n<ng-template #readStatus>\n <span class=\"str-chat__message-simple-status\" data-testid=\"read-indicator\">\n <div class=\"str-chat__tooltip\" data-testid=\"read-by-tooltip\">\n {{ readByText }}\n </div>\n <stream-avatar\n class=\"str-chat-angular__avatar-host\"\n data-test-id=\"last-read-user-avatar\"\n [size]=\"15\"\n [imageUrl]=\"lastReadUser?.image\"\n [name]=\"lastReadUser?.name || lastReadUser?.id\"\n ></stream-avatar>\n <span\n data-test-id=\"read-by-length\"\n *ngIf=\"isReadByMultipleUsers\"\n class=\"str-chat__message-simple-status-number\"\n >\n {{ (message?.readBy)!.length }}\n </span>\n </span>\n</ng-template>\n<ng-template #deliveredStatus>\n <span\n class=\"str-chat__message-simple-status\"\n data-testid=\"delivered-indicator\"\n >\n <div class=\"str-chat__tooltip\">\n {{ \"streamChat.Delivered\" | translate }}\n </div>\n <stream-icon\n data-testid=\"delivered-icon\"\n icon=\"delivered-icon\"\n ></stream-icon>\n </span>\n</ng-template>\n\n<ng-template #deletedMessage>\n <div data-testid=\"message-deleted-component\">\n <div class=\"str-chat__message--deleted-inner\" translate>\n streamChat.This message was deleted...\n </div>\n </div>\n</ng-template>\n\n<ng-template #systemMessage>\n <div data-testid=\"system-message\" class=\"str-chat__message--system\">\n <div class=\"str-chat__message--system__text\">\n <div class=\"str-chat__message--system__line\"></div>\n <p>{{ message?.text }}</p>\n <div class=\"str-chat__message--system__line\"></div>\n </div>\n <div class=\"str-chat__message--system__date\">\n {{ parsedDate }}\n </div>\n </div>\n</ng-template>\n", components: [{ type: AvatarComponent, selector: "stream-avatar", inputs: ["name", "imageUrl", "size"] }, { type: MessageActionsBoxComponent, selector: "stream-message-actions-box", inputs: ["messageInputTemplate", "isOpen", "isMine", "message", "enabledActions"], outputs: ["displayedActionsCount", "isEditing"] }, { type: IconComponent, selector: "stream-icon", inputs: ["icon", "size"] }, { type: MessageReactionsComponent, selector: "stream-message-reactions", inputs: ["messageId", "messageReactionCounts", "isSelectorOpen", "latestReactions", "ownReactions"], outputs: ["isSelectorOpenChange"] }, { type: AttachmentListComponent, selector: "stream-attachment-list", inputs: ["attachments"] }, { type: LoadingIndicatorComponent, selector: "stream-loading-indicator", inputs: ["size", "color"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], pipes: { "translate": i10__namespace.TranslatePipe } });
|
|
3070
3178
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageComponent, decorators: [{
|
|
3071
3179
|
type: i0.Component,
|
|
3072
3180
|
args: [{
|
|
@@ -3114,7 +3222,7 @@
|
|
|
3114
3222
|
return TextareaComponent;
|
|
3115
3223
|
}());
|
|
3116
3224
|
TextareaComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: TextareaComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3117
|
-
TextareaComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: TextareaComponent, selector: "stream-textarea", inputs: { value: "value" }, outputs: { valueChange: "valueChange", send: "send" }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "messageInput", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<textarea\n [value]=\"value || ''\"\n autofocus\n data-testid=\"textarea\"\n #input\n placeholder=\"{{ 'streamChat.Type your message' | translate }}\"\n class=\"rta__textarea str-chat__textarea__textarea\"\n rows=\"1\"\n (input)=\"inputChanged()\"\n (keydown.enter)=\"sent($event)\"\n></textarea>\n", pipes: { "translate":
|
|
3225
|
+
TextareaComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: TextareaComponent, selector: "stream-textarea", inputs: { value: "value" }, outputs: { valueChange: "valueChange", send: "send" }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "messageInput", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<textarea\n [value]=\"value || ''\"\n autofocus\n data-testid=\"textarea\"\n #input\n placeholder=\"{{ 'streamChat.Type your message' | translate }}\"\n class=\"rta__textarea str-chat__textarea__textarea\"\n rows=\"1\"\n (input)=\"inputChanged()\"\n (keydown.enter)=\"sent($event)\"\n></textarea>\n", pipes: { "translate": i10__namespace.TranslatePipe } });
|
|
3118
3226
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: TextareaComponent, decorators: [{
|
|
3119
3227
|
type: i0.Component,
|
|
3120
3228
|
args: [{
|
|
@@ -3164,24 +3272,28 @@
|
|
|
3164
3272
|
this.send = new i0.EventEmitter();
|
|
3165
3273
|
this.userMentions = new i0.EventEmitter();
|
|
3166
3274
|
this.labelKey = 'autocompleteLabel';
|
|
3167
|
-
this.
|
|
3275
|
+
this.mentionTriggerChar = '@';
|
|
3168
3276
|
this.autocompleteConfig = {
|
|
3169
3277
|
mentions: [],
|
|
3170
3278
|
};
|
|
3171
3279
|
this.subscriptions = [];
|
|
3172
3280
|
this.mentionedUsers = [];
|
|
3173
3281
|
this.userMentionConfig = {
|
|
3174
|
-
triggerChar: this.
|
|
3282
|
+
triggerChar: this.mentionTriggerChar,
|
|
3175
3283
|
dropUp: true,
|
|
3176
3284
|
labelKey: this.labelKey,
|
|
3177
3285
|
returnTrigger: true,
|
|
3178
3286
|
mentionFilter: function (searchString, items) { return _this.filter(searchString, items); },
|
|
3179
|
-
mentionSelect: function (item, triggerChar) { return _this.
|
|
3287
|
+
mentionSelect: function (item, triggerChar) { return _this.itemSelectedFromAutocompleteList(item, triggerChar); },
|
|
3180
3288
|
};
|
|
3181
3289
|
this.searchTerm$ = new rxjs.BehaviorSubject('');
|
|
3182
3290
|
this.searchTerm$
|
|
3183
3291
|
.pipe(operators.debounceTime(300), operators.distinctUntilChanged())
|
|
3184
|
-
.subscribe(function (searchTerm) {
|
|
3292
|
+
.subscribe(function (searchTerm) {
|
|
3293
|
+
if (searchTerm.startsWith(_this.mentionTriggerChar)) {
|
|
3294
|
+
void _this.updateMentionOptions(searchTerm);
|
|
3295
|
+
}
|
|
3296
|
+
});
|
|
3185
3297
|
this.subscriptions.push(this.channelService.activeChannel$.subscribe(function () {
|
|
3186
3298
|
_this.mentionedUsers = [];
|
|
3187
3299
|
_this.userMentions.next(__spreadArray([], __read(_this.mentionedUsers)));
|
|
@@ -3207,18 +3319,20 @@
|
|
|
3207
3319
|
var _this = this;
|
|
3208
3320
|
return items.filter(function (item) { return _this.transliterate(item.autocompleteLabel.toLowerCase()).includes(_this.transliterate(searchString.toLowerCase())); });
|
|
3209
3321
|
};
|
|
3210
|
-
AutocompleteTextareaComponent.prototype.
|
|
3322
|
+
AutocompleteTextareaComponent.prototype.itemSelectedFromAutocompleteList = function (item, triggerChar) {
|
|
3211
3323
|
if (triggerChar === void 0) { triggerChar = ''; }
|
|
3212
|
-
|
|
3213
|
-
|
|
3324
|
+
if (triggerChar === this.mentionTriggerChar) {
|
|
3325
|
+
this.mentionedUsers.push((item.user ? item.user : item));
|
|
3326
|
+
this.userMentions.next(__spreadArray([], __read(this.mentionedUsers)));
|
|
3327
|
+
}
|
|
3214
3328
|
return triggerChar + item.autocompleteLabel;
|
|
3215
3329
|
};
|
|
3216
3330
|
AutocompleteTextareaComponent.prototype.autcompleteSearchTermChanged = function (searchTerm) {
|
|
3217
|
-
if (searchTerm === this.
|
|
3331
|
+
if (searchTerm === this.mentionTriggerChar) {
|
|
3218
3332
|
void this.updateMentionOptions();
|
|
3219
3333
|
}
|
|
3220
3334
|
else {
|
|
3221
|
-
this.searchTerm$.next(searchTerm
|
|
3335
|
+
this.searchTerm$.next(searchTerm);
|
|
3222
3336
|
}
|
|
3223
3337
|
};
|
|
3224
3338
|
AutocompleteTextareaComponent.prototype.inputChanged = function () {
|
|
@@ -3250,6 +3364,7 @@
|
|
|
3250
3364
|
if (!this.areMentionsEnabled) {
|
|
3251
3365
|
return [2 /*return*/];
|
|
3252
3366
|
}
|
|
3367
|
+
searchTerm = searchTerm === null || searchTerm === void 0 ? void 0 : searchTerm.replace(this.mentionTriggerChar, '');
|
|
3253
3368
|
request = this.mentionScope === 'application'
|
|
3254
3369
|
? function (s) { return _this.chatClientService.autocompleteUsers(s); }
|
|
3255
3370
|
: function (s) { return _this.channelService.autocompleteMembers(s); };
|
|
@@ -3273,7 +3388,7 @@
|
|
|
3273
3388
|
var updatedMentionedUsers = [];
|
|
3274
3389
|
this.mentionedUsers.forEach(function (u) {
|
|
3275
3390
|
var key = u.name || u.id;
|
|
3276
|
-
if (_this.value.includes("" + _this.
|
|
3391
|
+
if (_this.value.includes("" + _this.mentionTriggerChar + key)) {
|
|
3277
3392
|
updatedMentionedUsers.push(u);
|
|
3278
3393
|
}
|
|
3279
3394
|
});
|
|
@@ -3285,7 +3400,7 @@
|
|
|
3285
3400
|
return AutocompleteTextareaComponent;
|
|
3286
3401
|
}());
|
|
3287
3402
|
AutocompleteTextareaComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: AutocompleteTextareaComponent, deps: [{ token: ChannelService }, { token: ChatClientService }, { token: TransliterationService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3288
|
-
AutocompleteTextareaComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: AutocompleteTextareaComponent, selector: "stream-autocomplete-textarea", inputs: { value: "value", areMentionsEnabled: "areMentionsEnabled", mentionAutocompleteItemTemplate: "mentionAutocompleteItemTemplate", mentionScope: "mentionScope" }, outputs: { valueChange: "valueChange", send: "send", userMentions: "userMentions" }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "messageInput", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<textarea\n [value]=\"value || ''\"\n autofocus\n data-testid=\"textarea\"\n #input\n placeholder=\"{{ 'streamChat.Type your message' | translate }}\"\n class=\"rta__textarea str-chat__textarea__textarea\"\n rows=\"1\"\n (input)=\"inputChanged()\"\n (keydown.enter)=\"sent($event)\"\n [mentionConfig]=\"autocompleteConfig\"\n (searchTerm)=\"autcompleteSearchTermChanged($event)\"\n [mentionListTemplate]=\"autocompleteItem\"\n (blur)=\"inputLeft()\"\n></textarea>\n<ng-template #autocompleteItem let-item=\"item\">\n <div class=\"rta rta__item str-chat__emojisearch__item\" [ngSwitch]=\"item.type\">\n <div class=\"rta__entity\" *ngSwitchCase=\"'mention'\">\n <ng-container\n *ngTemplateOutlet=\"\n mentionAutocompleteItemTemplate || defaultMentionTemplate;\n context: { item: item }\n \"\n ></ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #defaultMentionTemplate let-item=\"item\">\n <div class=\"str-chat__user-item\">\n <stream-avatar\n data-testclass=\"avatar\"\n class=\"str-chat__avatar str-chat__avatar--circle\"\n style=\"height: 20px\"\n [size]=\"20\"\n [imageUrl]=\"item.image || item.user?.image\"\n [name]=\"item.autocompleteLabel\"\n ></stream-avatar>\n <span data-testclass=\"username\" class=\"str-chat__user-item--name\">{{\n item.autocompleteLabel\n }}</span>\n </div>\n</ng-template>\n", components: [{ type: AvatarComponent, selector: "stream-avatar", inputs: ["name", "imageUrl", "size"] }], directives: [{ type: i5__namespace.MentionDirective, selector: "[mention], [mentionConfig]", inputs: ["mentionConfig", "mention", "mentionListTemplate"], outputs: ["searchTerm", "itemSelected", "opened", "closed"] }, { type: i3__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "translate":
|
|
3403
|
+
AutocompleteTextareaComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: AutocompleteTextareaComponent, selector: "stream-autocomplete-textarea", inputs: { value: "value", areMentionsEnabled: "areMentionsEnabled", mentionAutocompleteItemTemplate: "mentionAutocompleteItemTemplate", mentionScope: "mentionScope" }, outputs: { valueChange: "valueChange", send: "send", userMentions: "userMentions" }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "messageInput", first: true, predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<textarea\n [value]=\"value || ''\"\n autofocus\n data-testid=\"textarea\"\n #input\n placeholder=\"{{ 'streamChat.Type your message' | translate }}\"\n class=\"rta__textarea str-chat__textarea__textarea\"\n rows=\"1\"\n (input)=\"inputChanged()\"\n (keydown.enter)=\"sent($event)\"\n [mentionConfig]=\"autocompleteConfig\"\n (searchTerm)=\"autcompleteSearchTermChanged($event)\"\n [mentionListTemplate]=\"autocompleteItem\"\n (blur)=\"inputLeft()\"\n></textarea>\n<ng-template #autocompleteItem let-item=\"item\">\n <div class=\"rta rta__item str-chat__emojisearch__item\" [ngSwitch]=\"item.type\">\n <div class=\"rta__entity\" *ngSwitchCase=\"'mention'\">\n <ng-container\n *ngTemplateOutlet=\"\n mentionAutocompleteItemTemplate || defaultMentionTemplate;\n context: { item: item }\n \"\n ></ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #defaultMentionTemplate let-item=\"item\">\n <div class=\"str-chat__user-item\">\n <stream-avatar\n data-testclass=\"avatar\"\n class=\"str-chat__avatar str-chat__avatar--circle\"\n style=\"height: 20px\"\n [size]=\"20\"\n [imageUrl]=\"item.image || item.user?.image\"\n [name]=\"item.autocompleteLabel\"\n ></stream-avatar>\n <span data-testclass=\"username\" class=\"str-chat__user-item--name\">{{\n item.autocompleteLabel\n }}</span>\n </div>\n</ng-template>\n", components: [{ type: AvatarComponent, selector: "stream-avatar", inputs: ["name", "imageUrl", "size"] }], directives: [{ type: i5__namespace.MentionDirective, selector: "[mention], [mentionConfig]", inputs: ["mentionConfig", "mention", "mentionListTemplate"], outputs: ["searchTerm", "itemSelected", "opened", "closed"] }, { type: i3__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "translate": i10__namespace.TranslatePipe } });
|
|
3289
3404
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: AutocompleteTextareaComponent, decorators: [{
|
|
3290
3405
|
type: i0.Component,
|
|
3291
3406
|
args: [{
|
|
@@ -3549,13 +3664,13 @@
|
|
|
3549
3664
|
return StreamAvatarModule;
|
|
3550
3665
|
}());
|
|
3551
3666
|
StreamAvatarModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAvatarModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
3552
|
-
StreamAvatarModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAvatarModule, declarations: [AvatarComponent], imports: [i3.CommonModule,
|
|
3553
|
-
StreamAvatarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAvatarModule, imports: [[i3.CommonModule,
|
|
3667
|
+
StreamAvatarModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAvatarModule, declarations: [AvatarComponent], imports: [i3.CommonModule, i10.TranslateModule], exports: [AvatarComponent] });
|
|
3668
|
+
StreamAvatarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAvatarModule, imports: [[i3.CommonModule, i10.TranslateModule]] });
|
|
3554
3669
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAvatarModule, decorators: [{
|
|
3555
3670
|
type: i0.NgModule,
|
|
3556
3671
|
args: [{
|
|
3557
3672
|
declarations: [AvatarComponent],
|
|
3558
|
-
imports: [i3.CommonModule,
|
|
3673
|
+
imports: [i3.CommonModule, i10.TranslateModule],
|
|
3559
3674
|
exports: [AvatarComponent],
|
|
3560
3675
|
}]
|
|
3561
3676
|
}] });
|
|
@@ -3582,7 +3697,7 @@
|
|
|
3582
3697
|
NotificationListComponent,
|
|
3583
3698
|
AttachmentPreviewListComponent,
|
|
3584
3699
|
ModalComponent,
|
|
3585
|
-
TextareaDirective], imports: [i3.CommonModule,
|
|
3700
|
+
TextareaDirective], imports: [i3.CommonModule, i10.TranslateModule, StreamAvatarModule], exports: [ChannelComponent,
|
|
3586
3701
|
ChannelHeaderComponent,
|
|
3587
3702
|
ChannelListComponent,
|
|
3588
3703
|
ChannelPreviewComponent,
|
|
@@ -3599,7 +3714,7 @@
|
|
|
3599
3714
|
AttachmentPreviewListComponent,
|
|
3600
3715
|
ModalComponent,
|
|
3601
3716
|
StreamAvatarModule] });
|
|
3602
|
-
StreamChatModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamChatModule, imports: [[i3.CommonModule,
|
|
3717
|
+
StreamChatModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamChatModule, imports: [[i3.CommonModule, i10.TranslateModule, StreamAvatarModule], StreamAvatarModule] });
|
|
3603
3718
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamChatModule, decorators: [{
|
|
3604
3719
|
type: i0.NgModule,
|
|
3605
3720
|
args: [{
|
|
@@ -3622,7 +3737,7 @@
|
|
|
3622
3737
|
ModalComponent,
|
|
3623
3738
|
TextareaDirective,
|
|
3624
3739
|
],
|
|
3625
|
-
imports: [i3.CommonModule,
|
|
3740
|
+
imports: [i3.CommonModule, i10.TranslateModule, StreamAvatarModule],
|
|
3626
3741
|
exports: [
|
|
3627
3742
|
ChannelComponent,
|
|
3628
3743
|
ChannelHeaderComponent,
|
|
@@ -3651,18 +3766,18 @@
|
|
|
3651
3766
|
return StreamAutocompleteTextareaModule;
|
|
3652
3767
|
}());
|
|
3653
3768
|
StreamAutocompleteTextareaModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAutocompleteTextareaModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
3654
|
-
StreamAutocompleteTextareaModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAutocompleteTextareaModule, declarations: [AutocompleteTextareaComponent], imports: [i3.CommonModule,
|
|
3769
|
+
StreamAutocompleteTextareaModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAutocompleteTextareaModule, declarations: [AutocompleteTextareaComponent], imports: [i3.CommonModule, i10.TranslateModule, i5.MentionModule, StreamAvatarModule], exports: [AutocompleteTextareaComponent] });
|
|
3655
3770
|
StreamAutocompleteTextareaModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAutocompleteTextareaModule, providers: [
|
|
3656
3771
|
{
|
|
3657
3772
|
provide: textareaInjectionToken,
|
|
3658
3773
|
useValue: AutocompleteTextareaComponent,
|
|
3659
3774
|
},
|
|
3660
|
-
], imports: [[i3.CommonModule,
|
|
3775
|
+
], imports: [[i3.CommonModule, i10.TranslateModule, i5.MentionModule, StreamAvatarModule]] });
|
|
3661
3776
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAutocompleteTextareaModule, decorators: [{
|
|
3662
3777
|
type: i0.NgModule,
|
|
3663
3778
|
args: [{
|
|
3664
3779
|
declarations: [AutocompleteTextareaComponent],
|
|
3665
|
-
imports: [i3.CommonModule,
|
|
3780
|
+
imports: [i3.CommonModule, i10.TranslateModule, i5.MentionModule, StreamAvatarModule],
|
|
3666
3781
|
exports: [AutocompleteTextareaComponent],
|
|
3667
3782
|
providers: [
|
|
3668
3783
|
{
|
|
@@ -3679,18 +3794,18 @@
|
|
|
3679
3794
|
return StreamTextareaModule;
|
|
3680
3795
|
}());
|
|
3681
3796
|
StreamTextareaModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamTextareaModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
3682
|
-
StreamTextareaModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamTextareaModule, declarations: [TextareaComponent], imports: [i3.CommonModule,
|
|
3797
|
+
StreamTextareaModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamTextareaModule, declarations: [TextareaComponent], imports: [i3.CommonModule, i10.TranslateModule], exports: [TextareaComponent] });
|
|
3683
3798
|
StreamTextareaModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamTextareaModule, providers: [
|
|
3684
3799
|
{
|
|
3685
3800
|
provide: textareaInjectionToken,
|
|
3686
3801
|
useValue: TextareaComponent,
|
|
3687
3802
|
},
|
|
3688
|
-
], imports: [[i3.CommonModule,
|
|
3803
|
+
], imports: [[i3.CommonModule, i10.TranslateModule]] });
|
|
3689
3804
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamTextareaModule, decorators: [{
|
|
3690
3805
|
type: i0.NgModule,
|
|
3691
3806
|
args: [{
|
|
3692
3807
|
declarations: [TextareaComponent],
|
|
3693
|
-
imports: [i3.CommonModule,
|
|
3808
|
+
imports: [i3.CommonModule, i10.TranslateModule],
|
|
3694
3809
|
exports: [TextareaComponent],
|
|
3695
3810
|
providers: [
|
|
3696
3811
|
{
|
|
@@ -3749,6 +3864,7 @@
|
|
|
3749
3864
|
exports.getReadBy = getReadBy;
|
|
3750
3865
|
exports.getReadByText = getReadByText;
|
|
3751
3866
|
exports.isImageAttachment = isImageAttachment;
|
|
3867
|
+
exports.isImageFile = isImageFile;
|
|
3752
3868
|
exports.parseDate = parseDate;
|
|
3753
3869
|
exports.textareaInjectionToken = textareaInjectionToken;
|
|
3754
3870
|
|