stream-chat-angular 3.0.0-beta.5 → 3.0.0-beta.8

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 (45) hide show
  1. package/assets/version.d.ts +1 -1
  2. package/bundles/stream-chat-angular.umd.js +112 -130
  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/channel-header/channel-header.component.js +1 -1
  7. package/esm2015/lib/channel-list/channel-list.component.js +1 -1
  8. package/esm2015/lib/channel-preview/channel-preview.component.js +1 -1
  9. package/esm2015/lib/channel.service.js +11 -18
  10. package/esm2015/lib/chat-client.service.js +4 -3
  11. package/esm2015/lib/message/message.component.js +1 -1
  12. package/esm2015/lib/message-actions-box/message-actions-box.component.js +11 -24
  13. package/esm2015/lib/message-input/message-input.component.js +15 -2
  14. package/esm2015/lib/message-list/message-list.component.js +1 -1
  15. package/esm2015/lib/message-preview.js +4 -17
  16. package/esm2015/lib/message-reactions/message-reactions.component.js +1 -1
  17. package/esm2015/lib/read-by.js +1 -1
  18. package/esm2015/lib/types.js +1 -1
  19. package/fesm2015/stream-chat-angular.js +111 -130
  20. package/fesm2015/stream-chat-angular.js.map +1 -1
  21. package/lib/attachment-list/attachment-list.component.d.ts +6 -6
  22. package/lib/attachment.service.d.ts +1 -1
  23. package/lib/channel-header/channel-header.component.d.ts +3 -3
  24. package/lib/channel-list/channel-list.component.d.ts +4 -4
  25. package/lib/channel-preview/channel-preview.component.d.ts +3 -2
  26. package/lib/channel.service.d.ts +31 -29
  27. package/lib/chat-client.service.d.ts +11 -10
  28. package/lib/custom-templates.service.d.ts +2 -2
  29. package/lib/message/message.component.d.ts +22 -3
  30. package/lib/message-actions-box/message-actions-box.component.d.ts +4 -3
  31. package/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.d.ts +1 -1
  32. package/lib/message-input/message-input.component.d.ts +27 -3
  33. package/lib/message-input/textarea.directive.d.ts +1 -1
  34. package/lib/message-list/group-styles.d.ts +1 -1
  35. package/lib/message-preview.d.ts +2 -1
  36. package/lib/message-reactions/message-reactions.component.d.ts +4 -4
  37. package/lib/read-by.d.ts +2 -1
  38. package/lib/types.d.ts +27 -19
  39. package/package.json +2 -2
  40. package/src/assets/styles/css/index.css +1 -1
  41. package/src/assets/styles/css/index.css.map +1 -1
  42. package/src/assets/styles/scss/Avatar.scss +1 -1
  43. package/src/assets/styles/scss/ChannelHeader.scss +2 -0
  44. package/src/assets/styles/scss/VirtualMessage.scss +5 -0
  45. package/src/assets/version.ts +1 -1
@@ -1 +1 @@
1
- export declare const version = "3.0.0-beta.5";
1
+ export declare const version = "3.0.0-beta.8";
@@ -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.5';
357
+ var version = '3.0.0-beta.8';
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) {
@@ -2509,6 +2490,79 @@
2509
2490
  type: i0.Input
2510
2491
  }] } });
2511
2492
 
2493
+ /**
2494
+ * 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.
2495
+ */
2496
+ var ModalComponent = /** @class */ (function () {
2497
+ function ModalComponent() {
2498
+ var _this = this;
2499
+ /**
2500
+ * If `true` the modal will be displayed, if `false` the modal will be hidden
2501
+ */
2502
+ this.isOpen = false;
2503
+ /**
2504
+ * Emits `true` if the modal becomes visible, and `false` if the modal is closed.
2505
+ */
2506
+ this.isOpenChange = new i0.EventEmitter();
2507
+ this.watchForEscPress = function (event) {
2508
+ if (event.key === 'Escape') {
2509
+ _this.close();
2510
+ }
2511
+ };
2512
+ this.stopWatchForEscPress = function () {
2513
+ window.removeEventListener('keyup', _this.watchForEscPress);
2514
+ };
2515
+ this.watchForOutsideClicks = function (event) {
2516
+ var _a;
2517
+ if (!((_a = _this.innerContainer) === null || _a === void 0 ? void 0 : _a.nativeElement.contains(event.target))) {
2518
+ _this.close();
2519
+ }
2520
+ };
2521
+ }
2522
+ ModalComponent.prototype.ngOnChanges = function (changes) {
2523
+ var _this = this;
2524
+ if (changes.isOpen) {
2525
+ if (this.isOpen) {
2526
+ window.addEventListener('keyup', this.watchForEscPress);
2527
+ setTimeout(function () { return window.addEventListener('click', _this.watchForOutsideClicks); }, 0);
2528
+ }
2529
+ else {
2530
+ this.stopWatchForOutsideClicks();
2531
+ this.stopWatchForEscPress();
2532
+ }
2533
+ }
2534
+ };
2535
+ ModalComponent.prototype.close = function () {
2536
+ this.isOpen = false;
2537
+ this.isOpenChange.emit(false);
2538
+ this.stopWatchForOutsideClicks();
2539
+ this.stopWatchForEscPress();
2540
+ };
2541
+ ModalComponent.prototype.stopWatchForOutsideClicks = function () {
2542
+ window.removeEventListener('click', this.watchForOutsideClicks);
2543
+ };
2544
+ return ModalComponent;
2545
+ }());
2546
+ ModalComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ModalComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
2547
+ 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"] }] });
2548
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: ModalComponent, decorators: [{
2549
+ type: i0.Component,
2550
+ args: [{
2551
+ selector: 'stream-modal',
2552
+ templateUrl: './modal.component.html',
2553
+ styles: [],
2554
+ }]
2555
+ }], ctorParameters: function () { return []; }, propDecorators: { isOpen: [{
2556
+ type: i0.Input
2557
+ }], content: [{
2558
+ type: i0.Input
2559
+ }], isOpenChange: [{
2560
+ type: i0.Output
2561
+ }], innerContainer: [{
2562
+ type: i0.ViewChild,
2563
+ args: ['modalInner']
2564
+ }] } });
2565
+
2512
2566
  var textareaInjectionToken = new i0.InjectionToken('textareaInjectionToken');
2513
2567
 
2514
2568
  var TextareaDirective = /** @class */ (function () {
@@ -2656,79 +2710,6 @@
2656
2710
  }]
2657
2711
  }], ctorParameters: function () { return []; } });
2658
2712
 
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
2713
  /**
2733
2714
  * The `AttachmentList` compontent displays the attachments of a message
2734
2715
  */
@@ -3007,6 +2988,7 @@
3007
2988
  this.initTextarea();
3008
2989
  };
3009
2990
  MessageInputComponent.prototype.ngOnChanges = function (changes) {
2991
+ var _this = this;
3010
2992
  if (changes.message) {
3011
2993
  this.attachmentService.resetAttachmentUploads();
3012
2994
  if (this.isUpdate) {
@@ -3030,8 +3012,19 @@
3030
3012
  if (changes.mode) {
3031
3013
  this.setCanSendMessages();
3032
3014
  }
3015
+ if (changes.sendMessage$) {
3016
+ if (this.sendMessageSubcription) {
3017
+ this.sendMessageSubcription.unsubscribe();
3018
+ }
3019
+ if (this.sendMessage$) {
3020
+ this.sendMessageSubcription = this.sendMessage$.subscribe(function () { return void _this.messageSent(); });
3021
+ }
3022
+ }
3033
3023
  };
3034
3024
  MessageInputComponent.prototype.ngOnDestroy = function () {
3025
+ if (this.sendMessageSubcription) {
3026
+ this.sendMessageSubcription.unsubscribe();
3027
+ }
3035
3028
  this.subscriptions.forEach(function (s) { return s.unsubscribe(); });
3036
3029
  };
3037
3030
  MessageInputComponent.prototype.messageSent = function () {
@@ -3292,7 +3285,7 @@
3292
3285
  return MessageInputComponent;
3293
3286
  }());
3294
3287
  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 } });
3288
+ 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
3289
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageInputComponent, decorators: [{
3297
3290
  type: i0.Component,
3298
3291
  args: [{
@@ -3318,6 +3311,8 @@
3318
3311
  type: i0.Input
3319
3312
  }], message: [{
3320
3313
  type: i0.Input
3314
+ }], sendMessage$: [{
3315
+ type: i0.Input
3321
3316
  }], messageUpdate: [{
3322
3317
  type: i0.Output
3323
3318
  }], fileInput: [{
@@ -3412,6 +3407,7 @@
3412
3407
  this.isEditModalOpen = false;
3413
3408
  this.subscriptions = [];
3414
3409
  this.visibleMessageActionItems = [];
3410
+ this.sendMessageSubject = new rxjs.Subject();
3415
3411
  this.modalClosed = function () {
3416
3412
  _this.isEditModalOpen = false;
3417
3413
  _this.isEditing.emit(false);
@@ -3424,15 +3420,14 @@
3424
3420
  actionName: 'quote',
3425
3421
  actionLabelOrTranslationKey: 'streamChat.Reply',
3426
3422
  actionHandler: function (message) { return _this.channelService.selectMessageToQuote(message); },
3427
- isVisible: function (enabledActions, isMine, message) { return (enabledActions.indexOf('quote') !== -1 ||
3428
- enabledActions.indexOf('quote-message') !== -1) &&
3423
+ isVisible: function (enabledActions, isMine, message) { return enabledActions.indexOf('quote-message') !== -1 &&
3429
3424
  !(message === null || message === void 0 ? void 0 : message.quoted_message); },
3430
3425
  },
3431
3426
  {
3432
3427
  actionName: 'pin',
3433
3428
  actionLabelOrTranslationKey: function () { var _a; return ((_a = _this.message) === null || _a === void 0 ? void 0 : _a.pinned) ? 'streamChat.Unpin' : 'streamChat.Pin'; },
3434
3429
  actionHandler: function () { return alert('Feature not yet implemented'); },
3435
- isVisible: function (enabledActions) { return enabledActions.indexOf('pin') !== -1; },
3430
+ isVisible: function () { return false; },
3436
3431
  },
3437
3432
  {
3438
3433
  actionName: 'flag',
@@ -3456,15 +3451,7 @@
3456
3451
  }
3457
3452
  });
3458
3453
  }); },
3459
- isVisible: function (enabledActions, isMine) { return (enabledActions.indexOf('flag') !== -1 ||
3460
- enabledActions.indexOf('flag-message') !== -1) &&
3461
- !isMine; },
3462
- },
3463
- {
3464
- actionName: 'mute',
3465
- actionLabelOrTranslationKey: 'streamChat.Mute',
3466
- actionHandler: function () { return alert('Feature not yet implemented'); },
3467
- isVisible: function (enabledActions) { return enabledActions.indexOf('mute') !== -1; },
3454
+ isVisible: function (enabledActions, isMine) { return enabledActions.indexOf('flag-message') !== -1 && !isMine; },
3468
3455
  },
3469
3456
  {
3470
3457
  actionName: 'edit',
@@ -3473,10 +3460,7 @@
3473
3460
  _this.isEditing.emit(true);
3474
3461
  _this.isEditModalOpen = true;
3475
3462
  },
3476
- isVisible: function (enabledActions, isMine) { return ((enabledActions.indexOf('edit') !== -1 ||
3477
- enabledActions.indexOf('update-own-message') !== -1) &&
3478
- isMine) ||
3479
- enabledActions.indexOf('edit-any') !== -1 ||
3463
+ isVisible: function (enabledActions, isMine) { return (enabledActions.indexOf('update-own-message') !== -1 && isMine) ||
3480
3464
  enabledActions.indexOf('update-any-message') !== -1; },
3481
3465
  },
3482
3466
  {
@@ -3507,6 +3491,7 @@
3507
3491
  enabledActions.indexOf('delete-any-message') !== -1; },
3508
3492
  },
3509
3493
  ];
3494
+ this.sendMessage$ = this.sendMessageSubject.asObservable();
3510
3495
  }
3511
3496
  MessageActionsBoxComponent.prototype.ngOnChanges = function (changes) {
3512
3497
  var _this = this;
@@ -3525,8 +3510,7 @@
3525
3510
  : actionLabelOrTranslationKey();
3526
3511
  };
3527
3512
  MessageActionsBoxComponent.prototype.sendClicked = function () {
3528
- var _a;
3529
- (_a = this.messageInput) === null || _a === void 0 ? void 0 : _a.messageSent();
3513
+ this.sendMessageSubject.next();
3530
3514
  };
3531
3515
  MessageActionsBoxComponent.prototype.getMessageInputContext = function () {
3532
3516
  return {
@@ -3537,6 +3521,7 @@
3537
3521
  isMultipleFileUploadEnabled: undefined,
3538
3522
  mentionScope: undefined,
3539
3523
  mode: undefined,
3524
+ sendMessage$: this.sendMessage$,
3540
3525
  };
3541
3526
  };
3542
3527
  MessageActionsBoxComponent.prototype.getEditModalContext = function () {
@@ -3558,7 +3543,7 @@
3558
3543
  return MessageActionsBoxComponent;
3559
3544
  }());
3560
3545
  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 });
3561
- 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 } });
3546
+ 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 } });
3562
3547
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: MessageActionsBoxComponent, decorators: [{
3563
3548
  type: i0.Component,
3564
3549
  args: [{
@@ -3578,9 +3563,6 @@
3578
3563
  type: i0.Output
3579
3564
  }], isEditing: [{
3580
3565
  type: i0.Output
3581
- }], messageInput: [{
3582
- type: i0.ViewChild,
3583
- args: [MessageInputComponent]
3584
3566
  }], modalContent: [{
3585
3567
  type: i0.ViewChild,
3586
3568
  args: ['modalContent', { static: true }]