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