Skip to content

Commit cff7ef3

Browse files
committed
Updated UIKit version to 4.3.24
1 parent c42f3dc commit cff7ef3

File tree

9 files changed

+74
-43
lines changed

9 files changed

+74
-43
lines changed

CometChatMessageComposer/cometchat-message-composer/cometchat-message-composer.component.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export declare class CometChatMessageComposerComponent implements OnInit, OnChan
9292
groupMembersRequestBuilder: CometChat.GroupMembersRequestBuilder;
9393
usersRequestBuilder: CometChat.UsersRequestBuilder;
9494
ccShowMentionsCountWarning: Subscription;
95+
initialText: string;
9596
loadingStateText: string;
9697
errorStateText: string;
9798
emptyStateText: string;
@@ -185,6 +186,7 @@ export declare class CometChatMessageComposerComponent implements OnInit, OnChan
185186
closeModals(): void;
186187
constructor(ref: ChangeDetectorRef, themeService: CometChatThemeService);
187188
callConversationSummaryMethod(): void;
189+
clearComposer(): void;
188190
ngOnChanges(changes: SimpleChanges): void;
189191
userOrGroupChanged(changes: SimpleChanges): void;
190192
ngOnDestroy(): void;

esm2020/CometChatMessageComposer/cometchat-message-composer/cometchat-message-composer.component.mjs

Lines changed: 19 additions & 9 deletions
Large diffs are not rendered by default.

esm2020/CometChatMessageList/cometchat-message-list/cometchat-message-list.component.mjs

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

esm2020/Shared/CometChatUIkit/CometChatUIKit.mjs

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

fesm2015/cometchat-chat-uikit-angular.mjs

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1943,7 +1943,7 @@ class CometChatUIKit {
19431943
if (window) {
19441944
window.CometChatUiKit = {
19451945
name: "@cometchat/chat-uikit-angular",
1946-
version: "4.3.23",
1946+
version: "4.3.24",
19471947
};
19481948
}
19491949
if (CometChatUIKitSharedSettings) {
@@ -11171,7 +11171,7 @@ class CometChatMessageListComponent {
1117111171
var injectedObject = metadata === null || metadata === void 0 ? void 0 : metadata[ThumbnailGenerationConstants.injected];
1117211172
var extensionsObject = injectedObject === null || injectedObject === void 0 ? void 0 : injectedObject.extensions;
1117311173
var thumbnailGenerationObject = extensionsObject[ThumbnailGenerationConstants.thumbnail_generation];
11174-
var imageToDownload = thumbnailGenerationObject === null || thumbnailGenerationObject === void 0 ? void 0 : thumbnailGenerationObject.url_small;
11174+
var imageToDownload = thumbnailGenerationObject === null || thumbnailGenerationObject === void 0 ? void 0 : thumbnailGenerationObject.url_medium;
1117511175
if (imageToDownload) {
1117611176
imageURL = imageToDownload;
1117711177
}
@@ -13713,6 +13713,7 @@ class CometChatMessageComposerComponent {
1371313713
this.lastEmptySearchTerm = "";
1371413714
this.smartReplyState = States.loading;
1371513715
this.showMentionsCountWarning = false;
13716+
this.initialText = "";
1371613717
this.loadingStateText = localize("GENERATING_REPLIES");
1371713718
this.errorStateText = localize("SOMETHING_WRONG");
1371813719
this.emptyStateText = localize("NO_MESSAGES_FOUND");
@@ -13871,11 +13872,10 @@ class CometChatMessageComposerComponent {
1387113872
this.smartReplies = [];
1387213873
this.mentionStyleLocal = new UserMentionStyle({});
1387313874
this.sendMessageOnEnter = (event) => {
13874-
var _a, _b;
1387513875
this.showMentionsCountWarning = false;
1387613876
this.showListForMentions = false;
1387713877
this.sendTextMessage(event.detail.value);
13878-
(_b = (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.emptyInputField();
13878+
this.clearComposer();
1387913879
this.showSendButton = false;
1388013880
this.disableSendButton();
1388113881
};
@@ -14507,10 +14507,8 @@ class CometChatMessageComposerComponent {
1450714507
});
1450814508
}
1450914509
openEditPreview() {
14510-
var _a, _b;
1451114510
let messageTextWithMentionTags = this.checkForMentions(this.messageToBeEdited);
14512-
this.text = "";
14513-
(_b = (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.emptyInputField();
14511+
this.clearComposer();
1451414512
this.inputRef.nativeElement.text = "";
1451514513
this.text = this.messageToBeEdited.getText();
1451614514
this.editPreviewText = messageTextWithMentionTags;
@@ -14583,9 +14581,24 @@ class CometChatMessageComposerComponent {
1458314581
child: { showConversationSummaryView: true },
1458414582
});
1458514583
}
14584+
clearComposer() {
14585+
var _a, _b;
14586+
this.text = "";
14587+
this.messageText = "";
14588+
(_b = (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.emptyInputField();
14589+
}
1458614590
ngOnChanges(changes) {
14591+
var _a;
1458714592
if (changes["user"] || changes["group"]) {
1458814593
this.userOrGroupChanged(changes);
14594+
if (this.initialText !== this.text) {
14595+
this.clearComposer();
14596+
}
14597+
this.text = this.initialText || "";
14598+
}
14599+
if ((_a = changes["text"]) === null || _a === void 0 ? void 0 : _a.currentValue) {
14600+
this.initialText = changes["text"].currentValue;
14601+
this.text = this.initialText;
1458914602
}
1459014603
}
1459114604
userOrGroupChanged(changes) {
@@ -14654,7 +14667,7 @@ class CometChatMessageComposerComponent {
1465414667
* @param {String=""} textMsg
1465514668
*/
1465614669
sendTextMessage(textMsg = "") {
14657-
var _a, _b, _c, _d, _e;
14670+
var _a, _b, _c;
1465814671
this.endTyping();
1465914672
try {
1466014673
// Dont Send Blank text messages -- i.e --- messages that only contain spaces
@@ -14706,8 +14719,7 @@ class CometChatMessageComposerComponent {
1470614719
this.playAudio();
1470714720
}
1470814721
//clearing Message Input Box
14709-
this.messageText = "";
14710-
(_e = (_d = this.inputRef) === null || _d === void 0 ? void 0 : _d.nativeElement) === null || _e === void 0 ? void 0 : _e.emptyInputField();
14722+
this.clearComposer();
1471114723
this.messageSending = false;
1471214724
for (let i = 0; i < this.textFormatterList.length; i++) {
1471314725
textMessage = this.textFormatterList[i].formatMessageForSending(textMessage);
@@ -15352,16 +15364,13 @@ class CometChatMessageComposerComponent {
1535215364
}
1535315365
}
1535415366
closePreview() {
15355-
var _a, _b;
1535615367
this.showSendButton = false;
1535715368
this.showListForMentions = false;
1535815369
this.showMentionsCountWarning = false;
1535915370
this.showPreview = false;
1536015371
this.editPreviewText = "";
1536115372
this.messageToBeEdited = null;
15362-
this.text = "";
15363-
this.messageText = "";
15364-
(_b = (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.emptyInputField();
15373+
this.clearComposer();
1536515374
this.disableSendButton();
1536615375
this.ref.detectChanges();
1536715376
}

fesm2015/cometchat-chat-uikit-angular.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fesm2020/cometchat-chat-uikit-angular.mjs

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,7 +1912,7 @@ class CometChatUIKit {
19121912
if (window) {
19131913
window.CometChatUiKit = {
19141914
name: "@cometchat/chat-uikit-angular",
1915-
version: "4.3.23",
1915+
version: "4.3.24",
19161916
};
19171917
}
19181918
if (CometChatUIKitSharedSettings) {
@@ -11097,7 +11097,7 @@ class CometChatMessageListComponent {
1109711097
var injectedObject = metadata?.[ThumbnailGenerationConstants.injected];
1109811098
var extensionsObject = injectedObject?.extensions;
1109911099
var thumbnailGenerationObject = extensionsObject[ThumbnailGenerationConstants.thumbnail_generation];
11100-
var imageToDownload = thumbnailGenerationObject?.url_small;
11100+
var imageToDownload = thumbnailGenerationObject?.url_medium;
1110111101
if (imageToDownload) {
1110211102
imageURL = imageToDownload;
1110311103
}
@@ -13644,6 +13644,7 @@ class CometChatMessageComposerComponent {
1364413644
this.lastEmptySearchTerm = "";
1364513645
this.smartReplyState = States.loading;
1364613646
this.showMentionsCountWarning = false;
13647+
this.initialText = "";
1364713648
this.loadingStateText = localize("GENERATING_REPLIES");
1364813649
this.errorStateText = localize("SOMETHING_WRONG");
1364913650
this.emptyStateText = localize("NO_MESSAGES_FOUND");
@@ -13805,7 +13806,7 @@ class CometChatMessageComposerComponent {
1380513806
this.showMentionsCountWarning = false;
1380613807
this.showListForMentions = false;
1380713808
this.sendTextMessage(event.detail.value);
13808-
this.inputRef?.nativeElement?.emptyInputField();
13809+
this.clearComposer();
1380913810
this.showSendButton = false;
1381013811
this.disableSendButton();
1381113812
};
@@ -14422,8 +14423,7 @@ class CometChatMessageComposerComponent {
1442214423
}
1442314424
openEditPreview() {
1442414425
let messageTextWithMentionTags = this.checkForMentions(this.messageToBeEdited);
14425-
this.text = "";
14426-
this.inputRef?.nativeElement?.emptyInputField();
14426+
this.clearComposer();
1442714427
this.inputRef.nativeElement.text = "";
1442814428
this.text = this.messageToBeEdited.getText();
1442914429
this.editPreviewText = messageTextWithMentionTags;
@@ -14494,9 +14494,22 @@ class CometChatMessageComposerComponent {
1449414494
child: { showConversationSummaryView: true },
1449514495
});
1449614496
}
14497+
clearComposer() {
14498+
this.text = "";
14499+
this.messageText = "";
14500+
this.inputRef?.nativeElement?.emptyInputField();
14501+
}
1449714502
ngOnChanges(changes) {
1449814503
if (changes["user"] || changes["group"]) {
1449914504
this.userOrGroupChanged(changes);
14505+
if (this.initialText !== this.text) {
14506+
this.clearComposer();
14507+
}
14508+
this.text = this.initialText || "";
14509+
}
14510+
if (changes["text"]?.currentValue) {
14511+
this.initialText = changes["text"].currentValue;
14512+
this.text = this.initialText;
1450014513
}
1450114514
}
1450214515
userOrGroupChanged(changes) {
@@ -14614,8 +14627,7 @@ class CometChatMessageComposerComponent {
1461414627
this.playAudio();
1461514628
}
1461614629
//clearing Message Input Box
14617-
this.messageText = "";
14618-
this.inputRef?.nativeElement?.emptyInputField();
14630+
this.clearComposer();
1461914631
this.messageSending = false;
1462014632
for (let i = 0; i < this.textFormatterList.length; i++) {
1462114633
textMessage = this.textFormatterList[i].formatMessageForSending(textMessage);
@@ -15291,9 +15303,7 @@ class CometChatMessageComposerComponent {
1529115303
this.showPreview = false;
1529215304
this.editPreviewText = "";
1529315305
this.messageToBeEdited = null;
15294-
this.text = "";
15295-
this.messageText = "";
15296-
this.inputRef?.nativeElement?.emptyInputField();
15306+
this.clearComposer();
1529715307
this.disableSendButton();
1529815308
this.ref.detectChanges();
1529915309
}

fesm2020/cometchat-chat-uikit-angular.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cometchat/chat-uikit-angular",
3-
"version": "4.3.23",
3+
"version": "4.3.24",
44
"license": "https://www.cometchat.com/legal-terms-of-service",
55
"homepage": "https://www.cometchat.com",
66
"repository": "https://github.com/cometchat/cometchat-uikit-angular",
@@ -25,9 +25,9 @@
2525
"description": "Ready-to-use Chat UI Components for Angular (JavaScript/Web)",
2626
"peerDependencies": {
2727
"@cometchat/chat-sdk-javascript": "^4.0.10",
28-
"@cometchat/uikit-elements": "~4.3.21",
29-
"@cometchat/uikit-resources": "~4.3.17",
30-
"@cometchat/uikit-shared": "~4.3.23"
28+
"@cometchat/uikit-elements": "~4.3.22",
29+
"@cometchat/uikit-resources": "~4.3.18",
30+
"@cometchat/uikit-shared": "~4.3.24"
3131
},
3232
"module": "fesm2015/cometchat-chat-uikit-angular.mjs",
3333
"es2020": "fesm2020/cometchat-chat-uikit-angular.mjs",

0 commit comments

Comments
 (0)