stream-chat-angular 3.0.0-beta.6 → 3.0.0-beta.9

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.
Files changed (46) hide show
  1. package/assets/version.d.ts +1 -1
  2. package/bundles/stream-chat-angular.umd.js +119 -120
  3. package/bundles/stream-chat-angular.umd.js.map +1 -1
  4. package/esm2015/assets/version.js +2 -2
  5. package/esm2015/lib/attachment-list/attachment-list.component.js +1 -1
  6. package/esm2015/lib/attachment.service.js +11 -5
  7. package/esm2015/lib/channel-header/channel-header.component.js +1 -1
  8. package/esm2015/lib/channel-list/channel-list.component.js +1 -1
  9. package/esm2015/lib/channel-preview/channel-preview.component.js +1 -1
  10. package/esm2015/lib/channel.service.js +11 -18
  11. package/esm2015/lib/chat-client.service.js +4 -3
  12. package/esm2015/lib/message/message.component.js +1 -1
  13. package/esm2015/lib/message-actions-box/message-actions-box.component.js +7 -8
  14. package/esm2015/lib/message-input/message-input.component.js +15 -2
  15. package/esm2015/lib/message-list/message-list.component.js +1 -1
  16. package/esm2015/lib/message-preview.js +4 -17
  17. package/esm2015/lib/message-reactions/message-reactions.component.js +1 -1
  18. package/esm2015/lib/read-by.js +1 -1
  19. package/esm2015/lib/types.js +1 -1
  20. package/fesm2015/stream-chat-angular.js +117 -118
  21. package/fesm2015/stream-chat-angular.js.map +1 -1
  22. package/lib/attachment-list/attachment-list.component.d.ts +6 -6
  23. package/lib/attachment.service.d.ts +1 -1
  24. package/lib/channel-header/channel-header.component.d.ts +3 -3
  25. package/lib/channel-list/channel-list.component.d.ts +4 -4
  26. package/lib/channel-preview/channel-preview.component.d.ts +3 -2
  27. package/lib/channel.service.d.ts +31 -29
  28. package/lib/chat-client.service.d.ts +11 -10
  29. package/lib/custom-templates.service.d.ts +2 -2
  30. package/lib/message/message.component.d.ts +22 -3
  31. package/lib/message-actions-box/message-actions-box.component.d.ts +3 -2
  32. package/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.d.ts +1 -1
  33. package/lib/message-input/message-input.component.d.ts +27 -3
  34. package/lib/message-input/textarea.directive.d.ts +1 -1
  35. package/lib/message-list/group-styles.d.ts +1 -1
  36. package/lib/message-preview.d.ts +2 -1
  37. package/lib/message-reactions/message-reactions.component.d.ts +4 -4
  38. package/lib/read-by.d.ts +2 -1
  39. package/lib/types.d.ts +25 -17
  40. package/package.json +2 -2
  41. package/src/assets/styles/css/index.css +1 -1
  42. package/src/assets/styles/css/index.css.map +1 -1
  43. package/src/assets/styles/scss/Avatar.scss +1 -1
  44. package/src/assets/styles/scss/ChannelHeader.scss +2 -0
  45. package/src/assets/styles/scss/VirtualMessage.scss +5 -0
  46. package/src/assets/version.ts +1 -1
@@ -1 +1 @@
1
- export declare const version = "3.0.0-beta.6";
1
+ export declare const version = "3.0.0-beta.9";
@@ -354,7 +354,7 @@
354
354
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
355
355
  }
356
356
 
357
- var version = '3.0.0-beta.6';
357
+ var version = '3.0.0-beta.9';
358
358
 
359
359
  /**
360
360
  * The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](../components/NotificationListComponent.mdx) component displays the currently active notifications.
@@ -486,7 +486,8 @@
486
486
  }); })];
487
487
  case 1:
488
488
  _d.sent();
489
- return [4 /*yield*/, this.chatClient.queryChannels({ invite: 'pending' }, {}, { user_id: (_a = this.chatClient.user) === null || _a === void 0 ? void 0 : _a.id })];
489
+ return [4 /*yield*/, this.chatClient.queryChannels({ invite: 'pending' }, // TODO: find out why we need this typecast
490
+ {}, { user_id: (_a = this.chatClient.user) === null || _a === void 0 ? void 0 : _a.id })];
490
491
  case 2:
491
492
  channels = _d.sent();
492
493
  this.pendingInvitesSubject.next(channels);
@@ -628,27 +629,13 @@
628
629
  }]
629
630
  }], ctorParameters: function () { return [{ type: i0__namespace.NgZone }, { type: NotificationService }]; } });
630
631
 
631
- var createMessagePreview = function (user, text, attachments, mentionedUsers, parentId, quotedMessageId) {
632
+ var createMessagePreview = function (user, text, attachments, mentionedUsers, parentId, quotedMessageId, customData) {
632
633
  if (attachments === void 0) { attachments = []; }
633
634
  if (mentionedUsers === void 0) { mentionedUsers = []; }
634
635
  if (parentId === void 0) { parentId = undefined; }
635
636
  if (quotedMessageId === void 0) { quotedMessageId = undefined; }
636
637
  var clientSideId = user.id + "-" + uuid.v4();
637
- return {
638
- __html: text,
639
- created_at: new Date(),
640
- html: text,
641
- id: clientSideId,
642
- reactions: [],
643
- status: 'sending',
644
- text: text,
645
- type: 'regular',
646
- user: user,
647
- attachments: attachments,
648
- mentioned_users: mentionedUsers,
649
- parent_id: parentId,
650
- quoted_message_id: quotedMessageId,
651
- };
638
+ return Object.assign({ __html: text, created_at: new Date(), html: text, id: clientSideId, reactions: [], status: 'sending', text: text, type: 'regular', user: user, attachments: attachments, mentioned_users: mentionedUsers, parent_id: parentId, quoted_message_id: quotedMessageId }, customData);
652
639
  };
653
640
 
654
641
  var getReadBy = function (message, channel) {
@@ -914,15 +901,14 @@
914
901
  * Adds a reaction to a message.
915
902
  * @param messageId The id of the message to add the reaction to
916
903
  * @param reactionType The type of the reaction
904
+ * @param customData
917
905
  */
918
- ChannelService.prototype.addReaction = function (messageId, reactionType) {
906
+ ChannelService.prototype.addReaction = function (messageId, reactionType, customData) {
919
907
  var _a;
920
908
  return __awaiter(this, void 0, void 0, function () {
921
909
  return __generator(this, function (_h) {
922
910
  switch (_h.label) {
923
- case 0: return [4 /*yield*/, ((_a = this.activeChannelSubject.getValue()) === null || _a === void 0 ? void 0 : _a.sendReaction(messageId, {
924
- type: reactionType,
925
- }))];
911
+ case 0: return [4 /*yield*/, ((_a = this.activeChannelSubject.getValue()) === null || _a === void 0 ? void 0 : _a.sendReaction(messageId, Object.assign({ type: reactionType }, customData)))];
926
912
  case 1:
927
913
  _h.sent();
928
914
  return [2 /*return*/];
@@ -956,22 +942,24 @@
956
942
  * @param mentionedUsers Mentioned users
957
943
  * @param parentId Id of the parent message (if sending a thread reply)
958
944
  * @param quotedMessageId Id of the message to quote (if sending a quote reply)
945
+ * @param customData
959
946
  */
960
- ChannelService.prototype.sendMessage = function (text, attachments, mentionedUsers, parentId, quotedMessageId) {
947
+ ChannelService.prototype.sendMessage = function (text, attachments, mentionedUsers, parentId, quotedMessageId, customData) {
961
948
  if (attachments === void 0) { attachments = []; }
962
949
  if (mentionedUsers === void 0) { mentionedUsers = []; }
963
950
  if (parentId === void 0) { parentId = undefined; }
964
951
  if (quotedMessageId === void 0) { quotedMessageId = undefined; }
952
+ if (customData === void 0) { customData = undefined; }
965
953
  return __awaiter(this, void 0, void 0, function () {
966
954
  var preview, channel;
967
955
  return __generator(this, function (_h) {
968
956
  switch (_h.label) {
969
957
  case 0:
970
- preview = createMessagePreview(this.chatClientService.chatClient.user, text, attachments, mentionedUsers, parentId, quotedMessageId);
958
+ preview = createMessagePreview(this.chatClientService.chatClient.user, text, attachments, mentionedUsers, parentId, quotedMessageId, customData);
971
959
  channel = this.activeChannelSubject.getValue();
972
960
  preview.readBy = [];
973
961
  channel.state.addMessageSorted(preview, true);
974
- return [4 /*yield*/, this.sendMessageRequest(preview)];
962
+ return [4 /*yield*/, this.sendMessageRequest(preview, customData)];
975
963
  case 1:
976
964
  _h.sent();
977
965
  return [2 /*return*/];
@@ -1170,7 +1158,7 @@
1170
1158
  ChannelService.prototype.selectMessageToQuote = function (message) {
1171
1159
  this.messageToQuoteSubject.next(message);
1172
1160
  };
1173
- ChannelService.prototype.sendMessageRequest = function (preview) {
1161
+ ChannelService.prototype.sendMessageRequest = function (preview, customData) {
1174
1162
  var _a;
1175
1163
  return __awaiter(this, void 0, void 0, function () {
1176
1164
  var channel, isThreadReply, response, error_1, stringError, parsedError;
@@ -1185,14 +1173,7 @@
1185
1173
  _h.label = 1;
1186
1174
  case 1:
1187
1175
  _h.trys.push([1, 3, , 4]);
1188
- return [4 /*yield*/, channel.sendMessage({
1189
- text: preview.text,
1190
- attachments: preview.attachments,
1191
- mentioned_users: (_a = preview.mentioned_users) === null || _a === void 0 ? void 0 : _a.map(function (u) { return u.id; }),
1192
- id: preview.id,
1193
- parent_id: preview.parent_id,
1194
- quoted_message_id: preview.quoted_message_id,
1195
- })];
1176
+ return [4 /*yield*/, channel.sendMessage(Object.assign({ id: preview.id, text: preview.text, attachments: preview.attachments, mentioned_users: (_a = preview.mentioned_users) === null || _a === void 0 ? void 0 : _a.map(function (u) { return u.id; }), parent_id: preview.parent_id, quoted_message_id: preview.quoted_message_id }, customData))];
1196
1177
  case 2:
1197
1178
  response = _h.sent();
1198
1179
  if (response === null || response === void 0 ? void 0 : response.message) {
@@ -1907,7 +1888,7 @@
1907
1888
  */
1908
1889
  AttachmentService.prototype.deleteAttachment = function (upload) {
1909
1890
  return __awaiter(this, void 0, void 0, function () {
1910
- var attachmentUploads, error_1;
1891
+ var attachmentUploads, result, index, error_1, index;
1911
1892
  return __generator(this, function (_d) {
1912
1893
  switch (_d.label) {
1913
1894
  case 0:
@@ -1919,18 +1900,23 @@
1919
1900
  return [4 /*yield*/, this.channelService.deleteAttachment(upload)];
1920
1901
  case 2:
1921
1902
  _d.sent();
1922
- attachmentUploads.splice(attachmentUploads.indexOf(upload), 1);
1903
+ result = __spreadArray([], __read(attachmentUploads));
1904
+ index = attachmentUploads.indexOf(upload);
1905
+ result.splice(index, 1);
1923
1906
  return [3 /*break*/, 4];
1924
1907
  case 3:
1925
1908
  error_1 = _d.sent();
1909
+ result = attachmentUploads;
1926
1910
  this.notificationService.addTemporaryNotification('streamChat.Error deleting attachment');
1927
1911
  return [3 /*break*/, 4];
1928
1912
  case 4: return [3 /*break*/, 6];
1929
1913
  case 5:
1930
- attachmentUploads.splice(attachmentUploads.indexOf(upload), 1);
1914
+ result = __spreadArray([], __read(attachmentUploads));
1915
+ index = attachmentUploads.indexOf(upload);
1916
+ result.splice(index, 1);
1931
1917
  _d.label = 6;
1932
1918
  case 6:
1933
- this.attachmentUploadsSubject.next(__spreadArray([], __read(attachmentUploads)));
1919
+ this.attachmentUploadsSubject.next(__spreadArray([], __read(result)));
1934
1920
  return [2 /*return*/];
1935
1921
  }
1936
1922
  });
@@ -2013,16 +1999,16 @@
2013
1999
  };
2014
2000
  AttachmentService.prototype.uploadAttachments = function (uploads) {
2015
2001
  return __awaiter(this, void 0, void 0, function () {
2016
- var attachmentUploads, result;
2002
+ var result, attachmentUploads;
2017
2003
  var _this = this;
2018
2004
  return __generator(this, function (_d) {
2019
2005
  switch (_d.label) {
2020
2006
  case 0:
2021
- attachmentUploads = this.attachmentUploadsSubject.getValue();
2022
2007
  this.attachmentUploadInProgressCounterSubject.next(this.attachmentUploadInProgressCounterSubject.getValue() + 1);
2023
2008
  return [4 /*yield*/, this.channelService.uploadAttachments(uploads)];
2024
2009
  case 1:
2025
2010
  result = _d.sent();
2011
+ attachmentUploads = this.attachmentUploadsSubject.getValue();
2026
2012
  result.forEach(function (r) {
2027
2013
  var upload = attachmentUploads.find(function (upload) { return upload.file === r.file; });
2028
2014
  if (!upload) {
@@ -2509,6 +2495,79 @@
2509
2495
  type: i0.Input
2510
2496
  }] } });
2511
2497
 
2498
+ /**
2499
+ * The `Modal` component displays its content in an overlay. The modal can be closed with a close button, if the user clicks outside of the modal content, or if the escape button is pressed. The modal can also be closed from outside.
2500
+ */
2501
+ var ModalComponent = /** @class */ (function () {
2502
+ function ModalComponent() {
2503
+ var _this = this;
2504
+ /**
2505
+ * If `true` the modal will be displayed, if `false` the modal will be hidden
2506
+ */
2507
+ this.isOpen = false;
2508
+ /**
2509
+ * Emits `true` if the modal becomes visible, and `false` if the modal is closed.
2510
+ */
2511
+ this.isOpenChange = new i0.EventEmitter();
2512
+ this.watchForEscPress = function (event) {
2513
+ if (event.key === 'Escape') {
2514
+ _this.close();
2515
+ }
2516
+ };
2517
+ this.stopWatchForEscPress = function () {
2518
+ window.removeEventListener('keyup', _this.watchForEscPress);
2519
+ };
2520
+ this.watchForOutsideClicks = function (event) {
2521
+ var _a;
2522
+ if (!((_a = _this.innerContainer) === null || _a === void 0 ? void 0 : _a.nativeElement.contains(event.target))) {
2523
+ _this.close();
2524
+ }
2525
+ };
2526
+ }
2527
+ ModalComponent.prototype.ngOnChanges = function (changes) {
2528
+ var _this = this;
2529
+ if (changes.isOpen) {
2530
+ if (this.isOpen) {
2531
+ window.addEventListener('keyup', this.watchForEscPress);
2532
+ setTimeout(function () { return window.addEventListener('click', _this.watchForOutsideClicks); }, 0);
2533
+ }
2534
+ else {
2535
+ this.stopWatchForOutsideClicks();
2536
+ this.stopWatchForEscPress();
2537
+ }
2538
+ }
2539
+ };
2540
+ ModalComponent.prototype.close = function () {
2541
+ this.isOpen = false;
2542
+ this.isOpenChange.emit(false);
2543
+ this.stopWatchForOutsideClicks();
2544
+ this.stopWatchForEscPress();
2545
+ };
2546
+ ModalComponent.prototype.stopWatchForOutsideClicks = function () {
2547
+ window.removeEventListener('click', this.watchForOutsideClicks);
2548
+ };
2549
+ return ModalComponent;
2550
+ }());
2551
+ ModalComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ModalComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
2552
+ ModalComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: ModalComponent, selector: "stream-modal", inputs: { isOpen: "isOpen", content: "content" }, outputs: { isOpenChange: "isOpenChange" }, viewQueries: [{ propertyName: "innerContainer", first: true, predicate: ["modalInner"], 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-placeholder icon=\"close\"></stream-icon-placeholder>\n </div>\n <div class=\"str-chat__modal__inner\" #modalInner>\n <ng-container *ngIf=\"content; else elseContent\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </ng-container>\n <ng-template #elseContent>\n <ng-content></ng-content>\n </ng-template>\n </div>\n</div>\n", components: [{ type: IconPlaceholderComponent, selector: "stream-icon-placeholder", inputs: ["icon", "size"] }], directives: [{ type: i2__namespace.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
2553
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ModalComponent, decorators: [{
2554
+ type: i0.Component,
2555
+ args: [{
2556
+ selector: 'stream-modal',
2557
+ templateUrl: './modal.component.html',
2558
+ styles: [],
2559
+ }]
2560
+ }], ctorParameters: function () { return []; }, propDecorators: { isOpen: [{
2561
+ type: i0.Input
2562
+ }], content: [{
2563
+ type: i0.Input
2564
+ }], isOpenChange: [{
2565
+ type: i0.Output
2566
+ }], innerContainer: [{
2567
+ type: i0.ViewChild,
2568
+ args: ['modalInner']
2569
+ }] } });
2570
+
2512
2571
  var textareaInjectionToken = new i0.InjectionToken('textareaInjectionToken');
2513
2572
 
2514
2573
  var TextareaDirective = /** @class */ (function () {
@@ -2656,79 +2715,6 @@
2656
2715
  }]
2657
2716
  }], ctorParameters: function () { return []; } });
2658
2717
 
2659
- /**
2660
- * The `Modal` component displays its content in an overlay. The modal can be closed with a close button, if the user clicks outside of the modal content, or if the escape button is pressed. The modal can also be closed from outside.
2661
- */
2662
- var ModalComponent = /** @class */ (function () {
2663
- function ModalComponent() {
2664
- var _this = this;
2665
- /**
2666
- * If `true` the modal will be displayed, if `false` the modal will be hidden
2667
- */
2668
- this.isOpen = false;
2669
- /**
2670
- * Emits `true` if the modal becomes visible, and `false` if the modal is closed.
2671
- */
2672
- this.isOpenChange = new i0.EventEmitter();
2673
- this.watchForEscPress = function (event) {
2674
- if (event.key === 'Escape') {
2675
- _this.close();
2676
- }
2677
- };
2678
- this.stopWatchForEscPress = function () {
2679
- window.removeEventListener('keyup', _this.watchForEscPress);
2680
- };
2681
- this.watchForOutsideClicks = function (event) {
2682
- var _a;
2683
- if (!((_a = _this.innerContainer) === null || _a === void 0 ? void 0 : _a.nativeElement.contains(event.target))) {
2684
- _this.close();
2685
- }
2686
- };
2687
- }
2688
- ModalComponent.prototype.ngOnChanges = function (changes) {
2689
- var _this = this;
2690
- if (changes.isOpen) {
2691
- if (this.isOpen) {
2692
- window.addEventListener('keyup', this.watchForEscPress);
2693
- setTimeout(function () { return window.addEventListener('click', _this.watchForOutsideClicks); }, 0);
2694
- }
2695
- else {
2696
- this.stopWatchForOutsideClicks();
2697
- this.stopWatchForEscPress();
2698
- }
2699
- }
2700
- };
2701
- ModalComponent.prototype.close = function () {
2702
- this.isOpen = false;
2703
- this.isOpenChange.emit(false);
2704
- this.stopWatchForOutsideClicks();
2705
- this.stopWatchForEscPress();
2706
- };
2707
- ModalComponent.prototype.stopWatchForOutsideClicks = function () {
2708
- window.removeEventListener('click', this.watchForOutsideClicks);
2709
- };
2710
- return ModalComponent;
2711
- }());
2712
- ModalComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ModalComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
2713
- ModalComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: ModalComponent, selector: "stream-modal", inputs: { isOpen: "isOpen", content: "content" }, outputs: { isOpenChange: "isOpenChange" }, viewQueries: [{ propertyName: "innerContainer", first: true, predicate: ["modalInner"], 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-placeholder icon=\"close\"></stream-icon-placeholder>\n </div>\n <div class=\"str-chat__modal__inner\" #modalInner>\n <ng-container *ngIf=\"content; else elseContent\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </ng-container>\n <ng-template #elseContent>\n <ng-content></ng-content>\n </ng-template>\n </div>\n</div>\n", components: [{ type: IconPlaceholderComponent, selector: "stream-icon-placeholder", inputs: ["icon", "size"] }], directives: [{ type: i2__namespace.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
2714
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ModalComponent, decorators: [{
2715
- type: i0.Component,
2716
- args: [{
2717
- selector: 'stream-modal',
2718
- templateUrl: './modal.component.html',
2719
- styles: [],
2720
- }]
2721
- }], ctorParameters: function () { return []; }, propDecorators: { isOpen: [{
2722
- type: i0.Input
2723
- }], content: [{
2724
- type: i0.Input
2725
- }], isOpenChange: [{
2726
- type: i0.Output
2727
- }], innerContainer: [{
2728
- type: i0.ViewChild,
2729
- args: ['modalInner']
2730
- }] } });
2731
-
2732
2718
  /**
2733
2719
  * The `AttachmentList` compontent displays the attachments of a message
2734
2720
  */
@@ -3007,6 +2993,7 @@
3007
2993
  this.initTextarea();
3008
2994
  };
3009
2995
  MessageInputComponent.prototype.ngOnChanges = function (changes) {
2996
+ var _this = this;
3010
2997
  if (changes.message) {
3011
2998
  this.attachmentService.resetAttachmentUploads();
3012
2999
  if (this.isUpdate) {
@@ -3030,8 +3017,19 @@
3030
3017
  if (changes.mode) {
3031
3018
  this.setCanSendMessages();
3032
3019
  }
3020
+ if (changes.sendMessage$) {
3021
+ if (this.sendMessageSubcription) {
3022
+ this.sendMessageSubcription.unsubscribe();
3023
+ }
3024
+ if (this.sendMessage$) {
3025
+ this.sendMessageSubcription = this.sendMessage$.subscribe(function () { return void _this.messageSent(); });
3026
+ }
3027
+ }
3033
3028
  };
3034
3029
  MessageInputComponent.prototype.ngOnDestroy = function () {
3030
+ if (this.sendMessageSubcription) {
3031
+ this.sendMessageSubcription.unsubscribe();
3032
+ }
3035
3033
  this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
3036
3034
  };
3037
3035
  MessageInputComponent.prototype.messageSent = function () {
@@ -3292,7 +3290,7 @@
3292
3290
  return MessageInputComponent;
3293
3291
  }());
3294
3292
  MessageInputComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageInputComponent, deps: [{ token: ChannelService }, { token: NotificationService }, { token: AttachmentService }, { token: MessageInputConfigService }, { token: textareaInjectionToken }, { token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ChangeDetectorRef }, { token: ChatClientService }, { token: EmojiInputService }, { token: CustomTemplatesService }], target: i0__namespace.ɵɵFactoryTarget.Component });
3295
- 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", mode: "mode", isMultipleFileUploadEnabled: "isMultipleFileUploadEnabled", message: "message" }, outputs: { messageUpdate: "messageUpdate" }, providers: [AttachmentService, EmojiInputService], 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=\"{{\n mode === 'main' ? 'str-chat__input-flat' : 'str-chat__small-message-input'\n }}\"\n [class.str-chat__input-flat-has-attachments]=\"\n (attachmentUploads$ | async)!.length > 0\n \"\n [class.str-chat__input-flat-quoted]=\"!!quotedMessage\"\n>\n <div\n data-testid=\"quoted-message-container\"\n class=\"quoted-message-preview\"\n *ngIf=\"quotedMessage\"\n >\n <div class=\"quoted-message-preview-header\">\n <div>{{ \"streamChat.Reply to Message\" | translate }}</div>\n <button\n class=\"str-chat__square-button\"\n data-testid=\"remove-quote\"\n (click)=\"deselectMessageToQuote()\"\n (keyup.enter)=\"deselectMessageToQuote()\"\n >\n <stream-icon-placeholder\n icon=\"close-no-outline\"\n style=\"font-size: 10px; line-height: 10px\"\n ></stream-icon-placeholder>\n </button>\n </div>\n <div class=\"quoted-message-preview-content\">\n <stream-avatar-placeholder\n data-testid=\"qouted-message-avatar\"\n class=\"str-chat-angular__avatar-host\"\n [imageUrl]=\"quotedMessage?.user?.image\"\n [name]=\"quotedMessage?.user?.name || quotedMessage?.user?.id\"\n [size]=\"20\"\n ></stream-avatar-placeholder>\n <div class=\"quoted-message-preview-content-inner\">\n <stream-attachment-list\n *ngIf=\"\n quotedMessage?.attachments && quotedMessage?.attachments?.length\n \"\n [attachments]=\"quotedMessageAttachments\"\n [messageId]=\"quotedMessage?.id\"\n ></stream-attachment-list>\n <div\n data-testid=\"quoted-message-text\"\n [innerHTML]=\"quotedMessage?.html || quotedMessage?.text\"\n ></div>\n </div>\n </div>\n </div>\n <div class=\"str-chat__input-flat-wrapper\" style=\"width: 100%\">\n <div\n class=\"{{\n mode === 'main'\n ? 'str-chat__input-flat--textarea-wrapper'\n : 'str-chat__small-message-input--textarea-wrapper'\n }}\"\n >\n <ng-template\n #defaultAttachmentsPreview\n let-attachmentUploads$=\"attachmentUploads$\"\n let-retryUploadHandler=\"retryUploadHandler\"\n let-deleteUploadHandler=\"deleteUploadHandler\"\n >\n <stream-attachment-preview-list\n [attachmentUploads$]=\"attachmentUploads$\"\n (retryAttachmentUpload)=\"retryUploadHandler($event)\"\n (deleteAttachment)=\"deleteUploadHandler($event)\"\n class=\"rfu-image-previewer-angular-host\"\n ></stream-attachment-preview-list>\n </ng-template>\n <ng-container\n *ngTemplateOutlet=\"\n attachmentPreviewListTemplate || defaultAttachmentsPreview;\n context: getAttachmentPreviewListContext()\n \"\n ></ng-container>\n <div class=\"rta str-chat__textarea str-chat-angular__textarea\">\n <ng-container\n *ngIf=\"emojiPickerTemplate && !isCooldownInProgress\"\n data-testid=\"emoji-picker\"\n >\n <div\n class=\"\n str-chat__input-flat-emojiselect\n str-chat-angular__emojiselect\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n emojiPickerTemplate;\n context: getEmojiPickerContext()\n \"\n ></ng-container>\n </div>\n </ng-container>\n <div\n class=\"str-chat__input-flat-cooldown str-chat-angular__cooldown\"\n *ngIf=\"isCooldownInProgress\"\n data-testid=\"cooldown-timer\"\n >\n {{ cooldown$ | async }}\n </div>\n <ng-template\n *ngIf=\"canSendMessages && !isCooldownInProgress; else notAllowed\"\n streamTextarea\n [(value)]=\"textareaValue\"\n (valueChange)=\"typingStart$.next()\"\n (send)=\"messageSent()\"\n [componentRef]=\"textareaRef\"\n (userMentions)=\"mentionedUsers = $event\"\n [areMentionsEnabled]=\"areMentionsEnabled\"\n [mentionScope]=\"mentionScope\"\n ></ng-template>\n <ng-template #notAllowed>\n <textarea\n disabled\n rows=\"1\"\n [value]=\"disabledTextareaText | translate\"\n class=\"rta__textarea str-chat__textarea__textarea\"\n data-testid=\"disabled-textarea\"\n ></textarea>\n </ng-template>\n </div>\n <div\n *ngIf=\"\n isFileUploadEnabled &&\n isFileUploadAuthorized &&\n canSendMessages &&\n !isCooldownInProgress\n \"\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 [multiple]=\"isMultipleFileUploadEnabled\"\n (change)=\"filesSelected(fileInput.files)\"\n />\n <span class=\"str-chat__input-flat-fileupload\">\n <stream-icon-placeholder\n icon=\"file-upload\"\n ></stream-icon-placeholder>\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-placeholder icon=\"send\"></stream-icon-placeholder>\n </button>\n </div>\n</div>\n", components: [{ type: IconPlaceholderComponent, selector: "stream-icon-placeholder", inputs: ["icon", "size"] }, { type: AvatarPlaceholderComponent, selector: "stream-avatar-placeholder", inputs: ["name", "imageUrl", "size"] }, { type: AttachmentListComponent, selector: "stream-attachment-list", inputs: ["messageId", "attachments"] }, { type: AttachmentPreviewListComponent, selector: "stream-attachment-preview-list", inputs: ["attachmentUploads$"], outputs: ["retryAttachmentUpload", "deleteAttachment"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: TextareaDirective, selector: "[streamTextarea]", inputs: ["componentRef", "areMentionsEnabled", "mentionScope", "value"], outputs: ["valueChange", "send", "userMentions"] }], pipes: { "async": i3__namespace.AsyncPipe, "translate": i2__namespace.TranslatePipe } });
3293
+ 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", mode: "mode", isMultipleFileUploadEnabled: "isMultipleFileUploadEnabled", message: "message", sendMessage$: "sendMessage$" }, outputs: { messageUpdate: "messageUpdate" }, providers: [AttachmentService, EmojiInputService], 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=\"{{\n mode === 'main' ? 'str-chat__input-flat' : 'str-chat__small-message-input'\n }}\"\n [class.str-chat__input-flat-has-attachments]=\"\n (attachmentUploads$ | async)!.length > 0\n \"\n [class.str-chat__input-flat-quoted]=\"!!quotedMessage\"\n>\n <div\n data-testid=\"quoted-message-container\"\n class=\"quoted-message-preview\"\n *ngIf=\"quotedMessage\"\n >\n <div class=\"quoted-message-preview-header\">\n <div>{{ \"streamChat.Reply to Message\" | translate }}</div>\n <button\n class=\"str-chat__square-button\"\n data-testid=\"remove-quote\"\n (click)=\"deselectMessageToQuote()\"\n (keyup.enter)=\"deselectMessageToQuote()\"\n >\n <stream-icon-placeholder\n icon=\"close-no-outline\"\n style=\"font-size: 10px; line-height: 10px\"\n ></stream-icon-placeholder>\n </button>\n </div>\n <div class=\"quoted-message-preview-content\">\n <stream-avatar-placeholder\n data-testid=\"qouted-message-avatar\"\n class=\"str-chat-angular__avatar-host\"\n [imageUrl]=\"quotedMessage?.user?.image\"\n [name]=\"quotedMessage?.user?.name || quotedMessage?.user?.id\"\n [size]=\"20\"\n ></stream-avatar-placeholder>\n <div class=\"quoted-message-preview-content-inner\">\n <stream-attachment-list\n *ngIf=\"\n quotedMessage?.attachments && quotedMessage?.attachments?.length\n \"\n [attachments]=\"quotedMessageAttachments\"\n [messageId]=\"quotedMessage?.id\"\n ></stream-attachment-list>\n <div\n data-testid=\"quoted-message-text\"\n [innerHTML]=\"quotedMessage?.html || quotedMessage?.text\"\n ></div>\n </div>\n </div>\n </div>\n <div class=\"str-chat__input-flat-wrapper\" style=\"width: 100%\">\n <div\n class=\"{{\n mode === 'main'\n ? 'str-chat__input-flat--textarea-wrapper'\n : 'str-chat__small-message-input--textarea-wrapper'\n }}\"\n >\n <ng-template\n #defaultAttachmentsPreview\n let-attachmentUploads$=\"attachmentUploads$\"\n let-retryUploadHandler=\"retryUploadHandler\"\n let-deleteUploadHandler=\"deleteUploadHandler\"\n >\n <stream-attachment-preview-list\n [attachmentUploads$]=\"attachmentUploads$\"\n (retryAttachmentUpload)=\"retryUploadHandler($event)\"\n (deleteAttachment)=\"deleteUploadHandler($event)\"\n class=\"rfu-image-previewer-angular-host\"\n ></stream-attachment-preview-list>\n </ng-template>\n <ng-container\n *ngTemplateOutlet=\"\n attachmentPreviewListTemplate || defaultAttachmentsPreview;\n context: getAttachmentPreviewListContext()\n \"\n ></ng-container>\n <div class=\"rta str-chat__textarea str-chat-angular__textarea\">\n <ng-container\n *ngIf=\"emojiPickerTemplate && !isCooldownInProgress\"\n data-testid=\"emoji-picker\"\n >\n <div\n class=\"\n str-chat__input-flat-emojiselect\n str-chat-angular__emojiselect\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n emojiPickerTemplate;\n context: getEmojiPickerContext()\n \"\n ></ng-container>\n </div>\n </ng-container>\n <div\n class=\"str-chat__input-flat-cooldown str-chat-angular__cooldown\"\n *ngIf=\"isCooldownInProgress\"\n data-testid=\"cooldown-timer\"\n >\n {{ cooldown$ | async }}\n </div>\n <ng-template\n *ngIf=\"canSendMessages && !isCooldownInProgress; else notAllowed\"\n streamTextarea\n [(value)]=\"textareaValue\"\n (valueChange)=\"typingStart$.next()\"\n (send)=\"messageSent()\"\n [componentRef]=\"textareaRef\"\n (userMentions)=\"mentionedUsers = $event\"\n [areMentionsEnabled]=\"areMentionsEnabled\"\n [mentionScope]=\"mentionScope\"\n ></ng-template>\n <ng-template #notAllowed>\n <textarea\n disabled\n rows=\"1\"\n [value]=\"disabledTextareaText | translate\"\n class=\"rta__textarea str-chat__textarea__textarea\"\n data-testid=\"disabled-textarea\"\n ></textarea>\n </ng-template>\n </div>\n <div\n *ngIf=\"\n isFileUploadEnabled &&\n isFileUploadAuthorized &&\n canSendMessages &&\n !isCooldownInProgress\n \"\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 [multiple]=\"isMultipleFileUploadEnabled\"\n (change)=\"filesSelected(fileInput.files)\"\n />\n <span class=\"str-chat__input-flat-fileupload\">\n <stream-icon-placeholder\n icon=\"file-upload\"\n ></stream-icon-placeholder>\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-placeholder icon=\"send\"></stream-icon-placeholder>\n </button>\n </div>\n</div>\n", components: [{ type: IconPlaceholderComponent, selector: "stream-icon-placeholder", inputs: ["icon", "size"] }, { type: AvatarPlaceholderComponent, selector: "stream-avatar-placeholder", inputs: ["name", "imageUrl", "size"] }, { type: AttachmentListComponent, selector: "stream-attachment-list", inputs: ["messageId", "attachments"] }, { type: AttachmentPreviewListComponent, selector: "stream-attachment-preview-list", inputs: ["attachmentUploads$"], outputs: ["retryAttachmentUpload", "deleteAttachment"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: TextareaDirective, selector: "[streamTextarea]", inputs: ["componentRef", "areMentionsEnabled", "mentionScope", "value"], outputs: ["valueChange", "send", "userMentions"] }], pipes: { "async": i3__namespace.AsyncPipe, "translate": i2__namespace.TranslatePipe } });
3296
3294
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageInputComponent, decorators: [{
3297
3295
  type: i0.Component,
3298
3296
  args: [{
@@ -3318,6 +3316,8 @@
3318
3316
  type: i0.Input
3319
3317
  }], message: [{
3320
3318
  type: i0.Input
3319
+ }], sendMessage$: [{
3320
+ type: i0.Input
3321
3321
  }], messageUpdate: [{
3322
3322
  type: i0.Output
3323
3323
  }], fileInput: [{
@@ -3412,6 +3412,7 @@
3412
3412
  this.isEditModalOpen = false;
3413
3413
  this.subscriptions = [];
3414
3414
  this.visibleMessageActionItems = [];
3415
+ this.sendMessageSubject = new rxjs.Subject();
3415
3416
  this.modalClosed = function () {
3416
3417
  _this.isEditModalOpen = false;
3417
3418
  _this.isEditing.emit(false);
@@ -3495,6 +3496,7 @@
3495
3496
  enabledActions.indexOf('delete-any-message') !== -1; },
3496
3497
  },
3497
3498
  ];
3499
+ this.sendMessage$ = this.sendMessageSubject.asObservable();
3498
3500
  }
3499
3501
  MessageActionsBoxComponent.prototype.ngOnChanges = function (changes) {
3500
3502
  var _this = this;
@@ -3513,8 +3515,7 @@
3513
3515
  : actionLabelOrTranslationKey();
3514
3516
  };
3515
3517
  MessageActionsBoxComponent.prototype.sendClicked = function () {
3516
- var _a;
3517
- (_a = this.messageInput) === null || _a === void 0 ? void 0 : _a.messageSent();
3518
+ this.sendMessageSubject.next();
3518
3519
  };
3519
3520
  MessageActionsBoxComponent.prototype.getMessageInputContext = function () {
3520
3521
  return {
@@ -3525,6 +3526,7 @@
3525
3526
  isMultipleFileUploadEnabled: undefined,
3526
3527
  mentionScope: undefined,
3527
3528
  mode: undefined,
3529
+ sendMessage$: this.sendMessage$,
3528
3530
  };
3529
3531
  };
3530
3532
  MessageActionsBoxComponent.prototype.getEditModalContext = function () {
@@ -3546,7 +3548,7 @@
3546
3548
  return MessageActionsBoxComponent;
3547
3549
  }());
3548
3550
  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 }, { token: CustomTemplatesService }], target: i0__namespace.ɵɵFactoryTarget.Component });
3549
- 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 }, { propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true, static: 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 <ng-container\n *ngFor=\"let item of visibleMessageActionItems; trackBy: trackByActionName\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n messageActionItemTemplate || defaultMessageActionItem;\n context: item\n \"\n ></ng-container>\n </ng-container>\n </ul>\n</div>\n\n<ng-template\n #defaultMessageActionItem\n let-actionName=\"actionName\"\n let-actionHandler=\"actionHandler\"\n let-actionLabelOrTranslationKey=\"actionLabelOrTranslationKey\"\n>\n <button [attr.data-testid]=\"actionName + '-action'\" (click)=\"actionHandler()\">\n <li class=\"str-chat__message-actions-list-item\">\n {{ getActionLabel(actionLabelOrTranslationKey) | translate }}\n </li>\n </button>\n</ng-template>\n\n<ng-container\n *ngTemplateOutlet=\"\n modalTemplate || defaultModal;\n context: getEditModalContext()\n \"\n></ng-container>\n\n<ng-template\n #defaultModal\n let-isOpen=\"isOpen\"\n let-isOpenChangeHandler=\"isOpenChangeHandler\"\n let-content=\"content\"\n>\n <stream-modal\n [isOpen]=\"isOpen\"\n (isOpenChange)=\"isOpenChangeHandler($event)\"\n [content]=\"content\"\n >\n </stream-modal>\n</ng-template>\n\n<ng-template #modalContent>\n <div class=\"str-chat__edit-message-form\" *ngIf=\"isEditModalOpen\">\n <ng-template\n #defaultInput\n let-messageInput=\"message\"\n let-messageUpdateHandler=\"messageUpdateHandler\"\n >\n <stream-message-input\n [message]=\"messageInput\"\n (messageUpdate)=\"messageUpdateHandler()\"\n ></stream-message-input>\n </ng-template>\n <ng-container\n *ngTemplateOutlet=\"\n messageInputTemplate || defaultInput;\n context: getMessageInputContext()\n \"\n >\n </ng-container>\n\n <stream-notification-list></stream-notification-list>\n <div\n class=\"\n str-chat__message-team-form-footer\n str-chat__message-team-form-footer-angular\n \"\n >\n <div class=\"str-chat__edit-message-form-options\">\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</ng-template>\n", components: [{ type: ModalComponent, selector: "stream-modal", inputs: ["isOpen", "content"], outputs: ["isOpenChange"] }, { type: MessageInputComponent, selector: "stream-message-input", inputs: ["isFileUploadEnabled", "areMentionsEnabled", "mentionScope", "mode", "isMultipleFileUploadEnabled", "message"], outputs: ["messageUpdate"] }, { type: NotificationListComponent, selector: "stream-notification-list" }], directives: [{ type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], pipes: { "translate": i2__namespace.TranslatePipe } });
3551
+ 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: "modalContent", first: true, predicate: ["modalContent"], descendants: true, static: 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 <ng-container\n *ngFor=\"let item of visibleMessageActionItems; trackBy: trackByActionName\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n messageActionItemTemplate || defaultMessageActionItem;\n context: item\n \"\n ></ng-container>\n </ng-container>\n </ul>\n</div>\n\n<ng-template\n #defaultMessageActionItem\n let-actionName=\"actionName\"\n let-actionHandler=\"actionHandler\"\n let-actionLabelOrTranslationKey=\"actionLabelOrTranslationKey\"\n>\n <button [attr.data-testid]=\"actionName + '-action'\" (click)=\"actionHandler()\">\n <li class=\"str-chat__message-actions-list-item\">\n {{ getActionLabel(actionLabelOrTranslationKey) | translate }}\n </li>\n </button>\n</ng-template>\n\n<ng-container\n *ngTemplateOutlet=\"\n modalTemplate || defaultModal;\n context: getEditModalContext()\n \"\n></ng-container>\n\n<ng-template\n #defaultModal\n let-isOpen=\"isOpen\"\n let-isOpenChangeHandler=\"isOpenChangeHandler\"\n let-content=\"content\"\n>\n <stream-modal\n [isOpen]=\"isOpen\"\n (isOpenChange)=\"isOpenChangeHandler($event)\"\n [content]=\"content\"\n >\n </stream-modal>\n</ng-template>\n\n<ng-template #modalContent>\n <div class=\"str-chat__edit-message-form\" *ngIf=\"isEditModalOpen\">\n <ng-template\n #defaultInput\n let-messageInput=\"message\"\n let-messageUpdateHandler=\"messageUpdateHandler\"\n let-sendMessage$Input=\"sendMessage$\"\n >\n <stream-message-input\n [message]=\"messageInput\"\n (messageUpdate)=\"messageUpdateHandler()\"\n [sendMessage$]=\"sendMessage$Input\"\n ></stream-message-input>\n </ng-template>\n <ng-container\n *ngTemplateOutlet=\"\n messageInputTemplate || defaultInput;\n context: getMessageInputContext()\n \"\n >\n </ng-container>\n\n <stream-notification-list></stream-notification-list>\n <div\n class=\"\n str-chat__message-team-form-footer\n str-chat__message-team-form-footer-angular\n \"\n >\n <div class=\"str-chat__edit-message-form-options\">\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</ng-template>\n", components: [{ type: ModalComponent, selector: "stream-modal", inputs: ["isOpen", "content"], outputs: ["isOpenChange"] }, { type: MessageInputComponent, selector: "stream-message-input", inputs: ["isFileUploadEnabled", "areMentionsEnabled", "mentionScope", "mode", "isMultipleFileUploadEnabled", "message", "sendMessage$"], outputs: ["messageUpdate"] }, { type: NotificationListComponent, selector: "stream-notification-list" }], directives: [{ type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], pipes: { "translate": i2__namespace.TranslatePipe } });
3550
3552
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageActionsBoxComponent, decorators: [{
3551
3553
  type: i0.Component,
3552
3554
  args: [{
@@ -3566,9 +3568,6 @@
3566
3568
  type: i0.Output
3567
3569
  }], isEditing: [{
3568
3570
  type: i0.Output
3569
- }], messageInput: [{
3570
- type: i0.ViewChild,
3571
- args: [MessageInputComponent]
3572
3571
  }], modalContent: [{
3573
3572
  type: i0.ViewChild,
3574
3573
  args: ['modalContent', { static: true }]