sceyt-chat-react-uikit 1.7.1 → 1.7.2-beta.10
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/components/Attachment/index.d.ts +4 -1
- package/components/AudioPlayer/index.d.ts +3 -0
- package/components/ChatContainer/index.d.ts +2 -1
- package/components/Message/Message.types.d.ts +24 -1
- package/components/Message/MessageActions/index.d.ts +1 -1
- package/components/Message/MessageBody/index.d.ts +6 -1
- package/components/Message/OGMetadata/index.d.ts +2 -1
- package/components/Message/index.d.ts +1 -1
- package/components/Messages/MessageList/index.d.ts +22 -1
- package/components/Messages/index.d.ts +22 -1
- package/components/SceytChat/index.d.ts +1 -1
- package/index.js +1618 -900
- package/index.modern.js +1618 -881
- package/package.json +1 -1
- package/types/index.d.ts +26 -7
package/index.modern.js
CHANGED
|
@@ -20,6 +20,7 @@ import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin';
|
|
|
20
20
|
import { createPortal } from 'react-dom';
|
|
21
21
|
import { useBasicTypeaheadTriggerMatch, LexicalTypeaheadMenuPlugin, MenuOption } from '@lexical/react/LexicalTypeaheadMenuPlugin';
|
|
22
22
|
import { $createOffsetView } from '@lexical/offset';
|
|
23
|
+
import MicRecorder from 'mic-recorder-to-mp3';
|
|
23
24
|
import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin';
|
|
24
25
|
|
|
25
26
|
// src/utils/formatProdErrorMessage.ts
|
|
@@ -2593,7 +2594,8 @@ var MESSAGE_DELIVERY_STATUS = {
|
|
|
2593
2594
|
PENDING: 'pending',
|
|
2594
2595
|
SENT: 'sent',
|
|
2595
2596
|
DELIVERED: 'received',
|
|
2596
|
-
READ: 'displayed'
|
|
2597
|
+
READ: 'displayed',
|
|
2598
|
+
PLAYED: 'played'
|
|
2597
2599
|
};
|
|
2598
2600
|
var MESSAGE_STATUS = {
|
|
2599
2601
|
UNMODIFIED: 'unmodified',
|
|
@@ -8947,6 +8949,7 @@ var UploadImageIcon;
|
|
|
8947
8949
|
var showChannelDetails = false;
|
|
8948
8950
|
var channelTypesFilter = [];
|
|
8949
8951
|
var memberCount = 10;
|
|
8952
|
+
var disableFrowardMentionsCount = false;
|
|
8950
8953
|
function setChannelInMap(channel) {
|
|
8951
8954
|
channelsMap[channel.id] = _extends({}, channel);
|
|
8952
8955
|
}
|
|
@@ -9043,6 +9046,12 @@ function getChannelMembersCount() {
|
|
|
9043
9046
|
function setChannelMembersCount(count) {
|
|
9044
9047
|
memberCount = count;
|
|
9045
9048
|
}
|
|
9049
|
+
function setDisableFrowardMentionsCount(disable) {
|
|
9050
|
+
disableFrowardMentionsCount = disable;
|
|
9051
|
+
}
|
|
9052
|
+
function getDisableFrowardMentionsCount() {
|
|
9053
|
+
return disableFrowardMentionsCount;
|
|
9054
|
+
}
|
|
9046
9055
|
var handleNewMessages;
|
|
9047
9056
|
function setHandleNewMessages(callback) {
|
|
9048
9057
|
handleNewMessages = callback;
|
|
@@ -9557,6 +9566,7 @@ var UPDATE_CHANNEL = 'UPDATE_CHANNEL';
|
|
|
9557
9566
|
var REMOVE_CHANNEL_CACHES = 'REMOVE_CHANNEL_CACHES';
|
|
9558
9567
|
var MARK_MESSAGES_AS_READ = 'MARK_MESSAGES_AS_READ';
|
|
9559
9568
|
var MARK_MESSAGES_AS_DELIVERED = 'MARK_MESSAGES_AS_DELIVERED';
|
|
9569
|
+
var MARK_VOICE_MESSAGE_AS_PLAYED = 'MARK_VOICE_MESSAGE_AS_PLAYED';
|
|
9560
9570
|
var SEND_TYPING = 'SEND_TYPING';
|
|
9561
9571
|
var SEND_RECORDING = 'SEND_RECORDING';
|
|
9562
9572
|
var JOIN_TO_CHANNEL = 'JOIN_TO_CHANNEL';
|
|
@@ -10327,7 +10337,11 @@ var initialState$1 = {
|
|
|
10327
10337
|
openedMessageMenu: '',
|
|
10328
10338
|
attachmentsUploadingProgress: {},
|
|
10329
10339
|
playingAudioId: null,
|
|
10330
|
-
selectedMessagesMap: null
|
|
10340
|
+
selectedMessagesMap: null,
|
|
10341
|
+
oGMetadata: {},
|
|
10342
|
+
attachmentUpdatedMap: {},
|
|
10343
|
+
messageMarkers: {},
|
|
10344
|
+
messagesMarkersLoadingState: null
|
|
10331
10345
|
};
|
|
10332
10346
|
var messageSlice = createSlice({
|
|
10333
10347
|
name: 'messages',
|
|
@@ -10456,39 +10470,8 @@ var messageSlice = createSlice({
|
|
|
10456
10470
|
updateMessageAttachment: function updateMessageAttachment(state, action) {
|
|
10457
10471
|
var _action$payload4 = action.payload,
|
|
10458
10472
|
url = _action$payload4.url,
|
|
10459
|
-
|
|
10460
|
-
|
|
10461
|
-
state.activeChannelMessages = state.activeChannelMessages.map(function (message) {
|
|
10462
|
-
if (message.id === messageId) {
|
|
10463
|
-
for (var index = 0; index < message.attachments.length; index++) {
|
|
10464
|
-
var attachment = message.attachments[index];
|
|
10465
|
-
if (attachment.url === url) {
|
|
10466
|
-
message.attachments[index] = _extends({}, attachment, params);
|
|
10467
|
-
}
|
|
10468
|
-
}
|
|
10469
|
-
}
|
|
10470
|
-
if (message.attachments.length) {
|
|
10471
|
-
var detachedAttachments = message.attachments.map(function (att) {
|
|
10472
|
-
var _att$user, _att$user2;
|
|
10473
|
-
return _extends({}, att, {
|
|
10474
|
-
user: _extends({}, att.user, {
|
|
10475
|
-
metadata: _extends({}, ((_att$user = att.user) === null || _att$user === void 0 ? void 0 : _att$user.metadata) || {}),
|
|
10476
|
-
presence: _extends({}, ((_att$user2 = att.user) === null || _att$user2 === void 0 ? void 0 : _att$user2.presence) || {})
|
|
10477
|
-
})
|
|
10478
|
-
});
|
|
10479
|
-
});
|
|
10480
|
-
updateMessageOnAllMessages(messageId, {
|
|
10481
|
-
attachments: detachedAttachments
|
|
10482
|
-
});
|
|
10483
|
-
updateMessageOnMap(message.channelId, {
|
|
10484
|
-
messageId: messageId,
|
|
10485
|
-
params: {
|
|
10486
|
-
attachments: detachedAttachments
|
|
10487
|
-
}
|
|
10488
|
-
});
|
|
10489
|
-
}
|
|
10490
|
-
return message;
|
|
10491
|
-
});
|
|
10473
|
+
attachmentUrl = _action$payload4.attachmentUrl;
|
|
10474
|
+
state.attachmentUpdatedMap[url] = attachmentUrl;
|
|
10492
10475
|
},
|
|
10493
10476
|
addReactionToMessage: function addReactionToMessage(state, action) {
|
|
10494
10477
|
var _action$payload5 = action.payload,
|
|
@@ -10670,6 +10653,41 @@ var messageSlice = createSlice({
|
|
|
10670
10653
|
},
|
|
10671
10654
|
clearSelectedMessages: function clearSelectedMessages(state) {
|
|
10672
10655
|
state.selectedMessagesMap = null;
|
|
10656
|
+
},
|
|
10657
|
+
setOGMetadata: function setOGMetadata(state, action) {
|
|
10658
|
+
var _action$payload10 = action.payload,
|
|
10659
|
+
url = _action$payload10.url,
|
|
10660
|
+
metadata = _action$payload10.metadata;
|
|
10661
|
+
state.oGMetadata[url] = metadata;
|
|
10662
|
+
},
|
|
10663
|
+
updateOGMetadata: function updateOGMetadata(state, action) {
|
|
10664
|
+
var _action$payload11 = action.payload,
|
|
10665
|
+
url = _action$payload11.url,
|
|
10666
|
+
metadata = _action$payload11.metadata;
|
|
10667
|
+
if (metadata) {
|
|
10668
|
+
var existing = state.oGMetadata[url];
|
|
10669
|
+
state.oGMetadata[url] = existing ? _extends({}, existing, metadata) : metadata;
|
|
10670
|
+
}
|
|
10671
|
+
},
|
|
10672
|
+
setMessageMarkers: function setMessageMarkers(state, action) {
|
|
10673
|
+
var _action$payload12 = action.payload,
|
|
10674
|
+
channelId = _action$payload12.channelId,
|
|
10675
|
+
messageId = _action$payload12.messageId,
|
|
10676
|
+
messageMarkers = _action$payload12.messageMarkers,
|
|
10677
|
+
deliveryStatus = _action$payload12.deliveryStatus;
|
|
10678
|
+
if (!state.messageMarkers[channelId]) {
|
|
10679
|
+
state.messageMarkers[channelId] = {};
|
|
10680
|
+
}
|
|
10681
|
+
if (!state.messageMarkers[channelId][messageId]) {
|
|
10682
|
+
state.messageMarkers[channelId][messageId] = {};
|
|
10683
|
+
}
|
|
10684
|
+
if (!state.messageMarkers[channelId][messageId][deliveryStatus]) {
|
|
10685
|
+
state.messageMarkers[channelId][messageId][deliveryStatus] = [];
|
|
10686
|
+
}
|
|
10687
|
+
state.messageMarkers[channelId][messageId][deliveryStatus] = [].concat(messageMarkers);
|
|
10688
|
+
},
|
|
10689
|
+
setMessagesMarkersLoadingState: function setMessagesMarkersLoadingState(state, action) {
|
|
10690
|
+
state.messagesMarkersLoadingState = action.payload.state;
|
|
10673
10691
|
}
|
|
10674
10692
|
},
|
|
10675
10693
|
extraReducers: function extraReducers(builder) {
|
|
@@ -10719,7 +10737,11 @@ var _messageSlice$actions = messageSlice.actions,
|
|
|
10719
10737
|
setPlayingAudioId = _messageSlice$actions.setPlayingAudioId,
|
|
10720
10738
|
addSelectedMessage = _messageSlice$actions.addSelectedMessage,
|
|
10721
10739
|
removeSelectedMessage = _messageSlice$actions.removeSelectedMessage,
|
|
10722
|
-
clearSelectedMessages = _messageSlice$actions.clearSelectedMessages
|
|
10740
|
+
clearSelectedMessages = _messageSlice$actions.clearSelectedMessages,
|
|
10741
|
+
setOGMetadata = _messageSlice$actions.setOGMetadata,
|
|
10742
|
+
updateOGMetadata = _messageSlice$actions.updateOGMetadata,
|
|
10743
|
+
setMessageMarkers = _messageSlice$actions.setMessageMarkers,
|
|
10744
|
+
setMessagesMarkersLoadingState = _messageSlice$actions.setMessagesMarkersLoadingState;
|
|
10723
10745
|
var MessageReducer = messageSlice.reducer;
|
|
10724
10746
|
|
|
10725
10747
|
var initialState$2 = {
|
|
@@ -11331,6 +11353,15 @@ var markMessagesAsDeliveredAC = function markMessagesAsDeliveredAC(channelId, me
|
|
|
11331
11353
|
}
|
|
11332
11354
|
};
|
|
11333
11355
|
};
|
|
11356
|
+
var markVoiceMessageAsPlayedAC = function markVoiceMessageAsPlayedAC(channelId, messageIds) {
|
|
11357
|
+
return {
|
|
11358
|
+
type: MARK_VOICE_MESSAGE_AS_PLAYED,
|
|
11359
|
+
payload: {
|
|
11360
|
+
channelId: channelId,
|
|
11361
|
+
messageIds: messageIds
|
|
11362
|
+
}
|
|
11363
|
+
};
|
|
11364
|
+
};
|
|
11334
11365
|
var sendTypingAC = function sendTypingAC(state) {
|
|
11335
11366
|
return {
|
|
11336
11367
|
type: SEND_TYPING,
|
|
@@ -11506,6 +11537,7 @@ var getChannelMentionsAC = function getChannelMentionsAC(channelId) {
|
|
|
11506
11537
|
|
|
11507
11538
|
var GET_MESSAGES = 'GET_MESSAGES';
|
|
11508
11539
|
var GET_MESSAGE = 'GET_MESSAGE';
|
|
11540
|
+
var GET_MESSAGE_MARKERS = 'GET_MESSAGE_MARKERS';
|
|
11509
11541
|
var LOAD_MORE_MESSAGES = 'LOAD_MORE_MESSAGES';
|
|
11510
11542
|
var SEND_MESSAGE = 'SEND_MESSAGE';
|
|
11511
11543
|
var SEND_TEXT_MESSAGE = 'SEND_TEXT_MESSAGE';
|
|
@@ -11799,11 +11831,22 @@ function setMessagesHasNextAC(hasNext) {
|
|
|
11799
11831
|
hasNext: hasNext
|
|
11800
11832
|
});
|
|
11801
11833
|
}
|
|
11802
|
-
function
|
|
11834
|
+
function setOGMetadataAC(url, metadata) {
|
|
11835
|
+
return setOGMetadata({
|
|
11836
|
+
url: url,
|
|
11837
|
+
metadata: metadata
|
|
11838
|
+
});
|
|
11839
|
+
}
|
|
11840
|
+
function updateOGMetadataAC(url, metadata) {
|
|
11841
|
+
return updateOGMetadata({
|
|
11842
|
+
url: url,
|
|
11843
|
+
metadata: metadata
|
|
11844
|
+
});
|
|
11845
|
+
}
|
|
11846
|
+
function setUpdateMessageAttachmentAC(url, attachmentUrl) {
|
|
11803
11847
|
return updateMessageAttachment({
|
|
11804
11848
|
url: url,
|
|
11805
|
-
|
|
11806
|
-
params: params
|
|
11849
|
+
attachmentUrl: attachmentUrl
|
|
11807
11850
|
});
|
|
11808
11851
|
}
|
|
11809
11852
|
function updateMessageAC(messageId, params, addIfNotExists) {
|
|
@@ -11928,6 +11971,29 @@ function removeSelectedMessageAC(messageId) {
|
|
|
11928
11971
|
function clearSelectedMessagesAC() {
|
|
11929
11972
|
return clearSelectedMessages();
|
|
11930
11973
|
}
|
|
11974
|
+
function getMessageMarkersAC(messageId, channelId, deliveryStatus) {
|
|
11975
|
+
return {
|
|
11976
|
+
type: GET_MESSAGE_MARKERS,
|
|
11977
|
+
payload: {
|
|
11978
|
+
messageId: messageId,
|
|
11979
|
+
channelId: channelId,
|
|
11980
|
+
deliveryStatus: deliveryStatus
|
|
11981
|
+
}
|
|
11982
|
+
};
|
|
11983
|
+
}
|
|
11984
|
+
function setMessageMarkersAC(channelId, messageId, messageMarkers, deliveryStatus) {
|
|
11985
|
+
return setMessageMarkers({
|
|
11986
|
+
channelId: channelId,
|
|
11987
|
+
messageId: messageId,
|
|
11988
|
+
messageMarkers: messageMarkers,
|
|
11989
|
+
deliveryStatus: deliveryStatus
|
|
11990
|
+
});
|
|
11991
|
+
}
|
|
11992
|
+
function setMessagesMarkersLoadingStateAC(state) {
|
|
11993
|
+
return setMessagesMarkersLoadingState({
|
|
11994
|
+
state: state
|
|
11995
|
+
});
|
|
11996
|
+
}
|
|
11931
11997
|
|
|
11932
11998
|
var SET_CONTACT_LOADING_STATE = 'SET_CONTACT_LOADING_STATE';
|
|
11933
11999
|
var GET_CONTACTS = 'GET_CONTACTS';
|
|
@@ -14736,27 +14802,28 @@ var _marked$2 = /*#__PURE__*/_regenerator().m(createChannel),
|
|
|
14736
14802
|
_marked7 = /*#__PURE__*/_regenerator().m(getChannelMentions),
|
|
14737
14803
|
_marked8 = /*#__PURE__*/_regenerator().m(channelsForForwardLoadMore),
|
|
14738
14804
|
_marked9 = /*#__PURE__*/_regenerator().m(markMessagesRead),
|
|
14739
|
-
_marked0 = /*#__PURE__*/_regenerator().m(
|
|
14740
|
-
_marked1 = /*#__PURE__*/_regenerator().m(
|
|
14741
|
-
_marked10 = /*#__PURE__*/_regenerator().m(
|
|
14742
|
-
_marked11 = /*#__PURE__*/_regenerator().m(
|
|
14743
|
-
_marked12 = /*#__PURE__*/_regenerator().m(
|
|
14744
|
-
_marked13 = /*#__PURE__*/_regenerator().m(
|
|
14745
|
-
_marked14 = /*#__PURE__*/_regenerator().m(
|
|
14746
|
-
_marked15 = /*#__PURE__*/_regenerator().m(
|
|
14747
|
-
_marked16 = /*#__PURE__*/_regenerator().m(
|
|
14748
|
-
_marked17 = /*#__PURE__*/_regenerator().m(
|
|
14749
|
-
_marked18 = /*#__PURE__*/_regenerator().m(
|
|
14750
|
-
_marked19 = /*#__PURE__*/_regenerator().m(
|
|
14751
|
-
_marked20 = /*#__PURE__*/_regenerator().m(
|
|
14752
|
-
_marked21 = /*#__PURE__*/_regenerator().m(
|
|
14753
|
-
_marked22 = /*#__PURE__*/_regenerator().m(
|
|
14754
|
-
_marked23 = /*#__PURE__*/_regenerator().m(
|
|
14755
|
-
_marked24 = /*#__PURE__*/_regenerator().m(
|
|
14756
|
-
_marked25 = /*#__PURE__*/_regenerator().m(
|
|
14757
|
-
_marked26 = /*#__PURE__*/_regenerator().m(
|
|
14758
|
-
_marked27 = /*#__PURE__*/_regenerator().m(
|
|
14759
|
-
_marked28 = /*#__PURE__*/_regenerator().m(
|
|
14805
|
+
_marked0 = /*#__PURE__*/_regenerator().m(markVoiceMessageAsPlayed),
|
|
14806
|
+
_marked1 = /*#__PURE__*/_regenerator().m(markMessagesDelivered),
|
|
14807
|
+
_marked10 = /*#__PURE__*/_regenerator().m(switchChannel),
|
|
14808
|
+
_marked11 = /*#__PURE__*/_regenerator().m(notificationsTurnOff),
|
|
14809
|
+
_marked12 = /*#__PURE__*/_regenerator().m(notificationsTurnOn),
|
|
14810
|
+
_marked13 = /*#__PURE__*/_regenerator().m(markChannelAsRead),
|
|
14811
|
+
_marked14 = /*#__PURE__*/_regenerator().m(markChannelAsUnRead),
|
|
14812
|
+
_marked15 = /*#__PURE__*/_regenerator().m(pinChannel),
|
|
14813
|
+
_marked16 = /*#__PURE__*/_regenerator().m(unpinChannel),
|
|
14814
|
+
_marked17 = /*#__PURE__*/_regenerator().m(removeChannelCaches),
|
|
14815
|
+
_marked18 = /*#__PURE__*/_regenerator().m(leaveChannel),
|
|
14816
|
+
_marked19 = /*#__PURE__*/_regenerator().m(deleteChannel),
|
|
14817
|
+
_marked20 = /*#__PURE__*/_regenerator().m(blockChannel),
|
|
14818
|
+
_marked21 = /*#__PURE__*/_regenerator().m(updateChannel),
|
|
14819
|
+
_marked22 = /*#__PURE__*/_regenerator().m(checkUsersStatus),
|
|
14820
|
+
_marked23 = /*#__PURE__*/_regenerator().m(sendTyping),
|
|
14821
|
+
_marked24 = /*#__PURE__*/_regenerator().m(sendRecording),
|
|
14822
|
+
_marked25 = /*#__PURE__*/_regenerator().m(clearHistory),
|
|
14823
|
+
_marked26 = /*#__PURE__*/_regenerator().m(deleteAllMessages),
|
|
14824
|
+
_marked27 = /*#__PURE__*/_regenerator().m(joinChannel),
|
|
14825
|
+
_marked28 = /*#__PURE__*/_regenerator().m(watchForChannelEvents),
|
|
14826
|
+
_marked29 = /*#__PURE__*/_regenerator().m(ChannelsSaga);
|
|
14760
14827
|
function createChannel(action) {
|
|
14761
14828
|
var payload, channelData, dontCreateIfNotExists, callback, SceytChatClient, createChannelData, fileToUpload, isSelfChannel, channelIsExistOnAllChannels, createdChannel, allChannels, memberId, checkChannelExist, messageToSend, _allChannels, _memberId, _t;
|
|
14762
14829
|
return _regenerator().w(function (_context) {
|
|
@@ -14874,7 +14941,7 @@ function createChannel(action) {
|
|
|
14874
14941
|
}
|
|
14875
14942
|
messageToSend = {
|
|
14876
14943
|
body: createdChannel.type === DEFAULT_CHANNEL_TYPE.BROADCAST || createdChannel.type === DEFAULT_CHANNEL_TYPE.PUBLIC ? 'CC' : 'CG',
|
|
14877
|
-
|
|
14944
|
+
mentionedUsers: [],
|
|
14878
14945
|
attachments: [],
|
|
14879
14946
|
type: 'system'
|
|
14880
14947
|
};
|
|
@@ -15682,7 +15749,7 @@ function markMessagesRead(action) {
|
|
|
15682
15749
|
}
|
|
15683
15750
|
}, _marked9, null, [[2, 9]]);
|
|
15684
15751
|
}
|
|
15685
|
-
function
|
|
15752
|
+
function markVoiceMessageAsPlayed(action) {
|
|
15686
15753
|
var payload, channelId, messageIds, channel, _t10;
|
|
15687
15754
|
return _regenerator().w(function (_context0) {
|
|
15688
15755
|
while (1) switch (_context0.p = _context0.n) {
|
|
@@ -15704,151 +15771,148 @@ function markMessagesDelivered(action) {
|
|
|
15704
15771
|
_context0.n = 3;
|
|
15705
15772
|
break;
|
|
15706
15773
|
}
|
|
15707
|
-
log.info('send delivered marker ', messageIds);
|
|
15708
15774
|
_context0.n = 3;
|
|
15709
|
-
return call(channel.
|
|
15775
|
+
return call(channel.markVoiceMessagesAsPlayed, messageIds);
|
|
15710
15776
|
case 3:
|
|
15711
15777
|
_context0.n = 5;
|
|
15712
15778
|
break;
|
|
15713
15779
|
case 4:
|
|
15714
15780
|
_context0.p = 4;
|
|
15715
15781
|
_t10 = _context0.v;
|
|
15716
|
-
log.error(_t10, 'Error on mark messages
|
|
15782
|
+
log.error(_t10, 'Error on mark voice messages read');
|
|
15717
15783
|
case 5:
|
|
15718
15784
|
return _context0.a(2);
|
|
15719
15785
|
}
|
|
15720
15786
|
}, _marked0, null, [[1, 4]]);
|
|
15721
15787
|
}
|
|
15722
|
-
function
|
|
15723
|
-
var payload,
|
|
15788
|
+
function markMessagesDelivered(action) {
|
|
15789
|
+
var payload, channelId, messageIds, channel, _t11;
|
|
15724
15790
|
return _regenerator().w(function (_context1) {
|
|
15725
15791
|
while (1) switch (_context1.p = _context1.n) {
|
|
15726
15792
|
case 0:
|
|
15727
|
-
|
|
15793
|
+
payload = action.payload;
|
|
15794
|
+
channelId = payload.channelId, messageIds = payload.messageIds;
|
|
15795
|
+
_context1.p = 1;
|
|
15796
|
+
_context1.n = 2;
|
|
15797
|
+
return call(getChannelFromMap, channelId);
|
|
15798
|
+
case 2:
|
|
15799
|
+
channel = _context1.v;
|
|
15800
|
+
if (!channel) {
|
|
15801
|
+
channel = getChannelFromAllChannels(channelId);
|
|
15802
|
+
if (channel) {
|
|
15803
|
+
setChannelInMap(channel);
|
|
15804
|
+
}
|
|
15805
|
+
}
|
|
15806
|
+
if (!channel) {
|
|
15807
|
+
_context1.n = 3;
|
|
15808
|
+
break;
|
|
15809
|
+
}
|
|
15810
|
+
log.info('send delivered marker ', messageIds);
|
|
15811
|
+
_context1.n = 3;
|
|
15812
|
+
return call(channel.markMessagesAsReceived, messageIds);
|
|
15813
|
+
case 3:
|
|
15814
|
+
_context1.n = 5;
|
|
15815
|
+
break;
|
|
15816
|
+
case 4:
|
|
15817
|
+
_context1.p = 4;
|
|
15818
|
+
_t11 = _context1.v;
|
|
15819
|
+
log.error(_t11, 'Error on mark messages delivered');
|
|
15820
|
+
case 5:
|
|
15821
|
+
return _context1.a(2);
|
|
15822
|
+
}
|
|
15823
|
+
}, _marked1, null, [[1, 4]]);
|
|
15824
|
+
}
|
|
15825
|
+
function switchChannel(action) {
|
|
15826
|
+
var payload, channel, updateActiveChannel, channelToSwitch, existingChannel, addChannel, _SceytChatClient5, fetchedChannel, channelFromMap, currentActiveChannel, _t12;
|
|
15827
|
+
return _regenerator().w(function (_context10) {
|
|
15828
|
+
while (1) switch (_context10.p = _context10.n) {
|
|
15829
|
+
case 0:
|
|
15830
|
+
_context10.p = 0;
|
|
15728
15831
|
payload = action.payload;
|
|
15729
15832
|
channel = payload.channel, updateActiveChannel = payload.updateActiveChannel;
|
|
15730
15833
|
channelToSwitch = channel;
|
|
15731
15834
|
if (!(!(channel !== null && channel !== void 0 && channel.id) && updateActiveChannel)) {
|
|
15732
|
-
|
|
15835
|
+
_context10.n = 3;
|
|
15733
15836
|
break;
|
|
15734
15837
|
}
|
|
15735
|
-
|
|
15838
|
+
_context10.n = 1;
|
|
15736
15839
|
return call(setActiveChannelId, '');
|
|
15737
15840
|
case 1:
|
|
15738
|
-
|
|
15841
|
+
_context10.n = 2;
|
|
15739
15842
|
return put(setActiveChannelAC({}));
|
|
15740
15843
|
case 2:
|
|
15741
|
-
return
|
|
15844
|
+
return _context10.a(2);
|
|
15742
15845
|
case 3:
|
|
15743
15846
|
existingChannel = checkChannelExists(channel.id);
|
|
15744
15847
|
if (existingChannel) {
|
|
15745
|
-
|
|
15848
|
+
_context10.n = 9;
|
|
15746
15849
|
break;
|
|
15747
15850
|
}
|
|
15748
15851
|
addChannel = getChannelFromAllChannels(channel.id);
|
|
15749
15852
|
if (!addChannel) {
|
|
15750
|
-
|
|
15853
|
+
_context10.n = 5;
|
|
15751
15854
|
break;
|
|
15752
15855
|
}
|
|
15753
15856
|
setChannelInMap(addChannel);
|
|
15754
|
-
|
|
15857
|
+
_context10.n = 4;
|
|
15755
15858
|
return put(addChannelAC(JSON.parse(JSON.stringify(addChannel))));
|
|
15756
15859
|
case 4:
|
|
15757
15860
|
channelToSwitch = _extends({}, channelToSwitch, addChannel);
|
|
15758
|
-
|
|
15861
|
+
_context10.n = 8;
|
|
15759
15862
|
break;
|
|
15760
15863
|
case 5:
|
|
15761
15864
|
_SceytChatClient5 = getClient();
|
|
15762
|
-
|
|
15865
|
+
_context10.n = 6;
|
|
15763
15866
|
return call(_SceytChatClient5.getChannel, channel.id);
|
|
15764
15867
|
case 6:
|
|
15765
|
-
fetchedChannel =
|
|
15868
|
+
fetchedChannel = _context10.v;
|
|
15766
15869
|
addChannelToAllChannels(fetchedChannel);
|
|
15767
15870
|
setChannelInMap(fetchedChannel);
|
|
15768
|
-
|
|
15871
|
+
_context10.n = 7;
|
|
15769
15872
|
return put(addChannelAC(JSON.parse(JSON.stringify(fetchedChannel))));
|
|
15770
15873
|
case 7:
|
|
15771
15874
|
channelToSwitch = _extends({}, channelToSwitch, fetchedChannel);
|
|
15772
15875
|
case 8:
|
|
15773
|
-
|
|
15876
|
+
_context10.n = 10;
|
|
15774
15877
|
break;
|
|
15775
15878
|
case 9:
|
|
15776
15879
|
channelFromMap = getChannelFromMap(channel.id);
|
|
15777
15880
|
channelToSwitch = _extends({}, channelToSwitch, channelFromMap);
|
|
15778
15881
|
case 10:
|
|
15779
15882
|
if (!updateActiveChannel) {
|
|
15780
|
-
|
|
15883
|
+
_context10.n = 13;
|
|
15781
15884
|
break;
|
|
15782
15885
|
}
|
|
15783
15886
|
currentActiveChannel = getChannelFromMap(getActiveChannelId());
|
|
15784
|
-
|
|
15887
|
+
_context10.n = 11;
|
|
15785
15888
|
return call(setUnreadScrollTo, true);
|
|
15786
15889
|
case 11:
|
|
15787
|
-
|
|
15890
|
+
_context10.n = 12;
|
|
15788
15891
|
return call(setActiveChannelId, channel && channel.id);
|
|
15789
15892
|
case 12:
|
|
15790
15893
|
if (channel.isLinkedChannel) {
|
|
15791
15894
|
channelToSwitch.linkedFrom = currentActiveChannel;
|
|
15792
15895
|
}
|
|
15793
|
-
|
|
15896
|
+
_context10.n = 13;
|
|
15794
15897
|
return put(setActiveChannelAC(_extends({}, channelToSwitch)));
|
|
15795
15898
|
case 13:
|
|
15796
|
-
|
|
15899
|
+
_context10.n = 15;
|
|
15797
15900
|
break;
|
|
15798
15901
|
case 14:
|
|
15799
|
-
|
|
15800
|
-
_t11 = _context1.v;
|
|
15801
|
-
log.error('error in switch channel', _t11);
|
|
15802
|
-
case 15:
|
|
15803
|
-
return _context1.a(2);
|
|
15804
|
-
}
|
|
15805
|
-
}, _marked1, null, [[0, 14]]);
|
|
15806
|
-
}
|
|
15807
|
-
function notificationsTurnOff(action) {
|
|
15808
|
-
var expireTime, activeChannelId, channel, updatedChannel, _t12;
|
|
15809
|
-
return _regenerator().w(function (_context10) {
|
|
15810
|
-
while (1) switch (_context10.p = _context10.n) {
|
|
15811
|
-
case 0:
|
|
15812
|
-
expireTime = action.payload.expireTime;
|
|
15813
|
-
_context10.n = 1;
|
|
15814
|
-
return call(getActiveChannelId);
|
|
15815
|
-
case 1:
|
|
15816
|
-
activeChannelId = _context10.v;
|
|
15817
|
-
_context10.n = 2;
|
|
15818
|
-
return call(getChannelFromMap, activeChannelId);
|
|
15819
|
-
case 2:
|
|
15820
|
-
channel = _context10.v;
|
|
15821
|
-
_context10.p = 3;
|
|
15822
|
-
_context10.n = 4;
|
|
15823
|
-
return call(channel.mute, expireTime);
|
|
15824
|
-
case 4:
|
|
15825
|
-
updatedChannel = _context10.v;
|
|
15826
|
-
updateChannelOnAllChannels(channel.id, {
|
|
15827
|
-
muted: updatedChannel.muted,
|
|
15828
|
-
mutedTill: updatedChannel.mutedTill
|
|
15829
|
-
});
|
|
15830
|
-
_context10.n = 5;
|
|
15831
|
-
return put(updateChannelDataAC(updatedChannel.id, {
|
|
15832
|
-
muted: updatedChannel.muted,
|
|
15833
|
-
mutedTill: updatedChannel.mutedTill
|
|
15834
|
-
}));
|
|
15835
|
-
case 5:
|
|
15836
|
-
_context10.n = 7;
|
|
15837
|
-
break;
|
|
15838
|
-
case 6:
|
|
15839
|
-
_context10.p = 6;
|
|
15902
|
+
_context10.p = 14;
|
|
15840
15903
|
_t12 = _context10.v;
|
|
15841
|
-
log.error('
|
|
15842
|
-
case
|
|
15904
|
+
log.error('error in switch channel', _t12);
|
|
15905
|
+
case 15:
|
|
15843
15906
|
return _context10.a(2);
|
|
15844
15907
|
}
|
|
15845
|
-
}, _marked10, null, [[
|
|
15908
|
+
}, _marked10, null, [[0, 14]]);
|
|
15846
15909
|
}
|
|
15847
|
-
function
|
|
15848
|
-
var activeChannelId, channel, updatedChannel, _t13;
|
|
15910
|
+
function notificationsTurnOff(action) {
|
|
15911
|
+
var expireTime, activeChannelId, channel, updatedChannel, _t13;
|
|
15849
15912
|
return _regenerator().w(function (_context11) {
|
|
15850
15913
|
while (1) switch (_context11.p = _context11.n) {
|
|
15851
15914
|
case 0:
|
|
15915
|
+
expireTime = action.payload.expireTime;
|
|
15852
15916
|
_context11.n = 1;
|
|
15853
15917
|
return call(getActiveChannelId);
|
|
15854
15918
|
case 1:
|
|
@@ -15859,7 +15923,7 @@ function notificationsTurnOn() {
|
|
|
15859
15923
|
channel = _context11.v;
|
|
15860
15924
|
_context11.p = 3;
|
|
15861
15925
|
_context11.n = 4;
|
|
15862
|
-
return call(channel.
|
|
15926
|
+
return call(channel.mute, expireTime);
|
|
15863
15927
|
case 4:
|
|
15864
15928
|
updatedChannel = _context11.v;
|
|
15865
15929
|
updateChannelOnAllChannels(channel.id, {
|
|
@@ -15877,51 +15941,53 @@ function notificationsTurnOn() {
|
|
|
15877
15941
|
case 6:
|
|
15878
15942
|
_context11.p = 6;
|
|
15879
15943
|
_t13 = _context11.v;
|
|
15880
|
-
log.error('ERROR turn
|
|
15944
|
+
log.error('ERROR turn off notifications', _t13.message);
|
|
15881
15945
|
case 7:
|
|
15882
15946
|
return _context11.a(2);
|
|
15883
15947
|
}
|
|
15884
15948
|
}, _marked11, null, [[3, 6]]);
|
|
15885
15949
|
}
|
|
15886
|
-
function
|
|
15887
|
-
var
|
|
15950
|
+
function notificationsTurnOn() {
|
|
15951
|
+
var activeChannelId, channel, updatedChannel, _t14;
|
|
15888
15952
|
return _regenerator().w(function (_context12) {
|
|
15889
15953
|
while (1) switch (_context12.p = _context12.n) {
|
|
15890
15954
|
case 0:
|
|
15891
|
-
_context12.p = 0;
|
|
15892
|
-
channelId = action.payload.channelId;
|
|
15893
15955
|
_context12.n = 1;
|
|
15894
|
-
return call(
|
|
15956
|
+
return call(getActiveChannelId);
|
|
15895
15957
|
case 1:
|
|
15896
|
-
|
|
15897
|
-
if (!channel) {
|
|
15898
|
-
channel = getChannelFromAllChannels(channelId);
|
|
15899
|
-
}
|
|
15958
|
+
activeChannelId = _context12.v;
|
|
15900
15959
|
_context12.n = 2;
|
|
15901
|
-
return call(
|
|
15960
|
+
return call(getChannelFromMap, activeChannelId);
|
|
15902
15961
|
case 2:
|
|
15903
|
-
|
|
15904
|
-
|
|
15905
|
-
|
|
15906
|
-
|
|
15907
|
-
|
|
15908
|
-
|
|
15909
|
-
|
|
15910
|
-
|
|
15911
|
-
|
|
15962
|
+
channel = _context12.v;
|
|
15963
|
+
_context12.p = 3;
|
|
15964
|
+
_context12.n = 4;
|
|
15965
|
+
return call(channel.unmute);
|
|
15966
|
+
case 4:
|
|
15967
|
+
updatedChannel = _context12.v;
|
|
15968
|
+
updateChannelOnAllChannels(channel.id, {
|
|
15969
|
+
muted: updatedChannel.muted,
|
|
15970
|
+
mutedTill: updatedChannel.mutedTill
|
|
15971
|
+
});
|
|
15912
15972
|
_context12.n = 5;
|
|
15973
|
+
return put(updateChannelDataAC(updatedChannel.id, {
|
|
15974
|
+
muted: updatedChannel.muted,
|
|
15975
|
+
mutedTill: updatedChannel.mutedTill
|
|
15976
|
+
}));
|
|
15977
|
+
case 5:
|
|
15978
|
+
_context12.n = 7;
|
|
15913
15979
|
break;
|
|
15914
|
-
case
|
|
15915
|
-
_context12.p =
|
|
15980
|
+
case 6:
|
|
15981
|
+
_context12.p = 6;
|
|
15916
15982
|
_t14 = _context12.v;
|
|
15917
|
-
log.error(
|
|
15918
|
-
case
|
|
15983
|
+
log.error('ERROR turn on notifications: ', _t14.message);
|
|
15984
|
+
case 7:
|
|
15919
15985
|
return _context12.a(2);
|
|
15920
15986
|
}
|
|
15921
|
-
}, _marked12, null, [[
|
|
15987
|
+
}, _marked12, null, [[3, 6]]);
|
|
15922
15988
|
}
|
|
15923
|
-
function
|
|
15924
|
-
var channelId, channel, _t15;
|
|
15989
|
+
function markChannelAsRead(action) {
|
|
15990
|
+
var channelId, channel, updateData, _t15;
|
|
15925
15991
|
return _regenerator().w(function (_context13) {
|
|
15926
15992
|
while (1) switch (_context13.p = _context13.n) {
|
|
15927
15993
|
case 0:
|
|
@@ -15935,15 +16001,16 @@ function markChannelAsUnRead(action) {
|
|
|
15935
16001
|
channel = getChannelFromAllChannels(channelId);
|
|
15936
16002
|
}
|
|
15937
16003
|
_context13.n = 2;
|
|
15938
|
-
return call(channel.
|
|
16004
|
+
return call(channel.markAsRead);
|
|
15939
16005
|
case 2:
|
|
15940
|
-
|
|
15941
|
-
unread:
|
|
15942
|
-
|
|
16006
|
+
updateData = {
|
|
16007
|
+
unread: false,
|
|
16008
|
+
newMessageCount: 0,
|
|
16009
|
+
newMentionCount: 0
|
|
16010
|
+
};
|
|
16011
|
+
updateChannelOnAllChannels(channel.id, updateData);
|
|
15943
16012
|
_context13.n = 3;
|
|
15944
|
-
return put(updateChannelDataAC(channel.id,
|
|
15945
|
-
unread: true
|
|
15946
|
-
}));
|
|
16013
|
+
return put(updateChannelDataAC(channel.id, updateData));
|
|
15947
16014
|
case 3:
|
|
15948
16015
|
_context13.n = 5;
|
|
15949
16016
|
break;
|
|
@@ -15956,8 +16023,8 @@ function markChannelAsUnRead(action) {
|
|
|
15956
16023
|
}
|
|
15957
16024
|
}, _marked13, null, [[0, 4]]);
|
|
15958
16025
|
}
|
|
15959
|
-
function
|
|
15960
|
-
var channelId, channel,
|
|
16026
|
+
function markChannelAsUnRead(action) {
|
|
16027
|
+
var channelId, channel, _t16;
|
|
15961
16028
|
return _regenerator().w(function (_context14) {
|
|
15962
16029
|
while (1) switch (_context14.p = _context14.n) {
|
|
15963
16030
|
case 0:
|
|
@@ -15971,29 +16038,28 @@ function pinChannel(action) {
|
|
|
15971
16038
|
channel = getChannelFromAllChannels(channelId);
|
|
15972
16039
|
}
|
|
15973
16040
|
_context14.n = 2;
|
|
15974
|
-
return call(channel.
|
|
16041
|
+
return call(channel.markAsUnRead);
|
|
15975
16042
|
case 2:
|
|
15976
|
-
updatedChannel = _context14.v;
|
|
15977
16043
|
updateChannelOnAllChannels(channel.id, {
|
|
15978
|
-
|
|
16044
|
+
unread: true
|
|
15979
16045
|
});
|
|
15980
16046
|
_context14.n = 3;
|
|
15981
|
-
return put(updateChannelDataAC(
|
|
15982
|
-
|
|
15983
|
-
}
|
|
16047
|
+
return put(updateChannelDataAC(channel.id, {
|
|
16048
|
+
unread: true
|
|
16049
|
+
}));
|
|
15984
16050
|
case 3:
|
|
15985
16051
|
_context14.n = 5;
|
|
15986
16052
|
break;
|
|
15987
16053
|
case 4:
|
|
15988
16054
|
_context14.p = 4;
|
|
15989
16055
|
_t16 = _context14.v;
|
|
15990
|
-
log.error(_t16, 'Error in
|
|
16056
|
+
log.error(_t16, 'Error in set channel unread');
|
|
15991
16057
|
case 5:
|
|
15992
16058
|
return _context14.a(2);
|
|
15993
16059
|
}
|
|
15994
16060
|
}, _marked14, null, [[0, 4]]);
|
|
15995
16061
|
}
|
|
15996
|
-
function
|
|
16062
|
+
function pinChannel(action) {
|
|
15997
16063
|
var channelId, channel, updatedChannel, _t17;
|
|
15998
16064
|
return _regenerator().w(function (_context15) {
|
|
15999
16065
|
while (1) switch (_context15.p = _context15.n) {
|
|
@@ -16008,7 +16074,7 @@ function unpinChannel(action) {
|
|
|
16008
16074
|
channel = getChannelFromAllChannels(channelId);
|
|
16009
16075
|
}
|
|
16010
16076
|
_context15.n = 2;
|
|
16011
|
-
return call(channel.
|
|
16077
|
+
return call(channel.pin);
|
|
16012
16078
|
case 2:
|
|
16013
16079
|
updatedChannel = _context15.v;
|
|
16014
16080
|
updateChannelOnAllChannels(channel.id, {
|
|
@@ -16017,197 +16083,234 @@ function unpinChannel(action) {
|
|
|
16017
16083
|
_context15.n = 3;
|
|
16018
16084
|
return put(updateChannelDataAC(updatedChannel.id, {
|
|
16019
16085
|
pinnedAt: updatedChannel.pinnedAt
|
|
16020
|
-
},
|
|
16086
|
+
}, true));
|
|
16021
16087
|
case 3:
|
|
16022
16088
|
_context15.n = 5;
|
|
16023
16089
|
break;
|
|
16024
16090
|
case 4:
|
|
16025
16091
|
_context15.p = 4;
|
|
16026
16092
|
_t17 = _context15.v;
|
|
16027
|
-
log.error(_t17, 'Error in
|
|
16093
|
+
log.error(_t17, 'Error in pinChannel');
|
|
16028
16094
|
case 5:
|
|
16029
16095
|
return _context15.a(2);
|
|
16030
16096
|
}
|
|
16031
16097
|
}, _marked15, null, [[0, 4]]);
|
|
16032
16098
|
}
|
|
16099
|
+
function unpinChannel(action) {
|
|
16100
|
+
var channelId, channel, updatedChannel, _t18;
|
|
16101
|
+
return _regenerator().w(function (_context16) {
|
|
16102
|
+
while (1) switch (_context16.p = _context16.n) {
|
|
16103
|
+
case 0:
|
|
16104
|
+
_context16.p = 0;
|
|
16105
|
+
channelId = action.payload.channelId;
|
|
16106
|
+
_context16.n = 1;
|
|
16107
|
+
return call(getChannelFromMap, channelId);
|
|
16108
|
+
case 1:
|
|
16109
|
+
channel = _context16.v;
|
|
16110
|
+
if (!channel) {
|
|
16111
|
+
channel = getChannelFromAllChannels(channelId);
|
|
16112
|
+
}
|
|
16113
|
+
_context16.n = 2;
|
|
16114
|
+
return call(channel.unpin);
|
|
16115
|
+
case 2:
|
|
16116
|
+
updatedChannel = _context16.v;
|
|
16117
|
+
updateChannelOnAllChannels(channel.id, {
|
|
16118
|
+
pinnedAt: updatedChannel.pinnedAt
|
|
16119
|
+
});
|
|
16120
|
+
_context16.n = 3;
|
|
16121
|
+
return put(updateChannelDataAC(updatedChannel.id, {
|
|
16122
|
+
pinnedAt: updatedChannel.pinnedAt
|
|
16123
|
+
}, false, true));
|
|
16124
|
+
case 3:
|
|
16125
|
+
_context16.n = 5;
|
|
16126
|
+
break;
|
|
16127
|
+
case 4:
|
|
16128
|
+
_context16.p = 4;
|
|
16129
|
+
_t18 = _context16.v;
|
|
16130
|
+
log.error(_t18, 'Error in unpinChannel');
|
|
16131
|
+
case 5:
|
|
16132
|
+
return _context16.a(2);
|
|
16133
|
+
}
|
|
16134
|
+
}, _marked16, null, [[0, 4]]);
|
|
16135
|
+
}
|
|
16033
16136
|
function removeChannelCaches(action) {
|
|
16034
16137
|
var payload, channelId, activeChannelId, activeChannel;
|
|
16035
|
-
return _regenerator().w(function (
|
|
16036
|
-
while (1) switch (
|
|
16138
|
+
return _regenerator().w(function (_context17) {
|
|
16139
|
+
while (1) switch (_context17.n) {
|
|
16037
16140
|
case 0:
|
|
16038
16141
|
payload = action.payload;
|
|
16039
16142
|
channelId = payload.channelId;
|
|
16040
|
-
|
|
16143
|
+
_context17.n = 1;
|
|
16041
16144
|
return call(getActiveChannelId);
|
|
16042
16145
|
case 1:
|
|
16043
|
-
activeChannelId =
|
|
16146
|
+
activeChannelId = _context17.v;
|
|
16044
16147
|
removeChannelFromMap(channelId);
|
|
16045
16148
|
removeMessagesFromMap(channelId);
|
|
16046
16149
|
if (!(activeChannelId === channelId)) {
|
|
16047
|
-
|
|
16150
|
+
_context17.n = 3;
|
|
16048
16151
|
break;
|
|
16049
16152
|
}
|
|
16050
|
-
|
|
16153
|
+
_context17.n = 2;
|
|
16051
16154
|
return call(getLastChannelFromMap);
|
|
16052
16155
|
case 2:
|
|
16053
|
-
activeChannel =
|
|
16156
|
+
activeChannel = _context17.v;
|
|
16054
16157
|
if (!activeChannel) {
|
|
16055
|
-
|
|
16158
|
+
_context17.n = 3;
|
|
16056
16159
|
break;
|
|
16057
16160
|
}
|
|
16058
|
-
|
|
16161
|
+
_context17.n = 3;
|
|
16059
16162
|
return put(switchChannelActionAC(JSON.parse(JSON.stringify(activeChannel))));
|
|
16060
16163
|
case 3:
|
|
16061
|
-
return
|
|
16164
|
+
return _context17.a(2);
|
|
16062
16165
|
}
|
|
16063
|
-
},
|
|
16166
|
+
}, _marked17);
|
|
16064
16167
|
}
|
|
16065
16168
|
function leaveChannel(action) {
|
|
16066
|
-
var payload, channelId, channel, messageBuilder, messageToSend,
|
|
16067
|
-
return _regenerator().w(function (
|
|
16068
|
-
while (1) switch (
|
|
16169
|
+
var payload, channelId, channel, messageBuilder, messageToSend, _t19;
|
|
16170
|
+
return _regenerator().w(function (_context18) {
|
|
16171
|
+
while (1) switch (_context18.p = _context18.n) {
|
|
16069
16172
|
case 0:
|
|
16070
|
-
|
|
16173
|
+
_context18.p = 0;
|
|
16071
16174
|
payload = action.payload;
|
|
16072
16175
|
channelId = payload.channelId;
|
|
16073
|
-
|
|
16176
|
+
_context18.n = 1;
|
|
16074
16177
|
return call(getChannelFromMap, channelId);
|
|
16075
16178
|
case 1:
|
|
16076
|
-
channel =
|
|
16179
|
+
channel = _context18.v;
|
|
16077
16180
|
if (!channel) {
|
|
16078
16181
|
channel = getChannelFromAllChannels(channelId);
|
|
16079
16182
|
}
|
|
16080
16183
|
if (!channel) {
|
|
16081
|
-
|
|
16184
|
+
_context18.n = 5;
|
|
16082
16185
|
break;
|
|
16083
16186
|
}
|
|
16084
16187
|
if (!(channel.type === DEFAULT_CHANNEL_TYPE.GROUP || channel.type === DEFAULT_CHANNEL_TYPE.PRIVATE)) {
|
|
16085
|
-
|
|
16188
|
+
_context18.n = 2;
|
|
16086
16189
|
break;
|
|
16087
16190
|
}
|
|
16088
16191
|
messageBuilder = channel.createMessageBuilder();
|
|
16089
16192
|
messageBuilder.setBody('LG').setType('system').setDisplayCount(0).setSilent(true);
|
|
16090
16193
|
messageToSend = messageBuilder.create();
|
|
16091
16194
|
log.info('send message for left');
|
|
16092
|
-
|
|
16195
|
+
_context18.n = 2;
|
|
16093
16196
|
return call(channel.sendMessage, messageToSend);
|
|
16094
16197
|
case 2:
|
|
16095
16198
|
log.info('leave');
|
|
16096
|
-
|
|
16199
|
+
_context18.n = 3;
|
|
16097
16200
|
return call(channel.leave);
|
|
16098
16201
|
case 3:
|
|
16099
|
-
|
|
16202
|
+
_context18.n = 4;
|
|
16100
16203
|
return put(removeChannelAC(channelId));
|
|
16101
16204
|
case 4:
|
|
16102
16205
|
deleteChannelFromAllChannels(channelId);
|
|
16103
|
-
|
|
16206
|
+
_context18.n = 5;
|
|
16104
16207
|
return put(removeChannelCachesAC(channelId));
|
|
16105
16208
|
case 5:
|
|
16106
|
-
|
|
16209
|
+
_context18.n = 7;
|
|
16107
16210
|
break;
|
|
16108
16211
|
case 6:
|
|
16109
|
-
|
|
16110
|
-
|
|
16111
|
-
log.error('ERROR in leave channel - ',
|
|
16212
|
+
_context18.p = 6;
|
|
16213
|
+
_t19 = _context18.v;
|
|
16214
|
+
log.error('ERROR in leave channel - ', _t19.message);
|
|
16112
16215
|
case 7:
|
|
16113
|
-
return
|
|
16216
|
+
return _context18.a(2);
|
|
16114
16217
|
}
|
|
16115
|
-
},
|
|
16218
|
+
}, _marked18, null, [[0, 6]]);
|
|
16116
16219
|
}
|
|
16117
16220
|
function deleteChannel(action) {
|
|
16118
|
-
var payload, channelId, channel,
|
|
16119
|
-
return _regenerator().w(function (
|
|
16120
|
-
while (1) switch (
|
|
16221
|
+
var payload, channelId, channel, _t20;
|
|
16222
|
+
return _regenerator().w(function (_context19) {
|
|
16223
|
+
while (1) switch (_context19.p = _context19.n) {
|
|
16121
16224
|
case 0:
|
|
16122
|
-
|
|
16225
|
+
_context19.p = 0;
|
|
16123
16226
|
payload = action.payload;
|
|
16124
16227
|
channelId = payload.channelId;
|
|
16125
|
-
|
|
16228
|
+
_context19.n = 1;
|
|
16126
16229
|
return call(getChannelFromMap, channelId);
|
|
16127
16230
|
case 1:
|
|
16128
|
-
channel =
|
|
16231
|
+
channel = _context19.v;
|
|
16129
16232
|
if (!channel) {
|
|
16130
16233
|
channel = getChannelFromAllChannels(channelId);
|
|
16131
16234
|
}
|
|
16132
16235
|
if (!channel) {
|
|
16133
|
-
|
|
16236
|
+
_context19.n = 5;
|
|
16134
16237
|
break;
|
|
16135
16238
|
}
|
|
16136
|
-
|
|
16239
|
+
_context19.n = 2;
|
|
16137
16240
|
return call(channel["delete"]);
|
|
16138
16241
|
case 2:
|
|
16139
|
-
|
|
16242
|
+
_context19.n = 3;
|
|
16140
16243
|
return put(setChannelToRemoveAC(channel));
|
|
16141
16244
|
case 3:
|
|
16142
|
-
|
|
16245
|
+
_context19.n = 4;
|
|
16143
16246
|
return put(removeChannelAC(channelId));
|
|
16144
16247
|
case 4:
|
|
16145
|
-
|
|
16248
|
+
_context19.n = 5;
|
|
16146
16249
|
return put(removeChannelCachesAC(channelId));
|
|
16147
16250
|
case 5:
|
|
16148
|
-
|
|
16251
|
+
_context19.n = 7;
|
|
16149
16252
|
break;
|
|
16150
16253
|
case 6:
|
|
16151
|
-
|
|
16152
|
-
|
|
16153
|
-
log.error('ERROR in delete channel',
|
|
16254
|
+
_context19.p = 6;
|
|
16255
|
+
_t20 = _context19.v;
|
|
16256
|
+
log.error('ERROR in delete channel', _t20);
|
|
16154
16257
|
case 7:
|
|
16155
|
-
return
|
|
16258
|
+
return _context19.a(2);
|
|
16156
16259
|
}
|
|
16157
|
-
},
|
|
16260
|
+
}, _marked19, null, [[0, 6]]);
|
|
16158
16261
|
}
|
|
16159
16262
|
function blockChannel(action) {
|
|
16160
|
-
var payload, channelId, channel,
|
|
16161
|
-
return _regenerator().w(function (
|
|
16162
|
-
while (1) switch (
|
|
16263
|
+
var payload, channelId, channel, _t21;
|
|
16264
|
+
return _regenerator().w(function (_context20) {
|
|
16265
|
+
while (1) switch (_context20.p = _context20.n) {
|
|
16163
16266
|
case 0:
|
|
16164
|
-
|
|
16267
|
+
_context20.p = 0;
|
|
16165
16268
|
payload = action.payload;
|
|
16166
16269
|
channelId = payload.channelId;
|
|
16167
|
-
|
|
16270
|
+
_context20.n = 1;
|
|
16168
16271
|
return call(getChannelFromMap, channelId);
|
|
16169
16272
|
case 1:
|
|
16170
|
-
channel =
|
|
16273
|
+
channel = _context20.v;
|
|
16171
16274
|
if (!channel) {
|
|
16172
16275
|
channel = getChannelFromAllChannels(channelId);
|
|
16173
16276
|
}
|
|
16174
16277
|
if (!channel) {
|
|
16175
|
-
|
|
16278
|
+
_context20.n = 4;
|
|
16176
16279
|
break;
|
|
16177
16280
|
}
|
|
16178
|
-
|
|
16281
|
+
_context20.n = 2;
|
|
16179
16282
|
return call(channel.block);
|
|
16180
16283
|
case 2:
|
|
16181
|
-
|
|
16284
|
+
_context20.n = 3;
|
|
16182
16285
|
return put(removeChannelAC(channelId));
|
|
16183
16286
|
case 3:
|
|
16184
|
-
|
|
16287
|
+
_context20.n = 4;
|
|
16185
16288
|
return put(removeChannelCachesAC(channelId));
|
|
16186
16289
|
case 4:
|
|
16187
|
-
|
|
16290
|
+
_context20.n = 6;
|
|
16188
16291
|
break;
|
|
16189
16292
|
case 5:
|
|
16190
|
-
|
|
16191
|
-
|
|
16192
|
-
log.error('ERROR in block channel - ',
|
|
16293
|
+
_context20.p = 5;
|
|
16294
|
+
_t21 = _context20.v;
|
|
16295
|
+
log.error('ERROR in block channel - ', _t21.message);
|
|
16193
16296
|
case 6:
|
|
16194
|
-
return
|
|
16297
|
+
return _context20.a(2);
|
|
16195
16298
|
}
|
|
16196
|
-
},
|
|
16299
|
+
}, _marked20, null, [[0, 5]]);
|
|
16197
16300
|
}
|
|
16198
16301
|
function updateChannel(action) {
|
|
16199
|
-
var payload, channelId, config, _SceytChatClient6, channel, paramsToUpdate, fileToUpload, _yield$call5, subject, avatarUrl, metadata,
|
|
16200
|
-
return _regenerator().w(function (
|
|
16201
|
-
while (1) switch (
|
|
16302
|
+
var payload, channelId, config, _SceytChatClient6, channel, paramsToUpdate, fileToUpload, _yield$call5, subject, avatarUrl, metadata, _t22;
|
|
16303
|
+
return _regenerator().w(function (_context21) {
|
|
16304
|
+
while (1) switch (_context21.p = _context21.n) {
|
|
16202
16305
|
case 0:
|
|
16203
|
-
|
|
16306
|
+
_context21.p = 0;
|
|
16204
16307
|
payload = action.payload;
|
|
16205
16308
|
channelId = payload.channelId, config = payload.config;
|
|
16206
16309
|
_SceytChatClient6 = getClient();
|
|
16207
|
-
|
|
16310
|
+
_context21.n = 1;
|
|
16208
16311
|
return call(getChannelFromMap, channelId);
|
|
16209
16312
|
case 1:
|
|
16210
|
-
channel =
|
|
16313
|
+
channel = _context21.v;
|
|
16211
16314
|
if (!channel) {
|
|
16212
16315
|
channel = getChannelFromAllChannels(channelId);
|
|
16213
16316
|
}
|
|
@@ -16218,7 +16321,7 @@ function updateChannel(action) {
|
|
|
16218
16321
|
avatarUrl: channel.avatarUrl
|
|
16219
16322
|
};
|
|
16220
16323
|
if (!config.avatar) {
|
|
16221
|
-
|
|
16324
|
+
_context21.n = 3;
|
|
16222
16325
|
break;
|
|
16223
16326
|
}
|
|
16224
16327
|
fileToUpload = {
|
|
@@ -16227,10 +16330,10 @@ function updateChannel(action) {
|
|
|
16227
16330
|
log.info('upload percent - ', progressPercent);
|
|
16228
16331
|
}
|
|
16229
16332
|
};
|
|
16230
|
-
|
|
16333
|
+
_context21.n = 2;
|
|
16231
16334
|
return call(_SceytChatClient6.uploadFile, fileToUpload);
|
|
16232
16335
|
case 2:
|
|
16233
|
-
paramsToUpdate.avatarUrl =
|
|
16336
|
+
paramsToUpdate.avatarUrl = _context21.v;
|
|
16234
16337
|
case 3:
|
|
16235
16338
|
if (config.subject) {
|
|
16236
16339
|
paramsToUpdate.subject = config.subject;
|
|
@@ -16241,14 +16344,14 @@ function updateChannel(action) {
|
|
|
16241
16344
|
if (config.avatarUrl === '') {
|
|
16242
16345
|
paramsToUpdate.avatarUrl = '';
|
|
16243
16346
|
}
|
|
16244
|
-
|
|
16347
|
+
_context21.n = 4;
|
|
16245
16348
|
return call(channel.update, paramsToUpdate);
|
|
16246
16349
|
case 4:
|
|
16247
|
-
_yield$call5 =
|
|
16350
|
+
_yield$call5 = _context21.v;
|
|
16248
16351
|
subject = _yield$call5.subject;
|
|
16249
16352
|
avatarUrl = _yield$call5.avatarUrl;
|
|
16250
16353
|
metadata = _yield$call5.metadata;
|
|
16251
|
-
|
|
16354
|
+
_context21.n = 5;
|
|
16252
16355
|
return put(updateChannelDataAC(channelId, {
|
|
16253
16356
|
subject: subject,
|
|
16254
16357
|
avatarUrl: avatarUrl,
|
|
@@ -16260,29 +16363,29 @@ function updateChannel(action) {
|
|
|
16260
16363
|
avatarUrl: avatarUrl,
|
|
16261
16364
|
metadata: isJSON(metadata) ? JSON.parse(metadata) : metadata
|
|
16262
16365
|
});
|
|
16263
|
-
|
|
16366
|
+
_context21.n = 7;
|
|
16264
16367
|
break;
|
|
16265
16368
|
case 6:
|
|
16266
|
-
|
|
16267
|
-
|
|
16268
|
-
log.error('ERROR in update channel',
|
|
16369
|
+
_context21.p = 6;
|
|
16370
|
+
_t22 = _context21.v;
|
|
16371
|
+
log.error('ERROR in update channel', _t22.message);
|
|
16269
16372
|
case 7:
|
|
16270
|
-
return
|
|
16373
|
+
return _context21.a(2);
|
|
16271
16374
|
}
|
|
16272
|
-
},
|
|
16375
|
+
}, _marked21, null, [[0, 6]]);
|
|
16273
16376
|
}
|
|
16274
16377
|
function checkUsersStatus() {
|
|
16275
|
-
var _SceytChatClient7, usersForUpdate, updatedUsers, usersToUpdateMap, update, updateData,
|
|
16276
|
-
return _regenerator().w(function (
|
|
16277
|
-
while (1) switch (
|
|
16378
|
+
var _SceytChatClient7, usersForUpdate, updatedUsers, usersToUpdateMap, update, updateData, _t23;
|
|
16379
|
+
return _regenerator().w(function (_context22) {
|
|
16380
|
+
while (1) switch (_context22.p = _context22.n) {
|
|
16278
16381
|
case 0:
|
|
16279
|
-
|
|
16382
|
+
_context22.p = 0;
|
|
16280
16383
|
_SceytChatClient7 = getClient();
|
|
16281
16384
|
usersForUpdate = Object.keys(usersMap);
|
|
16282
|
-
|
|
16385
|
+
_context22.n = 1;
|
|
16283
16386
|
return call(_SceytChatClient7.getUsers, usersForUpdate);
|
|
16284
16387
|
case 1:
|
|
16285
|
-
updatedUsers =
|
|
16388
|
+
updatedUsers = _context22.v;
|
|
16286
16389
|
usersToUpdateMap = {};
|
|
16287
16390
|
update = false;
|
|
16288
16391
|
updatedUsers.forEach(function (updatedUser) {
|
|
@@ -16294,149 +16397,149 @@ function checkUsersStatus() {
|
|
|
16294
16397
|
}
|
|
16295
16398
|
});
|
|
16296
16399
|
if (!update) {
|
|
16297
|
-
|
|
16400
|
+
_context22.n = 4;
|
|
16298
16401
|
break;
|
|
16299
16402
|
}
|
|
16300
16403
|
updateData = JSON.parse(JSON.stringify(usersToUpdateMap));
|
|
16301
|
-
|
|
16404
|
+
_context22.n = 2;
|
|
16302
16405
|
return put(updateMembersPresenceAC(updateData));
|
|
16303
16406
|
case 2:
|
|
16304
|
-
|
|
16407
|
+
_context22.n = 3;
|
|
16305
16408
|
return put(updateUserStatusOnMapAC(updateData));
|
|
16306
16409
|
case 3:
|
|
16307
|
-
|
|
16410
|
+
_context22.n = 4;
|
|
16308
16411
|
return put(updateUserStatusOnChannelAC(updateData));
|
|
16309
16412
|
case 4:
|
|
16310
|
-
|
|
16413
|
+
_context22.n = 6;
|
|
16311
16414
|
break;
|
|
16312
16415
|
case 5:
|
|
16313
|
-
|
|
16314
|
-
|
|
16315
|
-
log.error('ERROR in check user status : ',
|
|
16416
|
+
_context22.p = 5;
|
|
16417
|
+
_t23 = _context22.v;
|
|
16418
|
+
log.error('ERROR in check user status : ', _t23.message);
|
|
16316
16419
|
case 6:
|
|
16317
|
-
return
|
|
16420
|
+
return _context22.a(2);
|
|
16318
16421
|
}
|
|
16319
|
-
},
|
|
16422
|
+
}, _marked22, null, [[0, 5]]);
|
|
16320
16423
|
}
|
|
16321
16424
|
function sendTyping(action) {
|
|
16322
|
-
var state, activeChannelId, channel,
|
|
16323
|
-
return _regenerator().w(function (
|
|
16324
|
-
while (1) switch (
|
|
16425
|
+
var state, activeChannelId, channel, _t24;
|
|
16426
|
+
return _regenerator().w(function (_context23) {
|
|
16427
|
+
while (1) switch (_context23.p = _context23.n) {
|
|
16325
16428
|
case 0:
|
|
16326
16429
|
state = action.payload.state;
|
|
16327
|
-
|
|
16430
|
+
_context23.n = 1;
|
|
16328
16431
|
return call(getActiveChannelId);
|
|
16329
16432
|
case 1:
|
|
16330
|
-
activeChannelId =
|
|
16331
|
-
|
|
16433
|
+
activeChannelId = _context23.v;
|
|
16434
|
+
_context23.n = 2;
|
|
16332
16435
|
return call(getChannelFromMap, activeChannelId);
|
|
16333
16436
|
case 2:
|
|
16334
|
-
channel =
|
|
16335
|
-
|
|
16437
|
+
channel = _context23.v;
|
|
16438
|
+
_context23.p = 3;
|
|
16336
16439
|
if (!channel) {
|
|
16337
|
-
|
|
16440
|
+
_context23.n = 6;
|
|
16338
16441
|
break;
|
|
16339
16442
|
}
|
|
16340
16443
|
if (!state) {
|
|
16341
|
-
|
|
16444
|
+
_context23.n = 5;
|
|
16342
16445
|
break;
|
|
16343
16446
|
}
|
|
16344
|
-
|
|
16447
|
+
_context23.n = 4;
|
|
16345
16448
|
return call(channel.startTyping);
|
|
16346
16449
|
case 4:
|
|
16347
|
-
|
|
16450
|
+
_context23.n = 6;
|
|
16348
16451
|
break;
|
|
16349
16452
|
case 5:
|
|
16350
|
-
|
|
16453
|
+
_context23.n = 6;
|
|
16351
16454
|
return call(channel.stopTyping);
|
|
16352
16455
|
case 6:
|
|
16353
|
-
|
|
16456
|
+
_context23.n = 8;
|
|
16354
16457
|
break;
|
|
16355
16458
|
case 7:
|
|
16356
|
-
|
|
16357
|
-
|
|
16358
|
-
log.error('ERROR in send typing',
|
|
16459
|
+
_context23.p = 7;
|
|
16460
|
+
_t24 = _context23.v;
|
|
16461
|
+
log.error('ERROR in send typing', _t24);
|
|
16359
16462
|
case 8:
|
|
16360
|
-
return
|
|
16463
|
+
return _context23.a(2);
|
|
16361
16464
|
}
|
|
16362
|
-
},
|
|
16465
|
+
}, _marked23, null, [[3, 7]]);
|
|
16363
16466
|
}
|
|
16364
16467
|
function sendRecording(action) {
|
|
16365
|
-
var _action$payload, state, channelId, channel,
|
|
16366
|
-
return _regenerator().w(function (
|
|
16367
|
-
while (1) switch (
|
|
16468
|
+
var _action$payload, state, channelId, channel, _t25;
|
|
16469
|
+
return _regenerator().w(function (_context24) {
|
|
16470
|
+
while (1) switch (_context24.p = _context24.n) {
|
|
16368
16471
|
case 0:
|
|
16369
16472
|
_action$payload = action.payload, state = _action$payload.state, channelId = _action$payload.channelId;
|
|
16370
|
-
|
|
16473
|
+
_context24.n = 1;
|
|
16371
16474
|
return call(getChannelFromMap, channelId);
|
|
16372
16475
|
case 1:
|
|
16373
|
-
channel =
|
|
16374
|
-
|
|
16476
|
+
channel = _context24.v;
|
|
16477
|
+
_context24.p = 2;
|
|
16375
16478
|
if (!channel) {
|
|
16376
|
-
|
|
16479
|
+
_context24.n = 5;
|
|
16377
16480
|
break;
|
|
16378
16481
|
}
|
|
16379
16482
|
if (!state) {
|
|
16380
|
-
|
|
16483
|
+
_context24.n = 4;
|
|
16381
16484
|
break;
|
|
16382
16485
|
}
|
|
16383
|
-
|
|
16486
|
+
_context24.n = 3;
|
|
16384
16487
|
return call(channel.startRecording);
|
|
16385
16488
|
case 3:
|
|
16386
|
-
|
|
16489
|
+
_context24.n = 5;
|
|
16387
16490
|
break;
|
|
16388
16491
|
case 4:
|
|
16389
|
-
|
|
16492
|
+
_context24.n = 5;
|
|
16390
16493
|
return call(channel.stopRecording);
|
|
16391
16494
|
case 5:
|
|
16392
|
-
|
|
16495
|
+
_context24.n = 7;
|
|
16393
16496
|
break;
|
|
16394
16497
|
case 6:
|
|
16395
|
-
|
|
16396
|
-
|
|
16397
|
-
log.error('ERROR in send recording',
|
|
16498
|
+
_context24.p = 6;
|
|
16499
|
+
_t25 = _context24.v;
|
|
16500
|
+
log.error('ERROR in send recording', _t25);
|
|
16398
16501
|
case 7:
|
|
16399
|
-
return
|
|
16502
|
+
return _context24.a(2);
|
|
16400
16503
|
}
|
|
16401
|
-
},
|
|
16504
|
+
}, _marked24, null, [[2, 6]]);
|
|
16402
16505
|
}
|
|
16403
16506
|
function clearHistory(action) {
|
|
16404
|
-
var payload, channelId, channel, activeChannelId, groupName,
|
|
16405
|
-
return _regenerator().w(function (
|
|
16406
|
-
while (1) switch (
|
|
16507
|
+
var payload, channelId, channel, activeChannelId, groupName, _t26;
|
|
16508
|
+
return _regenerator().w(function (_context25) {
|
|
16509
|
+
while (1) switch (_context25.p = _context25.n) {
|
|
16407
16510
|
case 0:
|
|
16408
|
-
|
|
16511
|
+
_context25.p = 0;
|
|
16409
16512
|
payload = action.payload;
|
|
16410
16513
|
channelId = payload.channelId;
|
|
16411
|
-
|
|
16514
|
+
_context25.n = 1;
|
|
16412
16515
|
return call(getChannelFromMap, channelId);
|
|
16413
16516
|
case 1:
|
|
16414
|
-
channel =
|
|
16517
|
+
channel = _context25.v;
|
|
16415
16518
|
if (!channel) {
|
|
16416
16519
|
channel = getChannelFromAllChannels(channelId);
|
|
16417
16520
|
}
|
|
16418
|
-
|
|
16521
|
+
_context25.n = 2;
|
|
16419
16522
|
return call(getActiveChannelId);
|
|
16420
16523
|
case 2:
|
|
16421
|
-
activeChannelId =
|
|
16524
|
+
activeChannelId = _context25.v;
|
|
16422
16525
|
if (!channel) {
|
|
16423
|
-
|
|
16526
|
+
_context25.n = 7;
|
|
16424
16527
|
break;
|
|
16425
16528
|
}
|
|
16426
|
-
|
|
16529
|
+
_context25.n = 3;
|
|
16427
16530
|
return call(channel.deleteAllMessages);
|
|
16428
16531
|
case 3:
|
|
16429
|
-
|
|
16532
|
+
_context25.n = 4;
|
|
16430
16533
|
return put(clearMessagesAC());
|
|
16431
16534
|
case 4:
|
|
16432
16535
|
removeMessagesFromMap(channelId);
|
|
16433
16536
|
if (channelId === activeChannelId) {
|
|
16434
16537
|
removeAllMessages();
|
|
16435
16538
|
}
|
|
16436
|
-
|
|
16539
|
+
_context25.n = 5;
|
|
16437
16540
|
return put(clearSelectedMessagesAC());
|
|
16438
16541
|
case 5:
|
|
16439
|
-
|
|
16542
|
+
_context25.n = 6;
|
|
16440
16543
|
return put(updateChannelDataAC(channel.id, {
|
|
16441
16544
|
lastMessage: null,
|
|
16442
16545
|
newMessageCount: 0,
|
|
@@ -16449,64 +16552,64 @@ function clearHistory(action) {
|
|
|
16449
16552
|
newMentionCount: 0
|
|
16450
16553
|
});
|
|
16451
16554
|
groupName = getChannelGroupName(channel);
|
|
16452
|
-
|
|
16555
|
+
_context25.n = 7;
|
|
16453
16556
|
return put(updateSearchedChannelDataAC(channel.id, {
|
|
16454
16557
|
lastMessage: null,
|
|
16455
16558
|
newMessageCount: 0,
|
|
16456
16559
|
newMentionCount: 0
|
|
16457
16560
|
}, groupName));
|
|
16458
16561
|
case 7:
|
|
16459
|
-
|
|
16562
|
+
_context25.n = 9;
|
|
16460
16563
|
break;
|
|
16461
16564
|
case 8:
|
|
16462
|
-
|
|
16463
|
-
|
|
16464
|
-
log.error('ERROR in clear history',
|
|
16565
|
+
_context25.p = 8;
|
|
16566
|
+
_t26 = _context25.v;
|
|
16567
|
+
log.error('ERROR in clear history', _t26);
|
|
16465
16568
|
case 9:
|
|
16466
|
-
return
|
|
16569
|
+
return _context25.a(2);
|
|
16467
16570
|
}
|
|
16468
|
-
},
|
|
16571
|
+
}, _marked25, null, [[0, 8]]);
|
|
16469
16572
|
}
|
|
16470
16573
|
function deleteAllMessages(action) {
|
|
16471
|
-
var payload, channelId, channel, activeChannelId, groupName,
|
|
16472
|
-
return _regenerator().w(function (
|
|
16473
|
-
while (1) switch (
|
|
16574
|
+
var payload, channelId, channel, activeChannelId, groupName, _t27;
|
|
16575
|
+
return _regenerator().w(function (_context26) {
|
|
16576
|
+
while (1) switch (_context26.p = _context26.n) {
|
|
16474
16577
|
case 0:
|
|
16475
|
-
|
|
16578
|
+
_context26.p = 0;
|
|
16476
16579
|
payload = action.payload;
|
|
16477
16580
|
channelId = payload.channelId;
|
|
16478
|
-
|
|
16581
|
+
_context26.n = 1;
|
|
16479
16582
|
return call(getChannelFromMap, channelId);
|
|
16480
16583
|
case 1:
|
|
16481
|
-
channel =
|
|
16584
|
+
channel = _context26.v;
|
|
16482
16585
|
if (!channel) {
|
|
16483
16586
|
channel = getChannelFromAllChannels(channelId);
|
|
16484
16587
|
}
|
|
16485
|
-
|
|
16588
|
+
_context26.n = 2;
|
|
16486
16589
|
return call(getActiveChannelId);
|
|
16487
16590
|
case 2:
|
|
16488
|
-
activeChannelId =
|
|
16591
|
+
activeChannelId = _context26.v;
|
|
16489
16592
|
if (!channel) {
|
|
16490
|
-
|
|
16593
|
+
_context26.n = 8;
|
|
16491
16594
|
break;
|
|
16492
16595
|
}
|
|
16493
|
-
|
|
16596
|
+
_context26.n = 3;
|
|
16494
16597
|
return call(channel.deleteAllMessages, true);
|
|
16495
16598
|
case 3:
|
|
16496
16599
|
removeMessagesFromMap(channelId);
|
|
16497
16600
|
if (!(channelId === activeChannelId)) {
|
|
16498
|
-
|
|
16601
|
+
_context26.n = 5;
|
|
16499
16602
|
break;
|
|
16500
16603
|
}
|
|
16501
|
-
|
|
16604
|
+
_context26.n = 4;
|
|
16502
16605
|
return put(clearMessagesAC());
|
|
16503
16606
|
case 4:
|
|
16504
16607
|
removeAllMessages();
|
|
16505
16608
|
case 5:
|
|
16506
|
-
|
|
16609
|
+
_context26.n = 6;
|
|
16507
16610
|
return put(clearSelectedMessagesAC());
|
|
16508
16611
|
case 6:
|
|
16509
|
-
|
|
16612
|
+
_context26.n = 7;
|
|
16510
16613
|
return put(updateChannelDataAC(channel.id, {
|
|
16511
16614
|
lastMessage: null,
|
|
16512
16615
|
newMessageCount: 0,
|
|
@@ -16519,182 +16622,185 @@ function deleteAllMessages(action) {
|
|
|
16519
16622
|
newMentionCount: 0
|
|
16520
16623
|
});
|
|
16521
16624
|
groupName = getChannelGroupName(channel);
|
|
16522
|
-
|
|
16625
|
+
_context26.n = 8;
|
|
16523
16626
|
return put(updateSearchedChannelDataAC(channel.id, {
|
|
16524
16627
|
lastMessage: null,
|
|
16525
16628
|
newMessageCount: 0,
|
|
16526
16629
|
newMentionCount: 0
|
|
16527
16630
|
}, groupName));
|
|
16528
16631
|
case 8:
|
|
16529
|
-
|
|
16632
|
+
_context26.n = 10;
|
|
16530
16633
|
break;
|
|
16531
16634
|
case 9:
|
|
16532
|
-
|
|
16533
|
-
|
|
16534
|
-
log.error('ERROR in clear history',
|
|
16635
|
+
_context26.p = 9;
|
|
16636
|
+
_t27 = _context26.v;
|
|
16637
|
+
log.error('ERROR in clear history', _t27);
|
|
16535
16638
|
case 10:
|
|
16536
|
-
return
|
|
16639
|
+
return _context26.a(2);
|
|
16537
16640
|
}
|
|
16538
|
-
},
|
|
16641
|
+
}, _marked26, null, [[0, 9]]);
|
|
16539
16642
|
}
|
|
16540
16643
|
function joinChannel(action) {
|
|
16541
|
-
var payload, channelId, _SceytChatClient8, channel, joinedChannel,
|
|
16542
|
-
return _regenerator().w(function (
|
|
16543
|
-
while (1) switch (
|
|
16644
|
+
var payload, channelId, _SceytChatClient8, channel, joinedChannel, _t28;
|
|
16645
|
+
return _regenerator().w(function (_context27) {
|
|
16646
|
+
while (1) switch (_context27.p = _context27.n) {
|
|
16544
16647
|
case 0:
|
|
16545
|
-
|
|
16648
|
+
_context27.p = 0;
|
|
16546
16649
|
payload = action.payload;
|
|
16547
16650
|
channelId = payload.channelId;
|
|
16548
16651
|
_SceytChatClient8 = getClient();
|
|
16549
|
-
|
|
16652
|
+
_context27.n = 1;
|
|
16550
16653
|
return call(getChannelFromMap, channelId);
|
|
16551
16654
|
case 1:
|
|
16552
|
-
channel =
|
|
16655
|
+
channel = _context27.v;
|
|
16553
16656
|
if (!channel) {
|
|
16554
16657
|
channel = getChannelFromAllChannels(channelId);
|
|
16555
16658
|
}
|
|
16556
16659
|
if (channel) {
|
|
16557
|
-
|
|
16660
|
+
_context27.n = 3;
|
|
16558
16661
|
break;
|
|
16559
16662
|
}
|
|
16560
|
-
|
|
16663
|
+
_context27.n = 2;
|
|
16561
16664
|
return call(_SceytChatClient8.getChannel, channelId);
|
|
16562
16665
|
case 2:
|
|
16563
|
-
channel =
|
|
16666
|
+
channel = _context27.v;
|
|
16564
16667
|
case 3:
|
|
16565
|
-
|
|
16668
|
+
_context27.n = 4;
|
|
16566
16669
|
return call(channel.join);
|
|
16567
16670
|
case 4:
|
|
16568
|
-
joinedChannel =
|
|
16569
|
-
|
|
16671
|
+
joinedChannel = _context27.v;
|
|
16672
|
+
_context27.n = 5;
|
|
16570
16673
|
return put(setCloseSearchChannelsAC(true));
|
|
16571
16674
|
case 5:
|
|
16572
|
-
|
|
16675
|
+
_context27.n = 6;
|
|
16573
16676
|
return put(setChannelToAddAC(JSON.parse(JSON.stringify(joinedChannel))));
|
|
16574
16677
|
case 6:
|
|
16575
|
-
|
|
16678
|
+
_context27.n = 7;
|
|
16576
16679
|
return put(switchChannelActionAC(JSON.parse(JSON.stringify(joinedChannel))));
|
|
16577
16680
|
case 7:
|
|
16578
16681
|
addChannelToAllChannels(joinedChannel);
|
|
16579
|
-
|
|
16682
|
+
_context27.n = 8;
|
|
16580
16683
|
return call(setActiveChannelId, joinedChannel.id);
|
|
16581
16684
|
case 8:
|
|
16582
|
-
|
|
16685
|
+
_context27.n = 10;
|
|
16583
16686
|
break;
|
|
16584
16687
|
case 9:
|
|
16585
|
-
|
|
16586
|
-
|
|
16587
|
-
log.error(
|
|
16688
|
+
_context27.p = 9;
|
|
16689
|
+
_t28 = _context27.v;
|
|
16690
|
+
log.error(_t28, 'Error in join to channel');
|
|
16588
16691
|
case 10:
|
|
16589
|
-
return
|
|
16692
|
+
return _context27.a(2);
|
|
16590
16693
|
}
|
|
16591
|
-
},
|
|
16694
|
+
}, _marked27, null, [[0, 9]]);
|
|
16592
16695
|
}
|
|
16593
16696
|
function watchForChannelEvents() {
|
|
16594
|
-
return _regenerator().w(function (
|
|
16595
|
-
while (1) switch (
|
|
16697
|
+
return _regenerator().w(function (_context28) {
|
|
16698
|
+
while (1) switch (_context28.n) {
|
|
16596
16699
|
case 0:
|
|
16597
|
-
|
|
16700
|
+
_context28.n = 1;
|
|
16598
16701
|
return call(watchForEvents);
|
|
16599
16702
|
case 1:
|
|
16600
|
-
return
|
|
16703
|
+
return _context28.a(2);
|
|
16601
16704
|
}
|
|
16602
|
-
},
|
|
16705
|
+
}, _marked28);
|
|
16603
16706
|
}
|
|
16604
16707
|
function ChannelsSaga() {
|
|
16605
|
-
return _regenerator().w(function (
|
|
16606
|
-
while (1) switch (
|
|
16708
|
+
return _regenerator().w(function (_context29) {
|
|
16709
|
+
while (1) switch (_context29.n) {
|
|
16607
16710
|
case 0:
|
|
16608
|
-
|
|
16711
|
+
_context29.n = 1;
|
|
16609
16712
|
return takeLatest(CREATE_CHANNEL, createChannel);
|
|
16610
16713
|
case 1:
|
|
16611
|
-
|
|
16714
|
+
_context29.n = 2;
|
|
16612
16715
|
return takeLatest(GET_CHANNELS, getChannels);
|
|
16613
16716
|
case 2:
|
|
16614
|
-
|
|
16717
|
+
_context29.n = 3;
|
|
16615
16718
|
return takeLatest(SEARCH_CHANNELS, searchChannels);
|
|
16616
16719
|
case 3:
|
|
16617
|
-
|
|
16720
|
+
_context29.n = 4;
|
|
16618
16721
|
return takeLatest(GET_CHANNELS_FOR_FORWARD, getChannelsForForward);
|
|
16619
16722
|
case 4:
|
|
16620
|
-
|
|
16723
|
+
_context29.n = 5;
|
|
16621
16724
|
return takeLatest(SEARCH_CHANNELS_FOR_FORWARD, searchChannelsForForward);
|
|
16622
16725
|
case 5:
|
|
16623
|
-
|
|
16726
|
+
_context29.n = 6;
|
|
16624
16727
|
return takeLatest(LOAD_MORE_CHANNEL, channelsLoadMore);
|
|
16625
16728
|
case 6:
|
|
16626
|
-
|
|
16729
|
+
_context29.n = 7;
|
|
16627
16730
|
return takeLatest(LOAD_MORE_CHANNELS_FOR_FORWARD, channelsForForwardLoadMore);
|
|
16628
16731
|
case 7:
|
|
16629
|
-
|
|
16732
|
+
_context29.n = 8;
|
|
16630
16733
|
return takeEvery(SWITCH_CHANNEL, switchChannel);
|
|
16631
16734
|
case 8:
|
|
16632
|
-
|
|
16735
|
+
_context29.n = 9;
|
|
16633
16736
|
return takeLatest(LEAVE_CHANNEL, leaveChannel);
|
|
16634
16737
|
case 9:
|
|
16635
|
-
|
|
16738
|
+
_context29.n = 10;
|
|
16636
16739
|
return takeLatest(DELETE_CHANNEL, deleteChannel);
|
|
16637
16740
|
case 10:
|
|
16638
|
-
|
|
16741
|
+
_context29.n = 11;
|
|
16639
16742
|
return takeLatest(BLOCK_CHANNEL, blockChannel);
|
|
16640
16743
|
case 11:
|
|
16641
|
-
|
|
16744
|
+
_context29.n = 12;
|
|
16642
16745
|
return takeLatest(UPDATE_CHANNEL, updateChannel);
|
|
16643
16746
|
case 12:
|
|
16644
|
-
|
|
16747
|
+
_context29.n = 13;
|
|
16645
16748
|
return takeEvery(MARK_MESSAGES_AS_READ, markMessagesRead);
|
|
16646
16749
|
case 13:
|
|
16647
|
-
|
|
16750
|
+
_context29.n = 14;
|
|
16648
16751
|
return takeLatest(MARK_MESSAGES_AS_DELIVERED, markMessagesDelivered);
|
|
16649
16752
|
case 14:
|
|
16650
|
-
|
|
16651
|
-
return takeLatest(
|
|
16753
|
+
_context29.n = 15;
|
|
16754
|
+
return takeLatest(MARK_VOICE_MESSAGE_AS_PLAYED, markVoiceMessageAsPlayed);
|
|
16652
16755
|
case 15:
|
|
16653
|
-
|
|
16654
|
-
return takeLatest(
|
|
16756
|
+
_context29.n = 16;
|
|
16757
|
+
return takeLatest(WATCH_FOR_EVENTS, watchForChannelEvents);
|
|
16655
16758
|
case 16:
|
|
16656
|
-
|
|
16657
|
-
return takeLatest(
|
|
16759
|
+
_context29.n = 17;
|
|
16760
|
+
return takeLatest(TURN_OFF_NOTIFICATION, notificationsTurnOff);
|
|
16658
16761
|
case 17:
|
|
16659
|
-
|
|
16660
|
-
return takeLatest(
|
|
16762
|
+
_context29.n = 18;
|
|
16763
|
+
return takeLatest(TURN_ON_NOTIFICATION, notificationsTurnOn);
|
|
16661
16764
|
case 18:
|
|
16662
|
-
|
|
16663
|
-
return takeLatest(
|
|
16765
|
+
_context29.n = 19;
|
|
16766
|
+
return takeLatest(MARK_CHANNEL_AS_READ, markChannelAsRead);
|
|
16664
16767
|
case 19:
|
|
16665
|
-
|
|
16666
|
-
return takeLatest(
|
|
16768
|
+
_context29.n = 20;
|
|
16769
|
+
return takeLatest(MARK_CHANNEL_AS_UNREAD, markChannelAsUnRead);
|
|
16667
16770
|
case 20:
|
|
16668
|
-
|
|
16669
|
-
return takeLatest(
|
|
16771
|
+
_context29.n = 21;
|
|
16772
|
+
return takeLatest(CHECK_USER_STATUS, checkUsersStatus);
|
|
16670
16773
|
case 21:
|
|
16671
|
-
|
|
16672
|
-
return takeLatest(
|
|
16774
|
+
_context29.n = 22;
|
|
16775
|
+
return takeLatest(SEND_TYPING, sendTyping);
|
|
16673
16776
|
case 22:
|
|
16674
|
-
|
|
16675
|
-
return takeLatest(
|
|
16777
|
+
_context29.n = 23;
|
|
16778
|
+
return takeLatest(SEND_RECORDING, sendRecording);
|
|
16676
16779
|
case 23:
|
|
16677
|
-
|
|
16678
|
-
return takeLatest(
|
|
16780
|
+
_context29.n = 24;
|
|
16781
|
+
return takeLatest(PIN_CHANNEL, pinChannel);
|
|
16679
16782
|
case 24:
|
|
16680
|
-
|
|
16681
|
-
return takeLatest(
|
|
16783
|
+
_context29.n = 25;
|
|
16784
|
+
return takeLatest(UNPIN_CHANNEL, unpinChannel);
|
|
16682
16785
|
case 25:
|
|
16683
|
-
|
|
16684
|
-
return takeLatest(
|
|
16786
|
+
_context29.n = 26;
|
|
16787
|
+
return takeLatest(CLEAR_HISTORY, clearHistory);
|
|
16685
16788
|
case 26:
|
|
16686
|
-
|
|
16687
|
-
return takeLatest(
|
|
16789
|
+
_context29.n = 27;
|
|
16790
|
+
return takeLatest(JOIN_TO_CHANNEL, joinChannel);
|
|
16688
16791
|
case 27:
|
|
16689
|
-
|
|
16690
|
-
return takeLatest(
|
|
16792
|
+
_context29.n = 28;
|
|
16793
|
+
return takeLatest(DELETE_ALL_MESSAGES, deleteAllMessages);
|
|
16691
16794
|
case 28:
|
|
16692
|
-
|
|
16693
|
-
return takeLatest(
|
|
16795
|
+
_context29.n = 29;
|
|
16796
|
+
return takeLatest(REMOVE_CHANNEL_CACHES, removeChannelCaches);
|
|
16694
16797
|
case 29:
|
|
16695
|
-
|
|
16798
|
+
_context29.n = 30;
|
|
16799
|
+
return takeLatest(GET_CHANNEL_MENTIONS, getChannelMentions);
|
|
16800
|
+
case 30:
|
|
16801
|
+
return _context29.a(2);
|
|
16696
16802
|
}
|
|
16697
|
-
},
|
|
16803
|
+
}, _marked29);
|
|
16698
16804
|
}
|
|
16699
16805
|
|
|
16700
16806
|
function rgbaToThumbHash(w, h, rgba) {
|
|
@@ -17114,6 +17220,15 @@ var playingAudioIdSelector = function playingAudioIdSelector(store) {
|
|
|
17114
17220
|
var selectedMessagesMapSelector = function selectedMessagesMapSelector(store) {
|
|
17115
17221
|
return store.MessageReducer.selectedMessagesMap;
|
|
17116
17222
|
};
|
|
17223
|
+
var attachmentUpdatedMapSelector = function attachmentUpdatedMapSelector(store) {
|
|
17224
|
+
return store.MessageReducer.attachmentUpdatedMap;
|
|
17225
|
+
};
|
|
17226
|
+
var messageMarkersSelector = function messageMarkersSelector(store) {
|
|
17227
|
+
return store.MessageReducer.messageMarkers;
|
|
17228
|
+
};
|
|
17229
|
+
var messagesMarkersLoadingStateSelector = function messagesMarkersLoadingStateSelector(store) {
|
|
17230
|
+
return store.MessageReducer.messagesMarkersLoadingState;
|
|
17231
|
+
};
|
|
17117
17232
|
|
|
17118
17233
|
var getFrame = function getFrame(videoSrc, time) {
|
|
17119
17234
|
try {
|
|
@@ -17184,7 +17299,8 @@ var _marked$3 = /*#__PURE__*/_regenerator().m(sendMessage),
|
|
|
17184
17299
|
_marked13$1 = /*#__PURE__*/_regenerator().m(loadMoreMessageAttachments),
|
|
17185
17300
|
_marked14$1 = /*#__PURE__*/_regenerator().m(pauseAttachmentUploading),
|
|
17186
17301
|
_marked15$1 = /*#__PURE__*/_regenerator().m(resumeAttachmentUploading),
|
|
17187
|
-
_marked16$1 = /*#__PURE__*/_regenerator().m(
|
|
17302
|
+
_marked16$1 = /*#__PURE__*/_regenerator().m(getMessageMarkers),
|
|
17303
|
+
_marked17$1 = /*#__PURE__*/_regenerator().m(MessageSaga);
|
|
17188
17304
|
var handleUploadAttachments = function handleUploadAttachments(attachments, message, channel) {
|
|
17189
17305
|
try {
|
|
17190
17306
|
return Promise.resolve(Promise.all(attachments.map(function (attachment) {
|
|
@@ -17270,7 +17386,7 @@ var addPendingMessage = function addPendingMessage(message, messageCopy, channel
|
|
|
17270
17386
|
try {
|
|
17271
17387
|
var messageToAdd = JSON.parse(JSON.stringify(_extends({}, messageCopy, {
|
|
17272
17388
|
createdAt: new Date(Date.now()),
|
|
17273
|
-
mentionedUsers: message.
|
|
17389
|
+
mentionedUsers: message.mentionedUsers,
|
|
17274
17390
|
parentMessage: message.parentMessage
|
|
17275
17391
|
})));
|
|
17276
17392
|
addMessageToMap(channel.id, messageToAdd);
|
|
@@ -17328,7 +17444,7 @@ function sendMessage(action) {
|
|
|
17328
17444
|
_context3.n = 7;
|
|
17329
17445
|
return put(addChannelAC(JSON.parse(JSON.stringify(channel))));
|
|
17330
17446
|
case 7:
|
|
17331
|
-
mentionedUserIds = message.
|
|
17447
|
+
mentionedUserIds = message.mentionedUsers ? message.mentionedUsers.map(function (member) {
|
|
17332
17448
|
return member.id;
|
|
17333
17449
|
}) : [];
|
|
17334
17450
|
customUploader = getCustomUploader();
|
|
@@ -17709,7 +17825,7 @@ function sendTextMessage(action) {
|
|
|
17709
17825
|
_context4.n = 7;
|
|
17710
17826
|
return put(addChannelAC(JSON.parse(JSON.stringify(channel))));
|
|
17711
17827
|
case 7:
|
|
17712
|
-
mentionedUserIds = message.
|
|
17828
|
+
mentionedUserIds = message.mentionedUsers ? message.mentionedUsers.map(function (member) {
|
|
17713
17829
|
return member.id;
|
|
17714
17830
|
}) : [];
|
|
17715
17831
|
attachments = message.attachments;
|
|
@@ -17729,7 +17845,7 @@ function sendTextMessage(action) {
|
|
|
17729
17845
|
messageToSend = messageBuilder.create();
|
|
17730
17846
|
pendingMessage = JSON.parse(JSON.stringify(_extends({}, messageToSend, {
|
|
17731
17847
|
createdAt: new Date(Date.now()),
|
|
17732
|
-
mentionedUsers: message.
|
|
17848
|
+
mentionedUsers: message.mentionedUsers,
|
|
17733
17849
|
parentMessage: message.parentMessage
|
|
17734
17850
|
})));
|
|
17735
17851
|
sendMessageTid = messageToSend.tid;
|
|
@@ -17815,16 +17931,14 @@ function sendTextMessage(action) {
|
|
|
17815
17931
|
case 16:
|
|
17816
17932
|
throw new Error('Connection required to send message');
|
|
17817
17933
|
case 17:
|
|
17934
|
+
store.dispatch(getMessagesAC(channel, true, channel.lastMessage.id, undefined, undefined, false));
|
|
17818
17935
|
_context4.n = 18;
|
|
17819
|
-
return put(scrollToNewMessageAC(true));
|
|
17820
|
-
case 18:
|
|
17821
|
-
_context4.n = 19;
|
|
17822
17936
|
return put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
17823
|
-
case
|
|
17824
|
-
_context4.n =
|
|
17937
|
+
case 18:
|
|
17938
|
+
_context4.n = 21;
|
|
17825
17939
|
break;
|
|
17826
|
-
case
|
|
17827
|
-
_context4.p =
|
|
17940
|
+
case 19:
|
|
17941
|
+
_context4.p = 19;
|
|
17828
17942
|
_t3 = _context4.v;
|
|
17829
17943
|
log.error('error on send text message ... ', _t3);
|
|
17830
17944
|
updateMessageOnMap(channel.id, {
|
|
@@ -17834,23 +17948,23 @@ function sendTextMessage(action) {
|
|
|
17834
17948
|
}
|
|
17835
17949
|
});
|
|
17836
17950
|
if (!(activeChannelId === channel.id)) {
|
|
17837
|
-
_context4.n =
|
|
17951
|
+
_context4.n = 20;
|
|
17838
17952
|
break;
|
|
17839
17953
|
}
|
|
17840
17954
|
updateMessageOnAllMessages(sendMessageTid, {
|
|
17841
17955
|
state: MESSAGE_STATUS.FAILED
|
|
17842
17956
|
});
|
|
17843
|
-
_context4.n =
|
|
17957
|
+
_context4.n = 20;
|
|
17844
17958
|
return put(updateMessageAC(sendMessageTid, {
|
|
17845
17959
|
state: MESSAGE_STATUS.FAILED
|
|
17846
17960
|
}));
|
|
17847
|
-
case
|
|
17848
|
-
_context4.n =
|
|
17961
|
+
case 20:
|
|
17962
|
+
_context4.n = 21;
|
|
17849
17963
|
return put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
17850
|
-
case
|
|
17964
|
+
case 21:
|
|
17851
17965
|
return _context4.a(2);
|
|
17852
17966
|
}
|
|
17853
|
-
}, _marked2$2, null, [[3,
|
|
17967
|
+
}, _marked2$2, null, [[3, 19]]);
|
|
17854
17968
|
}
|
|
17855
17969
|
function forwardMessage(action) {
|
|
17856
17970
|
var payload, message, channelId, connectionState, channel, SceytChatClient, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, messageToSend, pendingMessage, activeChannelId, isCachedChannel, hasNextMessages, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam, _t4;
|
|
@@ -17889,7 +18003,7 @@ function forwardMessage(action) {
|
|
|
17889
18003
|
_context5.n = 6;
|
|
17890
18004
|
return put(addChannelAC(JSON.parse(JSON.stringify(channel))));
|
|
17891
18005
|
case 6:
|
|
17892
|
-
mentionedUserIds = message.
|
|
18006
|
+
mentionedUserIds = message.mentionedUsers ? message.mentionedUsers.map(function (member) {
|
|
17893
18007
|
return member.id;
|
|
17894
18008
|
}) : [];
|
|
17895
18009
|
attachments = message.attachments;
|
|
@@ -17903,7 +18017,7 @@ function forwardMessage(action) {
|
|
|
17903
18017
|
attachments = [att];
|
|
17904
18018
|
}
|
|
17905
18019
|
messageBuilder = channel.createMessageBuilder();
|
|
17906
|
-
messageBuilder.setBody(message.body).setBodyAttributes(message.bodyAttributes).setAttachments(attachments).setMentionUserIds(mentionedUserIds).setType(message.type).setMetadata(message.metadata ? JSON.stringify(message.metadata) : '').setForwardingMessageId(message.forwardingDetails ? message.forwardingDetails.messageId : message.id);
|
|
18020
|
+
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);
|
|
17907
18021
|
messageToSend = messageBuilder.create();
|
|
17908
18022
|
pendingMessage = JSON.parse(JSON.stringify(_extends({}, messageToSend, {
|
|
17909
18023
|
createdAt: new Date(Date.now())
|
|
@@ -19397,64 +19511,112 @@ function resumeAttachmentUploading(action) {
|
|
|
19397
19511
|
}
|
|
19398
19512
|
}, _marked15$1, null, [[0, 2]]);
|
|
19399
19513
|
}
|
|
19400
|
-
function
|
|
19514
|
+
function getMessageMarkers(action) {
|
|
19515
|
+
var _action$payload4, messageId, channelId, deliveryStatus, sceytChatClient, messageMarkerListQueryBuilder, messageMarkerListQuery, messageMarkers, _t18;
|
|
19401
19516
|
return _regenerator().w(function (_context18) {
|
|
19402
|
-
while (1) switch (_context18.n) {
|
|
19517
|
+
while (1) switch (_context18.p = _context18.n) {
|
|
19403
19518
|
case 0:
|
|
19519
|
+
_context18.p = 0;
|
|
19404
19520
|
_context18.n = 1;
|
|
19405
|
-
return
|
|
19521
|
+
return put(setMessagesMarkersLoadingStateAC(LOADING_STATE.LOADING));
|
|
19406
19522
|
case 1:
|
|
19523
|
+
_action$payload4 = action.payload, messageId = _action$payload4.messageId, channelId = _action$payload4.channelId, deliveryStatus = _action$payload4.deliveryStatus;
|
|
19524
|
+
sceytChatClient = getClient();
|
|
19525
|
+
if (!sceytChatClient) {
|
|
19526
|
+
_context18.n = 4;
|
|
19527
|
+
break;
|
|
19528
|
+
}
|
|
19529
|
+
messageMarkerListQueryBuilder = new sceytChatClient.MessageMarkerListQueryBuilder(channelId, String(messageId), deliveryStatus);
|
|
19407
19530
|
_context18.n = 2;
|
|
19408
|
-
return
|
|
19531
|
+
return call(messageMarkerListQueryBuilder.build);
|
|
19409
19532
|
case 2:
|
|
19533
|
+
messageMarkerListQuery = _context18.v;
|
|
19410
19534
|
_context18.n = 3;
|
|
19411
|
-
return
|
|
19535
|
+
return call(messageMarkerListQuery.loadNext);
|
|
19412
19536
|
case 3:
|
|
19537
|
+
messageMarkers = _context18.v;
|
|
19538
|
+
console.log('messageMarkers', messageMarkers);
|
|
19413
19539
|
_context18.n = 4;
|
|
19540
|
+
return put(setMessageMarkersAC(channelId, messageId, messageMarkers.markers, deliveryStatus));
|
|
19541
|
+
case 4:
|
|
19542
|
+
_context18.n = 6;
|
|
19543
|
+
break;
|
|
19544
|
+
case 5:
|
|
19545
|
+
_context18.p = 5;
|
|
19546
|
+
_t18 = _context18.v;
|
|
19547
|
+
log.error('error in get message markers', _t18);
|
|
19548
|
+
case 6:
|
|
19549
|
+
_context18.p = 6;
|
|
19550
|
+
_context18.n = 7;
|
|
19551
|
+
return put(setMessagesMarkersLoadingStateAC(LOADING_STATE.LOADED));
|
|
19552
|
+
case 7:
|
|
19553
|
+
return _context18.f(6);
|
|
19554
|
+
case 8:
|
|
19555
|
+
return _context18.a(2);
|
|
19556
|
+
}
|
|
19557
|
+
}, _marked16$1, null, [[0, 5, 6, 8]]);
|
|
19558
|
+
}
|
|
19559
|
+
function MessageSaga() {
|
|
19560
|
+
return _regenerator().w(function (_context19) {
|
|
19561
|
+
while (1) switch (_context19.n) {
|
|
19562
|
+
case 0:
|
|
19563
|
+
_context19.n = 1;
|
|
19564
|
+
return takeEvery(SEND_MESSAGE, sendMessage);
|
|
19565
|
+
case 1:
|
|
19566
|
+
_context19.n = 2;
|
|
19567
|
+
return takeEvery(SEND_TEXT_MESSAGE, sendTextMessage);
|
|
19568
|
+
case 2:
|
|
19569
|
+
_context19.n = 3;
|
|
19570
|
+
return takeEvery(FORWARD_MESSAGE, forwardMessage);
|
|
19571
|
+
case 3:
|
|
19572
|
+
_context19.n = 4;
|
|
19414
19573
|
return takeEvery(RESEND_MESSAGE, resendMessage);
|
|
19415
19574
|
case 4:
|
|
19416
|
-
|
|
19575
|
+
_context19.n = 5;
|
|
19417
19576
|
return takeLatest(EDIT_MESSAGE, editMessage);
|
|
19418
19577
|
case 5:
|
|
19419
|
-
|
|
19578
|
+
_context19.n = 6;
|
|
19420
19579
|
return takeEvery(DELETE_MESSAGE, deleteMessage);
|
|
19421
19580
|
case 6:
|
|
19422
|
-
|
|
19581
|
+
_context19.n = 7;
|
|
19423
19582
|
return takeLatest(GET_MESSAGES, getMessagesQuery);
|
|
19424
19583
|
case 7:
|
|
19425
|
-
|
|
19584
|
+
_context19.n = 8;
|
|
19426
19585
|
return takeEvery(GET_MESSAGE, getMessageQuery);
|
|
19427
19586
|
case 8:
|
|
19428
|
-
|
|
19429
|
-
return takeLatest(
|
|
19587
|
+
_context19.n = 9;
|
|
19588
|
+
return takeLatest(GET_MESSAGE_MARKERS, getMessageMarkers);
|
|
19430
19589
|
case 9:
|
|
19431
|
-
|
|
19432
|
-
return takeLatest(
|
|
19590
|
+
_context19.n = 10;
|
|
19591
|
+
return takeLatest(GET_MESSAGES_ATTACHMENTS, getMessageAttachments);
|
|
19433
19592
|
case 10:
|
|
19434
|
-
|
|
19435
|
-
return takeLatest(
|
|
19593
|
+
_context19.n = 11;
|
|
19594
|
+
return takeLatest(LOAD_MORE_MESSAGES_ATTACHMENTS, loadMoreMessageAttachments);
|
|
19436
19595
|
case 11:
|
|
19437
|
-
|
|
19438
|
-
return takeLatest(
|
|
19596
|
+
_context19.n = 12;
|
|
19597
|
+
return takeLatest(ADD_REACTION, addReaction);
|
|
19439
19598
|
case 12:
|
|
19440
|
-
|
|
19441
|
-
return
|
|
19599
|
+
_context19.n = 13;
|
|
19600
|
+
return takeLatest(DELETE_REACTION, deleteReaction);
|
|
19442
19601
|
case 13:
|
|
19443
|
-
|
|
19444
|
-
return takeEvery(
|
|
19602
|
+
_context19.n = 14;
|
|
19603
|
+
return takeEvery(LOAD_MORE_MESSAGES, loadMoreMessages);
|
|
19445
19604
|
case 14:
|
|
19446
|
-
|
|
19447
|
-
return takeEvery(
|
|
19605
|
+
_context19.n = 15;
|
|
19606
|
+
return takeEvery(GET_REACTIONS, getReactions);
|
|
19448
19607
|
case 15:
|
|
19449
|
-
|
|
19450
|
-
return takeEvery(
|
|
19608
|
+
_context19.n = 16;
|
|
19609
|
+
return takeEvery(LOAD_MORE_REACTIONS, loadMoreReactions);
|
|
19451
19610
|
case 16:
|
|
19452
|
-
|
|
19453
|
-
return takeEvery(
|
|
19611
|
+
_context19.n = 17;
|
|
19612
|
+
return takeEvery(PAUSE_ATTACHMENT_UPLOADING, pauseAttachmentUploading);
|
|
19454
19613
|
case 17:
|
|
19455
|
-
|
|
19614
|
+
_context19.n = 18;
|
|
19615
|
+
return takeEvery(RESUME_ATTACHMENT_UPLOADING, resumeAttachmentUploading);
|
|
19616
|
+
case 18:
|
|
19617
|
+
return _context19.a(2);
|
|
19456
19618
|
}
|
|
19457
|
-
},
|
|
19619
|
+
}, _marked17$1);
|
|
19458
19620
|
}
|
|
19459
19621
|
|
|
19460
19622
|
var _marked$4 = /*#__PURE__*/_regenerator().m(getMembers),
|
|
@@ -19593,7 +19755,7 @@ function addMembers(action) {
|
|
|
19593
19755
|
m: membersIds
|
|
19594
19756
|
},
|
|
19595
19757
|
body: 'AM',
|
|
19596
|
-
|
|
19758
|
+
mentionedUsers: addedMembers,
|
|
19597
19759
|
attachments: [],
|
|
19598
19760
|
type: 'system'
|
|
19599
19761
|
};
|
|
@@ -19655,7 +19817,7 @@ function kickMemberFromChannel(action) {
|
|
|
19655
19817
|
m: membersIds
|
|
19656
19818
|
},
|
|
19657
19819
|
body: 'RM',
|
|
19658
|
-
|
|
19820
|
+
mentionedUsers: removedMembers,
|
|
19659
19821
|
attachments: [],
|
|
19660
19822
|
type: 'system'
|
|
19661
19823
|
};
|
|
@@ -20455,7 +20617,9 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
20455
20617
|
openChatOnUserInteraction = _ref$openChatOnUserIn === void 0 ? true : _ref$openChatOnUserIn,
|
|
20456
20618
|
_ref$autoSelectFirstC = _ref.autoSelectFirstChannel,
|
|
20457
20619
|
autoSelectFirstChannel = _ref$autoSelectFirstC === void 0 ? false : _ref$autoSelectFirstC,
|
|
20458
|
-
memberCount = _ref.memberCount
|
|
20620
|
+
memberCount = _ref.memberCount,
|
|
20621
|
+
_ref$disableFrowardMe = _ref.disableFrowardMentionsCount,
|
|
20622
|
+
disableFrowardMentionsCount = _ref$disableFrowardMe === void 0 ? false : _ref$disableFrowardMe;
|
|
20459
20623
|
var _useColor = useColors(),
|
|
20460
20624
|
backgroundColor = _useColor[THEME_COLORS.BACKGROUND],
|
|
20461
20625
|
highlightedBackground = _useColor[THEME_COLORS.HIGHLIGHTED_BACKGROUND];
|
|
@@ -20660,6 +20824,9 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
20660
20824
|
useEffect(function () {
|
|
20661
20825
|
setChannelMembersCount(memberCount || 0);
|
|
20662
20826
|
}, [memberCount]);
|
|
20827
|
+
useEffect(function () {
|
|
20828
|
+
setDisableFrowardMentionsCount(disableFrowardMentionsCount);
|
|
20829
|
+
}, [disableFrowardMentionsCount]);
|
|
20663
20830
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, SceytChatClient ? (/*#__PURE__*/React__default.createElement(ChatContainer, {
|
|
20664
20831
|
onDrop: handleDropFile,
|
|
20665
20832
|
onDragOver: handleDragOver,
|
|
@@ -20706,7 +20873,8 @@ var SceytChatContainer = function SceytChatContainer(_ref) {
|
|
|
20706
20873
|
autoSelectFirstChannel = _ref.autoSelectFirstChannel,
|
|
20707
20874
|
_ref$logLevel = _ref.logLevel,
|
|
20708
20875
|
logLevel = _ref$logLevel === void 0 ? 'silent' : _ref$logLevel,
|
|
20709
|
-
memberCount = _ref.memberCount
|
|
20876
|
+
memberCount = _ref.memberCount,
|
|
20877
|
+
disableFrowardMentionsCount = _ref.disableFrowardMentionsCount;
|
|
20710
20878
|
useEffect(function () {
|
|
20711
20879
|
log.setLevel(logLevel);
|
|
20712
20880
|
}, []);
|
|
@@ -20731,7 +20899,8 @@ var SceytChatContainer = function SceytChatContainer(_ref) {
|
|
|
20731
20899
|
openChatOnUserInteraction: openChatOnUserInteraction,
|
|
20732
20900
|
autoSelectFirstChannel: autoSelectFirstChannel,
|
|
20733
20901
|
channelTypeFilter: channelTypeFilter,
|
|
20734
|
-
memberCount: memberCount
|
|
20902
|
+
memberCount: memberCount,
|
|
20903
|
+
disableFrowardMentionsCount: disableFrowardMentionsCount
|
|
20735
20904
|
}));
|
|
20736
20905
|
};
|
|
20737
20906
|
|
|
@@ -21353,7 +21522,7 @@ var Channel = function Channel(_ref3) {
|
|
|
21353
21522
|
if (channelDraftMessage) {
|
|
21354
21523
|
setDraftMessageText(channelDraftMessage.text);
|
|
21355
21524
|
setDraftMessage({
|
|
21356
|
-
mentionedUsers: channelDraftMessage.
|
|
21525
|
+
mentionedUsers: channelDraftMessage.mentionedUsers,
|
|
21357
21526
|
body: channelDraftMessage.text,
|
|
21358
21527
|
bodyAttributes: channelDraftMessage.bodyAttributes
|
|
21359
21528
|
});
|
|
@@ -26380,21 +26549,15 @@ function ReactionsPopup(_ref) {
|
|
|
26380
26549
|
var _useState = useState('all'),
|
|
26381
26550
|
activeTabKey = _useState[0],
|
|
26382
26551
|
setActiveTabKey = _useState[1];
|
|
26383
|
-
var _useState2 = useState(
|
|
26384
|
-
|
|
26385
|
-
|
|
26386
|
-
var _useState3 = useState(
|
|
26387
|
-
|
|
26388
|
-
|
|
26389
|
-
var _useState4 = useState(
|
|
26390
|
-
|
|
26391
|
-
|
|
26392
|
-
var _useState5 = useState(false),
|
|
26393
|
-
calculateSizes = _useState5[0],
|
|
26394
|
-
setCalculateSizes = _useState5[1];
|
|
26395
|
-
var _useState6 = useState(false),
|
|
26396
|
-
closeIsApproved = _useState6[0],
|
|
26397
|
-
setCloseIsApproved = _useState6[1];
|
|
26552
|
+
var _useState2 = useState(0),
|
|
26553
|
+
popupHeight = _useState2[0],
|
|
26554
|
+
setPopupHeight = _useState2[1];
|
|
26555
|
+
var _useState3 = useState(false),
|
|
26556
|
+
calculateSizes = _useState3[0],
|
|
26557
|
+
setCalculateSizes = _useState3[1];
|
|
26558
|
+
var _useState4 = useState(false),
|
|
26559
|
+
closeIsApproved = _useState4[0],
|
|
26560
|
+
setCloseIsApproved = _useState4[1];
|
|
26398
26561
|
var totalReactions = 0;
|
|
26399
26562
|
if (reactionTotals) {
|
|
26400
26563
|
reactionTotals.forEach(function (summery) {
|
|
@@ -26403,9 +26566,9 @@ function ReactionsPopup(_ref) {
|
|
|
26403
26566
|
}
|
|
26404
26567
|
var user = getClient().user;
|
|
26405
26568
|
var dispatch = useDispatch();
|
|
26406
|
-
var
|
|
26407
|
-
isScrolling =
|
|
26408
|
-
setIsScrolling =
|
|
26569
|
+
var _useState5 = useState(false),
|
|
26570
|
+
isScrolling = _useState5[0],
|
|
26571
|
+
setIsScrolling = _useState5[1];
|
|
26409
26572
|
var handleReactionsListScroll = function handleReactionsListScroll(event) {
|
|
26410
26573
|
if (event.target.scrollTop >= event.target.scrollHeight - event.target.offsetHeight - 100 && reactionsHasNext) {
|
|
26411
26574
|
if (reactionsLoadingState === LOADING_STATE.LOADED) {
|
|
@@ -26434,20 +26597,23 @@ function ReactionsPopup(_ref) {
|
|
|
26434
26597
|
dispatch(setReactionsListAC([], true));
|
|
26435
26598
|
};
|
|
26436
26599
|
}, [messageId]);
|
|
26437
|
-
|
|
26600
|
+
var scoresHeight = useMemo(function () {
|
|
26438
26601
|
var scoresElem = scoresRef.current;
|
|
26439
26602
|
if (scoresElem) {
|
|
26440
|
-
|
|
26603
|
+
return scoresElem.offsetHeight;
|
|
26441
26604
|
}
|
|
26442
|
-
|
|
26605
|
+
return 0;
|
|
26606
|
+
}, [scoresRef]);
|
|
26443
26607
|
useEffect(function () {
|
|
26444
26608
|
if (!reactionTotals || !reactionTotals.length) {
|
|
26445
26609
|
handleReactionsPopupClose();
|
|
26446
26610
|
}
|
|
26447
26611
|
}, [reactionTotals]);
|
|
26612
|
+
var reactionsHeight = useMemo(function () {
|
|
26613
|
+
return reactions.length * 50 + 45;
|
|
26614
|
+
}, [reactions]);
|
|
26448
26615
|
useEffect(function () {
|
|
26449
26616
|
if (reactions && reactionsPrevLength < reactions.length) {
|
|
26450
|
-
var reactionsHeight = reactions.length * 44 + 45;
|
|
26451
26617
|
if (reactionsHeight > popupHeight) {
|
|
26452
26618
|
setPopupHeight(reactionsHeight);
|
|
26453
26619
|
}
|
|
@@ -26457,14 +26623,15 @@ function ReactionsPopup(_ref) {
|
|
|
26457
26623
|
}
|
|
26458
26624
|
if (reactions && reactions.length) {
|
|
26459
26625
|
if (calculateSizes) {
|
|
26460
|
-
|
|
26461
|
-
var _reactionsHeight = reactions.length * 50 + 45;
|
|
26462
|
-
setPopupHeight(_reactionsHeight);
|
|
26463
|
-
setPopupVerticalPosition(botPost >= (_reactionsHeight > 320 ? 320 : _reactionsHeight) ? 'bottom' : 'top');
|
|
26626
|
+
setPopupHeight(reactionsHeight);
|
|
26464
26627
|
setCalculateSizes(false);
|
|
26465
26628
|
}
|
|
26466
26629
|
}
|
|
26467
|
-
}, [reactions]);
|
|
26630
|
+
}, [reactions, reactionsHeight]);
|
|
26631
|
+
var popupVerticalPosition = useMemo(function () {
|
|
26632
|
+
var botPost = bottomPosition - messageInputHeight - 40;
|
|
26633
|
+
return botPost >= (reactionsHeight > 320 ? 320 : reactionsHeight) ? 'bottom' : 'top';
|
|
26634
|
+
}, [bottomPosition, messageInputHeight, reactionsHeight]);
|
|
26468
26635
|
return /*#__PURE__*/React__default.createElement(Container$d, {
|
|
26469
26636
|
ref: popupRef,
|
|
26470
26637
|
popupVerticalPosition: popupVerticalPosition,
|
|
@@ -26522,7 +26689,10 @@ function ReactionsPopup(_ref) {
|
|
|
26522
26689
|
}, reactions.map(function (reaction) {
|
|
26523
26690
|
return /*#__PURE__*/React__default.createElement(ReactionItem$1, {
|
|
26524
26691
|
key: reaction.id,
|
|
26525
|
-
hoverBackgroundColor: backgroundHovered
|
|
26692
|
+
hoverBackgroundColor: backgroundHovered,
|
|
26693
|
+
onClick: function onClick() {
|
|
26694
|
+
return handleAddDeleteEmoji(reaction.key);
|
|
26695
|
+
}
|
|
26526
26696
|
}, /*#__PURE__*/React__default.createElement(AvatarWrapper, null, /*#__PURE__*/React__default.createElement(Avatar, {
|
|
26527
26697
|
name: reaction.user.firstName || reaction.user.id,
|
|
26528
26698
|
image: reaction.user.avatarUrl,
|
|
@@ -26533,11 +26703,7 @@ function ReactionsPopup(_ref) {
|
|
|
26533
26703
|
color: textPrimary
|
|
26534
26704
|
}, makeUsername(reaction.user.id === user.id ? reaction.user : contactsMap[reaction.user.id], reaction.user, getFromContacts)), /*#__PURE__*/React__default.createElement(SubTitle, {
|
|
26535
26705
|
color: textSecondary
|
|
26536
|
-
}, reaction.user.presence && reaction.user.presence.state === USER_PRESENCE_STATUS.ONLINE ? 'Online' : reaction.user.presence && reaction.user.presence.lastActiveAt && userLastActiveDateFormat(reaction.user.presence.lastActiveAt))), /*#__PURE__*/React__default.createElement(ReactionKey,
|
|
26537
|
-
onClick: function onClick() {
|
|
26538
|
-
return handleAddDeleteEmoji(reaction.key);
|
|
26539
|
-
}
|
|
26540
|
-
}, reaction.key));
|
|
26706
|
+
}, reaction.user.presence && reaction.user.presence.state === USER_PRESENCE_STATUS.ONLINE ? 'Online' : reaction.user.presence && reaction.user.presence.lastActiveAt && userLastActiveDateFormat(reaction.user.presence.lastActiveAt))), /*#__PURE__*/React__default.createElement(ReactionKey, null, reaction.key));
|
|
26541
26707
|
})));
|
|
26542
26708
|
}
|
|
26543
26709
|
var Container$d = styled.div(_templateObject$q || (_templateObject$q = _taggedTemplateLiteralLoose(["\n position: absolute;\n /*right: ", ";*/\n right: ", ";\n /*left: ", ";*/\n left: ", ";\n top: ", ";\n bottom: ", ";\n width: 340px;\n height: ", "px;\n //overflow: ", ";\n overflow: hidden;\n max-height: 320px;\n background: ", ";\n //border: 1px solid #dfe0eb;\n box-shadow:\n 0 6px 24px -6px rgba(15, 34, 67, 0.12),\n 0px 1px 3px rgba(24, 23, 37, 0.14);\n box-sizing: border-box;\n //box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);\n border-radius: ", ";\n visibility: ", ";\n transition: all 0.2s;\n\n direction: initial;\n z-index: 12;\n &::after {\n content: '';\n position: absolute;\n width: 12px;\n height: 12px;\n\n right: ", ";\n left: ", ";\n top: ", ";\n bottom: ", ";\n transform: rotate(45deg);\n box-shadow: ", ";\n border-radius: 2px;\n visibility: ", ";\n transition-delay: 150ms;\n transition-property: visibility;\n\n background: ", ";\n }\n"])), function (props) {
|
|
@@ -26607,7 +26773,7 @@ var ReactionScoreItem = styled.div(_templateObject8$9 || (_templateObject8$9 = _
|
|
|
26607
26773
|
return props.active && !props.bubbleStyle && "\n &::after {\n content: '';\n position: absolute;\n left: 0;\n bottom: -13px;\n width: 100%;\n height: 2px;\n background-color: " + props.activeColor + ";\n border-radius: 2px;\n }\n ";
|
|
26608
26774
|
}, TabKey);
|
|
26609
26775
|
var ReactionKey = styled.span(_templateObject9$9 || (_templateObject9$9 = _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 font-size: 20px;\n cursor: pointer;\n"])));
|
|
26610
|
-
var ReactionItem$1 = styled.li(_templateObject0$8 || (_templateObject0$8 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-size: 15px;\n padding: 6px 16px;\n transition: all 0.2s;\n\n &:hover {\n background-color: ", ";\n }\n\n & ", " {\n width: 10px;\n height: 10px;\n }\n"])), function (props) {
|
|
26776
|
+
var ReactionItem$1 = styled.li(_templateObject0$8 || (_templateObject0$8 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-size: 15px;\n padding: 6px 16px;\n transition: all 0.2s;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n\n & ", " {\n width: 10px;\n height: 10px;\n }\n"])), function (props) {
|
|
26611
26777
|
return props.hoverBackgroundColor;
|
|
26612
26778
|
}, UserStatus);
|
|
26613
26779
|
|
|
@@ -26872,6 +27038,7 @@ function MessageActions(_ref) {
|
|
|
26872
27038
|
messageStatus = _ref.messageStatus,
|
|
26873
27039
|
handleSelectMessage = _ref.handleSelectMessage,
|
|
26874
27040
|
handleReplyMessage = _ref.handleReplyMessage,
|
|
27041
|
+
handleOpenInfoMessage = _ref.handleOpenInfoMessage,
|
|
26875
27042
|
isThreadMessage = _ref.isThreadMessage,
|
|
26876
27043
|
rtlDirection = _ref.rtlDirection,
|
|
26877
27044
|
showMessageReaction = _ref.showMessageReaction,
|
|
@@ -26883,6 +27050,8 @@ function MessageActions(_ref) {
|
|
|
26883
27050
|
showDeleteMessage = _ref.showDeleteMessage,
|
|
26884
27051
|
showSelectMessage = _ref.showSelectMessage,
|
|
26885
27052
|
showReportMessage = _ref.showReportMessage,
|
|
27053
|
+
showInfoMessage = _ref.showInfoMessage,
|
|
27054
|
+
infoIconOrder = _ref.infoIconOrder,
|
|
26886
27055
|
reactionIcon = _ref.reactionIcon,
|
|
26887
27056
|
editIcon = _ref.editIcon,
|
|
26888
27057
|
copyIcon = _ref.copyIcon,
|
|
@@ -26890,6 +27059,7 @@ function MessageActions(_ref) {
|
|
|
26890
27059
|
replyInThreadIcon = _ref.replyInThreadIcon,
|
|
26891
27060
|
deleteIcon = _ref.deleteIcon,
|
|
26892
27061
|
selectIcon = _ref.selectIcon,
|
|
27062
|
+
infoIcon = _ref.infoIcon,
|
|
26893
27063
|
allowEditDeleteIncomingMessage = _ref.allowEditDeleteIncomingMessage,
|
|
26894
27064
|
reportIcon = _ref.reportIcon,
|
|
26895
27065
|
reactionIconOrder = _ref.reactionIconOrder,
|
|
@@ -26910,6 +27080,7 @@ function MessageActions(_ref) {
|
|
|
26910
27080
|
forwardIconTooltipText = _ref.forwardIconTooltipText,
|
|
26911
27081
|
deleteIconTooltipText = _ref.deleteIconTooltipText,
|
|
26912
27082
|
selectIconTooltipText = _ref.selectIconTooltipText,
|
|
27083
|
+
infoIconTooltipText = _ref.infoIconTooltipText,
|
|
26913
27084
|
reportIconTooltipText = _ref.reportIconTooltipText,
|
|
26914
27085
|
myRole = _ref.myRole,
|
|
26915
27086
|
isIncoming = _ref.isIncoming,
|
|
@@ -27038,8 +27209,20 @@ function MessageActions(_ref) {
|
|
|
27038
27209
|
disabledColor: textSecondary,
|
|
27039
27210
|
bgColor: tooltipBackground,
|
|
27040
27211
|
direction: 'top'
|
|
27041
|
-
}, selectIconTooltipText || 'Select', /*#__PURE__*/React__default.createElement(SvgArrowDown, null)), selectIcon || /*#__PURE__*/React__default.createElement(SvgCheckCircle, null))),
|
|
27042
|
-
order:
|
|
27212
|
+
}, selectIconTooltipText || 'Select', /*#__PURE__*/React__default.createElement(SvgArrowDown, null)), selectIcon || /*#__PURE__*/React__default.createElement(SvgCheckCircle, null))), showInfoMessage && !isIncoming && (/*#__PURE__*/React__default.createElement(Action, {
|
|
27213
|
+
order: infoIconOrder || 7,
|
|
27214
|
+
iconColor: messageActionIconsColor || iconInactive,
|
|
27215
|
+
hoverBackgroundColor: backgroundHovered,
|
|
27216
|
+
hoverIconColor: accentColor,
|
|
27217
|
+
onClick: function onClick() {
|
|
27218
|
+
return handleOpenInfoMessage();
|
|
27219
|
+
}
|
|
27220
|
+
}, /*#__PURE__*/React__default.createElement(ItemNote, {
|
|
27221
|
+
disabledColor: textSecondary,
|
|
27222
|
+
bgColor: tooltipBackground,
|
|
27223
|
+
direction: 'top'
|
|
27224
|
+
}, infoIconTooltipText || 'Info', /*#__PURE__*/React__default.createElement(SvgArrowDown, null)), infoIcon || /*#__PURE__*/React__default.createElement(SvgInfo, null))), showDeleteMessage && (channel.type === DEFAULT_CHANNEL_TYPE.BROADCAST || channel.type === DEFAULT_CHANNEL_TYPE.PUBLIC ? myRole === 'owner' || myRole === 'admin' : true) && (/*#__PURE__*/React__default.createElement(Action, {
|
|
27225
|
+
order: deleteIconOrder || 8,
|
|
27043
27226
|
iconColor: messageActionIconsColor || warningColor,
|
|
27044
27227
|
hoverBackgroundColor: backgroundHovered,
|
|
27045
27228
|
hoverIconColor: accentColor,
|
|
@@ -27051,7 +27234,7 @@ function MessageActions(_ref) {
|
|
|
27051
27234
|
bgColor: tooltipBackground,
|
|
27052
27235
|
direction: 'top'
|
|
27053
27236
|
}, deleteIconTooltipText || 'Delete Message', /*#__PURE__*/React__default.createElement(SvgArrowDown, null)), deleteIcon || /*#__PURE__*/React__default.createElement(SvgDeleteIcon, null))), showReportMessage && messageStatus !== MESSAGE_DELIVERY_STATUS.PENDING && (/*#__PURE__*/React__default.createElement(Action, {
|
|
27054
|
-
order: reportIconOrder ||
|
|
27237
|
+
order: reportIconOrder || 9,
|
|
27055
27238
|
iconColor: messageActionIconsColor || iconInactive,
|
|
27056
27239
|
hoverBackgroundColor: backgroundHovered,
|
|
27057
27240
|
hoverIconColor: accentColor,
|
|
@@ -29313,7 +29496,10 @@ WaveSurfer.dom = dom;
|
|
|
29313
29496
|
var _templateObject$t, _templateObject2$p, _templateObject3$j, _templateObject4$g, _templateObject5$e, _templateObject6$c;
|
|
29314
29497
|
var AudioPlayer = function AudioPlayer(_ref) {
|
|
29315
29498
|
var url = _ref.url,
|
|
29316
|
-
file = _ref.file
|
|
29499
|
+
file = _ref.file,
|
|
29500
|
+
messagePlayed = _ref.messagePlayed,
|
|
29501
|
+
channelId = _ref.channelId,
|
|
29502
|
+
incoming = _ref.incoming;
|
|
29317
29503
|
var recordingInitialState = {
|
|
29318
29504
|
recordingSeconds: 0,
|
|
29319
29505
|
recordingMilliseconds: 0,
|
|
@@ -29379,6 +29565,9 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
29379
29565
|
}
|
|
29380
29566
|
}
|
|
29381
29567
|
wavesurfer.current.playPause();
|
|
29568
|
+
if (!messagePlayed && incoming) {
|
|
29569
|
+
dispatch(markVoiceMessageAsPlayedAC(channelId, [file.messageId]));
|
|
29570
|
+
}
|
|
29382
29571
|
}
|
|
29383
29572
|
};
|
|
29384
29573
|
useEffect(function () {
|
|
@@ -29556,7 +29745,10 @@ var Attachment = function Attachment(_ref) {
|
|
|
29556
29745
|
imageAttachmentMaxHeight = _ref.imageAttachmentMaxHeight,
|
|
29557
29746
|
videoAttachmentMaxWidth = _ref.videoAttachmentMaxWidth,
|
|
29558
29747
|
videoAttachmentMaxHeight = _ref.videoAttachmentMaxHeight,
|
|
29559
|
-
messageType = _ref.messageType
|
|
29748
|
+
messageType = _ref.messageType,
|
|
29749
|
+
messagePlayed = _ref.messagePlayed,
|
|
29750
|
+
channelId = _ref.channelId,
|
|
29751
|
+
incoming = _ref.incoming;
|
|
29560
29752
|
var _useColor = useColors(),
|
|
29561
29753
|
accentColor = _useColor[THEME_COLORS.ACCENT],
|
|
29562
29754
|
textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY],
|
|
@@ -29574,13 +29766,17 @@ var Attachment = function Attachment(_ref) {
|
|
|
29574
29766
|
var connectionStatus = useSelector(connectionStatusSelector);
|
|
29575
29767
|
var theme = useSelector(themeSelector);
|
|
29576
29768
|
var imageContRef = useRef(null);
|
|
29577
|
-
var
|
|
29769
|
+
var attachmentUpdatedMap = useSelector(attachmentUpdatedMapSelector) || {};
|
|
29770
|
+
var attachmentUrlFromMap = useMemo(function () {
|
|
29771
|
+
return attachmentUpdatedMap[attachment.url];
|
|
29772
|
+
}, [attachmentUpdatedMap, attachment.url]);
|
|
29773
|
+
var _useState = useState(!attachmentUrlFromMap),
|
|
29578
29774
|
imageLoading = _useState[0],
|
|
29579
29775
|
setImageLoading = _useState[1];
|
|
29580
29776
|
var _useState2 = useState(false),
|
|
29581
29777
|
downloadingFile = _useState2[0],
|
|
29582
29778
|
setDownloadingFile = _useState2[1];
|
|
29583
|
-
var _useState3 = useState(
|
|
29779
|
+
var _useState3 = useState(attachmentUrlFromMap),
|
|
29584
29780
|
attachmentUrl = _useState3[0],
|
|
29585
29781
|
setAttachmentUrl = _useState3[1];
|
|
29586
29782
|
var _useState4 = useState(),
|
|
@@ -29604,27 +29800,26 @@ var Attachment = function Attachment(_ref) {
|
|
|
29604
29800
|
var fileNameRef = useRef(null);
|
|
29605
29801
|
var customDownloader = getCustomDownloader();
|
|
29606
29802
|
var previewFileType = isPreview && attachment.data.type.split('/')[0];
|
|
29803
|
+
var attachmentMetadata = useMemo(function () {
|
|
29804
|
+
return isJSON(attachment.metadata) ? JSON.parse(attachment.metadata) : attachment.metadata;
|
|
29805
|
+
}, [attachment.metadata]);
|
|
29607
29806
|
var _useMemo = useMemo(function () {
|
|
29608
29807
|
var attachmentData = null;
|
|
29609
|
-
|
|
29610
|
-
attachmentData = isJSON(attachment.metadata) ? JSON.parse(attachment.metadata) : attachment.metadata;
|
|
29611
|
-
} else if (attachment.metadata && attachment.metadata.szw && attachment.metadata.szh) {
|
|
29612
|
-
attachmentData = attachment.metadata;
|
|
29613
|
-
}
|
|
29808
|
+
attachmentData = attachmentMetadata;
|
|
29614
29809
|
return attachmentData && attachmentData.szw && attachmentData.szh ? calculateRenderedImageWidth(attachmentData.szw, attachmentData.szh, attachment.type === attachmentTypes.image ? imageAttachmentMaxWidth : videoAttachmentMaxWidth, attachment.type === attachmentTypes.image ? imageAttachmentMaxHeight || 400 : videoAttachmentMaxHeight) : [];
|
|
29615
|
-
}, []),
|
|
29810
|
+
}, [attachmentMetadata]),
|
|
29616
29811
|
renderWidth = _useMemo[0],
|
|
29617
29812
|
renderHeight = _useMemo[1];
|
|
29618
29813
|
var isInUploadingState = attachmentCompilationState[attachment.tid] && (attachmentCompilationState[attachment.tid] === UPLOAD_STATE.UPLOADING || attachmentCompilationState[attachment.tid] === UPLOAD_STATE.PAUSED);
|
|
29619
29814
|
var attachmentThumb;
|
|
29620
29815
|
var withPrefix = true;
|
|
29621
|
-
if (attachment.type !== attachmentTypes.voice && attachment.type !== attachmentTypes.link &&
|
|
29816
|
+
if (attachment.type !== attachmentTypes.voice && attachment.type !== attachmentTypes.link && attachmentMetadata && attachmentMetadata.tmb) {
|
|
29622
29817
|
try {
|
|
29623
|
-
if (
|
|
29624
|
-
attachmentThumb = base64ToToDataURL(
|
|
29818
|
+
if (attachmentMetadata.tmb.length < 70) {
|
|
29819
|
+
attachmentThumb = base64ToToDataURL(attachmentMetadata.tmb);
|
|
29625
29820
|
withPrefix = false;
|
|
29626
29821
|
} else {
|
|
29627
|
-
attachmentThumb =
|
|
29822
|
+
attachmentThumb = attachmentMetadata && attachmentMetadata.tmb;
|
|
29628
29823
|
}
|
|
29629
29824
|
} catch (e) {
|
|
29630
29825
|
log.error('error on get attachmentThumb', e);
|
|
@@ -29788,9 +29983,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
29788
29983
|
if (attachment.type === attachmentTypes.image && !isPreview) {
|
|
29789
29984
|
if (cachedUrl) {
|
|
29790
29985
|
setAttachmentUrl(cachedUrl);
|
|
29791
|
-
dispatch(setUpdateMessageAttachmentAC(attachment.url,
|
|
29792
|
-
attachmentUrl: cachedUrl
|
|
29793
|
-
}));
|
|
29986
|
+
dispatch(setUpdateMessageAttachmentAC(attachment.url, cachedUrl));
|
|
29794
29987
|
setIsCached(true);
|
|
29795
29988
|
} else {
|
|
29796
29989
|
setIsCached(false);
|
|
@@ -30074,7 +30267,10 @@ var Attachment = function Attachment(_ref) {
|
|
|
30074
30267
|
}
|
|
30075
30268
|
}))))) : attachment.type === attachmentTypes.voice ? (/*#__PURE__*/React__default.createElement(AudioPlayer, {
|
|
30076
30269
|
url: attachment.attachmentUrl || attachmentUrl,
|
|
30077
|
-
file: attachment
|
|
30270
|
+
file: attachment,
|
|
30271
|
+
messagePlayed: messagePlayed,
|
|
30272
|
+
channelId: channelId,
|
|
30273
|
+
incoming: incoming
|
|
30078
30274
|
})) : attachment.type === attachmentTypes.link ? null : (
|
|
30079
30275
|
/*#__PURE__*/
|
|
30080
30276
|
React__default.createElement(AttachmentFile$1, {
|
|
@@ -31363,54 +31559,99 @@ var validateUrl = function validateUrl(url) {
|
|
|
31363
31559
|
}
|
|
31364
31560
|
};
|
|
31365
31561
|
var OGMetadata = function OGMetadata(_ref) {
|
|
31366
|
-
var _metadata$
|
|
31562
|
+
var _metadata$og4, _metadata$og4$image, _metadata$og4$image$, _metadata$og5, _metadata$og5$image, _metadata$og5$image$, _metadata$og6, _metadata$og7, _metadata$og7$favicon, _metadata$og8, _metadata$og8$favicon, _metadata$og9, _metadata$og0, _metadata$og1;
|
|
31367
31563
|
var attachments = _ref.attachments,
|
|
31368
|
-
state = _ref.state
|
|
31369
|
-
|
|
31370
|
-
|
|
31371
|
-
|
|
31372
|
-
|
|
31373
|
-
|
|
31374
|
-
|
|
31375
|
-
|
|
31376
|
-
|
|
31377
|
-
setFaviconLoadError = _useState3[1];
|
|
31378
|
-
var _useState4 = useState(false),
|
|
31379
|
-
imageLoaded = _useState4[0],
|
|
31380
|
-
setImageLoaded = _useState4[1];
|
|
31381
|
-
var _useState5 = useState(0),
|
|
31382
|
-
imageWidth = _useState5[0],
|
|
31383
|
-
setImageWidth = _useState5[1];
|
|
31384
|
-
var _useState6 = useState(0),
|
|
31385
|
-
imageHeight = _useState6[0],
|
|
31386
|
-
setImageHeight = _useState6[1];
|
|
31564
|
+
state = _ref.state,
|
|
31565
|
+
incoming = _ref.incoming;
|
|
31566
|
+
var dispatch = useDispatch();
|
|
31567
|
+
var oGMetadata = useSelector(function (state) {
|
|
31568
|
+
return state.MessageReducer.oGMetadata;
|
|
31569
|
+
});
|
|
31570
|
+
var _useColor = useColors(),
|
|
31571
|
+
incomingMessageBackgroundX = _useColor[THEME_COLORS.INCOMING_MESSAGE_BACKGROUND_X],
|
|
31572
|
+
outgoingMessageBackgroundX = _useColor[THEME_COLORS.OUTGOING_MESSAGE_BACKGROUND_X];
|
|
31387
31573
|
var attachment = useMemo(function () {
|
|
31388
31574
|
return attachments.find(function (attachment) {
|
|
31389
31575
|
return attachment.type === attachmentTypes.link;
|
|
31390
31576
|
});
|
|
31391
31577
|
}, [attachments]);
|
|
31578
|
+
var metadata = useMemo(function () {
|
|
31579
|
+
return oGMetadata[attachment === null || attachment === void 0 ? void 0 : attachment.url] || null;
|
|
31580
|
+
}, [oGMetadata, attachment === null || attachment === void 0 ? void 0 : attachment.url]);
|
|
31581
|
+
var _useState = useState(false),
|
|
31582
|
+
imageLoadError = _useState[0],
|
|
31583
|
+
setImageLoadError = _useState[1];
|
|
31584
|
+
var _useState2 = useState(false),
|
|
31585
|
+
faviconLoadError = _useState2[0],
|
|
31586
|
+
setFaviconLoadError = _useState2[1];
|
|
31587
|
+
var _useState3 = useState(false),
|
|
31588
|
+
shouldAnimate = _useState3[0],
|
|
31589
|
+
setShouldAnimate = _useState3[1];
|
|
31590
|
+
var handleMetadata = useCallback(function (metadata) {
|
|
31591
|
+
if (metadata) {
|
|
31592
|
+
dispatch(setOGMetadataAC(attachment === null || attachment === void 0 ? void 0 : attachment.url, metadata));
|
|
31593
|
+
} else {
|
|
31594
|
+
dispatch(setOGMetadataAC(attachment === null || attachment === void 0 ? void 0 : attachment.url, null));
|
|
31595
|
+
}
|
|
31596
|
+
}, []);
|
|
31392
31597
|
var ogMetadataQueryBuilder = useCallback(function (url) {
|
|
31393
31598
|
try {
|
|
31394
31599
|
var client = getClient();
|
|
31395
|
-
var
|
|
31600
|
+
var _temp3 = function () {
|
|
31396
31601
|
if (client) {
|
|
31397
|
-
var
|
|
31602
|
+
var _temp2 = _catch(function () {
|
|
31398
31603
|
var queryBuilder = new client.MessageLinkOGQueryBuilder(url);
|
|
31399
31604
|
return Promise.resolve(queryBuilder.build()).then(function (query) {
|
|
31400
31605
|
return Promise.resolve(query.loadOGData()).then(function (metadata) {
|
|
31401
|
-
|
|
31402
|
-
|
|
31403
|
-
|
|
31606
|
+
var _metadata$og, _metadata$og$image, _metadata$og$image$;
|
|
31607
|
+
var image = new Image();
|
|
31608
|
+
image.src = metadata === null || metadata === void 0 ? void 0 : (_metadata$og = metadata.og) === null || _metadata$og === void 0 ? void 0 : (_metadata$og$image = _metadata$og.image) === null || _metadata$og$image === void 0 ? void 0 : (_metadata$og$image$ = _metadata$og$image[0]) === null || _metadata$og$image$ === void 0 ? void 0 : _metadata$og$image$.url;
|
|
31609
|
+
var _temp = function () {
|
|
31610
|
+
if (image.src) {
|
|
31611
|
+
image.onload = function () {
|
|
31612
|
+
try {
|
|
31613
|
+
var imageWidth = image.width;
|
|
31614
|
+
var imageHeight = image.height;
|
|
31615
|
+
return Promise.resolve(storeMetadata(url, _extends({}, metadata, {
|
|
31616
|
+
imageWidth: imageWidth,
|
|
31617
|
+
imageHeight: imageHeight
|
|
31618
|
+
}))).then(function () {
|
|
31619
|
+
handleMetadata(_extends({}, metadata, {
|
|
31620
|
+
imageWidth: imageWidth,
|
|
31621
|
+
imageHeight: imageHeight
|
|
31622
|
+
}));
|
|
31623
|
+
});
|
|
31624
|
+
} catch (e) {
|
|
31625
|
+
return Promise.reject(e);
|
|
31626
|
+
}
|
|
31627
|
+
};
|
|
31628
|
+
image.onerror = function () {
|
|
31629
|
+
try {
|
|
31630
|
+
setImageLoadError(true);
|
|
31631
|
+
return Promise.resolve(storeMetadata(url, _extends({}, metadata))).then(function () {
|
|
31632
|
+
handleMetadata(_extends({}, metadata));
|
|
31633
|
+
});
|
|
31634
|
+
} catch (e) {
|
|
31635
|
+
return Promise.reject(e);
|
|
31636
|
+
}
|
|
31637
|
+
};
|
|
31638
|
+
} else {
|
|
31639
|
+
return Promise.resolve(storeMetadata(url, _extends({}, metadata))).then(function () {
|
|
31640
|
+
handleMetadata(_extends({}, metadata));
|
|
31641
|
+
});
|
|
31642
|
+
}
|
|
31643
|
+
}();
|
|
31644
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
31404
31645
|
});
|
|
31405
31646
|
});
|
|
31406
31647
|
}, function () {
|
|
31407
31648
|
console.log('Failed to fetch OG metadata');
|
|
31408
|
-
|
|
31649
|
+
handleMetadata(null);
|
|
31409
31650
|
});
|
|
31410
|
-
if (
|
|
31651
|
+
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
31411
31652
|
}
|
|
31412
31653
|
}();
|
|
31413
|
-
return Promise.resolve(
|
|
31654
|
+
return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {
|
|
31414
31655
|
return null;
|
|
31415
31656
|
}) : null);
|
|
31416
31657
|
} catch (e) {
|
|
@@ -31418,16 +31659,16 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
31418
31659
|
}
|
|
31419
31660
|
}, []);
|
|
31420
31661
|
useEffect(function () {
|
|
31421
|
-
if (attachment !== null && attachment !== void 0 && attachment.id && attachment !== null && attachment !== void 0 && attachment.url) {
|
|
31662
|
+
if (attachment !== null && attachment !== void 0 && attachment.id && attachment !== null && attachment !== void 0 && attachment.url && !metadata) {
|
|
31663
|
+
setShouldAnimate(true);
|
|
31422
31664
|
var url = attachment === null || attachment === void 0 ? void 0 : attachment.url;
|
|
31423
31665
|
if (url) {
|
|
31424
31666
|
getMetadata(url).then(function (cachedMetadata) {
|
|
31425
31667
|
try {
|
|
31426
31668
|
if (cachedMetadata) {
|
|
31427
|
-
|
|
31428
|
-
} else {
|
|
31429
|
-
ogMetadataQueryBuilder(url);
|
|
31669
|
+
handleMetadata(cachedMetadata);
|
|
31430
31670
|
}
|
|
31671
|
+
ogMetadataQueryBuilder(url);
|
|
31431
31672
|
return Promise.resolve();
|
|
31432
31673
|
} catch (e) {
|
|
31433
31674
|
return Promise.reject(e);
|
|
@@ -31437,7 +31678,7 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
31437
31678
|
});
|
|
31438
31679
|
}
|
|
31439
31680
|
}
|
|
31440
|
-
}, [attachment === null || attachment === void 0 ? void 0 : attachment.url]);
|
|
31681
|
+
}, [attachment === null || attachment === void 0 ? void 0 : attachment.url, metadata]);
|
|
31441
31682
|
var ogUrl = useMemo(function () {
|
|
31442
31683
|
var url = attachment === null || attachment === void 0 ? void 0 : attachment.url;
|
|
31443
31684
|
var urlObj = validateUrl(url);
|
|
@@ -31447,102 +31688,130 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
31447
31688
|
return url;
|
|
31448
31689
|
}, [attachment === null || attachment === void 0 ? void 0 : attachment.url]);
|
|
31449
31690
|
var showOGMetadata = useMemo(function () {
|
|
31450
|
-
var _metadata$
|
|
31451
|
-
return state !== 'deleted' && (metadata === null || metadata === void 0 ? void 0 : (_metadata$
|
|
31691
|
+
var _metadata$og2, _metadata$og3;
|
|
31692
|
+
return state !== 'deleted' && (metadata === null || metadata === void 0 ? void 0 : (_metadata$og2 = metadata.og) === null || _metadata$og2 === void 0 ? void 0 : _metadata$og2.title) && (metadata === null || metadata === void 0 ? void 0 : (_metadata$og3 = metadata.og) === null || _metadata$og3 === void 0 ? void 0 : _metadata$og3.description) && metadata;
|
|
31452
31693
|
}, [state, metadata]);
|
|
31453
|
-
useEffect(function () {
|
|
31454
|
-
var _metadata$og4, _metadata$og4$image, _metadata$og4$image$;
|
|
31455
|
-
if (metadata !== null && metadata !== void 0 && (_metadata$og4 = metadata.og) !== null && _metadata$og4 !== void 0 && (_metadata$og4$image = _metadata$og4.image) !== null && _metadata$og4$image !== void 0 && (_metadata$og4$image$ = _metadata$og4$image[0]) !== null && _metadata$og4$image$ !== void 0 && _metadata$og4$image$.url) {
|
|
31456
|
-
var _metadata$og5, _metadata$og5$image, _metadata$og5$image$;
|
|
31457
|
-
var image = new Image();
|
|
31458
|
-
image.src = metadata === null || metadata === void 0 ? void 0 : (_metadata$og5 = metadata.og) === null || _metadata$og5 === void 0 ? void 0 : (_metadata$og5$image = _metadata$og5.image) === null || _metadata$og5$image === void 0 ? void 0 : (_metadata$og5$image$ = _metadata$og5$image[0]) === null || _metadata$og5$image$ === void 0 ? void 0 : _metadata$og5$image$.url;
|
|
31459
|
-
image.onload = function () {
|
|
31460
|
-
var imageWidth = image.width;
|
|
31461
|
-
var imageHeight = image.height;
|
|
31462
|
-
setImageWidth(imageWidth);
|
|
31463
|
-
setImageHeight(imageHeight);
|
|
31464
|
-
setImageLoadError(false);
|
|
31465
|
-
setImageLoaded(true);
|
|
31466
|
-
};
|
|
31467
|
-
image.onerror = function () {
|
|
31468
|
-
setImageLoadError(true);
|
|
31469
|
-
setImageLoaded(true);
|
|
31470
|
-
};
|
|
31471
|
-
}
|
|
31472
|
-
}, [metadata === null || metadata === void 0 ? void 0 : (_metadata$og6 = metadata.og) === null || _metadata$og6 === void 0 ? void 0 : (_metadata$og6$image = _metadata$og6.image) === null || _metadata$og6$image === void 0 ? void 0 : (_metadata$og6$image$ = _metadata$og6$image[0]) === null || _metadata$og6$image$ === void 0 ? void 0 : _metadata$og6$image$.url]);
|
|
31473
31694
|
var calculatedImageHeight = useMemo(function () {
|
|
31474
|
-
|
|
31475
|
-
|
|
31695
|
+
if (!(metadata !== null && metadata !== void 0 && metadata.imageWidth)) {
|
|
31696
|
+
return 0;
|
|
31697
|
+
}
|
|
31698
|
+
return (metadata === null || metadata === void 0 ? void 0 : metadata.imageHeight) / ((metadata === null || metadata === void 0 ? void 0 : metadata.imageWidth) / 400);
|
|
31699
|
+
}, [metadata === null || metadata === void 0 ? void 0 : metadata.imageWidth, metadata === null || metadata === void 0 ? void 0 : metadata.imageHeight]);
|
|
31476
31700
|
return /*#__PURE__*/React__default.createElement(OGMetadataContainer, {
|
|
31477
|
-
showOGMetadata: !!showOGMetadata
|
|
31701
|
+
showOGMetadata: !!showOGMetadata,
|
|
31702
|
+
bgColor: incoming ? incomingMessageBackgroundX : outgoingMessageBackgroundX
|
|
31478
31703
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
31479
31704
|
onClick: function onClick() {
|
|
31480
31705
|
window.open(attachment === null || attachment === void 0 ? void 0 : attachment.url, '_blank');
|
|
31706
|
+
},
|
|
31707
|
+
style: {
|
|
31708
|
+
width: showOGMetadata ? '100%' : 'auto'
|
|
31481
31709
|
}
|
|
31482
31710
|
}, /*#__PURE__*/React__default.createElement(ImageContainer, {
|
|
31483
|
-
showOGMetadata: !!showOGMetadata && !imageLoadError
|
|
31484
|
-
|
|
31485
|
-
|
|
31486
|
-
|
|
31487
|
-
|
|
31711
|
+
showOGMetadata: !!showOGMetadata && !imageLoadError,
|
|
31712
|
+
containerWidth: 400,
|
|
31713
|
+
containerHeight: calculatedImageHeight,
|
|
31714
|
+
shouldAnimate: shouldAnimate
|
|
31715
|
+
}, metadata !== null && metadata !== void 0 && (_metadata$og4 = metadata.og) !== null && _metadata$og4 !== void 0 && (_metadata$og4$image = _metadata$og4.image) !== null && _metadata$og4$image !== void 0 && (_metadata$og4$image$ = _metadata$og4$image[0]) !== null && _metadata$og4$image$ !== void 0 && _metadata$og4$image$.url && !imageLoadError ? (/*#__PURE__*/React__default.createElement(Img, {
|
|
31716
|
+
src: metadata === null || metadata === void 0 ? void 0 : (_metadata$og5 = metadata.og) === null || _metadata$og5 === void 0 ? void 0 : (_metadata$og5$image = _metadata$og5.image) === null || _metadata$og5$image === void 0 ? void 0 : (_metadata$og5$image$ = _metadata$og5$image[0]) === null || _metadata$og5$image$ === void 0 ? void 0 : _metadata$og5$image$.url,
|
|
31488
31717
|
alt: 'OG metadata image',
|
|
31489
|
-
|
|
31490
|
-
|
|
31491
|
-
|
|
31492
|
-
|
|
31493
|
-
|
|
31494
|
-
|
|
31495
|
-
|
|
31496
|
-
|
|
31718
|
+
imageWidth: 400,
|
|
31719
|
+
imageHeight: calculatedImageHeight,
|
|
31720
|
+
shouldAnimate: shouldAnimate
|
|
31721
|
+
})) : null), showOGMetadata ? (/*#__PURE__*/React__default.createElement(OGText, {
|
|
31722
|
+
shouldAnimate: shouldAnimate
|
|
31723
|
+
}, /*#__PURE__*/React__default.createElement(Url, {
|
|
31724
|
+
maxWidth: 400,
|
|
31725
|
+
shouldAnimate: shouldAnimate
|
|
31726
|
+
}, ogUrl), metadata !== null && metadata !== void 0 && (_metadata$og6 = metadata.og) !== null && _metadata$og6 !== void 0 && _metadata$og6.title ? (/*#__PURE__*/React__default.createElement(Title, {
|
|
31727
|
+
maxWidth: 400,
|
|
31728
|
+
shouldAnimate: shouldAnimate
|
|
31729
|
+
}, metadata !== null && metadata !== void 0 && (_metadata$og7 = metadata.og) !== null && _metadata$og7 !== void 0 && (_metadata$og7$favicon = _metadata$og7.favicon) !== null && _metadata$og7$favicon !== void 0 && _metadata$og7$favicon.url && !faviconLoadError ? (/*#__PURE__*/React__default.createElement(Favicon, {
|
|
31730
|
+
shouldAnimate: shouldAnimate,
|
|
31731
|
+
src: metadata === null || metadata === void 0 ? void 0 : (_metadata$og8 = metadata.og) === null || _metadata$og8 === void 0 ? void 0 : (_metadata$og8$favicon = _metadata$og8.favicon) === null || _metadata$og8$favicon === void 0 ? void 0 : _metadata$og8$favicon.url,
|
|
31497
31732
|
onLoad: function onLoad() {
|
|
31498
31733
|
return setFaviconLoadError(false);
|
|
31499
31734
|
},
|
|
31500
31735
|
onError: function onError() {
|
|
31501
|
-
|
|
31736
|
+
dispatch(updateOGMetadataAC(attachment === null || attachment === void 0 ? void 0 : attachment.url, _extends({}, metadata, {
|
|
31737
|
+
og: _extends({}, metadata === null || metadata === void 0 ? void 0 : metadata.og, {
|
|
31738
|
+
favicon: {
|
|
31739
|
+
url: ''
|
|
31740
|
+
}
|
|
31741
|
+
})
|
|
31742
|
+
})));
|
|
31743
|
+
setFaviconLoadError(true);
|
|
31502
31744
|
}
|
|
31503
|
-
})) : null, /*#__PURE__*/React__default.createElement("span", null, metadata === null || metadata === void 0 ? void 0 : (_metadata$
|
|
31504
|
-
maxWidth: 400
|
|
31505
|
-
|
|
31745
|
+
})) : null, /*#__PURE__*/React__default.createElement("span", null, metadata === null || metadata === void 0 ? void 0 : (_metadata$og9 = metadata.og) === null || _metadata$og9 === void 0 ? void 0 : _metadata$og9.title))) : null, metadata !== null && metadata !== void 0 && (_metadata$og0 = metadata.og) !== null && _metadata$og0 !== void 0 && _metadata$og0.description ? (/*#__PURE__*/React__default.createElement(Desc, {
|
|
31746
|
+
maxWidth: 400,
|
|
31747
|
+
shouldAnimate: shouldAnimate
|
|
31748
|
+
}, metadata === null || metadata === void 0 ? void 0 : (_metadata$og1 = metadata.og) === null || _metadata$og1 === void 0 ? void 0 : _metadata$og1.description)) : null)) : null));
|
|
31506
31749
|
};
|
|
31507
|
-
var OGMetadataContainer = styled.div(_templateObject$A || (_templateObject$A = _taggedTemplateLiteralLoose(["\n min-width: inherit;\n max-width: inherit;\n display: grid;\n grid-template-columns: 1fr;\n background-color:
|
|
31508
|
-
var
|
|
31750
|
+
var OGMetadataContainer = styled.div(_templateObject$A || (_templateObject$A = _taggedTemplateLiteralLoose(["\n min-width: inherit;\n max-width: inherit;\n display: grid;\n grid-template-columns: 1fr;\n background-color: ", ";\n border-radius: 6px;\n margin-bottom: 0.4rem;\n margin: 0 auto;\n margin-bottom: ", ";\n &:hover {\n opacity: 0.9;\n cursor: pointer;\n }\n"])), function (_ref2) {
|
|
31751
|
+
var bgColor = _ref2.bgColor;
|
|
31752
|
+
return bgColor;
|
|
31753
|
+
}, function (_ref3) {
|
|
31754
|
+
var showOGMetadata = _ref3.showOGMetadata;
|
|
31509
31755
|
return showOGMetadata ? '0.8rem' : '0';
|
|
31510
31756
|
});
|
|
31511
|
-
var ImageContainer = styled.div(_templateObject2$v || (_templateObject2$v = _taggedTemplateLiteralLoose(["\n ", "\n\n ", "\n\n opacity: ", ";\n overflow: hidden;\n margin: 0 auto;\n padding: ", ";\n
|
|
31512
|
-
var
|
|
31513
|
-
return
|
|
31514
|
-
}, function (_ref4) {
|
|
31515
|
-
var height = _ref4.height,
|
|
31516
|
-
showOGMetadata = _ref4.showOGMetadata;
|
|
31517
|
-
return height ? "\n max-height: " + (height + "px") + ";\n height: " + (showOGMetadata ? height + "px" : '0') + ";\n " : "\n max-height: 200px;\n height: " + (showOGMetadata ? '200px' : '0') + ";\n ";
|
|
31757
|
+
var ImageContainer = styled.div(_templateObject2$v || (_templateObject2$v = _taggedTemplateLiteralLoose(["\n ", "\n\n ", "\n\n opacity: ", ";\n overflow: hidden;\n margin: 0 auto;\n padding: ", ";\n ", "\n"])), function (_ref4) {
|
|
31758
|
+
var containerWidth = _ref4.containerWidth;
|
|
31759
|
+
return containerWidth ? "\n max-width: " + (containerWidth + "px") + ";\n " : "\n max-width: 100%;\n width: 100%;\n ";
|
|
31518
31760
|
}, function (_ref5) {
|
|
31519
|
-
var
|
|
31520
|
-
|
|
31761
|
+
var containerHeight = _ref5.containerHeight,
|
|
31762
|
+
showOGMetadata = _ref5.showOGMetadata;
|
|
31763
|
+
return containerHeight ? "\n max-height: " + (containerHeight + "px") + ";\n height: " + (showOGMetadata ? containerHeight + "px" : '0') + ";\n " : "\n height: 0;\n ";
|
|
31521
31764
|
}, function (_ref6) {
|
|
31522
|
-
var showOGMetadata = _ref6.showOGMetadata
|
|
31523
|
-
|
|
31524
|
-
|
|
31525
|
-
|
|
31526
|
-
var
|
|
31527
|
-
|
|
31765
|
+
var showOGMetadata = _ref6.showOGMetadata,
|
|
31766
|
+
containerHeight = _ref6.containerHeight;
|
|
31767
|
+
return showOGMetadata && containerHeight ? 1 : 0;
|
|
31768
|
+
}, function (_ref7) {
|
|
31769
|
+
var showOGMetadata = _ref7.showOGMetadata,
|
|
31770
|
+
containerHeight = _ref7.containerHeight;
|
|
31771
|
+
return showOGMetadata && containerHeight ? '4px' : '0';
|
|
31772
|
+
}, function (_ref8) {
|
|
31773
|
+
var shouldAnimate = _ref8.shouldAnimate;
|
|
31774
|
+
return shouldAnimate && "\n transition: height 0.2s ease;\n ";
|
|
31775
|
+
});
|
|
31776
|
+
var OGText = styled.div(_templateObject3$p || (_templateObject3$p = _taggedTemplateLiteralLoose(["\n padding: 0.5rem;\n margin: 0;\n ", "\n"])), function (_ref9) {
|
|
31777
|
+
var shouldAnimate = _ref9.shouldAnimate;
|
|
31778
|
+
return shouldAnimate && "\n transition: all 0.2s ease;\n ";
|
|
31779
|
+
});
|
|
31780
|
+
var Url = styled.p(_templateObject4$l || (_templateObject4$l = _taggedTemplateLiteralLoose(["\n font-weight: normal;\n font-size: 13px;\n padding: 0;\n margin: 0 0 12px 0;\n color: gray;\n ", "\n ", "\n"])), function (_ref0) {
|
|
31781
|
+
var maxWidth = _ref0.maxWidth;
|
|
31528
31782
|
return maxWidth && "\n max-width: " + (maxWidth + "px") + ";\n ";
|
|
31783
|
+
}, function (_ref1) {
|
|
31784
|
+
var shouldAnimate = _ref1.shouldAnimate;
|
|
31785
|
+
return shouldAnimate && "\n transition: all 0.2s ease;\n ";
|
|
31529
31786
|
});
|
|
31530
|
-
var Title = styled.p(_templateObject5$h || (_templateObject5$h = _taggedTemplateLiteralLoose(["\n font-weight: bold;\n font-size: 13px;\n padding: 0;\n display: flex;\n align-items: center;\n ", "\n
|
|
31531
|
-
var maxWidth =
|
|
31787
|
+
var Title = styled.p(_templateObject5$h || (_templateObject5$h = _taggedTemplateLiteralLoose(["\n font-weight: bold;\n font-size: 13px;\n padding: 0;\n display: flex;\n align-items: center;\n ", "\n ", "\n"])), function (_ref10) {
|
|
31788
|
+
var maxWidth = _ref10.maxWidth;
|
|
31532
31789
|
return maxWidth && "\n max-width: " + (maxWidth + "px") + ";\n ";
|
|
31790
|
+
}, function (_ref11) {
|
|
31791
|
+
var shouldAnimate = _ref11.shouldAnimate;
|
|
31792
|
+
return shouldAnimate && "\n transition: all 0.2s ease;\n ";
|
|
31533
31793
|
});
|
|
31534
|
-
var Desc = styled.p(_templateObject6$f || (_templateObject6$f = _taggedTemplateLiteralLoose(["\n font-weight: normal;\n font-size: 13px;\n padding: 0;\n
|
|
31535
|
-
var maxWidth =
|
|
31794
|
+
var Desc = styled.p(_templateObject6$f || (_templateObject6$f = _taggedTemplateLiteralLoose(["\n font-weight: normal;\n font-size: 13px;\n padding: 0;\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n ", "\n ", "\n"])), function (_ref12) {
|
|
31795
|
+
var maxWidth = _ref12.maxWidth;
|
|
31536
31796
|
return maxWidth && "\n max-width: " + (maxWidth + "px") + ";\n ";
|
|
31797
|
+
}, function (_ref13) {
|
|
31798
|
+
var shouldAnimate = _ref13.shouldAnimate;
|
|
31799
|
+
return shouldAnimate && "\n transition: all 0.2s ease;\n ";
|
|
31537
31800
|
});
|
|
31538
|
-
var Img = styled.img(_templateObject7$d || (_templateObject7$d = _taggedTemplateLiteralLoose(["\n ", "\n ", "\n object-fit: cover;\n
|
|
31539
|
-
var
|
|
31540
|
-
return
|
|
31541
|
-
}, function (
|
|
31542
|
-
var
|
|
31543
|
-
return
|
|
31801
|
+
var Img = styled.img(_templateObject7$d || (_templateObject7$d = _taggedTemplateLiteralLoose(["\n ", "\n ", "\n\n object-fit: cover;\n ", "\n"])), function (_ref14) {
|
|
31802
|
+
var imageWidth = _ref14.imageWidth;
|
|
31803
|
+
return imageWidth && "\n max-width: 100%;\n width: " + ("calc(" + imageWidth + "px - 8px)") + ";\n ";
|
|
31804
|
+
}, function (_ref15) {
|
|
31805
|
+
var imageHeight = _ref15.imageHeight;
|
|
31806
|
+
return imageHeight && "\n max-height: " + (imageHeight + "px") + ";\n min-height: " + (imageHeight + "px") + ";\n height: " + (imageHeight + "px") + ";\n ";
|
|
31807
|
+
}, function (_ref16) {
|
|
31808
|
+
var shouldAnimate = _ref16.shouldAnimate;
|
|
31809
|
+
return shouldAnimate && "\n transition: height 0.2s ease;\n ";
|
|
31810
|
+
});
|
|
31811
|
+
var Favicon = styled.img(_templateObject8$c || (_templateObject8$c = _taggedTemplateLiteralLoose(["\n ", "\n width: 24px;\n height: 24px;\n object-fit: contain;\n margin-right: 4px;\n"])), function (_ref17) {
|
|
31812
|
+
var shouldAnimate = _ref17.shouldAnimate;
|
|
31813
|
+
return shouldAnimate && "\n transition: all 0.2s ease;\n ";
|
|
31544
31814
|
});
|
|
31545
|
-
var Favicon = styled.img(_templateObject8$c || (_templateObject8$c = _taggedTemplateLiteralLoose(["\n transition: all 0.2s ease;\n width: 24px;\n height: 24px;\n object-fit: contain;\n margin-right: 4px;\n"])));
|
|
31546
31815
|
|
|
31547
31816
|
var _templateObject$B, _templateObject2$w, _templateObject3$q, _templateObject4$m, _templateObject5$i;
|
|
31548
31817
|
var MessageBody = function MessageBody(_ref) {
|
|
@@ -31596,6 +31865,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31596
31865
|
deleteMessage = _ref$deleteMessage === void 0 ? true : _ref$deleteMessage,
|
|
31597
31866
|
_ref$selectMessage = _ref.selectMessage,
|
|
31598
31867
|
selectMessage = _ref$selectMessage === void 0 ? true : _ref$selectMessage,
|
|
31868
|
+
showInfoMessage = _ref.showInfoMessage,
|
|
31599
31869
|
allowEditDeleteIncomingMessage = _ref.allowEditDeleteIncomingMessage,
|
|
31600
31870
|
_ref$forwardMessage = _ref.forwardMessage,
|
|
31601
31871
|
forwardMessage = _ref$forwardMessage === void 0 ? true : _ref$forwardMessage,
|
|
@@ -31608,6 +31878,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31608
31878
|
replyInThreadIcon = _ref.replyInThreadIcon,
|
|
31609
31879
|
forwardIcon = _ref.forwardIcon,
|
|
31610
31880
|
deleteIcon = _ref.deleteIcon,
|
|
31881
|
+
infoIcon = _ref.infoIcon,
|
|
31611
31882
|
selectIcon = _ref.selectIcon,
|
|
31612
31883
|
starIcon = _ref.starIcon,
|
|
31613
31884
|
staredIcon = _ref.staredIcon,
|
|
@@ -31619,6 +31890,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31619
31890
|
replyInThreadIconOrder = _ref.replyInThreadIconOrder,
|
|
31620
31891
|
forwardIconOrder = _ref.forwardIconOrder,
|
|
31621
31892
|
deleteIconOrder = _ref.deleteIconOrder,
|
|
31893
|
+
infoIconOrder = _ref.infoIconOrder,
|
|
31622
31894
|
selectIconOrder = _ref.selectIconOrder,
|
|
31623
31895
|
starIconOrder = _ref.starIconOrder,
|
|
31624
31896
|
reportIconOrder = _ref.reportIconOrder,
|
|
@@ -31632,6 +31904,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31632
31904
|
selectIconTooltipText = _ref.selectIconTooltipText,
|
|
31633
31905
|
starIconTooltipText = _ref.starIconTooltipText,
|
|
31634
31906
|
reportIconTooltipText = _ref.reportIconTooltipText,
|
|
31907
|
+
infoIconTooltipText = _ref.infoIconTooltipText,
|
|
31635
31908
|
messageActionIconsColor = _ref.messageActionIconsColor,
|
|
31636
31909
|
messageStatusSize = _ref.messageStatusSize,
|
|
31637
31910
|
messageStatusColor = _ref.messageStatusColor,
|
|
@@ -31660,6 +31933,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31660
31933
|
messageTextFontSize = _ref.messageTextFontSize,
|
|
31661
31934
|
messageTextLineHeight = _ref.messageTextLineHeight,
|
|
31662
31935
|
handleToggleForwardMessagePopup = _ref.handleToggleForwardMessagePopup,
|
|
31936
|
+
handleToggleInfoMessagePopupOpen = _ref.handleToggleInfoMessagePopupOpen,
|
|
31663
31937
|
messageActionsShow = _ref.messageActionsShow,
|
|
31664
31938
|
closeMessageActions = _ref.closeMessageActions,
|
|
31665
31939
|
handleDeletePendingMessage = _ref.handleDeletePendingMessage,
|
|
@@ -31808,6 +32082,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31808
32082
|
handleCopyMessage: handleCopyMessage,
|
|
31809
32083
|
handleDeletePendingMessage: handleDeletePendingMessage,
|
|
31810
32084
|
handleOpenForwardMessage: handleToggleForwardMessagePopup,
|
|
32085
|
+
handleOpenInfoMessage: handleToggleInfoMessagePopupOpen,
|
|
31811
32086
|
handleResendMessage: handleResendMessage,
|
|
31812
32087
|
handleReplyMessage: _handleReplyMessage,
|
|
31813
32088
|
handleReportMessage: handleToggleReportPopupOpen,
|
|
@@ -31859,7 +32134,11 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31859
32134
|
reportIconTooltipText: reportIconTooltipText,
|
|
31860
32135
|
messageActionIconsColor: messageActionIconsColor,
|
|
31861
32136
|
myRole: channel.userRole,
|
|
31862
|
-
isIncoming: message.incoming
|
|
32137
|
+
isIncoming: message.incoming,
|
|
32138
|
+
infoIconTooltipText: infoIconTooltipText,
|
|
32139
|
+
infoIcon: infoIcon,
|
|
32140
|
+
showInfoMessage: showInfoMessage,
|
|
32141
|
+
infoIconOrder: infoIconOrder
|
|
31863
32142
|
}))), message.parentMessage && message.parentMessage.id && !isThreadMessage && (/*#__PURE__*/React__default.createElement(RepliedMessage$1, {
|
|
31864
32143
|
message: message,
|
|
31865
32144
|
theme: theme,
|
|
@@ -31907,10 +32186,11 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31907
32186
|
incomingMessageStyles: incomingMessageStyles,
|
|
31908
32187
|
incoming: message.incoming,
|
|
31909
32188
|
linkColor: linkColor
|
|
31910
|
-
}, linkAttachment && /*#__PURE__*/React__default.createElement(OGMetadata, {
|
|
32189
|
+
}, linkAttachment && (/*#__PURE__*/React__default.createElement(OGMetadata, {
|
|
31911
32190
|
attachments: [linkAttachment],
|
|
31912
|
-
state: message.state
|
|
31913
|
-
|
|
32191
|
+
state: message.state,
|
|
32192
|
+
incoming: message.incoming
|
|
32193
|
+
})), /*#__PURE__*/React__default.createElement("span", {
|
|
31914
32194
|
ref: messageTextRef
|
|
31915
32195
|
}, MessageTextFormat({
|
|
31916
32196
|
text: message.body,
|
|
@@ -31978,7 +32258,10 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31978
32258
|
imageAttachmentMaxHeight: imageAttachmentMaxHeight,
|
|
31979
32259
|
videoAttachmentMaxWidth: videoAttachmentMaxWidth,
|
|
31980
32260
|
videoAttachmentMaxHeight: videoAttachmentMaxHeight,
|
|
31981
|
-
messageType: message.type
|
|
32261
|
+
messageType: message.type,
|
|
32262
|
+
messagePlayed: message.deliveryStatus === MESSAGE_DELIVERY_STATUS.PLAYED,
|
|
32263
|
+
channelId: message.channelId,
|
|
32264
|
+
incoming: message.incoming
|
|
31982
32265
|
});
|
|
31983
32266
|
}), emojisPopupOpen && emojisPopupPosition && (/*#__PURE__*/React__default.createElement(EmojiContainer, {
|
|
31984
32267
|
id: message.id + "_emoji_popup_container",
|
|
@@ -32058,7 +32341,420 @@ var FrequentlyEmojisContainer = styled.div(_templateObject5$i || (_templateObjec
|
|
|
32058
32341
|
return props.rtlDirection && '0';
|
|
32059
32342
|
});
|
|
32060
32343
|
|
|
32061
|
-
var _templateObject$C, _templateObject2$x, _templateObject3$r, _templateObject4$n, _templateObject5$j, _templateObject6$g, _templateObject7$e, _templateObject8$d, _templateObject9$b, _templateObject0$a, _templateObject1$7
|
|
32344
|
+
var _templateObject$C, _templateObject2$x, _templateObject3$r, _templateObject4$n, _templateObject5$j, _templateObject6$g, _templateObject7$e, _templateObject8$d, _templateObject9$b, _templateObject0$a, _templateObject1$7;
|
|
32345
|
+
var defaultFormatDate = function defaultFormatDate(date) {
|
|
32346
|
+
var m = moment(date);
|
|
32347
|
+
if (m.isSame(moment(), 'day')) {
|
|
32348
|
+
return "Today, " + m.format('HH:mm');
|
|
32349
|
+
}
|
|
32350
|
+
if (m.isSame(moment().subtract(1, 'day'), 'day')) {
|
|
32351
|
+
return "Yesterday, " + m.format('HH:mm');
|
|
32352
|
+
}
|
|
32353
|
+
return m.format('DD.MM.YYYY');
|
|
32354
|
+
};
|
|
32355
|
+
var MessageInfo = function MessageInfo(_ref) {
|
|
32356
|
+
var _tabsOrder$;
|
|
32357
|
+
var message = _ref.message,
|
|
32358
|
+
togglePopup = _ref.togglePopup,
|
|
32359
|
+
labels = _ref.labels,
|
|
32360
|
+
_ref$tabsOrder = _ref.tabsOrder,
|
|
32361
|
+
tabsOrder = _ref$tabsOrder === void 0 ? [].concat(message.attachments && message.attachments.length > 0 && message.attachments[0].type === 'voice' ? [{
|
|
32362
|
+
key: 'played',
|
|
32363
|
+
label: 'Played by',
|
|
32364
|
+
data: []
|
|
32365
|
+
}] : [], [{
|
|
32366
|
+
key: 'received',
|
|
32367
|
+
label: 'Delivered to',
|
|
32368
|
+
data: []
|
|
32369
|
+
}, {
|
|
32370
|
+
key: 'displayed',
|
|
32371
|
+
label: 'Seen by',
|
|
32372
|
+
data: []
|
|
32373
|
+
}]) : _ref$tabsOrder,
|
|
32374
|
+
_ref$showCounts = _ref.showCounts,
|
|
32375
|
+
showCounts = _ref$showCounts === void 0 ? false : _ref$showCounts,
|
|
32376
|
+
_ref$avatarSize = _ref.avatarSize,
|
|
32377
|
+
avatarSize = _ref$avatarSize === void 0 ? 32 : _ref$avatarSize,
|
|
32378
|
+
_ref$maxWidth = _ref.maxWidth,
|
|
32379
|
+
maxWidth = _ref$maxWidth === void 0 ? '340px' : _ref$maxWidth,
|
|
32380
|
+
_ref$minWidth = _ref.minWidth,
|
|
32381
|
+
minWidth = _ref$minWidth === void 0 ? '340px' : _ref$minWidth,
|
|
32382
|
+
_ref$height = _ref.height,
|
|
32383
|
+
height = _ref$height === void 0 ? '300px' : _ref$height,
|
|
32384
|
+
renderItem = _ref.renderItem,
|
|
32385
|
+
_ref$formatDate = _ref.formatDate,
|
|
32386
|
+
formatDate = _ref$formatDate === void 0 ? defaultFormatDate : _ref$formatDate,
|
|
32387
|
+
_ref$tabsStyles = _ref.tabsStyles,
|
|
32388
|
+
tabsStyles = _ref$tabsStyles === void 0 ? {} : _ref$tabsStyles,
|
|
32389
|
+
_ref$listItemStyles = _ref.listItemStyles,
|
|
32390
|
+
listItemStyles = _ref$listItemStyles === void 0 ? {} : _ref$listItemStyles,
|
|
32391
|
+
handleOpenUserProfile = _ref.handleOpenUserProfile;
|
|
32392
|
+
var _useColor = useColors(),
|
|
32393
|
+
accentColor = _useColor[THEME_COLORS.ACCENT],
|
|
32394
|
+
textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY],
|
|
32395
|
+
textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY],
|
|
32396
|
+
backgroundHovered = _useColor[THEME_COLORS.BACKGROUND_HOVERED],
|
|
32397
|
+
backgroundSections = _useColor[THEME_COLORS.BACKGROUND_SECTIONS],
|
|
32398
|
+
textOnPrimary = _useColor[THEME_COLORS.TEXT_ON_PRIMARY],
|
|
32399
|
+
border = _useColor[THEME_COLORS.BORDER];
|
|
32400
|
+
var dispatch = useDispatch();
|
|
32401
|
+
var messageMarkers = useSelector(messageMarkersSelector);
|
|
32402
|
+
var messagesMarkersLoadingState = useSelector(messagesMarkersLoadingStateSelector);
|
|
32403
|
+
var markers = useMemo(function () {
|
|
32404
|
+
return messageMarkers[message.channelId] && messageMarkers[message.channelId][message.id];
|
|
32405
|
+
}, [messageMarkers, message.channelId, message.id]);
|
|
32406
|
+
var _useState = useState(((_tabsOrder$ = tabsOrder[0]) === null || _tabsOrder$ === void 0 ? void 0 : _tabsOrder$.key) || 'played'),
|
|
32407
|
+
activeTab = _useState[0],
|
|
32408
|
+
setActiveTab = _useState[1];
|
|
32409
|
+
var _useState2 = useState(false),
|
|
32410
|
+
open = _useState2[0],
|
|
32411
|
+
setOpen = _useState2[1];
|
|
32412
|
+
var rootRef = useRef(null);
|
|
32413
|
+
var _useState3 = useState(false),
|
|
32414
|
+
flipAbove = _useState3[0],
|
|
32415
|
+
setFlipAbove = _useState3[1];
|
|
32416
|
+
var panelRef = useRef(null);
|
|
32417
|
+
var contentRef = useRef(null);
|
|
32418
|
+
var tabsRef = useRef(null);
|
|
32419
|
+
var listRef = useRef(null);
|
|
32420
|
+
var _useState4 = useState(0),
|
|
32421
|
+
panelHeightPx = _useState4[0],
|
|
32422
|
+
setPanelHeightPx = _useState4[1];
|
|
32423
|
+
var _useState5 = useState(false),
|
|
32424
|
+
isTransitioning = _useState5[0],
|
|
32425
|
+
setIsTransitioning = _useState5[1];
|
|
32426
|
+
var _useState6 = useState(false),
|
|
32427
|
+
ready = _useState6[0],
|
|
32428
|
+
setReady = _useState6[1];
|
|
32429
|
+
var _useState7 = useState(false),
|
|
32430
|
+
flipLocked = _useState7[0],
|
|
32431
|
+
setFlipLocked = _useState7[1];
|
|
32432
|
+
var activeMarkers = useMemo(function () {
|
|
32433
|
+
var list = markers && markers[activeTab] || [];
|
|
32434
|
+
return Array.isArray(list) ? [].concat(list).sort(sortByDateDesc) : [];
|
|
32435
|
+
}, [markers, activeTab]);
|
|
32436
|
+
var rowHeightPx = useMemo(function () {
|
|
32437
|
+
return (avatarSize || 32) + 24;
|
|
32438
|
+
}, [avatarSize]);
|
|
32439
|
+
var listMaxHeightPx = useMemo(function () {
|
|
32440
|
+
return rowHeightPx * 5 - 16;
|
|
32441
|
+
}, [rowHeightPx]);
|
|
32442
|
+
var tabItems = tabsOrder.map(function (tab) {
|
|
32443
|
+
switch (tab.key) {
|
|
32444
|
+
case 'played':
|
|
32445
|
+
return {
|
|
32446
|
+
key: tab.key,
|
|
32447
|
+
label: (labels === null || labels === void 0 ? void 0 : labels.playedBy) || 'Played by',
|
|
32448
|
+
data: activeMarkers
|
|
32449
|
+
};
|
|
32450
|
+
case 'received':
|
|
32451
|
+
return {
|
|
32452
|
+
key: tab.key,
|
|
32453
|
+
label: (labels === null || labels === void 0 ? void 0 : labels.receivedBy) || 'Delivered to',
|
|
32454
|
+
data: activeMarkers
|
|
32455
|
+
};
|
|
32456
|
+
case 'displayed':
|
|
32457
|
+
default:
|
|
32458
|
+
return {
|
|
32459
|
+
key: 'displayed',
|
|
32460
|
+
label: (labels === null || labels === void 0 ? void 0 : labels.displayedBy) || 'Seen by',
|
|
32461
|
+
data: activeMarkers
|
|
32462
|
+
};
|
|
32463
|
+
}
|
|
32464
|
+
});
|
|
32465
|
+
var renderRow = function renderRow(marker) {
|
|
32466
|
+
var displayName = marker.user ? marker.user.firstName || marker.user.id : 'Deleted User';
|
|
32467
|
+
var avatarUrl = marker.user ? marker.user.avatarUrl : '';
|
|
32468
|
+
var dateVal = marker.createdAt || marker.createAt;
|
|
32469
|
+
var dateFormat = dateVal ? formatDate(new Date(dateVal)) : '';
|
|
32470
|
+
var node = /*#__PURE__*/React__default.createElement(Row$1, {
|
|
32471
|
+
backgroundHover: listItemStyles.hoverBackground || backgroundHovered,
|
|
32472
|
+
onClick: function onClick() {
|
|
32473
|
+
return handleOpenUserProfile === null || handleOpenUserProfile === void 0 ? void 0 : handleOpenUserProfile(marker.user);
|
|
32474
|
+
}
|
|
32475
|
+
}, /*#__PURE__*/React__default.createElement(Avatar, {
|
|
32476
|
+
name: displayName,
|
|
32477
|
+
image: avatarUrl,
|
|
32478
|
+
size: avatarSize,
|
|
32479
|
+
textSize: 12,
|
|
32480
|
+
setDefaultAvatar: true
|
|
32481
|
+
}), /*#__PURE__*/React__default.createElement(RowInfo, null, /*#__PURE__*/React__default.createElement(RowTitle, {
|
|
32482
|
+
color: listItemStyles.nameColor || textPrimary
|
|
32483
|
+
}, displayName), /*#__PURE__*/React__default.createElement(RowDate, {
|
|
32484
|
+
color: listItemStyles.dateColor || textSecondary
|
|
32485
|
+
}, dateFormat)));
|
|
32486
|
+
return renderItem ? renderItem(marker, node) : node;
|
|
32487
|
+
};
|
|
32488
|
+
useLayoutEffect(function () {
|
|
32489
|
+
var _rootRef$current;
|
|
32490
|
+
var container = document.getElementById('scrollableDiv');
|
|
32491
|
+
var anchorEl = (_rootRef$current = rootRef.current) === null || _rootRef$current === void 0 ? void 0 : _rootRef$current.parentElement;
|
|
32492
|
+
if (container && anchorEl) {
|
|
32493
|
+
var containerRect = container.getBoundingClientRect();
|
|
32494
|
+
var anchorRect = anchorEl.getBoundingClientRect();
|
|
32495
|
+
var contentEl = contentRef.current;
|
|
32496
|
+
var tabsEl = tabsRef.current;
|
|
32497
|
+
var listEl = listRef.current;
|
|
32498
|
+
var cs = contentEl ? getComputedStyle(contentEl) : {};
|
|
32499
|
+
var padTop = parseFloat((cs === null || cs === void 0 ? void 0 : cs.paddingTop) || '0') || 0;
|
|
32500
|
+
var padBottom = parseFloat((cs === null || cs === void 0 ? void 0 : cs.paddingBottom) || '0') || 0;
|
|
32501
|
+
var contentPaddingY = padTop + padBottom;
|
|
32502
|
+
var tabsHeight = tabsEl ? tabsEl.getBoundingClientRect().height : 0;
|
|
32503
|
+
var tabsMarginBottom = 8;
|
|
32504
|
+
var listMarginTop = 8;
|
|
32505
|
+
var desiredListHeight = Math.min(listEl ? listEl.scrollHeight : 0, listMaxHeightPx);
|
|
32506
|
+
var desiredHeight = contentPaddingY + tabsHeight + tabsMarginBottom + listMarginTop + desiredListHeight;
|
|
32507
|
+
var maxPx = parseInt(String(height || '300'), 10) || 300;
|
|
32508
|
+
var measuredTarget = Math.min(desiredHeight || 0, maxPx);
|
|
32509
|
+
var flipTarget = messagesMarkersLoadingState === LOADING_STATE.LOADING ? maxPx : measuredTarget;
|
|
32510
|
+
setPanelHeightPx(measuredTarget);
|
|
32511
|
+
var availableBelow = containerRect.bottom - anchorRect.bottom - 8;
|
|
32512
|
+
var availableAbove = anchorRect.top - containerRect.top - 8;
|
|
32513
|
+
var nextFlip = Boolean(flipTarget > availableBelow && flipTarget <= availableAbove);
|
|
32514
|
+
setFlipAbove(nextFlip);
|
|
32515
|
+
}
|
|
32516
|
+
setIsTransitioning(true);
|
|
32517
|
+
setOpen(true);
|
|
32518
|
+
setReady(true);
|
|
32519
|
+
setFlipLocked(true);
|
|
32520
|
+
}, []);
|
|
32521
|
+
useEffect(function () {
|
|
32522
|
+
var onDown = function onDown(e) {
|
|
32523
|
+
if (rootRef.current && !rootRef.current.contains(e.target)) {
|
|
32524
|
+
togglePopup();
|
|
32525
|
+
}
|
|
32526
|
+
};
|
|
32527
|
+
document.addEventListener('mousedown', onDown);
|
|
32528
|
+
return function () {
|
|
32529
|
+
document.removeEventListener('mousedown', onDown);
|
|
32530
|
+
};
|
|
32531
|
+
}, []);
|
|
32532
|
+
useEffect(function () {
|
|
32533
|
+
var container = document.getElementById('scrollableDiv');
|
|
32534
|
+
if (!container) return;
|
|
32535
|
+
var recalc = function recalc() {
|
|
32536
|
+
if (!rootRef.current || !ready) return;
|
|
32537
|
+
if (messagesMarkersLoadingState === LOADING_STATE.LOADING) return;
|
|
32538
|
+
var containerRect = container.getBoundingClientRect();
|
|
32539
|
+
var anchorEl = rootRef.current.parentElement;
|
|
32540
|
+
if (!anchorEl) return;
|
|
32541
|
+
var anchorRect = anchorEl.getBoundingClientRect();
|
|
32542
|
+
var dropdownHeight = panelHeightPx || 0;
|
|
32543
|
+
if (!dropdownHeight || dropdownHeight < 8) {
|
|
32544
|
+
var parsed = parseInt(String(height || '300'), 10);
|
|
32545
|
+
dropdownHeight = isNaN(parsed) ? 300 : parsed;
|
|
32546
|
+
}
|
|
32547
|
+
var availableBelow = containerRect.bottom - anchorRect.bottom - 8;
|
|
32548
|
+
var availableAbove = anchorRect.top - containerRect.top - 8;
|
|
32549
|
+
var overflowBelow = dropdownHeight > availableBelow;
|
|
32550
|
+
var overflowAbove = dropdownHeight > availableAbove;
|
|
32551
|
+
if (!isTransitioning && !flipLocked) {
|
|
32552
|
+
setFlipAbove(function (prev) {
|
|
32553
|
+
if (prev) {
|
|
32554
|
+
if (overflowAbove && !overflowBelow) return false;
|
|
32555
|
+
return true;
|
|
32556
|
+
}
|
|
32557
|
+
if (overflowBelow && !overflowAbove) return true;
|
|
32558
|
+
return false;
|
|
32559
|
+
});
|
|
32560
|
+
}
|
|
32561
|
+
};
|
|
32562
|
+
if (open) {
|
|
32563
|
+
recalc();
|
|
32564
|
+
var raf1 = requestAnimationFrame(recalc);
|
|
32565
|
+
var raf2 = requestAnimationFrame(function () {
|
|
32566
|
+
return requestAnimationFrame(recalc);
|
|
32567
|
+
});
|
|
32568
|
+
var t1 = setTimeout(recalc, 50);
|
|
32569
|
+
var t2 = setTimeout(recalc, 200);
|
|
32570
|
+
panelRef.current && panelRef.current.addEventListener('transitionend', recalc);
|
|
32571
|
+
container.addEventListener('scroll', recalc);
|
|
32572
|
+
window.addEventListener('resize', recalc);
|
|
32573
|
+
return function () {
|
|
32574
|
+
cancelAnimationFrame(raf1);
|
|
32575
|
+
cancelAnimationFrame(raf2);
|
|
32576
|
+
clearTimeout(t1);
|
|
32577
|
+
clearTimeout(t2);
|
|
32578
|
+
panelRef.current && panelRef.current.removeEventListener('transitionend', recalc);
|
|
32579
|
+
container.removeEventListener('scroll', recalc);
|
|
32580
|
+
window.removeEventListener('resize', recalc);
|
|
32581
|
+
};
|
|
32582
|
+
} else {
|
|
32583
|
+
container.addEventListener('scroll', recalc);
|
|
32584
|
+
window.addEventListener('resize', recalc);
|
|
32585
|
+
return function () {
|
|
32586
|
+
container.removeEventListener('scroll', recalc);
|
|
32587
|
+
window.removeEventListener('resize', recalc);
|
|
32588
|
+
};
|
|
32589
|
+
}
|
|
32590
|
+
}, [open, ready, message.id, panelHeightPx, isTransitioning, flipLocked, height]);
|
|
32591
|
+
useLayoutEffect(function () {
|
|
32592
|
+
var _rootRef$current2;
|
|
32593
|
+
var container = document.getElementById('scrollableDiv');
|
|
32594
|
+
var anchorEl = (_rootRef$current2 = rootRef.current) === null || _rootRef$current2 === void 0 ? void 0 : _rootRef$current2.parentElement;
|
|
32595
|
+
if (!container || !anchorEl || !ready) return;
|
|
32596
|
+
var containerRect = container.getBoundingClientRect();
|
|
32597
|
+
var anchorRect = anchorEl.getBoundingClientRect();
|
|
32598
|
+
var contentEl = contentRef.current;
|
|
32599
|
+
var tabsEl = tabsRef.current;
|
|
32600
|
+
var listEl = listRef.current;
|
|
32601
|
+
var cs = contentEl ? getComputedStyle(contentEl) : {};
|
|
32602
|
+
var padTop = parseFloat((cs === null || cs === void 0 ? void 0 : cs.paddingTop) || '0') || 0;
|
|
32603
|
+
var padBottom = parseFloat((cs === null || cs === void 0 ? void 0 : cs.paddingBottom) || '0') || 0;
|
|
32604
|
+
var contentPaddingY = padTop + padBottom;
|
|
32605
|
+
var tabsHeight = tabsEl ? tabsEl.getBoundingClientRect().height : 0;
|
|
32606
|
+
var tabsMarginBottom = 8;
|
|
32607
|
+
var listMarginTop = 8;
|
|
32608
|
+
var desiredListHeight = Math.min(listEl ? listEl.scrollHeight : 0, listMaxHeightPx);
|
|
32609
|
+
var desiredHeight = contentPaddingY + tabsHeight + tabsMarginBottom + listMarginTop + desiredListHeight;
|
|
32610
|
+
var maxPx = parseInt(String(height || '300'), 10);
|
|
32611
|
+
var measuredTarget = Math.min(desiredHeight || 0, isNaN(maxPx) ? 300 : Math.min(maxPx, desiredHeight));
|
|
32612
|
+
var nextHeight = Math.max(panelHeightPx || 0, measuredTarget);
|
|
32613
|
+
var availableBelow = containerRect.bottom - anchorRect.bottom - 8;
|
|
32614
|
+
var availableAbove = anchorRect.top - containerRect.top - 8;
|
|
32615
|
+
setFlipLocked(true);
|
|
32616
|
+
if (messagesMarkersLoadingState !== LOADING_STATE.LOADING) {
|
|
32617
|
+
var overflowBelow = nextHeight > availableBelow;
|
|
32618
|
+
var overflowAbove = nextHeight > availableAbove;
|
|
32619
|
+
setFlipAbove(function (prev) {
|
|
32620
|
+
if (prev) {
|
|
32621
|
+
if (overflowAbove && !overflowBelow) return false;
|
|
32622
|
+
return true;
|
|
32623
|
+
}
|
|
32624
|
+
if (overflowBelow && !overflowAbove) return true;
|
|
32625
|
+
return false;
|
|
32626
|
+
});
|
|
32627
|
+
}
|
|
32628
|
+
if (panelHeightPx !== nextHeight) {
|
|
32629
|
+
setIsTransitioning(true);
|
|
32630
|
+
setPanelHeightPx(nextHeight);
|
|
32631
|
+
}
|
|
32632
|
+
}, [ready, panelHeightPx, activeMarkers.length, messagesMarkersLoadingState, height]);
|
|
32633
|
+
useEffect(function () {
|
|
32634
|
+
if (messagesMarkersLoadingState === LOADING_STATE.LOADING) {
|
|
32635
|
+
setFlipLocked(true);
|
|
32636
|
+
}
|
|
32637
|
+
}, [messagesMarkersLoadingState]);
|
|
32638
|
+
useEffect(function () {
|
|
32639
|
+
var el = panelRef.current;
|
|
32640
|
+
if (!el) return;
|
|
32641
|
+
var onEnd = function onEnd(e) {
|
|
32642
|
+
if (e.propertyName === 'height') {
|
|
32643
|
+
setIsTransitioning(false);
|
|
32644
|
+
setTimeout(function () {
|
|
32645
|
+
setFlipLocked(false);
|
|
32646
|
+
}, 50);
|
|
32647
|
+
}
|
|
32648
|
+
};
|
|
32649
|
+
el.addEventListener('transitionend', onEnd);
|
|
32650
|
+
return function () {
|
|
32651
|
+
el.removeEventListener('transitionend', onEnd);
|
|
32652
|
+
};
|
|
32653
|
+
}, []);
|
|
32654
|
+
useEffect(function () {
|
|
32655
|
+
if (activeTab && message.id && message.channelId) {
|
|
32656
|
+
dispatch(getMessageMarkersAC(message.id, message.channelId, activeTab));
|
|
32657
|
+
}
|
|
32658
|
+
}, [activeTab, message.id, message.channelId]);
|
|
32659
|
+
return /*#__PURE__*/React__default.createElement(DropdownRoot, {
|
|
32660
|
+
ref: rootRef,
|
|
32661
|
+
rtl: message.incoming,
|
|
32662
|
+
backgroundColor: backgroundSections,
|
|
32663
|
+
flip: flipAbove,
|
|
32664
|
+
ready: ready
|
|
32665
|
+
}, /*#__PURE__*/React__default.createElement(Panel, {
|
|
32666
|
+
ref: panelRef,
|
|
32667
|
+
bg: backgroundSections,
|
|
32668
|
+
open: open,
|
|
32669
|
+
heightPx: panelHeightPx,
|
|
32670
|
+
maxHeight: height,
|
|
32671
|
+
maxWidth: maxWidth,
|
|
32672
|
+
minWidth: minWidth
|
|
32673
|
+
}, /*#__PURE__*/React__default.createElement(Content, {
|
|
32674
|
+
ref: contentRef
|
|
32675
|
+
}, /*#__PURE__*/React__default.createElement(Tabs, {
|
|
32676
|
+
ref: tabsRef
|
|
32677
|
+
}, tabItems.map(function (tab) {
|
|
32678
|
+
return /*#__PURE__*/React__default.createElement(Tab, {
|
|
32679
|
+
key: tab.key,
|
|
32680
|
+
active: activeTab === tab.key,
|
|
32681
|
+
activeColor: tabsStyles.activeColor || textOnPrimary,
|
|
32682
|
+
inactiveColor: tabsStyles.inactiveColor || textSecondary,
|
|
32683
|
+
onClick: function onClick() {
|
|
32684
|
+
return setActiveTab(tab.key);
|
|
32685
|
+
},
|
|
32686
|
+
textOnPrimary: textOnPrimary,
|
|
32687
|
+
textSecondary: textSecondary,
|
|
32688
|
+
background: activeTab === tab.key ? accentColor : 'transparent',
|
|
32689
|
+
borderColor: border
|
|
32690
|
+
}, tab.label, showCounts ? " (" + tab.data.length + ")" : '');
|
|
32691
|
+
})), /*#__PURE__*/React__default.createElement(List$1, {
|
|
32692
|
+
ref: listRef,
|
|
32693
|
+
maxHeight: listMaxHeightPx
|
|
32694
|
+
}, activeMarkers.map(function (marker) {
|
|
32695
|
+
var _marker$user;
|
|
32696
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
32697
|
+
key: (((_marker$user = marker.user) === null || _marker$user === void 0 ? void 0 : _marker$user.id) || 'deleted') + "-" + (marker.createdAt || '')
|
|
32698
|
+
}, renderRow(marker));
|
|
32699
|
+
}), !activeMarkers.length && messagesMarkersLoadingState !== LOADING_STATE.LOADING && (/*#__PURE__*/React__default.createElement(Empty, {
|
|
32700
|
+
color: textSecondary
|
|
32701
|
+
}, "No results"))))));
|
|
32702
|
+
};
|
|
32703
|
+
function sortByDateDesc(a, b) {
|
|
32704
|
+
var aDate = a.createdAt || a.createAt;
|
|
32705
|
+
var bDate = b.createdAt || b.createAt;
|
|
32706
|
+
var aTime = aDate ? new Date(aDate).getTime() : 0;
|
|
32707
|
+
var bTime = bDate ? new Date(bDate).getTime() : 0;
|
|
32708
|
+
return bTime - aTime;
|
|
32709
|
+
}
|
|
32710
|
+
var Tabs = styled.div(_templateObject$C || (_templateObject$C = _taggedTemplateLiteralLoose(["\n display: flex;\n gap: 8px;\n justify-content: start;\n margin-bottom: 8px;\n"])));
|
|
32711
|
+
var Tab = styled.button(_templateObject2$x || (_templateObject2$x = _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) {
|
|
32712
|
+
return p.active ? p.textOnPrimary : p.textSecondary;
|
|
32713
|
+
}, function (p) {
|
|
32714
|
+
return p.background;
|
|
32715
|
+
}, function (p) {
|
|
32716
|
+
return p.active ? p.background : p.borderColor;
|
|
32717
|
+
});
|
|
32718
|
+
var List$1 = styled.div(_templateObject3$r || (_templateObject3$r = _taggedTemplateLiteralLoose(["\n margin-top: 8px;\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n max-height: ", ";\n min-height: 120px;\n"])), function (p) {
|
|
32719
|
+
return p.maxHeight ? p.maxHeight + "px" : 'unset';
|
|
32720
|
+
});
|
|
32721
|
+
var Row$1 = styled.div(_templateObject4$n || (_templateObject4$n = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 6px;\n border-radius: 10px;\n cursor: pointer;\n &:hover {\n background-color: ", ";\n }\n"])), function (p) {
|
|
32722
|
+
return p.backgroundHover;
|
|
32723
|
+
});
|
|
32724
|
+
var RowInfo = styled.div(_templateObject5$j || (_templateObject5$j = _taggedTemplateLiteralLoose(["\n display: flex;\n margin-right: auto;\n min-width: 0;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n"])));
|
|
32725
|
+
var RowTitle = styled.div(_templateObject6$g || (_templateObject6$g = _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) {
|
|
32726
|
+
return p.color;
|
|
32727
|
+
});
|
|
32728
|
+
var RowDate = styled.div(_templateObject7$e || (_templateObject7$e = _taggedTemplateLiteralLoose(["\n color: ", ";\n min-width: max-content;\n font-weight: 400;\n font-size: 13px;\n line-height: 16px;\n"])), function (p) {
|
|
32729
|
+
return p.color;
|
|
32730
|
+
});
|
|
32731
|
+
var Empty = styled.div(_templateObject8$d || (_templateObject8$d = _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) {
|
|
32732
|
+
return p.color;
|
|
32733
|
+
});
|
|
32734
|
+
var DropdownRoot = styled.div(_templateObject9$b || (_templateObject9$b = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: ", ";\n bottom: ", ";\n ", "\n z-index: 15;\n background: ", ";\n box-shadow: 0px 0px 24px 0px #11153929;\n border-radius: 16px;\n direction: initial;\n visibility: ", ";\n"])), function (p) {
|
|
32735
|
+
return p.flip ? 'auto' : 'calc(100% + 8px)';
|
|
32736
|
+
}, function (p) {
|
|
32737
|
+
return p.flip ? 'calc(100% + 8px)' : 'auto';
|
|
32738
|
+
}, function (p) {
|
|
32739
|
+
return p.rtl ? 'left: 4%;' : 'right: 4%;';
|
|
32740
|
+
}, function (_ref2) {
|
|
32741
|
+
var backgroundColor = _ref2.backgroundColor;
|
|
32742
|
+
return backgroundColor;
|
|
32743
|
+
}, function (p) {
|
|
32744
|
+
return p.ready ? 'visible' : 'hidden';
|
|
32745
|
+
});
|
|
32746
|
+
var Panel = styled.div(_templateObject0$a || (_templateObject0$a = _taggedTemplateLiteralLoose(["\n background: ", ";\n border-radius: 16px;\n overflow: hidden;\n transition: height 0.25s ease;\n height: ", ";\n width: ", ";\n min-width: ", ";\n display: flex;\n flex-direction: column;\n"])), function (p) {
|
|
32747
|
+
return p.bg;
|
|
32748
|
+
}, function (p) {
|
|
32749
|
+
return p.open ? Math.min(p.heightPx || 0, parseInt(String(p.maxHeight || '300'), 10) || 300) + "px" : '0';
|
|
32750
|
+
}, function (p) {
|
|
32751
|
+
return p.maxWidth || '340px';
|
|
32752
|
+
}, function (p) {
|
|
32753
|
+
return p.minWidth || '340px';
|
|
32754
|
+
});
|
|
32755
|
+
var Content = styled.div(_templateObject1$7 || (_templateObject1$7 = _taggedTemplateLiteralLoose(["\n padding: 16px 12px;\n height: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n"])));
|
|
32756
|
+
|
|
32757
|
+
var _templateObject$D, _templateObject2$y, _templateObject3$s, _templateObject4$o, _templateObject5$k, _templateObject6$h, _templateObject7$f, _templateObject8$e, _templateObject9$c, _templateObject0$b, _templateObject1$8, _templateObject10$4, _templateObject11$4, _templateObject12$3;
|
|
32062
32758
|
var Message$1 = function Message(_ref) {
|
|
32063
32759
|
var message = _ref.message,
|
|
32064
32760
|
channel = _ref.channel,
|
|
@@ -32118,6 +32814,8 @@ var Message$1 = function Message(_ref) {
|
|
|
32118
32814
|
deleteMessage = _ref$deleteMessage === void 0 ? true : _ref$deleteMessage,
|
|
32119
32815
|
_ref$selectMessage = _ref.selectMessage,
|
|
32120
32816
|
selectMessage = _ref$selectMessage === void 0 ? true : _ref$selectMessage,
|
|
32817
|
+
_ref$showInfoMessage = _ref.showInfoMessage,
|
|
32818
|
+
showInfoMessage = _ref$showInfoMessage === void 0 ? true : _ref$showInfoMessage,
|
|
32121
32819
|
allowEditDeleteIncomingMessage = _ref.allowEditDeleteIncomingMessage,
|
|
32122
32820
|
_ref$forwardMessage = _ref.forwardMessage,
|
|
32123
32821
|
forwardMessage = _ref$forwardMessage === void 0 ? true : _ref$forwardMessage,
|
|
@@ -32146,6 +32844,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32146
32844
|
selectIconOrder = _ref.selectIconOrder,
|
|
32147
32845
|
starIconOrder = _ref.starIconOrder,
|
|
32148
32846
|
reportIconOrder = _ref.reportIconOrder,
|
|
32847
|
+
infoIconOrder = _ref.infoIconOrder,
|
|
32149
32848
|
reactionIconTooltipText = _ref.reactionIconTooltipText,
|
|
32150
32849
|
editIconTooltipText = _ref.editIconTooltipText,
|
|
32151
32850
|
copyIconTooltipText = _ref.copyIconTooltipText,
|
|
@@ -32156,6 +32855,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32156
32855
|
selectIconTooltipText = _ref.selectIconTooltipText,
|
|
32157
32856
|
starIconTooltipText = _ref.starIconTooltipText,
|
|
32158
32857
|
reportIconTooltipText = _ref.reportIconTooltipText,
|
|
32858
|
+
infoIconTooltipText = _ref.infoIconTooltipText,
|
|
32159
32859
|
messageActionIconsColor = _ref.messageActionIconsColor,
|
|
32160
32860
|
messageStatusSize = _ref.messageStatusSize,
|
|
32161
32861
|
messageStatusColor = _ref.messageStatusColor,
|
|
@@ -32207,7 +32907,9 @@ var Message$1 = function Message(_ref) {
|
|
|
32207
32907
|
messageTextFontSize = _ref.messageTextFontSize,
|
|
32208
32908
|
messageTextLineHeight = _ref.messageTextLineHeight,
|
|
32209
32909
|
messageTimeColorOnAttachment = _ref.messageTimeColorOnAttachment,
|
|
32210
|
-
shouldOpenUserProfileForMention = _ref.shouldOpenUserProfileForMention
|
|
32910
|
+
shouldOpenUserProfileForMention = _ref.shouldOpenUserProfileForMention,
|
|
32911
|
+
_ref$showInfoMessageP = _ref.showInfoMessageProps,
|
|
32912
|
+
showInfoMessageProps = _ref$showInfoMessageP === void 0 ? {} : _ref$showInfoMessageP;
|
|
32211
32913
|
var _useColor = useColors(),
|
|
32212
32914
|
accentColor = _useColor[THEME_COLORS.ACCENT],
|
|
32213
32915
|
backgroundSections = _useColor[THEME_COLORS.BACKGROUND_SECTIONS],
|
|
@@ -32229,29 +32931,32 @@ var Message$1 = function Message(_ref) {
|
|
|
32229
32931
|
reportPopupOpen = _useState3[0],
|
|
32230
32932
|
setReportPopupOpen = _useState3[1];
|
|
32231
32933
|
var _useState4 = useState(false),
|
|
32232
|
-
|
|
32233
|
-
|
|
32934
|
+
infoPopupOpen = _useState4[0],
|
|
32935
|
+
setInfoPopupOpen = _useState4[1];
|
|
32234
32936
|
var _useState5 = useState(false),
|
|
32235
|
-
|
|
32236
|
-
|
|
32937
|
+
messageActionsShow = _useState5[0],
|
|
32938
|
+
setMessageActionsShow = _useState5[1];
|
|
32237
32939
|
var _useState6 = useState(false),
|
|
32238
|
-
|
|
32239
|
-
|
|
32940
|
+
emojisPopupOpen = _useState6[0],
|
|
32941
|
+
setEmojisPopupOpen = _useState6[1];
|
|
32240
32942
|
var _useState7 = useState(false),
|
|
32241
|
-
|
|
32242
|
-
|
|
32243
|
-
var _useState8 = useState(
|
|
32244
|
-
|
|
32245
|
-
|
|
32246
|
-
var _useState9 = useState(
|
|
32247
|
-
|
|
32248
|
-
|
|
32249
|
-
var _useState0 = useState(
|
|
32943
|
+
frequentlyEmojisOpen = _useState7[0],
|
|
32944
|
+
setFrequentlyEmojisOpen = _useState7[1];
|
|
32945
|
+
var _useState8 = useState(false),
|
|
32946
|
+
reactionsPopupOpen = _useState8[0],
|
|
32947
|
+
setReactionsPopupOpen = _useState8[1];
|
|
32948
|
+
var _useState9 = useState(0),
|
|
32949
|
+
reactionsPopupPosition = _useState9[0],
|
|
32950
|
+
setReactionsPopupPosition = _useState9[1];
|
|
32951
|
+
var _useState0 = useState(''),
|
|
32952
|
+
emojisPopupPosition = _useState0[0],
|
|
32953
|
+
setEmojisPopupPosition = _useState0[1];
|
|
32954
|
+
var _useState1 = useState({
|
|
32250
32955
|
left: 0,
|
|
32251
32956
|
right: 0
|
|
32252
32957
|
}),
|
|
32253
|
-
reactionsPopupHorizontalPosition =
|
|
32254
|
-
setReactionsPopupHorizontalPosition =
|
|
32958
|
+
reactionsPopupHorizontalPosition = _useState1[0],
|
|
32959
|
+
setReactionsPopupHorizontalPosition = _useState1[1];
|
|
32255
32960
|
var scrollToNewMessage = useSelector(scrollToNewMessageSelector, shallowEqual);
|
|
32256
32961
|
var messageItemRef = useRef();
|
|
32257
32962
|
var isVisible = useOnScreen(messageItemRef);
|
|
@@ -32287,6 +32992,11 @@ var Message$1 = function Message(_ref) {
|
|
|
32287
32992
|
setMessageActionsShow(false);
|
|
32288
32993
|
stopScrolling(!forwardPopupOpen);
|
|
32289
32994
|
};
|
|
32995
|
+
var handleToggleInfoMessagePopupOpen = function handleToggleInfoMessagePopupOpen() {
|
|
32996
|
+
setInfoPopupOpen(!infoPopupOpen);
|
|
32997
|
+
setMessageActionsShow(false);
|
|
32998
|
+
};
|
|
32999
|
+
console.log('infoPopupOpen', infoPopupOpen);
|
|
32290
33000
|
var handleReplyMessage = function handleReplyMessage(threadReply) {
|
|
32291
33001
|
if (threadReply) ; else {
|
|
32292
33002
|
dispatch(setMessageForReplyAC(message));
|
|
@@ -32544,6 +33254,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32544
33254
|
emojisPopupPosition: emojisPopupPosition,
|
|
32545
33255
|
handleSetMessageForEdit: toggleEditMode,
|
|
32546
33256
|
handleResendMessage: handleResendMessage,
|
|
33257
|
+
handleOpenInfoMessage: handleToggleInfoMessagePopupOpen,
|
|
32547
33258
|
handleOpenDeleteMessage: handleToggleDeleteMessagePopup,
|
|
32548
33259
|
handleOpenForwardMessage: handleToggleForwardMessagePopup,
|
|
32549
33260
|
handleCopyMessage: handleCopyMessage,
|
|
@@ -32596,6 +33307,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32596
33307
|
replyMessageInThread: replyMessageInThread,
|
|
32597
33308
|
deleteMessage: deleteMessage,
|
|
32598
33309
|
selectMessage: selectMessage,
|
|
33310
|
+
showInfoMessage: showInfoMessage,
|
|
32599
33311
|
allowEditDeleteIncomingMessage: allowEditDeleteIncomingMessage,
|
|
32600
33312
|
forwardMessage: forwardMessage,
|
|
32601
33313
|
reportMessage: reportMessage,
|
|
@@ -32620,6 +33332,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32620
33332
|
selectIconOrder: selectIconOrder,
|
|
32621
33333
|
starIconOrder: starIconOrder,
|
|
32622
33334
|
reportIconOrder: reportIconOrder,
|
|
33335
|
+
infoIconOrder: infoIconOrder,
|
|
32623
33336
|
reactionIconTooltipText: reactionIconTooltipText,
|
|
32624
33337
|
editIconTooltipText: editIconTooltipText,
|
|
32625
33338
|
copyIconTooltipText: copyIconTooltipText,
|
|
@@ -32630,6 +33343,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32630
33343
|
selectIconTooltipText: selectIconTooltipText,
|
|
32631
33344
|
starIconTooltipText: starIconTooltipText,
|
|
32632
33345
|
reportIconTooltipText: reportIconTooltipText,
|
|
33346
|
+
infoIconTooltipText: infoIconTooltipText,
|
|
32633
33347
|
messageActionIconsColor: messageActionIconsColor,
|
|
32634
33348
|
messageStatusSize: messageStatusSize,
|
|
32635
33349
|
messageStatusColor: messageStatusColor,
|
|
@@ -32663,6 +33377,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32663
33377
|
setMessageActionsShow: setMessageActionsShow,
|
|
32664
33378
|
closeMessageActions: closeMessageActions,
|
|
32665
33379
|
handleToggleForwardMessagePopup: handleToggleForwardMessagePopup,
|
|
33380
|
+
handleToggleInfoMessagePopupOpen: handleToggleInfoMessagePopupOpen,
|
|
32666
33381
|
handleReplyMessage: handleReplyMessage,
|
|
32667
33382
|
handleToggleDeleteMessagePopup: handleToggleDeleteMessagePopup,
|
|
32668
33383
|
handleToggleReportPopupOpen: handleToggleReportPopupOpen,
|
|
@@ -32716,7 +33431,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32716
33431
|
handleAddDeleteEmoji: handleReactionAddDelete,
|
|
32717
33432
|
reactionsDetailsPopupBorderRadius: reactionsDetailsPopupBorderRadius,
|
|
32718
33433
|
reactionsDetailsPopupHeaderItemsStyle: reactionsDetailsPopupHeaderItemsStyle
|
|
32719
|
-
})),
|
|
33434
|
+
})), /*#__PURE__*/React__default.createElement(ReactionsContainer, {
|
|
32720
33435
|
id: message.id + "_reactions_container",
|
|
32721
33436
|
border: reactionsContainerBorder,
|
|
32722
33437
|
boxShadow: reactionsContainerBoxShadow,
|
|
@@ -32724,8 +33439,9 @@ var Message$1 = function Message(_ref) {
|
|
|
32724
33439
|
topPosition: reactionsContainerTopPosition,
|
|
32725
33440
|
padding: reactionsContainerPadding,
|
|
32726
33441
|
backgroundColor: reactionsContainerBackground || backgroundSections,
|
|
32727
|
-
rtlDirection: ownMessageOnRightSide && !message.incoming
|
|
32728
|
-
|
|
33442
|
+
rtlDirection: ownMessageOnRightSide && !message.incoming,
|
|
33443
|
+
isReacted: message.reactionTotals && message.reactionTotals.length > 0
|
|
33444
|
+
}, message.reactionTotals && message.reactionTotals.length && (/*#__PURE__*/React__default.createElement(MessageReactionsCont, {
|
|
32729
33445
|
rtlDirection: ownMessageOnRightSide && !message.incoming,
|
|
32730
33446
|
onClick: handleToggleReactionsPopup
|
|
32731
33447
|
}, message.reactionTotals.slice(0, reactionsDisplayCount || 5).map(function (summery) {
|
|
@@ -32769,16 +33485,21 @@ var Message$1 = function Message(_ref) {
|
|
|
32769
33485
|
togglePopup: handleToggleForwardMessagePopup,
|
|
32770
33486
|
buttonText: 'Forward',
|
|
32771
33487
|
title: 'Forward message'
|
|
32772
|
-
}))
|
|
33488
|
+
})), infoPopupOpen && (/*#__PURE__*/React__default.createElement(MessageInfo, Object.assign({
|
|
33489
|
+
message: message,
|
|
33490
|
+
togglePopup: handleToggleInfoMessagePopupOpen
|
|
33491
|
+
}, showInfoMessageProps, {
|
|
33492
|
+
handleOpenUserProfile: handleOpenUserProfile
|
|
33493
|
+
}))));
|
|
32773
33494
|
};
|
|
32774
33495
|
var Message$2 = /*#__PURE__*/React__default.memo(Message$1, function (prevProps, nextProps) {
|
|
32775
33496
|
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.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;
|
|
32776
33497
|
});
|
|
32777
|
-
var MessageReactionKey = styled.span(_templateObject$
|
|
32778
|
-
var ReactionItemCount = styled.span(_templateObject2$
|
|
33498
|
+
var MessageReactionKey = styled.span(_templateObject$D || (_templateObject$D = _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"])));
|
|
33499
|
+
var ReactionItemCount = styled.span(_templateObject2$y || (_templateObject2$y = _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) {
|
|
32779
33500
|
return props.color;
|
|
32780
33501
|
});
|
|
32781
|
-
var MessageReaction = styled.span(_templateObject3$
|
|
33502
|
+
var MessageReaction = styled.span(_templateObject3$s || (_templateObject3$s = _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) {
|
|
32782
33503
|
return props.margin || '0 8px 0 0';
|
|
32783
33504
|
}, function (props) {
|
|
32784
33505
|
return props.isLastReaction && '0';
|
|
@@ -32797,26 +33518,26 @@ var MessageReaction = styled.span(_templateObject3$r || (_templateObject3$r = _t
|
|
|
32797
33518
|
}, function (props) {
|
|
32798
33519
|
return props.backgroundColor;
|
|
32799
33520
|
});
|
|
32800
|
-
var ThreadMessageCountContainer = styled.div(_templateObject4$
|
|
33521
|
+
var ThreadMessageCountContainer = styled.div(_templateObject4$o || (_templateObject4$o = _taggedTemplateLiteralLoose(["\n position: relative;\n color: ", ";\n font-weight: 500;\n font-size: 13px;\n line-height: 15px;\n margin: 12px;\n cursor: pointer;\n\n &::before {\n content: '';\n position: absolute;\n left: -25px;\n top: -21px;\n width: 16px;\n height: 26px;\n border-left: 2px solid #cdcdcf;\n border-bottom: 2px solid #cdcdcf;\n border-radius: 0 0 0 14px;\n }\n"])), function (props) {
|
|
32801
33522
|
return props.color;
|
|
32802
33523
|
});
|
|
32803
|
-
var FailedMessageIcon = styled.div(_templateObject5$
|
|
33524
|
+
var FailedMessageIcon = styled.div(_templateObject5$k || (_templateObject5$k = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: -6px;\n left: ", ";\n right: ", ";\n width: 20px;\n height: 20px;\n"])), function (props) {
|
|
32804
33525
|
return !props.rtl && '-24px';
|
|
32805
33526
|
}, function (props) {
|
|
32806
33527
|
return props.rtl && '-24px';
|
|
32807
33528
|
});
|
|
32808
|
-
var ErrorIconWrapper = styled(SvgErrorIcon)(_templateObject6$
|
|
32809
|
-
var SelectMessageWrapper = styled.div(_templateObject7$
|
|
33529
|
+
var ErrorIconWrapper = styled(SvgErrorIcon)(_templateObject6$h || (_templateObject6$h = _taggedTemplateLiteralLoose(["\n width: 20px;\n height: 20px;\n"])));
|
|
33530
|
+
var SelectMessageWrapper = styled.div(_templateObject7$f || (_templateObject7$f = _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) {
|
|
32810
33531
|
return !props.disabled && 'pointer';
|
|
32811
33532
|
}, function (props) {
|
|
32812
33533
|
return props.activeColor;
|
|
32813
33534
|
});
|
|
32814
|
-
var EmptySelection = styled.span(_templateObject8$
|
|
33535
|
+
var EmptySelection = styled.span(_templateObject8$e || (_templateObject8$e = _taggedTemplateLiteralLoose(["\n display: inline-block;\n width: 24px;\n height: 24px;\n border: 1.5px solid ", ";\n box-sizing: border-box;\n border-radius: 50%;\n transform: scale(0.92);\n opacity: ", ";\n"])), function (props) {
|
|
32815
33536
|
return props.borderColor;
|
|
32816
33537
|
}, function (props) {
|
|
32817
33538
|
return props.disabled && '0.5';
|
|
32818
33539
|
});
|
|
32819
|
-
var ReactionsContainer = styled.div(_templateObject9$
|
|
33540
|
+
var ReactionsContainer = styled.div(_templateObject9$c || (_templateObject9$c = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n margin-left: ", ";\n margin-right: ", ";\n\n margin-top: 4px;\n justify-content: flex-end;\n border: ", ";\n box-shadow: ", ";\n filter: drop-shadow(0px 0px 2px rgba(17, 21, 57, 0.08));\n border-radius: ", ";\n background-color: ", ";\n padding: ", ";\n z-index: 9;\n ", ";\n overflow: hidden;\n height: ", ";\n transition: all 0.3s;\n"])), function (props) {
|
|
32820
33541
|
return props.rtlDirection && 'auto';
|
|
32821
33542
|
}, function (props) {
|
|
32822
33543
|
return !props.rtlDirection && 'auto';
|
|
@@ -32829,14 +33550,16 @@ var ReactionsContainer = styled.div(_templateObject9$b || (_templateObject9$b =
|
|
|
32829
33550
|
}, function (props) {
|
|
32830
33551
|
return props.backgroundColor;
|
|
32831
33552
|
}, function (props) {
|
|
32832
|
-
return props.padding || '4px 8px';
|
|
33553
|
+
return !props.isReacted ? '0' : props.padding || '4px 8px';
|
|
32833
33554
|
}, function (props) {
|
|
32834
33555
|
return props.topPosition && "\n position: relative;\n top: " + props.topPosition + ";\n ";
|
|
33556
|
+
}, function (props) {
|
|
33557
|
+
return props.isReacted ? '16px' : '0';
|
|
32835
33558
|
});
|
|
32836
|
-
var MessageReactionsCont = styled.div(_templateObject0$
|
|
33559
|
+
var MessageReactionsCont = styled.div(_templateObject0$b || (_templateObject0$b = _taggedTemplateLiteralLoose(["\n position: relative;\n display: inline-flex;\n max-width: 300px;\n direction: ", ";\n cursor: pointer;\n"])), function (props) {
|
|
32837
33560
|
return props.rtlDirection && 'ltr';
|
|
32838
33561
|
});
|
|
32839
|
-
var MessageStatus$1 = styled.span(_templateObject1$
|
|
33562
|
+
var MessageStatus$1 = styled.span(_templateObject1$8 || (_templateObject1$8 = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n margin-left: 4px;\n text-align: right;\n height: ", ";\n & > svg {\n height: 16px;\n width: 16px;\n }\n"])), function (props) {
|
|
32840
33563
|
return props.height || '14px';
|
|
32841
33564
|
});
|
|
32842
33565
|
var HiddenMessageTime$1 = styled.span(_templateObject10$4 || (_templateObject10$4 = _taggedTemplateLiteralLoose(["\n display: ", ";\n font-weight: 400;\n font-size: ", ";\n color: ", ";\n"])), function (props) {
|
|
@@ -32881,7 +33604,7 @@ var HiddenMessageProperty;
|
|
|
32881
33604
|
HiddenMessageProperty["hideAfterSendMessage"] = "hideAfterSendMessage";
|
|
32882
33605
|
})(HiddenMessageProperty || (HiddenMessageProperty = {}));
|
|
32883
33606
|
|
|
32884
|
-
var _templateObject$
|
|
33607
|
+
var _templateObject$E, _templateObject2$z, _templateObject3$t, _templateObject4$p, _templateObject5$l, _templateObject6$i, _templateObject7$g, _templateObject8$f, _templateObject9$d, _templateObject0$c, _templateObject1$9;
|
|
32885
33608
|
var CreateMessageDateDivider = function CreateMessageDateDivider(_ref) {
|
|
32886
33609
|
var lastIndex = _ref.lastIndex,
|
|
32887
33610
|
currentMessageDate = _ref.currentMessageDate,
|
|
@@ -32958,6 +33681,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
32958
33681
|
forwardMessage = _ref2.forwardMessage,
|
|
32959
33682
|
deleteMessage = _ref2.deleteMessage,
|
|
32960
33683
|
selectMessage = _ref2.selectMessage,
|
|
33684
|
+
showInfoMessage = _ref2.showInfoMessage,
|
|
32961
33685
|
reportMessage = _ref2.reportMessage,
|
|
32962
33686
|
reactionIcon = _ref2.reactionIcon,
|
|
32963
33687
|
editIcon = _ref2.editIcon,
|
|
@@ -33004,6 +33728,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33004
33728
|
selectIconOrder = _ref2.selectIconOrder,
|
|
33005
33729
|
starIconOrder = _ref2.starIconOrder,
|
|
33006
33730
|
reportIconOrder = _ref2.reportIconOrder,
|
|
33731
|
+
infoIconOrder = _ref2.infoIconOrder,
|
|
33007
33732
|
reactionIconTooltipText = _ref2.reactionIconTooltipText,
|
|
33008
33733
|
editIconTooltipText = _ref2.editIconTooltipText,
|
|
33009
33734
|
copyIconTooltipText = _ref2.copyIconTooltipText,
|
|
@@ -33011,6 +33736,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33011
33736
|
replyInThreadIconTooltipText = _ref2.replyInThreadIconTooltipText,
|
|
33012
33737
|
forwardIconTooltipText = _ref2.forwardIconTooltipText,
|
|
33013
33738
|
deleteIconTooltipText = _ref2.deleteIconTooltipText,
|
|
33739
|
+
infoIconTooltipText = _ref2.infoIconTooltipText,
|
|
33014
33740
|
selectIconTooltipText = _ref2.selectIconTooltipText,
|
|
33015
33741
|
starIconTooltipText = _ref2.starIconTooltipText,
|
|
33016
33742
|
reportIconTooltipText = _ref2.reportIconTooltipText,
|
|
@@ -33063,7 +33789,9 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33063
33789
|
messageTimeColor = _ref2.messageTimeColor,
|
|
33064
33790
|
messageStatusAndTimeLineHeight = _ref2.messageStatusAndTimeLineHeight,
|
|
33065
33791
|
hiddenMessagesProperties = _ref2.hiddenMessagesProperties,
|
|
33066
|
-
shouldOpenUserProfileForMention = _ref2.shouldOpenUserProfileForMention
|
|
33792
|
+
shouldOpenUserProfileForMention = _ref2.shouldOpenUserProfileForMention,
|
|
33793
|
+
_ref2$showInfoMessage = _ref2.showInfoMessageProps,
|
|
33794
|
+
showInfoMessageProps = _ref2$showInfoMessage === void 0 ? {} : _ref2$showInfoMessage;
|
|
33067
33795
|
var _useColor = useColors(),
|
|
33068
33796
|
outgoingMessageBackground = _useColor[THEME_COLORS.OUTGOING_MESSAGE_BACKGROUND],
|
|
33069
33797
|
themeBackgroundColor = _useColor[THEME_COLORS.BACKGROUND],
|
|
@@ -33153,12 +33881,20 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33153
33881
|
var text = '';
|
|
33154
33882
|
for (var i = dateLabels.length - 1; i >= 0; i--) {
|
|
33155
33883
|
var dateLabel = dateLabels[i];
|
|
33156
|
-
|
|
33884
|
+
var aroundThreshold = 40;
|
|
33885
|
+
var labelTop = dateLabel.offsetTop - 28;
|
|
33886
|
+
var labelBottom = labelTop + (dateLabel.offsetHeight || 0) - 28;
|
|
33887
|
+
if (container.scrollTop >= labelTop - aroundThreshold && container.scrollTop <= labelBottom + aroundThreshold) {
|
|
33888
|
+
setShowTopDate(false);
|
|
33889
|
+
break;
|
|
33890
|
+
}
|
|
33891
|
+
if (!text && container.scrollTop > labelTop - 28) {
|
|
33157
33892
|
var span = (dateLabel === null || dateLabel === void 0 ? void 0 : dateLabel.firstChild) && dateLabel.firstChild.firstChild;
|
|
33158
33893
|
text = span ? span.innerText || '' : '';
|
|
33894
|
+
setTopDateLabel(text);
|
|
33895
|
+
break;
|
|
33159
33896
|
}
|
|
33160
33897
|
}
|
|
33161
|
-
setTopDateLabel(text);
|
|
33162
33898
|
};
|
|
33163
33899
|
var handleMessagesListScroll = useCallback(function () {
|
|
33164
33900
|
try {
|
|
@@ -33174,9 +33910,6 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33174
33910
|
}
|
|
33175
33911
|
setShowTopDate(true);
|
|
33176
33912
|
clearTimeout(hideTopDateTimeout.current);
|
|
33177
|
-
hideTopDateTimeout.current = setTimeout(function () {
|
|
33178
|
-
setShowTopDate(false);
|
|
33179
|
-
}, 1000);
|
|
33180
33913
|
renderTopDate();
|
|
33181
33914
|
var forceLoadPrevMessages = false;
|
|
33182
33915
|
if (-target.scrollTop + target.offsetHeight + 30 > target.scrollHeight) {
|
|
@@ -33687,7 +34420,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33687
34420
|
backgroundColor: surface1,
|
|
33688
34421
|
draggable: true,
|
|
33689
34422
|
iconColor: accentColor
|
|
33690
|
-
}, /*#__PURE__*/React__default.createElement(SvgChoseMedia, null)), "Drag & drop to send as media")))), /*#__PURE__*/React__default.createElement(React__default.Fragment, null, showTopFixedDate && (/*#__PURE__*/React__default.createElement(MessageTopDate, {
|
|
34423
|
+
}, /*#__PURE__*/React__default.createElement(SvgChoseMedia, null)), "Drag & drop to send as media")))), /*#__PURE__*/React__default.createElement(React__default.Fragment, null, showTopFixedDate && topDateLabel && (/*#__PURE__*/React__default.createElement(MessageTopDate, {
|
|
33691
34424
|
visible: showTopDate,
|
|
33692
34425
|
dateDividerFontSize: dateDividerFontSize,
|
|
33693
34426
|
dateDividerTextColor: dateDividerTextColor || textOnPrimary,
|
|
@@ -33801,6 +34534,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33801
34534
|
replyMessageInThread: replyMessageInThread,
|
|
33802
34535
|
deleteMessage: deleteMessage,
|
|
33803
34536
|
selectMessage: selectMessage,
|
|
34537
|
+
showInfoMessage: showInfoMessage,
|
|
33804
34538
|
allowEditDeleteIncomingMessage: allowEditDeleteIncomingMessage,
|
|
33805
34539
|
reportMessage: reportMessage,
|
|
33806
34540
|
reactionIcon: reactionIcon,
|
|
@@ -33826,6 +34560,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33826
34560
|
replyInThreadIconOrder: replyInThreadIconOrder,
|
|
33827
34561
|
forwardIconOrder: forwardIconOrder,
|
|
33828
34562
|
deleteIconOrder: deleteIconOrder,
|
|
34563
|
+
infoIconOrder: infoIconOrder,
|
|
33829
34564
|
selectIconOrder: selectIconOrder,
|
|
33830
34565
|
starIconOrder: starIconOrder,
|
|
33831
34566
|
reportIconOrder: reportIconOrder,
|
|
@@ -33836,6 +34571,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33836
34571
|
replyInThreadIconTooltipText: replyInThreadIconTooltipText,
|
|
33837
34572
|
forwardIconTooltipText: forwardIconTooltipText,
|
|
33838
34573
|
deleteIconTooltipText: deleteIconTooltipText,
|
|
34574
|
+
infoIconTooltipText: infoIconTooltipText,
|
|
33839
34575
|
selectIconTooltipText: selectIconTooltipText,
|
|
33840
34576
|
starIconTooltipText: starIconTooltipText,
|
|
33841
34577
|
reportIconTooltipText: reportIconTooltipText,
|
|
@@ -33885,7 +34621,8 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33885
34621
|
messageTimeFontSize: messageTimeFontSize,
|
|
33886
34622
|
messageTimeColor: messageTimeColor,
|
|
33887
34623
|
messageStatusAndTimeLineHeight: messageStatusAndTimeLineHeight,
|
|
33888
|
-
shouldOpenUserProfileForMention: shouldOpenUserProfileForMention
|
|
34624
|
+
shouldOpenUserProfileForMention: shouldOpenUserProfileForMention,
|
|
34625
|
+
showInfoMessageProps: showInfoMessageProps
|
|
33889
34626
|
}))), isUnreadMessage ? (/*#__PURE__*/React__default.createElement(MessageDivider, {
|
|
33890
34627
|
theme: theme,
|
|
33891
34628
|
newMessagesSeparatorTextColor: newMessagesSeparatorTextColor,
|
|
@@ -33915,14 +34652,14 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33915
34652
|
attachmentsPreview: attachmentsPreview
|
|
33916
34653
|
})))));
|
|
33917
34654
|
};
|
|
33918
|
-
var Container$h = styled.div(_templateObject$
|
|
34655
|
+
var Container$h = styled.div(_templateObject$E || (_templateObject$E = _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) {
|
|
33919
34656
|
return props.backgroundColor;
|
|
33920
34657
|
}, function (props) {
|
|
33921
34658
|
return props.thumbColor;
|
|
33922
34659
|
});
|
|
33923
|
-
var EmptyDiv = styled.div(_templateObject2$
|
|
33924
|
-
var MessagesBox = styled.div(_templateObject3$
|
|
33925
|
-
var MessageTopDate = styled.div(_templateObject4$
|
|
34660
|
+
var EmptyDiv = styled.div(_templateObject2$z || (_templateObject2$z = _taggedTemplateLiteralLoose(["\n height: 300px;\n"])));
|
|
34661
|
+
var MessagesBox = styled.div(_templateObject3$t || (_templateObject3$t = _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"])));
|
|
34662
|
+
var MessageTopDate = styled.div(_templateObject4$p || (_templateObject4$p = _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) {
|
|
33926
34663
|
return props.topOffset ? props.topOffset + 22 + "px" : '22px';
|
|
33927
34664
|
}, function (props) {
|
|
33928
34665
|
return props.marginTop;
|
|
@@ -33941,19 +34678,19 @@ var MessageTopDate = styled.div(_templateObject4$o || (_templateObject4$o = _tag
|
|
|
33941
34678
|
}, function (props) {
|
|
33942
34679
|
return props.dateDividerBorderRadius || '14px';
|
|
33943
34680
|
});
|
|
33944
|
-
var DragAndDropContainer = styled.div(_templateObject5$
|
|
34681
|
+
var DragAndDropContainer = styled.div(_templateObject5$l || (_templateObject5$l = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n margin-bottom: -31px;\n margin-top: -2px;\n\n position: absolute;\n left: 0;\n top: ", ";\n width: 100%;\n height: ", ";\n background-color: ", ";\n z-index: 999;\n"])), function (props) {
|
|
33945
34682
|
return props.topOffset ? props.topOffset + 2 + "px" : 0;
|
|
33946
34683
|
}, function (props) {
|
|
33947
34684
|
return props.height ? props.height + 30 + "px" : '100%';
|
|
33948
34685
|
}, function (props) {
|
|
33949
34686
|
return props.backgroundColor;
|
|
33950
34687
|
});
|
|
33951
|
-
var IconWrapper$1 = styled.span(_templateObject6$
|
|
34688
|
+
var IconWrapper$1 = styled.span(_templateObject6$i || (_templateObject6$i = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 64px;\n width: 64px;\n background-color: ", ";\n border-radius: 50%;\n text-align: center;\n margin-bottom: 16px;\n transition: all 0.3s;\n pointer-events: none;\n\n & > svg {\n color: ", ";\n width: 32px;\n height: 32px;\n }\n"])), function (props) {
|
|
33952
34689
|
return props.backgroundColor;
|
|
33953
34690
|
}, function (props) {
|
|
33954
34691
|
return props.iconColor;
|
|
33955
34692
|
});
|
|
33956
|
-
var DropAttachmentArea = styled.div(_templateObject7$
|
|
34693
|
+
var DropAttachmentArea = styled.div(_templateObject7$g || (_templateObject7$g = _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) {
|
|
33957
34694
|
return props.borderColor;
|
|
33958
34695
|
}, function (props) {
|
|
33959
34696
|
return props.margin || '12px 32px 32px';
|
|
@@ -33966,16 +34703,16 @@ var DropAttachmentArea = styled.div(_templateObject7$f || (_templateObject7$f =
|
|
|
33966
34703
|
}, IconWrapper$1, function (props) {
|
|
33967
34704
|
return props.iconBackgroundColor;
|
|
33968
34705
|
});
|
|
33969
|
-
var MessageWrapper = styled.div(_templateObject8$
|
|
34706
|
+
var MessageWrapper = styled.div(_templateObject8$f || (_templateObject8$f = _taggedTemplateLiteralLoose(["\n &.highlight {\n & .message_item {\n transition: all 0.2s ease-in-out;\n padding-top: 4px;\n padding-bottom: 4px;\n background-color: ", ";\n }\n }\n\n & .message_item {\n transition: all 0.2s ease-in-out;\n }\n"])), function (props) {
|
|
33970
34707
|
return props.highlightBg || '#d5d5d5';
|
|
33971
34708
|
});
|
|
33972
|
-
var NoMessagesContainer = styled.div(_templateObject9$
|
|
34709
|
+
var NoMessagesContainer = styled.div(_templateObject9$d || (_templateObject9$d = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n height: 100%;\n width: 100%;\n font-weight: 400;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.2px;\n color: ", ";\n"])), function (props) {
|
|
33973
34710
|
return props.color;
|
|
33974
34711
|
});
|
|
33975
|
-
var NoMessagesTitle = styled.h4(_templateObject0$
|
|
34712
|
+
var NoMessagesTitle = styled.h4(_templateObject0$c || (_templateObject0$c = _taggedTemplateLiteralLoose(["\n margin: 12px 0 8px;\n font-family: Inter, sans-serif;\n text-align: center;\n font-size: 20px;\n font-style: normal;\n font-weight: 500;\n line-height: 24px;\n color: ", ";\n"])), function (props) {
|
|
33976
34713
|
return props.color;
|
|
33977
34714
|
});
|
|
33978
|
-
var NoMessagesText = styled.p(_templateObject1$
|
|
34715
|
+
var NoMessagesText = styled.p(_templateObject1$9 || (_templateObject1$9 = _taggedTemplateLiteralLoose(["\n margin: 0;\n text-align: center;\n font-feature-settings:\n 'clig' off,\n 'liga' off;\n font-family: Inter, sans-serif;\n font-size: 15px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n color: ", ";\n"])), function (props) {
|
|
33979
34716
|
return props.color;
|
|
33980
34717
|
});
|
|
33981
34718
|
|
|
@@ -34015,6 +34752,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34015
34752
|
forwardMessage = _ref.forwardMessage,
|
|
34016
34753
|
deleteMessage = _ref.deleteMessage,
|
|
34017
34754
|
selectMessage = _ref.selectMessage,
|
|
34755
|
+
showInfoMessage = _ref.showInfoMessage,
|
|
34018
34756
|
reportMessage = _ref.reportMessage,
|
|
34019
34757
|
reactionIcon = _ref.reactionIcon,
|
|
34020
34758
|
editIcon = _ref.editIcon,
|
|
@@ -34061,6 +34799,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34061
34799
|
selectIconOrder = _ref.selectIconOrder,
|
|
34062
34800
|
starIconOrder = _ref.starIconOrder,
|
|
34063
34801
|
reportIconOrder = _ref.reportIconOrder,
|
|
34802
|
+
infoIconOrder = _ref.infoIconOrder,
|
|
34064
34803
|
reactionIconTooltipText = _ref.reactionIconTooltipText,
|
|
34065
34804
|
editIconTooltipText = _ref.editIconTooltipText,
|
|
34066
34805
|
copyIconTooltipText = _ref.copyIconTooltipText,
|
|
@@ -34071,6 +34810,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34071
34810
|
selectIconTooltipText = _ref.selectIconTooltipText,
|
|
34072
34811
|
starIconTooltipText = _ref.starIconTooltipText,
|
|
34073
34812
|
reportIconTooltipText = _ref.reportIconTooltipText,
|
|
34813
|
+
infoIconTooltipText = _ref.infoIconTooltipText,
|
|
34074
34814
|
messageActionIconsColor = _ref.messageActionIconsColor,
|
|
34075
34815
|
dateDividerFontSize = _ref.dateDividerFontSize,
|
|
34076
34816
|
dateDividerTextColor = _ref.dateDividerTextColor,
|
|
@@ -34121,7 +34861,9 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34121
34861
|
messageStatusAndTimeLineHeight = _ref.messageStatusAndTimeLineHeight,
|
|
34122
34862
|
_ref$hiddenMessagesPr = _ref.hiddenMessagesProperties,
|
|
34123
34863
|
hiddenMessagesProperties = _ref$hiddenMessagesPr === void 0 ? [] : _ref$hiddenMessagesPr,
|
|
34124
|
-
shouldOpenUserProfileForMention = _ref.shouldOpenUserProfileForMention
|
|
34864
|
+
shouldOpenUserProfileForMention = _ref.shouldOpenUserProfileForMention,
|
|
34865
|
+
_ref$showInfoMessageP = _ref.showInfoMessageProps,
|
|
34866
|
+
showInfoMessageProps = _ref$showInfoMessageP === void 0 ? {} : _ref$showInfoMessageP;
|
|
34125
34867
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(MessageList, {
|
|
34126
34868
|
fontFamily: fontFamily,
|
|
34127
34869
|
ownMessageOnRightSide: ownMessageOnRightSide,
|
|
@@ -34152,6 +34894,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34152
34894
|
forwardMessage: forwardMessage,
|
|
34153
34895
|
deleteMessage: deleteMessage,
|
|
34154
34896
|
selectMessage: selectMessage,
|
|
34897
|
+
showInfoMessage: showInfoMessage,
|
|
34155
34898
|
reportMessage: reportMessage,
|
|
34156
34899
|
reactionIcon: reactionIcon,
|
|
34157
34900
|
editIcon: editIcon,
|
|
@@ -34194,6 +34937,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34194
34937
|
forwardIconOrder: forwardIconOrder,
|
|
34195
34938
|
deleteIconOrder: deleteIconOrder,
|
|
34196
34939
|
selectIconOrder: selectIconOrder,
|
|
34940
|
+
infoIconOrder: infoIconOrder,
|
|
34197
34941
|
starIconOrder: starIconOrder,
|
|
34198
34942
|
reportIconOrder: reportIconOrder,
|
|
34199
34943
|
reactionIconTooltipText: reactionIconTooltipText,
|
|
@@ -34206,6 +34950,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34206
34950
|
selectIconTooltipText: selectIconTooltipText,
|
|
34207
34951
|
starIconTooltipText: starIconTooltipText,
|
|
34208
34952
|
reportIconTooltipText: reportIconTooltipText,
|
|
34953
|
+
infoIconTooltipText: infoIconTooltipText,
|
|
34209
34954
|
messageActionIconsColor: messageActionIconsColor,
|
|
34210
34955
|
dateDividerFontSize: dateDividerFontSize,
|
|
34211
34956
|
dateDividerTextColor: dateDividerTextColor,
|
|
@@ -34248,7 +34993,8 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34248
34993
|
messageTimeColor: messageTimeColor,
|
|
34249
34994
|
messageStatusAndTimeLineHeight: messageStatusAndTimeLineHeight,
|
|
34250
34995
|
hiddenMessagesProperties: hiddenMessagesProperties,
|
|
34251
|
-
shouldOpenUserProfileForMention: shouldOpenUserProfileForMention
|
|
34996
|
+
shouldOpenUserProfileForMention: shouldOpenUserProfileForMention,
|
|
34997
|
+
showInfoMessageProps: showInfoMessageProps
|
|
34252
34998
|
}));
|
|
34253
34999
|
};
|
|
34254
35000
|
|
|
@@ -34360,7 +35106,7 @@ function $isMentionNode(node) {
|
|
|
34360
35106
|
return node instanceof MentionNode;
|
|
34361
35107
|
}
|
|
34362
35108
|
|
|
34363
|
-
var _templateObject$
|
|
35109
|
+
var _templateObject$F, _templateObject2$A, _templateObject3$u, _templateObject4$q, _templateObject5$m;
|
|
34364
35110
|
var PUNCTUATION = '\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%\'"~=<>_:;';
|
|
34365
35111
|
var NAME = '\\b[A-Z][^\\s' + PUNCTUATION + ']';
|
|
34366
35112
|
var DocumentMentionsRegex = {
|
|
@@ -34640,8 +35386,8 @@ function MentionsPlugin(_ref3) {
|
|
|
34640
35386
|
}
|
|
34641
35387
|
});
|
|
34642
35388
|
}
|
|
34643
|
-
var MentionsContainerWrapper = styled.div(_templateObject$
|
|
34644
|
-
var MentionsList = styled.ul(_templateObject2$
|
|
35389
|
+
var MentionsContainerWrapper = styled.div(_templateObject$F || (_templateObject$F = _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"])));
|
|
35390
|
+
var MentionsList = styled.ul(_templateObject2$A || (_templateObject2$A = _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) {
|
|
34645
35391
|
return props.backgroundColor;
|
|
34646
35392
|
}, function (props) {
|
|
34647
35393
|
return props.withBorder && "1px solid " + props.borderColor;
|
|
@@ -34650,11 +35396,11 @@ var MentionsList = styled.ul(_templateObject2$z || (_templateObject2$z = _tagged
|
|
|
34650
35396
|
}, function (props) {
|
|
34651
35397
|
return props.hidden ? 'hidden' : 'visible';
|
|
34652
35398
|
});
|
|
34653
|
-
var MemberItem = styled.li(_templateObject3$
|
|
35399
|
+
var MemberItem = styled.li(_templateObject3$u || (_templateObject3$u = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-size: 15px;\n padding: 6px 16px;\n transition: all 0.2s;\n cursor: pointer;\n background-color: ", ";\n\n & ", " {\n width: 10px;\n height: 10px;\n }\n"])), function (props) {
|
|
34654
35400
|
return props.isActiveItem && props.activeBackgroundColor;
|
|
34655
35401
|
}, UserStatus);
|
|
34656
|
-
var UserNamePresence$2 = styled.div(_templateObject4$
|
|
34657
|
-
var MemberName$2 = styled.h3(_templateObject5$
|
|
35402
|
+
var UserNamePresence$2 = styled.div(_templateObject4$q || (_templateObject4$q = _taggedTemplateLiteralLoose(["\n width: calc(100% - 44px);\n margin-left: 12px;\n"])));
|
|
35403
|
+
var MemberName$2 = styled.h3(_templateObject5$m || (_templateObject5$m = _taggedTemplateLiteralLoose(["\n margin: 0;\n max-width: calc(100% - 1px);\n font-weight: 500;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.2px;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n color: ", ";\n"])), function (props) {
|
|
34658
35404
|
return props.color;
|
|
34659
35405
|
});
|
|
34660
35406
|
|
|
@@ -34787,7 +35533,7 @@ function SvgUnderline(props) {
|
|
|
34787
35533
|
}))));
|
|
34788
35534
|
}
|
|
34789
35535
|
|
|
34790
|
-
var _templateObject$
|
|
35536
|
+
var _templateObject$G, _templateObject2$B;
|
|
34791
35537
|
function mergeRegister() {
|
|
34792
35538
|
for (var _len = arguments.length, func = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34793
35539
|
func[_key] = arguments[_key];
|
|
@@ -35168,10 +35914,10 @@ function FloatingTextFormatToolbarPlugin(_ref3) {
|
|
|
35168
35914
|
editor = _useLexicalComposerCo[0];
|
|
35169
35915
|
return useFloatingTextFormatToolbar(editor, anchorElem);
|
|
35170
35916
|
}
|
|
35171
|
-
var FloatingTextFormatPopup = styled.div(_templateObject$
|
|
35917
|
+
var FloatingTextFormatPopup = styled.div(_templateObject$G || (_templateObject$G = _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) {
|
|
35172
35918
|
return props.popupColor;
|
|
35173
35919
|
});
|
|
35174
|
-
var Action$1 = styled.button(_templateObject2$
|
|
35920
|
+
var Action$1 = styled.button(_templateObject2$B || (_templateObject2$B = _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) {
|
|
35175
35921
|
return props.iconColor;
|
|
35176
35922
|
}, function (props) {
|
|
35177
35923
|
return props.isActive && "\n color: " + props.hoverIconColor + ";\n background-color: " + props.hoverBackgroundColor + ";\n ";
|
|
@@ -35494,7 +36240,7 @@ function FormatMessagePlugin(_ref) {
|
|
|
35494
36240
|
return null;
|
|
35495
36241
|
}
|
|
35496
36242
|
|
|
35497
|
-
var _templateObject$
|
|
36243
|
+
var _templateObject$H, _templateObject2$C, _templateObject3$v, _templateObject4$r, _templateObject5$n, _templateObject6$j, _templateObject7$h, _templateObject8$g;
|
|
35498
36244
|
var EmojiIcon$1 = function EmojiIcon(_ref) {
|
|
35499
36245
|
var collectionName = _ref.collectionName;
|
|
35500
36246
|
switch (collectionName) {
|
|
@@ -35689,7 +36435,7 @@ function EmojisPopup$1(_ref2) {
|
|
|
35689
36435
|
}));
|
|
35690
36436
|
}))));
|
|
35691
36437
|
}
|
|
35692
|
-
var Container$i = styled.div(_templateObject$
|
|
36438
|
+
var Container$i = styled.div(_templateObject$H || (_templateObject$H = _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) {
|
|
35693
36439
|
return props.leftPosition ? 'fixed' : props.relativePosition ? 'relative' : 'absolute';
|
|
35694
36440
|
}, function (props) {
|
|
35695
36441
|
return props.rightSide ? "calc(" + props.leftPosition + " - 250px)" : props.leftPosition || (props.rtlDirection ? '' : props.rightSide ? '' : '5px');
|
|
@@ -35710,23 +36456,23 @@ var Container$i = styled.div(_templateObject$G || (_templateObject$G = _taggedTe
|
|
|
35710
36456
|
}, function (props) {
|
|
35711
36457
|
return props.rendered && "\n height: 225px;\n ";
|
|
35712
36458
|
});
|
|
35713
|
-
var EmojiHeader$1 = styled.div(_templateObject2$
|
|
36459
|
+
var EmojiHeader$1 = styled.div(_templateObject2$C || (_templateObject2$C = _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) {
|
|
35714
36460
|
return props.color;
|
|
35715
36461
|
}, function (props) {
|
|
35716
36462
|
return props.padding || '6px 18px';
|
|
35717
36463
|
});
|
|
35718
|
-
var EmojiSection$1 = styled.div(_templateObject3$
|
|
35719
|
-
var EmojiCollection$1 = styled.span(_templateObject4$
|
|
36464
|
+
var EmojiSection$1 = styled.div(_templateObject3$v || (_templateObject3$v = _taggedTemplateLiteralLoose(["\n height: 180px;\n overflow-x: hidden;\n\n & ::selection {\n color: inherit;\n background: inherit;\n }\n"])));
|
|
36465
|
+
var EmojiCollection$1 = styled.span(_templateObject4$r || (_templateObject4$r = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: flex;\n justify-content: center;\n align-items: center;\n\n & > * {\n color: ", ";\n }\n"])), function (props) {
|
|
35720
36466
|
return props.iconColor;
|
|
35721
36467
|
});
|
|
35722
|
-
var CollectionPointer$1 = styled.span(_templateObject5$
|
|
35723
|
-
var AllEmojis$1 = styled.ul(_templateObject6$
|
|
35724
|
-
var EmojiFooter$1 = styled.div(_templateObject7$
|
|
36468
|
+
var CollectionPointer$1 = styled.span(_templateObject5$n || (_templateObject5$n = _taggedTemplateLiteralLoose([""])));
|
|
36469
|
+
var AllEmojis$1 = styled.ul(_templateObject6$j || (_templateObject6$j = _taggedTemplateLiteralLoose(["\n overflow: hidden;\n padding: 0 8px 8px;\n margin: 0;\n"])));
|
|
36470
|
+
var EmojiFooter$1 = styled.div(_templateObject7$h || (_templateObject7$h = _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) {
|
|
35725
36471
|
return props.emojisCategoryIconsPosition !== 'top' && "1px solid " + props.borderColor;
|
|
35726
36472
|
}, function (props) {
|
|
35727
36473
|
return props.emojisCategoryIconsPosition === 'top' && "1px solid " + props.borderColor;
|
|
35728
36474
|
});
|
|
35729
|
-
var Emoji$1 = styled.li(_templateObject8$
|
|
36475
|
+
var Emoji$1 = styled.li(_templateObject8$g || (_templateObject8$g = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n width: 32px;\n height: 32px;\n margin: 0 2px;\n display: inline-block;\n box-sizing: border-box;\n border-radius: 50%;\n padding-top: 2px;\n text-align: center;\n background: transparent;\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 & > * {\n font-size: 22px;\n }\n &:hover {\n background: ", ";\n }\n"])), function (props) {
|
|
35730
36476
|
return props.hoverBackgroundColor;
|
|
35731
36477
|
});
|
|
35732
36478
|
|
|
@@ -35927,7 +36673,7 @@ function SvgRecordButton(props) {
|
|
|
35927
36673
|
})));
|
|
35928
36674
|
}
|
|
35929
36675
|
|
|
35930
|
-
var _templateObject$
|
|
36676
|
+
var _templateObject$I, _templateObject2$D, _templateObject3$w, _templateObject4$s, _templateObject5$o, _templateObject6$k, _templateObject7$i;
|
|
35931
36677
|
var shouldDraw = false;
|
|
35932
36678
|
var AudioRecord = function AudioRecord(_ref) {
|
|
35933
36679
|
var sendRecordedFile = _ref.sendRecordedFile,
|
|
@@ -36123,7 +36869,6 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
36123
36869
|
handleStopRecording();
|
|
36124
36870
|
if (currentRecordedFile) {
|
|
36125
36871
|
var _wavesurfer$current2;
|
|
36126
|
-
removeAudioRecordingFromMap(currentChannelId);
|
|
36127
36872
|
dispatch(setChannelDraftMessageIsRemovedAC(currentChannelId));
|
|
36128
36873
|
setRecordedFile(null);
|
|
36129
36874
|
setPlayAudio(false);
|
|
@@ -36132,8 +36877,9 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
36132
36877
|
}
|
|
36133
36878
|
} else {
|
|
36134
36879
|
shouldDraw = false;
|
|
36135
|
-
recorder.stop();
|
|
36880
|
+
recorder === null || recorder === void 0 ? void 0 : recorder.stop();
|
|
36136
36881
|
}
|
|
36882
|
+
removeAudioRecordingFromMap(currentChannelId);
|
|
36137
36883
|
setRecordingIsReadyToPlay(false);
|
|
36138
36884
|
setStartRecording(false);
|
|
36139
36885
|
setCurrentTime(0);
|
|
@@ -36390,29 +37136,20 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
36390
37136
|
}, [currentRecordedFile, currentChannelId]);
|
|
36391
37137
|
useEffect(function () {
|
|
36392
37138
|
if (!currentRecordedFile) {
|
|
36393
|
-
|
|
36394
|
-
|
|
36395
|
-
|
|
36396
|
-
|
|
36397
|
-
|
|
36398
|
-
|
|
36399
|
-
|
|
36400
|
-
|
|
36401
|
-
|
|
36402
|
-
|
|
36403
|
-
setRecorder(recorder);
|
|
36404
|
-
});
|
|
36405
|
-
}, function (e) {
|
|
36406
|
-
log.error('Failed to init mic-recorder-to-mp3', e);
|
|
36407
|
-
});
|
|
36408
|
-
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
36409
|
-
}
|
|
36410
|
-
}();
|
|
36411
|
-
return _temp5 && _temp5.then ? _temp5.then(function () {}) : void 0;
|
|
36412
|
-
} catch (e) {
|
|
36413
|
-
Promise.reject(e);
|
|
37139
|
+
try {
|
|
37140
|
+
if (!recorder) {
|
|
37141
|
+
try {
|
|
37142
|
+
var newRecorder = new MicRecorder({
|
|
37143
|
+
bitRate: 128
|
|
37144
|
+
});
|
|
37145
|
+
setRecorder(newRecorder);
|
|
37146
|
+
} catch (e) {
|
|
37147
|
+
log.error('Failed to init mic-recorder-to-mp3', e);
|
|
37148
|
+
}
|
|
36414
37149
|
}
|
|
36415
|
-
}
|
|
37150
|
+
} catch (e) {
|
|
37151
|
+
Promise.reject(e);
|
|
37152
|
+
}
|
|
36416
37153
|
}
|
|
36417
37154
|
}, [currentRecordedFile]);
|
|
36418
37155
|
useEffect(function () {
|
|
@@ -36491,10 +37228,10 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
36491
37228
|
iconColor: accentColor
|
|
36492
37229
|
}, showRecording || currentRecordedFile ? /*#__PURE__*/React__default.createElement(SvgSend, null) : /*#__PURE__*/React__default.createElement(SvgRecordButton, null)));
|
|
36493
37230
|
};
|
|
36494
|
-
var Container$j = styled.div(_templateObject$
|
|
37231
|
+
var Container$j = styled.div(_templateObject$I || (_templateObject$I = _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) {
|
|
36495
37232
|
return props.recording && "width: 400px";
|
|
36496
37233
|
});
|
|
36497
|
-
var AudioWrapper = styled.div(_templateObject2$
|
|
37234
|
+
var AudioWrapper = styled.div(_templateObject2$D || (_templateObject2$D = _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) {
|
|
36498
37235
|
return props.recording ? 'calc(100% - 84px)' : '0';
|
|
36499
37236
|
}, function (props) {
|
|
36500
37237
|
return props.recording ? '0 8px' : '0';
|
|
@@ -36503,10 +37240,10 @@ var AudioWrapper = styled.div(_templateObject2$C || (_templateObject2$C = _tagge
|
|
|
36503
37240
|
}, function (props) {
|
|
36504
37241
|
return props.recording ? '0 12px 0 0' : '0';
|
|
36505
37242
|
});
|
|
36506
|
-
var RecordIconWrapper = styled.span(_templateObject3$
|
|
37243
|
+
var RecordIconWrapper = styled.span(_templateObject3$w || (_templateObject3$w = _taggedTemplateLiteralLoose(["\n display: flex;\n cursor: pointer;\n > svg {\n color: ", ";\n }\n"])), function (props) {
|
|
36507
37244
|
return props.iconColor;
|
|
36508
37245
|
});
|
|
36509
|
-
var AudioVisualization$1 = styled.div(_templateObject4$
|
|
37246
|
+
var AudioVisualization$1 = styled.div(_templateObject4$s || (_templateObject4$s = _taggedTemplateLiteralLoose(["\n position: absolute;\n opacity: ", ";\n z-index: ", ";\n visibility: ", ";\n width: 300px;\n height: 28px;\n max-width: calc(100% - 100px);\n left: 40px;\n background-color: ", ";\n"])), function (_ref5) {
|
|
36510
37247
|
var show = _ref5.show;
|
|
36511
37248
|
return show ? '1' : '0';
|
|
36512
37249
|
}, function (_ref6) {
|
|
@@ -36518,10 +37255,10 @@ var AudioVisualization$1 = styled.div(_templateObject4$r || (_templateObject4$r
|
|
|
36518
37255
|
}, function (props) {
|
|
36519
37256
|
return props.color;
|
|
36520
37257
|
});
|
|
36521
|
-
var PlayPause$1 = styled.div(_templateObject5$
|
|
37258
|
+
var PlayPause$1 = styled.div(_templateObject5$o || (_templateObject5$o = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n padding: 10px;\n > svg {\n color: ", ";\n }\n"])), function (props) {
|
|
36522
37259
|
return props.iconColor;
|
|
36523
37260
|
});
|
|
36524
|
-
var Canvas = styled.canvas(_templateObject6$
|
|
37261
|
+
var Canvas = styled.canvas(_templateObject6$k || (_templateObject6$k = _taggedTemplateLiteralLoose(["\n height: 28px;\n width: ", ";\n max-width: calc(100% - 110px);\n position: absolute;\n opacity: ", ";\n z-index: ", ";\n left: 42px;\n"])), function (_ref8) {
|
|
36525
37262
|
var recording = _ref8.recording;
|
|
36526
37263
|
return recording ? '300px' : '0';
|
|
36527
37264
|
}, function (_ref9) {
|
|
@@ -36531,14 +37268,14 @@ var Canvas = styled.canvas(_templateObject6$j || (_templateObject6$j = _taggedTe
|
|
|
36531
37268
|
var hide = _ref0.hide;
|
|
36532
37269
|
return hide && '-1';
|
|
36533
37270
|
});
|
|
36534
|
-
var Timer$2 = styled.div(_templateObject7$
|
|
37271
|
+
var Timer$2 = styled.div(_templateObject7$i || (_templateObject7$i = _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) {
|
|
36535
37272
|
return props.color;
|
|
36536
37273
|
});
|
|
36537
37274
|
|
|
36538
|
-
var _templateObject$
|
|
36539
|
-
var wave = keyframes(_templateObject$
|
|
36540
|
-
var Wrapper = styled.div(_templateObject2$
|
|
36541
|
-
var Bar = styled.span(_templateObject3$
|
|
37275
|
+
var _templateObject$J, _templateObject2$E, _templateObject3$x;
|
|
37276
|
+
var wave = keyframes(_templateObject$J || (_templateObject$J = _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"])));
|
|
37277
|
+
var Wrapper = styled.div(_templateObject2$E || (_templateObject2$E = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-end;\n height: 8px;\n gap: 1.5px;\n"])));
|
|
37278
|
+
var Bar = styled.span(_templateObject3$x || (_templateObject3$x = _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) {
|
|
36542
37279
|
return props.borderColor;
|
|
36543
37280
|
}, wave, function (_ref) {
|
|
36544
37281
|
var delay = _ref.delay;
|
|
@@ -36564,7 +37301,7 @@ var RecordingAnimation = function RecordingAnimation(_ref2) {
|
|
|
36564
37301
|
}));
|
|
36565
37302
|
};
|
|
36566
37303
|
|
|
36567
|
-
var _templateObject$
|
|
37304
|
+
var _templateObject$K, _templateObject2$F, _templateObject3$y, _templateObject4$t, _templateObject5$p, _templateObject6$l, _templateObject7$j, _templateObject8$h, _templateObject9$e, _templateObject0$d, _templateObject1$a, _templateObject10$5, _templateObject11$5, _templateObject12$4, _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;
|
|
36568
37305
|
function AutoFocusPlugin(_ref) {
|
|
36569
37306
|
var messageForReply = _ref.messageForReply;
|
|
36570
37307
|
var _useLexicalComposerCo = useLexicalComposerContext(),
|
|
@@ -36773,8 +37510,8 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
36773
37510
|
messageBodyAttributes = _useState11[0],
|
|
36774
37511
|
setMessageBodyAttributes = _useState11[1];
|
|
36775
37512
|
var _useState12 = useState([]),
|
|
36776
|
-
|
|
36777
|
-
|
|
37513
|
+
mentionedUsers = _useState12[0],
|
|
37514
|
+
setMentionedUsers = _useState12[1];
|
|
36778
37515
|
var _useState13 = useState(''),
|
|
36779
37516
|
browser = _useState13[0],
|
|
36780
37517
|
setBrowser = _useState13[1];
|
|
@@ -36900,21 +37637,21 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
36900
37637
|
var messageToSend = {
|
|
36901
37638
|
body: messageTexToSend,
|
|
36902
37639
|
bodyAttributes: messageBodyAttributes,
|
|
36903
|
-
|
|
37640
|
+
mentionedUsers: [],
|
|
36904
37641
|
attachments: [],
|
|
36905
37642
|
type: 'text'
|
|
36906
37643
|
};
|
|
36907
|
-
var
|
|
37644
|
+
var mentionUsersToSend = [];
|
|
36908
37645
|
if (messageBodyAttributes && messageBodyAttributes.length) {
|
|
36909
37646
|
messageBodyAttributes.forEach(function (att) {
|
|
36910
37647
|
if (att.type === 'mention') {
|
|
36911
|
-
|
|
37648
|
+
mentionUsersToSend.push({
|
|
36912
37649
|
id: att.metadata
|
|
36913
37650
|
});
|
|
36914
37651
|
}
|
|
36915
37652
|
});
|
|
36916
37653
|
}
|
|
36917
|
-
messageToSend.
|
|
37654
|
+
messageToSend.mentionedUsers = mentionUsersToSend;
|
|
36918
37655
|
log.info('message to send ..........................................', JSON.stringify(messageToSend));
|
|
36919
37656
|
if (messageForReply) {
|
|
36920
37657
|
messageToSend.parentMessage = messageForReply;
|
|
@@ -36974,7 +37711,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
36974
37711
|
setShouldClearEditor({
|
|
36975
37712
|
clear: true
|
|
36976
37713
|
});
|
|
36977
|
-
|
|
37714
|
+
setMentionedUsers([]);
|
|
36978
37715
|
setMessageBodyAttributes([]);
|
|
36979
37716
|
dispatch(setCloseSearchChannelsAC(true));
|
|
36980
37717
|
} else {
|
|
@@ -37006,21 +37743,21 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37006
37743
|
};
|
|
37007
37744
|
}
|
|
37008
37745
|
}
|
|
37009
|
-
var
|
|
37010
|
-
var
|
|
37011
|
-
if (
|
|
37746
|
+
var mentionedUsersPositions = [];
|
|
37747
|
+
var mentionUsersToSend = [];
|
|
37748
|
+
if (mentionedUsers && mentionedUsers.length) {
|
|
37012
37749
|
if (messageBodyAttributes && messageBodyAttributes.length) {
|
|
37013
37750
|
messageBodyAttributes.forEach(function (att) {
|
|
37014
37751
|
if (att.type === 'mention') {
|
|
37015
|
-
var mentionsToFind = [].concat(
|
|
37752
|
+
var mentionsToFind = [].concat(mentionedUsers);
|
|
37016
37753
|
var draftMessage = getDraftMessageFromMap(activeChannel.id);
|
|
37017
37754
|
if (draftMessage) {
|
|
37018
|
-
mentionsToFind = [].concat(draftMessage.
|
|
37755
|
+
mentionsToFind = [].concat(draftMessage.mentionedUsers, mentionedUsers);
|
|
37019
37756
|
}
|
|
37020
37757
|
var mentionToAdd = mentionsToFind.find(function (mention) {
|
|
37021
37758
|
return mention.id === att.metadata;
|
|
37022
37759
|
});
|
|
37023
|
-
|
|
37760
|
+
mentionUsersToSend.push(mentionToAdd);
|
|
37024
37761
|
}
|
|
37025
37762
|
});
|
|
37026
37763
|
}
|
|
@@ -37028,9 +37765,9 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37028
37765
|
var messageToSend = _extends({}, messageToEdit, linkAttachment ? {
|
|
37029
37766
|
attachments: [linkAttachment]
|
|
37030
37767
|
} : {}, {
|
|
37031
|
-
metadata:
|
|
37768
|
+
metadata: mentionedUsersPositions,
|
|
37032
37769
|
bodyAttributes: messageBodyAttributes,
|
|
37033
|
-
mentionedUsers:
|
|
37770
|
+
mentionedUsers: mentionUsersToSend,
|
|
37034
37771
|
body: messageTexToSend
|
|
37035
37772
|
});
|
|
37036
37773
|
messageToSend.type = /(https?:\/\/[^\s]+)/.test(messageToSend.body) ? 'link' : messageToSend.type;
|
|
@@ -37040,7 +37777,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37040
37777
|
};
|
|
37041
37778
|
var handleCloseEditMode = function handleCloseEditMode() {
|
|
37042
37779
|
setEditMessageText('');
|
|
37043
|
-
|
|
37780
|
+
setMentionedUsers([]);
|
|
37044
37781
|
dispatch(setMessageToEditAC(null));
|
|
37045
37782
|
};
|
|
37046
37783
|
var removeUpload = function removeUpload(attachmentId) {
|
|
@@ -37139,7 +37876,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37139
37876
|
};
|
|
37140
37877
|
var handleCut = function handleCut() {
|
|
37141
37878
|
setMessageText('');
|
|
37142
|
-
|
|
37879
|
+
setMentionedUsers([]);
|
|
37143
37880
|
};
|
|
37144
37881
|
var handleEmojiPopupToggle = function handleEmojiPopupToggle(bool) {
|
|
37145
37882
|
setIsEmojisOpened(bool);
|
|
@@ -37207,7 +37944,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37207
37944
|
dispatch(clearSelectedMessagesAC());
|
|
37208
37945
|
};
|
|
37209
37946
|
var handleSetMentionMember = function handleSetMentionMember(mentionMember) {
|
|
37210
|
-
|
|
37947
|
+
setMentionedUsers(function (prevState) {
|
|
37211
37948
|
return [].concat(prevState, [mentionMember]);
|
|
37212
37949
|
});
|
|
37213
37950
|
};
|
|
@@ -37588,7 +38325,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37588
38325
|
var messageToSend = {
|
|
37589
38326
|
metadata: '',
|
|
37590
38327
|
body: '',
|
|
37591
|
-
|
|
38328
|
+
mentionedUsers: [],
|
|
37592
38329
|
attachments: [{
|
|
37593
38330
|
name: v4() + ".mp3",
|
|
37594
38331
|
data: recordedFile.file,
|
|
@@ -37643,7 +38380,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37643
38380
|
dispatch(setMessageForReplyAC(draftMessage.messageForReply));
|
|
37644
38381
|
}
|
|
37645
38382
|
setMessageText(draftMessage.text);
|
|
37646
|
-
|
|
38383
|
+
setMentionedUsers(draftMessage.mentionedUsers);
|
|
37647
38384
|
}
|
|
37648
38385
|
setShouldClearEditor({
|
|
37649
38386
|
clear: true,
|
|
@@ -37654,7 +38391,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37654
38391
|
prevActiveChannelId = activeChannel.id;
|
|
37655
38392
|
}
|
|
37656
38393
|
dispatch(getMembersAC(activeChannel.id));
|
|
37657
|
-
|
|
38394
|
+
setMentionedUsers([]);
|
|
37658
38395
|
}, [activeChannel.id]);
|
|
37659
38396
|
useEffect(function () {
|
|
37660
38397
|
if (messageText.trim() || editMessageText.trim() && editMessageText && editMessageText.trim() !== messageToEdit.body || attachments.length) {
|
|
@@ -37689,10 +38426,10 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37689
38426
|
}
|
|
37690
38427
|
if (messageText.trim()) {
|
|
37691
38428
|
var draftMessage = getDraftMessageFromMap(activeChannel.id);
|
|
37692
|
-
if (draftMessage && draftMessage.
|
|
38429
|
+
if (draftMessage && draftMessage.mentionedUsers && draftMessage.mentionedUsers.length) {
|
|
37693
38430
|
setDraftMessageToMap(activeChannel.id, {
|
|
37694
38431
|
text: messageText,
|
|
37695
|
-
|
|
38432
|
+
mentionedUsers: draftMessage.mentionedUsers,
|
|
37696
38433
|
messageForReply: messageForReply,
|
|
37697
38434
|
editorState: realEditorState,
|
|
37698
38435
|
bodyAttributes: messageBodyAttributes
|
|
@@ -37700,7 +38437,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37700
38437
|
} else {
|
|
37701
38438
|
setDraftMessageToMap(activeChannel.id, {
|
|
37702
38439
|
text: messageText,
|
|
37703
|
-
|
|
38440
|
+
mentionedUsers: mentionedUsers,
|
|
37704
38441
|
messageForReply: messageForReply,
|
|
37705
38442
|
editorState: realEditorState,
|
|
37706
38443
|
bodyAttributes: messageBodyAttributes
|
|
@@ -37720,15 +38457,15 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37720
38457
|
}
|
|
37721
38458
|
}, [messageText, attachments, editMessageText, readyVideoAttachments, messageBodyAttributes]);
|
|
37722
38459
|
useDidUpdate(function () {
|
|
37723
|
-
if (
|
|
38460
|
+
if (mentionedUsers && mentionedUsers.length) {
|
|
37724
38461
|
setDraftMessageToMap(activeChannel.id, {
|
|
37725
38462
|
text: messageText,
|
|
37726
|
-
|
|
38463
|
+
mentionedUsers: mentionedUsers,
|
|
37727
38464
|
messageForReply: messageForReply,
|
|
37728
38465
|
bodyAttributes: messageBodyAttributes
|
|
37729
38466
|
});
|
|
37730
38467
|
}
|
|
37731
|
-
}, [
|
|
38468
|
+
}, [mentionedUsers]);
|
|
37732
38469
|
useEffect(function () {
|
|
37733
38470
|
if (connectionStatus === CONNECTION_STATUS.CONNECTED) {
|
|
37734
38471
|
var pendingMessagesMap = getPendingMessagesMap();
|
|
@@ -37779,7 +38516,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37779
38516
|
if (draftMessagesMap[activeChannel.id]) {
|
|
37780
38517
|
setDraftMessageToMap(activeChannel.id, {
|
|
37781
38518
|
text: messageText,
|
|
37782
|
-
|
|
38519
|
+
mentionedUsers: mentionedUsers,
|
|
37783
38520
|
messageForReply: messageForReply,
|
|
37784
38521
|
bodyAttributes: messageBodyAttributes
|
|
37785
38522
|
});
|
|
@@ -38094,7 +38831,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
38094
38831
|
editMessage: messageToEdit,
|
|
38095
38832
|
contactsMap: contactsMap,
|
|
38096
38833
|
getFromContacts: getFromContacts,
|
|
38097
|
-
setMentionedMember:
|
|
38834
|
+
setMentionedMember: setMentionedUsers
|
|
38098
38835
|
}), /*#__PURE__*/React__default.createElement(FormatMessagePlugin, {
|
|
38099
38836
|
editorState: realEditorState,
|
|
38100
38837
|
setMessageBodyAttributes: setMessageBodyAttributes,
|
|
@@ -38151,10 +38888,10 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
38151
38888
|
channelId: activeChannel.id
|
|
38152
38889
|
}))))))))));
|
|
38153
38890
|
};
|
|
38154
|
-
var SendMessageWrapper = styled.div(_templateObject$
|
|
38891
|
+
var SendMessageWrapper = styled.div(_templateObject$K || (_templateObject$K = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n position: relative;\n z-index: 15;\n"])), function (props) {
|
|
38155
38892
|
return props.backgroundColor;
|
|
38156
38893
|
});
|
|
38157
|
-
var Container$k = styled.div(_templateObject2$
|
|
38894
|
+
var Container$k = styled.div(_templateObject2$F || (_templateObject2$F = _taggedTemplateLiteralLoose(["\n margin: ", ";\n border: ", ";\n border-radius: ", ";\n position: relative;\n padding: ", ";\n z-index: 15;\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) {
|
|
38158
38895
|
return props.margin || '30px 0 16px';
|
|
38159
38896
|
}, function (props) {
|
|
38160
38897
|
return props.border || '';
|
|
@@ -38171,7 +38908,7 @@ var Container$k = styled.div(_templateObject2$E || (_templateObject2$E = _tagged
|
|
|
38171
38908
|
}, function (props) {
|
|
38172
38909
|
return props.mentionColor;
|
|
38173
38910
|
});
|
|
38174
|
-
var EditReplyMessageCont = styled.div(_templateObject3$
|
|
38911
|
+
var EditReplyMessageCont = styled.div(_templateObject3$y || (_templateObject3$y = _taggedTemplateLiteralLoose(["\n position: relative;\n left: ", ";\n bottom: ", ";\n width: ", ";\n border-radius: ", ";\n padding: ", ";\n font-weight: 400;\n font-size: 15px;\n line-height: 20px;\n letter-spacing: -0.2px;\n color: ", ";\n background-color: ", ";\n z-index: 19;\n box-sizing: content-box;\n"])), function (props) {
|
|
38175
38912
|
return props.left || '0';
|
|
38176
38913
|
}, function (props) {
|
|
38177
38914
|
return props.bottom || '0';
|
|
@@ -38186,19 +38923,19 @@ var EditReplyMessageCont = styled.div(_templateObject3$x || (_templateObject3$x
|
|
|
38186
38923
|
}, function (props) {
|
|
38187
38924
|
return props.backgroundColor;
|
|
38188
38925
|
});
|
|
38189
|
-
var EditMessageText = styled.p(_templateObject4$
|
|
38190
|
-
var UploadErrorMessage = styled.p(_templateObject5$
|
|
38926
|
+
var EditMessageText = styled.p(_templateObject4$t || (_templateObject4$t = _taggedTemplateLiteralLoose(["\n margin: 0;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: break-word;\n"])));
|
|
38927
|
+
var UploadErrorMessage = styled.p(_templateObject5$p || (_templateObject5$p = _taggedTemplateLiteralLoose(["\n margin: 0;\n position: absolute;\n top: -30px;\n color: ", ";\n"])), function (props) {
|
|
38191
38928
|
return props.color;
|
|
38192
38929
|
});
|
|
38193
|
-
var CloseEditMode = styled.span(_templateObject6$
|
|
38930
|
+
var CloseEditMode = styled.span(_templateObject6$l || (_templateObject6$l = _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) {
|
|
38194
38931
|
return props.color;
|
|
38195
38932
|
});
|
|
38196
|
-
var UserName$1 = styled.span(_templateObject7$
|
|
38197
|
-
var ReplyMessageBody$1 = styled.div(_templateObject8$
|
|
38198
|
-
var EditReplyMessageHeader = styled.h4(_templateObject9$
|
|
38933
|
+
var UserName$1 = styled.span(_templateObject7$j || (_templateObject7$j = _taggedTemplateLiteralLoose(["\n font-weight: 500;\n margin-left: 4px;\n"])));
|
|
38934
|
+
var ReplyMessageBody$1 = styled.div(_templateObject8$h || (_templateObject8$h = _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"])));
|
|
38935
|
+
var EditReplyMessageHeader = styled.h4(_templateObject9$e || (_templateObject9$e = _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) {
|
|
38199
38936
|
return props.color;
|
|
38200
38937
|
});
|
|
38201
|
-
var AddAttachmentIcon = styled.span(_templateObject0$
|
|
38938
|
+
var AddAttachmentIcon = styled.span(_templateObject0$d || (_templateObject0$d = _taggedTemplateLiteralLoose(["\n display: flex;\n height: ", ";\n align-items: center;\n margin: 0 8px;\n cursor: pointer;\n line-height: 13px;\n z-index: 2;\n order: ", ";\n\n > svg {\n ", ";\n width: 24px;\n }\n\n &:hover > svg {\n color: ", ";\n }\n"])), function (props) {
|
|
38202
38939
|
return props.height ? props.height + "px" : '36px';
|
|
38203
38940
|
}, function (props) {
|
|
38204
38941
|
return props.order === 0 || props.order ? props.order : 1;
|
|
@@ -38207,7 +38944,7 @@ var AddAttachmentIcon = styled.span(_templateObject0$c || (_templateObject0$c =
|
|
|
38207
38944
|
}, function (props) {
|
|
38208
38945
|
return props.hoverColor;
|
|
38209
38946
|
});
|
|
38210
|
-
var SendMessageInputContainer = styled.div(_templateObject1$
|
|
38947
|
+
var SendMessageInputContainer = styled.div(_templateObject1$a || (_templateObject1$a = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n position: relative;\n min-height: ", ";\n box-sizing: border-box;\n border-radius: ", ";\n\n & .dropdown-trigger.open {\n color: #ccc;\n\n & ", " {\n & > svg {\n color: ", ";\n }\n ;\n }\n }\n}\n"])), function (props) {
|
|
38211
38948
|
return props.minHeight || '36px';
|
|
38212
38949
|
}, function (props) {
|
|
38213
38950
|
return props.messageForReply ? '0 0 4px 4px' : '4px';
|
|
@@ -38503,7 +39240,7 @@ function SvgUnpin(props) {
|
|
|
38503
39240
|
})));
|
|
38504
39241
|
}
|
|
38505
39242
|
|
|
38506
|
-
var _templateObject$
|
|
39243
|
+
var _templateObject$L, _templateObject2$G, _templateObject3$z, _templateObject4$u, _templateObject5$q, _templateObject6$m, _templateObject7$k, _templateObject8$i, _templateObject9$f, _templateObject0$e, _templateObject1$b, _templateObject10$6, _templateObject11$6, _templateObject12$5, _templateObject13$4, _templateObject14$3, _templateObject15$3, _templateObject16$3;
|
|
38507
39244
|
var Actions = function Actions(_ref) {
|
|
38508
39245
|
var setActionsHeight = _ref.setActionsHeight,
|
|
38509
39246
|
channel = _ref.channel,
|
|
@@ -38967,21 +39704,21 @@ var Actions = function Actions(_ref) {
|
|
|
38967
39704
|
title: popupTitle
|
|
38968
39705
|
})));
|
|
38969
39706
|
};
|
|
38970
|
-
var Container$l = styled.div(_templateObject$
|
|
39707
|
+
var Container$l = styled.div(_templateObject$L || (_templateObject$L = _taggedTemplateLiteralLoose(["\n padding: 10px 16px;\n border-bottom: 6px solid ", ";\n]"])), function (props) {
|
|
38971
39708
|
return props.borderColor;
|
|
38972
39709
|
});
|
|
38973
|
-
var ActionHeader = styled.div(_templateObject2$
|
|
38974
|
-
var MenuTriggerIcon = styled.span(_templateObject3$
|
|
39710
|
+
var ActionHeader = styled.div(_templateObject2$G || (_templateObject2$G = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 25px 0 22px;\n cursor: pointer;\n"])));
|
|
39711
|
+
var MenuTriggerIcon = styled.span(_templateObject3$z || (_templateObject3$z = _taggedTemplateLiteralLoose(["\n transition: all 0.2s;\n ", "\n"])), function (props) {
|
|
38975
39712
|
return !props.isOpen && ' transform: rotate(-90deg);';
|
|
38976
39713
|
});
|
|
38977
|
-
var ActionsMenu = styled.ul(_templateObject4$
|
|
38978
|
-
var DefaultMutedIcon = styled(SvgUnmuteNotifications)(_templateObject5$
|
|
38979
|
-
var DefaultMuteIcon = styled(SvgNotifications)(_templateObject6$
|
|
38980
|
-
var DefaultStarIcon = styled(SvgStar)(_templateObject7$
|
|
38981
|
-
var DefaultUnpinIcon = styled(SvgUnpin)(_templateObject8$
|
|
38982
|
-
var DefaultPinIcon = styled(SvgPin)(_templateObject9$
|
|
38983
|
-
var DefaultMarkAsRead = styled(SvgMarkAsRead)(_templateObject0$
|
|
38984
|
-
var DefaultMarkAsUnRead = styled(SvgMarkAsUnRead)(_templateObject1$
|
|
39714
|
+
var ActionsMenu = styled.ul(_templateObject4$u || (_templateObject4$u = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n list-style: none;\n transition: all 0.2s;\n"])));
|
|
39715
|
+
var DefaultMutedIcon = styled(SvgUnmuteNotifications)(_templateObject5$q || (_templateObject5$q = _taggedTemplateLiteralLoose([""])));
|
|
39716
|
+
var DefaultMuteIcon = styled(SvgNotifications)(_templateObject6$m || (_templateObject6$m = _taggedTemplateLiteralLoose([""])));
|
|
39717
|
+
var DefaultStarIcon = styled(SvgStar)(_templateObject7$k || (_templateObject7$k = _taggedTemplateLiteralLoose([""])));
|
|
39718
|
+
var DefaultUnpinIcon = styled(SvgUnpin)(_templateObject8$i || (_templateObject8$i = _taggedTemplateLiteralLoose([""])));
|
|
39719
|
+
var DefaultPinIcon = styled(SvgPin)(_templateObject9$f || (_templateObject9$f = _taggedTemplateLiteralLoose([""])));
|
|
39720
|
+
var DefaultMarkAsRead = styled(SvgMarkAsRead)(_templateObject0$e || (_templateObject0$e = _taggedTemplateLiteralLoose([""])));
|
|
39721
|
+
var DefaultMarkAsUnRead = styled(SvgMarkAsUnRead)(_templateObject1$b || (_templateObject1$b = _taggedTemplateLiteralLoose([""])));
|
|
38985
39722
|
var DefaultBlockIcon = styled(SvgBlockChannel)(_templateObject10$6 || (_templateObject10$6 = _taggedTemplateLiteralLoose([""])));
|
|
38986
39723
|
var DefaultReportIcon = styled(SvgReport)(_templateObject11$6 || (_templateObject11$6 = _taggedTemplateLiteralLoose([""])));
|
|
38987
39724
|
var DefaultClearIcon = styled(SvgClear)(_templateObject12$5 || (_templateObject12$5 = _taggedTemplateLiteralLoose([""])));
|
|
@@ -39061,7 +39798,7 @@ function SvgMoreVert(props) {
|
|
|
39061
39798
|
})));
|
|
39062
39799
|
}
|
|
39063
39800
|
|
|
39064
|
-
var _templateObject$
|
|
39801
|
+
var _templateObject$M, _templateObject2$H, _templateObject3$A;
|
|
39065
39802
|
var ChangeMemberRole = function ChangeMemberRole(_ref) {
|
|
39066
39803
|
var theme = _ref.theme,
|
|
39067
39804
|
channelId = _ref.channelId,
|
|
@@ -39161,14 +39898,14 @@ var ChangeMemberRole = function ChangeMemberRole(_ref) {
|
|
|
39161
39898
|
onClick: handleSave
|
|
39162
39899
|
}, "Save"))));
|
|
39163
39900
|
};
|
|
39164
|
-
var RolesSelect = styled.div(_templateObject$
|
|
39165
|
-
var RoleLabel = styled.div(_templateObject2$
|
|
39901
|
+
var RolesSelect = styled.div(_templateObject$M || (_templateObject$M = _taggedTemplateLiteralLoose(["\n margin-bottom: 32px;\n"])));
|
|
39902
|
+
var RoleLabel = styled.div(_templateObject2$H || (_templateObject2$H = _taggedTemplateLiteralLoose(["\n font-style: normal;\n font-weight: 500;\n font-size: 14px;\n margin: 20px 0 8px;\n color: ", ";\n"])), function (_ref2) {
|
|
39166
39903
|
var color = _ref2.color;
|
|
39167
39904
|
return color;
|
|
39168
39905
|
});
|
|
39169
|
-
var RoleSpan = styled.span(_templateObject3$
|
|
39906
|
+
var RoleSpan = styled.span(_templateObject3$A || (_templateObject3$A = _taggedTemplateLiteralLoose(["\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n text-transform: capitalize;\n"])));
|
|
39170
39907
|
|
|
39171
|
-
var _templateObject$
|
|
39908
|
+
var _templateObject$N, _templateObject2$I, _templateObject3$B, _templateObject4$v, _templateObject5$r, _templateObject6$n, _templateObject7$l, _templateObject8$j, _templateObject9$g;
|
|
39172
39909
|
var Members = function Members(_ref) {
|
|
39173
39910
|
var channel = _ref.channel,
|
|
39174
39911
|
theme = _ref.theme,
|
|
@@ -39471,18 +40208,18 @@ var Members = function Members(_ref) {
|
|
|
39471
40208
|
toggleCreatePopup: handleAddMemberPopup
|
|
39472
40209
|
})));
|
|
39473
40210
|
};
|
|
39474
|
-
var Container$m = styled.div(_templateObject$
|
|
39475
|
-
var ActionsMenu$1 = styled.div(_templateObject2$
|
|
39476
|
-
var MemberNamePresence = styled.div(_templateObject3$
|
|
39477
|
-
var MemberNameWrapper = styled.div(_templateObject4$
|
|
39478
|
-
var MemberName$3 = styled.h4(_templateObject5$
|
|
40211
|
+
var Container$m = styled.div(_templateObject$N || (_templateObject$N = _taggedTemplateLiteralLoose([""])));
|
|
40212
|
+
var ActionsMenu$1 = styled.div(_templateObject2$I || (_templateObject2$I = _taggedTemplateLiteralLoose(["\n position: relative;\n transition: all 0.2s;\n"])));
|
|
40213
|
+
var MemberNamePresence = styled.div(_templateObject3$B || (_templateObject3$B = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n max-width: calc(100% - 84px);\n\n & > ", " {\n display: block;\n }\n"])), SubTitle);
|
|
40214
|
+
var MemberNameWrapper = styled.div(_templateObject4$v || (_templateObject4$v = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n"])));
|
|
40215
|
+
var MemberName$3 = styled.h4(_templateObject5$r || (_templateObject5$r = _taggedTemplateLiteralLoose(["\n margin: 0;\n font-weight: 400;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n color: ", ";\n"])), function (props) {
|
|
39479
40216
|
return props.color;
|
|
39480
40217
|
});
|
|
39481
|
-
var EditMemberIcon = styled.span(_templateObject6$
|
|
40218
|
+
var EditMemberIcon = styled.span(_templateObject6$n || (_templateObject6$n = _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) {
|
|
39482
40219
|
return props.color;
|
|
39483
40220
|
});
|
|
39484
|
-
var MembersList = styled.ul(_templateObject7$
|
|
39485
|
-
var MemberItem$1 = styled.li(_templateObject8$
|
|
40221
|
+
var MembersList = styled.ul(_templateObject7$l || (_templateObject7$l = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n list-style: none;\n transition: all 0.2s;\n"])));
|
|
40222
|
+
var MemberItem$1 = styled.li(_templateObject8$j || (_templateObject8$j = _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) {
|
|
39486
40223
|
return props.fontSize || '15px';
|
|
39487
40224
|
}, function (props) {
|
|
39488
40225
|
return props.color;
|
|
@@ -39493,13 +40230,13 @@ var MemberItem$1 = styled.li(_templateObject8$i || (_templateObject8$i = _tagged
|
|
|
39493
40230
|
}, function (props) {
|
|
39494
40231
|
return props.hoverBackground;
|
|
39495
40232
|
}, EditMemberIcon, UserStatus);
|
|
39496
|
-
var RoleBadge = styled.span(_templateObject9$
|
|
40233
|
+
var RoleBadge = styled.span(_templateObject9$g || (_templateObject9$g = _taggedTemplateLiteralLoose(["\n position: relative;\n padding: 2px 8px;\n border-radius: 12px;\n margin-left: 4px;\n font-weight: 500;\n font-size: 12px;\n line-height: 16px;\n color: ", ";\n\n &::after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n border-radius: 12px;\n width: 100%;\n height: 100%;\n background-color: ", ";\n opacity: 0.1;\n }\n"])), function (props) {
|
|
39497
40234
|
return props.color;
|
|
39498
40235
|
}, function (props) {
|
|
39499
40236
|
return props.backgroundColor;
|
|
39500
40237
|
});
|
|
39501
40238
|
|
|
39502
|
-
var _templateObject$
|
|
40239
|
+
var _templateObject$O, _templateObject2$J;
|
|
39503
40240
|
var Media = function Media(_ref) {
|
|
39504
40241
|
var channel = _ref.channel;
|
|
39505
40242
|
var _useColor = useColors(),
|
|
@@ -39545,8 +40282,8 @@ var Media = function Media(_ref) {
|
|
|
39545
40282
|
currentMediaFile: mediaFile
|
|
39546
40283
|
})));
|
|
39547
40284
|
};
|
|
39548
|
-
var Container$n = styled.div(_templateObject$
|
|
39549
|
-
var MediaItem = styled.div(_templateObject2$
|
|
40285
|
+
var Container$n = styled.div(_templateObject$O || (_templateObject$O = _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"])));
|
|
40286
|
+
var MediaItem = styled.div(_templateObject2$J || (_templateObject2$J = _taggedTemplateLiteralLoose(["\n width: calc(33.3333% - 4px);\n height: 110px;\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"])));
|
|
39550
40287
|
|
|
39551
40288
|
var _rect$3, _path$1n;
|
|
39552
40289
|
function _extends$1r() {
|
|
@@ -39602,7 +40339,7 @@ function SvgDownloadFile(props) {
|
|
|
39602
40339
|
})));
|
|
39603
40340
|
}
|
|
39604
40341
|
|
|
39605
|
-
var _templateObject$
|
|
40342
|
+
var _templateObject$P, _templateObject2$K, _templateObject3$C, _templateObject4$w, _templateObject5$s, _templateObject6$o, _templateObject7$m, _templateObject8$k;
|
|
39606
40343
|
var Files = function Files(_ref) {
|
|
39607
40344
|
var channelId = _ref.channelId,
|
|
39608
40345
|
filePreviewIcon = _ref.filePreviewIcon,
|
|
@@ -39719,30 +40456,30 @@ var Files = function Files(_ref) {
|
|
|
39719
40456
|
}))) : filePreviewDownloadIcon || /*#__PURE__*/React__default.createElement(SvgDownloadFile, null)));
|
|
39720
40457
|
}));
|
|
39721
40458
|
};
|
|
39722
|
-
var Container$o = styled.ul(_templateObject$
|
|
39723
|
-
var DownloadWrapper = styled.a(_templateObject2$
|
|
40459
|
+
var Container$o = styled.ul(_templateObject$P || (_templateObject$P = _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"])));
|
|
40460
|
+
var DownloadWrapper = styled.a(_templateObject2$K || (_templateObject2$K = _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) {
|
|
39724
40461
|
return props.visible ? 'visible' : 'hidden';
|
|
39725
40462
|
}, function (props) {
|
|
39726
40463
|
return props.iconColor;
|
|
39727
40464
|
}, function (props) {
|
|
39728
40465
|
return props.iconColor;
|
|
39729
40466
|
});
|
|
39730
|
-
var ProgressWrapper$2 = styled.span(_templateObject3$
|
|
39731
|
-
var FileIconCont = styled.span(_templateObject4$
|
|
40467
|
+
var ProgressWrapper$2 = styled.span(_templateObject3$C || (_templateObject3$C = _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"])));
|
|
40468
|
+
var FileIconCont = styled.span(_templateObject4$w || (_templateObject4$w = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n\n & > svg {\n width: 40px;\n height: 40px;\n color: ", ";\n fill: ", ";\n }\n"])), function (props) {
|
|
39732
40469
|
return props.iconColor;
|
|
39733
40470
|
}, function (props) {
|
|
39734
40471
|
return props.fillColor;
|
|
39735
40472
|
});
|
|
39736
|
-
var FileHoverIconCont = styled.span(_templateObject5$
|
|
40473
|
+
var FileHoverIconCont = styled.span(_templateObject5$s || (_templateObject5$s = _taggedTemplateLiteralLoose(["\n display: none;\n & > svg {\n color: ", ";\n width: 40px;\n height: 40px;\n fill: ", ";\n }\n"])), function (props) {
|
|
39737
40474
|
return props.iconColor;
|
|
39738
40475
|
}, function (props) {
|
|
39739
40476
|
return props.fillColor;
|
|
39740
40477
|
});
|
|
39741
|
-
var FileThumb = styled.img(_templateObject6$
|
|
39742
|
-
var FileItem = styled.div(_templateObject7$
|
|
40478
|
+
var FileThumb = styled.img(_templateObject6$o || (_templateObject6$o = _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"])));
|
|
40479
|
+
var FileItem = styled.div(_templateObject7$m || (_templateObject7$m = _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) {
|
|
39743
40480
|
return props.hoverBackgroundColor;
|
|
39744
40481
|
}, DownloadWrapper, FileIconCont, FileHoverIconCont);
|
|
39745
|
-
var FileSizeAndDate = styled.span(_templateObject8$
|
|
40482
|
+
var FileSizeAndDate = styled.span(_templateObject8$k || (_templateObject8$k = _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) {
|
|
39746
40483
|
return props.fontSize || '13px';
|
|
39747
40484
|
}, function (props) {
|
|
39748
40485
|
return props.lineHeight || '16px';
|
|
@@ -39781,7 +40518,7 @@ function SvgLinkIcon(props) {
|
|
|
39781
40518
|
})));
|
|
39782
40519
|
}
|
|
39783
40520
|
|
|
39784
|
-
var _templateObject$
|
|
40521
|
+
var _templateObject$Q, _templateObject2$L, _templateObject3$D, _templateObject4$x, _templateObject5$t;
|
|
39785
40522
|
var LinkItem = function LinkItem(_ref) {
|
|
39786
40523
|
var link = _ref.link,
|
|
39787
40524
|
linkPreviewIcon = _ref.linkPreviewIcon,
|
|
@@ -39812,25 +40549,25 @@ var LinkItem = function LinkItem(_ref) {
|
|
|
39812
40549
|
color: linkPreviewColor || textPrimary
|
|
39813
40550
|
}, link))));
|
|
39814
40551
|
};
|
|
39815
|
-
var LinkIconCont = styled.span(_templateObject$
|
|
40552
|
+
var LinkIconCont = styled.span(_templateObject$Q || (_templateObject$Q = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n > svg {\n color: ", ";\n fill: ", ";\n }\n"])), function (props) {
|
|
39816
40553
|
return props.iconColor;
|
|
39817
40554
|
}, function (props) {
|
|
39818
40555
|
return props.fillColor;
|
|
39819
40556
|
});
|
|
39820
|
-
var LinkHoverIconCont = styled.span(_templateObject2$
|
|
40557
|
+
var LinkHoverIconCont = styled.span(_templateObject2$L || (_templateObject2$L = _taggedTemplateLiteralLoose(["\n display: none;\n > svg {\n color: ", ";\n fill: ", ";\n }\n"])), function (props) {
|
|
39821
40558
|
return props.iconColor;
|
|
39822
40559
|
}, function (props) {
|
|
39823
40560
|
return props.fillColor;
|
|
39824
40561
|
});
|
|
39825
|
-
var LinkInfoCont = styled.div(_templateObject3$
|
|
39826
|
-
var FileItem$1 = styled.li(_templateObject4$
|
|
40562
|
+
var LinkInfoCont = styled.div(_templateObject3$D || (_templateObject3$D = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n width: calc(100% - 40px);\n"])));
|
|
40563
|
+
var FileItem$1 = styled.li(_templateObject4$x || (_templateObject4$x = _taggedTemplateLiteralLoose(["\n padding: 9px 16px;\n a {\n display: flex;\n align-items: center;\n text-decoration: none;\n }\n &:hover {\n background-color: ", ";\n & ", " {\n display: none;\n }\n & ", " {\n display: inline-flex;\n }\n }\n"])), function (props) {
|
|
39827
40564
|
return props.hoverBackgroundColor;
|
|
39828
40565
|
}, LinkIconCont, LinkHoverIconCont);
|
|
39829
|
-
var LinkUrl = styled.span(_templateObject5$
|
|
40566
|
+
var LinkUrl = styled.span(_templateObject5$t || (_templateObject5$t = _taggedTemplateLiteralLoose(["\n display: block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n max-width: calc(100% - 52px);\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 16px;\n text-decoration: underline;\n color: ", ";\n"])), function (props) {
|
|
39830
40567
|
return props.color;
|
|
39831
40568
|
});
|
|
39832
40569
|
|
|
39833
|
-
var _templateObject$
|
|
40570
|
+
var _templateObject$R;
|
|
39834
40571
|
var Links = function Links(_ref) {
|
|
39835
40572
|
var channelId = _ref.channelId,
|
|
39836
40573
|
linkPreviewIcon = _ref.linkPreviewIcon,
|
|
@@ -39855,7 +40592,7 @@ var Links = function Links(_ref) {
|
|
|
39855
40592
|
});
|
|
39856
40593
|
}));
|
|
39857
40594
|
};
|
|
39858
|
-
var Container$p = styled.ul(_templateObject$
|
|
40595
|
+
var Container$p = styled.ul(_templateObject$R || (_templateObject$R = _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"])));
|
|
39859
40596
|
|
|
39860
40597
|
var _rect$5, _path$1q;
|
|
39861
40598
|
function _extends$1u() {
|
|
@@ -39911,7 +40648,7 @@ function SvgVoicePreviewPause(props) {
|
|
|
39911
40648
|
})));
|
|
39912
40649
|
}
|
|
39913
40650
|
|
|
39914
|
-
var _templateObject$
|
|
40651
|
+
var _templateObject$S, _templateObject2$M, _templateObject3$E, _templateObject4$y, _templateObject5$u, _templateObject6$p, _templateObject7$n, _templateObject8$l;
|
|
39915
40652
|
var VoiceItem = function VoiceItem(_ref) {
|
|
39916
40653
|
var file = _ref.file,
|
|
39917
40654
|
voicePreviewPlayIcon = _ref.voicePreviewPlayIcon,
|
|
@@ -40036,32 +40773,32 @@ var VoiceItem = function VoiceItem(_ref) {
|
|
|
40036
40773
|
type: 'audio/mpeg'
|
|
40037
40774
|
})));
|
|
40038
40775
|
};
|
|
40039
|
-
var FileIconCont$1 = styled.span(_templateObject$
|
|
40776
|
+
var FileIconCont$1 = styled.span(_templateObject$S || (_templateObject$S = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: inline-flex;\n fill: ", ";\n rect {\n fill: ", ";\n }\n"])), function (props) {
|
|
40040
40777
|
return props.fill || 'transparent';
|
|
40041
40778
|
}, function (props) {
|
|
40042
40779
|
return props.fill || 'transparent';
|
|
40043
40780
|
});
|
|
40044
|
-
var FileHoverIconCont$1 = styled.span(_templateObject2$
|
|
40781
|
+
var FileHoverIconCont$1 = styled.span(_templateObject2$M || (_templateObject2$M = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: none;\n fill: ", ";\n rect {\n fill: ", ";\n }\n"])), function (props) {
|
|
40045
40782
|
return props.fill || 'transparent';
|
|
40046
40783
|
}, function (props) {
|
|
40047
40784
|
return props.fill || 'transparent';
|
|
40048
40785
|
});
|
|
40049
|
-
var FileItem$2 = styled.li(_templateObject3$
|
|
40786
|
+
var FileItem$2 = styled.li(_templateObject3$E || (_templateObject3$E = _taggedTemplateLiteralLoose(["\n padding: 9px 16px;\n display: flex;\n align-items: center;\n text-decoration: none;\n\n &:hover {\n background-color: ", ";\n }\n div {\n margin-left: 12px;\n width: 100%;\n }\n img {\n width: 42px;\n height: 42px;\n border: 0.5px solid rgba(0, 0, 0, 0.1);\n box-sizing: border-box;\n border-radius: 6px;\n }\n\n &.isHover {\n & ", " {\n display: none;\n }\n & ", " {\n display: inline-flex;\n }\n }\n"])), function (props) {
|
|
40050
40787
|
return props.hoverBackgroundColor;
|
|
40051
40788
|
}, FileIconCont$1, FileHoverIconCont$1);
|
|
40052
|
-
var AudioInfo = styled.div(_templateObject4$
|
|
40053
|
-
var AudioTitle = styled.span(_templateObject5$
|
|
40789
|
+
var AudioInfo = styled.div(_templateObject4$y || (_templateObject4$y = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
|
|
40790
|
+
var AudioTitle = styled.span(_templateObject5$u || (_templateObject5$u = _taggedTemplateLiteralLoose(["\n display: block;\n font-style: normal;\n font-weight: 500;\n font-size: 15px;\n line-height: 20px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n max-width: calc(100% - 72px);\n color: ", ";\n"])), function (props) {
|
|
40054
40791
|
return props.color;
|
|
40055
40792
|
});
|
|
40056
|
-
var AudioDate = styled.span(_templateObject6$
|
|
40793
|
+
var AudioDate = styled.span(_templateObject6$p || (_templateObject6$p = _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: 12px;\n line-height: 16px;\n color: ", ";\n"])), function (props) {
|
|
40057
40794
|
return props.color;
|
|
40058
40795
|
});
|
|
40059
|
-
var AudioSendTime = styled.span(_templateObject7$
|
|
40796
|
+
var AudioSendTime = styled.span(_templateObject7$n || (_templateObject7$n = _taggedTemplateLiteralLoose(["\n position: absolute;\n right: 0;\n top: 11px;\n color: ", ";\n font-size: 12px;\n line-height: 16px;\n"])), function (props) {
|
|
40060
40797
|
return props.color;
|
|
40061
40798
|
});
|
|
40062
|
-
var Audio = styled.audio(_templateObject8$
|
|
40799
|
+
var Audio = styled.audio(_templateObject8$l || (_templateObject8$l = _taggedTemplateLiteralLoose(["\n display: none;\n"])));
|
|
40063
40800
|
|
|
40064
|
-
var _templateObject$
|
|
40801
|
+
var _templateObject$T;
|
|
40065
40802
|
var Voices = function Voices(_ref) {
|
|
40066
40803
|
var channelId = _ref.channelId,
|
|
40067
40804
|
voicePreviewPlayIcon = _ref.voicePreviewPlayIcon,
|
|
@@ -40092,9 +40829,9 @@ var Voices = function Voices(_ref) {
|
|
|
40092
40829
|
});
|
|
40093
40830
|
}));
|
|
40094
40831
|
};
|
|
40095
|
-
var Container$q = styled.ul(_templateObject$
|
|
40832
|
+
var Container$q = styled.ul(_templateObject$T || (_templateObject$T = _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"])));
|
|
40096
40833
|
|
|
40097
|
-
var _templateObject$
|
|
40834
|
+
var _templateObject$U, _templateObject2$N;
|
|
40098
40835
|
var DetailsTab = function DetailsTab(_ref) {
|
|
40099
40836
|
var channel = _ref.channel,
|
|
40100
40837
|
theme = _ref.theme,
|
|
@@ -40243,8 +40980,8 @@ var DetailsTab = function DetailsTab(_ref) {
|
|
|
40243
40980
|
voicePreviewHoverBackgroundColor: voicePreviewHoverBackgroundColor
|
|
40244
40981
|
})));
|
|
40245
40982
|
};
|
|
40246
|
-
var Container$r = styled.div(_templateObject$
|
|
40247
|
-
var DetailsTabHeader = styled.div(_templateObject2$
|
|
40983
|
+
var Container$r = styled.div(_templateObject$U || (_templateObject$U = _taggedTemplateLiteralLoose(["\n min-height: calc(100vh - 64px);\n"])));
|
|
40984
|
+
var DetailsTabHeader = styled.div(_templateObject2$N || (_templateObject2$N = _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) {
|
|
40248
40985
|
return props.borderColor;
|
|
40249
40986
|
}, function (props) {
|
|
40250
40987
|
return props.backgroundColor || 'transparent';
|
|
@@ -40262,17 +40999,17 @@ var DetailsTabHeader = styled.div(_templateObject2$M || (_templateObject2$M = _t
|
|
|
40262
40999
|
return props.activeTabColor;
|
|
40263
41000
|
});
|
|
40264
41001
|
|
|
40265
|
-
var _templateObject$
|
|
40266
|
-
var Container$s = styled.div(_templateObject$
|
|
41002
|
+
var _templateObject$V, _templateObject2$O, _templateObject3$F, _templateObject4$z;
|
|
41003
|
+
var Container$s = styled.div(_templateObject$V || (_templateObject$V = _taggedTemplateLiteralLoose(["\n ", ";\n height: ", ";\n position: absolute;\n padding: 24px 16px;\n background-color: ", ";\n z-index: 25;\n"])), function (props) {
|
|
40267
41004
|
return props.active ? 'display: block' : 'display: none';
|
|
40268
41005
|
}, function (props) {
|
|
40269
41006
|
return "calc(100vh - " + (props.heightOffset ? props.heightOffset + 48 : 48) + "px)";
|
|
40270
41007
|
}, function (props) {
|
|
40271
41008
|
return props.backgroundColor;
|
|
40272
41009
|
});
|
|
40273
|
-
var AvatarCont = styled.div(_templateObject2$
|
|
40274
|
-
var DropDownWrapper = styled.div(_templateObject3$
|
|
40275
|
-
var EditChannelFooter = styled(ButtonBlock)(_templateObject4$
|
|
41010
|
+
var AvatarCont = styled.div(_templateObject2$O || (_templateObject2$O = _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"])));
|
|
41011
|
+
var DropDownWrapper = styled.div(_templateObject3$F || (_templateObject3$F = _taggedTemplateLiteralLoose(["\n position: absolute;\n z-index: 4;\n width: 40px;\n height: 40px;\n"])));
|
|
41012
|
+
var EditChannelFooter = styled(ButtonBlock)(_templateObject4$z || (_templateObject4$z = _taggedTemplateLiteralLoose(["\n margin-top: 24px;\n\n & > button {\n margin-left: 12px;\n }\n"])));
|
|
40276
41013
|
var EditChannel = function EditChannel(_ref) {
|
|
40277
41014
|
var channel = _ref.channel,
|
|
40278
41015
|
theme = _ref.theme,
|
|
@@ -40527,7 +41264,7 @@ var EditChannel = function EditChannel(_ref) {
|
|
|
40527
41264
|
})));
|
|
40528
41265
|
};
|
|
40529
41266
|
|
|
40530
|
-
var _templateObject$
|
|
41267
|
+
var _templateObject$W, _templateObject2$P, _templateObject3$G, _templateObject4$A, _templateObject5$v, _templateObject6$q, _templateObject7$o, _templateObject8$m, _templateObject9$h, _templateObject0$f, _templateObject1$c, _templateObject10$7;
|
|
40531
41268
|
var Details = function Details(_ref) {
|
|
40532
41269
|
var _activeChannel$member;
|
|
40533
41270
|
var detailsTitleText = _ref.detailsTitleText,
|
|
@@ -40914,17 +41651,17 @@ var Details = function Details(_ref) {
|
|
|
40914
41651
|
onTabChange: handleTabChange
|
|
40915
41652
|
}))));
|
|
40916
41653
|
};
|
|
40917
|
-
var Container$t = styled.div(_templateObject$
|
|
41654
|
+
var Container$t = styled.div(_templateObject$W || (_templateObject$W = _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) {
|
|
40918
41655
|
return props.borderColor;
|
|
40919
41656
|
}, function (props) {
|
|
40920
41657
|
return props.mounted && " width: " + (props.size === 'small' ? '300px' : props.size === 'medium' ? '350px' : '400px') + ";";
|
|
40921
41658
|
}, function (props) {
|
|
40922
41659
|
return props.backgroundColor;
|
|
40923
41660
|
});
|
|
40924
|
-
var ChannelDetailsHeader = styled.div(_templateObject2$
|
|
41661
|
+
var ChannelDetailsHeader = styled.div(_templateObject2$P || (_templateObject2$P = _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) {
|
|
40925
41662
|
return props.borderColor;
|
|
40926
41663
|
});
|
|
40927
|
-
var ChatDetails = styled.div(_templateObject3$
|
|
41664
|
+
var ChatDetails = styled.div(_templateObject3$G || (_templateObject3$G = _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) {
|
|
40928
41665
|
return props.size === 'small' ? '300px' : props.size === 'medium' ? '350px' : '400px';
|
|
40929
41666
|
}, function (props) {
|
|
40930
41667
|
return props.height ? "calc(100vh - " + props.heightOffset + "px)" : '100vh';
|
|
@@ -40933,37 +41670,37 @@ var ChatDetails = styled.div(_templateObject3$F || (_templateObject3$F = _tagged
|
|
|
40933
41670
|
}, function (props) {
|
|
40934
41671
|
return props.thumbColor;
|
|
40935
41672
|
});
|
|
40936
|
-
var AboutChannel = styled.div(_templateObject4$
|
|
40937
|
-
var AboutChannelTitle = styled.h4(_templateObject5$
|
|
41673
|
+
var AboutChannel = styled.div(_templateObject4$A || (_templateObject4$A = _taggedTemplateLiteralLoose(["\n margin-top: 20px;\n"])));
|
|
41674
|
+
var AboutChannelTitle = styled.h4(_templateObject5$v || (_templateObject5$v = _taggedTemplateLiteralLoose(["\n font-size: 12px;\n margin: 0;\n line-height: 16px;\n color: ", ";\n"])), function (props) {
|
|
40938
41675
|
return props.color;
|
|
40939
41676
|
});
|
|
40940
|
-
var AboutChannelText = styled.h3(_templateObject6$
|
|
41677
|
+
var AboutChannelText = styled.h3(_templateObject6$q || (_templateObject6$q = _taggedTemplateLiteralLoose(["\n font-size: 15px;\n margin: 0;\n font-weight: 400;\n line-height: 20px;\n color: ", ";\n"])), function (props) {
|
|
40941
41678
|
return props.color;
|
|
40942
41679
|
});
|
|
40943
|
-
var ChannelInfo$4 = styled.div(_templateObject7$
|
|
41680
|
+
var ChannelInfo$4 = styled.div(_templateObject7$o || (_templateObject7$o = _taggedTemplateLiteralLoose(["\n position: relative;\n margin-left: ", ";\n margin-top: ", ";\n text-align: ", ";\n"])), function (props) {
|
|
40944
41681
|
return (!props.direction || props.direction !== 'column') && '16px';
|
|
40945
41682
|
}, function (props) {
|
|
40946
41683
|
return props.direction && props.direction === 'column' && '16px';
|
|
40947
41684
|
}, function (props) {
|
|
40948
41685
|
return props.direction && props.direction === 'column' && 'center';
|
|
40949
41686
|
});
|
|
40950
|
-
var DetailsHeader = styled.div(_templateObject8$
|
|
41687
|
+
var DetailsHeader = styled.div(_templateObject8$m || (_templateObject8$m = _taggedTemplateLiteralLoose(["\n border-bottom: 6px solid ", ";\n align-items: center;\n box-sizing: border-box;\n padding: 20px 16px;\n"])), function (props) {
|
|
40951
41688
|
return props.borderColor;
|
|
40952
41689
|
});
|
|
40953
|
-
var ChannelAvatarAndName = styled.div(_templateObject9$
|
|
41690
|
+
var ChannelAvatarAndName = styled.div(_templateObject9$h || (_templateObject9$h = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n flex-direction: ", ";\n"])), function (props) {
|
|
40954
41691
|
return props.direction;
|
|
40955
41692
|
});
|
|
40956
|
-
var ChannelName$1 = styled(SectionHeader)(_templateObject0$
|
|
41693
|
+
var ChannelName$1 = styled(SectionHeader)(_templateObject0$f || (_templateObject0$f = _taggedTemplateLiteralLoose(["\n white-space: nowrap;\n max-width: ", ";\n text-overflow: ellipsis;\n text-color: ", ";\n overflow: hidden;\n text-transform: ", ";\n"])), function (props) {
|
|
40957
41694
|
return props.isDirect ? '200px' : '168px';
|
|
40958
41695
|
}, function (props) {
|
|
40959
41696
|
return props.color;
|
|
40960
41697
|
}, function (props) {
|
|
40961
41698
|
return props.uppercase && 'uppercase';
|
|
40962
41699
|
});
|
|
40963
|
-
var ChannelNameWrapper = styled.div(_templateObject1$
|
|
41700
|
+
var ChannelNameWrapper = styled.div(_templateObject1$c || (_templateObject1$c = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n"])));
|
|
40964
41701
|
var EditButton = styled.span(_templateObject10$7 || (_templateObject10$7 = _taggedTemplateLiteralLoose(["\n margin-left: 6px;\n cursor: pointer;\n color: #b2b6be;\n"])));
|
|
40965
41702
|
|
|
40966
|
-
var _templateObject$
|
|
41703
|
+
var _templateObject$X;
|
|
40967
41704
|
var ChannelDetailsContainer = function ChannelDetailsContainer(_ref) {
|
|
40968
41705
|
var _ref$size = _ref.size,
|
|
40969
41706
|
size = _ref$size === void 0 ? 'large' : _ref$size,
|
|
@@ -41192,7 +41929,7 @@ var ChannelDetailsContainer = function ChannelDetailsContainer(_ref) {
|
|
|
41192
41929
|
showPhoneNumber: showPhoneNumber
|
|
41193
41930
|
})));
|
|
41194
41931
|
};
|
|
41195
|
-
var DetailsWrapper = styled.div(_templateObject$
|
|
41932
|
+
var DetailsWrapper = styled.div(_templateObject$X || (_templateObject$X = _taggedTemplateLiteralLoose([""])));
|
|
41196
41933
|
|
|
41197
41934
|
var _path$1s;
|
|
41198
41935
|
function _extends$1w() {
|
|
@@ -41216,7 +41953,7 @@ function SvgChevronDown(props) {
|
|
|
41216
41953
|
})));
|
|
41217
41954
|
}
|
|
41218
41955
|
|
|
41219
|
-
var _templateObject$
|
|
41956
|
+
var _templateObject$Y, _templateObject2$Q;
|
|
41220
41957
|
var MessagesScrollToBottomButton = function MessagesScrollToBottomButton(_ref) {
|
|
41221
41958
|
var buttonIcon = _ref.buttonIcon,
|
|
41222
41959
|
buttonWidth = _ref.buttonWidth,
|
|
@@ -41299,7 +42036,7 @@ var MessagesScrollToBottomButton = function MessagesScrollToBottomButton(_ref) {
|
|
|
41299
42036
|
isMuted: channel.muted
|
|
41300
42037
|
}, channel.newMessageCount ? channel.newMessageCount > 99 ? '99+' : channel.newMessageCount : '')), buttonIcon || /*#__PURE__*/React__default.createElement(SvgChevronDown, null)));
|
|
41301
42038
|
};
|
|
41302
|
-
var BottomButton = styled.div(_templateObject$
|
|
42039
|
+
var BottomButton = styled.div(_templateObject$Y || (_templateObject$Y = _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) {
|
|
41303
42040
|
return props.animateFrom === 'bottom' && "bottom: " + (props.bottomOffset + (props.bottomPosition === undefined ? 45 : props.bottomPosition) - 130) + "px";
|
|
41304
42041
|
}, function (props) {
|
|
41305
42042
|
return props.animateFrom === 'right' && "right: " + (props.rightPosition === undefined ? 16 : props.rightPosition - 100) + "px";
|
|
@@ -41310,7 +42047,7 @@ var BottomButton = styled.div(_templateObject$X || (_templateObject$X = _taggedT
|
|
|
41310
42047
|
}, function (props) {
|
|
41311
42048
|
return props.backgroundColor;
|
|
41312
42049
|
});
|
|
41313
|
-
var UnreadCount$1 = styled.span(_templateObject2$
|
|
42050
|
+
var UnreadCount$1 = styled.span(_templateObject2$Q || (_templateObject2$Q = _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) {
|
|
41314
42051
|
return props.backgroundColor;
|
|
41315
42052
|
}, function (props) {
|
|
41316
42053
|
return props.fontSize || '13px';
|
|
@@ -41353,7 +42090,7 @@ function SvgMention(props) {
|
|
|
41353
42090
|
})));
|
|
41354
42091
|
}
|
|
41355
42092
|
|
|
41356
|
-
var _templateObject$
|
|
42093
|
+
var _templateObject$Z, _templateObject2$R;
|
|
41357
42094
|
var MessagesScrollToUnreadMentionsButton = function MessagesScrollToUnreadMentionsButton(_ref) {
|
|
41358
42095
|
var buttonIcon = _ref.buttonIcon,
|
|
41359
42096
|
buttonWidth = _ref.buttonWidth,
|
|
@@ -41496,7 +42233,7 @@ var MessagesScrollToUnreadMentionsButton = function MessagesScrollToUnreadMentio
|
|
|
41496
42233
|
isMuted: channel.muted
|
|
41497
42234
|
}, channel.newMentionCount ? channel.newMentionCount > 99 ? '99+' : channel.newMentionCount : '')), buttonIcon || /*#__PURE__*/React__default.createElement(SvgMention, null)));
|
|
41498
42235
|
};
|
|
41499
|
-
var BottomButton$1 = styled.div(_templateObject$
|
|
42236
|
+
var BottomButton$1 = styled.div(_templateObject$Z || (_templateObject$Z = _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) {
|
|
41500
42237
|
return props.animateFrom === 'bottom' && "bottom: " + (props.bottomOffset + (props.bottomPosition === undefined ? 45 : props.bottomPosition) + (props.showsUnreadMentionsButton ? 60 : 0) - 180) + "px";
|
|
41501
42238
|
}, function (props) {
|
|
41502
42239
|
return props.animateFrom === 'right' && "right: " + (props.rightPosition === undefined ? 16 : props.rightPosition - 100) + "px";
|
|
@@ -41507,7 +42244,7 @@ var BottomButton$1 = styled.div(_templateObject$Y || (_templateObject$Y = _tagge
|
|
|
41507
42244
|
}, function (props) {
|
|
41508
42245
|
return props.backgroundColor;
|
|
41509
42246
|
});
|
|
41510
|
-
var UnreadCount$2 = styled.span(_templateObject2$
|
|
42247
|
+
var UnreadCount$2 = styled.span(_templateObject2$R || (_templateObject2$R = _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) {
|
|
41511
42248
|
return props.backgroundColor;
|
|
41512
42249
|
}, function (props) {
|
|
41513
42250
|
return props.fontSize || '13px';
|