sceyt-chat-react-uikit 1.7.6-beta.14 → 1.7.6-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/svg/document_icon.svg +6 -0
- package/components/AudioPlayer/AudioVisualization.d.ts +14 -0
- package/components/ChannelDetails/DetailsTab/MonthHeader.d.ts +10 -0
- package/index.js +800 -897
- package/index.modern.js +800 -897
- package/package.json +1 -1
- package/assets/svg/file_icon.svg +0 -4
package/index.modern.js
CHANGED
|
@@ -10056,7 +10056,10 @@ var queryDirection = {
|
|
|
10056
10056
|
NEAR: 'near'
|
|
10057
10057
|
};
|
|
10058
10058
|
|
|
10059
|
-
function sendMessageAC(message, channelId, connectionState, sendAttachmentsAsSeparateMessage, isResend) {
|
|
10059
|
+
function sendMessageAC(message, channelId, connectionState, sendAttachmentsAsSeparateMessage, isResend, isAddToPendingMessagesMap) {
|
|
10060
|
+
if (isAddToPendingMessagesMap === void 0) {
|
|
10061
|
+
isAddToPendingMessagesMap = true;
|
|
10062
|
+
}
|
|
10060
10063
|
return {
|
|
10061
10064
|
type: SEND_MESSAGE,
|
|
10062
10065
|
payload: {
|
|
@@ -10064,17 +10067,22 @@ function sendMessageAC(message, channelId, connectionState, sendAttachmentsAsSep
|
|
|
10064
10067
|
channelId: channelId,
|
|
10065
10068
|
connectionState: connectionState,
|
|
10066
10069
|
sendAttachmentsAsSeparateMessage: sendAttachmentsAsSeparateMessage,
|
|
10067
|
-
isResend: isResend
|
|
10070
|
+
isResend: isResend,
|
|
10071
|
+
isAddToPendingMessagesMap: isAddToPendingMessagesMap
|
|
10068
10072
|
}
|
|
10069
10073
|
};
|
|
10070
10074
|
}
|
|
10071
|
-
function sendTextMessageAC(message, channelId, connectionState) {
|
|
10075
|
+
function sendTextMessageAC(message, channelId, connectionState, isAddToPendingMessagesMap) {
|
|
10076
|
+
if (isAddToPendingMessagesMap === void 0) {
|
|
10077
|
+
isAddToPendingMessagesMap = true;
|
|
10078
|
+
}
|
|
10072
10079
|
return {
|
|
10073
10080
|
type: SEND_TEXT_MESSAGE,
|
|
10074
10081
|
payload: {
|
|
10075
10082
|
message: message,
|
|
10076
10083
|
channelId: channelId,
|
|
10077
|
-
connectionState: connectionState
|
|
10084
|
+
connectionState: connectionState,
|
|
10085
|
+
isAddToPendingMessagesMap: isAddToPendingMessagesMap
|
|
10078
10086
|
}
|
|
10079
10087
|
};
|
|
10080
10088
|
}
|
|
@@ -10088,17 +10096,21 @@ function resendMessageAC(message, channelId, connectionState) {
|
|
|
10088
10096
|
}
|
|
10089
10097
|
};
|
|
10090
10098
|
}
|
|
10091
|
-
function forwardMessageAC(message, channelId, connectionState, isForward) {
|
|
10099
|
+
function forwardMessageAC(message, channelId, connectionState, isForward, isAddToPendingMessagesMap) {
|
|
10092
10100
|
if (isForward === void 0) {
|
|
10093
10101
|
isForward = true;
|
|
10094
10102
|
}
|
|
10103
|
+
if (isAddToPendingMessagesMap === void 0) {
|
|
10104
|
+
isAddToPendingMessagesMap = true;
|
|
10105
|
+
}
|
|
10095
10106
|
return {
|
|
10096
10107
|
type: FORWARD_MESSAGE,
|
|
10097
10108
|
payload: {
|
|
10098
10109
|
message: message,
|
|
10099
10110
|
channelId: channelId,
|
|
10100
10111
|
connectionState: connectionState,
|
|
10101
|
-
isForward: isForward
|
|
10112
|
+
isForward: isForward,
|
|
10113
|
+
isAddToPendingMessagesMap: isAddToPendingMessagesMap
|
|
10102
10114
|
}
|
|
10103
10115
|
};
|
|
10104
10116
|
}
|
|
@@ -10815,17 +10827,20 @@ function setMessagesToMap(channelId, messages) {
|
|
|
10815
10827
|
messagesMap[channelId] = {};
|
|
10816
10828
|
}
|
|
10817
10829
|
messages.forEach(function (msg) {
|
|
10818
|
-
messagesMap[channelId][msg.
|
|
10830
|
+
if (msg.tid && messagesMap[channelId][msg.tid]) {
|
|
10831
|
+
delete messagesMap[channelId][msg.tid];
|
|
10832
|
+
}
|
|
10833
|
+
messagesMap[channelId][msg.id || msg.tid] = msg;
|
|
10819
10834
|
});
|
|
10820
10835
|
}
|
|
10821
10836
|
function addMessageToMap(channelId, message) {
|
|
10822
10837
|
if (!messagesMap[channelId]) {
|
|
10823
10838
|
messagesMap[channelId] = {};
|
|
10824
10839
|
}
|
|
10825
|
-
messagesMap[channelId][message.
|
|
10826
|
-
|
|
10827
|
-
setPendingMessage(channelId, message);
|
|
10840
|
+
if (message.tid && messagesMap[channelId][message.tid]) {
|
|
10841
|
+
delete messagesMap[channelId][message.tid];
|
|
10828
10842
|
}
|
|
10843
|
+
messagesMap[channelId][message.id || message.tid] = message;
|
|
10829
10844
|
}
|
|
10830
10845
|
function updateMessageOnMap(channelId, updatedMessage, voteDetails) {
|
|
10831
10846
|
var pendingMessagesMap = store.getState().MessageReducer.pendingMessagesMap;
|
|
@@ -10876,7 +10891,10 @@ function updateMessageOnMap(channelId, updatedMessage, voteDetails) {
|
|
|
10876
10891
|
if (!messagesMap[channelId]) {
|
|
10877
10892
|
messagesMap[channelId] = {};
|
|
10878
10893
|
}
|
|
10879
|
-
messagesMap[channelId][msg.
|
|
10894
|
+
if (msg.tid && messagesMap[channelId][msg.tid]) {
|
|
10895
|
+
delete messagesMap[channelId][msg.tid];
|
|
10896
|
+
}
|
|
10897
|
+
messagesMap[channelId][msg.id || msg.tid] = msg;
|
|
10880
10898
|
});
|
|
10881
10899
|
}
|
|
10882
10900
|
return updatedMessageData;
|
|
@@ -10892,7 +10910,10 @@ function addReactionToMessageOnMap(channelId, message, reaction, isSelf) {
|
|
|
10892
10910
|
slfReactions = [reaction];
|
|
10893
10911
|
}
|
|
10894
10912
|
}
|
|
10895
|
-
messagesMap[channelId][message.
|
|
10913
|
+
if (message.tid && messagesMap[channelId][message.tid]) {
|
|
10914
|
+
delete messagesMap[channelId][message.tid];
|
|
10915
|
+
}
|
|
10916
|
+
messagesMap[channelId][message.id || message.tid] = _extends({}, messageShouldBeUpdated, {
|
|
10896
10917
|
userReactions: slfReactions,
|
|
10897
10918
|
reactionTotals: message.reactionTotals
|
|
10898
10919
|
});
|
|
@@ -10926,7 +10947,10 @@ function removeReactionToMessageOnMap(channelId, message, reaction, isSelf) {
|
|
|
10926
10947
|
return selfReaction.key !== reaction.key;
|
|
10927
10948
|
});
|
|
10928
10949
|
}
|
|
10929
|
-
messagesMap[channelId][message.
|
|
10950
|
+
if (message.tid && messagesMap[channelId][message.tid]) {
|
|
10951
|
+
delete messagesMap[channelId][message.tid];
|
|
10952
|
+
}
|
|
10953
|
+
messagesMap[channelId][message.id || message.tid] = _extends({}, messageShouldBeUpdated, {
|
|
10930
10954
|
reactionTotals: message.reactionTotals,
|
|
10931
10955
|
userReactions: userReactions
|
|
10932
10956
|
});
|
|
@@ -10961,6 +10985,9 @@ function updateMessageStatusOnMap(channelId, newMarkers) {
|
|
|
10961
10985
|
var messageShouldBeUpdated = messagesMap[channelId][messageId];
|
|
10962
10986
|
if (messageShouldBeUpdated) {
|
|
10963
10987
|
var statusUpdatedMessage = updateMessageDeliveryStatusAndMarkers(messageShouldBeUpdated, newMarkers.name);
|
|
10988
|
+
if (messageShouldBeUpdated.tid && messagesMap[channelId][messageShouldBeUpdated.tid]) {
|
|
10989
|
+
delete messagesMap[channelId][messageShouldBeUpdated.tid];
|
|
10990
|
+
}
|
|
10964
10991
|
messagesMap[channelId][messageId] = _extends({}, messageShouldBeUpdated, statusUpdatedMessage);
|
|
10965
10992
|
}
|
|
10966
10993
|
});
|
|
@@ -10994,13 +11021,6 @@ function clearMessagesMap() {
|
|
|
10994
11021
|
function checkChannelExistsOnMessagesMap(channelId) {
|
|
10995
11022
|
return !!messagesMap[channelId];
|
|
10996
11023
|
}
|
|
10997
|
-
var pendingVideoAttachmentsThumbs = {};
|
|
10998
|
-
var getVideoThumb = function getVideoThumb(attachmentId) {
|
|
10999
|
-
return pendingVideoAttachmentsThumbs[attachmentId];
|
|
11000
|
-
};
|
|
11001
|
-
var deleteVideoThumb = function deleteVideoThumb(attachmentId) {
|
|
11002
|
-
delete pendingVideoAttachmentsThumbs[attachmentId];
|
|
11003
|
-
};
|
|
11004
11024
|
var setPendingAttachment = function setPendingAttachment(attachmentId, data) {
|
|
11005
11025
|
pendingAttachments[attachmentId] = _extends({}, pendingAttachments[attachmentId], data);
|
|
11006
11026
|
};
|
|
@@ -16205,7 +16225,7 @@ function getChannels(action) {
|
|
|
16205
16225
|
case 23:
|
|
16206
16226
|
_context2.p = 23;
|
|
16207
16227
|
_t4 = _context2.v;
|
|
16208
|
-
log.error(_t4, 'Error on get channels');
|
|
16228
|
+
log.error(JSON.stringify(_t4), 'Error on get channels');
|
|
16209
16229
|
case 24:
|
|
16210
16230
|
return _context2.a(2);
|
|
16211
16231
|
}
|
|
@@ -18381,7 +18401,7 @@ var base64ToBinary = function base64ToBinary(base64) {
|
|
|
18381
18401
|
var binaryThumbHashToDataURL = function binaryThumbHashToDataURL(binaryThumbHash) {
|
|
18382
18402
|
return thumbHashToDataURL(binaryThumbHash);
|
|
18383
18403
|
};
|
|
18384
|
-
var
|
|
18404
|
+
var base64ToDataURL = function base64ToDataURL(base64) {
|
|
18385
18405
|
try {
|
|
18386
18406
|
var thumbHashFromBase64 = base64ToBinary(base64);
|
|
18387
18407
|
if (thumbHashFromBase64.length === 0) {
|
|
@@ -18455,106 +18475,6 @@ function calculateSize(width, height, maxWidth, maxHeight) {
|
|
|
18455
18475
|
return [width, height];
|
|
18456
18476
|
}
|
|
18457
18477
|
|
|
18458
|
-
var activeChannelMessagesSelector = function activeChannelMessagesSelector(store) {
|
|
18459
|
-
return store.MessageReducer.activeChannelMessages;
|
|
18460
|
-
};
|
|
18461
|
-
var messagesLoadingState = function messagesLoadingState(store) {
|
|
18462
|
-
return store.MessageReducer.messagesLoadingState;
|
|
18463
|
-
};
|
|
18464
|
-
var messagesHasNextSelector = function messagesHasNextSelector(store) {
|
|
18465
|
-
return store.MessageReducer.messagesHasNext;
|
|
18466
|
-
};
|
|
18467
|
-
var messagesHasPrevSelector = function messagesHasPrevSelector(store) {
|
|
18468
|
-
return store.MessageReducer.messagesHasPrev;
|
|
18469
|
-
};
|
|
18470
|
-
var attachmentCompilationStateSelector = function attachmentCompilationStateSelector(store) {
|
|
18471
|
-
return store.MessageReducer.attachmentsUploadingState;
|
|
18472
|
-
};
|
|
18473
|
-
var attachmentsUploadProgressSelector = function attachmentsUploadProgressSelector(store) {
|
|
18474
|
-
return store.MessageReducer.attachmentsUploadingProgress;
|
|
18475
|
-
};
|
|
18476
|
-
var activeTabAttachmentsSelector = function activeTabAttachmentsSelector(store) {
|
|
18477
|
-
return store.MessageReducer.activeTabAttachments;
|
|
18478
|
-
};
|
|
18479
|
-
var activeTabAttachmentsHasNextSelector = function activeTabAttachmentsHasNextSelector(store) {
|
|
18480
|
-
return store.MessageReducer.attachmentHasNext;
|
|
18481
|
-
};
|
|
18482
|
-
var attachmentsForPopupSelector = function attachmentsForPopupSelector(store) {
|
|
18483
|
-
return store.MessageReducer.attachmentsForPopup;
|
|
18484
|
-
};
|
|
18485
|
-
var messageForReplySelector = function messageForReplySelector(store) {
|
|
18486
|
-
return store.MessageReducer.messageForReply;
|
|
18487
|
-
};
|
|
18488
|
-
var messageToEditSelector = function messageToEditSelector(store) {
|
|
18489
|
-
return store.MessageReducer.messageToEdit;
|
|
18490
|
-
};
|
|
18491
|
-
var scrollToNewMessageSelector = function scrollToNewMessageSelector(store) {
|
|
18492
|
-
return store.MessageReducer.scrollToNewMessage;
|
|
18493
|
-
};
|
|
18494
|
-
var scrollToMentionedMessageSelector = function scrollToMentionedMessageSelector(store) {
|
|
18495
|
-
return store.MessageReducer.scrollToMentionedMessage;
|
|
18496
|
-
};
|
|
18497
|
-
var showScrollToNewMessageButtonSelector = function showScrollToNewMessageButtonSelector(store) {
|
|
18498
|
-
return store.MessageReducer.showScrollToNewMessageButton;
|
|
18499
|
-
};
|
|
18500
|
-
var sendMessageInputHeightSelector = function sendMessageInputHeightSelector(store) {
|
|
18501
|
-
return store.MessageReducer.sendMessageInputHeight;
|
|
18502
|
-
};
|
|
18503
|
-
var scrollToMessageSelector = function scrollToMessageSelector(store) {
|
|
18504
|
-
return store.MessageReducer.scrollToMessage;
|
|
18505
|
-
};
|
|
18506
|
-
var scrollToMessageHighlightSelector = function scrollToMessageHighlightSelector(store) {
|
|
18507
|
-
return store.MessageReducer.scrollToMessageHighlight;
|
|
18508
|
-
};
|
|
18509
|
-
var scrollToMessageBehaviorSelector = function scrollToMessageBehaviorSelector(store) {
|
|
18510
|
-
return store.MessageReducer.scrollToMessageBehavior;
|
|
18511
|
-
};
|
|
18512
|
-
var reactionsListSelector = function reactionsListSelector(store) {
|
|
18513
|
-
return store.MessageReducer.reactionsList;
|
|
18514
|
-
};
|
|
18515
|
-
var reactionsHasNextSelector = function reactionsHasNextSelector(store) {
|
|
18516
|
-
return store.MessageReducer.reactionsHasNext;
|
|
18517
|
-
};
|
|
18518
|
-
var reactionsLoadingStateSelector = function reactionsLoadingStateSelector(store) {
|
|
18519
|
-
return store.MessageReducer.reactionsLoadingState;
|
|
18520
|
-
};
|
|
18521
|
-
var openedMessageMenuSelector = function openedMessageMenuSelector(store) {
|
|
18522
|
-
return store.MessageReducer.openedMessageMenu;
|
|
18523
|
-
};
|
|
18524
|
-
var playingAudioIdSelector = function playingAudioIdSelector(store) {
|
|
18525
|
-
return store.MessageReducer.playingAudioId;
|
|
18526
|
-
};
|
|
18527
|
-
var selectedMessagesMapSelector = function selectedMessagesMapSelector(store) {
|
|
18528
|
-
return store.MessageReducer.selectedMessagesMap;
|
|
18529
|
-
};
|
|
18530
|
-
var attachmentUpdatedMapSelector = function attachmentUpdatedMapSelector(store) {
|
|
18531
|
-
return store.MessageReducer.attachmentUpdatedMap;
|
|
18532
|
-
};
|
|
18533
|
-
var messageMarkersSelector = function messageMarkersSelector(store) {
|
|
18534
|
-
return store.MessageReducer.messageMarkers;
|
|
18535
|
-
};
|
|
18536
|
-
var messagesMarkersLoadingStateSelector = function messagesMarkersLoadingStateSelector(store) {
|
|
18537
|
-
return store.MessageReducer.messagesMarkersLoadingState;
|
|
18538
|
-
};
|
|
18539
|
-
var pollVotesListSelector = function pollVotesListSelector(store) {
|
|
18540
|
-
return store.MessageReducer.pollVotesList;
|
|
18541
|
-
};
|
|
18542
|
-
var pollVotesHasMoreSelector = function pollVotesHasMoreSelector(store) {
|
|
18543
|
-
return store.MessageReducer.pollVotesHasMore;
|
|
18544
|
-
};
|
|
18545
|
-
var pollVotesLoadingStateSelector = function pollVotesLoadingStateSelector(store) {
|
|
18546
|
-
return store.MessageReducer.pollVotesLoadingState;
|
|
18547
|
-
};
|
|
18548
|
-
var pendingPollActionsSelector = function pendingPollActionsSelector(store) {
|
|
18549
|
-
return store.MessageReducer.pendingPollActions;
|
|
18550
|
-
};
|
|
18551
|
-
var pendingMessagesMapSelector = function pendingMessagesMapSelector(store) {
|
|
18552
|
-
return store.MessageReducer.pendingMessagesMap;
|
|
18553
|
-
};
|
|
18554
|
-
var unreadScrollToSelector = function unreadScrollToSelector(store) {
|
|
18555
|
-
return store.MessageReducer.unreadScrollTo;
|
|
18556
|
-
};
|
|
18557
|
-
|
|
18558
18478
|
var getFrame = function getFrame(videoSrc, time) {
|
|
18559
18479
|
try {
|
|
18560
18480
|
var video = document.createElement('video');
|
|
@@ -18724,28 +18644,43 @@ var handleUploadAttachments = function handleUploadAttachments(attachments, mess
|
|
|
18724
18644
|
};
|
|
18725
18645
|
var addPendingMessage = function addPendingMessage(message, messageCopy, channel) {
|
|
18726
18646
|
try {
|
|
18727
|
-
var messageToAdd =
|
|
18647
|
+
var messageToAdd = _extends({}, messageCopy, {
|
|
18728
18648
|
createdAt: new Date(Date.now()),
|
|
18729
18649
|
mentionedUsers: message.mentionedUsers,
|
|
18730
18650
|
parentMessage: message.parentMessage
|
|
18731
|
-
})
|
|
18651
|
+
});
|
|
18732
18652
|
addMessageToMap(channel.id, messageToAdd);
|
|
18733
|
-
|
|
18653
|
+
var activeChannelId = getActiveChannelId();
|
|
18654
|
+
if (activeChannelId === channel.id) {
|
|
18655
|
+
addAllMessages([messageToAdd], MESSAGE_LOAD_DIRECTION.NEXT);
|
|
18656
|
+
}
|
|
18734
18657
|
setPendingMessage(channel.id, messageToAdd);
|
|
18735
18658
|
store.dispatch(scrollToNewMessageAC(true));
|
|
18736
|
-
|
|
18659
|
+
if (activeChannelId === channel.id) {
|
|
18660
|
+
store.dispatch(addMessageAC(messageToAdd));
|
|
18661
|
+
}
|
|
18737
18662
|
return Promise.resolve();
|
|
18738
18663
|
} catch (e) {
|
|
18739
18664
|
return Promise.reject(e);
|
|
18740
18665
|
}
|
|
18741
18666
|
};
|
|
18667
|
+
var updatePendingMessage$1 = function updatePendingMessage(message, channel, updatedMessage) {
|
|
18668
|
+
var messageToUpdate = _extends({}, message, updatedMessage);
|
|
18669
|
+
updateMessageOnMap(channel.id, {
|
|
18670
|
+
messageId: message.tid,
|
|
18671
|
+
params: messageToUpdate
|
|
18672
|
+
});
|
|
18673
|
+
updateMessageOnAllMessages(message.tid, messageToUpdate);
|
|
18674
|
+
updatePendingMessageOnMap(channel.id, message.tid, messageToUpdate);
|
|
18675
|
+
store.dispatch(updateMessageAC(message.tid, messageToUpdate, false));
|
|
18676
|
+
};
|
|
18742
18677
|
function sendMessage(action) {
|
|
18743
|
-
var payload, message, connectionState, channelId, sendAttachmentsAsSeparateMessage, channel, SceytChatClient, createChannelData, mentionedUserIds, customUploader, linkAttachment, attachmentsToSend, messagesToSend, mediaAttachments, _loop, i, messageBuilder, messageToSend, messageCopy, _loop2, _i, _t2;
|
|
18678
|
+
var payload, message, connectionState, channelId, sendAttachmentsAsSeparateMessage, isAddToPendingMessagesMap, channel, SceytChatClient, createChannelData, mentionedUserIds, customUploader, linkAttachment, attachmentsToSend, messagesToSend, mediaAttachments, _loop, i, messageBuilder, messageToSend, messageCopy, _loop2, _i, _t2;
|
|
18744
18679
|
return _regenerator().w(function (_context3) {
|
|
18745
18680
|
while (1) switch (_context3.p = _context3.n) {
|
|
18746
18681
|
case 0:
|
|
18747
18682
|
payload = action.payload;
|
|
18748
|
-
message = payload.message, connectionState = payload.connectionState, channelId = payload.channelId, sendAttachmentsAsSeparateMessage = payload.sendAttachmentsAsSeparateMessage;
|
|
18683
|
+
message = payload.message, connectionState = payload.connectionState, channelId = payload.channelId, sendAttachmentsAsSeparateMessage = payload.sendAttachmentsAsSeparateMessage, isAddToPendingMessagesMap = payload.isAddToPendingMessagesMap;
|
|
18749
18684
|
_context3.p = 1;
|
|
18750
18685
|
_context3.n = 2;
|
|
18751
18686
|
return put(setMessagesLoadingStateAC(LOADING_STATE.LOADING));
|
|
@@ -18789,7 +18724,7 @@ function sendMessage(action) {
|
|
|
18789
18724
|
}) : [];
|
|
18790
18725
|
customUploader = getCustomUploader();
|
|
18791
18726
|
if (!(message.attachments && message.attachments.length)) {
|
|
18792
|
-
_context3.n =
|
|
18727
|
+
_context3.n = 22;
|
|
18793
18728
|
break;
|
|
18794
18729
|
}
|
|
18795
18730
|
linkAttachment = null;
|
|
@@ -18802,7 +18737,7 @@ function sendMessage(action) {
|
|
|
18802
18737
|
return att.type !== attachmentTypes.link;
|
|
18803
18738
|
});
|
|
18804
18739
|
if (!(mediaAttachments && mediaAttachments.length)) {
|
|
18805
|
-
_context3.n =
|
|
18740
|
+
_context3.n = 18;
|
|
18806
18741
|
break;
|
|
18807
18742
|
}
|
|
18808
18743
|
_loop = /*#__PURE__*/_regenerator().m(function _callee() {
|
|
@@ -18843,7 +18778,9 @@ function sendMessage(action) {
|
|
|
18843
18778
|
}
|
|
18844
18779
|
};
|
|
18845
18780
|
} else if (customUploader && attachment) {
|
|
18846
|
-
attachment
|
|
18781
|
+
attachment = _extends({}, attachment, {
|
|
18782
|
+
url: attachment.data
|
|
18783
|
+
});
|
|
18847
18784
|
}
|
|
18848
18785
|
messageAttachment.tid = attachment.tid;
|
|
18849
18786
|
messageAttachment.attachmentUrl = attachment.attachmentUrl;
|
|
@@ -18851,7 +18788,7 @@ function sendMessage(action) {
|
|
|
18851
18788
|
messageAttachment.url = attachment.data;
|
|
18852
18789
|
}
|
|
18853
18790
|
if (!sendAttachmentsAsSeparateMessage) {
|
|
18854
|
-
_context.n =
|
|
18791
|
+
_context.n = 4;
|
|
18855
18792
|
break;
|
|
18856
18793
|
}
|
|
18857
18794
|
_messageBuilder = channel.createMessageBuilder();
|
|
@@ -18871,22 +18808,34 @@ function sendMessage(action) {
|
|
|
18871
18808
|
attachments: [messageAttachment]
|
|
18872
18809
|
});
|
|
18873
18810
|
messagesToSend.push(messageForSend);
|
|
18874
|
-
messageForSendCopy =
|
|
18811
|
+
messageForSendCopy = messageForSend;
|
|
18812
|
+
if (!isAddToPendingMessagesMap) {
|
|
18813
|
+
_context.n = 2;
|
|
18814
|
+
break;
|
|
18815
|
+
}
|
|
18875
18816
|
_context.n = 1;
|
|
18876
|
-
return call(addPendingMessage, message, messageForSendCopy,
|
|
18817
|
+
return call(addPendingMessage, message, _extends({}, messageForSendCopy, {
|
|
18818
|
+
attachments: [attachment]
|
|
18819
|
+
}), channel);
|
|
18877
18820
|
case 1:
|
|
18878
18821
|
_context.n = 3;
|
|
18879
18822
|
break;
|
|
18880
18823
|
case 2:
|
|
18881
|
-
|
|
18824
|
+
_context.n = 3;
|
|
18825
|
+
return call(updatePendingMessage$1, message, channel, messageForSendCopy);
|
|
18882
18826
|
case 3:
|
|
18827
|
+
_context.n = 5;
|
|
18828
|
+
break;
|
|
18829
|
+
case 4:
|
|
18830
|
+
attachmentsToSend.push(messageAttachment);
|
|
18831
|
+
case 5:
|
|
18883
18832
|
if (!(!messageAttachment.cachedUrl && customUploader)) {
|
|
18884
|
-
_context.n =
|
|
18833
|
+
_context.n = 6;
|
|
18885
18834
|
break;
|
|
18886
18835
|
}
|
|
18887
|
-
_context.n =
|
|
18836
|
+
_context.n = 6;
|
|
18888
18837
|
return put(updateAttachmentUploadingStateAC(UPLOAD_STATE.UPLOADING, messageAttachment.tid));
|
|
18889
|
-
case
|
|
18838
|
+
case 6:
|
|
18890
18839
|
return _context.a(2);
|
|
18891
18840
|
}
|
|
18892
18841
|
}, _callee);
|
|
@@ -18904,7 +18853,7 @@ function sendMessage(action) {
|
|
|
18904
18853
|
break;
|
|
18905
18854
|
case 10:
|
|
18906
18855
|
if (sendAttachmentsAsSeparateMessage) {
|
|
18907
|
-
_context3.n =
|
|
18856
|
+
_context3.n = 18;
|
|
18908
18857
|
break;
|
|
18909
18858
|
}
|
|
18910
18859
|
messageBuilder = channel.createMessageBuilder();
|
|
@@ -18916,27 +18865,53 @@ function sendMessage(action) {
|
|
|
18916
18865
|
messageBuilder.setReplyInThread();
|
|
18917
18866
|
}
|
|
18918
18867
|
messageToSend = messageBuilder.create();
|
|
18919
|
-
messageCopy =
|
|
18868
|
+
messageCopy = messageToSend;
|
|
18920
18869
|
if (!customUploader) {
|
|
18921
|
-
_context3.n =
|
|
18870
|
+
_context3.n = 14;
|
|
18922
18871
|
break;
|
|
18923
18872
|
}
|
|
18924
18873
|
if (sendAttachmentsAsSeparateMessage) {
|
|
18925
|
-
_context3.n =
|
|
18874
|
+
_context3.n = 13;
|
|
18875
|
+
break;
|
|
18876
|
+
}
|
|
18877
|
+
if (!isAddToPendingMessagesMap) {
|
|
18878
|
+
_context3.n = 12;
|
|
18926
18879
|
break;
|
|
18927
18880
|
}
|
|
18928
18881
|
_context3.n = 11;
|
|
18929
|
-
return call(addPendingMessage, message, messageCopy,
|
|
18882
|
+
return call(addPendingMessage, message, _extends({}, messageCopy, {
|
|
18883
|
+
attachments: message.attachments
|
|
18884
|
+
}), channel);
|
|
18930
18885
|
case 11:
|
|
18931
18886
|
_context3.n = 13;
|
|
18932
18887
|
break;
|
|
18933
18888
|
case 12:
|
|
18934
|
-
|
|
18935
|
-
return call(addPendingMessage, message, messageCopy, channel);
|
|
18889
|
+
updatePendingMessage$1(message, channel, messageCopy);
|
|
18936
18890
|
case 13:
|
|
18891
|
+
_context3.n = 17;
|
|
18892
|
+
break;
|
|
18893
|
+
case 14:
|
|
18894
|
+
if (!isAddToPendingMessagesMap) {
|
|
18895
|
+
_context3.n = 16;
|
|
18896
|
+
break;
|
|
18897
|
+
}
|
|
18898
|
+
_context3.n = 15;
|
|
18899
|
+
return call(addPendingMessage, message, messageCopy, channel);
|
|
18900
|
+
case 15:
|
|
18901
|
+
_context3.n = 17;
|
|
18902
|
+
break;
|
|
18903
|
+
case 16:
|
|
18904
|
+
updatePendingMessage$1(message, channel, messageCopy);
|
|
18905
|
+
case 17:
|
|
18937
18906
|
messageToSend.attachments = attachmentsToSend;
|
|
18938
18907
|
messagesToSend.push(messageToSend);
|
|
18939
|
-
case
|
|
18908
|
+
case 18:
|
|
18909
|
+
if (!(connectionState !== CONNECTION_STATUS.CONNECTED)) {
|
|
18910
|
+
_context3.n = 19;
|
|
18911
|
+
break;
|
|
18912
|
+
}
|
|
18913
|
+
throw new Error('Connection is required to send message');
|
|
18914
|
+
case 19:
|
|
18940
18915
|
_loop2 = /*#__PURE__*/_regenerator().m(function _callee2() {
|
|
18941
18916
|
var messageAttachment, messageToSend, _messageCopy, _attachmentsToSend, linkAttachmentToSend, linkAttachmentBuilder, messageResponse, k, pendingAttachment, attachmentsToUpdate, currentAttachmentsMap, messageUpdateData, messageToUpdate, channelUpdateParam, _t;
|
|
18942
18917
|
return _regenerator().w(function (_context2) {
|
|
@@ -19004,6 +18979,9 @@ function sendMessage(action) {
|
|
|
19004
18979
|
_context2.n = 5;
|
|
19005
18980
|
break;
|
|
19006
18981
|
case 8:
|
|
18982
|
+
if (!isAddToPendingMessagesMap) {
|
|
18983
|
+
store.dispatch(removePendingMessageAC(channel.id, messageToSend.tid));
|
|
18984
|
+
}
|
|
19007
18985
|
attachmentsToUpdate = [];
|
|
19008
18986
|
if (messageResponse.attachments && messageResponse.attachments.length > 0) {
|
|
19009
18987
|
currentAttachmentsMap = {};
|
|
@@ -19064,7 +19042,7 @@ function sendMessage(action) {
|
|
|
19064
19042
|
_context2.n = 13;
|
|
19065
19043
|
break;
|
|
19066
19044
|
case 12:
|
|
19067
|
-
throw Error('
|
|
19045
|
+
throw new Error('Connection required to send message');
|
|
19068
19046
|
case 13:
|
|
19069
19047
|
_context2.n = 16;
|
|
19070
19048
|
break;
|
|
@@ -19098,35 +19076,35 @@ function sendMessage(action) {
|
|
|
19098
19076
|
}, _callee2, null, [[1, 14]]);
|
|
19099
19077
|
});
|
|
19100
19078
|
_i = 0;
|
|
19101
|
-
case
|
|
19079
|
+
case 20:
|
|
19102
19080
|
if (!(_i < messagesToSend.length)) {
|
|
19103
|
-
_context3.n =
|
|
19081
|
+
_context3.n = 22;
|
|
19104
19082
|
break;
|
|
19105
19083
|
}
|
|
19106
|
-
return _context3.d(_regeneratorValues(_loop2()),
|
|
19107
|
-
case
|
|
19084
|
+
return _context3.d(_regeneratorValues(_loop2()), 21);
|
|
19085
|
+
case 21:
|
|
19108
19086
|
_i++;
|
|
19109
|
-
_context3.n =
|
|
19087
|
+
_context3.n = 20;
|
|
19110
19088
|
break;
|
|
19111
|
-
case
|
|
19112
|
-
_context3.n =
|
|
19089
|
+
case 22:
|
|
19090
|
+
_context3.n = 24;
|
|
19113
19091
|
break;
|
|
19114
|
-
case
|
|
19115
|
-
_context3.p =
|
|
19092
|
+
case 23:
|
|
19093
|
+
_context3.p = 23;
|
|
19116
19094
|
_t2 = _context3.v;
|
|
19117
19095
|
log.error('error on send message ... ', _t2);
|
|
19118
|
-
case
|
|
19096
|
+
case 24:
|
|
19119
19097
|
return _context3.a(2);
|
|
19120
19098
|
}
|
|
19121
|
-
}, _marked$3, null, [[1,
|
|
19099
|
+
}, _marked$3, null, [[1, 23]]);
|
|
19122
19100
|
}
|
|
19123
19101
|
function sendTextMessage(action) {
|
|
19124
|
-
var payload, message, connectionState, channelId, channel, sendMessageTid, activeChannelId, SceytChatClient, createChannelData, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, messageToSend, pendingMessage, _messageResponse, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam, _t3;
|
|
19102
|
+
var payload, message, connectionState, channelId, isAddToPendingMessagesMap, channel, sendMessageTid, activeChannelId, SceytChatClient, createChannelData, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, messageToSend, pendingMessage, _messageResponse, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam, _t3;
|
|
19125
19103
|
return _regenerator().w(function (_context4) {
|
|
19126
19104
|
while (1) switch (_context4.p = _context4.n) {
|
|
19127
19105
|
case 0:
|
|
19128
19106
|
payload = action.payload;
|
|
19129
|
-
message = payload.message, connectionState = payload.connectionState, channelId = payload.channelId;
|
|
19107
|
+
message = payload.message, connectionState = payload.connectionState, channelId = payload.channelId, isAddToPendingMessagesMap = payload.isAddToPendingMessagesMap;
|
|
19130
19108
|
_context4.n = 1;
|
|
19131
19109
|
return put(setMessagesLoadingStateAC(LOADING_STATE.LOADING));
|
|
19132
19110
|
case 1:
|
|
@@ -19194,32 +19172,41 @@ function sendTextMessage(action) {
|
|
|
19194
19172
|
pendingMessage.metadata = JSON.parse(pendingMessage.metadata);
|
|
19195
19173
|
}
|
|
19196
19174
|
if (!(activeChannelId === channel.id)) {
|
|
19197
|
-
_context4.n =
|
|
19175
|
+
_context4.n = 10;
|
|
19176
|
+
break;
|
|
19177
|
+
}
|
|
19178
|
+
if (!isAddToPendingMessagesMap) {
|
|
19179
|
+
_context4.n = 9;
|
|
19198
19180
|
break;
|
|
19199
19181
|
}
|
|
19200
19182
|
_context4.n = 8;
|
|
19201
19183
|
return call(addPendingMessage, message, pendingMessage, channel);
|
|
19202
19184
|
case 8:
|
|
19185
|
+
_context4.n = 10;
|
|
19186
|
+
break;
|
|
19187
|
+
case 9:
|
|
19188
|
+
updatePendingMessage$1(message, channel, pendingMessage);
|
|
19189
|
+
case 10:
|
|
19203
19190
|
if (!(connectionState === CONNECTION_STATUS.CONNECTED)) {
|
|
19204
|
-
_context4.n =
|
|
19191
|
+
_context4.n = 18;
|
|
19205
19192
|
break;
|
|
19206
19193
|
}
|
|
19207
19194
|
if (!sendMessageHandler) {
|
|
19208
|
-
_context4.n =
|
|
19195
|
+
_context4.n = 12;
|
|
19209
19196
|
break;
|
|
19210
19197
|
}
|
|
19211
|
-
_context4.n =
|
|
19198
|
+
_context4.n = 11;
|
|
19212
19199
|
return call(sendMessageHandler, messageToSend, channel.id);
|
|
19213
|
-
case
|
|
19200
|
+
case 11:
|
|
19214
19201
|
messageResponse = _context4.v;
|
|
19215
|
-
_context4.n =
|
|
19202
|
+
_context4.n = 14;
|
|
19216
19203
|
break;
|
|
19217
|
-
case
|
|
19218
|
-
_context4.n =
|
|
19204
|
+
case 12:
|
|
19205
|
+
_context4.n = 13;
|
|
19219
19206
|
return call(channel.sendMessage, messageToSend);
|
|
19220
|
-
case
|
|
19207
|
+
case 13:
|
|
19221
19208
|
messageResponse = _context4.v;
|
|
19222
|
-
case
|
|
19209
|
+
case 14:
|
|
19223
19210
|
messageUpdateData = {
|
|
19224
19211
|
id: messageResponse.id,
|
|
19225
19212
|
body: messageResponse.body,
|
|
@@ -19238,12 +19225,12 @@ function sendTextMessage(action) {
|
|
|
19238
19225
|
channelId: channel.id
|
|
19239
19226
|
};
|
|
19240
19227
|
if (!(activeChannelId === channel.id)) {
|
|
19241
|
-
_context4.n =
|
|
19228
|
+
_context4.n = 15;
|
|
19242
19229
|
break;
|
|
19243
19230
|
}
|
|
19244
|
-
_context4.n =
|
|
19231
|
+
_context4.n = 15;
|
|
19245
19232
|
return put(updateMessageAC(messageToSend.tid, messageUpdateData));
|
|
19246
|
-
case
|
|
19233
|
+
case 15:
|
|
19247
19234
|
updateMessageOnMap(channel.id, {
|
|
19248
19235
|
messageId: messageToSend.tid,
|
|
19249
19236
|
params: messageUpdateData
|
|
@@ -19257,30 +19244,33 @@ function sendTextMessage(action) {
|
|
|
19257
19244
|
lastMessage: messageToUpdate,
|
|
19258
19245
|
lastReactedMessage: null
|
|
19259
19246
|
};
|
|
19260
|
-
_context4.n =
|
|
19247
|
+
_context4.n = 16;
|
|
19261
19248
|
return put(updateChannelDataAC(channel.id, channelUpdateParam, true));
|
|
19262
|
-
case
|
|
19249
|
+
case 16:
|
|
19263
19250
|
updateChannelOnAllChannels(channel.id, channelUpdateParam);
|
|
19264
19251
|
if (!channel.unread) {
|
|
19265
|
-
_context4.n =
|
|
19252
|
+
_context4.n = 17;
|
|
19266
19253
|
break;
|
|
19267
19254
|
}
|
|
19268
|
-
_context4.n =
|
|
19255
|
+
_context4.n = 17;
|
|
19269
19256
|
return put(markChannelAsReadAC(channel.id));
|
|
19270
|
-
case
|
|
19257
|
+
case 17:
|
|
19271
19258
|
channel.lastMessage = messageToUpdate;
|
|
19272
|
-
|
|
19259
|
+
if (!isAddToPendingMessagesMap) {
|
|
19260
|
+
store.dispatch(removePendingMessageAC(channel.id, messageToSend.tid));
|
|
19261
|
+
}
|
|
19262
|
+
_context4.n = 19;
|
|
19273
19263
|
break;
|
|
19274
|
-
case
|
|
19264
|
+
case 18:
|
|
19275
19265
|
throw new Error('Connection required to send message');
|
|
19276
|
-
case
|
|
19277
|
-
_context4.n =
|
|
19266
|
+
case 19:
|
|
19267
|
+
_context4.n = 20;
|
|
19278
19268
|
return put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
19279
|
-
case
|
|
19280
|
-
_context4.n =
|
|
19269
|
+
case 20:
|
|
19270
|
+
_context4.n = 23;
|
|
19281
19271
|
break;
|
|
19282
|
-
case
|
|
19283
|
-
_context4.p =
|
|
19272
|
+
case 21:
|
|
19273
|
+
_context4.p = 21;
|
|
19284
19274
|
_t3 = _context4.v;
|
|
19285
19275
|
log.error('error on send text message ... ', _t3);
|
|
19286
19276
|
updateMessageOnMap(channel.id, {
|
|
@@ -19290,32 +19280,32 @@ function sendTextMessage(action) {
|
|
|
19290
19280
|
}
|
|
19291
19281
|
});
|
|
19292
19282
|
if (!(activeChannelId === channel.id)) {
|
|
19293
|
-
_context4.n =
|
|
19283
|
+
_context4.n = 22;
|
|
19294
19284
|
break;
|
|
19295
19285
|
}
|
|
19296
19286
|
updateMessageOnAllMessages(sendMessageTid, {
|
|
19297
19287
|
state: MESSAGE_STATUS.FAILED
|
|
19298
19288
|
});
|
|
19299
|
-
_context4.n =
|
|
19289
|
+
_context4.n = 22;
|
|
19300
19290
|
return put(updateMessageAC(sendMessageTid, {
|
|
19301
19291
|
state: MESSAGE_STATUS.FAILED
|
|
19302
19292
|
}));
|
|
19303
|
-
case
|
|
19304
|
-
_context4.n =
|
|
19293
|
+
case 22:
|
|
19294
|
+
_context4.n = 23;
|
|
19305
19295
|
return put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
19306
|
-
case
|
|
19296
|
+
case 23:
|
|
19307
19297
|
return _context4.a(2);
|
|
19308
19298
|
}
|
|
19309
|
-
}, _marked2$2, null, [[3,
|
|
19299
|
+
}, _marked2$2, null, [[3, 21]]);
|
|
19310
19300
|
}
|
|
19311
19301
|
function forwardMessage(action) {
|
|
19312
|
-
var payload, message, channelId, connectionState, isForward, channel, SceytChatClient, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, pollDetails, messageToSend, pendingMessage, activeChannelId,
|
|
19302
|
+
var payload, message, channelId, connectionState, isForward, isAddToPendingMessagesMap, channel, SceytChatClient, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, pollDetails, messageToSend, pendingMessage, activeChannelId, hasNextMessages, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam, _t4;
|
|
19313
19303
|
return _regenerator().w(function (_context5) {
|
|
19314
19304
|
while (1) switch (_context5.p = _context5.n) {
|
|
19315
19305
|
case 0:
|
|
19316
19306
|
_context5.p = 0;
|
|
19317
19307
|
payload = action.payload;
|
|
19318
|
-
message = payload.message, channelId = payload.channelId, connectionState = payload.connectionState, isForward = payload.isForward;
|
|
19308
|
+
message = payload.message, channelId = payload.channelId, connectionState = payload.connectionState, isForward = payload.isForward, isAddToPendingMessagesMap = payload.isAddToPendingMessagesMap;
|
|
19319
19309
|
_context5.n = 1;
|
|
19320
19310
|
return put(setMessagesLoadingStateAC(LOADING_STATE.LOADING));
|
|
19321
19311
|
case 1:
|
|
@@ -19350,7 +19340,7 @@ function forwardMessage(action) {
|
|
|
19350
19340
|
}) : [];
|
|
19351
19341
|
attachments = message.attachments;
|
|
19352
19342
|
if ((channel.type === DEFAULT_CHANNEL_TYPE.BROADCAST || channel.type === DEFAULT_CHANNEL_TYPE.PUBLIC) && !(channel.userRole === 'admin' || channel.userRole === 'owner')) {
|
|
19353
|
-
_context5.n =
|
|
19343
|
+
_context5.n = 16;
|
|
19354
19344
|
break;
|
|
19355
19345
|
}
|
|
19356
19346
|
if (message.attachments && message.attachments.length) {
|
|
@@ -19378,9 +19368,9 @@ function forwardMessage(action) {
|
|
|
19378
19368
|
}
|
|
19379
19369
|
messageBuilder.setBody(message.body).setBodyAttributes(message.bodyAttributes).setAttachments(attachments).setMentionUserIds(mentionedUserIds).setType(message.type).setDisableMentionsCount(getDisableFrowardMentionsCount()).setMetadata(message.metadata ? JSON.stringify(message.metadata) : '').setForwardingMessageId(message.forwardingDetails ? message.forwardingDetails.messageId : message.id).setPollDetails(pollDetails);
|
|
19380
19370
|
messageToSend = messageBuilder.create();
|
|
19381
|
-
pendingMessage =
|
|
19371
|
+
pendingMessage = _extends({}, messageToSend, {
|
|
19382
19372
|
createdAt: new Date(Date.now())
|
|
19383
|
-
})
|
|
19373
|
+
});
|
|
19384
19374
|
if (isForward) {
|
|
19385
19375
|
if (message.forwardingDetails) {
|
|
19386
19376
|
pendingMessage.forwardingDetails.user = message.forwardingDetails.user;
|
|
@@ -19392,50 +19382,42 @@ function forwardMessage(action) {
|
|
|
19392
19382
|
pendingMessage.forwardingDetails.hops = message.forwardingDetails ? message.forwardingDetails.hops : 1;
|
|
19393
19383
|
}
|
|
19394
19384
|
activeChannelId = getActiveChannelId();
|
|
19395
|
-
isCachedChannel = checkChannelExistsOnMessagesMap(channelId);
|
|
19396
19385
|
if (!(channelId === activeChannelId)) {
|
|
19397
|
-
_context5.n =
|
|
19386
|
+
_context5.n = 7;
|
|
19398
19387
|
break;
|
|
19399
19388
|
}
|
|
19400
19389
|
hasNextMessages = store.getState().MessageReducer.messagesHasNext;
|
|
19401
19390
|
if (getHasNextCached()) {
|
|
19402
|
-
_context5.n =
|
|
19391
|
+
_context5.n = 7;
|
|
19403
19392
|
break;
|
|
19404
19393
|
}
|
|
19405
19394
|
if (!hasNextMessages) {
|
|
19406
|
-
_context5.n =
|
|
19395
|
+
_context5.n = 7;
|
|
19407
19396
|
break;
|
|
19408
19397
|
}
|
|
19409
19398
|
_context5.n = 7;
|
|
19410
19399
|
return put(getMessagesAC(channel));
|
|
19411
19400
|
case 7:
|
|
19412
|
-
|
|
19413
|
-
|
|
19401
|
+
if (!isAddToPendingMessagesMap) {
|
|
19402
|
+
_context5.n = 9;
|
|
19403
|
+
break;
|
|
19404
|
+
}
|
|
19405
|
+
_context5.n = 8;
|
|
19406
|
+
return call(addPendingMessage, message, pendingMessage, channel);
|
|
19414
19407
|
case 8:
|
|
19415
|
-
_context5.n =
|
|
19416
|
-
|
|
19408
|
+
_context5.n = 10;
|
|
19409
|
+
break;
|
|
19417
19410
|
case 9:
|
|
19418
|
-
addMessageToMap(channelId, pendingMessage);
|
|
19419
|
-
addAllMessages([pendingMessage], MESSAGE_LOAD_DIRECTION.NEXT);
|
|
19420
19411
|
_context5.n = 10;
|
|
19421
|
-
return
|
|
19412
|
+
return call(updatePendingMessage$1, message, channel, pendingMessage);
|
|
19422
19413
|
case 10:
|
|
19423
|
-
_context5.n = 12;
|
|
19424
|
-
break;
|
|
19425
|
-
case 11:
|
|
19426
|
-
if (isCachedChannel) {
|
|
19427
|
-
addMessageToMap(channelId, pendingMessage);
|
|
19428
|
-
} else {
|
|
19429
|
-
setPendingMessage(channelId, pendingMessage);
|
|
19430
|
-
}
|
|
19431
|
-
case 12:
|
|
19432
19414
|
if (!(connectionState === CONNECTION_STATUS.CONNECTED)) {
|
|
19433
|
-
_context5.n =
|
|
19415
|
+
_context5.n = 16;
|
|
19434
19416
|
break;
|
|
19435
19417
|
}
|
|
19436
|
-
_context5.n =
|
|
19418
|
+
_context5.n = 11;
|
|
19437
19419
|
return call(channel.sendMessage, messageToSend);
|
|
19438
|
-
case
|
|
19420
|
+
case 11:
|
|
19439
19421
|
messageResponse = _context5.v;
|
|
19440
19422
|
messageUpdateData = {
|
|
19441
19423
|
id: messageResponse.id,
|
|
@@ -19452,409 +19434,75 @@ function forwardMessage(action) {
|
|
|
19452
19434
|
channelId: channel.id
|
|
19453
19435
|
};
|
|
19454
19436
|
if (!(channelId === activeChannelId)) {
|
|
19455
|
-
_context5.n =
|
|
19437
|
+
_context5.n = 13;
|
|
19456
19438
|
break;
|
|
19457
19439
|
}
|
|
19458
|
-
_context5.n =
|
|
19440
|
+
_context5.n = 12;
|
|
19459
19441
|
return put(updateMessageAC(messageToSend.tid, JSON.parse(JSON.stringify(messageUpdateData))));
|
|
19460
|
-
case
|
|
19461
|
-
updateMessageOnMap(channel.id, {
|
|
19462
|
-
messageId: messageToSend.tid,
|
|
19463
|
-
params: messageUpdateData
|
|
19464
|
-
});
|
|
19442
|
+
case 12:
|
|
19465
19443
|
updateMessageOnAllMessages(messageToSend.tid, messageUpdateData);
|
|
19466
|
-
|
|
19467
|
-
|
|
19468
|
-
|
|
19469
|
-
|
|
19470
|
-
_context5.n = 16;
|
|
19471
|
-
break;
|
|
19472
|
-
}
|
|
19444
|
+
case 13:
|
|
19445
|
+
_context5.n = 14;
|
|
19446
|
+
return put(removePendingMessageAC(channel.id, messageToSend.tid || messageToSend.id));
|
|
19447
|
+
case 14:
|
|
19473
19448
|
updateMessageOnMap(channel.id, {
|
|
19474
19449
|
messageId: messageToSend.tid,
|
|
19475
19450
|
params: messageUpdateData
|
|
19476
19451
|
});
|
|
19477
|
-
_context5.n = 17;
|
|
19478
|
-
break;
|
|
19479
|
-
case 16:
|
|
19480
|
-
_context5.n = 17;
|
|
19481
|
-
return put(removePendingMessageAC(channelId, messageToSend.tid || messageToSend.id));
|
|
19482
|
-
case 17:
|
|
19483
19452
|
messageToUpdate = JSON.parse(JSON.stringify(messageResponse));
|
|
19484
19453
|
updateChannelLastMessageOnAllChannels(channel.id, messageToUpdate);
|
|
19485
19454
|
channelUpdateParam = {
|
|
19486
19455
|
lastMessage: messageToUpdate,
|
|
19487
19456
|
lastReactedMessage: null
|
|
19488
19457
|
};
|
|
19489
|
-
_context5.n =
|
|
19458
|
+
_context5.n = 15;
|
|
19490
19459
|
return put(updateChannelDataAC(channel.id, channelUpdateParam, true));
|
|
19491
|
-
case
|
|
19460
|
+
case 15:
|
|
19492
19461
|
updateChannelOnAllChannels(channel.id, channelUpdateParam);
|
|
19493
19462
|
if (!channel.unread) {
|
|
19494
|
-
_context5.n =
|
|
19463
|
+
_context5.n = 16;
|
|
19495
19464
|
break;
|
|
19496
19465
|
}
|
|
19497
|
-
_context5.n =
|
|
19466
|
+
_context5.n = 16;
|
|
19498
19467
|
return put(markChannelAsReadAC(channel.id));
|
|
19499
|
-
case
|
|
19500
|
-
_context5.n =
|
|
19468
|
+
case 16:
|
|
19469
|
+
_context5.n = 18;
|
|
19501
19470
|
break;
|
|
19502
|
-
case
|
|
19503
|
-
_context5.p =
|
|
19471
|
+
case 17:
|
|
19472
|
+
_context5.p = 17;
|
|
19504
19473
|
_t4 = _context5.v;
|
|
19505
19474
|
log.error('error on forward message ... ', _t4);
|
|
19506
|
-
case
|
|
19507
|
-
_context5.n =
|
|
19475
|
+
case 18:
|
|
19476
|
+
_context5.n = 19;
|
|
19508
19477
|
return put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
19509
|
-
case
|
|
19478
|
+
case 19:
|
|
19510
19479
|
return _context5.a(2);
|
|
19511
19480
|
}
|
|
19512
|
-
}, _marked3$1, null, [[0,
|
|
19481
|
+
}, _marked3$1, null, [[0, 17]]);
|
|
19513
19482
|
}
|
|
19514
19483
|
function resendMessage(action) {
|
|
19515
|
-
var payload, message, connectionState, channelId,
|
|
19484
|
+
var payload, message, connectionState, channelId, sendAttachmentsAsSeparateMessage, isVoiceMessage;
|
|
19516
19485
|
return _regenerator().w(function (_context6) {
|
|
19517
|
-
while (1) switch (_context6.
|
|
19486
|
+
while (1) switch (_context6.n) {
|
|
19518
19487
|
case 0:
|
|
19519
19488
|
payload = action.payload;
|
|
19520
19489
|
message = payload.message, connectionState = payload.connectionState, channelId = payload.channelId;
|
|
19521
|
-
|
|
19522
|
-
|
|
19523
|
-
|
|
19524
|
-
|
|
19525
|
-
|
|
19526
|
-
|
|
19527
|
-
channel = _context6.v;
|
|
19528
|
-
_context6.p = 3;
|
|
19529
|
-
if (!channel) {
|
|
19530
|
-
channel = getChannelFromAllChannels(channelId);
|
|
19531
|
-
if (channel) {
|
|
19532
|
-
setChannelInMap(channel);
|
|
19533
|
-
}
|
|
19534
|
-
}
|
|
19535
|
-
_context6.n = 4;
|
|
19536
|
-
return put(addChannelAC(JSON.parse(JSON.stringify(channel))));
|
|
19537
|
-
case 4:
|
|
19538
|
-
customUploader = getCustomUploader();
|
|
19539
|
-
_context6.n = 5;
|
|
19540
|
-
return put(updateMessageAC(message.tid, {
|
|
19541
|
-
state: MESSAGE_STATUS.UNMODIFIED
|
|
19542
|
-
}));
|
|
19543
|
-
case 5:
|
|
19544
|
-
updateMessageOnMap(channel.id, {
|
|
19545
|
-
messageId: message.tid,
|
|
19546
|
-
params: {
|
|
19547
|
-
state: MESSAGE_STATUS.UNMODIFIED
|
|
19548
|
-
}
|
|
19549
|
-
});
|
|
19550
|
-
updateMessageOnAllMessages(message.tid, {
|
|
19551
|
-
state: MESSAGE_STATUS.UNMODIFIED
|
|
19552
|
-
});
|
|
19553
|
-
if (!(message.attachments && message.attachments.length && message.state === MESSAGE_STATUS.FAILED)) {
|
|
19554
|
-
_context6.n = 26;
|
|
19555
|
-
break;
|
|
19556
|
-
}
|
|
19557
|
-
_context6.n = 6;
|
|
19558
|
-
return select(attachmentCompilationStateSelector);
|
|
19559
|
-
case 6:
|
|
19560
|
-
attachmentCompilation = _context6.v;
|
|
19561
|
-
messageAttachment = _extends({}, message.attachments[0]);
|
|
19562
|
-
messageCopy = _extends({}, message, {
|
|
19563
|
-
attachments: [messageAttachment]
|
|
19564
|
-
});
|
|
19565
|
-
log.info('attachmentCompilation. .. . .', attachmentCompilation);
|
|
19566
|
-
if (!(connectionState === CONNECTION_STATUS.CONNECTED && attachmentCompilation[messageAttachment.tid] && attachmentCompilation[messageAttachment.tid] === UPLOAD_STATE.FAIL)) {
|
|
19567
|
-
_context6.n = 25;
|
|
19568
|
-
break;
|
|
19569
|
-
}
|
|
19570
|
-
_context6.n = 7;
|
|
19571
|
-
return put(updateAttachmentUploadingStateAC(UPLOAD_STATE.UPLOADING, messageAttachment.tid));
|
|
19572
|
-
case 7:
|
|
19573
|
-
if (!customUploader) {
|
|
19574
|
-
_context6.n = 25;
|
|
19575
|
-
break;
|
|
19576
|
-
}
|
|
19577
|
-
handleUploadProgress = function handleUploadProgress(_ref2) {
|
|
19578
|
-
var loaded = _ref2.loaded,
|
|
19579
|
-
total = _ref2.total;
|
|
19580
|
-
log.info('progress ... ', loaded / total);
|
|
19581
|
-
};
|
|
19582
|
-
_context6.p = 8;
|
|
19583
|
-
handleUpdateLocalPath = function handleUpdateLocalPath(updatedLink) {
|
|
19584
|
-
filePath = updatedLink;
|
|
19585
|
-
thumbnailMetas = getVideoThumb(messageAttachment.tid);
|
|
19586
|
-
messageCopy.attachments[0] = _extends({}, messageCopy.attachments[0], {
|
|
19587
|
-
attachmentUrl: updatedLink
|
|
19588
|
-
});
|
|
19589
|
-
var updateAttachmentPath = {
|
|
19590
|
-
attachments: [_extends({}, messageCopy.attachments[0], {
|
|
19591
|
-
attachmentUrl: updatedLink
|
|
19592
|
-
})]
|
|
19593
|
-
};
|
|
19594
|
-
store.dispatch(updateMessageAC(message.tid, updateAttachmentPath));
|
|
19595
|
-
};
|
|
19596
|
-
pendingAttachment = getPendingAttachment(message.attachments[0].tid);
|
|
19597
|
-
log.info('pendingAttachment ... ', pendingAttachment);
|
|
19598
|
-
if (!messageAttachment.cachedUrl) {
|
|
19599
|
-
_context6.n = 9;
|
|
19600
|
-
break;
|
|
19601
|
-
}
|
|
19602
|
-
uri = pendingAttachment.file;
|
|
19603
|
-
_context6.n = 11;
|
|
19604
|
-
break;
|
|
19605
|
-
case 9:
|
|
19606
|
-
messageAttachment.data = pendingAttachment.file;
|
|
19607
|
-
messageAttachment.url = pendingAttachment.file;
|
|
19608
|
-
_context6.n = 10;
|
|
19609
|
-
return call(customUpload, messageAttachment, handleUploadProgress, message.type, handleUpdateLocalPath);
|
|
19610
|
-
case 10:
|
|
19611
|
-
uri = _context6.v;
|
|
19612
|
-
case 11:
|
|
19613
|
-
log.info('messageAttachment ... ', messageAttachment);
|
|
19614
|
-
_context6.n = 12;
|
|
19615
|
-
return put(updateAttachmentUploadingStateAC(UPLOAD_STATE.SUCCESS, messageAttachment.tid));
|
|
19616
|
-
case 12:
|
|
19617
|
-
delete messageCopy.createdAt;
|
|
19618
|
-
thumbnailMetas = {};
|
|
19619
|
-
fileSize = messageAttachment.cachedUrl ? messageAttachment.size : pendingAttachment.file.size;
|
|
19620
|
-
log.info('uri ... ', uri);
|
|
19621
|
-
if (!(!messageAttachment.cachedUrl && messageAttachment.url.type.split('/')[0] === 'image')) {
|
|
19622
|
-
_context6.n = 15;
|
|
19623
|
-
break;
|
|
19624
|
-
}
|
|
19625
|
-
_context6.n = 13;
|
|
19626
|
-
return call(getImageSize, filePath);
|
|
19627
|
-
case 13:
|
|
19628
|
-
fileSize = _context6.v;
|
|
19629
|
-
_context6.n = 14;
|
|
19630
|
-
return call(createImageThumbnail, null, filePath, messageAttachment.type === 'file' ? 50 : undefined, messageAttachment.type === 'file' ? 50 : undefined);
|
|
19631
|
-
case 14:
|
|
19632
|
-
thumbnailMetas = _context6.v;
|
|
19633
|
-
_context6.n = 17;
|
|
19634
|
-
break;
|
|
19635
|
-
case 15:
|
|
19636
|
-
if (!(!messageAttachment.cachedUrl && messageAttachment.url.type.split('/')[0] === 'video')) {
|
|
19637
|
-
_context6.n = 17;
|
|
19638
|
-
break;
|
|
19639
|
-
}
|
|
19640
|
-
if (!filePath) {
|
|
19641
|
-
_context6.n = 17;
|
|
19642
|
-
break;
|
|
19643
|
-
}
|
|
19644
|
-
_context6.n = 16;
|
|
19645
|
-
return call(getFrame, filePath);
|
|
19646
|
-
case 16:
|
|
19647
|
-
meta = _context6.v;
|
|
19648
|
-
thumbnailMetas = {
|
|
19649
|
-
thumbnail: meta.thumb,
|
|
19650
|
-
imageWidth: meta.width,
|
|
19651
|
-
imageHeight: meta.height,
|
|
19652
|
-
duration: meta.duration
|
|
19653
|
-
};
|
|
19654
|
-
case 17:
|
|
19655
|
-
if (messageAttachment.cachedUrl) {
|
|
19656
|
-
attachmentMeta = messageAttachment.metadata;
|
|
19490
|
+
if (message.forwardingDetails) {
|
|
19491
|
+
store.dispatch(forwardMessageAC(message, channelId, connectionState, false, false));
|
|
19492
|
+
} else if (message.attachments && message.attachments.length) {
|
|
19493
|
+
sendAttachmentsAsSeparateMessage = getSendAttachmentsAsSeparateMessages();
|
|
19494
|
+
isVoiceMessage = message.attachments[0].type === attachmentTypes.voice;
|
|
19495
|
+
store.dispatch(sendMessageAC(message, channelId, connectionState, isVoiceMessage ? false : sendAttachmentsAsSeparateMessage, false, false));
|
|
19657
19496
|
} else {
|
|
19658
|
-
|
|
19659
|
-
tmb: thumbnailMetas.thumbnail,
|
|
19660
|
-
szw: thumbnailMetas.imageWidth,
|
|
19661
|
-
szh: thumbnailMetas.imageHeight
|
|
19662
|
-
}, thumbnailMetas.duration ? {
|
|
19663
|
-
dur: thumbnailMetas.duration
|
|
19664
|
-
} : {})));
|
|
19665
|
-
}
|
|
19666
|
-
log.info('attachmentMeta ... ', attachmentMeta);
|
|
19667
|
-
attachmentBuilder = channel.createAttachmentBuilder(uri, messageAttachment.type);
|
|
19668
|
-
attachmentToSend = attachmentBuilder.setName(messageAttachment.name).setMetadata(attachmentMeta).setFileSize(fileSize).setUpload(false).create();
|
|
19669
|
-
log.info('attachmentToSend ... ', attachmentToSend);
|
|
19670
|
-
attachmentToSend.tid = messageAttachment.tid;
|
|
19671
|
-
attachmentToSend.attachmentUrl = messageAttachment.attachmentUrl;
|
|
19672
|
-
_context6.n = 18;
|
|
19673
|
-
return put(updateMessageAC(messageCopy.tid, JSON.parse(JSON.stringify(_extends({}, messageCopy, {
|
|
19674
|
-
attachments: [attachmentToSend]
|
|
19675
|
-
})))));
|
|
19676
|
-
case 18:
|
|
19677
|
-
messageCopy.attachments = [attachmentToSend];
|
|
19678
|
-
if (!(connectionState === CONNECTION_STATUS.CONNECTED)) {
|
|
19679
|
-
_context6.n = 22;
|
|
19680
|
-
break;
|
|
19681
|
-
}
|
|
19682
|
-
_context6.n = 19;
|
|
19683
|
-
return call(channel.sendMessage, messageCopy);
|
|
19684
|
-
case 19:
|
|
19685
|
-
messageResponse = _context6.v;
|
|
19686
|
-
deletePendingAttachment(messageAttachment.tid);
|
|
19687
|
-
messageUpdateData = {
|
|
19688
|
-
id: messageResponse.id,
|
|
19689
|
-
body: messageResponse.body,
|
|
19690
|
-
type: messageResponse.type,
|
|
19691
|
-
state: messageResponse.state,
|
|
19692
|
-
displayCount: messageResponse.displayCount,
|
|
19693
|
-
deliveryStatus: messageResponse.deliveryStatus,
|
|
19694
|
-
attachments: [_extends({}, messageResponse.attachments[0], {
|
|
19695
|
-
attachmentUrl: attachmentToSend.attachmentUrl,
|
|
19696
|
-
tid: attachmentToSend.tid
|
|
19697
|
-
})],
|
|
19698
|
-
mentionedUsers: messageResponse.mentionedUsers,
|
|
19699
|
-
metadata: messageResponse.metadata,
|
|
19700
|
-
parentMessage: messageResponse.parentMessage,
|
|
19701
|
-
repliedInThread: messageResponse.repliedInThread,
|
|
19702
|
-
bodyAttributes: messageResponse.bodyAttributes,
|
|
19703
|
-
createdAt: messageResponse.createdAt,
|
|
19704
|
-
channelId: channel.id
|
|
19705
|
-
};
|
|
19706
|
-
_context6.n = 20;
|
|
19707
|
-
return put(removePendingMessageAC(channel.id, messageCopy.tid || messageCopy.id));
|
|
19708
|
-
case 20:
|
|
19709
|
-
_context6.n = 21;
|
|
19710
|
-
return put(updateMessageAC(messageCopy.tid, JSON.parse(JSON.stringify(messageUpdateData))));
|
|
19711
|
-
case 21:
|
|
19712
|
-
fileType = messageAttachment.data && messageAttachment.data.type ? messageAttachment.data.type.split('/')[0] : messageAttachment.type;
|
|
19713
|
-
if (fileType === 'video') {
|
|
19714
|
-
deleteVideoThumb(messageAttachment.tid);
|
|
19497
|
+
store.dispatch(sendTextMessageAC(message, channelId, connectionState, false));
|
|
19715
19498
|
}
|
|
19716
|
-
|
|
19717
|
-
messageId: messageCopy.tid,
|
|
19718
|
-
params: messageUpdateData
|
|
19719
|
-
});
|
|
19720
|
-
updateMessageOnAllMessages(messageCopy.tid, messageUpdateData);
|
|
19721
|
-
messageToUpdate = JSON.parse(JSON.stringify(messageResponse));
|
|
19722
|
-
updateChannelLastMessageOnAllChannels(channel.id, messageToUpdate);
|
|
19723
|
-
_context6.n = 22;
|
|
19724
|
-
return put(updateChannelLastMessageAC(messageToUpdate, {
|
|
19725
|
-
id: channel.id
|
|
19726
|
-
}));
|
|
19727
|
-
case 22:
|
|
19728
|
-
_context6.n = 25;
|
|
19729
|
-
break;
|
|
19730
|
-
case 23:
|
|
19731
|
-
_context6.p = 23;
|
|
19732
|
-
_t5 = _context6.v;
|
|
19733
|
-
log.error('fail upload attachment on resend message ... ', _t5);
|
|
19734
|
-
_context6.n = 24;
|
|
19735
|
-
return put(updateAttachmentUploadingStateAC(UPLOAD_STATE.FAIL, messageAttachment.tid));
|
|
19736
|
-
case 24:
|
|
19737
|
-
updateMessageOnMap(channel.id, {
|
|
19738
|
-
messageId: messageCopy.tid,
|
|
19739
|
-
params: {
|
|
19740
|
-
state: MESSAGE_STATUS.FAILED
|
|
19741
|
-
}
|
|
19742
|
-
});
|
|
19743
|
-
updateMessageOnAllMessages(messageCopy.tid, {
|
|
19744
|
-
state: MESSAGE_STATUS.FAILED
|
|
19745
|
-
});
|
|
19746
|
-
_context6.n = 25;
|
|
19747
|
-
return put(updateMessageAC(messageCopy.tid, {
|
|
19748
|
-
state: MESSAGE_STATUS.FAILED
|
|
19749
|
-
}));
|
|
19750
|
-
case 25:
|
|
19751
|
-
_context6.n = 33;
|
|
19752
|
-
break;
|
|
19753
|
-
case 26:
|
|
19754
|
-
if (!(message.state === MESSAGE_STATUS.FAILED)) {
|
|
19755
|
-
_context6.n = 33;
|
|
19756
|
-
break;
|
|
19757
|
-
}
|
|
19758
|
-
log.info('send failed message ...');
|
|
19759
|
-
_messageCopy2 = _extends({}, message);
|
|
19760
|
-
delete _messageCopy2.createdAt;
|
|
19761
|
-
if (!(connectionState === CONNECTION_STATUS.CONNECTED)) {
|
|
19762
|
-
_context6.n = 33;
|
|
19763
|
-
break;
|
|
19764
|
-
}
|
|
19765
|
-
_context6.n = 27;
|
|
19766
|
-
return call(channel.sendMessage, _messageCopy2);
|
|
19767
|
-
case 27:
|
|
19768
|
-
_messageResponse2 = _context6.v;
|
|
19769
|
-
_context6.n = 28;
|
|
19770
|
-
return put(removePendingMessageAC(channel.id, _messageCopy2.tid || _messageCopy2.id));
|
|
19771
|
-
case 28:
|
|
19772
|
-
_messageUpdateData = {
|
|
19773
|
-
id: _messageResponse2.id,
|
|
19774
|
-
body: _messageResponse2.body,
|
|
19775
|
-
type: _messageResponse2.type,
|
|
19776
|
-
state: _messageResponse2.state,
|
|
19777
|
-
displayCount: _messageResponse2.displayCount,
|
|
19778
|
-
deliveryStatus: _messageResponse2.deliveryStatus,
|
|
19779
|
-
attachments: [],
|
|
19780
|
-
mentionedUsers: _messageResponse2.mentionedUsers,
|
|
19781
|
-
metadata: _messageResponse2.metadata,
|
|
19782
|
-
parentMessage: _messageResponse2.parentMessage,
|
|
19783
|
-
repliedInThread: _messageResponse2.repliedInThread,
|
|
19784
|
-
bodyAttributes: _messageResponse2.bodyAttributes,
|
|
19785
|
-
createdAt: _messageResponse2.createdAt,
|
|
19786
|
-
channelId: channel.id
|
|
19787
|
-
};
|
|
19788
|
-
isInActiveChannel = getMessagesFromMap(channelId)[_messageCopy2.tid];
|
|
19789
|
-
if (!isInActiveChannel) {
|
|
19790
|
-
_context6.n = 29;
|
|
19791
|
-
break;
|
|
19792
|
-
}
|
|
19793
|
-
_context6.n = 29;
|
|
19794
|
-
return put(removePendingMessageAC(channel.id, _messageCopy2.tid || _messageCopy2.id));
|
|
19795
|
-
case 29:
|
|
19796
|
-
_context6.n = 30;
|
|
19797
|
-
return put(updateMessageAC(_messageCopy2.tid, _messageUpdateData));
|
|
19798
|
-
case 30:
|
|
19799
|
-
updateMessageOnMap(channel.id, {
|
|
19800
|
-
messageId: _messageCopy2.tid,
|
|
19801
|
-
params: _messageUpdateData
|
|
19802
|
-
});
|
|
19803
|
-
activeChannelId = getActiveChannelId();
|
|
19804
|
-
if (!(channelId === activeChannelId)) {
|
|
19805
|
-
_context6.n = 32;
|
|
19806
|
-
break;
|
|
19807
|
-
}
|
|
19808
|
-
_context6.n = 31;
|
|
19809
|
-
return put(updateMessageAC(_messageCopy2.tid, JSON.parse(JSON.stringify(_messageResponse2))));
|
|
19810
|
-
case 31:
|
|
19811
|
-
updateMessageOnMap(channel.id, {
|
|
19812
|
-
messageId: _messageCopy2.tid,
|
|
19813
|
-
params: _messageUpdateData
|
|
19814
|
-
});
|
|
19815
|
-
updateMessageOnAllMessages(_messageCopy2.tid, _messageUpdateData);
|
|
19816
|
-
case 32:
|
|
19817
|
-
updateChannelOnAllChannels(channel.id, channel);
|
|
19818
|
-
_messageToUpdate = JSON.parse(JSON.stringify(_messageResponse2));
|
|
19819
|
-
updateChannelLastMessageOnAllChannels(channel.id, _messageToUpdate);
|
|
19820
|
-
_context6.n = 33;
|
|
19821
|
-
return put(updateChannelLastMessageAC(_messageToUpdate, {
|
|
19822
|
-
id: channel.id
|
|
19823
|
-
}));
|
|
19824
|
-
case 33:
|
|
19825
|
-
_context6.n = 34;
|
|
19826
|
-
return put(scrollToNewMessageAC(true));
|
|
19827
|
-
case 34:
|
|
19828
|
-
_context6.n = 37;
|
|
19829
|
-
break;
|
|
19830
|
-
case 35:
|
|
19831
|
-
_context6.p = 35;
|
|
19832
|
-
_t6 = _context6.v;
|
|
19833
|
-
log.error('ERROR in resend message', _t6.message, 'channel.. . ', channel);
|
|
19834
|
-
_context6.n = 36;
|
|
19835
|
-
return put(updateMessageAC(message.tid, {
|
|
19836
|
-
state: MESSAGE_STATUS.FAILED
|
|
19837
|
-
}));
|
|
19838
|
-
case 36:
|
|
19839
|
-
updateMessageOnMap(channel.id, {
|
|
19840
|
-
messageId: message.tid,
|
|
19841
|
-
params: {
|
|
19842
|
-
state: MESSAGE_STATUS.FAILED
|
|
19843
|
-
}
|
|
19844
|
-
});
|
|
19845
|
-
updateMessageOnAllMessages(message.tid, {
|
|
19846
|
-
state: MESSAGE_STATUS.FAILED
|
|
19847
|
-
});
|
|
19848
|
-
case 37:
|
|
19849
|
-
_context6.n = 38;
|
|
19850
|
-
return put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
19851
|
-
case 38:
|
|
19499
|
+
case 1:
|
|
19852
19500
|
return _context6.a(2);
|
|
19853
19501
|
}
|
|
19854
|
-
}, _marked4$1
|
|
19502
|
+
}, _marked4$1);
|
|
19855
19503
|
}
|
|
19856
19504
|
function deleteMessage(action) {
|
|
19857
|
-
var payload, messageId, channelId, deleteOption, channel, deletedMessage, messageToUpdate,
|
|
19505
|
+
var payload, messageId, channelId, deleteOption, channel, deletedMessage, messageToUpdate, _t5;
|
|
19858
19506
|
return _regenerator().w(function (_context7) {
|
|
19859
19507
|
while (1) switch (_context7.p = _context7.n) {
|
|
19860
19508
|
case 0:
|
|
@@ -19896,21 +19544,21 @@ function deleteMessage(action) {
|
|
|
19896
19544
|
break;
|
|
19897
19545
|
case 5:
|
|
19898
19546
|
_context7.p = 5;
|
|
19899
|
-
|
|
19900
|
-
log.error('ERROR in delete message',
|
|
19547
|
+
_t5 = _context7.v;
|
|
19548
|
+
log.error('ERROR in delete message', _t5.message);
|
|
19901
19549
|
case 6:
|
|
19902
19550
|
return _context7.a(2);
|
|
19903
19551
|
}
|
|
19904
19552
|
}, _marked5$1, null, [[0, 5]]);
|
|
19905
19553
|
}
|
|
19906
19554
|
function editMessage(action) {
|
|
19907
|
-
var payload,
|
|
19555
|
+
var payload, message, channelId, channel, linkAttachments, anotherAttachments, linkAttachmentsToSend, editedMessage, messageToUpdate, _t6;
|
|
19908
19556
|
return _regenerator().w(function (_context8) {
|
|
19909
19557
|
while (1) switch (_context8.p = _context8.n) {
|
|
19910
19558
|
case 0:
|
|
19911
19559
|
_context8.p = 0;
|
|
19912
19560
|
payload = action.payload;
|
|
19913
|
-
|
|
19561
|
+
message = payload.message, channelId = payload.channelId;
|
|
19914
19562
|
_context8.n = 1;
|
|
19915
19563
|
return call(getChannelFromMap, channelId);
|
|
19916
19564
|
case 1:
|
|
@@ -19921,11 +19569,11 @@ function editMessage(action) {
|
|
|
19921
19569
|
setChannelInMap(channel);
|
|
19922
19570
|
}
|
|
19923
19571
|
}
|
|
19924
|
-
if (
|
|
19925
|
-
linkAttachments =
|
|
19572
|
+
if (message.attachments.length > 0) {
|
|
19573
|
+
linkAttachments = message.attachments.filter(function (att) {
|
|
19926
19574
|
return att.type === attachmentTypes.link;
|
|
19927
19575
|
});
|
|
19928
|
-
anotherAttachments =
|
|
19576
|
+
anotherAttachments = message.attachments.filter(function (att) {
|
|
19929
19577
|
return att.type !== attachmentTypes.link;
|
|
19930
19578
|
});
|
|
19931
19579
|
linkAttachmentsToSend = [];
|
|
@@ -19934,12 +19582,12 @@ function editMessage(action) {
|
|
|
19934
19582
|
var linkAttachmentToSend = linkAttachmentBuilder.setName(linkAttachment.name).setUpload(linkAttachment.upload).create();
|
|
19935
19583
|
linkAttachmentsToSend.push(linkAttachmentToSend);
|
|
19936
19584
|
});
|
|
19937
|
-
|
|
19585
|
+
message.attachments = [].concat(anotherAttachments, linkAttachmentsToSend);
|
|
19938
19586
|
}
|
|
19939
19587
|
_context8.n = 2;
|
|
19940
|
-
return call(channel.editMessage, _extends({},
|
|
19941
|
-
metadata: isJSON(
|
|
19942
|
-
attachments:
|
|
19588
|
+
return call(channel.editMessage, _extends({}, message, {
|
|
19589
|
+
metadata: isJSON(message.metadata) ? message.metadata : JSON.stringify(message.metadata),
|
|
19590
|
+
attachments: message.attachments.map(function (att) {
|
|
19943
19591
|
return _extends({}, att, {
|
|
19944
19592
|
metadata: isJSON(att.metadata) ? att.metadata : JSON.stringify(att.metadata)
|
|
19945
19593
|
});
|
|
@@ -19954,8 +19602,8 @@ function editMessage(action) {
|
|
|
19954
19602
|
messageId: editedMessage.id,
|
|
19955
19603
|
params: editedMessage
|
|
19956
19604
|
});
|
|
19957
|
-
updateMessageOnAllMessages(
|
|
19958
|
-
if (!(channel.lastMessage.id ===
|
|
19605
|
+
updateMessageOnAllMessages(message.id, editedMessage);
|
|
19606
|
+
if (!(channel.lastMessage.id === message.id)) {
|
|
19959
19607
|
_context8.n = 4;
|
|
19960
19608
|
break;
|
|
19961
19609
|
}
|
|
@@ -19968,15 +19616,15 @@ function editMessage(action) {
|
|
|
19968
19616
|
break;
|
|
19969
19617
|
case 5:
|
|
19970
19618
|
_context8.p = 5;
|
|
19971
|
-
|
|
19972
|
-
log.error('ERROR in edit message',
|
|
19619
|
+
_t6 = _context8.v;
|
|
19620
|
+
log.error('ERROR in edit message', _t6.message);
|
|
19973
19621
|
case 6:
|
|
19974
19622
|
return _context8.a(2);
|
|
19975
19623
|
}
|
|
19976
19624
|
}, _marked6$1, null, [[0, 5]]);
|
|
19977
19625
|
}
|
|
19978
19626
|
function getMessagesQuery(action) {
|
|
19979
|
-
var _action$payload, channel, loadWithLastMessage, messageId, limit, withDeliveredMessages, highlight, behavior, SceytChatClient, messageQueryBuilder, messageQuery, cachedMessages, result, allMessages, havLastMessage, secondResult, sentMessages, messagesMap, filteredSentMessages, _allMessages, messageIndex, maxLengthPart, _secondResult, thirdResult, _secondResult2, _thirdResult, _secondResult3, _Object$values, previousAllMessages, _secondResult4, updatedMessages, lastMessageId, _allMessages2, setMappedAllMessages, allMessagesAfterLastMessage, pendingMessages, _messagesMap, filteredPendingMessages,
|
|
19627
|
+
var _action$payload, channel, loadWithLastMessage, messageId, limit, withDeliveredMessages, highlight, behavior, SceytChatClient, messageQueryBuilder, messageQuery, cachedMessages, result, allMessages, havLastMessage, secondResult, sentMessages, messagesMap, filteredSentMessages, _allMessages, messageIndex, maxLengthPart, _secondResult, thirdResult, _secondResult2, _thirdResult, _secondResult3, _Object$values, previousAllMessages, _secondResult4, updatedMessages, lastMessageId, _allMessages2, setMappedAllMessages, allMessagesAfterLastMessage, pendingMessages, _messagesMap, filteredPendingMessages, _t7;
|
|
19980
19628
|
return _regenerator().w(function (_context9) {
|
|
19981
19629
|
while (1) switch (_context9.p = _context9.n) {
|
|
19982
19630
|
case 0:
|
|
@@ -20317,8 +19965,8 @@ function getMessagesQuery(action) {
|
|
|
20317
19965
|
break;
|
|
20318
19966
|
case 50:
|
|
20319
19967
|
_context9.p = 50;
|
|
20320
|
-
|
|
20321
|
-
log.error('error in message query',
|
|
19968
|
+
_t7 = _context9.v;
|
|
19969
|
+
log.error('error in message query', _t7);
|
|
20322
19970
|
case 51:
|
|
20323
19971
|
_context9.p = 51;
|
|
20324
19972
|
_context9.n = 52;
|
|
@@ -20331,7 +19979,7 @@ function getMessagesQuery(action) {
|
|
|
20331
19979
|
}, _marked7$1, null, [[0, 50, 51, 53]]);
|
|
20332
19980
|
}
|
|
20333
19981
|
function getMessageQuery(action) {
|
|
20334
|
-
var payload, channelId, messageId, channel, messages, fetchedMessage,
|
|
19982
|
+
var payload, channelId, messageId, channel, messages, fetchedMessage, _t8;
|
|
20335
19983
|
return _regenerator().w(function (_context0) {
|
|
20336
19984
|
while (1) switch (_context0.p = _context0.n) {
|
|
20337
19985
|
case 0:
|
|
@@ -20380,15 +20028,15 @@ function getMessageQuery(action) {
|
|
|
20380
20028
|
break;
|
|
20381
20029
|
case 7:
|
|
20382
20030
|
_context0.p = 7;
|
|
20383
|
-
|
|
20384
|
-
log.error('error in message query',
|
|
20031
|
+
_t8 = _context0.v;
|
|
20032
|
+
log.error('error in message query', _t8);
|
|
20385
20033
|
case 8:
|
|
20386
20034
|
return _context0.a(2);
|
|
20387
20035
|
}
|
|
20388
20036
|
}, _marked8$1, null, [[0, 7]]);
|
|
20389
20037
|
}
|
|
20390
20038
|
function loadMoreMessages(action) {
|
|
20391
|
-
var payload, limit, direction, channelId, messageId, hasNext, SceytChatClient, messageQueryBuilder, messageQuery, result,
|
|
20039
|
+
var payload, limit, direction, channelId, messageId, hasNext, SceytChatClient, messageQueryBuilder, messageQuery, result, _t9;
|
|
20392
20040
|
return _regenerator().w(function (_context1) {
|
|
20393
20041
|
while (1) switch (_context1.p = _context1.n) {
|
|
20394
20042
|
case 0:
|
|
@@ -20501,15 +20149,15 @@ function loadMoreMessages(action) {
|
|
|
20501
20149
|
break;
|
|
20502
20150
|
case 18:
|
|
20503
20151
|
_context1.p = 18;
|
|
20504
|
-
|
|
20505
|
-
log.error('error in load more messages',
|
|
20152
|
+
_t9 = _context1.v;
|
|
20153
|
+
log.error('error in load more messages', _t9);
|
|
20506
20154
|
case 19:
|
|
20507
20155
|
return _context1.a(2);
|
|
20508
20156
|
}
|
|
20509
20157
|
}, _marked9$1, null, [[0, 18]]);
|
|
20510
20158
|
}
|
|
20511
20159
|
function addReaction(action) {
|
|
20512
|
-
var payload, channelId, messageId, key, score, reason, enforceUnique, user, channel, _yield$call,
|
|
20160
|
+
var payload, channelId, messageId, key, score, reason, enforceUnique, user, channel, _yield$call, message, reaction, channelUpdateParam, _t0;
|
|
20513
20161
|
return _regenerator().w(function (_context10) {
|
|
20514
20162
|
while (1) switch (_context10.p = _context10.n) {
|
|
20515
20163
|
case 0:
|
|
@@ -20531,15 +20179,15 @@ function addReaction(action) {
|
|
|
20531
20179
|
return call(channel.addReaction, messageId, key, score, reason, enforceUnique);
|
|
20532
20180
|
case 2:
|
|
20533
20181
|
_yield$call = _context10.v;
|
|
20534
|
-
|
|
20182
|
+
message = _yield$call.message;
|
|
20535
20183
|
reaction = _yield$call.reaction;
|
|
20536
|
-
if (!(user.id ===
|
|
20184
|
+
if (!(user.id === message.user.id)) {
|
|
20537
20185
|
_context10.n = 4;
|
|
20538
20186
|
break;
|
|
20539
20187
|
}
|
|
20540
20188
|
channelUpdateParam = {
|
|
20541
20189
|
userMessageReactions: [reaction],
|
|
20542
|
-
lastReactedMessage:
|
|
20190
|
+
lastReactedMessage: message,
|
|
20543
20191
|
newReactions: [reaction]
|
|
20544
20192
|
};
|
|
20545
20193
|
_context10.n = 3;
|
|
@@ -20554,23 +20202,23 @@ function addReaction(action) {
|
|
|
20554
20202
|
return put(addReactionToListAC(reaction));
|
|
20555
20203
|
case 6:
|
|
20556
20204
|
_context10.n = 7;
|
|
20557
|
-
return put(addReactionToMessageAC(
|
|
20205
|
+
return put(addReactionToMessageAC(message, reaction, true));
|
|
20558
20206
|
case 7:
|
|
20559
|
-
addReactionToMessageOnMap(channelId,
|
|
20560
|
-
addReactionOnAllMessages(
|
|
20207
|
+
addReactionToMessageOnMap(channelId, message, reaction, true);
|
|
20208
|
+
addReactionOnAllMessages(message, reaction, true);
|
|
20561
20209
|
_context10.n = 9;
|
|
20562
20210
|
break;
|
|
20563
20211
|
case 8:
|
|
20564
20212
|
_context10.p = 8;
|
|
20565
|
-
|
|
20566
|
-
log.error('ERROR in add reaction',
|
|
20213
|
+
_t0 = _context10.v;
|
|
20214
|
+
log.error('ERROR in add reaction', _t0.message);
|
|
20567
20215
|
case 9:
|
|
20568
20216
|
return _context10.a(2);
|
|
20569
20217
|
}
|
|
20570
20218
|
}, _marked0$1, null, [[0, 8]]);
|
|
20571
20219
|
}
|
|
20572
20220
|
function deleteReaction(action) {
|
|
20573
|
-
var payload, channelId, messageId, key, isLastReaction, channel, _yield$call2,
|
|
20221
|
+
var payload, channelId, messageId, key, isLastReaction, channel, _yield$call2, message, reaction, channelUpdateParam, _t1;
|
|
20574
20222
|
return _regenerator().w(function (_context11) {
|
|
20575
20223
|
while (1) switch (_context11.p = _context11.n) {
|
|
20576
20224
|
case 0:
|
|
@@ -20591,7 +20239,7 @@ function deleteReaction(action) {
|
|
|
20591
20239
|
return call(channel.deleteReaction, messageId, key);
|
|
20592
20240
|
case 2:
|
|
20593
20241
|
_yield$call2 = _context11.v;
|
|
20594
|
-
|
|
20242
|
+
message = _yield$call2.message;
|
|
20595
20243
|
reaction = _yield$call2.reaction;
|
|
20596
20244
|
if (!isLastReaction) {
|
|
20597
20245
|
_context11.n = 4;
|
|
@@ -20610,23 +20258,23 @@ function deleteReaction(action) {
|
|
|
20610
20258
|
return put(deleteReactionFromListAC(reaction));
|
|
20611
20259
|
case 5:
|
|
20612
20260
|
_context11.n = 6;
|
|
20613
|
-
return put(deleteReactionFromMessageAC(
|
|
20261
|
+
return put(deleteReactionFromMessageAC(message, reaction, true));
|
|
20614
20262
|
case 6:
|
|
20615
|
-
removeReactionToMessageOnMap(channelId,
|
|
20616
|
-
removeReactionOnAllMessages(
|
|
20263
|
+
removeReactionToMessageOnMap(channelId, message, reaction, true);
|
|
20264
|
+
removeReactionOnAllMessages(message, reaction, true);
|
|
20617
20265
|
_context11.n = 8;
|
|
20618
20266
|
break;
|
|
20619
20267
|
case 7:
|
|
20620
20268
|
_context11.p = 7;
|
|
20621
|
-
|
|
20622
|
-
log.error('ERROR in delete reaction',
|
|
20269
|
+
_t1 = _context11.v;
|
|
20270
|
+
log.error('ERROR in delete reaction', _t1.message);
|
|
20623
20271
|
case 8:
|
|
20624
20272
|
return _context11.a(2);
|
|
20625
20273
|
}
|
|
20626
20274
|
}, _marked1$1, null, [[0, 7]]);
|
|
20627
20275
|
}
|
|
20628
20276
|
function getReactions(action) {
|
|
20629
|
-
var payload, messageId, key, limit, SceytChatClient, reactionQueryBuilder, reactionQuery, result,
|
|
20277
|
+
var payload, messageId, key, limit, SceytChatClient, reactionQueryBuilder, reactionQuery, result, _t10;
|
|
20630
20278
|
return _regenerator().w(function (_context12) {
|
|
20631
20279
|
while (1) switch (_context12.p = _context12.n) {
|
|
20632
20280
|
case 0:
|
|
@@ -20661,15 +20309,15 @@ function getReactions(action) {
|
|
|
20661
20309
|
break;
|
|
20662
20310
|
case 6:
|
|
20663
20311
|
_context12.p = 6;
|
|
20664
|
-
|
|
20665
|
-
log.error('ERROR in get reactions',
|
|
20312
|
+
_t10 = _context12.v;
|
|
20313
|
+
log.error('ERROR in get reactions', _t10.message);
|
|
20666
20314
|
case 7:
|
|
20667
20315
|
return _context12.a(2);
|
|
20668
20316
|
}
|
|
20669
20317
|
}, _marked10$1, null, [[0, 6]]);
|
|
20670
20318
|
}
|
|
20671
20319
|
function loadMoreReactions(action) {
|
|
20672
|
-
var payload, limit, ReactionQuery, result,
|
|
20320
|
+
var payload, limit, ReactionQuery, result, _t11;
|
|
20673
20321
|
return _regenerator().w(function (_context13) {
|
|
20674
20322
|
while (1) switch (_context13.p = _context13.n) {
|
|
20675
20323
|
case 0:
|
|
@@ -20697,15 +20345,15 @@ function loadMoreReactions(action) {
|
|
|
20697
20345
|
break;
|
|
20698
20346
|
case 5:
|
|
20699
20347
|
_context13.p = 5;
|
|
20700
|
-
|
|
20701
|
-
log.error('ERROR in load more reactions',
|
|
20348
|
+
_t11 = _context13.v;
|
|
20349
|
+
log.error('ERROR in load more reactions', _t11.message);
|
|
20702
20350
|
case 6:
|
|
20703
20351
|
return _context13.a(2);
|
|
20704
20352
|
}
|
|
20705
20353
|
}, _marked11$1, null, [[0, 5]]);
|
|
20706
20354
|
}
|
|
20707
20355
|
function getMessageAttachments(action) {
|
|
20708
|
-
var _action$payload2, channelId, attachmentType, limit, direction, attachmentId, forPopup, SceytChatClient, typeList, AttachmentByTypeQueryBuilder, AttachmentByTypeQuery, result,
|
|
20356
|
+
var _action$payload2, channelId, attachmentType, limit, direction, attachmentId, forPopup, SceytChatClient, typeList, AttachmentByTypeQueryBuilder, AttachmentByTypeQuery, result, _t12;
|
|
20709
20357
|
return _regenerator().w(function (_context14) {
|
|
20710
20358
|
while (1) switch (_context14.p = _context14.n) {
|
|
20711
20359
|
case 0:
|
|
@@ -20783,15 +20431,15 @@ function getMessageAttachments(action) {
|
|
|
20783
20431
|
break;
|
|
20784
20432
|
case 13:
|
|
20785
20433
|
_context14.p = 13;
|
|
20786
|
-
|
|
20787
|
-
log.error('error in message attachment query',
|
|
20434
|
+
_t12 = _context14.v;
|
|
20435
|
+
log.error('error in message attachment query', _t12);
|
|
20788
20436
|
case 14:
|
|
20789
20437
|
return _context14.a(2);
|
|
20790
20438
|
}
|
|
20791
20439
|
}, _marked12$1, null, [[0, 13]]);
|
|
20792
20440
|
}
|
|
20793
20441
|
function loadMoreMessageAttachments(action) {
|
|
20794
|
-
var _action$payload3, limit, direction, forPopup, AttachmentQuery, _yield$call3, attachments, hasNext,
|
|
20442
|
+
var _action$payload3, limit, direction, forPopup, AttachmentQuery, _yield$call3, attachments, hasNext, _t13;
|
|
20795
20443
|
return _regenerator().w(function (_context15) {
|
|
20796
20444
|
while (1) switch (_context15.p = _context15.n) {
|
|
20797
20445
|
case 0:
|
|
@@ -20835,15 +20483,15 @@ function loadMoreMessageAttachments(action) {
|
|
|
20835
20483
|
break;
|
|
20836
20484
|
case 8:
|
|
20837
20485
|
_context15.p = 8;
|
|
20838
|
-
|
|
20839
|
-
log.error('error in message attachment query',
|
|
20486
|
+
_t13 = _context15.v;
|
|
20487
|
+
log.error('error in message attachment query', _t13);
|
|
20840
20488
|
case 9:
|
|
20841
20489
|
return _context15.a(2);
|
|
20842
20490
|
}
|
|
20843
20491
|
}, _marked13$1, null, [[0, 8]]);
|
|
20844
20492
|
}
|
|
20845
20493
|
function pauseAttachmentUploading(action) {
|
|
20846
|
-
var attachmentId, isPaused,
|
|
20494
|
+
var attachmentId, isPaused, _t14;
|
|
20847
20495
|
return _regenerator().w(function (_context16) {
|
|
20848
20496
|
while (1) switch (_context16.p = _context16.n) {
|
|
20849
20497
|
case 0:
|
|
@@ -20865,15 +20513,15 @@ function pauseAttachmentUploading(action) {
|
|
|
20865
20513
|
break;
|
|
20866
20514
|
case 2:
|
|
20867
20515
|
_context16.p = 2;
|
|
20868
|
-
|
|
20869
|
-
log.error('error in pause attachment uploading',
|
|
20516
|
+
_t14 = _context16.v;
|
|
20517
|
+
log.error('error in pause attachment uploading', _t14);
|
|
20870
20518
|
case 3:
|
|
20871
20519
|
return _context16.a(2);
|
|
20872
20520
|
}
|
|
20873
20521
|
}, _marked14$1, null, [[0, 2]]);
|
|
20874
20522
|
}
|
|
20875
20523
|
function resumeAttachmentUploading(action) {
|
|
20876
|
-
var attachmentId, isResumed,
|
|
20524
|
+
var attachmentId, isResumed, _t15;
|
|
20877
20525
|
return _regenerator().w(function (_context17) {
|
|
20878
20526
|
while (1) switch (_context17.p = _context17.n) {
|
|
20879
20527
|
case 0:
|
|
@@ -20896,15 +20544,15 @@ function resumeAttachmentUploading(action) {
|
|
|
20896
20544
|
break;
|
|
20897
20545
|
case 2:
|
|
20898
20546
|
_context17.p = 2;
|
|
20899
|
-
|
|
20900
|
-
log.error('error in resume attachment uploading',
|
|
20547
|
+
_t15 = _context17.v;
|
|
20548
|
+
log.error('error in resume attachment uploading', _t15);
|
|
20901
20549
|
case 3:
|
|
20902
20550
|
return _context17.a(2);
|
|
20903
20551
|
}
|
|
20904
20552
|
}, _marked15$1, null, [[0, 2]]);
|
|
20905
20553
|
}
|
|
20906
20554
|
function getMessageMarkers(action) {
|
|
20907
|
-
var _action$payload4, messageId, channelId, deliveryStatus, sceytChatClient, messageMarkerListQueryBuilder, messageMarkerListQuery, messageMarkers,
|
|
20555
|
+
var _action$payload4, messageId, channelId, deliveryStatus, sceytChatClient, messageMarkerListQueryBuilder, messageMarkerListQuery, messageMarkers, _t16;
|
|
20908
20556
|
return _regenerator().w(function (_context18) {
|
|
20909
20557
|
while (1) switch (_context18.p = _context18.n) {
|
|
20910
20558
|
case 0:
|
|
@@ -20934,8 +20582,8 @@ function getMessageMarkers(action) {
|
|
|
20934
20582
|
break;
|
|
20935
20583
|
case 5:
|
|
20936
20584
|
_context18.p = 5;
|
|
20937
|
-
|
|
20938
|
-
log.error('error in get message markers',
|
|
20585
|
+
_t16 = _context18.v;
|
|
20586
|
+
log.error('error in get message markers', _t16);
|
|
20939
20587
|
case 6:
|
|
20940
20588
|
_context18.p = 6;
|
|
20941
20589
|
_context18.n = 7;
|
|
@@ -21073,13 +20721,13 @@ function updateMessageOptimisticallyForAddPollVote(channelId, message, vote) {
|
|
|
21073
20721
|
}, _marked18$1);
|
|
21074
20722
|
}
|
|
21075
20723
|
function addPollVote(action) {
|
|
21076
|
-
var payload, channelId, pollId, optionId,
|
|
20724
|
+
var payload, channelId, pollId, optionId, message, isResend, sceytChatClient, _user$presence2, connectionState, user, vote, pendingAction, conflictCheck, channel, _Object$values2, _store$getState$Messa, _currentMessage$pollD, _currentMessage$pollD2, _currentMessage$pollD3, currentMessage, hasNext, obj, _t17;
|
|
21077
20725
|
return _regenerator().w(function (_context21) {
|
|
21078
20726
|
while (1) switch (_context21.p = _context21.n) {
|
|
21079
20727
|
case 0:
|
|
21080
20728
|
_context21.p = 0;
|
|
21081
20729
|
payload = action.payload;
|
|
21082
|
-
channelId = payload.channelId, pollId = payload.pollId, optionId = payload.optionId,
|
|
20730
|
+
channelId = payload.channelId, pollId = payload.pollId, optionId = payload.optionId, message = payload.message, isResend = payload.isResend;
|
|
21083
20731
|
sceytChatClient = getClient();
|
|
21084
20732
|
if (!sceytChatClient) {
|
|
21085
20733
|
_context21.n = 7;
|
|
@@ -21117,7 +20765,7 @@ function addPollVote(action) {
|
|
|
21117
20765
|
channelId: channelId,
|
|
21118
20766
|
pollId: pollId,
|
|
21119
20767
|
optionId: optionId,
|
|
21120
|
-
message:
|
|
20768
|
+
message: message
|
|
21121
20769
|
};
|
|
21122
20770
|
conflictCheck = checkPendingPollActionConflict(pendingAction);
|
|
21123
20771
|
if (!(conflictCheck.hasConflict && !conflictCheck.shouldSkip)) {
|
|
@@ -21133,11 +20781,11 @@ function addPollVote(action) {
|
|
|
21133
20781
|
break;
|
|
21134
20782
|
}
|
|
21135
20783
|
currentMessage = ((_Object$values2 = Object.values(getMessagesFromMap(channelId) || {})) === null || _Object$values2 === void 0 ? void 0 : _Object$values2.find(function (msg) {
|
|
21136
|
-
return msg.id ===
|
|
21137
|
-
})) ||
|
|
20784
|
+
return msg.id === message.id || msg.tid === message.id;
|
|
20785
|
+
})) || message;
|
|
21138
20786
|
hasNext = ((_store$getState$Messa = store.getState().MessageReducer.pollVotesHasMore) === null || _store$getState$Messa === void 0 ? void 0 : _store$getState$Messa[pollId]) || false;
|
|
21139
20787
|
_context21.n = 2;
|
|
21140
|
-
return put(addPollVotesToListAC(pollId, optionId, [(_currentMessage$pollD = currentMessage.pollDetails) === null || _currentMessage$pollD === void 0 ? void 0 : (_currentMessage$pollD2 = _currentMessage$pollD.voteDetails) === null || _currentMessage$pollD2 === void 0 ? void 0 : (_currentMessage$pollD3 = _currentMessage$pollD2.ownVotes) === null || _currentMessage$pollD3 === void 0 ? void 0 : _currentMessage$pollD3[0]], hasNext,
|
|
20788
|
+
return put(addPollVotesToListAC(pollId, optionId, [(_currentMessage$pollD = currentMessage.pollDetails) === null || _currentMessage$pollD === void 0 ? void 0 : (_currentMessage$pollD2 = _currentMessage$pollD.voteDetails) === null || _currentMessage$pollD2 === void 0 ? void 0 : (_currentMessage$pollD3 = _currentMessage$pollD2.ownVotes) === null || _currentMessage$pollD3 === void 0 ? void 0 : _currentMessage$pollD3[0]], hasNext, message.id));
|
|
21141
20789
|
case 2:
|
|
21142
20790
|
obj = {
|
|
21143
20791
|
type: 'addOwn',
|
|
@@ -21145,12 +20793,12 @@ function addPollVote(action) {
|
|
|
21145
20793
|
incrementVotesPerOptionCount: 1
|
|
21146
20794
|
};
|
|
21147
20795
|
updateMessageOnMap(channel.id, {
|
|
21148
|
-
messageId:
|
|
20796
|
+
messageId: message.id,
|
|
21149
20797
|
params: {}
|
|
21150
20798
|
}, obj);
|
|
21151
|
-
updateMessageOnAllMessages(
|
|
20799
|
+
updateMessageOnAllMessages(message.id, {}, obj);
|
|
21152
20800
|
_context21.n = 3;
|
|
21153
|
-
return put(updateMessageAC(
|
|
20801
|
+
return put(updateMessageAC(message.id, {}, undefined, obj));
|
|
21154
20802
|
case 3:
|
|
21155
20803
|
_context21.n = 5;
|
|
21156
20804
|
break;
|
|
@@ -21159,21 +20807,21 @@ function addPollVote(action) {
|
|
|
21159
20807
|
_context21.n = 5;
|
|
21160
20808
|
break;
|
|
21161
20809
|
}
|
|
21162
|
-
return _context21.d(_regeneratorValues(updateMessageOptimisticallyForAddPollVote(channelId,
|
|
20810
|
+
return _context21.d(_regeneratorValues(updateMessageOptimisticallyForAddPollVote(channelId, message, vote)), 5);
|
|
21163
20811
|
case 5:
|
|
21164
20812
|
if (!conflictCheck.shouldSkip) {
|
|
21165
20813
|
setPendingPollAction(pendingAction);
|
|
21166
20814
|
}
|
|
21167
20815
|
return _context21.a(2);
|
|
21168
20816
|
case 6:
|
|
21169
|
-
return _context21.d(_regeneratorValues(executeAddPollVote(channelId, pollId, optionId,
|
|
20817
|
+
return _context21.d(_regeneratorValues(executeAddPollVote(channelId, pollId, optionId, message, isResend)), 7);
|
|
21170
20818
|
case 7:
|
|
21171
20819
|
_context21.n = 9;
|
|
21172
20820
|
break;
|
|
21173
20821
|
case 8:
|
|
21174
20822
|
_context21.p = 8;
|
|
21175
|
-
|
|
21176
|
-
log.error('error in add poll vote',
|
|
20823
|
+
_t17 = _context21.v;
|
|
20824
|
+
log.error('error in add poll vote', _t17);
|
|
21177
20825
|
case 9:
|
|
21178
20826
|
return _context21.a(2);
|
|
21179
20827
|
}
|
|
@@ -21274,20 +20922,20 @@ function updateMessageOptimisticallyForDeletePollVote(channelId, message, vote)
|
|
|
21274
20922
|
}, _marked21$1);
|
|
21275
20923
|
}
|
|
21276
20924
|
function deletePollVote(action) {
|
|
21277
|
-
var payload, channelId, pollId, optionId,
|
|
20925
|
+
var payload, channelId, pollId, optionId, message, isResend, sceytChatClient, _message$pollDetails1, _message$pollDetails10, _message$pollDetails11, connectionState, vote, pendingAction, conflictCheck, channel, _Object$values3, _currentMessage$pollD4, _currentMessage$pollD5, _currentMessage$pollD6, currentMessage, obj, _t18;
|
|
21278
20926
|
return _regenerator().w(function (_context24) {
|
|
21279
20927
|
while (1) switch (_context24.p = _context24.n) {
|
|
21280
20928
|
case 0:
|
|
21281
20929
|
_context24.p = 0;
|
|
21282
20930
|
payload = action.payload;
|
|
21283
|
-
channelId = payload.channelId, pollId = payload.pollId, optionId = payload.optionId,
|
|
20931
|
+
channelId = payload.channelId, pollId = payload.pollId, optionId = payload.optionId, message = payload.message, isResend = payload.isResend;
|
|
21284
20932
|
sceytChatClient = getClient();
|
|
21285
20933
|
if (!sceytChatClient) {
|
|
21286
20934
|
_context24.n = 8;
|
|
21287
20935
|
break;
|
|
21288
20936
|
}
|
|
21289
20937
|
connectionState = sceytChatClient.connectionState;
|
|
21290
|
-
vote = (
|
|
20938
|
+
vote = (_message$pollDetails1 = message.pollDetails) === null || _message$pollDetails1 === void 0 ? void 0 : (_message$pollDetails10 = _message$pollDetails1.voteDetails) === null || _message$pollDetails10 === void 0 ? void 0 : (_message$pollDetails11 = _message$pollDetails10.ownVotes) === null || _message$pollDetails11 === void 0 ? void 0 : _message$pollDetails11.find(function (vote) {
|
|
21291
20939
|
return vote.optionId === optionId;
|
|
21292
20940
|
});
|
|
21293
20941
|
if (vote) {
|
|
@@ -21305,7 +20953,7 @@ function deletePollVote(action) {
|
|
|
21305
20953
|
channelId: channelId,
|
|
21306
20954
|
pollId: pollId,
|
|
21307
20955
|
optionId: optionId,
|
|
21308
|
-
message:
|
|
20956
|
+
message: message
|
|
21309
20957
|
};
|
|
21310
20958
|
conflictCheck = checkPendingPollActionConflict(pendingAction);
|
|
21311
20959
|
if (!(conflictCheck.hasConflict && conflictCheck.shouldSkip)) {
|
|
@@ -21321,10 +20969,10 @@ function deletePollVote(action) {
|
|
|
21321
20969
|
break;
|
|
21322
20970
|
}
|
|
21323
20971
|
currentMessage = ((_Object$values3 = Object.values(getMessagesFromMap(channelId) || {})) === null || _Object$values3 === void 0 ? void 0 : _Object$values3.find(function (msg) {
|
|
21324
|
-
return msg.id ===
|
|
21325
|
-
})) ||
|
|
20972
|
+
return msg.id === message.id || msg.tid === message.id;
|
|
20973
|
+
})) || message;
|
|
21326
20974
|
_context24.n = 3;
|
|
21327
|
-
return put(deletePollVotesFromListAC(pollId, optionId, [(_currentMessage$pollD4 = currentMessage.pollDetails) === null || _currentMessage$pollD4 === void 0 ? void 0 : (_currentMessage$pollD5 = _currentMessage$pollD4.voteDetails) === null || _currentMessage$pollD5 === void 0 ? void 0 : (_currentMessage$pollD6 = _currentMessage$pollD5.ownVotes) === null || _currentMessage$pollD6 === void 0 ? void 0 : _currentMessage$pollD6[0]],
|
|
20975
|
+
return put(deletePollVotesFromListAC(pollId, optionId, [(_currentMessage$pollD4 = currentMessage.pollDetails) === null || _currentMessage$pollD4 === void 0 ? void 0 : (_currentMessage$pollD5 = _currentMessage$pollD4.voteDetails) === null || _currentMessage$pollD5 === void 0 ? void 0 : (_currentMessage$pollD6 = _currentMessage$pollD5.ownVotes) === null || _currentMessage$pollD6 === void 0 ? void 0 : _currentMessage$pollD6[0]], message.id));
|
|
21328
20976
|
case 3:
|
|
21329
20977
|
obj = {
|
|
21330
20978
|
type: 'deleteOwn',
|
|
@@ -21332,12 +20980,12 @@ function deletePollVote(action) {
|
|
|
21332
20980
|
incrementVotesPerOptionCount: -1
|
|
21333
20981
|
};
|
|
21334
20982
|
updateMessageOnMap(channel.id, {
|
|
21335
|
-
messageId:
|
|
20983
|
+
messageId: message.id,
|
|
21336
20984
|
params: {}
|
|
21337
20985
|
}, obj);
|
|
21338
|
-
updateMessageOnAllMessages(
|
|
20986
|
+
updateMessageOnAllMessages(message.id, {}, obj);
|
|
21339
20987
|
_context24.n = 4;
|
|
21340
|
-
return put(updateMessageAC(
|
|
20988
|
+
return put(updateMessageAC(message.id, {}, undefined, obj));
|
|
21341
20989
|
case 4:
|
|
21342
20990
|
_context24.n = 6;
|
|
21343
20991
|
break;
|
|
@@ -21346,21 +20994,21 @@ function deletePollVote(action) {
|
|
|
21346
20994
|
_context24.n = 6;
|
|
21347
20995
|
break;
|
|
21348
20996
|
}
|
|
21349
|
-
return _context24.d(_regeneratorValues(updateMessageOptimisticallyForDeletePollVote(channelId,
|
|
20997
|
+
return _context24.d(_regeneratorValues(updateMessageOptimisticallyForDeletePollVote(channelId, message, vote)), 6);
|
|
21350
20998
|
case 6:
|
|
21351
20999
|
if (!conflictCheck.shouldSkip) {
|
|
21352
21000
|
setPendingPollAction(pendingAction);
|
|
21353
21001
|
}
|
|
21354
21002
|
return _context24.a(2);
|
|
21355
21003
|
case 7:
|
|
21356
|
-
return _context24.d(_regeneratorValues(executeDeletePollVote(channelId, pollId, optionId,
|
|
21004
|
+
return _context24.d(_regeneratorValues(executeDeletePollVote(channelId, pollId, optionId, message, isResend)), 8);
|
|
21357
21005
|
case 8:
|
|
21358
21006
|
_context24.n = 10;
|
|
21359
21007
|
break;
|
|
21360
21008
|
case 9:
|
|
21361
21009
|
_context24.p = 9;
|
|
21362
|
-
|
|
21363
|
-
log.error('error in delete poll vote',
|
|
21010
|
+
_t18 = _context24.v;
|
|
21011
|
+
log.error('error in delete poll vote', _t18);
|
|
21364
21012
|
case 10:
|
|
21365
21013
|
return _context24.a(2);
|
|
21366
21014
|
}
|
|
@@ -21438,13 +21086,13 @@ function updateMessageOptimisticallyForClosePoll(channelId, message) {
|
|
|
21438
21086
|
}, _marked24$1);
|
|
21439
21087
|
}
|
|
21440
21088
|
function closePoll(action) {
|
|
21441
|
-
var payload, channelId, pollId,
|
|
21089
|
+
var payload, channelId, pollId, message, sceytChatClient, connectionState, _t19;
|
|
21442
21090
|
return _regenerator().w(function (_context27) {
|
|
21443
21091
|
while (1) switch (_context27.p = _context27.n) {
|
|
21444
21092
|
case 0:
|
|
21445
21093
|
_context27.p = 0;
|
|
21446
21094
|
payload = action.payload;
|
|
21447
|
-
channelId = payload.channelId, pollId = payload.pollId,
|
|
21095
|
+
channelId = payload.channelId, pollId = payload.pollId, message = payload.message;
|
|
21448
21096
|
sceytChatClient = getClient();
|
|
21449
21097
|
if (!sceytChatClient) {
|
|
21450
21098
|
_context27.n = 3;
|
|
@@ -21455,24 +21103,24 @@ function closePoll(action) {
|
|
|
21455
21103
|
_context27.n = 2;
|
|
21456
21104
|
break;
|
|
21457
21105
|
}
|
|
21458
|
-
return _context27.d(_regeneratorValues(updateMessageOptimisticallyForClosePoll(channelId,
|
|
21106
|
+
return _context27.d(_regeneratorValues(updateMessageOptimisticallyForClosePoll(channelId, message)), 1);
|
|
21459
21107
|
case 1:
|
|
21460
21108
|
setPendingPollAction({
|
|
21461
21109
|
type: 'CLOSE_POLL',
|
|
21462
21110
|
channelId: channelId,
|
|
21463
21111
|
pollId: pollId,
|
|
21464
|
-
message:
|
|
21112
|
+
message: message
|
|
21465
21113
|
});
|
|
21466
21114
|
return _context27.a(2);
|
|
21467
21115
|
case 2:
|
|
21468
|
-
return _context27.d(_regeneratorValues(executeClosePoll(channelId, pollId,
|
|
21116
|
+
return _context27.d(_regeneratorValues(executeClosePoll(channelId, pollId, message)), 3);
|
|
21469
21117
|
case 3:
|
|
21470
21118
|
_context27.n = 5;
|
|
21471
21119
|
break;
|
|
21472
21120
|
case 4:
|
|
21473
21121
|
_context27.p = 4;
|
|
21474
|
-
|
|
21475
|
-
log.error('error in close poll',
|
|
21122
|
+
_t19 = _context27.v;
|
|
21123
|
+
log.error('error in close poll', _t19);
|
|
21476
21124
|
case 5:
|
|
21477
21125
|
return _context27.a(2);
|
|
21478
21126
|
}
|
|
@@ -21561,13 +21209,13 @@ function updateMessageOptimisticallyForRetractPollVote(channelId, message, objs)
|
|
|
21561
21209
|
}, _marked27$1);
|
|
21562
21210
|
}
|
|
21563
21211
|
function retractPollVote(action) {
|
|
21564
|
-
var payload, channelId, pollId,
|
|
21212
|
+
var payload, channelId, pollId, message, isResend, sceytChatClient, connectionState, objs, _iterator4, _step4, _message$pollDetails12, _message$pollDetails13, vote, _t20;
|
|
21565
21213
|
return _regenerator().w(function (_context30) {
|
|
21566
21214
|
while (1) switch (_context30.p = _context30.n) {
|
|
21567
21215
|
case 0:
|
|
21568
21216
|
_context30.p = 0;
|
|
21569
21217
|
payload = action.payload;
|
|
21570
|
-
channelId = payload.channelId, pollId = payload.pollId,
|
|
21218
|
+
channelId = payload.channelId, pollId = payload.pollId, message = payload.message, isResend = payload.isResend;
|
|
21571
21219
|
sceytChatClient = getClient();
|
|
21572
21220
|
if (!sceytChatClient) {
|
|
21573
21221
|
_context30.n = 3;
|
|
@@ -21575,7 +21223,7 @@ function retractPollVote(action) {
|
|
|
21575
21223
|
}
|
|
21576
21224
|
connectionState = sceytChatClient.connectionState;
|
|
21577
21225
|
objs = [];
|
|
21578
|
-
for (_iterator4 = _createForOfIteratorHelperLoose(((
|
|
21226
|
+
for (_iterator4 = _createForOfIteratorHelperLoose(((_message$pollDetails12 = message.pollDetails) === null || _message$pollDetails12 === void 0 ? void 0 : (_message$pollDetails13 = _message$pollDetails12.voteDetails) === null || _message$pollDetails13 === void 0 ? void 0 : _message$pollDetails13.ownVotes) || []); !(_step4 = _iterator4()).done;) {
|
|
21579
21227
|
vote = _step4.value;
|
|
21580
21228
|
objs.push({
|
|
21581
21229
|
type: 'deleteOwn',
|
|
@@ -21587,31 +21235,31 @@ function retractPollVote(action) {
|
|
|
21587
21235
|
_context30.n = 2;
|
|
21588
21236
|
break;
|
|
21589
21237
|
}
|
|
21590
|
-
return _context30.d(_regeneratorValues(updateMessageOptimisticallyForRetractPollVote(channelId,
|
|
21238
|
+
return _context30.d(_regeneratorValues(updateMessageOptimisticallyForRetractPollVote(channelId, message, objs)), 1);
|
|
21591
21239
|
case 1:
|
|
21592
21240
|
setPendingPollAction({
|
|
21593
21241
|
type: 'RETRACT_POLL_VOTE',
|
|
21594
21242
|
channelId: channelId,
|
|
21595
21243
|
pollId: pollId,
|
|
21596
|
-
message:
|
|
21244
|
+
message: message
|
|
21597
21245
|
});
|
|
21598
21246
|
return _context30.a(2);
|
|
21599
21247
|
case 2:
|
|
21600
|
-
return _context30.d(_regeneratorValues(executeRetractPollVote(channelId, pollId,
|
|
21248
|
+
return _context30.d(_regeneratorValues(executeRetractPollVote(channelId, pollId, message, objs, isResend)), 3);
|
|
21601
21249
|
case 3:
|
|
21602
21250
|
_context30.n = 5;
|
|
21603
21251
|
break;
|
|
21604
21252
|
case 4:
|
|
21605
21253
|
_context30.p = 4;
|
|
21606
|
-
|
|
21607
|
-
log.error('error in retract poll vote',
|
|
21254
|
+
_t20 = _context30.v;
|
|
21255
|
+
log.error('error in retract poll vote', _t20);
|
|
21608
21256
|
case 5:
|
|
21609
21257
|
return _context30.a(2);
|
|
21610
21258
|
}
|
|
21611
21259
|
}, _marked28$1, null, [[0, 4]]);
|
|
21612
21260
|
}
|
|
21613
21261
|
function resendPendingPollActions(action) {
|
|
21614
|
-
var payload, connectionState, sceytChatClient, pendingPollActionsMap, pendingPollActionsMapCopy,
|
|
21262
|
+
var payload, connectionState, sceytChatClient, pendingPollActionsMap, pendingPollActionsMapCopy, _t21;
|
|
21615
21263
|
return _regenerator().w(function (_context31) {
|
|
21616
21264
|
while (1) switch (_context31.p = _context31.n) {
|
|
21617
21265
|
case 0:
|
|
@@ -21667,15 +21315,15 @@ function resendPendingPollActions(action) {
|
|
|
21667
21315
|
break;
|
|
21668
21316
|
case 3:
|
|
21669
21317
|
_context31.p = 3;
|
|
21670
|
-
|
|
21671
|
-
log.error('error in resend pending poll actions',
|
|
21318
|
+
_t21 = _context31.v;
|
|
21319
|
+
log.error('error in resend pending poll actions', _t21);
|
|
21672
21320
|
case 4:
|
|
21673
21321
|
return _context31.a(2);
|
|
21674
21322
|
}
|
|
21675
21323
|
}, _marked29$1, null, [[0, 3]]);
|
|
21676
21324
|
}
|
|
21677
21325
|
function getPollVotes(action) {
|
|
21678
|
-
var payload, messageId, pollId, optionId, limit, key, SceytChatClient, queryBuilder, pollVotesQuery, result, formattedVotes,
|
|
21326
|
+
var payload, messageId, pollId, optionId, limit, key, SceytChatClient, queryBuilder, pollVotesQuery, result, formattedVotes, _t22;
|
|
21679
21327
|
return _regenerator().w(function (_context32) {
|
|
21680
21328
|
while (1) switch (_context32.p = _context32.n) {
|
|
21681
21329
|
case 0:
|
|
@@ -21741,8 +21389,8 @@ function getPollVotes(action) {
|
|
|
21741
21389
|
break;
|
|
21742
21390
|
case 7:
|
|
21743
21391
|
_context32.p = 7;
|
|
21744
|
-
|
|
21745
|
-
log.error('ERROR in get poll votes',
|
|
21392
|
+
_t22 = _context32.v;
|
|
21393
|
+
log.error('ERROR in get poll votes', _t22);
|
|
21746
21394
|
_context32.n = 8;
|
|
21747
21395
|
return put(setPollVotesLoadingStateAC(action.payload.pollId, action.payload.optionId, LOADING_STATE.LOADED));
|
|
21748
21396
|
case 8:
|
|
@@ -21751,7 +21399,7 @@ function getPollVotes(action) {
|
|
|
21751
21399
|
}, _marked30$1, null, [[0, 7]]);
|
|
21752
21400
|
}
|
|
21753
21401
|
function loadMorePollVotes(action) {
|
|
21754
|
-
var payload, pollId, optionId, limit, key, pollVotesQuery, result, formattedVotes,
|
|
21402
|
+
var payload, pollId, optionId, limit, key, pollVotesQuery, result, formattedVotes, _t23;
|
|
21755
21403
|
return _regenerator().w(function (_context33) {
|
|
21756
21404
|
while (1) switch (_context33.p = _context33.n) {
|
|
21757
21405
|
case 0:
|
|
@@ -21809,8 +21457,8 @@ function loadMorePollVotes(action) {
|
|
|
21809
21457
|
break;
|
|
21810
21458
|
case 6:
|
|
21811
21459
|
_context33.p = 6;
|
|
21812
|
-
|
|
21813
|
-
log.error('ERROR in load more poll votes',
|
|
21460
|
+
_t23 = _context33.v;
|
|
21461
|
+
log.error('ERROR in load more poll votes', _t23);
|
|
21814
21462
|
_context33.n = 7;
|
|
21815
21463
|
return put(setPollVotesLoadingStateAC(action.payload.pollId, action.payload.optionId, LOADING_STATE.LOADED));
|
|
21816
21464
|
case 7:
|
|
@@ -27245,6 +26893,106 @@ var MobileBackButtonWrapper = styled.span(_templateObject8$6 || (_templateObject
|
|
|
27245
26893
|
var DefaultInfoIcon = styled(SvgInfo)(_templateObject9$5 || (_templateObject9$5 = _taggedTemplateLiteralLoose([""])));
|
|
27246
26894
|
var WrapArrowLeftIcon = styled(SvgArrowLeft)(_templateObject0$4 || (_templateObject0$4 = _taggedTemplateLiteralLoose([""])));
|
|
27247
26895
|
|
|
26896
|
+
var activeChannelMessagesSelector = function activeChannelMessagesSelector(store) {
|
|
26897
|
+
return store.MessageReducer.activeChannelMessages;
|
|
26898
|
+
};
|
|
26899
|
+
var messagesLoadingState = function messagesLoadingState(store) {
|
|
26900
|
+
return store.MessageReducer.messagesLoadingState;
|
|
26901
|
+
};
|
|
26902
|
+
var messagesHasNextSelector = function messagesHasNextSelector(store) {
|
|
26903
|
+
return store.MessageReducer.messagesHasNext;
|
|
26904
|
+
};
|
|
26905
|
+
var messagesHasPrevSelector = function messagesHasPrevSelector(store) {
|
|
26906
|
+
return store.MessageReducer.messagesHasPrev;
|
|
26907
|
+
};
|
|
26908
|
+
var attachmentCompilationStateSelector = function attachmentCompilationStateSelector(store) {
|
|
26909
|
+
return store.MessageReducer.attachmentsUploadingState;
|
|
26910
|
+
};
|
|
26911
|
+
var attachmentsUploadProgressSelector = function attachmentsUploadProgressSelector(store) {
|
|
26912
|
+
return store.MessageReducer.attachmentsUploadingProgress;
|
|
26913
|
+
};
|
|
26914
|
+
var activeTabAttachmentsSelector = function activeTabAttachmentsSelector(store) {
|
|
26915
|
+
return store.MessageReducer.activeTabAttachments;
|
|
26916
|
+
};
|
|
26917
|
+
var activeTabAttachmentsHasNextSelector = function activeTabAttachmentsHasNextSelector(store) {
|
|
26918
|
+
return store.MessageReducer.attachmentHasNext;
|
|
26919
|
+
};
|
|
26920
|
+
var attachmentsForPopupSelector = function attachmentsForPopupSelector(store) {
|
|
26921
|
+
return store.MessageReducer.attachmentsForPopup;
|
|
26922
|
+
};
|
|
26923
|
+
var messageForReplySelector = function messageForReplySelector(store) {
|
|
26924
|
+
return store.MessageReducer.messageForReply;
|
|
26925
|
+
};
|
|
26926
|
+
var messageToEditSelector = function messageToEditSelector(store) {
|
|
26927
|
+
return store.MessageReducer.messageToEdit;
|
|
26928
|
+
};
|
|
26929
|
+
var scrollToNewMessageSelector = function scrollToNewMessageSelector(store) {
|
|
26930
|
+
return store.MessageReducer.scrollToNewMessage;
|
|
26931
|
+
};
|
|
26932
|
+
var scrollToMentionedMessageSelector = function scrollToMentionedMessageSelector(store) {
|
|
26933
|
+
return store.MessageReducer.scrollToMentionedMessage;
|
|
26934
|
+
};
|
|
26935
|
+
var showScrollToNewMessageButtonSelector = function showScrollToNewMessageButtonSelector(store) {
|
|
26936
|
+
return store.MessageReducer.showScrollToNewMessageButton;
|
|
26937
|
+
};
|
|
26938
|
+
var sendMessageInputHeightSelector = function sendMessageInputHeightSelector(store) {
|
|
26939
|
+
return store.MessageReducer.sendMessageInputHeight;
|
|
26940
|
+
};
|
|
26941
|
+
var scrollToMessageSelector = function scrollToMessageSelector(store) {
|
|
26942
|
+
return store.MessageReducer.scrollToMessage;
|
|
26943
|
+
};
|
|
26944
|
+
var scrollToMessageHighlightSelector = function scrollToMessageHighlightSelector(store) {
|
|
26945
|
+
return store.MessageReducer.scrollToMessageHighlight;
|
|
26946
|
+
};
|
|
26947
|
+
var scrollToMessageBehaviorSelector = function scrollToMessageBehaviorSelector(store) {
|
|
26948
|
+
return store.MessageReducer.scrollToMessageBehavior;
|
|
26949
|
+
};
|
|
26950
|
+
var reactionsListSelector = function reactionsListSelector(store) {
|
|
26951
|
+
return store.MessageReducer.reactionsList;
|
|
26952
|
+
};
|
|
26953
|
+
var reactionsHasNextSelector = function reactionsHasNextSelector(store) {
|
|
26954
|
+
return store.MessageReducer.reactionsHasNext;
|
|
26955
|
+
};
|
|
26956
|
+
var reactionsLoadingStateSelector = function reactionsLoadingStateSelector(store) {
|
|
26957
|
+
return store.MessageReducer.reactionsLoadingState;
|
|
26958
|
+
};
|
|
26959
|
+
var openedMessageMenuSelector = function openedMessageMenuSelector(store) {
|
|
26960
|
+
return store.MessageReducer.openedMessageMenu;
|
|
26961
|
+
};
|
|
26962
|
+
var playingAudioIdSelector = function playingAudioIdSelector(store) {
|
|
26963
|
+
return store.MessageReducer.playingAudioId;
|
|
26964
|
+
};
|
|
26965
|
+
var selectedMessagesMapSelector = function selectedMessagesMapSelector(store) {
|
|
26966
|
+
return store.MessageReducer.selectedMessagesMap;
|
|
26967
|
+
};
|
|
26968
|
+
var attachmentUpdatedMapSelector = function attachmentUpdatedMapSelector(store) {
|
|
26969
|
+
return store.MessageReducer.attachmentUpdatedMap;
|
|
26970
|
+
};
|
|
26971
|
+
var messageMarkersSelector = function messageMarkersSelector(store) {
|
|
26972
|
+
return store.MessageReducer.messageMarkers;
|
|
26973
|
+
};
|
|
26974
|
+
var messagesMarkersLoadingStateSelector = function messagesMarkersLoadingStateSelector(store) {
|
|
26975
|
+
return store.MessageReducer.messagesMarkersLoadingState;
|
|
26976
|
+
};
|
|
26977
|
+
var pollVotesListSelector = function pollVotesListSelector(store) {
|
|
26978
|
+
return store.MessageReducer.pollVotesList;
|
|
26979
|
+
};
|
|
26980
|
+
var pollVotesHasMoreSelector = function pollVotesHasMoreSelector(store) {
|
|
26981
|
+
return store.MessageReducer.pollVotesHasMore;
|
|
26982
|
+
};
|
|
26983
|
+
var pollVotesLoadingStateSelector = function pollVotesLoadingStateSelector(store) {
|
|
26984
|
+
return store.MessageReducer.pollVotesLoadingState;
|
|
26985
|
+
};
|
|
26986
|
+
var pendingPollActionsSelector = function pendingPollActionsSelector(store) {
|
|
26987
|
+
return store.MessageReducer.pendingPollActions;
|
|
26988
|
+
};
|
|
26989
|
+
var pendingMessagesMapSelector = function pendingMessagesMapSelector(store) {
|
|
26990
|
+
return store.MessageReducer.pendingMessagesMap;
|
|
26991
|
+
};
|
|
26992
|
+
var unreadScrollToSelector = function unreadScrollToSelector(store) {
|
|
26993
|
+
return store.MessageReducer.unreadScrollTo;
|
|
26994
|
+
};
|
|
26995
|
+
|
|
27248
26996
|
var _path$u;
|
|
27249
26997
|
function _extends$v() {
|
|
27250
26998
|
return _extends$v = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -30171,7 +29919,7 @@ var VideoPreview = /*#__PURE__*/memo(function VideoPreview(_ref) {
|
|
|
30171
29919
|
var withPrefix = true;
|
|
30172
29920
|
if (file.metadata && file.metadata.tmb) {
|
|
30173
29921
|
if (file.metadata.tmb.length < 70) {
|
|
30174
|
-
attachmentThumb =
|
|
29922
|
+
attachmentThumb = base64ToDataURL(file.metadata.tmb);
|
|
30175
29923
|
withPrefix = false;
|
|
30176
29924
|
} else {
|
|
30177
29925
|
attachmentThumb = file.metadata && file.metadata.tmb;
|
|
@@ -32241,8 +31989,74 @@ class WaveSurfer extends Player {
|
|
|
32241
31989
|
WaveSurfer.BasePlugin = BasePlugin;
|
|
32242
31990
|
WaveSurfer.dom = dom;
|
|
32243
31991
|
|
|
32244
|
-
var _templateObject$v, _templateObject2$r
|
|
31992
|
+
var _templateObject$v, _templateObject2$r;
|
|
31993
|
+
var AudioVisualization = function AudioVisualization(_ref) {
|
|
31994
|
+
var tmb = _ref.tmb,
|
|
31995
|
+
duration = _ref.duration,
|
|
31996
|
+
currentTime = _ref.currentTime,
|
|
31997
|
+
waveColor = _ref.waveColor,
|
|
31998
|
+
progressColor = _ref.progressColor,
|
|
31999
|
+
_ref$height = _ref.height,
|
|
32000
|
+
height = _ref$height === void 0 ? 20 : _ref$height,
|
|
32001
|
+
_ref$barWidth = _ref.barWidth,
|
|
32002
|
+
barWidth = _ref$barWidth === void 0 ? 1 : _ref$barWidth,
|
|
32003
|
+
_ref$barGap = _ref.barGap,
|
|
32004
|
+
barGap = _ref$barGap === void 0 ? 2 : _ref$barGap,
|
|
32005
|
+
_ref$barRadius = _ref.barRadius,
|
|
32006
|
+
barRadius = _ref$barRadius === void 0 ? 1.5 : _ref$barRadius;
|
|
32007
|
+
var normalizedBars = useMemo(function () {
|
|
32008
|
+
if (!tmb || tmb.length === 0) return [];
|
|
32009
|
+
var maxVal = Math.max.apply(Math, tmb);
|
|
32010
|
+
if (maxVal === 0) return [];
|
|
32011
|
+
return tmb.map(function (value) {
|
|
32012
|
+
var normalized = value / maxVal * height;
|
|
32013
|
+
return Math.max(2, normalized);
|
|
32014
|
+
});
|
|
32015
|
+
}, [tmb, height]);
|
|
32016
|
+
var progressPercentage = duration > 0 ? currentTime / duration * 100 : 0;
|
|
32017
|
+
var lastPlayedBarIndex = useMemo(function () {
|
|
32018
|
+
if (progressPercentage === 0) return -1;
|
|
32019
|
+
var barIndex = Math.floor(progressPercentage / 100 * normalizedBars.length);
|
|
32020
|
+
return Math.min(barIndex, normalizedBars.length - 1);
|
|
32021
|
+
}, [progressPercentage, normalizedBars.length]);
|
|
32022
|
+
return /*#__PURE__*/React__default.createElement(Container$e, {
|
|
32023
|
+
height: height
|
|
32024
|
+
}, normalizedBars.map(function (barHeight, index) {
|
|
32025
|
+
var barPosition = index / normalizedBars.length * 100;
|
|
32026
|
+
var isPlayed = barPosition < progressPercentage;
|
|
32027
|
+
var isLastPlayed = index === lastPlayedBarIndex;
|
|
32028
|
+
var finalHeight = isLastPlayed ? Math.min(barHeight * 1.3, height) : barHeight;
|
|
32029
|
+
return /*#__PURE__*/React__default.createElement(Bar, {
|
|
32030
|
+
key: index,
|
|
32031
|
+
height: finalHeight,
|
|
32032
|
+
width: barWidth,
|
|
32033
|
+
gap: barGap,
|
|
32034
|
+
radius: barRadius,
|
|
32035
|
+
color: isPlayed ? progressColor : waveColor,
|
|
32036
|
+
isBold: isLastPlayed
|
|
32037
|
+
});
|
|
32038
|
+
}));
|
|
32039
|
+
};
|
|
32040
|
+
var Container$e = styled.div(_templateObject$v || (_templateObject$v = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n height: ", "px;\n width: 100%;\n gap: 2px;\n"])), function (props) {
|
|
32041
|
+
return props.height;
|
|
32042
|
+
});
|
|
32043
|
+
var Bar = styled.div(_templateObject2$r || (_templateObject2$r = _taggedTemplateLiteralLoose(["\n width: ", "px;\n height: ", "px;\n background-color: ", ";\n border-radius: ", "px;\n min-height: 2px;\n transition:\n background-color 0.1s ease,\n height 0.1s ease,\n opacity 0.1s ease;\n opacity: ", ";\n ", "\n"])), function (props) {
|
|
32044
|
+
return props.width;
|
|
32045
|
+
}, function (props) {
|
|
32046
|
+
return props.height;
|
|
32047
|
+
}, function (props) {
|
|
32048
|
+
return props.color;
|
|
32049
|
+
}, function (props) {
|
|
32050
|
+
return props.radius;
|
|
32051
|
+
}, function (props) {
|
|
32052
|
+
return props.isBold ? 1 : 0.8;
|
|
32053
|
+
}, function (props) {
|
|
32054
|
+
return props.isBold ? "\n box-shadow: 0 0 4px " + props.color + ";\n filter: brightness(1.2);\n " : '';
|
|
32055
|
+
});
|
|
32056
|
+
|
|
32057
|
+
var _templateObject$w, _templateObject2$s, _templateObject3$m, _templateObject4$i, _templateObject5$f, _templateObject6$d, _templateObject7$c;
|
|
32245
32058
|
var AudioPlayer = function AudioPlayer(_ref) {
|
|
32059
|
+
var _file$metadata, _file$metadata2, _file$metadata3;
|
|
32246
32060
|
var url = _ref.url,
|
|
32247
32061
|
file = _ref.file,
|
|
32248
32062
|
messagePlayed = _ref.messagePlayed,
|
|
@@ -32274,9 +32088,15 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
32274
32088
|
var _useState4 = useState(''),
|
|
32275
32089
|
currentTime = _useState4[0],
|
|
32276
32090
|
setCurrentTime = _useState4[1];
|
|
32277
|
-
var _useState5 = useState(
|
|
32278
|
-
|
|
32279
|
-
|
|
32091
|
+
var _useState5 = useState(0),
|
|
32092
|
+
currentTimeSeconds = _useState5[0],
|
|
32093
|
+
setCurrentTimeSeconds = _useState5[1];
|
|
32094
|
+
var _useState6 = useState(0),
|
|
32095
|
+
duration = _useState6[0],
|
|
32096
|
+
setDuration = _useState6[1];
|
|
32097
|
+
var _useState7 = useState(1),
|
|
32098
|
+
audioRate = _useState7[0],
|
|
32099
|
+
setAudioRate = _useState7[1];
|
|
32280
32100
|
var wavesurfer = useRef(null);
|
|
32281
32101
|
var wavesurferContainer = useRef(null);
|
|
32282
32102
|
var intervalRef = useRef(null);
|
|
@@ -32305,6 +32125,7 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
32305
32125
|
var currentTime = wavesurfer.current.getCurrentTime();
|
|
32306
32126
|
if (currentTime >= 0) {
|
|
32307
32127
|
setCurrentTime(formatAudioVideoTime(currentTime));
|
|
32128
|
+
setCurrentTimeSeconds(currentTime);
|
|
32308
32129
|
}
|
|
32309
32130
|
}, 10);
|
|
32310
32131
|
} else {
|
|
@@ -32366,8 +32187,8 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
32366
32187
|
try {
|
|
32367
32188
|
wavesurfer.current = WaveSurfer.create({
|
|
32368
32189
|
container: wavesurferContainer.current,
|
|
32369
|
-
waveColor:
|
|
32370
|
-
progressColor:
|
|
32190
|
+
waveColor: 'transparent',
|
|
32191
|
+
progressColor: 'transparent',
|
|
32371
32192
|
audioRate: audioRate,
|
|
32372
32193
|
barWidth: 1,
|
|
32373
32194
|
barHeight: 1,
|
|
@@ -32380,6 +32201,7 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
32380
32201
|
var peaks;
|
|
32381
32202
|
if (file.metadata) {
|
|
32382
32203
|
if (file.metadata.dur) {
|
|
32204
|
+
setDuration(file.metadata.dur);
|
|
32383
32205
|
setCurrentTime(formatAudioVideoTime(file.metadata.dur));
|
|
32384
32206
|
}
|
|
32385
32207
|
if (file.metadata.tmb) {
|
|
@@ -32395,6 +32217,7 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
32395
32217
|
wavesurfer.current.load(url, peaks);
|
|
32396
32218
|
wavesurfer.current.on('ready', function () {
|
|
32397
32219
|
var audioDuration = wavesurfer.current.getDuration();
|
|
32220
|
+
setDuration(audioDuration);
|
|
32398
32221
|
setCurrentTime(formatAudioVideoTime(audioDuration));
|
|
32399
32222
|
wavesurfer.current.drawBuffer = function (d) {
|
|
32400
32223
|
log.info('filters --- ', d);
|
|
@@ -32404,7 +32227,9 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
32404
32227
|
setPlayAudio(false);
|
|
32405
32228
|
wavesurfer.current.seekTo(0);
|
|
32406
32229
|
var audioDuration = wavesurfer.current.getDuration();
|
|
32407
|
-
|
|
32230
|
+
setDuration(audioDuration);
|
|
32231
|
+
setCurrentTime(formatAudioVideoTime(0));
|
|
32232
|
+
setCurrentTimeSeconds(0);
|
|
32408
32233
|
if (playingAudioId === file.id) {
|
|
32409
32234
|
dispatch(setPlayingAudioIdAC(null));
|
|
32410
32235
|
}
|
|
@@ -32420,6 +32245,7 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
32420
32245
|
wavesurfer.current.on('interaction', function () {
|
|
32421
32246
|
var currentTime = wavesurfer.current.getCurrentTime();
|
|
32422
32247
|
setCurrentTime(formatAudioVideoTime(currentTime));
|
|
32248
|
+
setCurrentTimeSeconds(currentTime);
|
|
32423
32249
|
});
|
|
32424
32250
|
if (url !== '_') {
|
|
32425
32251
|
setIsRendered(true);
|
|
@@ -32444,35 +32270,53 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
32444
32270
|
wavesurfer.current.pause();
|
|
32445
32271
|
}
|
|
32446
32272
|
}, [playingAudioId]);
|
|
32447
|
-
return /*#__PURE__*/React__default.createElement(Container$
|
|
32273
|
+
return /*#__PURE__*/React__default.createElement(Container$f, null, /*#__PURE__*/React__default.createElement(PlayPause, {
|
|
32448
32274
|
onClick: handlePlayPause,
|
|
32449
32275
|
iconColor: accentColor
|
|
32450
|
-
}, playAudio ? /*#__PURE__*/React__default.createElement(SvgPause, null) : /*#__PURE__*/React__default.createElement(SvgPlay, null)), /*#__PURE__*/React__default.createElement(WaveContainer, null, /*#__PURE__*/React__default.createElement(
|
|
32451
|
-
ref: wavesurferContainer
|
|
32452
|
-
|
|
32276
|
+
}, playAudio ? /*#__PURE__*/React__default.createElement(SvgPause, null) : /*#__PURE__*/React__default.createElement(SvgPlay, null)), /*#__PURE__*/React__default.createElement(WaveContainer, null, /*#__PURE__*/React__default.createElement(VisualizationWrapper, null, /*#__PURE__*/React__default.createElement(AudioVisualizationPlaceholder, {
|
|
32277
|
+
ref: wavesurferContainer,
|
|
32278
|
+
hidden: !!((_file$metadata = file.metadata) !== null && _file$metadata !== void 0 && _file$metadata.tmb && Array.isArray(file.metadata.tmb))
|
|
32279
|
+
}), ((_file$metadata2 = file.metadata) === null || _file$metadata2 === void 0 ? void 0 : _file$metadata2.tmb) && Array.isArray(file.metadata.tmb) && (/*#__PURE__*/React__default.createElement(AudioVisualization, {
|
|
32280
|
+
tmb: file.metadata.tmb,
|
|
32281
|
+
duration: duration || file.metadata.dur || 0,
|
|
32282
|
+
currentTime: currentTimeSeconds,
|
|
32283
|
+
waveColor: textSecondary,
|
|
32284
|
+
progressColor: accentColor,
|
|
32285
|
+
height: 20,
|
|
32286
|
+
barWidth: 1,
|
|
32287
|
+
barGap: 2,
|
|
32288
|
+
barRadius: 1.5
|
|
32289
|
+
}))), /*#__PURE__*/React__default.createElement(AudioRate, {
|
|
32453
32290
|
color: textSecondary,
|
|
32454
32291
|
onClick: handleSetAudioRate,
|
|
32455
32292
|
backgroundColor: backgroundSections
|
|
32456
32293
|
}, audioRate, /*#__PURE__*/React__default.createElement("span", null, "X"))), /*#__PURE__*/React__default.createElement(Timer$1, {
|
|
32457
32294
|
color: textSecondary
|
|
32458
|
-
}, currentTime));
|
|
32295
|
+
}, currentTime || formatAudioVideoTime(((_file$metadata3 = file.metadata) === null || _file$metadata3 === void 0 ? void 0 : _file$metadata3.dur) || 0)));
|
|
32459
32296
|
};
|
|
32460
|
-
var Container$
|
|
32461
|
-
var PlayPause = styled.div(_templateObject2$
|
|
32297
|
+
var Container$f = styled.div(_templateObject$w || (_templateObject$w = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n align-items: flex-start;\n width: 230px;\n padding: 8px 12px;\n"])));
|
|
32298
|
+
var PlayPause = styled.div(_templateObject2$s || (_templateObject2$s = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n\n & > svg {\n color: ", ";\n display: flex;\n width: 40px;\n height: 40px;\n }\n"])), function (props) {
|
|
32462
32299
|
return props.iconColor;
|
|
32463
32300
|
});
|
|
32464
|
-
var
|
|
32465
|
-
var
|
|
32301
|
+
var VisualizationWrapper = styled.div(_templateObject3$m || (_templateObject3$m = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n align-items: center;\n position: relative;\n"])));
|
|
32302
|
+
var AudioVisualizationPlaceholder = styled.div(_templateObject4$i || (_templateObject4$i = _taggedTemplateLiteralLoose(["\n width: 100%;\n position: ", ";\n opacity: ", ";\n pointer-events: ", ";\n"])), function (props) {
|
|
32303
|
+
return props.hidden ? 'absolute' : 'relative';
|
|
32304
|
+
}, function (props) {
|
|
32305
|
+
return props.hidden ? 0 : 1;
|
|
32306
|
+
}, function (props) {
|
|
32307
|
+
return props.hidden ? 'none' : 'auto';
|
|
32308
|
+
});
|
|
32309
|
+
var AudioRate = styled.div(_templateObject5$f || (_templateObject5$f = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n width: 30px;\n min-width: 30px;\n border-radius: 12px;\n font-weight: 600;\n font-size: 12px;\n line-height: 14px;\n color: ", ";\n height: 18px;\n box-sizing: border-box;\n margin-left: 14px;\n cursor: pointer;\n\n & > span {\n margin-top: auto;\n line-height: 16px;\n font-size: 9px;\n }\n"])), function (props) {
|
|
32466
32310
|
return props.backgroundColor;
|
|
32467
32311
|
}, function (props) {
|
|
32468
32312
|
return props.color;
|
|
32469
32313
|
});
|
|
32470
|
-
var WaveContainer = styled.div(
|
|
32471
|
-
var Timer$1 = styled.div(
|
|
32314
|
+
var WaveContainer = styled.div(_templateObject6$d || (_templateObject6$d = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n margin-left: 8px;\n"])));
|
|
32315
|
+
var Timer$1 = styled.div(_templateObject7$c || (_templateObject7$c = _taggedTemplateLiteralLoose(["\n position: absolute;\n left: 59px;\n bottom: 12px;\n display: inline-block;\n font-weight: 400;\n font-size: 11px;\n line-height: 12px;\n color: ", ";\n"])), function (props) {
|
|
32472
32316
|
return props.color;
|
|
32473
32317
|
});
|
|
32474
32318
|
|
|
32475
|
-
var _templateObject$
|
|
32319
|
+
var _templateObject$x, _templateObject2$t, _templateObject3$n, _templateObject4$j, _templateObject5$g, _templateObject6$e, _templateObject7$d, _templateObject8$b, _templateObject9$a, _templateObject0$9, _templateObject1$6, _templateObject10$3, _templateObject11$3;
|
|
32476
32320
|
var Attachment = function Attachment(_ref) {
|
|
32477
32321
|
var attachment = _ref.attachment,
|
|
32478
32322
|
_ref$isPreview = _ref.isPreview,
|
|
@@ -32566,7 +32410,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
32566
32410
|
if (attachment.type !== attachmentTypes.voice && attachment.type !== attachmentTypes.link && attachmentMetadata && attachmentMetadata.tmb) {
|
|
32567
32411
|
try {
|
|
32568
32412
|
if (attachmentMetadata.tmb.length < 70) {
|
|
32569
|
-
attachmentThumb =
|
|
32413
|
+
attachmentThumb = base64ToDataURL(attachmentMetadata.tmb);
|
|
32570
32414
|
withPrefix = false;
|
|
32571
32415
|
} else {
|
|
32572
32416
|
attachmentThumb = attachmentMetadata && attachmentMetadata.tmb;
|
|
@@ -33112,8 +32956,8 @@ var Attachment = function Attachment(_ref) {
|
|
|
33112
32956
|
var Attachment$1 = /*#__PURE__*/React__default.memo(Attachment, function (prevProps, nextProps) {
|
|
33113
32957
|
return prevProps.attachment.url === nextProps.attachment.url && prevProps.handleMediaItemClick === nextProps.handleMediaItemClick && prevProps.attachment.attachmentUrl === nextProps.attachment.attachmentUrl;
|
|
33114
32958
|
});
|
|
33115
|
-
var DownloadImage = styled.div(_templateObject$
|
|
33116
|
-
var AttachmentImgCont = styled.div(_templateObject2$
|
|
32959
|
+
var DownloadImage = styled.div(_templateObject$x || (_templateObject$x = _taggedTemplateLiteralLoose(["\n position: absolute;\n visibility: hidden;\n opacity: 0;\n width: 28px;\n height: 28px;\n top: 12px;\n right: 17px;\n border-radius: 50%;\n line-height: 35px;\n text-align: center;\n cursor: pointer;\n background: #ffffff;\n box-shadow: 0 4px 4px rgba(6, 10, 38, 0.2);\n transition: all 0.1s;\n\n & > svg {\n width: 16px;\n }\n"])));
|
|
32960
|
+
var AttachmentImgCont = styled.div(_templateObject2$t || (_templateObject2$t = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-right: ", ";\n min-width: ", ";\n height: ", ";\n width: ", ";\n max-width: 100%;\n height: ", ";\n max-height: 400px;\n min-height: ", ";\n cursor: pointer;\n\n ", "\n\n &:hover ", " {\n visibility: visible;\n opacity: 1;\n }\n\n ", "\n"])), function (props) {
|
|
33117
32961
|
return props.isPreview ? '16px' : props.isRepliedMessage ? '8px' : '';
|
|
33118
32962
|
}, function (props) {
|
|
33119
32963
|
return !props.isRepliedMessage && !props.fitTheContainer && '165px';
|
|
@@ -33142,7 +32986,7 @@ var ProgressWrapper$1 = styled.span(_templateObject5$g || (_templateObject5$g =
|
|
|
33142
32986
|
var SizeProgress = styled.span(_templateObject6$e || (_templateObject6$e = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: -26px;\n background-color: rgba(0, 0, 0, 0.4);\n color: ", ";\n font-size: 12px;\n border-radius: 12px;\n padding: 3px 6px;\n white-space: nowrap;\n"])), function (props) {
|
|
33143
32987
|
return props.color;
|
|
33144
32988
|
});
|
|
33145
|
-
var AttachmentFile$1 = styled.div(_templateObject7$
|
|
32989
|
+
var AttachmentFile$1 = styled.div(_templateObject7$d || (_templateObject7$d = _taggedTemplateLiteralLoose(["\n display: flex;\n position: relative;\n align-items: center;\n padding: ", ";\n //width: ", ";\n min-width: ", ";\n transition: all 0.1s;\n //height: 70px;\n background: ", ";\n border: ", ";\n box-sizing: border-box;\n margin-right: ", ";\n border-radius: ", ";\n\n ", "\n\n & > ", " svg {\n width: 40px;\n height: 40px;\n }\n"])), function (props) {
|
|
33146
32990
|
return !props.isRepliedMessage && '8px 12px;';
|
|
33147
32991
|
}, function (props) {
|
|
33148
32992
|
return !props.isRepliedMessage && (props.width ? props.width + "px" : '350px');
|
|
@@ -33200,7 +33044,7 @@ var VideoCont = styled.div(_templateObject11$3 || (_templateObject11$3 = _tagged
|
|
|
33200
33044
|
return props.isDetailsView && '100%';
|
|
33201
33045
|
});
|
|
33202
33046
|
|
|
33203
|
-
var _templateObject$
|
|
33047
|
+
var _templateObject$y, _templateObject2$u, _templateObject3$o, _templateObject4$k;
|
|
33204
33048
|
var RepliedMessage = function RepliedMessage(_ref) {
|
|
33205
33049
|
var _message$parentMessag;
|
|
33206
33050
|
var message = _ref.message,
|
|
@@ -33307,7 +33151,7 @@ var RepliedMessage = function RepliedMessage(_ref) {
|
|
|
33307
33151
|
var RepliedMessage$1 = /*#__PURE__*/React__default.memo(RepliedMessage, function (prevProps, nextProps) {
|
|
33308
33152
|
return prevProps.theme === nextProps.theme && prevProps.message.deliveryStatus === nextProps.message.deliveryStatus && prevProps.message.state === nextProps.message.state && prevProps.message.userReactions === nextProps.message.userReactions && prevProps.message.body === nextProps.message.body && prevProps.message.reactionTotals === nextProps.message.reactionTotals && prevProps.message.attachments === nextProps.message.attachments && prevProps.message.userMarkers === nextProps.message.userMarkers && prevProps.selectedMessagesMap === nextProps.selectedMessagesMap && prevProps.selectionIsActive === nextProps.selectionIsActive && prevProps.contactsMap === nextProps.contactsMap;
|
|
33309
33153
|
});
|
|
33310
|
-
var ReplyMessageContainer = styled.div(_templateObject$
|
|
33154
|
+
var ReplyMessageContainer = styled.div(_templateObject$y || (_templateObject$y = _taggedTemplateLiteralLoose(["\n display: flex;\n border-left: 2px solid ", ";\n padding: 4px 6px;\n position: relative;\n //margin: ", ";\n margin: ", ";\n background-color: ", ";\n border-radius: 0 4px 4px 0;\n margin-top: ", ";\n cursor: pointer;\n"])), function (props) {
|
|
33311
33155
|
return props.leftBorderColor || '#b8b9c2';
|
|
33312
33156
|
}, function (props) {
|
|
33313
33157
|
return props.withAttachments ? '8px 8px' : '0 0 8px';
|
|
@@ -33318,7 +33162,7 @@ var ReplyMessageContainer = styled.div(_templateObject$x || (_templateObject$x =
|
|
|
33318
33162
|
}, function (props) {
|
|
33319
33163
|
return !props.withSenderName && props.withAttachments && '8px';
|
|
33320
33164
|
});
|
|
33321
|
-
var ReplyMessageBody = styled.div(_templateObject2$
|
|
33165
|
+
var ReplyMessageBody = styled.div(_templateObject2$u || (_templateObject2$u = _taggedTemplateLiteralLoose(["\n margin-top: auto;\n margin-bottom: auto;\n direction: ", ";\n max-width: ", ";\n"])), function (props) {
|
|
33322
33166
|
return props.rtlDirection ? 'initial' : '';
|
|
33323
33167
|
}, function (props) {
|
|
33324
33168
|
return props.maxWidth || '100%';
|
|
@@ -33332,7 +33176,7 @@ var VoiceIconWrapper = styled(SvgVoiceIcon)(_templateObject4$k || (_templateObje
|
|
|
33332
33176
|
return props.color;
|
|
33333
33177
|
});
|
|
33334
33178
|
|
|
33335
|
-
var _templateObject$
|
|
33179
|
+
var _templateObject$z;
|
|
33336
33180
|
var MessageHeader = function MessageHeader(_ref) {
|
|
33337
33181
|
var message = _ref.message,
|
|
33338
33182
|
ownMessageOnRightSide = _ref.ownMessageOnRightSide,
|
|
@@ -33369,7 +33213,7 @@ var MessageHeader = function MessageHeader(_ref) {
|
|
|
33369
33213
|
var MessageHeader$1 = /*#__PURE__*/React__default.memo(MessageHeader, function (prevProps, nextProps) {
|
|
33370
33214
|
return prevProps.message.body === nextProps.message.body && prevProps.message.attachments === nextProps.message.attachments && prevProps.contactsMap === nextProps.contactsMap && prevProps.ownMessageOnRightSide === nextProps.ownMessageOnRightSide && prevProps.outgoingMessageStyles === nextProps.outgoingMessageStyles && prevProps.incomingMessageStyles === nextProps.incomingMessageStyles && prevProps.showMessageSenderName === nextProps.showMessageSenderName && prevProps.getFromContacts === nextProps.getFromContacts;
|
|
33371
33215
|
});
|
|
33372
|
-
var MessageHeaderCont = styled.div(_templateObject$
|
|
33216
|
+
var MessageHeaderCont = styled.div(_templateObject$z || (_templateObject$z = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n padding: ", ";\n"])), function (props) {
|
|
33373
33217
|
return props.withPadding && (props.isForwarded ? '8px 0 2px 12px' : !props.isReplied && !props.messageBody ? props.withMediaAttachment ? '8px 0 8px 12px' : '8px 0 0 12px' : '8px 0 0 12px');
|
|
33374
33218
|
});
|
|
33375
33219
|
|
|
@@ -33812,7 +33656,7 @@ var EMOJIS = [{
|
|
|
33812
33656
|
}]
|
|
33813
33657
|
}];
|
|
33814
33658
|
|
|
33815
|
-
var _templateObject$
|
|
33659
|
+
var _templateObject$A, _templateObject2$v, _templateObject3$p, _templateObject4$l, _templateObject5$h, _templateObject6$f, _templateObject7$e, _templateObject8$c;
|
|
33816
33660
|
var EmojiIcon = function EmojiIcon(_ref) {
|
|
33817
33661
|
var collectionName = _ref.collectionName;
|
|
33818
33662
|
switch (collectionName) {
|
|
@@ -33912,7 +33756,7 @@ function EmojisPopup(_ref2) {
|
|
|
33912
33756
|
}
|
|
33913
33757
|
}, 300);
|
|
33914
33758
|
}, []);
|
|
33915
|
-
return /*#__PURE__*/React__default.createElement(Container$
|
|
33759
|
+
return /*#__PURE__*/React__default.createElement(Container$g, {
|
|
33916
33760
|
backgroundColor: backgroundSections,
|
|
33917
33761
|
borderColor: border,
|
|
33918
33762
|
relativePosition: relativePosition,
|
|
@@ -33987,7 +33831,7 @@ function EmojisPopup(_ref2) {
|
|
|
33987
33831
|
}));
|
|
33988
33832
|
}))));
|
|
33989
33833
|
}
|
|
33990
|
-
var Container$
|
|
33834
|
+
var Container$g = styled.div(_templateObject$A || (_templateObject$A = _taggedTemplateLiteralLoose(["\n position: ", ";\n left: ", ";\n right: ", ";\n direction: ", ";\n bottom: ", ";\n width: 306px;\n border: ", ";\n box-sizing: border-box;\n box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);\n border-radius: ", ";\n background: ", ";\n z-index: 35;\n //transform: scaleY(0);\n height: 0;\n overflow: hidden;\n transform-origin: ", ";\n transition: all 0.2s ease-in-out;\n ", ";\n"])), function (props) {
|
|
33991
33835
|
return props.relativePosition ? 'relative' : 'absolute';
|
|
33992
33836
|
}, function (props) {
|
|
33993
33837
|
return props.rtlDirection ? '' : props.rightSide ? '' : '5px';
|
|
@@ -34008,7 +33852,7 @@ var Container$f = styled.div(_templateObject$z || (_templateObject$z = _taggedTe
|
|
|
34008
33852
|
}, function (props) {
|
|
34009
33853
|
return props.rendered && "\n height: 225px;\n ";
|
|
34010
33854
|
});
|
|
34011
|
-
var EmojiHeader = styled.div(_templateObject2$
|
|
33855
|
+
var EmojiHeader = styled.div(_templateObject2$v || (_templateObject2$v = _taggedTemplateLiteralLoose(["\n align-items: flex-end;\n font-style: normal;\n font-weight: 500;\n font-size: 12px;\n line-height: 22px;\n text-transform: uppercase;\n color: ", ";\n display: flex;\n padding: ", ";\n"])), function (props) {
|
|
34012
33856
|
return props.color;
|
|
34013
33857
|
}, function (props) {
|
|
34014
33858
|
return props.padding || '6px 18px';
|
|
@@ -34019,7 +33863,7 @@ var EmojiCollection = styled.span(_templateObject4$l || (_templateObject4$l = _t
|
|
|
34019
33863
|
});
|
|
34020
33864
|
var CollectionPointer = styled.span(_templateObject5$h || (_templateObject5$h = _taggedTemplateLiteralLoose([""])));
|
|
34021
33865
|
var AllEmojis = styled.ul(_templateObject6$f || (_templateObject6$f = _taggedTemplateLiteralLoose(["\n overflow: hidden;\n padding: 0 8px 8px;\n margin: 0;\n"])));
|
|
34022
|
-
var EmojiFooter = styled.div(_templateObject7$
|
|
33866
|
+
var EmojiFooter = styled.div(_templateObject7$e || (_templateObject7$e = _taggedTemplateLiteralLoose(["\n height: 42px;\n display: flex;\n justify-content: space-around;\n align-items: center;\n border-top: ", ";\n border-bottom: ", ";\n padding: 0 10px;\n & > span {\n width: 100%;\n text-align: center;\n }\n"])), function (props) {
|
|
34023
33867
|
return props.emojisCategoryIconsPosition !== 'top' && "1px solid " + props.borderColor;
|
|
34024
33868
|
}, function (props) {
|
|
34025
33869
|
return props.emojisCategoryIconsPosition === 'top' && "1px solid " + props.borderColor;
|
|
@@ -34051,7 +33895,7 @@ function SvgPlus(props) {
|
|
|
34051
33895
|
})));
|
|
34052
33896
|
}
|
|
34053
33897
|
|
|
34054
|
-
var _templateObject$
|
|
33898
|
+
var _templateObject$B, _templateObject2$w, _templateObject3$q;
|
|
34055
33899
|
function FrequentlyEmojis(_ref) {
|
|
34056
33900
|
var handleAddEmoji = _ref.handleAddEmoji,
|
|
34057
33901
|
handleEmojiPopupToggle = _ref.handleEmojiPopupToggle,
|
|
@@ -34152,7 +33996,7 @@ function FrequentlyEmojis(_ref) {
|
|
|
34152
33996
|
}
|
|
34153
33997
|
setRendered(true);
|
|
34154
33998
|
}, []);
|
|
34155
|
-
return /*#__PURE__*/React__default.createElement(Container$
|
|
33999
|
+
return /*#__PURE__*/React__default.createElement(Container$h, {
|
|
34156
34000
|
id: 'emojisContainer',
|
|
34157
34001
|
backgroundColor: backgroundSections,
|
|
34158
34002
|
rendered: rendered,
|
|
@@ -34176,14 +34020,14 @@ function FrequentlyEmojis(_ref) {
|
|
|
34176
34020
|
iconColor: textSecondary
|
|
34177
34021
|
}, /*#__PURE__*/React__default.createElement(SvgPlus, null)));
|
|
34178
34022
|
}
|
|
34179
|
-
var Container$
|
|
34023
|
+
var Container$h = styled.div(_templateObject$B || (_templateObject$B = _taggedTemplateLiteralLoose(["\n transform: scale(0, 0);\n transform-origin: ", ";\n display: flex;\n align-items: center;\n padding: 6px;\n background-color: ", ";\n box-shadow: 0 3px 10px -4px rgba(0, 0, 0, 0.2);\n border-radius: 24px;\n overflow: hidden;\n box-sizing: border-box;\n transition: all 0.2s ease-in-out;\n ", ";\n"])), function (props) {
|
|
34180
34024
|
return props.rightSide ? '100% 100%' : '0 100%';
|
|
34181
34025
|
}, function (props) {
|
|
34182
34026
|
return props.backgroundColor;
|
|
34183
34027
|
}, function (props) {
|
|
34184
34028
|
return props.rendered && "\n transform: scale(1, 1);\n ";
|
|
34185
34029
|
});
|
|
34186
|
-
var EmojiItem = styled.span(_templateObject2$
|
|
34030
|
+
var EmojiItem = styled.span(_templateObject2$w || (_templateObject2$w = _taggedTemplateLiteralLoose(["\n font-family:\n apple color emoji,\n segoe ui emoji,\n noto color emoji,\n android emoji,\n emojisymbols,\n emojione mozilla,\n twemoji mozilla,\n segoe ui symbol;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 8px;\n font-size: 28px;\n line-height: 32px;\n cursor: pointer;\n border-radius: 50%;\n width: 36px;\n height: 36px;\n background-color: ", ";\n &:hover {\n background-color: ", ";\n }\n"])), function (props) {
|
|
34187
34031
|
return props.active && props.activeBackground;
|
|
34188
34032
|
}, function (props) {
|
|
34189
34033
|
return props.activeBackground;
|
|
@@ -34198,7 +34042,7 @@ var OpenMoreEmojis = styled.span(_templateObject3$q || (_templateObject3$q = _ta
|
|
|
34198
34042
|
return props.iconHoverColor;
|
|
34199
34043
|
});
|
|
34200
34044
|
|
|
34201
|
-
var _templateObject$
|
|
34045
|
+
var _templateObject$C, _templateObject2$x, _templateObject3$r, _templateObject4$m;
|
|
34202
34046
|
var MessageStatusAndTime = function MessageStatusAndTime(_ref) {
|
|
34203
34047
|
var message = _ref.message,
|
|
34204
34048
|
_ref$messageStatusDis = _ref.messageStatusDisplayingType,
|
|
@@ -34260,10 +34104,10 @@ var MessageStatusAndTime = function MessageStatusAndTime(_ref) {
|
|
|
34260
34104
|
var MessageStatusAndTime$1 = /*#__PURE__*/React__default.memo(MessageStatusAndTime, function (prevProps, nextProps) {
|
|
34261
34105
|
return prevProps.message.state === nextProps.message.state && prevProps.message.deliveryStatus === nextProps.message.deliveryStatus && prevProps.message.createdAt === nextProps.message.createdAt && prevProps.showMessageTimeAndStatusOnlyOnHover === nextProps.showMessageTimeAndStatusOnlyOnHover && prevProps.messageStatusSize === nextProps.messageStatusSize && prevProps.messageStatusColor === nextProps.messageStatusColor && prevProps.messageReadStatusColor === nextProps.messageReadStatusColor && prevProps.messageStateFontSize === nextProps.messageStateFontSize && prevProps.messageStateColor === nextProps.messageStateColor && prevProps.messageTimeFontSize === nextProps.messageTimeFontSize && prevProps.messageStatusAndTimeLineHeight === nextProps.messageStatusAndTimeLineHeight && prevProps.messageTimeColor === nextProps.messageTimeColor && prevProps.messageTimeVisible === nextProps.messageTimeVisible && prevProps.messageStatusVisible === nextProps.messageStatusVisible && prevProps.ownMessageOnRightSide === nextProps.ownMessageOnRightSide && prevProps.bottomOfMessage === nextProps.bottomOfMessage && prevProps.marginBottom === nextProps.marginBottom && prevProps.messageTimeColorOnAttachment === nextProps.messageTimeColorOnAttachment && prevProps.withAttachment === nextProps.withAttachment;
|
|
34262
34106
|
});
|
|
34263
|
-
var MessageStatus = styled.span(_templateObject$
|
|
34107
|
+
var MessageStatus = styled.span(_templateObject$C || (_templateObject$C = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n margin-left: 4px;\n text-align: right;\n height: ", ";\n\n & > svg {\n height: 16px;\n width: 16px;\n }\n"])), function (props) {
|
|
34264
34108
|
return props.height || '14px';
|
|
34265
34109
|
});
|
|
34266
|
-
var HiddenMessageTime = styled.span(_templateObject2$
|
|
34110
|
+
var HiddenMessageTime = styled.span(_templateObject2$x || (_templateObject2$x = _taggedTemplateLiteralLoose(["\n display: ", ";\n font-weight: 400;\n font-size: ", ";\n color: ", ";\n"])), function (props) {
|
|
34267
34111
|
return props.hide && 'none';
|
|
34268
34112
|
}, function (props) {
|
|
34269
34113
|
return props.fontSize || '12px';
|
|
@@ -34303,7 +34147,7 @@ var MessageStatusUpdated = styled.span(_templateObject4$m || (_templateObject4$m
|
|
|
34303
34147
|
return props.color;
|
|
34304
34148
|
});
|
|
34305
34149
|
|
|
34306
|
-
var _templateObject$
|
|
34150
|
+
var _templateObject$D, _templateObject2$y, _templateObject3$s, _templateObject4$n, _templateObject5$i, _templateObject6$g, _templateObject7$f, _templateObject8$d, _templateObject9$b, _templateObject0$a, _templateObject1$7, _templateObject10$4;
|
|
34307
34151
|
var POLL_VOTES_LIMIT = 20;
|
|
34308
34152
|
var AllVotesPopup = function AllVotesPopup(_ref) {
|
|
34309
34153
|
var _pollVotesHasMore$key, _poll$voteDetails, _poll$voteDetails$vot, _poll$voteDetails3;
|
|
@@ -34417,8 +34261,8 @@ var AllVotesPopup = function AllVotesPopup(_ref) {
|
|
|
34417
34261
|
color: textSecondary
|
|
34418
34262
|
}, "Loading...")))))));
|
|
34419
34263
|
};
|
|
34420
|
-
var VotesList = styled.div(_templateObject$
|
|
34421
|
-
var VoterRow = styled.div(_templateObject2$
|
|
34264
|
+
var VotesList = styled.div(_templateObject$D || (_templateObject$D = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n max-height: 500px;\n padding: 8px 0;\n"])));
|
|
34265
|
+
var VoterRow = styled.div(_templateObject2$y || (_templateObject2$y = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 6px 0;\n"])));
|
|
34422
34266
|
var VoterInfo = styled.div(_templateObject3$s || (_templateObject3$s = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n justify-content: space-between;\n"])));
|
|
34423
34267
|
var VoterName = styled.div(_templateObject4$n || (_templateObject4$n = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-weight: 500;\n font-size: 15px;\n line-height: 20px;\n letter-spacing: -0.2px;\n max-width: calc(100% - 120px);\n"])), function (p) {
|
|
34424
34268
|
return p.color;
|
|
@@ -34429,7 +34273,7 @@ var VotedAt = styled.div(_templateObject5$i || (_templateObject5$i = _taggedTemp
|
|
|
34429
34273
|
var LoadingText = styled.div(_templateObject6$g || (_templateObject6$g = _taggedTemplateLiteralLoose(["\n color: ", ";\n text-align: center;\n padding: 16px;\n font-size: 14px;\n"])), function (p) {
|
|
34430
34274
|
return p.color;
|
|
34431
34275
|
});
|
|
34432
|
-
var TitleWrapper = styled.div(_templateObject7$
|
|
34276
|
+
var TitleWrapper = styled.div(_templateObject7$f || (_templateObject7$f = _taggedTemplateLiteralLoose(["\n max-width: calc(100% - 54px);\n margin: 0 auto;\n"])));
|
|
34433
34277
|
var BackButton = styled.button(_templateObject8$d || (_templateObject8$d = _taggedTemplateLiteralLoose(["\n position: absolute;\n left: 13px;\n top: 13px;\n padding: 9px;\n cursor: pointer;\n box-sizing: content-box;\n background: transparent;\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ", ";\n flex-shrink: 0;\n\n & > svg {\n width: 24px;\n height: 24px;\n }\n\n &:hover {\n opacity: 0.7;\n }\n"])), function (p) {
|
|
34434
34278
|
return p.color;
|
|
34435
34279
|
});
|
|
@@ -34446,7 +34290,7 @@ var Loader = styled.div(_templateObject10$4 || (_templateObject10$4 = _taggedTem
|
|
|
34446
34290
|
return p.color;
|
|
34447
34291
|
});
|
|
34448
34292
|
|
|
34449
|
-
var _templateObject$
|
|
34293
|
+
var _templateObject$E, _templateObject2$z, _templateObject3$t, _templateObject4$o, _templateObject5$j, _templateObject6$h, _templateObject7$g, _templateObject8$e, _templateObject9$c, _templateObject0$b, _templateObject1$8, _templateObject10$5;
|
|
34450
34294
|
var VotesResultsPopup = function VotesResultsPopup(_ref) {
|
|
34451
34295
|
var _poll$voteDetails3, _poll$voteDetails4, _poll$options$find;
|
|
34452
34296
|
var onClose = _ref.onClose,
|
|
@@ -34574,8 +34418,8 @@ var VotesResultsPopup = function VotesResultsPopup(_ref) {
|
|
|
34574
34418
|
})) === null || _poll$options$find === void 0 ? void 0 : _poll$options$find.name) || ''
|
|
34575
34419
|
})));
|
|
34576
34420
|
};
|
|
34577
|
-
var OptionsList = styled.div(_templateObject$
|
|
34578
|
-
var OptionBlock = styled.div(_templateObject2$
|
|
34421
|
+
var OptionsList = styled.div(_templateObject$E || (_templateObject$E = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n overflow-y: auto;\n max-height: 504px;\n border-radius: 10px;\n"])));
|
|
34422
|
+
var OptionBlock = styled.div(_templateObject2$z || (_templateObject2$z = _taggedTemplateLiteralLoose(["\n background: ", ";\n border-radius: 10px;\n border: 1px solid ", "0F; /* subtle */\n padding: 14px 16px 0 16px;\n"])), function (p) {
|
|
34579
34423
|
return p.background;
|
|
34580
34424
|
}, function (p) {
|
|
34581
34425
|
return p.border;
|
|
@@ -34588,7 +34432,7 @@ var OptionCount = styled.div(_templateObject5$j || (_templateObject5$j = _tagged
|
|
|
34588
34432
|
return p.color;
|
|
34589
34433
|
});
|
|
34590
34434
|
var Voters = styled.div(_templateObject6$h || (_templateObject6$h = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n margin-bottom: 5px;\n"])));
|
|
34591
|
-
var VoterRow$1 = styled.div(_templateObject7$
|
|
34435
|
+
var VoterRow$1 = styled.div(_templateObject7$g || (_templateObject7$g = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 6px 0;\n"])));
|
|
34592
34436
|
var VoterInfo$1 = styled.div(_templateObject8$e || (_templateObject8$e = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n justify-content: space-between;\n"])));
|
|
34593
34437
|
var VoterName$1 = styled.div(_templateObject9$c || (_templateObject9$c = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-weight: 500;\n font-size: 15px;\n line-height: 20px;\n letter-spacing: -0.2px;\n max-width: calc(100% - 120px);\n"])), function (p) {
|
|
34594
34438
|
return p.color;
|
|
@@ -34625,7 +34469,7 @@ function SvgFilledCheckbox(props) {
|
|
|
34625
34469
|
})));
|
|
34626
34470
|
}
|
|
34627
34471
|
|
|
34628
|
-
var _templateObject$
|
|
34472
|
+
var _templateObject$F, _templateObject2$A, _templateObject3$u, _templateObject4$p, _templateObject5$k, _templateObject6$i, _templateObject7$h, _templateObject8$f, _templateObject9$d, _templateObject0$c, _templateObject1$9, _templateObject10$6, _templateObject11$4, _templateObject12$3;
|
|
34629
34473
|
var PollMessage = function PollMessage(_ref) {
|
|
34630
34474
|
var _poll$voteDetails3, _poll$voteDetails4, _poll$voteDetails5, _poll$voteDetails6, _poll$voteDetails7;
|
|
34631
34475
|
var message = _ref.message;
|
|
@@ -34674,7 +34518,7 @@ var PollMessage = function PollMessage(_ref) {
|
|
|
34674
34518
|
var handleViewResults = function handleViewResults() {
|
|
34675
34519
|
return setShowResults(true);
|
|
34676
34520
|
};
|
|
34677
|
-
return /*#__PURE__*/React__default.createElement(Container$
|
|
34521
|
+
return /*#__PURE__*/React__default.createElement(Container$i, null, /*#__PURE__*/React__default.createElement(Question$1, {
|
|
34678
34522
|
color: textPrimary
|
|
34679
34523
|
}, poll.name), /*#__PURE__*/React__default.createElement(SubTitle$1, {
|
|
34680
34524
|
color: textSecondary
|
|
@@ -34726,7 +34570,7 @@ var PollMessage = function PollMessage(_ref) {
|
|
|
34726
34570
|
});
|
|
34727
34571
|
}))), /*#__PURE__*/React__default.createElement(Votes, {
|
|
34728
34572
|
color: textPrimary
|
|
34729
|
-
}, votes)), /*#__PURE__*/React__default.createElement(Bar, {
|
|
34573
|
+
}, votes)), /*#__PURE__*/React__default.createElement(Bar$1, {
|
|
34730
34574
|
track: borderSecondary,
|
|
34731
34575
|
closed: poll.closed
|
|
34732
34576
|
}, /*#__PURE__*/React__default.createElement(Fill, {
|
|
@@ -34755,8 +34599,8 @@ var PollMessage = function PollMessage(_ref) {
|
|
|
34755
34599
|
messageId: message.id
|
|
34756
34600
|
})));
|
|
34757
34601
|
};
|
|
34758
|
-
var Container$
|
|
34759
|
-
var Question$1 = styled.div(_templateObject2$
|
|
34602
|
+
var Container$i = styled.div(_templateObject$F || (_templateObject$F = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n min-width: 250px;\n width: 100%;\n"])));
|
|
34603
|
+
var Question$1 = styled.div(_templateObject2$A || (_templateObject2$A = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-weight: 500;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.4px;\n word-break: break-word;\n"])), function (p) {
|
|
34760
34604
|
return p.color;
|
|
34761
34605
|
});
|
|
34762
34606
|
var SubTitle$1 = styled.div(_templateObject3$u || (_templateObject3$u = _taggedTemplateLiteralLoose(["\n color: ", ";\n margin: 4px 0 6px 0;\n font-weight: 400;\n font-size: 13px;\n line-height: 16px;\n letter-spacing: -0.08px;\n word-break: break-word;\n"])), function (p) {
|
|
@@ -34769,7 +34613,7 @@ var Option = styled.div(_templateObject5$k || (_templateObject5$k = _taggedTempl
|
|
|
34769
34613
|
return p.disabled ? 'not-allowed' : 'pointer';
|
|
34770
34614
|
});
|
|
34771
34615
|
var TopRow = styled.div(_templateObject6$i || (_templateObject6$i = _taggedTemplateLiteralLoose(["\n display: flex;\n margin-bottom: 6px;\n min-height: 22px;\n"])));
|
|
34772
|
-
var Indicator = styled.div(_templateObject7$
|
|
34616
|
+
var Indicator = styled.div(_templateObject7$h || (_templateObject7$h = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n min-width: 20px;\n height: 20px;\n margin-right: 8px;\n opacity: ", ";\n cursor: ", ";\n"])), function (p) {
|
|
34773
34617
|
return p.disabled ? 0.5 : 1;
|
|
34774
34618
|
}, function (p) {
|
|
34775
34619
|
return p.disabled ? 'not-allowed' : 'pointer';
|
|
@@ -34786,7 +34630,7 @@ var Title$2 = styled.div(_templateObject0$c || (_templateObject0$c = _taggedTemp
|
|
|
34786
34630
|
var Votes = styled.span(_templateObject1$9 || (_templateObject1$9 = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: -0.2px;\n margin-left: 4px;\n"])), function (p) {
|
|
34787
34631
|
return p.color;
|
|
34788
34632
|
});
|
|
34789
|
-
var Bar = styled.div(_templateObject10$6 || (_templateObject10$6 = _taggedTemplateLiteralLoose(["\n width: ", ";\n height: 6px;\n border-radius: 6px;\n background: ", ";\n overflow: hidden;\n margin-left: auto;\n"])), function (p) {
|
|
34633
|
+
var Bar$1 = styled.div(_templateObject10$6 || (_templateObject10$6 = _taggedTemplateLiteralLoose(["\n width: ", ";\n height: 6px;\n border-radius: 6px;\n background: ", ";\n overflow: hidden;\n margin-left: auto;\n"])), function (p) {
|
|
34790
34634
|
return p.closed ? '100%' : "calc(100% - 28px)";
|
|
34791
34635
|
}, function (p) {
|
|
34792
34636
|
return p.track;
|
|
@@ -34794,7 +34638,7 @@ var Bar = styled.div(_templateObject10$6 || (_templateObject10$6 = _taggedTempla
|
|
|
34794
34638
|
var Fill = styled.div(_templateObject11$4 || (_templateObject11$4 = _taggedTemplateLiteralLoose(["\n height: 100%;\n border-radius: 6px;\n transition: width 0.3s ease-in-out;\n"])));
|
|
34795
34639
|
var UsersContainer = styled.div(_templateObject12$3 || (_templateObject12$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n margin-left: auto;\n padding-left: 16px;\n height: max-content;\n"])));
|
|
34796
34640
|
|
|
34797
|
-
var _templateObject$
|
|
34641
|
+
var _templateObject$G, _templateObject2$B, _templateObject3$v, _templateObject4$q, _templateObject5$l, _templateObject6$j, _templateObject7$i, _templateObject8$g, _templateObject9$e, _templateObject0$d, _templateObject1$a;
|
|
34798
34642
|
var validateUrl = function validateUrl(url) {
|
|
34799
34643
|
try {
|
|
34800
34644
|
var urlObj = new URL(url);
|
|
@@ -34803,8 +34647,12 @@ var validateUrl = function validateUrl(url) {
|
|
|
34803
34647
|
return false;
|
|
34804
34648
|
}
|
|
34805
34649
|
};
|
|
34650
|
+
var isDescriptionOnlySymbol = function isDescriptionOnlySymbol(description) {
|
|
34651
|
+
var trimmed = description === null || description === void 0 ? void 0 : description.trim();
|
|
34652
|
+
return !!trimmed && !/[a-zA-Z0-9]/.test(trimmed);
|
|
34653
|
+
};
|
|
34806
34654
|
var OGMetadata = function OGMetadata(_ref) {
|
|
34807
|
-
var _metadata$og0, _metadata$og0$image, _metadata$og0$image$, _metadata$og10, _metadata$og10$favico, _metadata$
|
|
34655
|
+
var _metadata$og0, _metadata$og0$image, _metadata$og0$image$, _metadata$og10, _metadata$og10$favico, _metadata$og18, _metadata$og19, _metadata$og20;
|
|
34808
34656
|
var attachments = _ref.attachments,
|
|
34809
34657
|
state = _ref.state,
|
|
34810
34658
|
incoming = _ref.incoming,
|
|
@@ -35048,7 +34896,7 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
35048
34896
|
}
|
|
35049
34897
|
}, [metadataLoaded, oGMetadata, attachment === null || attachment === void 0 ? void 0 : attachment.url, metadata]);
|
|
35050
34898
|
var elements = useMemo(function () {
|
|
35051
|
-
var _resolvedOrder$image, _metadata$og11, _metadata$og11$image, _metadata$og11$image$, _resolvedOrder$title, _metadata$og12, _metadata$og13, _metadata$
|
|
34899
|
+
var _resolvedOrder$image, _metadata$og11, _metadata$og11$image, _metadata$og11$image$, _resolvedOrder$title, _metadata$og12, _metadata$og13, _metadata$og14, _metadata$og14$title, _resolvedOrder$descri, _metadata$og15, _metadata$og16, _metadata$og17, _metadata$og17$descri, _resolvedOrder$link;
|
|
35052
34900
|
return [showImage ? {
|
|
35053
34901
|
key: 'image',
|
|
35054
34902
|
order: (_resolvedOrder$image = resolvedOrder === null || resolvedOrder === void 0 ? void 0 : resolvedOrder.image) != null ? _resolvedOrder$image : 1,
|
|
@@ -35067,21 +34915,21 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
35067
34915
|
} : null, {
|
|
35068
34916
|
key: 'title',
|
|
35069
34917
|
order: (_resolvedOrder$title = resolvedOrder === null || resolvedOrder === void 0 ? void 0 : resolvedOrder.title) != null ? _resolvedOrder$title : 2,
|
|
35070
|
-
render: ogShowTitle && (metadata === null || metadata === void 0 ? void 0 : (_metadata$og12 = metadata.og) === null || _metadata$og12 === void 0 ? void 0 : _metadata$og12.title) && (/*#__PURE__*/React__default.createElement(Title$3, {
|
|
34918
|
+
render: ogShowTitle && (metadata === null || metadata === void 0 ? void 0 : (_metadata$og12 = metadata.og) === null || _metadata$og12 === void 0 ? void 0 : _metadata$og12.title) && !isDescriptionOnlySymbol(metadata === null || metadata === void 0 ? void 0 : (_metadata$og13 = metadata.og) === null || _metadata$og13 === void 0 ? void 0 : _metadata$og13.description) && (/*#__PURE__*/React__default.createElement(Title$3, {
|
|
35071
34919
|
maxWidth: maxWidth,
|
|
35072
34920
|
shouldAnimate: shouldAnimate,
|
|
35073
34921
|
padding: infoPadding,
|
|
35074
34922
|
color: textPrimary
|
|
35075
|
-
}, /*#__PURE__*/React__default.createElement("span", null, metadata === null || metadata === void 0 ? void 0 : (_metadata$
|
|
34923
|
+
}, /*#__PURE__*/React__default.createElement("span", null, metadata === null || metadata === void 0 ? void 0 : (_metadata$og14 = metadata.og) === null || _metadata$og14 === void 0 ? void 0 : (_metadata$og14$title = _metadata$og14.title) === null || _metadata$og14$title === void 0 ? void 0 : _metadata$og14$title.trim())))
|
|
35076
34924
|
}, {
|
|
35077
34925
|
key: 'description',
|
|
35078
34926
|
order: (_resolvedOrder$descri = resolvedOrder === null || resolvedOrder === void 0 ? void 0 : resolvedOrder.description) != null ? _resolvedOrder$descri : 3,
|
|
35079
|
-
render: ogShowDescription && (metadata === null || metadata === void 0 ? void 0 : (_metadata$
|
|
34927
|
+
render: ogShowDescription && (metadata === null || metadata === void 0 ? void 0 : (_metadata$og15 = metadata.og) === null || _metadata$og15 === void 0 ? void 0 : _metadata$og15.description) && !isDescriptionOnlySymbol(metadata === null || metadata === void 0 ? void 0 : (_metadata$og16 = metadata.og) === null || _metadata$og16 === void 0 ? void 0 : _metadata$og16.description) && (/*#__PURE__*/React__default.createElement(Desc, {
|
|
35080
34928
|
maxWidth: maxWidth,
|
|
35081
34929
|
shouldAnimate: shouldAnimate,
|
|
35082
34930
|
color: textSecondary,
|
|
35083
34931
|
padding: infoPadding
|
|
35084
|
-
}, metadata === null || metadata === void 0 ? void 0 : (_metadata$
|
|
34932
|
+
}, metadata === null || metadata === void 0 ? void 0 : (_metadata$og17 = metadata.og) === null || _metadata$og17 === void 0 ? void 0 : (_metadata$og17$descri = _metadata$og17.description) === null || _metadata$og17$descri === void 0 ? void 0 : _metadata$og17$descri.trim()))
|
|
35085
34933
|
}, {
|
|
35086
34934
|
key: 'link',
|
|
35087
34935
|
order: (_resolvedOrder$link = resolvedOrder === null || resolvedOrder === void 0 ? void 0 : resolvedOrder.link) != null ? _resolvedOrder$link : 4,
|
|
@@ -35096,7 +34944,7 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
35096
34944
|
var _a$order, _b$order;
|
|
35097
34945
|
return ((_a$order = a.order) != null ? _a$order : 0) - ((_b$order = b.order) != null ? _b$order : 0);
|
|
35098
34946
|
});
|
|
35099
|
-
}, [hasImage, resolvedOrder, showOGMetadata, maxWidth, calculatedImageHeight, maxHeight, metadata === null || metadata === void 0 ? void 0 : (_metadata$
|
|
34947
|
+
}, [hasImage, resolvedOrder, showOGMetadata, maxWidth, calculatedImageHeight, maxHeight, metadata === null || metadata === void 0 ? void 0 : (_metadata$og18 = metadata.og) === null || _metadata$og18 === void 0 ? void 0 : _metadata$og18.image, shouldAnimate, ogShowTitle, metadata === null || metadata === void 0 ? void 0 : (_metadata$og19 = metadata.og) === null || _metadata$og19 === void 0 ? void 0 : _metadata$og19.title, infoPadding, ogShowDescription, metadata === null || metadata === void 0 ? void 0 : (_metadata$og20 = metadata.og) === null || _metadata$og20 === void 0 ? void 0 : _metadata$og20.description, textSecondary, ogShowUrl, ogUrl]);
|
|
35100
34948
|
var textContent = useMemo(function () {
|
|
35101
34949
|
return /*#__PURE__*/React__default.createElement(OGText, {
|
|
35102
34950
|
shouldAnimate: shouldAnimate,
|
|
@@ -35154,7 +35002,7 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
35154
35002
|
}), content);
|
|
35155
35003
|
};
|
|
35156
35004
|
var sharedKeyframes = "\n @keyframes fadeInSlideUp {\n from {\n opacity: 0;\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes expandHeight {\n from {\n max-height: 0;\n opacity: 0;\n }\n to {\n max-height: 1000px;\n opacity: 1;\n }\n }\n";
|
|
35157
|
-
var OGMetadataContainer = styled.div(_templateObject$
|
|
35005
|
+
var OGMetadataContainer = styled.div(_templateObject$G || (_templateObject$G = _taggedTemplateLiteralLoose(["\n min-width: inherit;\n max-width: ", ";\n width: 100%;\n display: grid;\n grid-template-columns: 1fr;\n border-radius: 8px;\n background-color: ", ";\n border-radius: ", ";\n margin: ", ";\n // margin-bottom: ", ";\n padding: ", ";\n text-decoration: none;\n // color: inherit;\n &:hover {\n opacity: 0.9;\n cursor: pointer;\n }\n"])), function (_ref2) {
|
|
35158
35006
|
var maxWidth = _ref2.maxWidth;
|
|
35159
35007
|
return maxWidth ? maxWidth + "px" : 'inherit';
|
|
35160
35008
|
}, function (_ref3) {
|
|
@@ -35175,7 +35023,7 @@ var OGMetadataContainer = styled.div(_templateObject$F || (_templateObject$F = _
|
|
|
35175
35023
|
var padding = _ref7.padding;
|
|
35176
35024
|
return padding != null ? padding : '0';
|
|
35177
35025
|
});
|
|
35178
|
-
var ImageContainer = styled.div(_templateObject2$
|
|
35026
|
+
var ImageContainer = styled.div(_templateObject2$B || (_templateObject2$B = _taggedTemplateLiteralLoose(["\n ", "\n width: 100%;\n height: ", ";\n opacity: ", ";\n margin: 0 auto;\n border-radius: 8px 8px 0 0;\n overflow: hidden;\n ", "\n"])), sharedKeyframes, function (_ref8) {
|
|
35179
35027
|
var containerHeight = _ref8.containerHeight;
|
|
35180
35028
|
return containerHeight ? containerHeight + "px" : '0px';
|
|
35181
35029
|
}, function (_ref9) {
|
|
@@ -35195,7 +35043,7 @@ var OGText = styled.div(_templateObject3$v || (_templateObject3$v = _taggedTempl
|
|
|
35195
35043
|
var margin = _ref10.margin;
|
|
35196
35044
|
return margin ? '12px' : '0';
|
|
35197
35045
|
});
|
|
35198
|
-
var Title$3 = styled.p(_templateObject4$q || (_templateObject4$q = _taggedTemplateLiteralLoose(["\n ", "\n
|
|
35046
|
+
var Title$3 = styled.p(_templateObject4$q || (_templateObject4$q = _taggedTemplateLiteralLoose(["\n ", "\n font-weight: bold;\n font-size: 14px;\n line-height: 18px;\n letter-spacing: 0px;\n color: ", ";\n margin: 4px 0 0 0;\n padding: ", ";\n box-sizing: border-box;\n ", "\n ", "\n"])), sharedKeyframes, function (_ref11) {
|
|
35199
35047
|
var color = _ref11.color;
|
|
35200
35048
|
return color;
|
|
35201
35049
|
}, function (_ref12) {
|
|
@@ -35231,7 +35079,7 @@ var Url = styled.p(_templateObject6$j || (_templateObject6$j = _taggedTemplateLi
|
|
|
35231
35079
|
var shouldAnimate = _ref21.shouldAnimate;
|
|
35232
35080
|
return shouldAnimate && "\n animation: fadeInSlideUp 0.3s ease-out 0.3s backwards;\n ";
|
|
35233
35081
|
});
|
|
35234
|
-
var Img = styled.img(_templateObject7$
|
|
35082
|
+
var Img = styled.img(_templateObject7$i || (_templateObject7$i = _taggedTemplateLiteralLoose(["\n ", "\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n // object-fit: cover;\n // object-position: center;\n // image-rendering: auto;\n border-radius: inherit;\n ", "\n"])), sharedKeyframes, function (_ref22) {
|
|
35235
35083
|
var shouldAnimate = _ref22.shouldAnimate;
|
|
35236
35084
|
return shouldAnimate && "\n animation: fadeIn 0.4s ease-out forwards;\n ";
|
|
35237
35085
|
});
|
|
@@ -35240,7 +35088,7 @@ var OGTextWrapper = styled.div(_templateObject9$e || (_templateObject9$e = _tagg
|
|
|
35240
35088
|
var FaviconContainer = styled.div(_templateObject0$d || (_templateObject0$d = _taggedTemplateLiteralLoose(["\n width: 52px;\n height: 52px;\n border-radius: 8px;\n overflow: hidden;\n margin: 8px;\n flex: 0 0 52px;\n"])));
|
|
35241
35089
|
var FaviconImg = styled.img(_templateObject1$a || (_templateObject1$a = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n"])));
|
|
35242
35090
|
|
|
35243
|
-
var _templateObject$
|
|
35091
|
+
var _templateObject$H, _templateObject2$C, _templateObject3$w, _templateObject4$r, _templateObject5$m;
|
|
35244
35092
|
var MessageBody = function MessageBody(_ref) {
|
|
35245
35093
|
var message = _ref.message,
|
|
35246
35094
|
channel = _ref.channel,
|
|
@@ -35833,7 +35681,7 @@ var MessageBody$1 = /*#__PURE__*/React__default.memo(MessageBody, function (prev
|
|
|
35833
35681
|
var _prevProps$ogMetadata, _nextProps$ogMetadata, _prevProps$ogMetadata2, _nextProps$ogMetadata2, _prevProps$ogMetadata3, _nextProps$ogMetadata3, _prevProps$ogMetadata4, _nextProps$ogMetadata4, _prevProps$ogMetadata5, _nextProps$ogMetadata5, _prevProps$ogMetadata6, _nextProps$ogMetadata6;
|
|
35834
35682
|
return !!(prevProps.message.deliveryStatus === nextProps.message.deliveryStatus && prevProps.message.state === nextProps.message.state && prevProps.message.userReactions === nextProps.message.userReactions && prevProps.message.body === nextProps.message.body && prevProps.message.reactionTotals === nextProps.message.reactionTotals && prevProps.message.attachments === nextProps.message.attachments && prevProps.message.userMarkers === nextProps.message.userMarkers && prevProps.prevMessage === nextProps.prevMessage && prevProps.nextMessage === nextProps.nextMessage && prevProps.selectedMessagesMap === nextProps.selectedMessagesMap && prevProps.contactsMap === nextProps.contactsMap && prevProps.connectionStatus === nextProps.connectionStatus && prevProps.openedMessageMenuId === nextProps.openedMessageMenuId && prevProps.ownMessageOnRightSide === nextProps.ownMessageOnRightSide && prevProps.showSenderNameOnDirectChannel === nextProps.showSenderNameOnDirectChannel && prevProps.showSenderNameOnGroupChannel === nextProps.showSenderNameOnGroupChannel && prevProps.showSenderNameOnOwnMessages === nextProps.showSenderNameOnOwnMessages && prevProps.messageStatusAndTimePosition === nextProps.messageStatusAndTimePosition && prevProps.messageStatusDisplayingType === nextProps.messageStatusDisplayingType && prevProps.outgoingMessageStyles === nextProps.outgoingMessageStyles && prevProps.incomingMessageStyles === nextProps.incomingMessageStyles && prevProps.ownRepliedMessageBackground === nextProps.ownRepliedMessageBackground && prevProps.incomingRepliedMessageBackground === nextProps.incomingRepliedMessageBackground && prevProps.showMessageStatus === nextProps.showMessageStatus && prevProps.showMessageTimeAndStatusOnlyOnHover === nextProps.showMessageTimeAndStatusOnlyOnHover && prevProps.showMessageTime === nextProps.showMessageTime && prevProps.showMessageStatusForEachMessage === nextProps.showMessageStatusForEachMessage && prevProps.showMessageTimeForEachMessage === nextProps.showMessageTimeForEachMessage && prevProps.messageReaction === nextProps.messageReaction && prevProps.editMessage === nextProps.editMessage && prevProps.copyMessage === nextProps.copyMessage && prevProps.replyMessage === nextProps.replyMessage && prevProps.replyMessageInThread === nextProps.replyMessageInThread && prevProps.forwardMessage === nextProps.forwardMessage && prevProps.deleteMessage === nextProps.deleteMessage && prevProps.selectMessage === nextProps.selectMessage && prevProps.allowEditDeleteIncomingMessage === nextProps.allowEditDeleteIncomingMessage && prevProps.reportMessage === nextProps.reportMessage && prevProps.reactionIcon === nextProps.reactionIcon && prevProps.editIcon === nextProps.editIcon && prevProps.copyIcon === nextProps.copyIcon && prevProps.replyIcon === nextProps.replyIcon && prevProps.replyInThreadIcon === nextProps.replyInThreadIcon && prevProps.forwardIcon === nextProps.forwardIcon && prevProps.deleteIcon === nextProps.deleteIcon && prevProps.selectIcon === nextProps.selectIcon && prevProps.starIcon === nextProps.starIcon && prevProps.staredIcon === nextProps.staredIcon && prevProps.reportIcon === nextProps.reportIcon && prevProps.fixEmojiCategoriesTitleOnTop === nextProps.fixEmojiCategoriesTitleOnTop && prevProps.emojisCategoryIconsPosition === nextProps.emojisCategoryIconsPosition && prevProps.emojisContainerBorderRadius === nextProps.emojisContainerBorderRadius && prevProps.reactionIconOrder === nextProps.reactionIconOrder && prevProps.editIconOrder === nextProps.editIconOrder && prevProps.copyIconOrder === nextProps.copyIconOrder && prevProps.replyIconOrder === nextProps.replyIconOrder && prevProps.replyInThreadIconOrder === nextProps.replyInThreadIconOrder && prevProps.forwardIconOrder === nextProps.forwardIconOrder && prevProps.deleteIconOrder === nextProps.deleteIconOrder && prevProps.selectIconOrder === nextProps.selectIconOrder && prevProps.starIconOrder === nextProps.starIconOrder && prevProps.reportIconOrder === nextProps.reportIconOrder && prevProps.reactionIconTooltipText === nextProps.reactionIconTooltipText && prevProps.editIconTooltipText === nextProps.editIconTooltipText && prevProps.copyIconTooltipText === nextProps.copyIconTooltipText && prevProps.replyIconTooltipText === nextProps.replyIconTooltipText && prevProps.replyInThreadIconTooltipText === nextProps.replyInThreadIconTooltipText && prevProps.forwardIconTooltipText === nextProps.forwardIconTooltipText && prevProps.deleteIconTooltipText === nextProps.deleteIconTooltipText && prevProps.selectIconTooltipText === nextProps.selectIconTooltipText && prevProps.starIconTooltipText === nextProps.starIconTooltipText && prevProps.reportIconTooltipText === nextProps.reportIconTooltipText && prevProps.messageActionIconsColor === nextProps.messageActionIconsColor && prevProps.inlineReactionIcon === nextProps.inlineReactionIcon && prevProps.messageStatusSize === nextProps.messageStatusSize && prevProps.messageStatusColor === nextProps.messageStatusColor && prevProps.messageReadStatusColor === nextProps.messageReadStatusColor && prevProps.messageStateFontSize === nextProps.messageStateFontSize && prevProps.messageStateColor === nextProps.messageStateColor && prevProps.messageTimeFontSize === nextProps.messageTimeFontSize && prevProps.messageTimeColor === nextProps.messageTimeColor && prevProps.messageStatusAndTimeLineHeight === nextProps.messageStatusAndTimeLineHeight && prevProps.fileAttachmentsBoxWidth === nextProps.fileAttachmentsBoxWidth && prevProps.fileAttachmentsBoxBackground === nextProps.fileAttachmentsBoxBackground && prevProps.fileAttachmentsBoxBorder === nextProps.fileAttachmentsBoxBorder && prevProps.fileAttachmentsTitleColor === nextProps.fileAttachmentsTitleColor && prevProps.fileAttachmentsSizeColor === nextProps.fileAttachmentsSizeColor && prevProps.fileAttachmentsIcon === nextProps.fileAttachmentsIcon && prevProps.imageAttachmentMaxWidth === nextProps.imageAttachmentMaxWidth && prevProps.imageAttachmentMaxHeight === nextProps.imageAttachmentMaxHeight && prevProps.videoAttachmentMaxWidth === nextProps.videoAttachmentMaxWidth && prevProps.videoAttachmentMaxHeight === nextProps.videoAttachmentMaxHeight && prevProps.theme === nextProps.theme && prevProps.messageTextFontSize === nextProps.messageTextFontSize && prevProps.messageTextLineHeight === nextProps.messageTextLineHeight && prevProps.messageActionsShow === nextProps.messageActionsShow && prevProps.emojisPopupOpen === nextProps.emojisPopupOpen && prevProps.emojisPopupPosition === nextProps.emojisPopupPosition && prevProps.frequentlyEmojisOpen === nextProps.frequentlyEmojisOpen && (((_prevProps$ogMetadata = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata === void 0 ? void 0 : _prevProps$ogMetadata.ogLayoutOrder) || 'og-first') === (((_nextProps$ogMetadata = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata === void 0 ? void 0 : _nextProps$ogMetadata.ogLayoutOrder) || 'og-first') && ((_prevProps$ogMetadata2 = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata2 === void 0 ? void 0 : _prevProps$ogMetadata2.ogShowUrl) === ((_nextProps$ogMetadata2 = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata2 === void 0 ? void 0 : _nextProps$ogMetadata2.ogShowUrl) && ((_prevProps$ogMetadata3 = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata3 === void 0 ? void 0 : _prevProps$ogMetadata3.ogShowTitle) === ((_nextProps$ogMetadata3 = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata3 === void 0 ? void 0 : _nextProps$ogMetadata3.ogShowTitle) && ((_prevProps$ogMetadata4 = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata4 === void 0 ? void 0 : _prevProps$ogMetadata4.ogShowDescription) === ((_nextProps$ogMetadata4 = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata4 === void 0 ? void 0 : _nextProps$ogMetadata4.ogShowDescription) && ((_prevProps$ogMetadata5 = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata5 === void 0 ? void 0 : _prevProps$ogMetadata5.ogShowFavicon) === ((_nextProps$ogMetadata5 = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata5 === void 0 ? void 0 : _nextProps$ogMetadata5.ogShowFavicon) && ((_prevProps$ogMetadata6 = prevProps.ogMetadataProps) === null || _prevProps$ogMetadata6 === void 0 ? void 0 : _prevProps$ogMetadata6.order) === ((_nextProps$ogMetadata6 = nextProps.ogMetadataProps) === null || _nextProps$ogMetadata6 === void 0 ? void 0 : _nextProps$ogMetadata6.order));
|
|
35835
35683
|
});
|
|
35836
|
-
var ForwardedTitle = styled.h3(_templateObject$
|
|
35684
|
+
var ForwardedTitle = styled.h3(_templateObject$H || (_templateObject$H = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-weight: 500;\n font-size: 13px;\n line-height: 16px;\n color: ", ";\n // margin: ", ";\n margin: 0;\n padding: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n\n & > svg {\n margin-right: 4px;\n width: 16px;\n height: 16px;\n color: ", ";\n }\n"])), function (props) {
|
|
35837
35685
|
return props.color;
|
|
35838
35686
|
}, function (props) {
|
|
35839
35687
|
return props.withAttachments && props.withBody ? '0' : '0 0 4px';
|
|
@@ -35846,7 +35694,7 @@ var ForwardedTitle = styled.h3(_templateObject$G || (_templateObject$G = _tagged
|
|
|
35846
35694
|
}, function (props) {
|
|
35847
35695
|
return props.color;
|
|
35848
35696
|
});
|
|
35849
|
-
var MessageStatusDeleted$1 = styled.span(_templateObject2$
|
|
35697
|
+
var MessageStatusDeleted$1 = styled.span(_templateObject2$C || (_templateObject2$C = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-size: ", ";\n font-style: italic;\n"])), function (props) {
|
|
35850
35698
|
return props.color;
|
|
35851
35699
|
}, function (props) {
|
|
35852
35700
|
return props.fontSize;
|
|
@@ -35889,7 +35737,7 @@ var FrequentlyEmojisContainer = styled.div(_templateObject5$m || (_templateObjec
|
|
|
35889
35737
|
return props.rtlDirection && '0';
|
|
35890
35738
|
});
|
|
35891
35739
|
|
|
35892
|
-
var _templateObject$
|
|
35740
|
+
var _templateObject$I, _templateObject2$D, _templateObject3$x, _templateObject4$s, _templateObject5$n, _templateObject6$k, _templateObject7$j, _templateObject8$h, _templateObject9$f, _templateObject0$e, _templateObject1$b;
|
|
35893
35741
|
var defaultFormatDate = function defaultFormatDate(date) {
|
|
35894
35742
|
var m = moment(date);
|
|
35895
35743
|
if (m.isSame(moment(), 'day')) {
|
|
@@ -36261,8 +36109,8 @@ function sortByDateDesc(a, b) {
|
|
|
36261
36109
|
var bTime = bDate ? new Date(bDate).getTime() : 0;
|
|
36262
36110
|
return bTime - aTime;
|
|
36263
36111
|
}
|
|
36264
|
-
var Tabs = styled.div(_templateObject$
|
|
36265
|
-
var Tab = styled.button(_templateObject2$
|
|
36112
|
+
var Tabs = styled.div(_templateObject$I || (_templateObject$I = _taggedTemplateLiteralLoose(["\n display: flex;\n gap: 8px;\n justify-content: start;\n margin-bottom: 8px;\n"])));
|
|
36113
|
+
var Tab = styled.button(_templateObject2$D || (_templateObject2$D = _taggedTemplateLiteralLoose(["\n border: none;\n background: transparent;\n cursor: pointer;\n padding: 6px 11px;\n border-radius: 16px;\n color: ", ";\n background: ", ";\n border: 1px solid ", ";\n &:hover {\n opacity: 0.9;\n }\n font-weight: 500;\n font-size: 15px;\n line-height: 20px;\n letter-spacing: 0px;\n text-align: center;\n"])), function (p) {
|
|
36266
36114
|
return p.active ? p.textOnPrimary : p.textSecondary;
|
|
36267
36115
|
}, function (p) {
|
|
36268
36116
|
return p.background;
|
|
@@ -36279,7 +36127,7 @@ var RowInfo = styled.div(_templateObject5$n || (_templateObject5$n = _taggedTemp
|
|
|
36279
36127
|
var RowTitle = styled.div(_templateObject6$k || (_templateObject6$k = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-size: 16px;\n font-weight: 500;\n line-height: 22px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (p) {
|
|
36280
36128
|
return p.color;
|
|
36281
36129
|
});
|
|
36282
|
-
var RowDate = styled.div(_templateObject7$
|
|
36130
|
+
var RowDate = styled.div(_templateObject7$j || (_templateObject7$j = _taggedTemplateLiteralLoose(["\n color: ", ";\n min-width: max-content;\n font-weight: 400;\n font-size: 13px;\n line-height: 16px;\n"])), function (p) {
|
|
36283
36131
|
return p.color;
|
|
36284
36132
|
});
|
|
36285
36133
|
var Empty = styled.div(_templateObject8$h || (_templateObject8$h = _taggedTemplateLiteralLoose(["\n color: ", ";\n text-align: center;\n padding: 16px 0;\n font-size: 14px;\n height: calc(100% - 32px);\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n"])), function (p) {
|
|
@@ -36323,7 +36171,7 @@ function ConfirmEndPollPopup(_ref) {
|
|
|
36323
36171
|
});
|
|
36324
36172
|
}
|
|
36325
36173
|
|
|
36326
|
-
var _templateObject$
|
|
36174
|
+
var _templateObject$J, _templateObject2$E, _templateObject3$y, _templateObject4$t, _templateObject5$o, _templateObject6$l, _templateObject7$k, _templateObject8$i, _templateObject9$g, _templateObject0$f, _templateObject1$c, _templateObject10$7, _templateObject11$5, _templateObject12$4;
|
|
36327
36175
|
var Message$1 = function Message(_ref) {
|
|
36328
36176
|
var message = _ref.message,
|
|
36329
36177
|
channel = _ref.channel,
|
|
@@ -37125,8 +36973,8 @@ var Message$1 = function Message(_ref) {
|
|
|
37125
36973
|
var Message$2 = /*#__PURE__*/React__default.memo(Message$1, function (prevProps, nextProps) {
|
|
37126
36974
|
return prevProps.message.deliveryStatus === nextProps.message.deliveryStatus && prevProps.message.state === nextProps.message.state && prevProps.message.userReactions === nextProps.message.userReactions && prevProps.message.body === nextProps.message.body && prevProps.message.reactionTotals === nextProps.message.reactionTotals && prevProps.message.attachments === nextProps.message.attachments && prevProps.message.metadata === nextProps.message.metadata && prevProps.message.userMarkers === nextProps.message.userMarkers && prevProps.message.pollDetails === nextProps.message.pollDetails && prevProps.prevMessage === nextProps.prevMessage && prevProps.nextMessage === nextProps.nextMessage && prevProps.selectedMessagesMap === nextProps.selectedMessagesMap && prevProps.contactsMap === nextProps.contactsMap && prevProps.connectionStatus === nextProps.connectionStatus && prevProps.openedMessageMenuId === nextProps.openedMessageMenuId && prevProps.theme === nextProps.theme;
|
|
37127
36975
|
});
|
|
37128
|
-
var MessageReactionKey = styled.span(_templateObject$
|
|
37129
|
-
var ReactionItemCount = styled.span(_templateObject2$
|
|
36976
|
+
var MessageReactionKey = styled.span(_templateObject$J || (_templateObject$J = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n font-family:\n apple color emoji,\n segoe ui emoji,\n noto color emoji,\n android emoji,\n emojisymbols,\n emojione mozilla,\n twemoji mozilla,\n segoe ui symbol;\n"])));
|
|
36977
|
+
var ReactionItemCount = styled.span(_templateObject2$E || (_templateObject2$E = _taggedTemplateLiteralLoose(["\n margin-left: 2px;\n font-family: Inter, sans-serif;\n font-weight: 400;\n font-size: 14px;\n line-height: 16px;\n color: ", ";\n"])), function (props) {
|
|
37130
36978
|
return props.color;
|
|
37131
36979
|
});
|
|
37132
36980
|
var MessageReaction = styled.span(_templateObject3$y || (_templateObject3$y = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n //min-width: 23px;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin: ", ";\n margin-right: ", ";\n border: ", ";\n color: ", ";\n box-sizing: border-box;\n border-radius: ", ";\n font-size: ", ";\n line-height: ", ";\n padding: ", ";\n background-color: ", ";\n white-space: nowrap;\n\n &:last-child {\n margin-right: 0;\n }\n"])), function (props) {
|
|
@@ -37157,7 +37005,7 @@ var FailedMessageIcon = styled.div(_templateObject5$o || (_templateObject5$o = _
|
|
|
37157
37005
|
return props.rtl && '-24px';
|
|
37158
37006
|
});
|
|
37159
37007
|
var ErrorIconWrapper = styled(SvgErrorIcon)(_templateObject6$l || (_templateObject6$l = _taggedTemplateLiteralLoose(["\n width: 20px;\n height: 20px;\n"])));
|
|
37160
|
-
var SelectMessageWrapper = styled.div(_templateObject7$
|
|
37008
|
+
var SelectMessageWrapper = styled.div(_templateObject7$k || (_templateObject7$k = _taggedTemplateLiteralLoose(["\n display: flex;\n padding: 10px;\n position: absolute;\n left: 4%;\n bottom: calc(50% - 22px);\n cursor: ", ";\n & > svg {\n color: ", ";\n width: 24px;\n height: 24px;\n }\n"])), function (props) {
|
|
37161
37009
|
return !props.disabled && 'pointer';
|
|
37162
37010
|
}, function (props) {
|
|
37163
37011
|
return props.activeColor;
|
|
@@ -37228,7 +37076,7 @@ var MessageItem = styled.div(_templateObject12$4 || (_templateObject12$4 = _tagg
|
|
|
37228
37076
|
return props.hoverBackground || '';
|
|
37229
37077
|
}, HiddenMessageTime$1, MessageStatus$1);
|
|
37230
37078
|
|
|
37231
|
-
var _templateObject$
|
|
37079
|
+
var _templateObject$K, _templateObject2$F, _templateObject3$z, _templateObject4$u, _templateObject5$p, _templateObject6$m, _templateObject7$l, _templateObject8$j, _templateObject9$h, _templateObject0$g, _templateObject1$d;
|
|
37232
37080
|
var CreateMessageDateDivider = function CreateMessageDateDivider(_ref) {
|
|
37233
37081
|
var lastIndex = _ref.lastIndex,
|
|
37234
37082
|
currentMessageDate = _ref.currentMessageDate,
|
|
@@ -38095,7 +37943,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
38095
37943
|
dateDividerBackgroundColor: dateDividerBackgroundColor || overlayBackground,
|
|
38096
37944
|
dateDividerBorderRadius: dateDividerBorderRadius,
|
|
38097
37945
|
topOffset: scrollRef && scrollRef.current && scrollRef.current.offsetTop
|
|
38098
|
-
}, /*#__PURE__*/React__default.createElement("span", null, topDateLabel))), /*#__PURE__*/React__default.createElement(Container$
|
|
37946
|
+
}, /*#__PURE__*/React__default.createElement("span", null, topDateLabel))), /*#__PURE__*/React__default.createElement(Container$j, {
|
|
38099
37947
|
id: 'scrollableDiv',
|
|
38100
37948
|
className: isScrolling ? 'show-scrollbar' : '',
|
|
38101
37949
|
ref: scrollRef,
|
|
@@ -38322,12 +38170,12 @@ var MessageList = function MessageList(_ref2) {
|
|
|
38322
38170
|
attachmentsPreview: attachmentsPreview
|
|
38323
38171
|
})))));
|
|
38324
38172
|
};
|
|
38325
|
-
var Container$
|
|
38173
|
+
var Container$j = styled.div(_templateObject$K || (_templateObject$K = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column-reverse;\n flex-grow: 1;\n position: relative;\n overflow: auto;\n scroll-behavior: smooth;\n will-change: left, top;\n background-color: ", ";\n overflow-x: hidden;\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n"])), function (props) {
|
|
38326
38174
|
return props.backgroundColor;
|
|
38327
38175
|
}, function (props) {
|
|
38328
38176
|
return props.thumbColor;
|
|
38329
38177
|
});
|
|
38330
|
-
var EmptyDiv = styled.div(_templateObject2$
|
|
38178
|
+
var EmptyDiv = styled.div(_templateObject2$F || (_templateObject2$F = _taggedTemplateLiteralLoose(["\n height: 300px;\n"])));
|
|
38331
38179
|
var MessagesBox = styled.div(_templateObject3$z || (_templateObject3$z = _taggedTemplateLiteralLoose(["\n //height: auto;\n display: flex;\n //flex-direction: column-reverse;\n flex-direction: column;\n padding-bottom: 20px;\n //overflow: auto;\n //scroll-behavior: unset;\n"])));
|
|
38332
38180
|
var MessageTopDate = styled.div(_templateObject4$u || (_templateObject4$u = _taggedTemplateLiteralLoose(["\n position: absolute;\n justify-content: center;\n width: 100%;\n top: ", ";\n left: 0;\n margin-top: ", ";\n margin-bottom: ", ";\n text-align: center;\n z-index: 10;\n background: transparent;\n opacity: ", ";\n transition: all 0.2s ease-in-out;\n width: calc(100% - 8px);\n\n span {\n display: inline-block;\n max-width: 380px;\n font-style: normal;\n font-weight: normal;\n font-size: ", ";\n color: ", ";\n background-color: ", ";\n border: ", ";\n box-sizing: border-box;\n border-radius: ", ";\n padding: 5px 16px;\n box-shadow:\n 0 0 2px rgba(0, 0, 0, 0.08),\n 0 2px 24px rgba(0, 0, 0, 0.08);\n text-overflow: ellipsis;\n overflow: hidden;\n }\n"])), function (props) {
|
|
38333
38181
|
return props.topOffset ? props.topOffset + 22 + "px" : '22px';
|
|
@@ -38360,7 +38208,7 @@ var IconWrapper$1 = styled.span(_templateObject6$m || (_templateObject6$m = _tag
|
|
|
38360
38208
|
}, function (props) {
|
|
38361
38209
|
return props.iconColor;
|
|
38362
38210
|
});
|
|
38363
|
-
var DropAttachmentArea = styled.div(_templateObject7$
|
|
38211
|
+
var DropAttachmentArea = styled.div(_templateObject7$l || (_templateObject7$l = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n height: 100%;\n border: 1px dashed ", ";\n border-radius: 16px;\n margin: ", ";\n font-weight: 400;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.2px;\n color: ", ";\n transition: all 0.1s;\n\n &.dragover {\n background-color: ", ";\n border: 1px dashed ", ";\n\n ", " {\n background-color: ", ";\n }\n }\n"])), function (props) {
|
|
38364
38212
|
return props.borderColor;
|
|
38365
38213
|
}, function (props) {
|
|
38366
38214
|
return props.margin || '12px 32px 32px';
|
|
@@ -38799,7 +38647,7 @@ function $isMentionNode(node) {
|
|
|
38799
38647
|
return node instanceof MentionNode;
|
|
38800
38648
|
}
|
|
38801
38649
|
|
|
38802
|
-
var _templateObject$
|
|
38650
|
+
var _templateObject$L, _templateObject2$G, _templateObject3$A, _templateObject4$v, _templateObject5$q;
|
|
38803
38651
|
var PUNCTUATION = '\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%\'"~=<>_:;';
|
|
38804
38652
|
var NAME = '\\b[A-Z][^\\s' + PUNCTUATION + ']';
|
|
38805
38653
|
var DocumentMentionsRegex = {
|
|
@@ -39079,8 +38927,8 @@ function MentionsPlugin(_ref3) {
|
|
|
39079
38927
|
}
|
|
39080
38928
|
});
|
|
39081
38929
|
}
|
|
39082
|
-
var MentionsContainerWrapper = styled.div(_templateObject$
|
|
39083
|
-
var MentionsList = styled.ul(_templateObject2$
|
|
38930
|
+
var MentionsContainerWrapper = styled.div(_templateObject$L || (_templateObject$L = _taggedTemplateLiteralLoose(["\n position: relative;\n animation: fadeIn 0.2s ease-in-out;\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n"])));
|
|
38931
|
+
var MentionsList = styled.ul(_templateObject2$G || (_templateObject2$G = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 100%;\n width: 300px;\n transition: all 0.2s;\n overflow: auto;\n max-height: 240px;\n z-index: 200;\n padding: 2px 0 0;\n background: ", ";\n border: ", ";\n box-sizing: border-box;\n box-shadow: ", ";\n border-radius: 6px;\n visibility: ", ";\n"])), function (props) {
|
|
39084
38932
|
return props.backgroundColor;
|
|
39085
38933
|
}, function (props) {
|
|
39086
38934
|
return props.withBorder && "1px solid " + props.borderColor;
|
|
@@ -39226,7 +39074,7 @@ function SvgUnderline(props) {
|
|
|
39226
39074
|
}))));
|
|
39227
39075
|
}
|
|
39228
39076
|
|
|
39229
|
-
var _templateObject$
|
|
39077
|
+
var _templateObject$M, _templateObject2$H;
|
|
39230
39078
|
function mergeRegister() {
|
|
39231
39079
|
for (var _len = arguments.length, func = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
39232
39080
|
func[_key] = arguments[_key];
|
|
@@ -39607,10 +39455,10 @@ function FloatingTextFormatToolbarPlugin(_ref3) {
|
|
|
39607
39455
|
editor = _useLexicalComposerCo[0];
|
|
39608
39456
|
return useFloatingTextFormatToolbar(editor, anchorElem);
|
|
39609
39457
|
}
|
|
39610
|
-
var FloatingTextFormatPopup = styled.div(_templateObject$
|
|
39458
|
+
var FloatingTextFormatPopup = styled.div(_templateObject$M || (_templateObject$M = _taggedTemplateLiteralLoose(["\n display: flex;\n background: ", ";\n vertical-align: middle;\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);\n border-radius: 8px;\n transition: opacity 0.5s;\n padding: 12px;\n will-change: transform;\n z-index: 99;\n\n & button.popup-item {\n border: 0;\n display: flex;\n background: none;\n border-radius: 10px;\n padding: 8px;\n cursor: pointer;\n vertical-align: middle;\n }\n & button.popup-item:disabled {\n cursor: not-allowed;\n }\n & button.popup-item.spaced {\n margin-right: 2px;\n }\n & button.popup-item i.format {\n background-size: contain;\n height: 18px;\n width: 18px;\n margin-top: 2px;\n vertical-align: -0.25em;\n display: flex;\n opacity: 0.6;\n }\n\n & button.popup-item:disabled i.format {\n opacity: 0.2;\n }\n & button.popup-item.active {\n background-color: rgba(223, 232, 250, 0.3);\n }\n & button.popup-item.active i {\n opacity: 1;\n }\n & .popup-item:hover:not([disabled]) {\n background-color: #eee;\n }\n & select.popup-item {\n border: 0;\n display: flex;\n background: none;\n border-radius: 10px;\n padding: 8px;\n vertical-align: middle;\n -webkit-appearance: none;\n -moz-appearance: none;\n width: 70px;\n font-size: 14px;\n color: #777;\n text-overflow: ellipsis;\n }\n & select.code-language {\n text-transform: capitalize;\n width: 130px;\n }\n\n & .popup-item .text {\n display: flex;\n line-height: 20px;\n vertical-align: middle;\n font-size: 14px;\n color: #777;\n text-overflow: ellipsis;\n width: 70px;\n overflow: hidden;\n height: 20px;\n text-align: left;\n }\n\n & .popup-item .icon {\n display: flex;\n width: 20px;\n height: 20px;\n user-select: none;\n margin-right: 8px;\n line-height: 16px;\n background-size: contain;\n }\n & i.chevron-down {\n margin-top: 3px;\n width: 16px;\n height: 16px;\n display: flex;\n user-select: none;\n }\n & i.chevron-down.inside {\n width: 16px;\n height: 16px;\n display: flex;\n margin-left: -25px;\n margin-top: 11px;\n margin-right: 10px;\n pointer-events: none;\n }\n & .divider {\n width: 1px;\n background-color: #eee;\n margin: 0 4px;\n }\n @media (max-width: 1024px) {\n & button.insert-comment {\n display: none;\n }\n }\n"])), function (props) {
|
|
39611
39459
|
return props.popupColor;
|
|
39612
39460
|
});
|
|
39613
|
-
var Action$1 = styled.button(_templateObject2$
|
|
39461
|
+
var Action$1 = styled.button(_templateObject2$H || (_templateObject2$H = _taggedTemplateLiteralLoose(["\n border: 0;\n display: flex;\n background-color: inherit;\n vertical-align: middle;\n position: relative;\n padding: 3px;\n margin-right: 10px;\n //margin: 8px 6px;\n cursor: pointer;\n transition: all 0.2s;\n color: ", ";\n border-radius: 50%;\n ", "\n\n &:last-child {\n margin-right: 0;\n }\n\n &:hover {\n color: ", ";\n background-color: ", ";\n\n ", " {\n display: block;\n }\n }\n"])), function (props) {
|
|
39614
39462
|
return props.iconColor;
|
|
39615
39463
|
}, function (props) {
|
|
39616
39464
|
return props.isActive && "\n color: " + props.hoverIconColor + ";\n background-color: " + props.hoverBackgroundColor + ";\n ";
|
|
@@ -39933,7 +39781,7 @@ function FormatMessagePlugin(_ref) {
|
|
|
39933
39781
|
return null;
|
|
39934
39782
|
}
|
|
39935
39783
|
|
|
39936
|
-
var _templateObject$
|
|
39784
|
+
var _templateObject$N, _templateObject2$I, _templateObject3$B, _templateObject4$w, _templateObject5$r, _templateObject6$n, _templateObject7$m, _templateObject8$k;
|
|
39937
39785
|
var EmojiIcon$1 = function EmojiIcon(_ref) {
|
|
39938
39786
|
var collectionName = _ref.collectionName;
|
|
39939
39787
|
switch (collectionName) {
|
|
@@ -40052,7 +39900,7 @@ function EmojisPopup$1(_ref2) {
|
|
|
40052
39900
|
}
|
|
40053
39901
|
}, 300);
|
|
40054
39902
|
}, []);
|
|
40055
|
-
return /*#__PURE__*/React__default.createElement(Container$
|
|
39903
|
+
return /*#__PURE__*/React__default.createElement(Container$k, {
|
|
40056
39904
|
backgroundColor: backgroundSections,
|
|
40057
39905
|
borderColor: border,
|
|
40058
39906
|
relativePosition: relativePosition,
|
|
@@ -40128,7 +39976,7 @@ function EmojisPopup$1(_ref2) {
|
|
|
40128
39976
|
}));
|
|
40129
39977
|
}))));
|
|
40130
39978
|
}
|
|
40131
|
-
var Container$
|
|
39979
|
+
var Container$k = styled.div(_templateObject$N || (_templateObject$N = _taggedTemplateLiteralLoose(["\n position: ", ";\n left: ", ";\n right: ", ";\n direction: ", ";\n bottom: ", ";\n width: 306px;\n border: ", ";\n box-sizing: border-box;\n box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);\n border-radius: ", ";\n background: ", ";\n z-index: 35;\n //transform: scaleY(0);\n height: 0;\n overflow: hidden;\n transform-origin: ", ";\n transition: all 0.2s ease-in-out;\n ", ";\n"])), function (props) {
|
|
40132
39980
|
return props.leftPosition ? 'fixed' : props.relativePosition ? 'relative' : 'absolute';
|
|
40133
39981
|
}, function (props) {
|
|
40134
39982
|
return props.rightSide ? "calc(" + props.leftPosition + " - 250px)" : props.leftPosition || (props.rtlDirection ? '' : props.rightSide ? '' : '5px');
|
|
@@ -40149,7 +39997,7 @@ var Container$j = styled.div(_templateObject$M || (_templateObject$M = _taggedTe
|
|
|
40149
39997
|
}, function (props) {
|
|
40150
39998
|
return props.rendered && "\n height: 225px;\n ";
|
|
40151
39999
|
});
|
|
40152
|
-
var EmojiHeader$1 = styled.div(_templateObject2$
|
|
40000
|
+
var EmojiHeader$1 = styled.div(_templateObject2$I || (_templateObject2$I = _taggedTemplateLiteralLoose(["\n align-items: flex-end;\n font-style: normal;\n font-weight: 500;\n font-size: 12px;\n line-height: 22px;\n text-transform: uppercase;\n color: ", ";\n display: flex;\n padding: ", ";\n"])), function (props) {
|
|
40153
40001
|
return props.color;
|
|
40154
40002
|
}, function (props) {
|
|
40155
40003
|
return props.padding || '6px 18px';
|
|
@@ -40160,7 +40008,7 @@ var EmojiCollection$1 = styled.span(_templateObject4$w || (_templateObject4$w =
|
|
|
40160
40008
|
});
|
|
40161
40009
|
var CollectionPointer$1 = styled.span(_templateObject5$r || (_templateObject5$r = _taggedTemplateLiteralLoose([""])));
|
|
40162
40010
|
var AllEmojis$1 = styled.ul(_templateObject6$n || (_templateObject6$n = _taggedTemplateLiteralLoose(["\n overflow: hidden;\n padding: 0 8px 8px;\n margin: 0;\n"])));
|
|
40163
|
-
var EmojiFooter$1 = styled.div(_templateObject7$
|
|
40011
|
+
var EmojiFooter$1 = styled.div(_templateObject7$m || (_templateObject7$m = _taggedTemplateLiteralLoose(["\n height: 42px;\n display: flex;\n justify-content: space-around;\n align-items: center;\n border-top: ", ";\n border-bottom: ", ";\n padding: 0 10px;\n & > span {\n width: 100%;\n text-align: center;\n }\n"])), function (props) {
|
|
40164
40012
|
return props.emojisCategoryIconsPosition !== 'top' && "1px solid " + props.borderColor;
|
|
40165
40013
|
}, function (props) {
|
|
40166
40014
|
return props.emojisCategoryIconsPosition === 'top' && "1px solid " + props.borderColor;
|
|
@@ -40366,7 +40214,7 @@ function SvgRecordButton(props) {
|
|
|
40366
40214
|
})));
|
|
40367
40215
|
}
|
|
40368
40216
|
|
|
40369
|
-
var _templateObject$
|
|
40217
|
+
var _templateObject$O, _templateObject2$J, _templateObject3$C, _templateObject4$x, _templateObject5$s, _templateObject6$o, _templateObject7$n;
|
|
40370
40218
|
var shouldDraw = false;
|
|
40371
40219
|
var DEFAULT_MAX_RECORDING_DURATION = 600;
|
|
40372
40220
|
var AudioRecord = function AudioRecord(_ref) {
|
|
@@ -40905,7 +40753,7 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
40905
40753
|
handleStopRecording();
|
|
40906
40754
|
setCurrentChannelId(channelId);
|
|
40907
40755
|
}, [channelId]);
|
|
40908
|
-
return /*#__PURE__*/React__default.createElement(Container$
|
|
40756
|
+
return /*#__PURE__*/React__default.createElement(Container$l, {
|
|
40909
40757
|
recording: showRecording || currentRecordedFile
|
|
40910
40758
|
}, (showRecording || currentRecordedFile) && (/*#__PURE__*/React__default.createElement(PlayPause$1, {
|
|
40911
40759
|
iconColor: iconPrimary,
|
|
@@ -40944,10 +40792,10 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
40944
40792
|
iconColor: accentColor
|
|
40945
40793
|
}, showRecording || currentRecordedFile ? /*#__PURE__*/React__default.createElement(SvgSend, null) : /*#__PURE__*/React__default.createElement(SvgRecordButton, null)));
|
|
40946
40794
|
};
|
|
40947
|
-
var Container$
|
|
40795
|
+
var Container$l = styled.div(_templateObject$O || (_templateObject$O = _taggedTemplateLiteralLoose(["\n width: 32px;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n ", ";\n transition: all 0.3s ease-in-out;\n"])), function (props) {
|
|
40948
40796
|
return props.recording && "width: 400px";
|
|
40949
40797
|
});
|
|
40950
|
-
var AudioWrapper = styled.div(_templateObject2$
|
|
40798
|
+
var AudioWrapper = styled.div(_templateObject2$J || (_templateObject2$J = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n align-items: center;\n height: 36px;\n width: ", ";\n overflow: hidden;\n margin: ", ";\n background-color: ", ";\n padding: ", ";\n border-radius: 20px;\n"])), function (props) {
|
|
40951
40799
|
return props.recording ? 'calc(100% - 84px)' : '0';
|
|
40952
40800
|
}, function (props) {
|
|
40953
40801
|
return props.recording ? '0 8px' : '0';
|
|
@@ -40984,14 +40832,14 @@ var Canvas = styled.canvas(_templateObject6$o || (_templateObject6$o = _taggedTe
|
|
|
40984
40832
|
var hide = _ref0.hide;
|
|
40985
40833
|
return hide && '-1';
|
|
40986
40834
|
});
|
|
40987
|
-
var Timer$2 = styled.div(_templateObject7$
|
|
40835
|
+
var Timer$2 = styled.div(_templateObject7$n || (_templateObject7$n = _taggedTemplateLiteralLoose(["\n width: 40px;\n font-weight: 400;\n font-size: 16px;\n line-height: 12px;\n color: ", ";\n margin-left: auto;\n"])), function (props) {
|
|
40988
40836
|
return props.color;
|
|
40989
40837
|
});
|
|
40990
40838
|
|
|
40991
|
-
var _templateObject$
|
|
40992
|
-
var wave = keyframes(_templateObject$
|
|
40993
|
-
var Wrapper = styled.div(_templateObject2$
|
|
40994
|
-
var Bar$
|
|
40839
|
+
var _templateObject$P, _templateObject2$K, _templateObject3$D;
|
|
40840
|
+
var wave = keyframes(_templateObject$P || (_templateObject$P = _taggedTemplateLiteralLoose(["\n 0%, 100% {\n transform: scaleY(0.5);\n opacity: 0.6;\n }\n 50% {\n transform: scaleY(1.2);\n opacity: 1;\n }\n"])));
|
|
40841
|
+
var Wrapper = styled.div(_templateObject2$K || (_templateObject2$K = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-end;\n height: 8px;\n gap: 1.5px;\n"])));
|
|
40842
|
+
var Bar$2 = styled.span(_templateObject3$D || (_templateObject3$D = _taggedTemplateLiteralLoose(["\n display: block;\n width: 3px;\n height: 8px;\n border-radius: 2px;\n background: ", ";\n animation: ", " 1s infinite;\n animation-delay: ", "s;\n"])), function (props) {
|
|
40995
40843
|
return props.borderColor;
|
|
40996
40844
|
}, wave, function (_ref) {
|
|
40997
40845
|
var delay = _ref.delay;
|
|
@@ -40999,19 +40847,19 @@ var Bar$1 = styled.span(_templateObject3$D || (_templateObject3$D = _taggedTempl
|
|
|
40999
40847
|
});
|
|
41000
40848
|
var RecordingAnimation = function RecordingAnimation(_ref2) {
|
|
41001
40849
|
var borderColor = _ref2.borderColor;
|
|
41002
|
-
return /*#__PURE__*/React__default.createElement(Wrapper, null, /*#__PURE__*/React__default.createElement(Bar$
|
|
40850
|
+
return /*#__PURE__*/React__default.createElement(Wrapper, null, /*#__PURE__*/React__default.createElement(Bar$2, {
|
|
41003
40851
|
delay: 0,
|
|
41004
40852
|
borderColor: borderColor
|
|
41005
|
-
}), /*#__PURE__*/React__default.createElement(Bar$
|
|
40853
|
+
}), /*#__PURE__*/React__default.createElement(Bar$2, {
|
|
41006
40854
|
delay: 0.15,
|
|
41007
40855
|
borderColor: borderColor
|
|
41008
|
-
}), /*#__PURE__*/React__default.createElement(Bar$
|
|
40856
|
+
}), /*#__PURE__*/React__default.createElement(Bar$2, {
|
|
41009
40857
|
delay: 0.3,
|
|
41010
40858
|
borderColor: borderColor
|
|
41011
|
-
}), /*#__PURE__*/React__default.createElement(Bar$
|
|
40859
|
+
}), /*#__PURE__*/React__default.createElement(Bar$2, {
|
|
41012
40860
|
delay: 0.45,
|
|
41013
40861
|
borderColor: borderColor
|
|
41014
|
-
}), /*#__PURE__*/React__default.createElement(Bar$
|
|
40862
|
+
}), /*#__PURE__*/React__default.createElement(Bar$2, {
|
|
41015
40863
|
delay: 0.6,
|
|
41016
40864
|
borderColor: borderColor
|
|
41017
40865
|
}));
|
|
@@ -41039,7 +40887,7 @@ function SvgDotsVertica(props) {
|
|
|
41039
40887
|
})));
|
|
41040
40888
|
}
|
|
41041
40889
|
|
|
41042
|
-
var _templateObject$
|
|
40890
|
+
var _templateObject$Q, _templateObject2$L, _templateObject3$E, _templateObject4$y, _templateObject5$t, _templateObject6$p, _templateObject7$o, _templateObject8$l, _templateObject9$i;
|
|
41043
40891
|
var CreatePollPopup = function CreatePollPopup(_ref) {
|
|
41044
40892
|
var togglePopup = _ref.togglePopup,
|
|
41045
40893
|
onCreate = _ref.onCreate;
|
|
@@ -41411,8 +41259,8 @@ var CreatePollPopup = function CreatePollPopup(_ref) {
|
|
|
41411
41259
|
buttonText: 'Discard'
|
|
41412
41260
|
})));
|
|
41413
41261
|
};
|
|
41414
|
-
var QuestionInputWrapper = styled.div(_templateObject$
|
|
41415
|
-
var CustomTextArea = styled.textarea(_templateObject2$
|
|
41262
|
+
var QuestionInputWrapper = styled.div(_templateObject$Q || (_templateObject$Q = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
|
|
41263
|
+
var CustomTextArea = styled.textarea(_templateObject2$L || (_templateObject2$L = _taggedTemplateLiteralLoose(["\n height: 40px;\n width: 100%;\n background: ", ";\n border: ", ";\n color: ", ";\n box-sizing: border-box;\n border-radius: 8px;\n padding: ", ";\n font-family: Inter, sans-serif;\n font-style: normal;\n font-weight: normal;\n font-size: 15px;\n line-height: 18px;\n opacity: 1;\n outline: none;\n resize: none;\n overflow: hidden;\n\n &:focus {\n border: 1px solid ", ";\n outline: ", ";\n }\n &:disabled {\n background-color: ", ";\n opacity: 1;\n color: #383b51;\n }\n &::placeholder {\n opacity: 1;\n color: ", ";\n }\n"])), function (props) {
|
|
41416
41264
|
return props.backgroundColor;
|
|
41417
41265
|
}, function (props) {
|
|
41418
41266
|
return props.error ? "1px solid " + props.errorColor : "1px solid " + props.borderColor;
|
|
@@ -41447,7 +41295,7 @@ var RemoveOptionIcon = styled(SvgClose)(_templateObject6$p || (_templateObject6$
|
|
|
41447
41295
|
}, function (props) {
|
|
41448
41296
|
return props.disabled ? 0.5 : 1;
|
|
41449
41297
|
});
|
|
41450
|
-
var AddOptionButton = styled.button(_templateObject7$
|
|
41298
|
+
var AddOptionButton = styled.button(_templateObject7$o || (_templateObject7$o = _taggedTemplateLiteralLoose(["\n margin: 16px 0 0 0;\n background: transparent;\n border: none;\n color: ", ";\n cursor: ", ";\n width: 100%;\n text-align: left;\n padding-left: 32px;\n opacity: ", ";\n"])), function (props) {
|
|
41451
41299
|
return props.disabled ? props.disabledColor : props.color;
|
|
41452
41300
|
}, function (props) {
|
|
41453
41301
|
return props.disabled ? 'not-allowed' : 'pointer';
|
|
@@ -41459,7 +41307,7 @@ var SettingItem = styled.div(_templateObject9$i || (_templateObject9$i = _tagged
|
|
|
41459
41307
|
return props.color;
|
|
41460
41308
|
});
|
|
41461
41309
|
|
|
41462
|
-
var _templateObject$
|
|
41310
|
+
var _templateObject$R, _templateObject2$M, _templateObject3$F, _templateObject4$z, _templateObject5$u, _templateObject6$q, _templateObject7$p, _templateObject8$m, _templateObject9$j, _templateObject0$h, _templateObject1$e, _templateObject10$8, _templateObject11$6, _templateObject12$5, _templateObject13$3, _templateObject14$2, _templateObject15$2, _templateObject16$2, _templateObject17$2, _templateObject18$2, _templateObject19$2, _templateObject20$2, _templateObject21$1, _templateObject22$1, _templateObject23$1, _templateObject24$1, _templateObject25$1, _templateObject26$1, _templateObject27$1, _templateObject28$1, _templateObject29$1, _templateObject30$1, _templateObject31$1, _templateObject32$1, _templateObject33$1, _templateObject34$1;
|
|
41463
41311
|
function AutoFocusPlugin(_ref) {
|
|
41464
41312
|
var messageForReply = _ref.messageForReply;
|
|
41465
41313
|
var _useLexicalComposerCo = useLexicalComposerContext(),
|
|
@@ -41954,7 +41802,6 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
41954
41802
|
var updatedAttachments = attachmentsUpdate.filter(function (item) {
|
|
41955
41803
|
return item.tid !== attachmentId;
|
|
41956
41804
|
});
|
|
41957
|
-
deleteVideoThumb(attachmentId);
|
|
41958
41805
|
setAttachments(updatedAttachments);
|
|
41959
41806
|
attachmentsUpdate = updatedAttachments;
|
|
41960
41807
|
} else {
|
|
@@ -42780,7 +42627,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
42780
42627
|
}, [selectedMessagesMap]);
|
|
42781
42628
|
return /*#__PURE__*/React__default.createElement(SendMessageWrapper, {
|
|
42782
42629
|
backgroundColor: backgroundColor || background
|
|
42783
|
-
}, /*#__PURE__*/React__default.createElement(Container$
|
|
42630
|
+
}, /*#__PURE__*/React__default.createElement(Container$m, {
|
|
42784
42631
|
margin: margin,
|
|
42785
42632
|
padding: padding,
|
|
42786
42633
|
border: border,
|
|
@@ -43093,10 +42940,10 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
43093
42940
|
maxRecordingDuration: audioRecordingMaxDuration
|
|
43094
42941
|
}))))))))));
|
|
43095
42942
|
};
|
|
43096
|
-
var SendMessageWrapper = styled.div(_templateObject$
|
|
42943
|
+
var SendMessageWrapper = styled.div(_templateObject$R || (_templateObject$R = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n position: relative;\n z-index: 100;\n"])), function (props) {
|
|
43097
42944
|
return props.backgroundColor;
|
|
43098
42945
|
});
|
|
43099
|
-
var Container$
|
|
42946
|
+
var Container$m = styled.div(_templateObject2$M || (_templateObject2$M = _taggedTemplateLiteralLoose(["\n margin: ", ";\n border: ", ";\n border-radius: ", ";\n position: relative;\n padding: ", ";\n z-index: 100;\n\n & span.rdw-suggestion-dropdown {\n position: absolute;\n bottom: 100%;\n height: 160px;\n min-width: 150px;\n display: flex;\n flex-direction: column;\n overflow: auto;\n padding: 6px 12px;\n border: 1px solid #ccc;\n background: #fff;\n z-index: 99;\n }\n\n & .text_formatting_toolbar {\n display: ", ";\n position: fixed;\n top: ", ";\n left: ", ";\n }\n\n & .rdw-suggestion-option-active {\n background-color: rgb(243, 245, 248);\n }\n\n & .custom_editor {\n cursor: text;\n\n & .rdw-mention-link {\n color: ", ";\n }\n }\n"])), function (props) {
|
|
43100
42947
|
return props.margin || '30px 0 16px';
|
|
43101
42948
|
}, function (props) {
|
|
43102
42949
|
return props.border || '';
|
|
@@ -43135,7 +42982,7 @@ var UploadErrorMessage = styled.p(_templateObject5$u || (_templateObject5$u = _t
|
|
|
43135
42982
|
var CloseEditMode = styled.span(_templateObject6$q || (_templateObject6$q = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 8px;\n right: 12px;\n width: 20px;\n height: 20px;\n text-align: center;\n line-height: 22px;\n cursor: pointer;\n\n & > svg {\n color: ", ";\n }\n"])), function (props) {
|
|
43136
42983
|
return props.color;
|
|
43137
42984
|
});
|
|
43138
|
-
var UserName$1 = styled.span(_templateObject7$
|
|
42985
|
+
var UserName$1 = styled.span(_templateObject7$p || (_templateObject7$p = _taggedTemplateLiteralLoose(["\n font-weight: 500;\n margin-left: 4px;\n"])));
|
|
43139
42986
|
var ReplyMessageBody$1 = styled.div(_templateObject8$m || (_templateObject8$m = _taggedTemplateLiteralLoose(["\n word-break: break-word;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n"])));
|
|
43140
42987
|
var EditReplyMessageHeader = styled.h4(_templateObject9$j || (_templateObject9$j = _taggedTemplateLiteralLoose(["\n display: flex;\n margin: 0 0 2px;\n font-weight: 400;\n font-size: 13px;\n line-height: 16px;\n color: ", ";\n\n > svg {\n margin-right: 4px;\n width: 16px;\n height: 16px;\n }\n"])), function (props) {
|
|
43141
42988
|
return props.color;
|
|
@@ -43480,7 +43327,7 @@ function SvgUnpin(props) {
|
|
|
43480
43327
|
})));
|
|
43481
43328
|
}
|
|
43482
43329
|
|
|
43483
|
-
var _templateObject$
|
|
43330
|
+
var _templateObject$S, _templateObject2$N, _templateObject3$G, _templateObject4$A, _templateObject5$v, _templateObject6$r, _templateObject7$q, _templateObject8$n, _templateObject9$k, _templateObject0$i, _templateObject1$f, _templateObject10$9, _templateObject11$7, _templateObject12$6, _templateObject13$4, _templateObject14$3, _templateObject15$3, _templateObject16$3;
|
|
43484
43331
|
var Actions = function Actions(_ref) {
|
|
43485
43332
|
var setActionsHeight = _ref.setActionsHeight,
|
|
43486
43333
|
channel = _ref.channel,
|
|
@@ -43690,7 +43537,7 @@ var Actions = function Actions(_ref) {
|
|
|
43690
43537
|
setActionsHeight && setActionsHeight(containerRef.current.offsetHeight);
|
|
43691
43538
|
}
|
|
43692
43539
|
}, [containerRef.current, showMuteUnmuteNotifications, showStarredMessages, showPinChannel, showMarkAsReadUnread, showLeaveChannel, showBlockAndLeaveChannel, showBlockUser, showReportChannel, showDeleteChannel, showClearHistory]);
|
|
43693
|
-
return /*#__PURE__*/React__default.createElement(Container$
|
|
43540
|
+
return /*#__PURE__*/React__default.createElement(Container$n, {
|
|
43694
43541
|
isDirect: isDirectChannel,
|
|
43695
43542
|
theme: theme,
|
|
43696
43543
|
borderColor: borderColor || surface1,
|
|
@@ -43944,17 +43791,17 @@ var Actions = function Actions(_ref) {
|
|
|
43944
43791
|
title: popupTitle
|
|
43945
43792
|
})));
|
|
43946
43793
|
};
|
|
43947
|
-
var Container$
|
|
43794
|
+
var Container$n = styled.div(_templateObject$S || (_templateObject$S = _taggedTemplateLiteralLoose(["\n padding: 10px 16px;\n border-bottom: 6px solid ", ";\n]"])), function (props) {
|
|
43948
43795
|
return props.borderColor;
|
|
43949
43796
|
});
|
|
43950
|
-
var ActionHeader = styled.div(_templateObject2$
|
|
43797
|
+
var ActionHeader = styled.div(_templateObject2$N || (_templateObject2$N = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 25px 0 22px;\n cursor: pointer;\n"])));
|
|
43951
43798
|
var MenuTriggerIcon = styled.span(_templateObject3$G || (_templateObject3$G = _taggedTemplateLiteralLoose(["\n transition: all 0.2s;\n ", "\n"])), function (props) {
|
|
43952
43799
|
return !props.isOpen && ' transform: rotate(-90deg);';
|
|
43953
43800
|
});
|
|
43954
43801
|
var ActionsMenu = styled.ul(_templateObject4$A || (_templateObject4$A = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n list-style: none;\n transition: all 0.2s;\n"])));
|
|
43955
43802
|
var DefaultMutedIcon = styled(SvgUnmuteNotifications)(_templateObject5$v || (_templateObject5$v = _taggedTemplateLiteralLoose([""])));
|
|
43956
43803
|
var DefaultMuteIcon = styled(SvgNotifications)(_templateObject6$r || (_templateObject6$r = _taggedTemplateLiteralLoose([""])));
|
|
43957
|
-
var DefaultStarIcon = styled(SvgStar)(_templateObject7$
|
|
43804
|
+
var DefaultStarIcon = styled(SvgStar)(_templateObject7$q || (_templateObject7$q = _taggedTemplateLiteralLoose([""])));
|
|
43958
43805
|
var DefaultUnpinIcon = styled(SvgUnpin)(_templateObject8$n || (_templateObject8$n = _taggedTemplateLiteralLoose([""])));
|
|
43959
43806
|
var DefaultPinIcon = styled(SvgPin)(_templateObject9$k || (_templateObject9$k = _taggedTemplateLiteralLoose([""])));
|
|
43960
43807
|
var DefaultMarkAsRead = styled(SvgMarkAsRead)(_templateObject0$i || (_templateObject0$i = _taggedTemplateLiteralLoose([""])));
|
|
@@ -44038,7 +43885,7 @@ function SvgMoreVert(props) {
|
|
|
44038
43885
|
})));
|
|
44039
43886
|
}
|
|
44040
43887
|
|
|
44041
|
-
var _templateObject$
|
|
43888
|
+
var _templateObject$T, _templateObject2$O, _templateObject3$H;
|
|
44042
43889
|
var ChangeMemberRole = function ChangeMemberRole(_ref) {
|
|
44043
43890
|
var theme = _ref.theme,
|
|
44044
43891
|
channelId = _ref.channelId,
|
|
@@ -44138,8 +43985,8 @@ var ChangeMemberRole = function ChangeMemberRole(_ref) {
|
|
|
44138
43985
|
onClick: handleSave
|
|
44139
43986
|
}, "Save"))));
|
|
44140
43987
|
};
|
|
44141
|
-
var RolesSelect = styled.div(_templateObject$
|
|
44142
|
-
var RoleLabel = styled.div(_templateObject2$
|
|
43988
|
+
var RolesSelect = styled.div(_templateObject$T || (_templateObject$T = _taggedTemplateLiteralLoose(["\n margin-bottom: 32px;\n"])));
|
|
43989
|
+
var RoleLabel = styled.div(_templateObject2$O || (_templateObject2$O = _taggedTemplateLiteralLoose(["\n font-style: normal;\n font-weight: 500;\n font-size: 14px;\n margin: 20px 0 8px;\n color: ", ";\n"])), function (_ref2) {
|
|
44143
43990
|
var color = _ref2.color;
|
|
44144
43991
|
return color;
|
|
44145
43992
|
});
|
|
@@ -44180,7 +44027,7 @@ function ResetLinkConfirmModal(_ref) {
|
|
|
44180
44027
|
});
|
|
44181
44028
|
}
|
|
44182
44029
|
|
|
44183
|
-
var _templateObject$
|
|
44030
|
+
var _templateObject$U, _templateObject2$P, _templateObject3$I, _templateObject4$B, _templateObject5$w, _templateObject6$s, _templateObject7$r, _templateObject8$o, _templateObject9$l, _templateObject0$j, _templateObject1$g, _templateObject10$a, _templateObject11$8, _templateObject12$7, _templateObject13$5;
|
|
44184
44031
|
function InviteLinkModal(_ref) {
|
|
44185
44032
|
var _getInviteLinkOptions, _tabs$link, _tabs$qr, _tabs$link2, _tabs$qr2;
|
|
44186
44033
|
var onClose = _ref.onClose,
|
|
@@ -44664,8 +44511,8 @@ function InviteLinkModal(_ref) {
|
|
|
44664
44511
|
handleForward: handleForwardChannels
|
|
44665
44512
|
})));
|
|
44666
44513
|
}
|
|
44667
|
-
var LogoIconCont = styled.div(_templateObject$
|
|
44668
|
-
var Tabs$1 = styled.div(_templateObject2$
|
|
44514
|
+
var LogoIconCont = styled.div(_templateObject$U || (_templateObject$U = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: calc(50% - 11%);\n left: calc(50% - 11%);\n width: 22%;\n height: 22%;\n img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n border-radius: 10px;\n }\n svg {\n width: 100%;\n height: 100%;\n object-fit: contain;\n border-radius: 10px;\n }\n"])));
|
|
44515
|
+
var Tabs$1 = styled.div(_templateObject2$P || (_templateObject2$P = _taggedTemplateLiteralLoose(["\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 8px;\n border-radius: 10px;\n background-color: ", ";\n padding: 2px;\n margin: 4px 0 16px;\n border: 1px solid ", ";\n"])), function (p) {
|
|
44669
44516
|
return p.backgroundColor;
|
|
44670
44517
|
}, function (p) {
|
|
44671
44518
|
return p.borderColor;
|
|
@@ -44688,7 +44535,7 @@ var LinkField = styled.div(_templateObject6$s || (_templateObject6$s = _taggedTe
|
|
|
44688
44535
|
}, function (p) {
|
|
44689
44536
|
return p.backgroundColor;
|
|
44690
44537
|
});
|
|
44691
|
-
var LinkInput = styled.input(_templateObject7$
|
|
44538
|
+
var LinkInput = styled.input(_templateObject7$r || (_templateObject7$r = _taggedTemplateLiteralLoose(["\n flex: 1;\n border: none;\n outline: none;\n height: 40px;\n background: transparent;\n color: ", ";\n font-size: 14px;\n"])), function (p) {
|
|
44692
44539
|
return p.color;
|
|
44693
44540
|
});
|
|
44694
44541
|
var CopyButton = styled.button(_templateObject8$o || (_templateObject8$o = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n border: none;\n background: transparent;\n cursor: pointer;\n"])));
|
|
@@ -44712,7 +44559,7 @@ var QrHint = styled.p(_templateObject13$5 || (_templateObject13$5 = _taggedTempl
|
|
|
44712
44559
|
return p.color;
|
|
44713
44560
|
});
|
|
44714
44561
|
|
|
44715
|
-
var _templateObject$
|
|
44562
|
+
var _templateObject$V, _templateObject2$Q, _templateObject3$J, _templateObject4$C, _templateObject5$x, _templateObject6$t, _templateObject7$s, _templateObject8$p, _templateObject9$m;
|
|
44716
44563
|
var Members = function Members(_ref) {
|
|
44717
44564
|
var _members$find;
|
|
44718
44565
|
var channel = _ref.channel,
|
|
@@ -44888,7 +44735,7 @@ var Members = function Members(_ref) {
|
|
|
44888
44735
|
var currentUserRole = (_members$find = members.find(function (member) {
|
|
44889
44736
|
return member.id === user.id;
|
|
44890
44737
|
})) === null || _members$find === void 0 ? void 0 : _members$find.role;
|
|
44891
|
-
return /*#__PURE__*/React__default.createElement(Container$
|
|
44738
|
+
return /*#__PURE__*/React__default.createElement(Container$o, {
|
|
44892
44739
|
theme: theme
|
|
44893
44740
|
}, /*#__PURE__*/React__default.createElement(ActionsMenu$1, null, /*#__PURE__*/React__default.createElement(MembersList, {
|
|
44894
44741
|
onScroll: handleMembersListScroll
|
|
@@ -45034,8 +44881,8 @@ var Members = function Members(_ref) {
|
|
|
45034
44881
|
channelId: channel.id
|
|
45035
44882
|
})));
|
|
45036
44883
|
};
|
|
45037
|
-
var Container$
|
|
45038
|
-
var ActionsMenu$1 = styled.div(_templateObject2$
|
|
44884
|
+
var Container$o = styled.div(_templateObject$V || (_templateObject$V = _taggedTemplateLiteralLoose([""])));
|
|
44885
|
+
var ActionsMenu$1 = styled.div(_templateObject2$Q || (_templateObject2$Q = _taggedTemplateLiteralLoose(["\n position: relative;\n transition: all 0.2s;\n"])));
|
|
45039
44886
|
var MemberNamePresence = styled.div(_templateObject3$J || (_templateObject3$J = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n max-width: calc(100% - 84px);\n\n & > ", " {\n display: block;\n }\n"])), SubTitle);
|
|
45040
44887
|
var MemberNameWrapper = styled.div(_templateObject4$C || (_templateObject4$C = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n"])));
|
|
45041
44888
|
var MemberName$3 = styled.h4(_templateObject5$x || (_templateObject5$x = _taggedTemplateLiteralLoose(["\n margin: 0;\n font-weight: 400;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n color: ", ";\n"])), function (props) {
|
|
@@ -45044,7 +44891,7 @@ var MemberName$3 = styled.h4(_templateObject5$x || (_templateObject5$x = _tagged
|
|
|
45044
44891
|
var EditMemberIcon = styled.span(_templateObject6$t || (_templateObject6$t = _taggedTemplateLiteralLoose(["\n margin-left: auto;\n cursor: pointer;\n padding: 15px;\n opacity: 0;\n visibility: hidden;\n transition: all 0.2s;\n\n & svg {\n color: ", ";\n }\n"])), function (props) {
|
|
45045
44892
|
return props.color;
|
|
45046
44893
|
});
|
|
45047
|
-
var MembersList = styled.ul(_templateObject7$
|
|
44894
|
+
var MembersList = styled.ul(_templateObject7$s || (_templateObject7$s = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n list-style: none;\n transition: all 0.2s;\n"])));
|
|
45048
44895
|
var MemberItem$1 = styled.li(_templateObject8$p || (_templateObject8$p = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-size: ", ";\n font-weight: 500;\n padding: 6px 16px;\n transition: all 0.2s;\n color: ", ";\n cursor: pointer;\n\n & > svg {\n rect {\n fill: transparent;\n }\n }\n\n &:first-child {\n cursor: pointer;\n\n > svg {\n color: ", ";\n margin-right: 12px;\n & > rect {\n fill: ", " !important;\n }\n }\n }\n\n &:hover {\n background-color: ", ";\n }\n\n &:hover ", " {\n opacity: 1;\n visibility: visible;\n }\n\n & .dropdown-wrapper {\n margin-left: auto;\n }\n\n & ", " {\n width: 12px;\n height: 12px;\n right: -1px;\n bottom: -1px;\n }\n"])), function (props) {
|
|
45049
44896
|
return props.fontSize || '15px';
|
|
45050
44897
|
}, function (props) {
|
|
@@ -45062,7 +44909,40 @@ var RoleBadge = styled.span(_templateObject9$m || (_templateObject9$m = _taggedT
|
|
|
45062
44909
|
return props.backgroundColor;
|
|
45063
44910
|
});
|
|
45064
44911
|
|
|
45065
|
-
var _templateObject$
|
|
44912
|
+
var _templateObject$W;
|
|
44913
|
+
var MonthHeader = function MonthHeader(_ref) {
|
|
44914
|
+
var currentCreatedAt = _ref.currentCreatedAt,
|
|
44915
|
+
previousCreatedAt = _ref.previousCreatedAt,
|
|
44916
|
+
isFirst = _ref.isFirst,
|
|
44917
|
+
padding = _ref.padding,
|
|
44918
|
+
fullWidth = _ref.fullWidth;
|
|
44919
|
+
var _useColor = useColors(),
|
|
44920
|
+
textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY];
|
|
44921
|
+
var monthComponent = useMemo(function () {
|
|
44922
|
+
var shouldShowHeader = isFirst || previousCreatedAt && new Date(currentCreatedAt).getMonth() !== new Date(previousCreatedAt).getMonth();
|
|
44923
|
+
if (!shouldShowHeader) {
|
|
44924
|
+
return null;
|
|
44925
|
+
}
|
|
44926
|
+
return /*#__PURE__*/React__default.createElement(MonthHeaderContainer, {
|
|
44927
|
+
color: textSecondary,
|
|
44928
|
+
padding: padding,
|
|
44929
|
+
fullWidth: fullWidth
|
|
44930
|
+
}, new Date(currentCreatedAt).toLocaleDateString('en-US', {
|
|
44931
|
+
month: 'long',
|
|
44932
|
+
year: 'numeric'
|
|
44933
|
+
}));
|
|
44934
|
+
}, [currentCreatedAt, previousCreatedAt, isFirst, textSecondary, padding, fullWidth]);
|
|
44935
|
+
return monthComponent;
|
|
44936
|
+
};
|
|
44937
|
+
var MonthHeaderContainer = styled.div(_templateObject$W || (_templateObject$W = _taggedTemplateLiteralLoose(["\n padding: ", ";\n width: ", ";\n font-style: normal;\n font-weight: 500;\n font-size: 13px;\n line-height: 16px;\n color: ", ";\n text-transform: uppercase;\n"])), function (props) {
|
|
44938
|
+
return props.padding || '9px 12px';
|
|
44939
|
+
}, function (props) {
|
|
44940
|
+
return props.fullWidth ? '100%' : 'auto';
|
|
44941
|
+
}, function (props) {
|
|
44942
|
+
return props.color;
|
|
44943
|
+
});
|
|
44944
|
+
|
|
44945
|
+
var _templateObject$X, _templateObject2$R;
|
|
45066
44946
|
var Media = function Media(_ref) {
|
|
45067
44947
|
var channel = _ref.channel;
|
|
45068
44948
|
var _useColor = useColors(),
|
|
@@ -45079,10 +44959,16 @@ var Media = function Media(_ref) {
|
|
|
45079
44959
|
dispatch(setAttachmentsAC([]));
|
|
45080
44960
|
dispatch(getAttachmentsAC(channel.id, channelDetailsTabs.media));
|
|
45081
44961
|
}, [channel.id]);
|
|
45082
|
-
return /*#__PURE__*/React__default.createElement(Container$
|
|
45083
|
-
return /*#__PURE__*/React__default.createElement(
|
|
44962
|
+
return /*#__PURE__*/React__default.createElement(Container$p, null, attachments.map(function (file, index) {
|
|
44963
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
45084
44964
|
key: file.id
|
|
45085
|
-
},
|
|
44965
|
+
}, /*#__PURE__*/React__default.createElement(MonthHeader, {
|
|
44966
|
+
currentCreatedAt: file.createdAt,
|
|
44967
|
+
previousCreatedAt: index > 0 ? attachments[index - 1].createdAt : undefined,
|
|
44968
|
+
isFirst: index === 0,
|
|
44969
|
+
padding: '9px 6px',
|
|
44970
|
+
fullWidth: true
|
|
44971
|
+
}), /*#__PURE__*/React__default.createElement(MediaItem, null, file.type === 'image' ? (/*#__PURE__*/React__default.createElement(Attachment$1, {
|
|
45086
44972
|
attachment: _extends({}, file, {
|
|
45087
44973
|
metadata: isJSON(file.metadata) ? JSON.parse(file.metadata) : file.metadata
|
|
45088
44974
|
}),
|
|
@@ -45100,7 +44986,7 @@ var Media = function Media(_ref) {
|
|
|
45100
44986
|
backgroundColor: background,
|
|
45101
44987
|
borderRadius: '8px',
|
|
45102
44988
|
isDetailsView: true
|
|
45103
|
-
})));
|
|
44989
|
+
}))));
|
|
45104
44990
|
}), mediaFile && (/*#__PURE__*/React__default.createElement(SliderPopup, {
|
|
45105
44991
|
channel: channel,
|
|
45106
44992
|
setIsSliderOpen: setMediaFile,
|
|
@@ -45108,8 +44994,8 @@ var Media = function Media(_ref) {
|
|
|
45108
44994
|
currentMediaFile: mediaFile
|
|
45109
44995
|
})));
|
|
45110
44996
|
};
|
|
45111
|
-
var Container$
|
|
45112
|
-
var MediaItem = styled.div(_templateObject2$
|
|
44997
|
+
var Container$p = styled.div(_templateObject$X || (_templateObject$X = _taggedTemplateLiteralLoose(["\n padding: 6px 4px;\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n transition: all 0.2s;\n align-items: flex-start;\n display: flex;\n flex-wrap: wrap;\n"])));
|
|
44998
|
+
var MediaItem = styled.div(_templateObject2$R || (_templateObject2$R = _taggedTemplateLiteralLoose(["\n width: calc(33.3333% - 4px);\n aspect-ratio: 1/1;\n box-sizing: border-box;\n //border: 1px solid #ccc;\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n overflow: hidden;\n margin: 2px;\n"])));
|
|
45113
44999
|
|
|
45114
45000
|
var _rect$3, _path$1u;
|
|
45115
45001
|
function _extends$1y() {
|
|
@@ -45121,13 +45007,12 @@ function _extends$1y() {
|
|
|
45121
45007
|
return n;
|
|
45122
45008
|
}, _extends$1y.apply(null, arguments);
|
|
45123
45009
|
}
|
|
45124
|
-
function
|
|
45010
|
+
function SvgDocumentIcon(props) {
|
|
45125
45011
|
return /*#__PURE__*/createElement$1("svg", _extends$1y({
|
|
45126
45012
|
width: 40,
|
|
45127
45013
|
height: 40,
|
|
45128
45014
|
fill: "none",
|
|
45129
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
45130
|
-
color: "#5159f6"
|
|
45015
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
45131
45016
|
}, props), _rect$3 || (_rect$3 = /*#__PURE__*/createElement$1("rect", {
|
|
45132
45017
|
width: 40,
|
|
45133
45018
|
height: 40,
|
|
@@ -45137,7 +45022,7 @@ function SvgFileIcon$1(props) {
|
|
|
45137
45022
|
})), _path$1u || (_path$1u = /*#__PURE__*/createElement$1("path", {
|
|
45138
45023
|
fillRule: "evenodd",
|
|
45139
45024
|
clipRule: "evenodd",
|
|
45140
|
-
d: "
|
|
45025
|
+
d: "M17.593 9.5c-2.098 0-3.023.185-3.962.687a4.685 4.685 0 00-1.944 1.944c-.502.939-.687 1.864-.687 3.962v7.386c0 2.098.185 3.023.687 3.962a4.685 4.685 0 001.944 1.944c.939.502 1.864.686 3.962.686h3.957c2.098 0 3.023-.184 3.962-.687a4.685 4.685 0 001.944-1.944c.502-.938.687-1.863.687-3.961v-5.1c0-.683-.024-.99-.105-1.34a3.094 3.094 0 00-.399-.964c-.19-.305-.39-.54-.874-1.022l-4.175-4.175c-.483-.483-.717-.684-1.022-.874a3.096 3.096 0 00-.963-.4c-.294-.067-.556-.095-1.034-.102V9.5h-1.978zm0 1.714c-2.002 0-2.587.182-3.154.485a2.971 2.971 0 00-1.24 1.24c-.303.567-.485 1.152-.485 3.154v7.386c0 2.001.182 2.587.485 3.153a2.97 2.97 0 001.24 1.24c.567.304 1.152.485 3.154.485h3.957c2.001 0 2.587-.181 3.153-.484a2.97 2.97 0 001.241-1.241c.303-.566.485-1.152.485-3.153v-5.1c0-.118-.001-.22-.003-.308h-4.712a2.143 2.143 0 01-2.143-2.142l.002-4.713-.15-.001h-1.83zm3.785.876l-.092-.091v3.93c0 .21.151.385.351.421l.077.007 3.932.002-.093-.094-4.175-4.175zm-6.092 12.839c0-.474.383-.858.857-.858h3.428a.857.857 0 010 1.715h-3.428a.857.857 0 01-.857-.857zm.857-4.286a.857.857 0 100 1.714h6a.857.857 0 000-1.714h-6z",
|
|
45141
45026
|
fill: "currentColor"
|
|
45142
45027
|
})));
|
|
45143
45028
|
}
|
|
@@ -45165,7 +45050,7 @@ function SvgDownloadFile(props) {
|
|
|
45165
45050
|
})));
|
|
45166
45051
|
}
|
|
45167
45052
|
|
|
45168
|
-
var _templateObject$
|
|
45053
|
+
var _templateObject$Y, _templateObject2$S, _templateObject3$K, _templateObject4$D, _templateObject5$y, _templateObject6$u, _templateObject7$t, _templateObject8$q;
|
|
45169
45054
|
var Files = function Files(_ref) {
|
|
45170
45055
|
var channelId = _ref.channelId,
|
|
45171
45056
|
filePreviewIcon = _ref.filePreviewIcon,
|
|
@@ -45220,20 +45105,26 @@ var Files = function Files(_ref) {
|
|
|
45220
45105
|
useEffect(function () {
|
|
45221
45106
|
dispatch(getAttachmentsAC(channelId, channelDetailsTabs.file));
|
|
45222
45107
|
}, [channelId]);
|
|
45223
|
-
return /*#__PURE__*/React__default.createElement(Container$
|
|
45108
|
+
return /*#__PURE__*/React__default.createElement(Container$q, null, attachments.map(function (file, index) {
|
|
45224
45109
|
var metas = file.metadata && isJSON(file.metadata) ? JSON.parse(file.metadata) : file.metadata;
|
|
45225
45110
|
var withPrefix = true;
|
|
45226
45111
|
var attachmentThumb = '';
|
|
45227
45112
|
if (metas && metas.tmb) {
|
|
45228
45113
|
if (metas.tmb.length < 70) {
|
|
45229
|
-
attachmentThumb =
|
|
45114
|
+
attachmentThumb = base64ToDataURL(metas.tmb);
|
|
45230
45115
|
withPrefix = false;
|
|
45231
45116
|
} else {
|
|
45232
45117
|
attachmentThumb = metas.tmb;
|
|
45233
45118
|
}
|
|
45234
45119
|
}
|
|
45235
|
-
return /*#__PURE__*/React__default.createElement(
|
|
45236
|
-
key: file.id
|
|
45120
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
45121
|
+
key: file.id
|
|
45122
|
+
}, /*#__PURE__*/React__default.createElement(MonthHeader, {
|
|
45123
|
+
currentCreatedAt: file.createdAt,
|
|
45124
|
+
previousCreatedAt: index > 0 ? attachments[index - 1].createdAt : undefined,
|
|
45125
|
+
isFirst: index === 0,
|
|
45126
|
+
padding: '14px 14px 0'
|
|
45127
|
+
}), /*#__PURE__*/React__default.createElement(FileItem, {
|
|
45237
45128
|
hoverBackgroundColor: filePreviewHoverBackgroundColor || backgroundHovered
|
|
45238
45129
|
}, metas && metas.tmb ? (/*#__PURE__*/React__default.createElement(FileThumb, {
|
|
45239
45130
|
draggable: false,
|
|
@@ -45241,10 +45132,10 @@ var Files = function Files(_ref) {
|
|
|
45241
45132
|
})) : (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(FileIconCont, {
|
|
45242
45133
|
iconColor: accentColor,
|
|
45243
45134
|
fillColor: surface1
|
|
45244
|
-
}, filePreviewIcon || /*#__PURE__*/React__default.createElement(
|
|
45135
|
+
}, filePreviewIcon || /*#__PURE__*/React__default.createElement(SvgDocumentIcon, null)), /*#__PURE__*/React__default.createElement(FileHoverIconCont, {
|
|
45245
45136
|
iconColor: accentColor,
|
|
45246
45137
|
fillColor: surface1
|
|
45247
|
-
}, filePreviewHoverIcon || /*#__PURE__*/React__default.createElement(
|
|
45138
|
+
}, filePreviewHoverIcon || /*#__PURE__*/React__default.createElement(SvgDocumentIcon, null)))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(AttachmentPreviewTitle, {
|
|
45248
45139
|
fontSize: fileNameFontSize,
|
|
45249
45140
|
lineHeight: fileNameLineHeight,
|
|
45250
45141
|
color: filePreviewTitleColor || textPrimary
|
|
@@ -45278,11 +45169,11 @@ var Files = function Files(_ref) {
|
|
|
45278
45169
|
transformOrigin: 'center center'
|
|
45279
45170
|
}
|
|
45280
45171
|
}
|
|
45281
|
-
}))) : filePreviewDownloadIcon || /*#__PURE__*/React__default.createElement(SvgDownloadFile, null)));
|
|
45172
|
+
}))) : filePreviewDownloadIcon || /*#__PURE__*/React__default.createElement(SvgDownloadFile, null))));
|
|
45282
45173
|
}));
|
|
45283
45174
|
};
|
|
45284
|
-
var Container$
|
|
45285
|
-
var DownloadWrapper = styled.a(_templateObject2$
|
|
45175
|
+
var Container$q = styled.ul(_templateObject$Y || (_templateObject$Y = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n transition: all 0.2s;\n"])));
|
|
45176
|
+
var DownloadWrapper = styled.a(_templateObject2$S || (_templateObject2$S = _taggedTemplateLiteralLoose(["\n text-decoration: none;\n visibility: ", ";\n padding: 5px 6px;\n position: absolute;\n top: 25%;\n right: 16px;\n cursor: pointer;\n & > svg {\n & path {\n fill: ", ";\n }\n color: ", ";\n }\n"])), function (props) {
|
|
45286
45177
|
return props.visible ? 'visible' : 'hidden';
|
|
45287
45178
|
}, function (props) {
|
|
45288
45179
|
return props.iconColor;
|
|
@@ -45290,18 +45181,18 @@ var DownloadWrapper = styled.a(_templateObject2$R || (_templateObject2$R = _tagg
|
|
|
45290
45181
|
return props.iconColor;
|
|
45291
45182
|
});
|
|
45292
45183
|
var ProgressWrapper$2 = styled.span(_templateObject3$K || (_templateObject3$K = _taggedTemplateLiteralLoose(["\n display: inline-block;\n width: 20px;\n height: 20px;\n animation: preloader 1.5s linear infinite;\n\n @keyframes preloader {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])));
|
|
45293
|
-
var FileIconCont = styled.span(_templateObject4$D || (_templateObject4$D = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n
|
|
45184
|
+
var FileIconCont = styled.span(_templateObject4$D || (_templateObject4$D = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n & > svg {\n width: 40px;\n height: 40px;\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
|
|
45294
45185
|
return props.iconColor;
|
|
45295
45186
|
}, function (props) {
|
|
45296
45187
|
return props.fillColor;
|
|
45297
45188
|
});
|
|
45298
|
-
var FileHoverIconCont = styled.span(_templateObject5$y || (_templateObject5$y = _taggedTemplateLiteralLoose(["\n display: none;\n & > svg {\n
|
|
45189
|
+
var FileHoverIconCont = styled.span(_templateObject5$y || (_templateObject5$y = _taggedTemplateLiteralLoose(["\n display: none;\n & > svg {\n width: 40px;\n height: 40px;\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
|
|
45299
45190
|
return props.iconColor;
|
|
45300
45191
|
}, function (props) {
|
|
45301
45192
|
return props.fillColor;
|
|
45302
45193
|
});
|
|
45303
45194
|
var FileThumb = styled.img(_templateObject6$u || (_templateObject6$u = _taggedTemplateLiteralLoose(["\n width: 40px;\n height: 40px;\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n object-fit: cover;\n"])));
|
|
45304
|
-
var FileItem = styled.div(_templateObject7$
|
|
45195
|
+
var FileItem = styled.div(_templateObject7$t || (_templateObject7$t = _taggedTemplateLiteralLoose(["\n position: relative;\n padding: 11px 16px;\n display: flex;\n align-items: center;\n font-size: 15px;\n transition: all 0.2s;\n div {\n margin-left: 7px;\n width: calc(100% - 48px);\n }\n &:hover {\n background-color: ", ";\n ", " {\n visibility: visible;\n }\n & ", " {\n display: none;\n }\n & ", " {\n display: inline-flex;\n }\n }\n /*&.isHover {\n\n }*/\n"])), function (props) {
|
|
45305
45196
|
return props.hoverBackgroundColor;
|
|
45306
45197
|
}, DownloadWrapper, FileIconCont, FileHoverIconCont);
|
|
45307
45198
|
var FileSizeAndDate = styled.span(_templateObject8$q || (_templateObject8$q = _taggedTemplateLiteralLoose(["\n display: block;\n font-style: normal;\n font-weight: normal;\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n margin-top: 2px;\n"])), function (props) {
|
|
@@ -45343,7 +45234,7 @@ function SvgLinkIcon(props) {
|
|
|
45343
45234
|
})));
|
|
45344
45235
|
}
|
|
45345
45236
|
|
|
45346
|
-
var _templateObject$
|
|
45237
|
+
var _templateObject$Z, _templateObject2$T, _templateObject3$L, _templateObject4$E, _templateObject5$z;
|
|
45347
45238
|
var LinkItem = function LinkItem(_ref) {
|
|
45348
45239
|
var link = _ref.link,
|
|
45349
45240
|
linkPreviewIcon = _ref.linkPreviewIcon,
|
|
@@ -45374,12 +45265,12 @@ var LinkItem = function LinkItem(_ref) {
|
|
|
45374
45265
|
color: linkPreviewColor || textPrimary
|
|
45375
45266
|
}, link))));
|
|
45376
45267
|
};
|
|
45377
|
-
var LinkIconCont = styled.span(_templateObject$
|
|
45268
|
+
var LinkIconCont = styled.span(_templateObject$Z || (_templateObject$Z = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n > svg {\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
|
|
45378
45269
|
return props.iconColor;
|
|
45379
45270
|
}, function (props) {
|
|
45380
45271
|
return props.fillColor;
|
|
45381
45272
|
});
|
|
45382
|
-
var LinkHoverIconCont = styled.span(_templateObject2$
|
|
45273
|
+
var LinkHoverIconCont = styled.span(_templateObject2$T || (_templateObject2$T = _taggedTemplateLiteralLoose(["\n display: none;\n > svg {\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
|
|
45383
45274
|
return props.iconColor;
|
|
45384
45275
|
}, function (props) {
|
|
45385
45276
|
return props.fillColor;
|
|
@@ -45392,7 +45283,7 @@ var LinkUrl = styled.span(_templateObject5$z || (_templateObject5$z = _taggedTem
|
|
|
45392
45283
|
return props.color;
|
|
45393
45284
|
});
|
|
45394
45285
|
|
|
45395
|
-
var _templateObject$
|
|
45286
|
+
var _templateObject$_;
|
|
45396
45287
|
var Links = function Links(_ref) {
|
|
45397
45288
|
var channelId = _ref.channelId,
|
|
45398
45289
|
linkPreviewIcon = _ref.linkPreviewIcon,
|
|
@@ -45405,19 +45296,25 @@ var Links = function Links(_ref) {
|
|
|
45405
45296
|
useEffect(function () {
|
|
45406
45297
|
dispatch(getAttachmentsAC(channelId, channelDetailsTabs.link));
|
|
45407
45298
|
}, [channelId]);
|
|
45408
|
-
return /*#__PURE__*/React__default.createElement(Container$
|
|
45409
|
-
return /*#__PURE__*/React__default.createElement(
|
|
45410
|
-
key: file.id
|
|
45299
|
+
return /*#__PURE__*/React__default.createElement(Container$r, null, attachments.map(function (file, index) {
|
|
45300
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
45301
|
+
key: file.id
|
|
45302
|
+
}, /*#__PURE__*/React__default.createElement(MonthHeader, {
|
|
45303
|
+
currentCreatedAt: file.createdAt,
|
|
45304
|
+
previousCreatedAt: index > 0 ? attachments[index - 1].createdAt : undefined,
|
|
45305
|
+
isFirst: index === 0,
|
|
45306
|
+
padding: '6px 14px 0'
|
|
45307
|
+
}), /*#__PURE__*/React__default.createElement(LinkItem, {
|
|
45411
45308
|
link: file.url,
|
|
45412
45309
|
linkPreviewColor: linkPreviewColor,
|
|
45413
45310
|
linkPreviewHoverBackgroundColor: linkPreviewHoverBackgroundColor,
|
|
45414
45311
|
linkPreviewHoverIcon: linkPreviewHoverIcon,
|
|
45415
45312
|
linkPreviewTitleColor: linkPreviewTitleColor,
|
|
45416
45313
|
linkPreviewIcon: linkPreviewIcon
|
|
45417
|
-
});
|
|
45314
|
+
}));
|
|
45418
45315
|
}));
|
|
45419
45316
|
};
|
|
45420
|
-
var Container$
|
|
45317
|
+
var Container$r = styled.ul(_templateObject$_ || (_templateObject$_ = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 11px 0 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n transition: all 0.2s;\n"])));
|
|
45421
45318
|
|
|
45422
45319
|
var _rect$5, _path$1x;
|
|
45423
45320
|
function _extends$1B() {
|
|
@@ -45473,7 +45370,7 @@ function SvgVoicePreviewPause(props) {
|
|
|
45473
45370
|
})));
|
|
45474
45371
|
}
|
|
45475
45372
|
|
|
45476
|
-
var _templateObject
|
|
45373
|
+
var _templateObject$$, _templateObject2$U, _templateObject3$M, _templateObject4$F, _templateObject5$A, _templateObject6$v, _templateObject7$u, _templateObject8$r;
|
|
45477
45374
|
var VoiceItem = function VoiceItem(_ref) {
|
|
45478
45375
|
var file = _ref.file,
|
|
45479
45376
|
voicePreviewPlayIcon = _ref.voicePreviewPlayIcon,
|
|
@@ -45598,12 +45495,12 @@ var VoiceItem = function VoiceItem(_ref) {
|
|
|
45598
45495
|
type: 'audio/mpeg'
|
|
45599
45496
|
})));
|
|
45600
45497
|
};
|
|
45601
|
-
var FileIconCont$1 = styled.span(_templateObject
|
|
45498
|
+
var FileIconCont$1 = styled.span(_templateObject$$ || (_templateObject$$ = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: inline-flex;\n fill: ", ";\n rect {\n fill: ", ";\n }\n"])), function (props) {
|
|
45602
45499
|
return props.fill || 'transparent';
|
|
45603
45500
|
}, function (props) {
|
|
45604
45501
|
return props.fill || 'transparent';
|
|
45605
45502
|
});
|
|
45606
|
-
var FileHoverIconCont$1 = styled.span(_templateObject2$
|
|
45503
|
+
var FileHoverIconCont$1 = styled.span(_templateObject2$U || (_templateObject2$U = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: none;\n fill: ", ";\n rect {\n fill: ", ";\n }\n"])), function (props) {
|
|
45607
45504
|
return props.fill || 'transparent';
|
|
45608
45505
|
}, function (props) {
|
|
45609
45506
|
return props.fill || 'transparent';
|
|
@@ -45618,12 +45515,12 @@ var AudioTitle = styled.span(_templateObject5$A || (_templateObject5$A = _tagged
|
|
|
45618
45515
|
var AudioDate = styled.span(_templateObject6$v || (_templateObject6$v = _taggedTemplateLiteralLoose(["\n display: block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n max-width: calc(100% - 72px);\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 16px;\n color: ", ";\n"])), function (props) {
|
|
45619
45516
|
return props.color;
|
|
45620
45517
|
});
|
|
45621
|
-
var AudioSendTime = styled.span(_templateObject7$
|
|
45518
|
+
var AudioSendTime = styled.span(_templateObject7$u || (_templateObject7$u = _taggedTemplateLiteralLoose(["\n position: absolute;\n right: 0;\n top: 11px;\n color: ", ";\n font-size: 12px;\n line-height: 16px;\n"])), function (props) {
|
|
45622
45519
|
return props.color;
|
|
45623
45520
|
});
|
|
45624
45521
|
var Audio = styled.audio(_templateObject8$r || (_templateObject8$r = _taggedTemplateLiteralLoose(["\n display: none;\n"])));
|
|
45625
45522
|
|
|
45626
|
-
var _templateObject$
|
|
45523
|
+
var _templateObject$10;
|
|
45627
45524
|
var Voices = function Voices(_ref) {
|
|
45628
45525
|
var channelId = _ref.channelId,
|
|
45629
45526
|
voicePreviewPlayIcon = _ref.voicePreviewPlayIcon,
|
|
@@ -45638,9 +45535,15 @@ var Voices = function Voices(_ref) {
|
|
|
45638
45535
|
useEffect(function () {
|
|
45639
45536
|
dispatch(getAttachmentsAC(channelId, channelDetailsTabs.voice));
|
|
45640
45537
|
}, [channelId]);
|
|
45641
|
-
return /*#__PURE__*/React__default.createElement(Container$
|
|
45642
|
-
return /*#__PURE__*/React__default.createElement(
|
|
45643
|
-
key: file.id
|
|
45538
|
+
return /*#__PURE__*/React__default.createElement(Container$s, null, attachments.map(function (file, index) {
|
|
45539
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
45540
|
+
key: file.id
|
|
45541
|
+
}, /*#__PURE__*/React__default.createElement(MonthHeader, {
|
|
45542
|
+
currentCreatedAt: file.createdAt,
|
|
45543
|
+
previousCreatedAt: index > 0 ? attachments[index - 1].createdAt : undefined,
|
|
45544
|
+
isFirst: index === 0,
|
|
45545
|
+
padding: '7px 14px 2px'
|
|
45546
|
+
}), /*#__PURE__*/React__default.createElement(VoiceItem, {
|
|
45644
45547
|
file: _extends({}, file, {
|
|
45645
45548
|
metadata: isJSON(file.metadata) ? JSON.parse(file.metadata) : file.metadata
|
|
45646
45549
|
}),
|
|
@@ -45651,12 +45554,12 @@ var Voices = function Voices(_ref) {
|
|
|
45651
45554
|
voicePreviewPauseIcon: voicePreviewPauseIcon,
|
|
45652
45555
|
voicePreviewPauseHoverIcon: voicePreviewPauseHoverIcon,
|
|
45653
45556
|
voicePreviewTitleColor: voicePreviewTitleColor
|
|
45654
|
-
});
|
|
45557
|
+
}));
|
|
45655
45558
|
}));
|
|
45656
45559
|
};
|
|
45657
|
-
var Container$
|
|
45560
|
+
var Container$s = styled.ul(_templateObject$10 || (_templateObject$10 = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 11px 0 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n transition: all 0.2s;\n"])));
|
|
45658
45561
|
|
|
45659
|
-
var _templateObject
|
|
45562
|
+
var _templateObject$11, _templateObject2$V;
|
|
45660
45563
|
var DetailsTab = function DetailsTab(_ref) {
|
|
45661
45564
|
var channel = _ref.channel,
|
|
45662
45565
|
theme = _ref.theme,
|
|
@@ -45725,7 +45628,7 @@ var DetailsTab = function DetailsTab(_ref) {
|
|
|
45725
45628
|
setActiveTab(channelDetailsTabs.member);
|
|
45726
45629
|
}
|
|
45727
45630
|
}, [showMembers]);
|
|
45728
|
-
return /*#__PURE__*/React__default.createElement(Container$
|
|
45631
|
+
return /*#__PURE__*/React__default.createElement(Container$t, {
|
|
45729
45632
|
theme: theme
|
|
45730
45633
|
}, /*#__PURE__*/React__default.createElement(DetailsTabHeader, {
|
|
45731
45634
|
color: textSecondary,
|
|
@@ -45807,8 +45710,8 @@ var DetailsTab = function DetailsTab(_ref) {
|
|
|
45807
45710
|
voicePreviewHoverBackgroundColor: voicePreviewHoverBackgroundColor
|
|
45808
45711
|
})));
|
|
45809
45712
|
};
|
|
45810
|
-
var Container$
|
|
45811
|
-
var DetailsTabHeader = styled.div(_templateObject2$
|
|
45713
|
+
var Container$t = styled.div(_templateObject$11 || (_templateObject$11 = _taggedTemplateLiteralLoose(["\n min-height: calc(100vh - 64px);\n"])));
|
|
45714
|
+
var DetailsTabHeader = styled.div(_templateObject2$V || (_templateObject2$V = _taggedTemplateLiteralLoose(["\n overflow-x: auto;\n overflow-y: hidden;\n border-bottom: 1px solid ", ";\n background-color: ", ";\n display: flex;\n justify-content: space-between;\n position: sticky;\n top: 0;\n z-index: 12;\n /* width */\n &::-webkit-scrollbar {\n width: 0;\n height: 0;\n }\n\n /* Track */\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n\n /* Handle */\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n /* Handle on hover */\n &::-webkit-scrollbar-thumb:hover {\n background: transparent;\n }\n button {\n position: relative;\n border: none;\n background: transparent;\n outline: none;\n height: 44px;\n text-transform: capitalize;\n font-style: normal;\n font-weight: 500;\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n min-width: ", ";\n cursor: pointer;\n }\n\n & span {\n position: relative;\n display: inline-flex;\n align-items: center;\n height: 100%;\n }\n\n & .active span {\n color: ", ";\n\n &:after {\n content: '';\n width: 100%;\n border-radius: 2px;\n height: 2px;\n background-color: ", ";\n position: absolute;\n top: calc(100% - 1px);\n left: 0;\n }\n }\n"])), function (props) {
|
|
45812
45715
|
return props.borderColor;
|
|
45813
45716
|
}, function (props) {
|
|
45814
45717
|
return props.backgroundColor || 'transparent';
|
|
@@ -45826,15 +45729,15 @@ var DetailsTabHeader = styled.div(_templateObject2$U || (_templateObject2$U = _t
|
|
|
45826
45729
|
return props.activeTabColor;
|
|
45827
45730
|
});
|
|
45828
45731
|
|
|
45829
|
-
var _templateObject$
|
|
45830
|
-
var Container$
|
|
45732
|
+
var _templateObject$12, _templateObject2$W, _templateObject3$N, _templateObject4$G;
|
|
45733
|
+
var Container$u = styled.div(_templateObject$12 || (_templateObject$12 = _taggedTemplateLiteralLoose(["\n ", ";\n height: ", ";\n position: absolute;\n padding: 24px 16px;\n background-color: ", ";\n z-index: 25;\n"])), function (props) {
|
|
45831
45734
|
return props.active ? 'display: block' : 'display: none';
|
|
45832
45735
|
}, function (props) {
|
|
45833
45736
|
return "calc(100vh - " + (props.heightOffset ? props.heightOffset + 48 : 48) + "px)";
|
|
45834
45737
|
}, function (props) {
|
|
45835
45738
|
return props.backgroundColor;
|
|
45836
45739
|
});
|
|
45837
|
-
var AvatarCont = styled.div(_templateObject2$
|
|
45740
|
+
var AvatarCont = styled.div(_templateObject2$W || (_templateObject2$W = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n margin-bottom: 4px;\n\n &::after {\n content: '';\n position: absolute;\n width: 120px;\n height: 120px;\n border-radius: 50%;\n background-color: rgba(0, 0, 0, 0.4);\n }\n .dropdown-body {\n top: inherit;\n right: inherit;\n bottom: -90px;\n }\n"])));
|
|
45838
45741
|
var DropDownWrapper = styled.div(_templateObject3$N || (_templateObject3$N = _taggedTemplateLiteralLoose(["\n position: absolute;\n z-index: 4;\n width: 40px;\n height: 40px;\n"])));
|
|
45839
45742
|
var EditChannelFooter = styled(ButtonBlock)(_templateObject4$G || (_templateObject4$G = _taggedTemplateLiteralLoose(["\n margin-top: 24px;\n\n & > button {\n margin-left: 12px;\n }\n"])));
|
|
45840
45743
|
var EditChannel = function EditChannel(_ref) {
|
|
@@ -45988,7 +45891,7 @@ var EditChannel = function EditChannel(_ref) {
|
|
|
45988
45891
|
useEffect(function () {
|
|
45989
45892
|
setOffsetTop(editContainer && editContainer.current && editContainer.current.offsetTop);
|
|
45990
45893
|
}, []);
|
|
45991
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Container$
|
|
45894
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Container$u, {
|
|
45992
45895
|
ref: editContainer,
|
|
45993
45896
|
heightOffset: offsetTop,
|
|
45994
45897
|
active: isEditMode,
|
|
@@ -46091,7 +45994,7 @@ var EditChannel = function EditChannel(_ref) {
|
|
|
46091
45994
|
})));
|
|
46092
45995
|
};
|
|
46093
45996
|
|
|
46094
|
-
var _templateObject$
|
|
45997
|
+
var _templateObject$13, _templateObject2$X, _templateObject3$O, _templateObject4$H, _templateObject5$B, _templateObject6$w, _templateObject7$v, _templateObject8$s, _templateObject9$n, _templateObject0$k, _templateObject1$h, _templateObject10$b, _templateObject11$9;
|
|
46095
45998
|
var Details = function Details(_ref) {
|
|
46096
45999
|
var _activeChannel$member;
|
|
46097
46000
|
var detailsTitleText = _ref.detailsTitleText,
|
|
@@ -46323,7 +46226,7 @@ var Details = function Details(_ref) {
|
|
|
46323
46226
|
return Promise.reject(e);
|
|
46324
46227
|
}
|
|
46325
46228
|
};
|
|
46326
|
-
return /*#__PURE__*/React__default.createElement(Container$
|
|
46229
|
+
return /*#__PURE__*/React__default.createElement(Container$v, {
|
|
46327
46230
|
backgroundColor: backgroundColor,
|
|
46328
46231
|
mounted: mounted,
|
|
46329
46232
|
size: size,
|
|
@@ -46521,14 +46424,14 @@ var Details = function Details(_ref) {
|
|
|
46521
46424
|
QRCodeIcon: QRCodeIcon
|
|
46522
46425
|
}))));
|
|
46523
46426
|
};
|
|
46524
|
-
var Container$
|
|
46427
|
+
var Container$v = styled.div(_templateObject$13 || (_templateObject$13 = _taggedTemplateLiteralLoose(["\n flex: 0 0 auto;\n width: 0;\n border-left: 1px solid ", ";\n //transition: all 0.1s;\n ", "\n background-color: ", ";\n}\n"])), function (props) {
|
|
46525
46428
|
return props.borderColor;
|
|
46526
46429
|
}, function (props) {
|
|
46527
46430
|
return props.mounted && " width: " + (props.size === 'small' ? '300px' : props.size === 'medium' ? '350px' : '400px') + ";";
|
|
46528
46431
|
}, function (props) {
|
|
46529
46432
|
return props.backgroundColor;
|
|
46530
46433
|
});
|
|
46531
|
-
var ChannelDetailsHeader = styled.div(_templateObject2$
|
|
46434
|
+
var ChannelDetailsHeader = styled.div(_templateObject2$X || (_templateObject2$X = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n padding: 16px;\n position: relative;\n height: 64px;\n box-sizing: border-box;\n border-bottom: 1px solid ", ";\n\n & svg {\n cursor: pointer;\n }\n"])), function (props) {
|
|
46532
46435
|
return props.borderColor;
|
|
46533
46436
|
});
|
|
46534
46437
|
var ChatDetails = styled.div(_templateObject3$O || (_templateObject3$O = _taggedTemplateLiteralLoose(["\n //position: relative;\n width: ", ";\n //height: ", ";\n height: ", ";\n overflow-y: auto;\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n"])), function (props) {
|
|
@@ -46547,7 +46450,7 @@ var AboutChannelTitle = styled.h4(_templateObject5$B || (_templateObject5$B = _t
|
|
|
46547
46450
|
var AboutChannelText = styled.h3(_templateObject6$w || (_templateObject6$w = _taggedTemplateLiteralLoose(["\n font-size: 15px;\n margin: 0;\n font-weight: 400;\n line-height: 20px;\n color: ", ";\n"])), function (props) {
|
|
46548
46451
|
return props.color;
|
|
46549
46452
|
});
|
|
46550
|
-
var ChannelInfo$4 = styled.div(_templateObject7$
|
|
46453
|
+
var ChannelInfo$4 = styled.div(_templateObject7$v || (_templateObject7$v = _taggedTemplateLiteralLoose(["\n position: relative;\n margin-left: ", ";\n margin-top: ", ";\n text-align: ", ";\n"])), function (props) {
|
|
46551
46454
|
return (!props.direction || props.direction !== 'column') && '16px';
|
|
46552
46455
|
}, function (props) {
|
|
46553
46456
|
return props.direction && props.direction === 'column' && '16px';
|
|
@@ -46571,7 +46474,7 @@ var ChannelNameWrapper = styled.div(_templateObject1$h || (_templateObject1$h =
|
|
|
46571
46474
|
var EditButton = styled.span(_templateObject10$b || (_templateObject10$b = _taggedTemplateLiteralLoose(["\n margin-left: 6px;\n cursor: pointer;\n color: #b2b6be;\n"])));
|
|
46572
46475
|
var PhoneNumberContainer = styled.span(_templateObject11$9 || (_templateObject11$9 = _taggedTemplateLiteralLoose(["\n position: relative;\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n user-select: text;\n"])));
|
|
46573
46476
|
|
|
46574
|
-
var _templateObject$
|
|
46477
|
+
var _templateObject$14;
|
|
46575
46478
|
var ChannelDetailsContainer = function ChannelDetailsContainer(_ref) {
|
|
46576
46479
|
var _ref$size = _ref.size,
|
|
46577
46480
|
size = _ref$size === void 0 ? 'large' : _ref$size,
|
|
@@ -46802,7 +46705,7 @@ var ChannelDetailsContainer = function ChannelDetailsContainer(_ref) {
|
|
|
46802
46705
|
QRCodeIcon: QRCodeIcon
|
|
46803
46706
|
})));
|
|
46804
46707
|
};
|
|
46805
|
-
var DetailsWrapper = styled.div(_templateObject$
|
|
46708
|
+
var DetailsWrapper = styled.div(_templateObject$14 || (_templateObject$14 = _taggedTemplateLiteralLoose(["\n user-select: text;\n"])));
|
|
46806
46709
|
|
|
46807
46710
|
var _path$1z;
|
|
46808
46711
|
function _extends$1D() {
|
|
@@ -46826,7 +46729,7 @@ function SvgChevronDown(props) {
|
|
|
46826
46729
|
})));
|
|
46827
46730
|
}
|
|
46828
46731
|
|
|
46829
|
-
var _templateObject$
|
|
46732
|
+
var _templateObject$15, _templateObject2$Y;
|
|
46830
46733
|
var MessagesScrollToBottomButton = function MessagesScrollToBottomButton(_ref) {
|
|
46831
46734
|
var buttonIcon = _ref.buttonIcon,
|
|
46832
46735
|
buttonWidth = _ref.buttonWidth,
|
|
@@ -46909,7 +46812,7 @@ var MessagesScrollToBottomButton = function MessagesScrollToBottomButton(_ref) {
|
|
|
46909
46812
|
isMuted: channel.muted
|
|
46910
46813
|
}, channel.newMessageCount ? channel.newMessageCount > 99 ? '99+' : channel.newMessageCount : '')), buttonIcon || /*#__PURE__*/React__default.createElement(SvgChevronDown, null)));
|
|
46911
46814
|
};
|
|
46912
|
-
var BottomButton = styled.div(_templateObject$
|
|
46815
|
+
var BottomButton = styled.div(_templateObject$15 || (_templateObject$15 = _taggedTemplateLiteralLoose(["\n transition: all 0.3s ease-in-out;\n position: absolute;\n ", ";\n\n ", ";\n\n ", ";\n right: ", "px;\n\n margin-right: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n border-radius: 50px;\n width: 48px;\n height: 48px;\n cursor: pointer;\n z-index: 14;\n & > svg {\n color: rgba(129, 140, 153, 1);\n }\n\n & > span {\n bottom: 32px;\n right: 0;\n }\n"])), function (props) {
|
|
46913
46816
|
return props.animateFrom === 'bottom' && "bottom: " + (props.bottomOffset + (props.bottomPosition === undefined ? 45 : props.bottomPosition) - 130) + "px";
|
|
46914
46817
|
}, function (props) {
|
|
46915
46818
|
return props.animateFrom === 'right' && "right: " + (props.rightPosition === undefined ? 16 : props.rightPosition - 100) + "px";
|
|
@@ -46920,7 +46823,7 @@ var BottomButton = styled.div(_templateObject$13 || (_templateObject$13 = _tagge
|
|
|
46920
46823
|
}, function (props) {
|
|
46921
46824
|
return props.backgroundColor;
|
|
46922
46825
|
});
|
|
46923
|
-
var UnreadCount$1 = styled.span(_templateObject2$
|
|
46826
|
+
var UnreadCount$1 = styled.span(_templateObject2$Y || (_templateObject2$Y = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 11px;\n right: 16px;\n flex: 0 0 auto;\n margin-left: auto;\n background-color: ", ";\n padding: 0 4px;\n font-size: ", ";\n line-height: 20px;\n min-width: ", ";\n height: ", ";\n text-align: center;\n font-weight: 500;\n color: ", ";\n border-radius: 10px;\n box-sizing: border-box;\n"])), function (props) {
|
|
46924
46827
|
return props.backgroundColor;
|
|
46925
46828
|
}, function (props) {
|
|
46926
46829
|
return props.fontSize || '13px';
|
|
@@ -46963,7 +46866,7 @@ function SvgMention(props) {
|
|
|
46963
46866
|
})));
|
|
46964
46867
|
}
|
|
46965
46868
|
|
|
46966
|
-
var _templateObject$
|
|
46869
|
+
var _templateObject$16, _templateObject2$Z;
|
|
46967
46870
|
var MessagesScrollToUnreadMentionsButton = function MessagesScrollToUnreadMentionsButton(_ref) {
|
|
46968
46871
|
var buttonIcon = _ref.buttonIcon,
|
|
46969
46872
|
buttonWidth = _ref.buttonWidth,
|
|
@@ -47106,7 +47009,7 @@ var MessagesScrollToUnreadMentionsButton = function MessagesScrollToUnreadMentio
|
|
|
47106
47009
|
isMuted: channel.muted
|
|
47107
47010
|
}, channel.newMentionCount ? channel.newMentionCount > 99 ? '99+' : channel.newMentionCount : '')), buttonIcon || /*#__PURE__*/React__default.createElement(SvgMention, null)));
|
|
47108
47011
|
};
|
|
47109
|
-
var BottomButton$1 = styled.div(_templateObject$
|
|
47012
|
+
var BottomButton$1 = styled.div(_templateObject$16 || (_templateObject$16 = _taggedTemplateLiteralLoose(["\n transition: all 0.3s ease-in-out;\n position: absolute;\n ", ";\n\n ", ";\n\n ", ";\n right: ", ";\n margin-right: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n border-radius: 50px;\n width: 48px;\n height: 48px;\n cursor: pointer;\n z-index: 14;\n\n & > svg {\n color: rgba(129, 140, 153, 1);\n }\n\n & > span {\n bottom: 32px;\n right: 0;\n }\n"])), function (props) {
|
|
47110
47013
|
return props.animateFrom === 'bottom' && "bottom: " + (props.bottomOffset + (props.bottomPosition === undefined ? 45 : props.bottomPosition) + (props.showsUnreadMentionsButton ? 60 : 0) - 180) + "px";
|
|
47111
47014
|
}, function (props) {
|
|
47112
47015
|
return props.animateFrom === 'right' && "right: " + (props.rightPosition === undefined ? 16 : props.rightPosition - 100) + "px";
|
|
@@ -47117,7 +47020,7 @@ var BottomButton$1 = styled.div(_templateObject$14 || (_templateObject$14 = _tag
|
|
|
47117
47020
|
}, function (props) {
|
|
47118
47021
|
return props.backgroundColor;
|
|
47119
47022
|
});
|
|
47120
|
-
var UnreadCount$2 = styled.span(_templateObject2$
|
|
47023
|
+
var UnreadCount$2 = styled.span(_templateObject2$Z || (_templateObject2$Z = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: 11px;\n right: 16px;\n flex: 0 0 auto;\n margin-left: auto;\n background-color: ", ";\n padding: 0 4px;\n font-size: ", ";\n line-height: 20px;\n min-width: ", ";\n height: ", ";\n text-align: center;\n font-weight: 500;\n color: ", ";\n border-radius: 10px;\n box-sizing: border-box;\n"])), function (props) {
|
|
47121
47024
|
return props.backgroundColor;
|
|
47122
47025
|
}, function (props) {
|
|
47123
47026
|
return props.fontSize || '13px';
|