stream-chat-angular 1.4.2 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/assets/i18n/en.d.ts +2 -0
- package/assets/version.d.ts +1 -1
- package/bundles/stream-chat-angular.umd.js +622 -78
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/i18n/en.js +3 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/channel-header/channel-header.component.js +12 -3
- package/esm2015/lib/channel-preview/channel-preview.component.js +9 -5
- package/esm2015/lib/channel.service.js +46 -7
- package/esm2015/lib/chat-client.service.js +16 -1
- package/esm2015/lib/injection-tokens.js +3 -0
- package/esm2015/lib/message/highlight-mentions.pipe.js +23 -0
- package/esm2015/lib/message/message.component.js +5 -2
- package/esm2015/lib/message-actions-box/message-actions-box.component.js +2 -2
- package/esm2015/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.js +155 -0
- package/esm2015/lib/message-input/message-input-config.service.js +3 -1
- package/esm2015/lib/message-input/message-input.component.js +81 -27
- package/esm2015/lib/message-input/textarea/textarea.component.js +42 -0
- package/esm2015/lib/message-input/textarea.directive.js +69 -0
- package/esm2015/lib/message-input/textarea.interface.js +2 -0
- package/esm2015/lib/message-list/message-list.component.js +3 -2
- package/esm2015/lib/message-preview.js +3 -2
- package/esm2015/lib/message-reactions/message-reactions.component.js +12 -13
- package/esm2015/lib/stream-autocomplete-textarea.module.js +33 -0
- package/esm2015/lib/stream-avatar.module.js +19 -0
- package/esm2015/lib/stream-chat.module.js +15 -12
- package/esm2015/lib/stream-textarea.module.js +31 -0
- package/esm2015/lib/transliteration.service.js +16 -0
- package/esm2015/lib/types.js +1 -1
- package/esm2015/public-api.js +10 -1
- package/fesm2015/stream-chat-angular.js +555 -78
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/channel-header/channel-header.component.d.ts +1 -0
- package/lib/channel-preview/channel-preview.component.d.ts +1 -0
- package/lib/channel.service.d.ts +4 -2
- package/lib/chat-client.service.d.ts +1 -0
- package/lib/injection-tokens.d.ts +3 -0
- package/lib/message/highlight-mentions.pipe.d.ts +8 -0
- package/lib/message/message.component.d.ts +2 -1
- package/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.d.ts +47 -0
- package/lib/message-input/message-input-config.service.d.ts +5 -0
- package/lib/message-input/message-input.component.d.ts +25 -7
- package/lib/message-input/textarea/textarea.component.d.ts +16 -0
- package/lib/message-input/textarea.directive.d.ts +21 -0
- package/lib/message-input/textarea.interface.d.ts +12 -0
- package/lib/message-list/message-list.component.d.ts +1 -0
- package/lib/message-preview.d.ts +1 -1
- package/lib/message-reactions/message-reactions.component.d.ts +1 -1
- package/lib/stream-autocomplete-textarea.module.d.ts +11 -0
- package/lib/stream-avatar.module.d.ts +9 -0
- package/lib/stream-chat.module.d.ts +21 -20
- package/lib/stream-textarea.module.d.ts +9 -0
- package/lib/transliteration.service.d.ts +7 -0
- package/lib/types.d.ts +7 -1
- package/package.json +13 -3
- package/public-api.d.ts +9 -0
- package/src/assets/i18n/en.ts +4 -0
- package/src/assets/version.ts +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
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('@
|
|
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', '@
|
|
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,
|
|
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
|
+
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.i1, global.ng.common, global.Dayjs, global.calendar, global.prettybytes, global.transliterate, global.i5));
|
|
5
|
+
}(this, (function (exports, i0, rxjs, streamChat, operators, uuid, i1, 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,12 +27,13 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
30
|
-
var
|
|
31
|
-
var
|
|
30
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
31
|
+
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
32
32
|
var Dayjs__default = /*#__PURE__*/_interopDefaultLegacy(Dayjs);
|
|
33
33
|
var calendar__default = /*#__PURE__*/_interopDefaultLegacy(calendar);
|
|
34
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
35
34
|
var prettybytes__default = /*#__PURE__*/_interopDefaultLegacy(prettybytes);
|
|
35
|
+
var transliterate__default = /*#__PURE__*/_interopDefaultLegacy(transliterate);
|
|
36
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
36
37
|
|
|
37
38
|
/*! *****************************************************************************
|
|
38
39
|
Copyright (c) Microsoft Corporation.
|
|
@@ -352,7 +353,7 @@
|
|
|
352
353
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
353
354
|
}
|
|
354
355
|
|
|
355
|
-
var version = '
|
|
356
|
+
var version = '2.3.0';
|
|
356
357
|
|
|
357
358
|
var NotificationService = /** @class */ (function () {
|
|
358
359
|
function NotificationService() {
|
|
@@ -483,6 +484,29 @@
|
|
|
483
484
|
});
|
|
484
485
|
});
|
|
485
486
|
};
|
|
487
|
+
ChatClientService.prototype.autocompleteUsers = function (searchTerm) {
|
|
488
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
489
|
+
var result;
|
|
490
|
+
return __generator(this, function (_a) {
|
|
491
|
+
switch (_a.label) {
|
|
492
|
+
case 0:
|
|
493
|
+
if (!searchTerm) {
|
|
494
|
+
return [2 /*return*/, []];
|
|
495
|
+
}
|
|
496
|
+
return [4 /*yield*/, this.chatClient.queryUsers({
|
|
497
|
+
$or: [
|
|
498
|
+
{ id: { $autocomplete: searchTerm } },
|
|
499
|
+
{ name: { $autocomplete: searchTerm } },
|
|
500
|
+
],
|
|
501
|
+
id: { $ne: this.chatClient.userID },
|
|
502
|
+
})];
|
|
503
|
+
case 1:
|
|
504
|
+
result = _a.sent();
|
|
505
|
+
return [2 /*return*/, result.users];
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
});
|
|
509
|
+
};
|
|
486
510
|
return ChatClientService;
|
|
487
511
|
}());
|
|
488
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: i0__namespace.ApplicationRef }, { token: NotificationService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
@@ -494,7 +518,7 @@
|
|
|
494
518
|
}]
|
|
495
519
|
}], ctorParameters: function () { return [{ type: i0__namespace.NgZone }, { type: i0__namespace.ApplicationRef }, { type: NotificationService }]; } });
|
|
496
520
|
|
|
497
|
-
var createMessagePreview = function (user, text, attachments) {
|
|
521
|
+
var createMessagePreview = function (user, text, attachments, mentionedUsers) {
|
|
498
522
|
var clientSideId = user.id + "-" + uuid.v4();
|
|
499
523
|
return {
|
|
500
524
|
__html: text,
|
|
@@ -507,6 +531,7 @@
|
|
|
507
531
|
type: 'regular',
|
|
508
532
|
user: user,
|
|
509
533
|
attachments: attachments,
|
|
534
|
+
mentioned_users: mentionedUsers,
|
|
510
535
|
};
|
|
511
536
|
};
|
|
512
537
|
|
|
@@ -568,7 +593,9 @@
|
|
|
568
593
|
channel.state.messages.forEach(function (m) {
|
|
569
594
|
m.readBy = getReadBy(m, channel);
|
|
570
595
|
});
|
|
571
|
-
|
|
596
|
+
if (this.canSendReadEvents) {
|
|
597
|
+
void channel.markRead();
|
|
598
|
+
}
|
|
572
599
|
this.activeChannelMessagesSubject.next(__spreadArray([], __read(channel.state.messages)));
|
|
573
600
|
};
|
|
574
601
|
ChannelService.prototype.loadMoreMessages = function () {
|
|
@@ -664,14 +691,15 @@
|
|
|
664
691
|
});
|
|
665
692
|
});
|
|
666
693
|
};
|
|
667
|
-
ChannelService.prototype.sendMessage = function (text, attachments) {
|
|
694
|
+
ChannelService.prototype.sendMessage = function (text, attachments, mentionedUsers) {
|
|
668
695
|
if (attachments === void 0) { attachments = []; }
|
|
696
|
+
if (mentionedUsers === void 0) { mentionedUsers = []; }
|
|
669
697
|
return __awaiter(this, void 0, void 0, function () {
|
|
670
698
|
var preview, channel;
|
|
671
699
|
return __generator(this, function (_e) {
|
|
672
700
|
switch (_e.label) {
|
|
673
701
|
case 0:
|
|
674
|
-
preview = createMessagePreview(this.chatClientService.chatClient.user, text, attachments);
|
|
702
|
+
preview = createMessagePreview(this.chatClientService.chatClient.user, text, attachments, mentionedUsers);
|
|
675
703
|
channel = this.activeChannelSubject.getValue();
|
|
676
704
|
preview.readBy = [];
|
|
677
705
|
channel.state.addMessageSorted(preview, true);
|
|
@@ -773,7 +801,39 @@
|
|
|
773
801
|
});
|
|
774
802
|
});
|
|
775
803
|
};
|
|
804
|
+
ChannelService.prototype.autocompleteMembers = function (searchTerm) {
|
|
805
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
806
|
+
var activeChannel, result;
|
|
807
|
+
var _this = this;
|
|
808
|
+
return __generator(this, function (_e) {
|
|
809
|
+
switch (_e.label) {
|
|
810
|
+
case 0:
|
|
811
|
+
activeChannel = this.activeChannelSubject.getValue();
|
|
812
|
+
if (!activeChannel) {
|
|
813
|
+
return [2 /*return*/, []];
|
|
814
|
+
}
|
|
815
|
+
if (!(Object.keys(activeChannel.state.members).length <= 100)) return [3 /*break*/, 1];
|
|
816
|
+
return [2 /*return*/, Object.values(activeChannel.state.members).filter(function (m) { var _a; return ((_a = m.user) === null || _a === void 0 ? void 0 : _a.id) !== _this.chatClientService.chatClient.userID; })];
|
|
817
|
+
case 1:
|
|
818
|
+
if (!searchTerm) {
|
|
819
|
+
return [2 /*return*/, []];
|
|
820
|
+
}
|
|
821
|
+
return [4 /*yield*/, activeChannel.queryMembers({
|
|
822
|
+
$or: [
|
|
823
|
+
{ id: { $autocomplete: searchTerm } },
|
|
824
|
+
{ name: { $autocomplete: searchTerm } },
|
|
825
|
+
],
|
|
826
|
+
id: { $ne: this.chatClientService.chatClient.userID },
|
|
827
|
+
})];
|
|
828
|
+
case 2:
|
|
829
|
+
result = _e.sent();
|
|
830
|
+
return [2 /*return*/, Object.values(result.members)];
|
|
831
|
+
}
|
|
832
|
+
});
|
|
833
|
+
});
|
|
834
|
+
};
|
|
776
835
|
ChannelService.prototype.sendMessageRequest = function (preview) {
|
|
836
|
+
var _a;
|
|
777
837
|
return __awaiter(this, void 0, void 0, function () {
|
|
778
838
|
var channel, error_1, stringError, parsedError;
|
|
779
839
|
return __generator(this, function (_e) {
|
|
@@ -787,6 +847,7 @@
|
|
|
787
847
|
return [4 /*yield*/, channel.sendMessage({
|
|
788
848
|
text: preview.text,
|
|
789
849
|
attachments: preview.attachments,
|
|
850
|
+
mentioned_users: (_a = preview.mentioned_users) === null || _a === void 0 ? void 0 : _a.map(function (u) { return u.id; }),
|
|
790
851
|
id: preview.id,
|
|
791
852
|
})];
|
|
792
853
|
case 2:
|
|
@@ -920,9 +981,11 @@
|
|
|
920
981
|
this.activeChannelSubscriptions.push(channel.on('message.new', function () {
|
|
921
982
|
_this.ngZone.run(function () {
|
|
922
983
|
_this.activeChannelMessagesSubject.next(__spreadArray([], __read(channel.state.messages)));
|
|
923
|
-
_this.activeChannel
|
|
924
|
-
|
|
925
|
-
|
|
984
|
+
_this.activeChannel$.pipe(operators.first()).subscribe(function (c) {
|
|
985
|
+
if (_this.canSendReadEvents) {
|
|
986
|
+
void (c === null || c === void 0 ? void 0 : c.markRead());
|
|
987
|
+
}
|
|
988
|
+
});
|
|
926
989
|
});
|
|
927
990
|
}));
|
|
928
991
|
this.activeChannelSubscriptions.push(channel.on('message.updated', function (event) { return _this.messageUpdated(event); }));
|
|
@@ -1141,6 +1204,19 @@
|
|
|
1141
1204
|
enumerable: false,
|
|
1142
1205
|
configurable: true
|
|
1143
1206
|
});
|
|
1207
|
+
Object.defineProperty(ChannelService.prototype, "canSendReadEvents", {
|
|
1208
|
+
get: function () {
|
|
1209
|
+
var _a;
|
|
1210
|
+
var channel = this.activeChannelSubject.getValue();
|
|
1211
|
+
if (!channel) {
|
|
1212
|
+
return false;
|
|
1213
|
+
}
|
|
1214
|
+
var capabilites = (_a = channel.data) === null || _a === void 0 ? void 0 : _a.own_capabilities;
|
|
1215
|
+
return capabilites.indexOf('read-events') !== -1;
|
|
1216
|
+
},
|
|
1217
|
+
enumerable: false,
|
|
1218
|
+
configurable: true
|
|
1219
|
+
});
|
|
1144
1220
|
return ChannelService;
|
|
1145
1221
|
}());
|
|
1146
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.ApplicationRef }, { token: i0__namespace.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
@@ -1543,6 +1619,8 @@
|
|
|
1543
1619
|
failed: 'failed',
|
|
1544
1620
|
retry: 'retry',
|
|
1545
1621
|
test: 'success',
|
|
1622
|
+
'Sending links is not allowed in this conversation': 'Sending links is not allowed in this conversation',
|
|
1623
|
+
"You can't send messages in this channel": "You can't send messages in this channel",
|
|
1546
1624
|
},
|
|
1547
1625
|
};
|
|
1548
1626
|
|
|
@@ -1559,14 +1637,14 @@
|
|
|
1559
1637
|
};
|
|
1560
1638
|
return StreamI18nService;
|
|
1561
1639
|
}());
|
|
1562
|
-
StreamI18nService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamI18nService, deps: [{ token:
|
|
1640
|
+
StreamI18nService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamI18nService, deps: [{ token: i1__namespace.TranslateService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1563
1641
|
StreamI18nService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamI18nService, providedIn: 'root' });
|
|
1564
1642
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamI18nService, decorators: [{
|
|
1565
1643
|
type: i0.Injectable,
|
|
1566
1644
|
args: [{
|
|
1567
1645
|
providedIn: 'root',
|
|
1568
1646
|
}]
|
|
1569
|
-
}], ctorParameters: function () { return [{ type:
|
|
1647
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.TranslateService }]; } });
|
|
1570
1648
|
|
|
1571
1649
|
var AvatarComponent = /** @class */ (function () {
|
|
1572
1650
|
function AvatarComponent() {
|
|
@@ -1585,7 +1663,7 @@
|
|
|
1585
1663
|
return AvatarComponent;
|
|
1586
1664
|
}());
|
|
1587
1665
|
AvatarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: AvatarComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1588
|
-
AvatarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: AvatarComponent, selector: "stream-avatar", inputs: { name: "name", imageUrl: "imageUrl", size: "size" }, ngImport: i0__namespace, template: "<div\n class=\"str-chat__avatar str-chat__avatar--circle\"\n title=\"{{ name }}\"\n [style]=\"{\n flexBasis: size + 'px',\n fontSize: size / 2 + 'px',\n height: size + 'px',\n lineHeight: size + 'px',\n width: size + 'px'\n }\"\n>\n <img\n *ngIf=\"imageUrl && !isError; else fallback\"\n class=\"str-chat__avatar-image str-chat__avatar-image{{\n isLoaded ? ' str-chat__avatar-image--loaded' : ''\n }}\"\n src=\"{{ imageUrl }}\"\n alt=\"{{ initials }}\"\n data-testid=\"avatar-img\"\n (load)=\"isLoaded = true\"\n (error)=\"isError = true\"\n [style]=\"{\n flexBasis: size + 'px',\n height: size + 'px',\n objectFit: 'cover',\n width: size + 'px'\n }\"\n />\n <ng-template #fallback>\n <div data-testid=\"fallback-img\" class=\"str-chat__avatar-fallback\">\n {{ initials }}\n </div>\n </ng-template>\n</div>\n", styles: [""], directives: [{ type:
|
|
1666
|
+
AvatarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: AvatarComponent, selector: "stream-avatar", inputs: { name: "name", imageUrl: "imageUrl", size: "size" }, ngImport: i0__namespace, template: "<div\n class=\"str-chat__avatar str-chat__avatar--circle\"\n title=\"{{ name }}\"\n [style]=\"{\n flexBasis: size + 'px',\n fontSize: size / 2 + 'px',\n height: size + 'px',\n lineHeight: size + 'px',\n width: size + 'px'\n }\"\n>\n <img\n *ngIf=\"imageUrl && !isError; else fallback\"\n class=\"str-chat__avatar-image str-chat__avatar-image{{\n isLoaded ? ' str-chat__avatar-image--loaded' : ''\n }}\"\n src=\"{{ imageUrl }}\"\n alt=\"{{ initials }}\"\n data-testid=\"avatar-img\"\n (load)=\"isLoaded = true\"\n (error)=\"isError = true\"\n [style]=\"{\n flexBasis: size + 'px',\n height: size + 'px',\n objectFit: 'cover',\n width: size + 'px'\n }\"\n />\n <ng-template #fallback>\n <div data-testid=\"fallback-img\" class=\"str-chat__avatar-fallback\">\n {{ initials }}\n </div>\n </ng-template>\n</div>\n", styles: [""], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1589
1667
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: AvatarComponent, decorators: [{
|
|
1590
1668
|
type: i0.Component,
|
|
1591
1669
|
args: [{
|
|
@@ -1607,7 +1685,7 @@
|
|
|
1607
1685
|
return IconComponent;
|
|
1608
1686
|
}());
|
|
1609
1687
|
IconComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: IconComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1610
|
-
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:
|
|
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: i1__namespace.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }] });
|
|
1611
1689
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: IconComponent, decorators: [{
|
|
1612
1690
|
type: i0.Component,
|
|
1613
1691
|
args: [{
|
|
@@ -1629,7 +1707,7 @@
|
|
|
1629
1707
|
return LoadingIndicatorComponent;
|
|
1630
1708
|
}());
|
|
1631
1709
|
LoadingIndicatorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: LoadingIndicatorComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1632
|
-
LoadingIndicatorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: LoadingIndicatorComponent, selector: "stream-loading-indicator", inputs: { size: "size", color: "color" }, ngImport: i0__namespace, template: "<div class=\"str-chat__loading-indicator\">\n <svg\n [attr.height]=\"size\"\n viewBox=\"0 0 30 30\"\n [attr.width]=\"size\"\n data-testid=\"loading-indicator\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <defs>\n <linearGradient id=\"a\" x1=\"50%\" x2=\"50%\" y1=\"0%\" y2=\"100%\">\n <stop offset=\"0%\" stop-color=\"#FFF\" stop-opacity=\"0\" />\n <stop\n data-testid=\"stop-color\"\n offset=\"100%\"\n [attr.stop-color]=\"color\"\n stop-opacity=\"1\"\n [ngStyle]=\"{ stopColor: color }\"\n />\n </linearGradient>\n </defs>\n <path\n d=\"M2.518 23.321l1.664-1.11A12.988 12.988 0 0 0 15 28c7.18 0 13-5.82 13-13S22.18 2 15 2V0c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-5.206 0-9.792-2.652-12.482-6.679z\"\n fill=\"url(#a)\"\n fillRule=\"evenodd\"\n />\n </svg>\n</div>\n", directives: [{ type:
|
|
1710
|
+
LoadingIndicatorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: LoadingIndicatorComponent, selector: "stream-loading-indicator", inputs: { size: "size", color: "color" }, ngImport: i0__namespace, template: "<div class=\"str-chat__loading-indicator\">\n <svg\n [attr.height]=\"size\"\n viewBox=\"0 0 30 30\"\n [attr.width]=\"size\"\n data-testid=\"loading-indicator\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <defs>\n <linearGradient id=\"a\" x1=\"50%\" x2=\"50%\" y1=\"0%\" y2=\"100%\">\n <stop offset=\"0%\" stop-color=\"#FFF\" stop-opacity=\"0\" />\n <stop\n data-testid=\"stop-color\"\n offset=\"100%\"\n [attr.stop-color]=\"color\"\n stop-opacity=\"1\"\n [ngStyle]=\"{ stopColor: color }\"\n />\n </linearGradient>\n </defs>\n <path\n d=\"M2.518 23.321l1.664-1.11A12.988 12.988 0 0 0 15 28c7.18 0 13-5.82 13-13S22.18 2 15 2V0c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-5.206 0-9.792-2.652-12.482-6.679z\"\n fill=\"url(#a)\"\n fillRule=\"evenodd\"\n />\n </svg>\n</div>\n", directives: [{ type: i3__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
1633
1711
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: LoadingIndicatorComponent, decorators: [{
|
|
1634
1712
|
type: i0.Component,
|
|
1635
1713
|
args: [{
|
|
@@ -1643,10 +1721,82 @@
|
|
|
1643
1721
|
type: i0.Input
|
|
1644
1722
|
}] } });
|
|
1645
1723
|
|
|
1724
|
+
var textareaInjectionToken = new i0.InjectionToken('textareaInjectionToken');
|
|
1725
|
+
|
|
1726
|
+
var TextareaDirective = /** @class */ (function () {
|
|
1727
|
+
function TextareaDirective(viewContainerRef) {
|
|
1728
|
+
this.viewContainerRef = viewContainerRef;
|
|
1729
|
+
this.value = '';
|
|
1730
|
+
this.valueChange = new i0.EventEmitter();
|
|
1731
|
+
this.send = new i0.EventEmitter();
|
|
1732
|
+
this.userMentions = new i0.EventEmitter();
|
|
1733
|
+
this.subscriptions = [];
|
|
1734
|
+
}
|
|
1735
|
+
TextareaDirective.prototype.ngOnChanges = function (changes) {
|
|
1736
|
+
var _this = this;
|
|
1737
|
+
if (!this.componentRef) {
|
|
1738
|
+
return;
|
|
1739
|
+
}
|
|
1740
|
+
if (changes.componentRef) {
|
|
1741
|
+
this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
|
|
1742
|
+
if (this.componentRef) {
|
|
1743
|
+
this.subscriptions.push(this.componentRef.instance.valueChange.subscribe(function (value) { return _this.valueChange.next(value); }));
|
|
1744
|
+
this.subscriptions.push(this.componentRef.instance.send.subscribe(function (value) { return _this.send.next(value); }));
|
|
1745
|
+
if (this.componentRef.instance.userMentions) {
|
|
1746
|
+
this.subscriptions.push(this.componentRef.instance.userMentions.subscribe(function (value) { return _this.userMentions.next(value); }));
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
if (changes.areMentionsEnabled) {
|
|
1751
|
+
this.componentRef.instance.areMentionsEnabled = this.areMentionsEnabled;
|
|
1752
|
+
}
|
|
1753
|
+
if (changes.mentionAutocompleteItemTemplate) {
|
|
1754
|
+
this.componentRef.instance.mentionAutocompleteItemTemplate =
|
|
1755
|
+
this.mentionAutocompleteItemTemplate;
|
|
1756
|
+
}
|
|
1757
|
+
if (changes.mentionScope) {
|
|
1758
|
+
this.componentRef.instance.mentionScope = this.mentionScope;
|
|
1759
|
+
}
|
|
1760
|
+
if (changes.value) {
|
|
1761
|
+
this.componentRef.instance.value = this.value;
|
|
1762
|
+
}
|
|
1763
|
+
// ngOnChanges not called for dynamic components since we don't use template binding
|
|
1764
|
+
// eslint-disable-next-line @angular-eslint/no-lifecycle-call
|
|
1765
|
+
this.componentRef.instance.ngOnChanges(changes);
|
|
1766
|
+
};
|
|
1767
|
+
return TextareaDirective;
|
|
1768
|
+
}());
|
|
1769
|
+
TextareaDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: TextareaDirective, deps: [{ token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1770
|
+
TextareaDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.5", type: TextareaDirective, selector: "[streamTextarea]", inputs: { componentRef: "componentRef", areMentionsEnabled: "areMentionsEnabled", mentionAutocompleteItemTemplate: "mentionAutocompleteItemTemplate", mentionScope: "mentionScope", value: "value" }, outputs: { valueChange: "valueChange", send: "send", userMentions: "userMentions" }, usesOnChanges: true, ngImport: i0__namespace });
|
|
1771
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: TextareaDirective, decorators: [{
|
|
1772
|
+
type: i0.Directive,
|
|
1773
|
+
args: [{
|
|
1774
|
+
selector: '[streamTextarea]',
|
|
1775
|
+
}]
|
|
1776
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ViewContainerRef }]; }, propDecorators: { componentRef: [{
|
|
1777
|
+
type: i0.Input
|
|
1778
|
+
}], areMentionsEnabled: [{
|
|
1779
|
+
type: i0.Input
|
|
1780
|
+
}], mentionAutocompleteItemTemplate: [{
|
|
1781
|
+
type: i0.Input
|
|
1782
|
+
}], mentionScope: [{
|
|
1783
|
+
type: i0.Input
|
|
1784
|
+
}], value: [{
|
|
1785
|
+
type: i0.Input
|
|
1786
|
+
}], valueChange: [{
|
|
1787
|
+
type: i0.Output
|
|
1788
|
+
}], send: [{
|
|
1789
|
+
type: i0.Output
|
|
1790
|
+
}], userMentions: [{
|
|
1791
|
+
type: i0.Output
|
|
1792
|
+
}] } });
|
|
1793
|
+
|
|
1646
1794
|
var MessageInputConfigService = /** @class */ (function () {
|
|
1647
1795
|
function MessageInputConfigService() {
|
|
1648
1796
|
this.isFileUploadEnabled = true;
|
|
1797
|
+
this.areMentionsEnabled = true;
|
|
1649
1798
|
this.isMultipleFileUploadEnabled = true;
|
|
1799
|
+
this.mentionScope = 'channel';
|
|
1650
1800
|
}
|
|
1651
1801
|
return MessageInputConfigService;
|
|
1652
1802
|
}());
|
|
@@ -1694,7 +1844,7 @@
|
|
|
1694
1844
|
return AttachmentPreviewListComponent;
|
|
1695
1845
|
}());
|
|
1696
1846
|
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 });
|
|
1697
|
-
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:
|
|
1847
|
+
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: i1__namespace.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], pipes: { "async": i3__namespace.AsyncPipe } });
|
|
1698
1848
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: AttachmentPreviewListComponent, decorators: [{
|
|
1699
1849
|
type: i0.Component,
|
|
1700
1850
|
args: [{
|
|
@@ -1705,26 +1855,19 @@
|
|
|
1705
1855
|
}], ctorParameters: function () { return [{ type: AttachmentService }]; } });
|
|
1706
1856
|
|
|
1707
1857
|
var MessageInputComponent = /** @class */ (function () {
|
|
1708
|
-
function MessageInputComponent(channelService, notificationService, attachmentService, configService) {
|
|
1858
|
+
function MessageInputComponent(channelService, notificationService, attachmentService, configService, textareaType, componentFactoryResolver, cdRef) {
|
|
1709
1859
|
var _this = this;
|
|
1710
1860
|
this.channelService = channelService;
|
|
1711
1861
|
this.notificationService = notificationService;
|
|
1712
1862
|
this.attachmentService = attachmentService;
|
|
1713
1863
|
this.configService = configService;
|
|
1864
|
+
this.textareaType = textareaType;
|
|
1865
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
1866
|
+
this.cdRef = cdRef;
|
|
1714
1867
|
this.messageUpdate = new i0.EventEmitter();
|
|
1868
|
+
this.textareaValue = '';
|
|
1869
|
+
this.mentionedUsers = [];
|
|
1715
1870
|
this.subscriptions = [];
|
|
1716
|
-
this.subscriptions.push(this.channelService.activeChannel$.subscribe(function (channel) {
|
|
1717
|
-
var _a;
|
|
1718
|
-
if (_this.messageInput) {
|
|
1719
|
-
_this.messageInput.nativeElement.value = '';
|
|
1720
|
-
}
|
|
1721
|
-
_this.attachmentService.resetAttachmentUploads();
|
|
1722
|
-
var capabilities = (_a = channel === null || channel === void 0 ? void 0 : channel.data) === null || _a === void 0 ? void 0 : _a.own_capabilities;
|
|
1723
|
-
if (capabilities) {
|
|
1724
|
-
_this.isFileUploadAuthorized =
|
|
1725
|
-
capabilities.indexOf('upload-file') !== -1;
|
|
1726
|
-
}
|
|
1727
|
-
}));
|
|
1728
1871
|
this.subscriptions.push(this.attachmentService.attachmentUploadInProgressCounter$.subscribe(function (counter) {
|
|
1729
1872
|
if (counter === 0 && _this.hideNotification) {
|
|
1730
1873
|
_this.hideNotification();
|
|
@@ -1736,12 +1879,37 @@
|
|
|
1736
1879
|
this.acceptedFileTypes = this.configService.acceptedFileTypes;
|
|
1737
1880
|
this.isMultipleFileUploadEnabled =
|
|
1738
1881
|
this.configService.isMultipleFileUploadEnabled;
|
|
1882
|
+
this.areMentionsEnabled = this.configService.areMentionsEnabled;
|
|
1883
|
+
this.mentionAutocompleteItemTemplate =
|
|
1884
|
+
this.configService.mentionAutocompleteItemTemplate;
|
|
1885
|
+
this.mentionScope = this.configService.mentionScope;
|
|
1739
1886
|
}
|
|
1887
|
+
MessageInputComponent.prototype.ngOnInit = function () {
|
|
1888
|
+
var _this = this;
|
|
1889
|
+
this.subscriptions.push(this.channelService.activeChannel$.subscribe(function (channel) {
|
|
1890
|
+
var _a;
|
|
1891
|
+
_this.textareaValue = '';
|
|
1892
|
+
_this.attachmentService.resetAttachmentUploads();
|
|
1893
|
+
var capabilities = (_a = channel === null || channel === void 0 ? void 0 : channel.data) === null || _a === void 0 ? void 0 : _a.own_capabilities;
|
|
1894
|
+
if (capabilities) {
|
|
1895
|
+
_this.isFileUploadAuthorized =
|
|
1896
|
+
capabilities.indexOf('upload-file') !== -1;
|
|
1897
|
+
_this.canSendLinks = capabilities.indexOf('send-links') !== -1;
|
|
1898
|
+
_this.canSendMessages = capabilities.indexOf('send-message') !== -1;
|
|
1899
|
+
_this.cdRef.detectChanges();
|
|
1900
|
+
_this.initTextarea();
|
|
1901
|
+
}
|
|
1902
|
+
}));
|
|
1903
|
+
};
|
|
1904
|
+
MessageInputComponent.prototype.ngAfterViewInit = function () {
|
|
1905
|
+
this.initTextarea();
|
|
1906
|
+
};
|
|
1740
1907
|
MessageInputComponent.prototype.ngOnChanges = function (changes) {
|
|
1741
1908
|
if (changes.message) {
|
|
1742
1909
|
this.attachmentService.resetAttachmentUploads();
|
|
1743
1910
|
if (this.isUpdate) {
|
|
1744
1911
|
this.attachmentService.createFromAttachments(this.message.attachments || []);
|
|
1912
|
+
this.textareaValue = this.message.text || '';
|
|
1745
1913
|
}
|
|
1746
1914
|
}
|
|
1747
1915
|
if (changes.isFileUploadEnabled) {
|
|
@@ -1754,17 +1922,26 @@
|
|
|
1754
1922
|
this.configService.isMultipleFileUploadEnabled =
|
|
1755
1923
|
this.isMultipleFileUploadEnabled;
|
|
1756
1924
|
}
|
|
1925
|
+
if (changes.areMentionsEnabled) {
|
|
1926
|
+
this.configService.areMentionsEnabled = this.areMentionsEnabled;
|
|
1927
|
+
}
|
|
1928
|
+
if (changes.mentionAutocompleteItemTemplate) {
|
|
1929
|
+
this.configService.mentionAutocompleteItemTemplate =
|
|
1930
|
+
this.mentionAutocompleteItemTemplate;
|
|
1931
|
+
}
|
|
1932
|
+
if (changes.mentionScope) {
|
|
1933
|
+
this.configService.mentionScope = this.mentionScope;
|
|
1934
|
+
}
|
|
1757
1935
|
};
|
|
1758
1936
|
MessageInputComponent.prototype.ngOnDestroy = function () {
|
|
1759
1937
|
this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
|
|
1760
1938
|
};
|
|
1761
|
-
MessageInputComponent.prototype.messageSent = function (
|
|
1939
|
+
MessageInputComponent.prototype.messageSent = function () {
|
|
1762
1940
|
return __awaiter(this, void 0, void 0, function () {
|
|
1763
1941
|
var attachmentUploadInProgressCounter, attachments, text, error_1;
|
|
1764
1942
|
return __generator(this, function (_b) {
|
|
1765
1943
|
switch (_b.label) {
|
|
1766
1944
|
case 0:
|
|
1767
|
-
event === null || event === void 0 ? void 0 : event.preventDefault();
|
|
1768
1945
|
this.attachmentService.attachmentUploadInProgressCounter$
|
|
1769
1946
|
.pipe(operators.first())
|
|
1770
1947
|
.subscribe(function (counter) { return (attachmentUploadInProgressCounter = counter); });
|
|
@@ -1776,19 +1953,23 @@
|
|
|
1776
1953
|
return [2 /*return*/];
|
|
1777
1954
|
}
|
|
1778
1955
|
attachments = this.attachmentService.mapToAttachments();
|
|
1779
|
-
text = this.
|
|
1956
|
+
text = this.textareaValue;
|
|
1780
1957
|
if (!text && (!attachments || attachments.length === 0)) {
|
|
1781
1958
|
return [2 /*return*/];
|
|
1782
1959
|
}
|
|
1960
|
+
if (this.containsLinks && !this.canSendLinks) {
|
|
1961
|
+
this.notificationService.addTemporaryNotification('streamChat.Sending links is not allowed in this conversation');
|
|
1962
|
+
return [2 /*return*/];
|
|
1963
|
+
}
|
|
1783
1964
|
if (!this.isUpdate) {
|
|
1784
|
-
this.
|
|
1965
|
+
this.textareaValue = '';
|
|
1785
1966
|
}
|
|
1786
1967
|
_b.label = 1;
|
|
1787
1968
|
case 1:
|
|
1788
1969
|
_b.trys.push([1, 3, , 4]);
|
|
1789
1970
|
return [4 /*yield*/, (this.isUpdate
|
|
1790
1971
|
? this.channelService.updateMessage(Object.assign(Object.assign({}, this.message), { text: text, attachments: attachments }))
|
|
1791
|
-
: this.channelService.sendMessage(text, attachments))];
|
|
1972
|
+
: this.channelService.sendMessage(text, attachments, this.mentionedUsers))];
|
|
1792
1973
|
case 2:
|
|
1793
1974
|
_b.sent();
|
|
1794
1975
|
this.messageUpdate.emit();
|
|
@@ -1807,6 +1988,13 @@
|
|
|
1807
1988
|
});
|
|
1808
1989
|
});
|
|
1809
1990
|
};
|
|
1991
|
+
Object.defineProperty(MessageInputComponent.prototype, "containsLinks", {
|
|
1992
|
+
get: function () {
|
|
1993
|
+
return /(?:(?:https?|ftp):\/\/)?[\w/\-?=%.]+\.[\w/\-&?=%.]+/.test(this.textareaValue);
|
|
1994
|
+
},
|
|
1995
|
+
enumerable: false,
|
|
1996
|
+
configurable: true
|
|
1997
|
+
});
|
|
1810
1998
|
Object.defineProperty(MessageInputComponent.prototype, "accept", {
|
|
1811
1999
|
get: function () {
|
|
1812
2000
|
var _a;
|
|
@@ -1838,10 +2026,19 @@
|
|
|
1838
2026
|
enumerable: false,
|
|
1839
2027
|
configurable: true
|
|
1840
2028
|
});
|
|
2029
|
+
MessageInputComponent.prototype.initTextarea = function () {
|
|
2030
|
+
if (!this.canSendMessages || this.textareaRef || !this.textareaAnchor) {
|
|
2031
|
+
return;
|
|
2032
|
+
}
|
|
2033
|
+
var componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.textareaType);
|
|
2034
|
+
this.textareaRef =
|
|
2035
|
+
this.textareaAnchor.viewContainerRef.createComponent(componentFactory);
|
|
2036
|
+
this.cdRef.detectChanges();
|
|
2037
|
+
};
|
|
1841
2038
|
return MessageInputComponent;
|
|
1842
2039
|
}());
|
|
1843
|
-
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 }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1844
|
-
MessageInputComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: MessageInputComponent, selector: "stream-message-input", inputs: { isFileUploadEnabled: "isFileUploadEnabled", acceptedFileTypes: "acceptedFileTypes", isMultipleFileUploadEnabled: "isMultipleFileUploadEnabled", message: "message" }, outputs: { messageUpdate: "messageUpdate" }, providers: [AttachmentService], viewQueries: [{ propertyName: "
|
|
2040
|
+
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 });
|
|
2041
|
+
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": i1__namespace.TranslatePipe } });
|
|
1845
2042
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageInputComponent, decorators: [{
|
|
1846
2043
|
type: i0.Component,
|
|
1847
2044
|
args: [{
|
|
@@ -1850,7 +2047,18 @@
|
|
|
1850
2047
|
styles: [],
|
|
1851
2048
|
providers: [AttachmentService],
|
|
1852
2049
|
}]
|
|
1853
|
-
}], ctorParameters: function () {
|
|
2050
|
+
}], ctorParameters: function () {
|
|
2051
|
+
return [{ type: ChannelService }, { type: NotificationService }, { type: AttachmentService }, { type: MessageInputConfigService }, { type: i0__namespace.Type, decorators: [{
|
|
2052
|
+
type: i0.Inject,
|
|
2053
|
+
args: [textareaInjectionToken]
|
|
2054
|
+
}] }, { type: i0__namespace.ComponentFactoryResolver }, { type: i0__namespace.ChangeDetectorRef }];
|
|
2055
|
+
}, propDecorators: { isFileUploadEnabled: [{
|
|
2056
|
+
type: i0.Input
|
|
2057
|
+
}], areMentionsEnabled: [{
|
|
2058
|
+
type: i0.Input
|
|
2059
|
+
}], mentionScope: [{
|
|
2060
|
+
type: i0.Input
|
|
2061
|
+
}], mentionAutocompleteItemTemplate: [{
|
|
1854
2062
|
type: i0.Input
|
|
1855
2063
|
}], acceptedFileTypes: [{
|
|
1856
2064
|
type: i0.Input
|
|
@@ -1860,12 +2068,12 @@
|
|
|
1860
2068
|
type: i0.Input
|
|
1861
2069
|
}], messageUpdate: [{
|
|
1862
2070
|
type: i0.Output
|
|
1863
|
-
}], messageInput: [{
|
|
1864
|
-
type: i0.ViewChild,
|
|
1865
|
-
args: ['input']
|
|
1866
2071
|
}], fileInput: [{
|
|
1867
2072
|
type: i0.ViewChild,
|
|
1868
2073
|
args: ['fileInput']
|
|
2074
|
+
}], textareaAnchor: [{
|
|
2075
|
+
type: i0.ViewChild,
|
|
2076
|
+
args: [TextareaDirective, { static: false }]
|
|
1869
2077
|
}] } });
|
|
1870
2078
|
|
|
1871
2079
|
var ModalComponent = /** @class */ (function () {
|
|
@@ -1913,7 +2121,7 @@
|
|
|
1913
2121
|
return ModalComponent;
|
|
1914
2122
|
}());
|
|
1915
2123
|
ModalComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ModalComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1916
|
-
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:
|
|
2124
|
+
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: i1__namespace.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }] });
|
|
1917
2125
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ModalComponent, decorators: [{
|
|
1918
2126
|
type: i0.Component,
|
|
1919
2127
|
args: [{
|
|
@@ -1959,7 +2167,7 @@
|
|
|
1959
2167
|
return NotificationListComponent;
|
|
1960
2168
|
}());
|
|
1961
2169
|
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 });
|
|
1962
|
-
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\" translate>\n {{ notification.text }}\n </div></stream-notification\n >\n</div>\n", components: [{ type: NotificationComponent, selector: "stream-notification", inputs: ["type"] }], directives: [{ type:
|
|
2170
|
+
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\" translate>\n {{ notification.text }}\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"] }, { type: i1__namespace.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], pipes: { "async": i3__namespace.AsyncPipe } });
|
|
1963
2171
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: NotificationListComponent, decorators: [{
|
|
1964
2172
|
type: i0.Component,
|
|
1965
2173
|
args: [{
|
|
@@ -2114,7 +2322,7 @@
|
|
|
2114
2322
|
return MessageActionsBoxComponent;
|
|
2115
2323
|
}());
|
|
2116
2324
|
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 });
|
|
2117
|
-
MessageActionsBoxComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: MessageActionsBoxComponent, selector: "stream-message-actions-box", inputs: { 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\">\n <stream-message-input\n [message]=\"message\"\n (messageUpdate)=\"modalClosed()\"\n ></stream-message-input>\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", "acceptedFileTypes", "isMultipleFileUploadEnabled", "message"], outputs: ["messageUpdate"] }, { type: NotificationListComponent, selector: "stream-notification-list" }], directives: [{ type:
|
|
2325
|
+
MessageActionsBoxComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: MessageActionsBoxComponent, selector: "stream-message-actions-box", inputs: { 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 <stream-message-input\n [message]=\"message\"\n (messageUpdate)=\"modalClosed()\"\n ></stream-message-input>\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: i1__namespace.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], pipes: { "translate": i1__namespace.TranslatePipe } });
|
|
2118
2326
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageActionsBoxComponent, decorators: [{
|
|
2119
2327
|
type: i0.Component,
|
|
2120
2328
|
args: [{
|
|
@@ -2149,7 +2357,7 @@
|
|
|
2149
2357
|
return ChannelComponent;
|
|
2150
2358
|
}());
|
|
2151
2359
|
ChannelComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChannelComponent, deps: [{ token: ChannelService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2152
|
-
ChannelComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: ChannelComponent, selector: "stream-channel", ngImport: i0__namespace, template: "<div\n *ngIf=\"(isError$ | async) === false && (isInitializing$ | async) === false\"\n class=\"str-chat str-chat-channel messaging\"\n>\n <div class=\"str-chat__container\">\n <div class=\"str-chat__main-panel\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", directives: [{ type:
|
|
2360
|
+
ChannelComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: ChannelComponent, selector: "stream-channel", ngImport: i0__namespace, template: "<div\n *ngIf=\"(isError$ | async) === false && (isInitializing$ | async) === false\"\n class=\"str-chat str-chat-channel messaging\"\n>\n <div class=\"str-chat__container\">\n <div class=\"str-chat__main-panel\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3__namespace.AsyncPipe } });
|
|
2153
2361
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChannelComponent, decorators: [{
|
|
2154
2362
|
type: i0.Component,
|
|
2155
2363
|
args: [{
|
|
@@ -2228,7 +2436,16 @@
|
|
|
2228
2436
|
var _this = this;
|
|
2229
2437
|
this.channelService = channelService;
|
|
2230
2438
|
this.channelListToggleService = channelListToggleService;
|
|
2231
|
-
this.channelService.activeChannel$.subscribe(function (c) {
|
|
2439
|
+
this.channelService.activeChannel$.subscribe(function (c) {
|
|
2440
|
+
var _a, _b;
|
|
2441
|
+
_this.activeChannel = c;
|
|
2442
|
+
var capabilities = (_b = (_a = _this.activeChannel) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.own_capabilities;
|
|
2443
|
+
if (!capabilities) {
|
|
2444
|
+
return;
|
|
2445
|
+
}
|
|
2446
|
+
_this.canReceiveConnectEvents =
|
|
2447
|
+
capabilities.indexOf('connect-events') !== -1;
|
|
2448
|
+
});
|
|
2232
2449
|
}
|
|
2233
2450
|
ChannelHeaderComponent.prototype.toggleMenu = function (event) {
|
|
2234
2451
|
event.stopPropagation();
|
|
@@ -2253,7 +2470,7 @@
|
|
|
2253
2470
|
return ChannelHeaderComponent;
|
|
2254
2471
|
}());
|
|
2255
2472
|
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 });
|
|
2256
|
-
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 class=\"str-chat__header-livestream-left--title\">\n {{ activeChannel?.data?.name }}\n </p>\n <p class=\"str-chat__header-livestream-left--members\">\n {{'streamChat.{{ memberCount }} members' | translate:memberCountParam}}\n {{'streamChat.{{ watcherCount }} online'
|
|
2473
|
+
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": i1__namespace.TranslatePipe } });
|
|
2257
2474
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChannelHeaderComponent, decorators: [{
|
|
2258
2475
|
type: i0.Component,
|
|
2259
2476
|
args: [{
|
|
@@ -2270,21 +2487,25 @@
|
|
|
2270
2487
|
this.isUnread = false;
|
|
2271
2488
|
this.latestMessage = 'Nothing yet...';
|
|
2272
2489
|
this.subscriptions = [];
|
|
2490
|
+
this.canSendReadEvents = true;
|
|
2273
2491
|
}
|
|
2274
2492
|
ChannelPreviewComponent.prototype.ngOnInit = function () {
|
|
2275
2493
|
var _this = this;
|
|
2276
|
-
var _a, _b;
|
|
2494
|
+
var _a, _b, _c, _d;
|
|
2277
2495
|
this.subscriptions.push(this.channelService.activeChannel$.subscribe(function (activeChannel) { var _a; return (_this.isActive = (activeChannel === null || activeChannel === void 0 ? void 0 : activeChannel.id) === ((_a = _this.channel) === null || _a === void 0 ? void 0 : _a.id)); }));
|
|
2278
2496
|
var messages = (_b = (_a = this.channel) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.messages;
|
|
2279
2497
|
if (messages && messages.length > 0) {
|
|
2280
2498
|
this.setLatestMessage(messages[messages.length - 1]);
|
|
2281
2499
|
}
|
|
2282
|
-
this.isUnread = !!this.channel.countUnread();
|
|
2500
|
+
this.isUnread = !!this.channel.countUnread() && this.canSendReadEvents;
|
|
2501
|
+
var capabilities = ((_d = (_c = this.channel) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.own_capabilities) || [];
|
|
2502
|
+
this.canSendReadEvents = capabilities.indexOf('read-events') !== -1;
|
|
2283
2503
|
this.subscriptions.push(this.channel.on('message.new', this.handleMessageEvent.bind(this)));
|
|
2284
2504
|
this.subscriptions.push(this.channel.on('message.updated', this.handleMessageEvent.bind(this)));
|
|
2285
2505
|
this.subscriptions.push(this.channel.on('message.deleted', this.handleMessageEvent.bind(this)));
|
|
2286
2506
|
this.subscriptions.push(this.channel.on('channel.truncated', this.handleMessageEvent.bind(this)));
|
|
2287
|
-
this.subscriptions.push(this.channel.on('message.read', function () { return (_this.isUnread =
|
|
2507
|
+
this.subscriptions.push(this.channel.on('message.read', function () { return (_this.isUnread =
|
|
2508
|
+
!!_this.channel.countUnread() && _this.canSendReadEvents); }));
|
|
2288
2509
|
};
|
|
2289
2510
|
ChannelPreviewComponent.prototype.ngOnDestroy = function () {
|
|
2290
2511
|
this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
|
|
@@ -2327,7 +2548,7 @@
|
|
|
2327
2548
|
return;
|
|
2328
2549
|
}
|
|
2329
2550
|
this.setLatestMessage(event.message);
|
|
2330
|
-
this.isUnread = !!this.channel.countUnread();
|
|
2551
|
+
this.isUnread = !!this.channel.countUnread() && this.canSendReadEvents;
|
|
2331
2552
|
};
|
|
2332
2553
|
ChannelPreviewComponent.prototype.setLatestMessage = function (message) {
|
|
2333
2554
|
if (message === null || message === void 0 ? void 0 : message.deleted_at) {
|
|
@@ -2343,7 +2564,7 @@
|
|
|
2343
2564
|
return ChannelPreviewComponent;
|
|
2344
2565
|
}());
|
|
2345
2566
|
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 });
|
|
2346
|
-
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":
|
|
2567
|
+
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": i1__namespace.TranslatePipe } });
|
|
2347
2568
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChannelPreviewComponent, decorators: [{
|
|
2348
2569
|
type: i0.Component,
|
|
2349
2570
|
args: [{
|
|
@@ -2393,7 +2614,7 @@
|
|
|
2393
2614
|
return ChannelListComponent;
|
|
2394
2615
|
}());
|
|
2395
2616
|
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 });
|
|
2396
|
-
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:
|
|
2617
|
+
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": i1__namespace.TranslatePipe } });
|
|
2397
2618
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ChannelListComponent, decorators: [{
|
|
2398
2619
|
type: i0.Component,
|
|
2399
2620
|
args: [{
|
|
@@ -2444,12 +2665,12 @@
|
|
|
2444
2665
|
};
|
|
2445
2666
|
|
|
2446
2667
|
var emojiReactionsMapping = {
|
|
2447
|
-
like: '
|
|
2448
|
-
angry: '
|
|
2449
|
-
love: '
|
|
2450
|
-
haha: '
|
|
2451
|
-
wow: '
|
|
2452
|
-
sad: '
|
|
2668
|
+
like: '👍',
|
|
2669
|
+
angry: '😠',
|
|
2670
|
+
love: '❤️',
|
|
2671
|
+
haha: '😂',
|
|
2672
|
+
wow: '😮',
|
|
2673
|
+
sad: '😞',
|
|
2453
2674
|
};
|
|
2454
2675
|
var MessageReactionsComponent = /** @class */ (function () {
|
|
2455
2676
|
function MessageReactionsComponent(cdRef, channelService) {
|
|
@@ -2508,7 +2729,7 @@
|
|
|
2508
2729
|
var _a;
|
|
2509
2730
|
return (_a = this.latestReactions.find(function (r) { return r.type === reactionType && r.user; })) === null || _a === void 0 ? void 0 : _a.user;
|
|
2510
2731
|
};
|
|
2511
|
-
MessageReactionsComponent.prototype.
|
|
2732
|
+
MessageReactionsComponent.prototype.getEmojiByReaction = function (reactionType) {
|
|
2512
2733
|
return emojiReactionsMapping[reactionType];
|
|
2513
2734
|
};
|
|
2514
2735
|
MessageReactionsComponent.prototype.getUsersByReaction = function (reactionType) {
|
|
@@ -2560,13 +2781,13 @@
|
|
|
2560
2781
|
return MessageReactionsComponent;
|
|
2561
2782
|
}());
|
|
2562
2783
|
MessageReactionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageReactionsComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: ChannelService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2563
|
-
MessageReactionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: MessageReactionsComponent, selector: "stream-message-reactions", inputs: { messageId: "messageId", messageReactionCounts: "messageReactionCounts", isSelectorOpen: "isSelectorOpen", latestReactions: "latestReactions", ownReactions: "ownReactions" }, outputs: { isSelectorOpenChange: "isSelectorOpenChange" }, viewQueries: [{ propertyName: "selectorContainer", first: true, predicate: ["selectorContainer"], descendants: true }, { propertyName: "selectorTooltip", first: true, predicate: ["selectorTooltip"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n *ngIf=\"existingReactions.length > 0 && !isSelectorOpen\"\n class=\"str-chat__reaction-list\"\n [class.str-chat__reaction-list--reverse]=\"true\"\n data-testid=\"reaction-list\"\n>\n <ul>\n <li\n *ngFor=\"\n let reactionType of existingReactions;\n trackBy: trackByMessageReaction\n \"\n data-testclass=\"emoji\"\n >\n <
|
|
2784
|
+
MessageReactionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: MessageReactionsComponent, selector: "stream-message-reactions", inputs: { messageId: "messageId", messageReactionCounts: "messageReactionCounts", isSelectorOpen: "isSelectorOpen", latestReactions: "latestReactions", ownReactions: "ownReactions" }, outputs: { isSelectorOpenChange: "isSelectorOpenChange" }, viewQueries: [{ propertyName: "selectorContainer", first: true, predicate: ["selectorContainer"], descendants: true }, { propertyName: "selectorTooltip", first: true, predicate: ["selectorTooltip"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n *ngIf=\"existingReactions.length > 0 && !isSelectorOpen\"\n class=\"str-chat__reaction-list\"\n [class.str-chat__reaction-list--reverse]=\"true\"\n data-testid=\"reaction-list\"\n>\n <ul>\n <li\n *ngFor=\"\n let reactionType of existingReactions;\n trackBy: trackByMessageReaction\n \"\n data-testclass=\"emoji\"\n >\n <span class=\"emoji\">\n {{ getEmojiByReaction(reactionType) }}\n </span>\n \n </li>\n <li>\n <span\n data-testid=\"reactions-count\"\n class=\"str-chat__reaction-list--counter\"\n >{{ reactionsCount }}</span\n >\n </li>\n </ul>\n</div>\n\n<div\n #selectorContainer\n class=\"str-chat__reaction-selector\"\n *ngIf=\"isSelectorOpen\"\n data-testid=\"reaction-selector\"\n>\n <div\n *ngIf=\"tooltipText\"\n data-testid=\"tooltip\"\n #selectorTooltip\n class=\"str-chat__reaction-selector-tooltip\"\n [ngStyle]=\"{\n left: tooltipPositions?.tooltip + 'px',\n visibility: tooltipPositions ? 'visible' : 'hidden'\n }\"\n >\n <div\n class=\"arrow\"\n [ngStyle]=\"{ left: tooltipPositions?.arrow + 'px' }\"\n ></div>\n <span class=\"latest-user-username\">\n {{ tooltipText }}\n </span>\n </div>\n <ul class=\"str-chat__message-reactions-list\">\n <li\n class=\"str-chat__message-reactions-list-item\"\n *ngFor=\"\n let reactionType of reactionOptions;\n trackBy: trackByMessageReaction\n \"\n data-testclass=\"emoji-option\"\n (click)=\"react(reactionType)\"\n (keyup.enter)=\"react(reactionType)\"\n >\n <div\n *ngIf=\"getLatestUserByReaction(reactionType) as user\"\n class=\"latest-user\"\n (click)=\"hideTooltip()\"\n (keyup.enter)=\"hideTooltip()\"\n (mouseenter)=\"showTooltip($event, reactionType)\"\n (mouseleave)=\"hideTooltip()\"\n attr.data-testid=\"{{ reactionType }}-last-user\"\n >\n <stream-avatar\n attr.data-testid=\"{{ reactionType }}-avatar\"\n [imageUrl]=\"user.image\"\n [name]=\"user.name || user.id\"\n [size]=\"20\"\n ></stream-avatar>\n </div>\n <span class=\"emoji\" style=\"width: 20px; height: 20px; top: 10px\">\n {{ getEmojiByReaction(reactionType) }}\n </span>\n <span\n *ngIf=\"\n messageReactionCounts[reactionType] &&\n messageReactionCounts[reactionType]! > 0\n \"\n class=\"str-chat__message-reactions-list-item__count\"\n attr.data-testid=\"{{ reactionType }}-reaction-count\"\n >\n {{ messageReactionCounts[reactionType] }}\n </span>\n </li>\n </ul>\n</div>\n", styles: [".emoji {position: relative; display: inline-block; }"], components: [{ type: AvatarComponent, selector: "stream-avatar", inputs: ["name", "imageUrl", "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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
2564
2785
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageReactionsComponent, decorators: [{
|
|
2565
2786
|
type: i0.Component,
|
|
2566
2787
|
args: [{
|
|
2567
2788
|
selector: 'stream-message-reactions',
|
|
2568
2789
|
templateUrl: './message-reactions.component.html',
|
|
2569
|
-
styles: [],
|
|
2790
|
+
styles: ['.emoji {position: relative; display: inline-block; }'],
|
|
2570
2791
|
}]
|
|
2571
2792
|
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: ChannelService }]; }, propDecorators: { messageId: [{
|
|
2572
2793
|
type: i0.Input
|
|
@@ -2647,7 +2868,7 @@
|
|
|
2647
2868
|
return AttachmentListComponent;
|
|
2648
2869
|
}());
|
|
2649
2870
|
AttachmentListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: AttachmentListComponent, deps: [{ token: ImageLoadService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2650
|
-
AttachmentListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: AttachmentListComponent, selector: "stream-attachment-list", inputs: { attachments: "attachments" }, usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngFor=\"let attachment of orderedAttachments; trackBy: trackById\">\n <div\n data-testclass=\"attachment-container\"\n class=\"str-chat__message-attachment str-chat__message-attachment--{{\n attachment.type\n }}\"\n [class.str-chat__message-attachment--card]=\"isCard(attachment)\"\n [class.str-chat-angular__message-attachment-file-single]=\"\n isFile(attachment)\n \"\n >\n <img\n *ngIf=\"isImage(attachment)\"\n class=\"str-chat__message-attachment--img\"\n data-testclass=\"image\"\n [src]=\"attachment.img_url || attachment.thumb_url || attachment.image_url\"\n [alt]=\"attachment?.fallback\"\n (load)=\"imageLoaded()\"\n />\n <div\n *ngIf=\"isFile(attachment)\"\n class=\"\n str-chat__message-attachment-file--item\n str-chat-angular__message-attachment-file-single\n \"\n >\n <stream-icon icon=\"file\" [size]=\"30\"></stream-icon>\n <div class=\"str-chat__message-attachment-file--item-text\">\n <a\n data-testclass=\"file-link\"\n download\n href=\"{{ attachment.asset_url }}\"\n target=\"_blank\"\n >\n {{ attachment.title }}\n </a>\n <span data-testclass=\"size\" *ngIf=\"hasFileSize(attachment)\">{{\n getFileSize(attachment)\n }}</span>\n </div>\n </div>\n <div\n *ngIf=\"isCard(attachment)\"\n class=\"str-chat__message-attachment-card str-chat__message-attachment-card--{{\n attachment.type\n }}\"\n >\n <div\n *ngIf=\"attachment.image_url || attachment.thumb_url\"\n class=\"str-chat__message-attachment-card--header\"\n >\n <img\n data-testclass=\"card-img\"\n alt=\"{{ attachment.image_url || attachment.thumb_url }}\"\n src=\"{{ attachment.image_url || attachment.thumb_url }}\"\n />\n </div>\n <div class=\"str-chat__message-attachment-card--content\">\n <div class=\"str-chat__message-attachment-card--flex\">\n <div\n *ngIf=\"attachment.title\"\n data-testclass=\"card-title\"\n class=\"str-chat__message-attachment-card--title\"\n >\n {{ attachment.title }}\n </div>\n <div\n *ngIf=\"attachment.text\"\n class=\"str-chat__message-attachment-card--text\"\n data-testclass=\"card-text\"\n >\n {{ attachment.text }}\n </div>\n <a\n class=\"str-chat__message-attachment-card--url\"\n *ngIf=\"attachment.title_link || attachment.og_scrape_url\"\n data-testclass=\"url-link\"\n noopener\n noreferrer\n href=\"{{ attachment.title_link || attachment.og_scrape_url }}\"\n target=\"_blank\"\n >\n {{ trimUrl(attachment.title_link || attachment.og_scrape_url) }}\n </a>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n", components: [{ type: IconComponent, selector: "stream-icon", inputs: ["icon", "size"] }], directives: [{ type:
|
|
2871
|
+
AttachmentListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: AttachmentListComponent, selector: "stream-attachment-list", inputs: { attachments: "attachments" }, usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngFor=\"let attachment of orderedAttachments; trackBy: trackById\">\n <div\n data-testclass=\"attachment-container\"\n class=\"str-chat__message-attachment str-chat__message-attachment--{{\n attachment.type\n }}\"\n [class.str-chat__message-attachment--card]=\"isCard(attachment)\"\n [class.str-chat-angular__message-attachment-file-single]=\"\n isFile(attachment)\n \"\n >\n <img\n *ngIf=\"isImage(attachment)\"\n class=\"str-chat__message-attachment--img\"\n data-testclass=\"image\"\n [src]=\"attachment.img_url || attachment.thumb_url || attachment.image_url\"\n [alt]=\"attachment?.fallback\"\n (load)=\"imageLoaded()\"\n />\n <div\n *ngIf=\"isFile(attachment)\"\n class=\"\n str-chat__message-attachment-file--item\n str-chat-angular__message-attachment-file-single\n \"\n >\n <stream-icon icon=\"file\" [size]=\"30\"></stream-icon>\n <div class=\"str-chat__message-attachment-file--item-text\">\n <a\n data-testclass=\"file-link\"\n download\n href=\"{{ attachment.asset_url }}\"\n target=\"_blank\"\n >\n {{ attachment.title }}\n </a>\n <span data-testclass=\"size\" *ngIf=\"hasFileSize(attachment)\">{{\n getFileSize(attachment)\n }}</span>\n </div>\n </div>\n <div\n *ngIf=\"isCard(attachment)\"\n class=\"str-chat__message-attachment-card str-chat__message-attachment-card--{{\n attachment.type\n }}\"\n >\n <div\n *ngIf=\"attachment.image_url || attachment.thumb_url\"\n class=\"str-chat__message-attachment-card--header\"\n >\n <img\n data-testclass=\"card-img\"\n alt=\"{{ attachment.image_url || attachment.thumb_url }}\"\n src=\"{{ attachment.image_url || attachment.thumb_url }}\"\n />\n </div>\n <div class=\"str-chat__message-attachment-card--content\">\n <div class=\"str-chat__message-attachment-card--flex\">\n <div\n *ngIf=\"attachment.title\"\n data-testclass=\"card-title\"\n class=\"str-chat__message-attachment-card--title\"\n >\n {{ attachment.title }}\n </div>\n <div\n *ngIf=\"attachment.text\"\n class=\"str-chat__message-attachment-card--text\"\n data-testclass=\"card-text\"\n >\n {{ attachment.text }}\n </div>\n <a\n class=\"str-chat__message-attachment-card--url\"\n *ngIf=\"attachment.title_link || attachment.og_scrape_url\"\n data-testclass=\"url-link\"\n noopener\n noreferrer\n href=\"{{ attachment.title_link || attachment.og_scrape_url }}\"\n target=\"_blank\"\n >\n {{ trimUrl(attachment.title_link || attachment.og_scrape_url) }}\n </a>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n", components: [{ type: IconComponent, selector: "stream-icon", inputs: ["icon", "size"] }], directives: [{ type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
2651
2872
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: AttachmentListComponent, decorators: [{
|
|
2652
2873
|
type: i0.Component,
|
|
2653
2874
|
args: [{
|
|
@@ -2659,6 +2880,30 @@
|
|
|
2659
2880
|
type: i0.Input
|
|
2660
2881
|
}] } });
|
|
2661
2882
|
|
|
2883
|
+
var HighlightMentionsPipe = /** @class */ (function () {
|
|
2884
|
+
function HighlightMentionsPipe() {
|
|
2885
|
+
}
|
|
2886
|
+
HighlightMentionsPipe.prototype.transform = function (value, mentionedUsers) {
|
|
2887
|
+
if (!value || !mentionedUsers) {
|
|
2888
|
+
return value || '';
|
|
2889
|
+
}
|
|
2890
|
+
var result = value;
|
|
2891
|
+
mentionedUsers.forEach(function (u) {
|
|
2892
|
+
result = result.replace(new RegExp("@" + (u.name || u.id), 'g'), "<b>@" + (u.name || u.id) + "</b>");
|
|
2893
|
+
});
|
|
2894
|
+
return result;
|
|
2895
|
+
};
|
|
2896
|
+
return HighlightMentionsPipe;
|
|
2897
|
+
}());
|
|
2898
|
+
HighlightMentionsPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: HighlightMentionsPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
2899
|
+
HighlightMentionsPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: HighlightMentionsPipe, name: "highlightMentions" });
|
|
2900
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: HighlightMentionsPipe, decorators: [{
|
|
2901
|
+
type: i0.Pipe,
|
|
2902
|
+
args: [{
|
|
2903
|
+
name: 'highlightMentions',
|
|
2904
|
+
}]
|
|
2905
|
+
}] });
|
|
2906
|
+
|
|
2662
2907
|
var MessageComponent = /** @class */ (function () {
|
|
2663
2908
|
function MessageComponent(chatClientService, channelService) {
|
|
2664
2909
|
this.chatClientService = chatClientService;
|
|
@@ -2786,7 +3031,7 @@
|
|
|
2786
3031
|
return MessageComponent;
|
|
2787
3032
|
}());
|
|
2788
3033
|
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 });
|
|
2789
|
-
MessageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: MessageComponent, selector: "stream-message", inputs: { message: "message", enabledMessageActions: "enabledMessageActions", areReactionsEnabled: "areReactionsEnabled", canReactToMessage: "canReactToMessage", isLastSentMessage: "isLastSentMessage" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: 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 *ngIf=\"isMessageDeliveredAndRead; else deliveredStatus\">\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 ></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 [innerHTML]=\"message?.html || message?.text\"\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: ["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: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i8__namespace.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], pipes: { "translate": i8__namespace.TranslatePipe } });
|
|
3034
|
+
MessageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: MessageComponent, selector: "stream-message", inputs: { message: "message", enabledMessageActions: "enabledMessageActions", areReactionsEnabled: "areReactionsEnabled", canReactToMessage: "canReactToMessage", isLastSentMessage: "isLastSentMessage", canReceiveReadEvents: "canReceiveReadEvents" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: 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 ></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 [innerHTML]=\"\n message?.html || message?.text\n | highlightMentions: message?.mentioned_users\n \"\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: ["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: i1__namespace.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], pipes: { "translate": i1__namespace.TranslatePipe, "highlightMentions": HighlightMentionsPipe } });
|
|
2790
3035
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageComponent, decorators: [{
|
|
2791
3036
|
type: i0.Component,
|
|
2792
3037
|
args: [{
|
|
@@ -2804,11 +3049,226 @@
|
|
|
2804
3049
|
type: i0.Input
|
|
2805
3050
|
}], isLastSentMessage: [{
|
|
2806
3051
|
type: i0.Input
|
|
3052
|
+
}], canReceiveReadEvents: [{
|
|
3053
|
+
type: i0.Input
|
|
2807
3054
|
}], container: [{
|
|
2808
3055
|
type: i0.ViewChild,
|
|
2809
3056
|
args: ['container']
|
|
2810
3057
|
}] } });
|
|
2811
3058
|
|
|
3059
|
+
var TextareaComponent = /** @class */ (function () {
|
|
3060
|
+
function TextareaComponent() {
|
|
3061
|
+
this.class = 'str-chat__textarea';
|
|
3062
|
+
this.value = '';
|
|
3063
|
+
this.valueChange = new i0.EventEmitter();
|
|
3064
|
+
this.send = new i0.EventEmitter();
|
|
3065
|
+
}
|
|
3066
|
+
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
|
|
3067
|
+
TextareaComponent.prototype.ngOnChanges = function () { };
|
|
3068
|
+
TextareaComponent.prototype.inputChanged = function () {
|
|
3069
|
+
this.valueChange.emit(this.messageInput.nativeElement.value);
|
|
3070
|
+
};
|
|
3071
|
+
TextareaComponent.prototype.sent = function (event) {
|
|
3072
|
+
event.preventDefault();
|
|
3073
|
+
this.send.next();
|
|
3074
|
+
};
|
|
3075
|
+
return TextareaComponent;
|
|
3076
|
+
}());
|
|
3077
|
+
TextareaComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: TextareaComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3078
|
+
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": i1__namespace.TranslatePipe } });
|
|
3079
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: TextareaComponent, decorators: [{
|
|
3080
|
+
type: i0.Component,
|
|
3081
|
+
args: [{
|
|
3082
|
+
selector: 'stream-textarea',
|
|
3083
|
+
templateUrl: './textarea.component.html',
|
|
3084
|
+
styles: [],
|
|
3085
|
+
}]
|
|
3086
|
+
}], ctorParameters: function () { return []; }, propDecorators: { class: [{
|
|
3087
|
+
type: i0.HostBinding
|
|
3088
|
+
}], value: [{
|
|
3089
|
+
type: i0.Input
|
|
3090
|
+
}], valueChange: [{
|
|
3091
|
+
type: i0.Output
|
|
3092
|
+
}], send: [{
|
|
3093
|
+
type: i0.Output
|
|
3094
|
+
}], messageInput: [{
|
|
3095
|
+
type: i0.ViewChild,
|
|
3096
|
+
args: ['input']
|
|
3097
|
+
}] } });
|
|
3098
|
+
|
|
3099
|
+
var TransliterationService = /** @class */ (function () {
|
|
3100
|
+
function TransliterationService() {
|
|
3101
|
+
}
|
|
3102
|
+
TransliterationService.prototype.transliterate = function (s) {
|
|
3103
|
+
return transliterate__default['default'](s);
|
|
3104
|
+
};
|
|
3105
|
+
return TransliterationService;
|
|
3106
|
+
}());
|
|
3107
|
+
TransliterationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: TransliterationService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
3108
|
+
TransliterationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: TransliterationService, providedIn: 'root' });
|
|
3109
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: TransliterationService, decorators: [{
|
|
3110
|
+
type: i0.Injectable,
|
|
3111
|
+
args: [{ providedIn: 'root' }]
|
|
3112
|
+
}], ctorParameters: function () { return []; } });
|
|
3113
|
+
|
|
3114
|
+
var AutocompleteTextareaComponent = /** @class */ (function () {
|
|
3115
|
+
function AutocompleteTextareaComponent(channelService, chatClientService, transliterationService) {
|
|
3116
|
+
var _this = this;
|
|
3117
|
+
this.channelService = channelService;
|
|
3118
|
+
this.chatClientService = chatClientService;
|
|
3119
|
+
this.transliterationService = transliterationService;
|
|
3120
|
+
this.class = 'str-chat__textarea';
|
|
3121
|
+
this.value = '';
|
|
3122
|
+
this.areMentionsEnabled = true;
|
|
3123
|
+
this.mentionScope = 'channel';
|
|
3124
|
+
this.valueChange = new i0.EventEmitter();
|
|
3125
|
+
this.send = new i0.EventEmitter();
|
|
3126
|
+
this.userMentions = new i0.EventEmitter();
|
|
3127
|
+
this.labelKey = 'autocompleteLabel';
|
|
3128
|
+
this.triggerChar = '@';
|
|
3129
|
+
this.autocompleteConfig = {
|
|
3130
|
+
mentions: [],
|
|
3131
|
+
};
|
|
3132
|
+
this.subscriptions = [];
|
|
3133
|
+
this.mentionedUsers = [];
|
|
3134
|
+
this.userMentionConfig = {
|
|
3135
|
+
triggerChar: this.triggerChar,
|
|
3136
|
+
dropUp: true,
|
|
3137
|
+
labelKey: this.labelKey,
|
|
3138
|
+
mentionFilter: function (searchString, items) { return _this.filter(searchString, items); },
|
|
3139
|
+
mentionSelect: function (item, triggerChar) { return _this.mentioned(item, triggerChar); },
|
|
3140
|
+
};
|
|
3141
|
+
this.searchTerm$ = new rxjs.BehaviorSubject('');
|
|
3142
|
+
this.searchTerm$
|
|
3143
|
+
.pipe(operators.debounceTime(300), operators.distinctUntilChanged())
|
|
3144
|
+
.subscribe(function (searchTerm) { return void _this.updateMentionOptions(searchTerm); });
|
|
3145
|
+
this.subscriptions.push(this.channelService.activeChannel$.subscribe(function () {
|
|
3146
|
+
_this.mentionedUsers = [];
|
|
3147
|
+
_this.userMentions.next(__spreadArray([], __read(_this.mentionedUsers)));
|
|
3148
|
+
void _this.updateMentionOptions(_this.searchTerm$.getValue());
|
|
3149
|
+
}));
|
|
3150
|
+
}
|
|
3151
|
+
AutocompleteTextareaComponent.prototype.ngOnChanges = function (changes) {
|
|
3152
|
+
if (changes.areMentionsEnabled) {
|
|
3153
|
+
if (this.areMentionsEnabled) {
|
|
3154
|
+
this.autocompleteConfig.mentions = [this.userMentionConfig];
|
|
3155
|
+
this.autocompleteConfig = Object.assign({}, this.autocompleteConfig);
|
|
3156
|
+
}
|
|
3157
|
+
else {
|
|
3158
|
+
this.autocompleteConfig.mentions = [];
|
|
3159
|
+
this.autocompleteConfig = Object.assign({}, this.autocompleteConfig);
|
|
3160
|
+
}
|
|
3161
|
+
}
|
|
3162
|
+
if (changes.mentionScope) {
|
|
3163
|
+
void this.updateMentionOptions(this.searchTerm$.getValue());
|
|
3164
|
+
}
|
|
3165
|
+
};
|
|
3166
|
+
AutocompleteTextareaComponent.prototype.filter = function (searchString, items) {
|
|
3167
|
+
var _this = this;
|
|
3168
|
+
return items.filter(function (item) { return _this.transliterate(item.autocompleteLabel.toLowerCase()).includes(_this.transliterate(searchString.toLowerCase())); });
|
|
3169
|
+
};
|
|
3170
|
+
AutocompleteTextareaComponent.prototype.mentioned = function (item, triggerChar) {
|
|
3171
|
+
if (triggerChar === void 0) { triggerChar = ''; }
|
|
3172
|
+
this.mentionedUsers.push((item.user ? item.user : item));
|
|
3173
|
+
this.userMentions.next(__spreadArray([], __read(this.mentionedUsers)));
|
|
3174
|
+
return triggerChar + item.autocompleteLabel;
|
|
3175
|
+
};
|
|
3176
|
+
AutocompleteTextareaComponent.prototype.autcompleteSearchTermChanged = function (searchTerm) {
|
|
3177
|
+
this.searchTerm$.next(searchTerm);
|
|
3178
|
+
};
|
|
3179
|
+
AutocompleteTextareaComponent.prototype.inputChanged = function () {
|
|
3180
|
+
this.valueChange.emit(this.messageInput.nativeElement.value);
|
|
3181
|
+
};
|
|
3182
|
+
AutocompleteTextareaComponent.prototype.inputLeft = function () {
|
|
3183
|
+
this.updateMentionedUsersFromText();
|
|
3184
|
+
};
|
|
3185
|
+
AutocompleteTextareaComponent.prototype.sent = function (event) {
|
|
3186
|
+
event.preventDefault();
|
|
3187
|
+
this.updateMentionedUsersFromText();
|
|
3188
|
+
this.send.next();
|
|
3189
|
+
};
|
|
3190
|
+
AutocompleteTextareaComponent.prototype.transliterate = function (s) {
|
|
3191
|
+
if (this.transliterationService) {
|
|
3192
|
+
return this.transliterationService.transliterate(s);
|
|
3193
|
+
}
|
|
3194
|
+
else {
|
|
3195
|
+
return s;
|
|
3196
|
+
}
|
|
3197
|
+
};
|
|
3198
|
+
AutocompleteTextareaComponent.prototype.updateMentionOptions = function (searchTerm) {
|
|
3199
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3200
|
+
var request, result, items;
|
|
3201
|
+
var _this = this;
|
|
3202
|
+
return __generator(this, function (_a) {
|
|
3203
|
+
switch (_a.label) {
|
|
3204
|
+
case 0:
|
|
3205
|
+
if (!this.areMentionsEnabled) {
|
|
3206
|
+
return [2 /*return*/];
|
|
3207
|
+
}
|
|
3208
|
+
request = this.mentionScope === 'application'
|
|
3209
|
+
? function (s) { return _this.chatClientService.autocompleteUsers(s); }
|
|
3210
|
+
: function (s) { return _this.channelService.autocompleteMembers(s); };
|
|
3211
|
+
return [4 /*yield*/, request(searchTerm || '')];
|
|
3212
|
+
case 1:
|
|
3213
|
+
result = _a.sent();
|
|
3214
|
+
items = this.filter(searchTerm || '', result.map(function (i) {
|
|
3215
|
+
var user = (i.user ? i.user : i);
|
|
3216
|
+
return Object.assign(Object.assign({}, i), { autocompleteLabel: user.name || user.id, type: 'mention' });
|
|
3217
|
+
}));
|
|
3218
|
+
this.userMentionConfig.items = items;
|
|
3219
|
+
this.autocompleteConfig.mentions = [this.userMentionConfig];
|
|
3220
|
+
this.autocompleteConfig = Object.assign({}, this.autocompleteConfig);
|
|
3221
|
+
return [2 /*return*/];
|
|
3222
|
+
}
|
|
3223
|
+
});
|
|
3224
|
+
});
|
|
3225
|
+
};
|
|
3226
|
+
AutocompleteTextareaComponent.prototype.updateMentionedUsersFromText = function () {
|
|
3227
|
+
var _this = this;
|
|
3228
|
+
var updatedMentionedUsers = [];
|
|
3229
|
+
this.mentionedUsers.forEach(function (u) {
|
|
3230
|
+
var key = u.name || u.id;
|
|
3231
|
+
if (_this.value.includes("" + _this.triggerChar + key)) {
|
|
3232
|
+
updatedMentionedUsers.push(u);
|
|
3233
|
+
}
|
|
3234
|
+
});
|
|
3235
|
+
if (updatedMentionedUsers.length !== this.mentionedUsers.length) {
|
|
3236
|
+
this.userMentions.next(__spreadArray([], __read(updatedMentionedUsers)));
|
|
3237
|
+
this.mentionedUsers = updatedMentionedUsers;
|
|
3238
|
+
}
|
|
3239
|
+
};
|
|
3240
|
+
return AutocompleteTextareaComponent;
|
|
3241
|
+
}());
|
|
3242
|
+
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 });
|
|
3243
|
+
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": i1__namespace.TranslatePipe } });
|
|
3244
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: AutocompleteTextareaComponent, decorators: [{
|
|
3245
|
+
type: i0.Component,
|
|
3246
|
+
args: [{
|
|
3247
|
+
selector: 'stream-autocomplete-textarea',
|
|
3248
|
+
templateUrl: './autocomplete-textarea.component.html',
|
|
3249
|
+
styles: [],
|
|
3250
|
+
}]
|
|
3251
|
+
}], ctorParameters: function () { return [{ type: ChannelService }, { type: ChatClientService }, { type: TransliterationService }]; }, propDecorators: { class: [{
|
|
3252
|
+
type: i0.HostBinding
|
|
3253
|
+
}], value: [{
|
|
3254
|
+
type: i0.Input
|
|
3255
|
+
}], areMentionsEnabled: [{
|
|
3256
|
+
type: i0.Input
|
|
3257
|
+
}], mentionAutocompleteItemTemplate: [{
|
|
3258
|
+
type: i0.Input
|
|
3259
|
+
}], mentionScope: [{
|
|
3260
|
+
type: i0.Input
|
|
3261
|
+
}], valueChange: [{
|
|
3262
|
+
type: i0.Output
|
|
3263
|
+
}], send: [{
|
|
3264
|
+
type: i0.Output
|
|
3265
|
+
}], userMentions: [{
|
|
3266
|
+
type: i0.Output
|
|
3267
|
+
}], messageInput: [{
|
|
3268
|
+
type: i0.ViewChild,
|
|
3269
|
+
args: ['input']
|
|
3270
|
+
}] } });
|
|
3271
|
+
|
|
2812
3272
|
var getGroupStyles = function (message, previousMessage, nextMessage, noGroupByUser) {
|
|
2813
3273
|
if (noGroupByUser === void 0) { noGroupByUser = false; }
|
|
2814
3274
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -2878,6 +3338,7 @@
|
|
|
2878
3338
|
var capabilites = (_a = channel === null || channel === void 0 ? void 0 : channel.data) === null || _a === void 0 ? void 0 : _a.own_capabilities;
|
|
2879
3339
|
if (capabilites) {
|
|
2880
3340
|
_this.canReactToMessage = capabilites.indexOf('send-reaction') !== -1;
|
|
3341
|
+
_this.canReceiveReadEvents = capabilites.indexOf('read-events') !== -1;
|
|
2881
3342
|
_this.authorizedMessageActions = [];
|
|
2882
3343
|
if (capabilites.indexOf('flag-message') !== -1) {
|
|
2883
3344
|
_this.authorizedMessageActions.push('flag');
|
|
@@ -3010,7 +3471,7 @@
|
|
|
3010
3471
|
return MessageListComponent;
|
|
3011
3472
|
}());
|
|
3012
3473
|
MessageListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageListComponent, deps: [{ token: ChannelService }, { token: ChatClientService }, { token: ImageLoadService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3013
|
-
MessageListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: MessageListComponent, selector: "stream-message-list", inputs: { messageTemplate: "messageTemplate", areReactionsEnabled: "areReactionsEnabled", enabledMessageActionsInput: ["enabledMessageActions", "enabledMessageActionsInput"] }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n #scrollContainer\n data-testid=\"scroll-container\"\n class=\"str-chat__list\"\n (scroll)=\"scrolled()\"\n>\n <div class=\"str-chat__reverse-infinite-scroll\">\n <ul class=\"str-chat__ul\">\n <li\n data-testclass=\"message\"\n *ngFor=\"\n let message of messages$ | async;\n let i = index;\n trackBy: trackByMessageId\n \"\n class=\"str-chat__li str-chat__li--{{ groupStyles[i] }}\"\n >\n <ng-container *ngIf=\"messageTemplate; else defaultMessageTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n messageTemplate;\n context: {\n message: message,\n areReactionsEnabled: areReactionsEnabled,\n canReactToMessage: canReactToMessage,\n lastSentMessageId: !!(\n lastSentMessageId && message?.id === lastSentMessageId\n )\n }\n \"\n ></ng-container>\n </ng-container>\n <ng-template #defaultMessageTemplate>\n <stream-message\n [message]=\"message\"\n [areReactionsEnabled]=\"areReactionsEnabled\"\n [canReactToMessage]=\"canReactToMessage\"\n [isLastSentMessage]=\"\n !!(lastSentMessageId && message?.id === lastSentMessageId)\n \"\n [enabledMessageActions]=\"enabledMessageActions\"\n ></stream-message>\n </ng-template>\n </li>\n </ul>\n </div>\n</div>\n<div class=\"str-chat__list-notifications\">\n <button\n data-testid=\"scroll-to-bottom\"\n *ngIf=\"isUserScrolledUp\"\n class=\"\n str-chat__message-notification\n str-chat__message-notification-right\n str-chat__message-notification-scroll-down\n \"\n (keyup.enter)=\"scrollToBottom()\"\n (click)=\"scrollToBottom()\"\n >\n <div\n *ngIf=\"unreadMessageCount > 0\"\n class=\"\n str-chat__message-notification\n str-chat__message-notification-scroll-down-unread-count\n \"\n >\n {{ unreadMessageCount }}\n </div>\n </button>\n</div>\n", components: [{ type: MessageComponent, selector: "stream-message", inputs: ["message", "enabledMessageActions", "areReactionsEnabled", "canReactToMessage", "isLastSentMessage"] }], directives: [{ type:
|
|
3474
|
+
MessageListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: MessageListComponent, selector: "stream-message-list", inputs: { messageTemplate: "messageTemplate", areReactionsEnabled: "areReactionsEnabled", enabledMessageActionsInput: ["enabledMessageActions", "enabledMessageActionsInput"] }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div\n #scrollContainer\n data-testid=\"scroll-container\"\n class=\"str-chat__list\"\n (scroll)=\"scrolled()\"\n>\n <div class=\"str-chat__reverse-infinite-scroll\">\n <ul class=\"str-chat__ul\">\n <li\n data-testclass=\"message\"\n *ngFor=\"\n let message of messages$ | async;\n let i = index;\n trackBy: trackByMessageId\n \"\n class=\"str-chat__li str-chat__li--{{ groupStyles[i] }}\"\n >\n <ng-container *ngIf=\"messageTemplate; else defaultMessageTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n messageTemplate;\n context: {\n message: message,\n areReactionsEnabled: areReactionsEnabled,\n canReactToMessage: canReactToMessage,\n lastSentMessageId: !!(\n lastSentMessageId && message?.id === lastSentMessageId\n ),\n canReceiveReadEvents: canReceiveReadEvents\n }\n \"\n ></ng-container>\n </ng-container>\n <ng-template #defaultMessageTemplate>\n <stream-message\n [message]=\"message\"\n [areReactionsEnabled]=\"areReactionsEnabled\"\n [canReactToMessage]=\"canReactToMessage\"\n [isLastSentMessage]=\"\n !!(lastSentMessageId && message?.id === lastSentMessageId)\n \"\n [enabledMessageActions]=\"enabledMessageActions\"\n [canReceiveReadEvents]=\"canReceiveReadEvents\"\n ></stream-message>\n </ng-template>\n </li>\n </ul>\n </div>\n</div>\n<div class=\"str-chat__list-notifications\">\n <button\n data-testid=\"scroll-to-bottom\"\n *ngIf=\"isUserScrolledUp\"\n class=\"\n str-chat__message-notification\n str-chat__message-notification-right\n str-chat__message-notification-scroll-down\n \"\n (keyup.enter)=\"scrollToBottom()\"\n (click)=\"scrollToBottom()\"\n >\n <div\n *ngIf=\"unreadMessageCount > 0\"\n class=\"\n str-chat__message-notification\n str-chat__message-notification-scroll-down-unread-count\n \"\n >\n {{ unreadMessageCount }}\n </div>\n </button>\n</div>\n", components: [{ type: MessageComponent, selector: "stream-message", inputs: ["message", "enabledMessageActions", "areReactionsEnabled", "canReactToMessage", "isLastSentMessage", "canReceiveReadEvents"] }], directives: [{ type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i3__namespace.AsyncPipe } });
|
|
3014
3475
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageListComponent, decorators: [{
|
|
3015
3476
|
type: i0.Component,
|
|
3016
3477
|
args: [{
|
|
@@ -3033,14 +3494,30 @@
|
|
|
3033
3494
|
args: ['scrollContainer']
|
|
3034
3495
|
}] } });
|
|
3035
3496
|
|
|
3497
|
+
var StreamAvatarModule = /** @class */ (function () {
|
|
3498
|
+
function StreamAvatarModule() {
|
|
3499
|
+
}
|
|
3500
|
+
return StreamAvatarModule;
|
|
3501
|
+
}());
|
|
3502
|
+
StreamAvatarModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAvatarModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
3503
|
+
StreamAvatarModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAvatarModule, declarations: [AvatarComponent], imports: [i3.CommonModule, i1.TranslateModule], exports: [AvatarComponent] });
|
|
3504
|
+
StreamAvatarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAvatarModule, imports: [[i3.CommonModule, i1.TranslateModule]] });
|
|
3505
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAvatarModule, decorators: [{
|
|
3506
|
+
type: i0.NgModule,
|
|
3507
|
+
args: [{
|
|
3508
|
+
declarations: [AvatarComponent],
|
|
3509
|
+
imports: [i3.CommonModule, i1.TranslateModule],
|
|
3510
|
+
exports: [AvatarComponent],
|
|
3511
|
+
}]
|
|
3512
|
+
}] });
|
|
3513
|
+
|
|
3036
3514
|
var StreamChatModule = /** @class */ (function () {
|
|
3037
3515
|
function StreamChatModule() {
|
|
3038
3516
|
}
|
|
3039
3517
|
return StreamChatModule;
|
|
3040
3518
|
}());
|
|
3041
3519
|
StreamChatModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamChatModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
3042
|
-
StreamChatModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamChatModule, declarations: [
|
|
3043
|
-
ChannelComponent,
|
|
3520
|
+
StreamChatModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamChatModule, declarations: [ChannelComponent,
|
|
3044
3521
|
ChannelHeaderComponent,
|
|
3045
3522
|
ChannelListComponent,
|
|
3046
3523
|
ChannelPreviewComponent,
|
|
@@ -3055,8 +3532,9 @@
|
|
|
3055
3532
|
NotificationComponent,
|
|
3056
3533
|
NotificationListComponent,
|
|
3057
3534
|
AttachmentPreviewListComponent,
|
|
3058
|
-
ModalComponent
|
|
3059
|
-
|
|
3535
|
+
ModalComponent,
|
|
3536
|
+
TextareaDirective,
|
|
3537
|
+
HighlightMentionsPipe], imports: [i3.CommonModule, i1.TranslateModule, StreamAvatarModule], exports: [ChannelComponent,
|
|
3060
3538
|
ChannelHeaderComponent,
|
|
3061
3539
|
ChannelListComponent,
|
|
3062
3540
|
ChannelPreviewComponent,
|
|
@@ -3071,13 +3549,13 @@
|
|
|
3071
3549
|
NotificationComponent,
|
|
3072
3550
|
NotificationListComponent,
|
|
3073
3551
|
AttachmentPreviewListComponent,
|
|
3074
|
-
ModalComponent
|
|
3075
|
-
|
|
3552
|
+
ModalComponent,
|
|
3553
|
+
HighlightMentionsPipe] });
|
|
3554
|
+
StreamChatModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamChatModule, imports: [[i3.CommonModule, i1.TranslateModule, StreamAvatarModule]] });
|
|
3076
3555
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamChatModule, decorators: [{
|
|
3077
3556
|
type: i0.NgModule,
|
|
3078
3557
|
args: [{
|
|
3079
3558
|
declarations: [
|
|
3080
|
-
AvatarComponent,
|
|
3081
3559
|
ChannelComponent,
|
|
3082
3560
|
ChannelHeaderComponent,
|
|
3083
3561
|
ChannelListComponent,
|
|
@@ -3094,10 +3572,11 @@
|
|
|
3094
3572
|
NotificationListComponent,
|
|
3095
3573
|
AttachmentPreviewListComponent,
|
|
3096
3574
|
ModalComponent,
|
|
3575
|
+
TextareaDirective,
|
|
3576
|
+
HighlightMentionsPipe,
|
|
3097
3577
|
],
|
|
3098
|
-
imports: [
|
|
3578
|
+
imports: [i3.CommonModule, i1.TranslateModule, StreamAvatarModule],
|
|
3099
3579
|
exports: [
|
|
3100
|
-
AvatarComponent,
|
|
3101
3580
|
ChannelComponent,
|
|
3102
3581
|
ChannelHeaderComponent,
|
|
3103
3582
|
ChannelListComponent,
|
|
@@ -3114,6 +3593,63 @@
|
|
|
3114
3593
|
NotificationListComponent,
|
|
3115
3594
|
AttachmentPreviewListComponent,
|
|
3116
3595
|
ModalComponent,
|
|
3596
|
+
HighlightMentionsPipe,
|
|
3597
|
+
],
|
|
3598
|
+
}]
|
|
3599
|
+
}] });
|
|
3600
|
+
|
|
3601
|
+
var StreamAutocompleteTextareaModule = /** @class */ (function () {
|
|
3602
|
+
function StreamAutocompleteTextareaModule() {
|
|
3603
|
+
}
|
|
3604
|
+
return StreamAutocompleteTextareaModule;
|
|
3605
|
+
}());
|
|
3606
|
+
StreamAutocompleteTextareaModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAutocompleteTextareaModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
3607
|
+
StreamAutocompleteTextareaModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAutocompleteTextareaModule, declarations: [AutocompleteTextareaComponent], imports: [i3.CommonModule, i1.TranslateModule, i5.MentionModule, StreamAvatarModule], exports: [AutocompleteTextareaComponent] });
|
|
3608
|
+
StreamAutocompleteTextareaModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAutocompleteTextareaModule, providers: [
|
|
3609
|
+
{
|
|
3610
|
+
provide: textareaInjectionToken,
|
|
3611
|
+
useValue: AutocompleteTextareaComponent,
|
|
3612
|
+
},
|
|
3613
|
+
], imports: [[i3.CommonModule, i1.TranslateModule, i5.MentionModule, StreamAvatarModule]] });
|
|
3614
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamAutocompleteTextareaModule, decorators: [{
|
|
3615
|
+
type: i0.NgModule,
|
|
3616
|
+
args: [{
|
|
3617
|
+
declarations: [AutocompleteTextareaComponent],
|
|
3618
|
+
imports: [i3.CommonModule, i1.TranslateModule, i5.MentionModule, StreamAvatarModule],
|
|
3619
|
+
exports: [AutocompleteTextareaComponent],
|
|
3620
|
+
providers: [
|
|
3621
|
+
{
|
|
3622
|
+
provide: textareaInjectionToken,
|
|
3623
|
+
useValue: AutocompleteTextareaComponent,
|
|
3624
|
+
},
|
|
3625
|
+
],
|
|
3626
|
+
}]
|
|
3627
|
+
}] });
|
|
3628
|
+
|
|
3629
|
+
var StreamTextareaModule = /** @class */ (function () {
|
|
3630
|
+
function StreamTextareaModule() {
|
|
3631
|
+
}
|
|
3632
|
+
return StreamTextareaModule;
|
|
3633
|
+
}());
|
|
3634
|
+
StreamTextareaModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamTextareaModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
3635
|
+
StreamTextareaModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamTextareaModule, declarations: [TextareaComponent], imports: [i3.CommonModule, i1.TranslateModule], exports: [TextareaComponent] });
|
|
3636
|
+
StreamTextareaModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamTextareaModule, providers: [
|
|
3637
|
+
{
|
|
3638
|
+
provide: textareaInjectionToken,
|
|
3639
|
+
useValue: TextareaComponent,
|
|
3640
|
+
},
|
|
3641
|
+
], imports: [[i3.CommonModule, i1.TranslateModule]] });
|
|
3642
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: StreamTextareaModule, decorators: [{
|
|
3643
|
+
type: i0.NgModule,
|
|
3644
|
+
args: [{
|
|
3645
|
+
declarations: [TextareaComponent],
|
|
3646
|
+
imports: [i3.CommonModule, i1.TranslateModule],
|
|
3647
|
+
exports: [TextareaComponent],
|
|
3648
|
+
providers: [
|
|
3649
|
+
{
|
|
3650
|
+
provide: textareaInjectionToken,
|
|
3651
|
+
useValue: TextareaComponent,
|
|
3652
|
+
},
|
|
3117
3653
|
],
|
|
3118
3654
|
}]
|
|
3119
3655
|
}] });
|
|
@@ -3129,6 +3665,7 @@
|
|
|
3129
3665
|
exports.AttachmentListComponent = AttachmentListComponent;
|
|
3130
3666
|
exports.AttachmentPreviewListComponent = AttachmentPreviewListComponent;
|
|
3131
3667
|
exports.AttachmentService = AttachmentService;
|
|
3668
|
+
exports.AutocompleteTextareaComponent = AutocompleteTextareaComponent;
|
|
3132
3669
|
exports.AvatarComponent = AvatarComponent;
|
|
3133
3670
|
exports.ChannelComponent = ChannelComponent;
|
|
3134
3671
|
exports.ChannelHeaderComponent = ChannelHeaderComponent;
|
|
@@ -3137,6 +3674,7 @@
|
|
|
3137
3674
|
exports.ChannelPreviewComponent = ChannelPreviewComponent;
|
|
3138
3675
|
exports.ChannelService = ChannelService;
|
|
3139
3676
|
exports.ChatClientService = ChatClientService;
|
|
3677
|
+
exports.HighlightMentionsPipe = HighlightMentionsPipe;
|
|
3140
3678
|
exports.IconComponent = IconComponent;
|
|
3141
3679
|
exports.ImageLoadService = ImageLoadService;
|
|
3142
3680
|
exports.LoadingIndicatorComponent = LoadingIndicatorComponent;
|
|
@@ -3150,9 +3688,14 @@
|
|
|
3150
3688
|
exports.NotificationComponent = NotificationComponent;
|
|
3151
3689
|
exports.NotificationListComponent = NotificationListComponent;
|
|
3152
3690
|
exports.NotificationService = NotificationService;
|
|
3691
|
+
exports.StreamAutocompleteTextareaModule = StreamAutocompleteTextareaModule;
|
|
3153
3692
|
exports.StreamChatModule = StreamChatModule;
|
|
3154
3693
|
exports.StreamI18nService = StreamI18nService;
|
|
3694
|
+
exports.StreamTextareaModule = StreamTextareaModule;
|
|
3695
|
+
exports.TextareaComponent = TextareaComponent;
|
|
3696
|
+
exports.TextareaDirective = TextareaDirective;
|
|
3155
3697
|
exports.ThemeService = ThemeService;
|
|
3698
|
+
exports.TransliterationService = TransliterationService;
|
|
3156
3699
|
exports.createMessagePreview = createMessagePreview;
|
|
3157
3700
|
exports.getDeviceWidth = getDeviceWidth;
|
|
3158
3701
|
exports.getGroupStyles = getGroupStyles;
|
|
@@ -3160,6 +3703,7 @@
|
|
|
3160
3703
|
exports.getReadByText = getReadByText;
|
|
3161
3704
|
exports.isImageAttachment = isImageAttachment;
|
|
3162
3705
|
exports.parseDate = parseDate;
|
|
3706
|
+
exports.textareaInjectionToken = textareaInjectionToken;
|
|
3163
3707
|
|
|
3164
3708
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3165
3709
|
|