sceyt-chat-react-uikit 1.7.2-beta.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 +1615 -898
- package/index.modern.js +1615 -879
- package/package.json +1 -1
- package/types/index.d.ts +26 -7
package/index.js
CHANGED
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
2
2
|
|
|
3
|
-
function _interopNamespace(e) {
|
|
4
|
-
if (e && e.__esModule) { return e; } else {
|
|
5
|
-
var n = {};
|
|
6
|
-
if (e) {
|
|
7
|
-
Object.keys(e).forEach(function (k) {
|
|
8
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
9
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () {
|
|
12
|
-
return e[k];
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
n['default'] = e;
|
|
18
|
-
return n;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
3
|
var React = require('react');
|
|
23
4
|
var React__default = _interopDefault(React);
|
|
24
5
|
var reactRedux = require('react-redux');
|
|
@@ -44,6 +25,7 @@ var LexicalOnChangePlugin = require('@lexical/react/LexicalOnChangePlugin');
|
|
|
44
25
|
var ReactDOM = require('react-dom');
|
|
45
26
|
var LexicalTypeaheadMenuPlugin = require('@lexical/react/LexicalTypeaheadMenuPlugin');
|
|
46
27
|
var offset = require('@lexical/offset');
|
|
28
|
+
var MicRecorder = _interopDefault(require('mic-recorder-to-mp3'));
|
|
47
29
|
var LexicalHistoryPlugin = require('@lexical/react/LexicalHistoryPlugin');
|
|
48
30
|
|
|
49
31
|
// src/utils/formatProdErrorMessage.ts
|
|
@@ -2614,7 +2596,8 @@ var MESSAGE_DELIVERY_STATUS = {
|
|
|
2614
2596
|
PENDING: 'pending',
|
|
2615
2597
|
SENT: 'sent',
|
|
2616
2598
|
DELIVERED: 'received',
|
|
2617
|
-
READ: 'displayed'
|
|
2599
|
+
READ: 'displayed',
|
|
2600
|
+
PLAYED: 'played'
|
|
2618
2601
|
};
|
|
2619
2602
|
var MESSAGE_STATUS = {
|
|
2620
2603
|
UNMODIFIED: 'unmodified',
|
|
@@ -8968,6 +8951,7 @@ var UploadImageIcon;
|
|
|
8968
8951
|
var showChannelDetails = false;
|
|
8969
8952
|
var channelTypesFilter = [];
|
|
8970
8953
|
var memberCount = 10;
|
|
8954
|
+
var disableFrowardMentionsCount = false;
|
|
8971
8955
|
function setChannelInMap(channel) {
|
|
8972
8956
|
channelsMap[channel.id] = _extends({}, channel);
|
|
8973
8957
|
}
|
|
@@ -9064,6 +9048,12 @@ function getChannelMembersCount() {
|
|
|
9064
9048
|
function setChannelMembersCount(count) {
|
|
9065
9049
|
memberCount = count;
|
|
9066
9050
|
}
|
|
9051
|
+
function setDisableFrowardMentionsCount(disable) {
|
|
9052
|
+
disableFrowardMentionsCount = disable;
|
|
9053
|
+
}
|
|
9054
|
+
function getDisableFrowardMentionsCount() {
|
|
9055
|
+
return disableFrowardMentionsCount;
|
|
9056
|
+
}
|
|
9067
9057
|
var handleNewMessages;
|
|
9068
9058
|
function setHandleNewMessages(callback) {
|
|
9069
9059
|
handleNewMessages = callback;
|
|
@@ -9578,6 +9568,7 @@ var UPDATE_CHANNEL = 'UPDATE_CHANNEL';
|
|
|
9578
9568
|
var REMOVE_CHANNEL_CACHES = 'REMOVE_CHANNEL_CACHES';
|
|
9579
9569
|
var MARK_MESSAGES_AS_READ = 'MARK_MESSAGES_AS_READ';
|
|
9580
9570
|
var MARK_MESSAGES_AS_DELIVERED = 'MARK_MESSAGES_AS_DELIVERED';
|
|
9571
|
+
var MARK_VOICE_MESSAGE_AS_PLAYED = 'MARK_VOICE_MESSAGE_AS_PLAYED';
|
|
9581
9572
|
var SEND_TYPING = 'SEND_TYPING';
|
|
9582
9573
|
var SEND_RECORDING = 'SEND_RECORDING';
|
|
9583
9574
|
var JOIN_TO_CHANNEL = 'JOIN_TO_CHANNEL';
|
|
@@ -10348,7 +10339,11 @@ var initialState$1 = {
|
|
|
10348
10339
|
openedMessageMenu: '',
|
|
10349
10340
|
attachmentsUploadingProgress: {},
|
|
10350
10341
|
playingAudioId: null,
|
|
10351
|
-
selectedMessagesMap: null
|
|
10342
|
+
selectedMessagesMap: null,
|
|
10343
|
+
oGMetadata: {},
|
|
10344
|
+
attachmentUpdatedMap: {},
|
|
10345
|
+
messageMarkers: {},
|
|
10346
|
+
messagesMarkersLoadingState: null
|
|
10352
10347
|
};
|
|
10353
10348
|
var messageSlice = createSlice({
|
|
10354
10349
|
name: 'messages',
|
|
@@ -10477,39 +10472,8 @@ var messageSlice = createSlice({
|
|
|
10477
10472
|
updateMessageAttachment: function updateMessageAttachment(state, action) {
|
|
10478
10473
|
var _action$payload4 = action.payload,
|
|
10479
10474
|
url = _action$payload4.url,
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
state.activeChannelMessages = state.activeChannelMessages.map(function (message) {
|
|
10483
|
-
if (message.id === messageId) {
|
|
10484
|
-
for (var index = 0; index < message.attachments.length; index++) {
|
|
10485
|
-
var attachment = message.attachments[index];
|
|
10486
|
-
if (attachment.url === url) {
|
|
10487
|
-
message.attachments[index] = _extends({}, attachment, params);
|
|
10488
|
-
}
|
|
10489
|
-
}
|
|
10490
|
-
}
|
|
10491
|
-
if (message.attachments.length) {
|
|
10492
|
-
var detachedAttachments = message.attachments.map(function (att) {
|
|
10493
|
-
var _att$user, _att$user2;
|
|
10494
|
-
return _extends({}, att, {
|
|
10495
|
-
user: _extends({}, att.user, {
|
|
10496
|
-
metadata: _extends({}, ((_att$user = att.user) === null || _att$user === void 0 ? void 0 : _att$user.metadata) || {}),
|
|
10497
|
-
presence: _extends({}, ((_att$user2 = att.user) === null || _att$user2 === void 0 ? void 0 : _att$user2.presence) || {})
|
|
10498
|
-
})
|
|
10499
|
-
});
|
|
10500
|
-
});
|
|
10501
|
-
updateMessageOnAllMessages(messageId, {
|
|
10502
|
-
attachments: detachedAttachments
|
|
10503
|
-
});
|
|
10504
|
-
updateMessageOnMap(message.channelId, {
|
|
10505
|
-
messageId: messageId,
|
|
10506
|
-
params: {
|
|
10507
|
-
attachments: detachedAttachments
|
|
10508
|
-
}
|
|
10509
|
-
});
|
|
10510
|
-
}
|
|
10511
|
-
return message;
|
|
10512
|
-
});
|
|
10475
|
+
attachmentUrl = _action$payload4.attachmentUrl;
|
|
10476
|
+
state.attachmentUpdatedMap[url] = attachmentUrl;
|
|
10513
10477
|
},
|
|
10514
10478
|
addReactionToMessage: function addReactionToMessage(state, action) {
|
|
10515
10479
|
var _action$payload5 = action.payload,
|
|
@@ -10691,6 +10655,41 @@ var messageSlice = createSlice({
|
|
|
10691
10655
|
},
|
|
10692
10656
|
clearSelectedMessages: function clearSelectedMessages(state) {
|
|
10693
10657
|
state.selectedMessagesMap = null;
|
|
10658
|
+
},
|
|
10659
|
+
setOGMetadata: function setOGMetadata(state, action) {
|
|
10660
|
+
var _action$payload10 = action.payload,
|
|
10661
|
+
url = _action$payload10.url,
|
|
10662
|
+
metadata = _action$payload10.metadata;
|
|
10663
|
+
state.oGMetadata[url] = metadata;
|
|
10664
|
+
},
|
|
10665
|
+
updateOGMetadata: function updateOGMetadata(state, action) {
|
|
10666
|
+
var _action$payload11 = action.payload,
|
|
10667
|
+
url = _action$payload11.url,
|
|
10668
|
+
metadata = _action$payload11.metadata;
|
|
10669
|
+
if (metadata) {
|
|
10670
|
+
var existing = state.oGMetadata[url];
|
|
10671
|
+
state.oGMetadata[url] = existing ? _extends({}, existing, metadata) : metadata;
|
|
10672
|
+
}
|
|
10673
|
+
},
|
|
10674
|
+
setMessageMarkers: function setMessageMarkers(state, action) {
|
|
10675
|
+
var _action$payload12 = action.payload,
|
|
10676
|
+
channelId = _action$payload12.channelId,
|
|
10677
|
+
messageId = _action$payload12.messageId,
|
|
10678
|
+
messageMarkers = _action$payload12.messageMarkers,
|
|
10679
|
+
deliveryStatus = _action$payload12.deliveryStatus;
|
|
10680
|
+
if (!state.messageMarkers[channelId]) {
|
|
10681
|
+
state.messageMarkers[channelId] = {};
|
|
10682
|
+
}
|
|
10683
|
+
if (!state.messageMarkers[channelId][messageId]) {
|
|
10684
|
+
state.messageMarkers[channelId][messageId] = {};
|
|
10685
|
+
}
|
|
10686
|
+
if (!state.messageMarkers[channelId][messageId][deliveryStatus]) {
|
|
10687
|
+
state.messageMarkers[channelId][messageId][deliveryStatus] = [];
|
|
10688
|
+
}
|
|
10689
|
+
state.messageMarkers[channelId][messageId][deliveryStatus] = [].concat(messageMarkers);
|
|
10690
|
+
},
|
|
10691
|
+
setMessagesMarkersLoadingState: function setMessagesMarkersLoadingState(state, action) {
|
|
10692
|
+
state.messagesMarkersLoadingState = action.payload.state;
|
|
10694
10693
|
}
|
|
10695
10694
|
},
|
|
10696
10695
|
extraReducers: function extraReducers(builder) {
|
|
@@ -10740,7 +10739,11 @@ var _messageSlice$actions = messageSlice.actions,
|
|
|
10740
10739
|
setPlayingAudioId = _messageSlice$actions.setPlayingAudioId,
|
|
10741
10740
|
addSelectedMessage = _messageSlice$actions.addSelectedMessage,
|
|
10742
10741
|
removeSelectedMessage = _messageSlice$actions.removeSelectedMessage,
|
|
10743
|
-
clearSelectedMessages = _messageSlice$actions.clearSelectedMessages
|
|
10742
|
+
clearSelectedMessages = _messageSlice$actions.clearSelectedMessages,
|
|
10743
|
+
setOGMetadata = _messageSlice$actions.setOGMetadata,
|
|
10744
|
+
updateOGMetadata = _messageSlice$actions.updateOGMetadata,
|
|
10745
|
+
setMessageMarkers = _messageSlice$actions.setMessageMarkers,
|
|
10746
|
+
setMessagesMarkersLoadingState = _messageSlice$actions.setMessagesMarkersLoadingState;
|
|
10744
10747
|
var MessageReducer = messageSlice.reducer;
|
|
10745
10748
|
|
|
10746
10749
|
var initialState$2 = {
|
|
@@ -11352,6 +11355,15 @@ var markMessagesAsDeliveredAC = function markMessagesAsDeliveredAC(channelId, me
|
|
|
11352
11355
|
}
|
|
11353
11356
|
};
|
|
11354
11357
|
};
|
|
11358
|
+
var markVoiceMessageAsPlayedAC = function markVoiceMessageAsPlayedAC(channelId, messageIds) {
|
|
11359
|
+
return {
|
|
11360
|
+
type: MARK_VOICE_MESSAGE_AS_PLAYED,
|
|
11361
|
+
payload: {
|
|
11362
|
+
channelId: channelId,
|
|
11363
|
+
messageIds: messageIds
|
|
11364
|
+
}
|
|
11365
|
+
};
|
|
11366
|
+
};
|
|
11355
11367
|
var sendTypingAC = function sendTypingAC(state) {
|
|
11356
11368
|
return {
|
|
11357
11369
|
type: SEND_TYPING,
|
|
@@ -11527,6 +11539,7 @@ var getChannelMentionsAC = function getChannelMentionsAC(channelId) {
|
|
|
11527
11539
|
|
|
11528
11540
|
var GET_MESSAGES = 'GET_MESSAGES';
|
|
11529
11541
|
var GET_MESSAGE = 'GET_MESSAGE';
|
|
11542
|
+
var GET_MESSAGE_MARKERS = 'GET_MESSAGE_MARKERS';
|
|
11530
11543
|
var LOAD_MORE_MESSAGES = 'LOAD_MORE_MESSAGES';
|
|
11531
11544
|
var SEND_MESSAGE = 'SEND_MESSAGE';
|
|
11532
11545
|
var SEND_TEXT_MESSAGE = 'SEND_TEXT_MESSAGE';
|
|
@@ -11820,11 +11833,22 @@ function setMessagesHasNextAC(hasNext) {
|
|
|
11820
11833
|
hasNext: hasNext
|
|
11821
11834
|
});
|
|
11822
11835
|
}
|
|
11823
|
-
function
|
|
11836
|
+
function setOGMetadataAC(url, metadata) {
|
|
11837
|
+
return setOGMetadata({
|
|
11838
|
+
url: url,
|
|
11839
|
+
metadata: metadata
|
|
11840
|
+
});
|
|
11841
|
+
}
|
|
11842
|
+
function updateOGMetadataAC(url, metadata) {
|
|
11843
|
+
return updateOGMetadata({
|
|
11844
|
+
url: url,
|
|
11845
|
+
metadata: metadata
|
|
11846
|
+
});
|
|
11847
|
+
}
|
|
11848
|
+
function setUpdateMessageAttachmentAC(url, attachmentUrl) {
|
|
11824
11849
|
return updateMessageAttachment({
|
|
11825
11850
|
url: url,
|
|
11826
|
-
|
|
11827
|
-
params: params
|
|
11851
|
+
attachmentUrl: attachmentUrl
|
|
11828
11852
|
});
|
|
11829
11853
|
}
|
|
11830
11854
|
function updateMessageAC(messageId, params, addIfNotExists) {
|
|
@@ -11949,6 +11973,29 @@ function removeSelectedMessageAC(messageId) {
|
|
|
11949
11973
|
function clearSelectedMessagesAC() {
|
|
11950
11974
|
return clearSelectedMessages();
|
|
11951
11975
|
}
|
|
11976
|
+
function getMessageMarkersAC(messageId, channelId, deliveryStatus) {
|
|
11977
|
+
return {
|
|
11978
|
+
type: GET_MESSAGE_MARKERS,
|
|
11979
|
+
payload: {
|
|
11980
|
+
messageId: messageId,
|
|
11981
|
+
channelId: channelId,
|
|
11982
|
+
deliveryStatus: deliveryStatus
|
|
11983
|
+
}
|
|
11984
|
+
};
|
|
11985
|
+
}
|
|
11986
|
+
function setMessageMarkersAC(channelId, messageId, messageMarkers, deliveryStatus) {
|
|
11987
|
+
return setMessageMarkers({
|
|
11988
|
+
channelId: channelId,
|
|
11989
|
+
messageId: messageId,
|
|
11990
|
+
messageMarkers: messageMarkers,
|
|
11991
|
+
deliveryStatus: deliveryStatus
|
|
11992
|
+
});
|
|
11993
|
+
}
|
|
11994
|
+
function setMessagesMarkersLoadingStateAC(state) {
|
|
11995
|
+
return setMessagesMarkersLoadingState({
|
|
11996
|
+
state: state
|
|
11997
|
+
});
|
|
11998
|
+
}
|
|
11952
11999
|
|
|
11953
12000
|
var SET_CONTACT_LOADING_STATE = 'SET_CONTACT_LOADING_STATE';
|
|
11954
12001
|
var GET_CONTACTS = 'GET_CONTACTS';
|
|
@@ -14757,27 +14804,28 @@ var _marked$2 = /*#__PURE__*/_regenerator().m(createChannel),
|
|
|
14757
14804
|
_marked7 = /*#__PURE__*/_regenerator().m(getChannelMentions),
|
|
14758
14805
|
_marked8 = /*#__PURE__*/_regenerator().m(channelsForForwardLoadMore),
|
|
14759
14806
|
_marked9 = /*#__PURE__*/_regenerator().m(markMessagesRead),
|
|
14760
|
-
_marked0 = /*#__PURE__*/_regenerator().m(
|
|
14761
|
-
_marked1 = /*#__PURE__*/_regenerator().m(
|
|
14762
|
-
_marked10 = /*#__PURE__*/_regenerator().m(
|
|
14763
|
-
_marked11 = /*#__PURE__*/_regenerator().m(
|
|
14764
|
-
_marked12 = /*#__PURE__*/_regenerator().m(
|
|
14765
|
-
_marked13 = /*#__PURE__*/_regenerator().m(
|
|
14766
|
-
_marked14 = /*#__PURE__*/_regenerator().m(
|
|
14767
|
-
_marked15 = /*#__PURE__*/_regenerator().m(
|
|
14768
|
-
_marked16 = /*#__PURE__*/_regenerator().m(
|
|
14769
|
-
_marked17 = /*#__PURE__*/_regenerator().m(
|
|
14770
|
-
_marked18 = /*#__PURE__*/_regenerator().m(
|
|
14771
|
-
_marked19 = /*#__PURE__*/_regenerator().m(
|
|
14772
|
-
_marked20 = /*#__PURE__*/_regenerator().m(
|
|
14773
|
-
_marked21 = /*#__PURE__*/_regenerator().m(
|
|
14774
|
-
_marked22 = /*#__PURE__*/_regenerator().m(
|
|
14775
|
-
_marked23 = /*#__PURE__*/_regenerator().m(
|
|
14776
|
-
_marked24 = /*#__PURE__*/_regenerator().m(
|
|
14777
|
-
_marked25 = /*#__PURE__*/_regenerator().m(
|
|
14778
|
-
_marked26 = /*#__PURE__*/_regenerator().m(
|
|
14779
|
-
_marked27 = /*#__PURE__*/_regenerator().m(
|
|
14780
|
-
_marked28 = /*#__PURE__*/_regenerator().m(
|
|
14807
|
+
_marked0 = /*#__PURE__*/_regenerator().m(markVoiceMessageAsPlayed),
|
|
14808
|
+
_marked1 = /*#__PURE__*/_regenerator().m(markMessagesDelivered),
|
|
14809
|
+
_marked10 = /*#__PURE__*/_regenerator().m(switchChannel),
|
|
14810
|
+
_marked11 = /*#__PURE__*/_regenerator().m(notificationsTurnOff),
|
|
14811
|
+
_marked12 = /*#__PURE__*/_regenerator().m(notificationsTurnOn),
|
|
14812
|
+
_marked13 = /*#__PURE__*/_regenerator().m(markChannelAsRead),
|
|
14813
|
+
_marked14 = /*#__PURE__*/_regenerator().m(markChannelAsUnRead),
|
|
14814
|
+
_marked15 = /*#__PURE__*/_regenerator().m(pinChannel),
|
|
14815
|
+
_marked16 = /*#__PURE__*/_regenerator().m(unpinChannel),
|
|
14816
|
+
_marked17 = /*#__PURE__*/_regenerator().m(removeChannelCaches),
|
|
14817
|
+
_marked18 = /*#__PURE__*/_regenerator().m(leaveChannel),
|
|
14818
|
+
_marked19 = /*#__PURE__*/_regenerator().m(deleteChannel),
|
|
14819
|
+
_marked20 = /*#__PURE__*/_regenerator().m(blockChannel),
|
|
14820
|
+
_marked21 = /*#__PURE__*/_regenerator().m(updateChannel),
|
|
14821
|
+
_marked22 = /*#__PURE__*/_regenerator().m(checkUsersStatus),
|
|
14822
|
+
_marked23 = /*#__PURE__*/_regenerator().m(sendTyping),
|
|
14823
|
+
_marked24 = /*#__PURE__*/_regenerator().m(sendRecording),
|
|
14824
|
+
_marked25 = /*#__PURE__*/_regenerator().m(clearHistory),
|
|
14825
|
+
_marked26 = /*#__PURE__*/_regenerator().m(deleteAllMessages),
|
|
14826
|
+
_marked27 = /*#__PURE__*/_regenerator().m(joinChannel),
|
|
14827
|
+
_marked28 = /*#__PURE__*/_regenerator().m(watchForChannelEvents),
|
|
14828
|
+
_marked29 = /*#__PURE__*/_regenerator().m(ChannelsSaga);
|
|
14781
14829
|
function createChannel(action) {
|
|
14782
14830
|
var payload, channelData, dontCreateIfNotExists, callback, SceytChatClient, createChannelData, fileToUpload, isSelfChannel, channelIsExistOnAllChannels, createdChannel, allChannels, memberId, checkChannelExist, messageToSend, _allChannels, _memberId, _t;
|
|
14783
14831
|
return _regenerator().w(function (_context) {
|
|
@@ -14895,7 +14943,7 @@ function createChannel(action) {
|
|
|
14895
14943
|
}
|
|
14896
14944
|
messageToSend = {
|
|
14897
14945
|
body: createdChannel.type === DEFAULT_CHANNEL_TYPE.BROADCAST || createdChannel.type === DEFAULT_CHANNEL_TYPE.PUBLIC ? 'CC' : 'CG',
|
|
14898
|
-
|
|
14946
|
+
mentionedUsers: [],
|
|
14899
14947
|
attachments: [],
|
|
14900
14948
|
type: 'system'
|
|
14901
14949
|
};
|
|
@@ -15703,7 +15751,7 @@ function markMessagesRead(action) {
|
|
|
15703
15751
|
}
|
|
15704
15752
|
}, _marked9, null, [[2, 9]]);
|
|
15705
15753
|
}
|
|
15706
|
-
function
|
|
15754
|
+
function markVoiceMessageAsPlayed(action) {
|
|
15707
15755
|
var payload, channelId, messageIds, channel, _t10;
|
|
15708
15756
|
return _regenerator().w(function (_context0) {
|
|
15709
15757
|
while (1) switch (_context0.p = _context0.n) {
|
|
@@ -15725,151 +15773,148 @@ function markMessagesDelivered(action) {
|
|
|
15725
15773
|
_context0.n = 3;
|
|
15726
15774
|
break;
|
|
15727
15775
|
}
|
|
15728
|
-
log.info('send delivered marker ', messageIds);
|
|
15729
15776
|
_context0.n = 3;
|
|
15730
|
-
return effects.call(channel.
|
|
15777
|
+
return effects.call(channel.markVoiceMessagesAsPlayed, messageIds);
|
|
15731
15778
|
case 3:
|
|
15732
15779
|
_context0.n = 5;
|
|
15733
15780
|
break;
|
|
15734
15781
|
case 4:
|
|
15735
15782
|
_context0.p = 4;
|
|
15736
15783
|
_t10 = _context0.v;
|
|
15737
|
-
log.error(_t10, 'Error on mark messages
|
|
15784
|
+
log.error(_t10, 'Error on mark voice messages read');
|
|
15738
15785
|
case 5:
|
|
15739
15786
|
return _context0.a(2);
|
|
15740
15787
|
}
|
|
15741
15788
|
}, _marked0, null, [[1, 4]]);
|
|
15742
15789
|
}
|
|
15743
|
-
function
|
|
15744
|
-
var payload,
|
|
15790
|
+
function markMessagesDelivered(action) {
|
|
15791
|
+
var payload, channelId, messageIds, channel, _t11;
|
|
15745
15792
|
return _regenerator().w(function (_context1) {
|
|
15746
15793
|
while (1) switch (_context1.p = _context1.n) {
|
|
15747
15794
|
case 0:
|
|
15748
|
-
|
|
15795
|
+
payload = action.payload;
|
|
15796
|
+
channelId = payload.channelId, messageIds = payload.messageIds;
|
|
15797
|
+
_context1.p = 1;
|
|
15798
|
+
_context1.n = 2;
|
|
15799
|
+
return effects.call(getChannelFromMap, channelId);
|
|
15800
|
+
case 2:
|
|
15801
|
+
channel = _context1.v;
|
|
15802
|
+
if (!channel) {
|
|
15803
|
+
channel = getChannelFromAllChannels(channelId);
|
|
15804
|
+
if (channel) {
|
|
15805
|
+
setChannelInMap(channel);
|
|
15806
|
+
}
|
|
15807
|
+
}
|
|
15808
|
+
if (!channel) {
|
|
15809
|
+
_context1.n = 3;
|
|
15810
|
+
break;
|
|
15811
|
+
}
|
|
15812
|
+
log.info('send delivered marker ', messageIds);
|
|
15813
|
+
_context1.n = 3;
|
|
15814
|
+
return effects.call(channel.markMessagesAsReceived, messageIds);
|
|
15815
|
+
case 3:
|
|
15816
|
+
_context1.n = 5;
|
|
15817
|
+
break;
|
|
15818
|
+
case 4:
|
|
15819
|
+
_context1.p = 4;
|
|
15820
|
+
_t11 = _context1.v;
|
|
15821
|
+
log.error(_t11, 'Error on mark messages delivered');
|
|
15822
|
+
case 5:
|
|
15823
|
+
return _context1.a(2);
|
|
15824
|
+
}
|
|
15825
|
+
}, _marked1, null, [[1, 4]]);
|
|
15826
|
+
}
|
|
15827
|
+
function switchChannel(action) {
|
|
15828
|
+
var payload, channel, updateActiveChannel, channelToSwitch, existingChannel, addChannel, _SceytChatClient5, fetchedChannel, channelFromMap, currentActiveChannel, _t12;
|
|
15829
|
+
return _regenerator().w(function (_context10) {
|
|
15830
|
+
while (1) switch (_context10.p = _context10.n) {
|
|
15831
|
+
case 0:
|
|
15832
|
+
_context10.p = 0;
|
|
15749
15833
|
payload = action.payload;
|
|
15750
15834
|
channel = payload.channel, updateActiveChannel = payload.updateActiveChannel;
|
|
15751
15835
|
channelToSwitch = channel;
|
|
15752
15836
|
if (!(!(channel !== null && channel !== void 0 && channel.id) && updateActiveChannel)) {
|
|
15753
|
-
|
|
15837
|
+
_context10.n = 3;
|
|
15754
15838
|
break;
|
|
15755
15839
|
}
|
|
15756
|
-
|
|
15840
|
+
_context10.n = 1;
|
|
15757
15841
|
return effects.call(setActiveChannelId, '');
|
|
15758
15842
|
case 1:
|
|
15759
|
-
|
|
15843
|
+
_context10.n = 2;
|
|
15760
15844
|
return effects.put(setActiveChannelAC({}));
|
|
15761
15845
|
case 2:
|
|
15762
|
-
return
|
|
15846
|
+
return _context10.a(2);
|
|
15763
15847
|
case 3:
|
|
15764
15848
|
existingChannel = checkChannelExists(channel.id);
|
|
15765
15849
|
if (existingChannel) {
|
|
15766
|
-
|
|
15850
|
+
_context10.n = 9;
|
|
15767
15851
|
break;
|
|
15768
15852
|
}
|
|
15769
15853
|
addChannel = getChannelFromAllChannels(channel.id);
|
|
15770
15854
|
if (!addChannel) {
|
|
15771
|
-
|
|
15855
|
+
_context10.n = 5;
|
|
15772
15856
|
break;
|
|
15773
15857
|
}
|
|
15774
15858
|
setChannelInMap(addChannel);
|
|
15775
|
-
|
|
15859
|
+
_context10.n = 4;
|
|
15776
15860
|
return effects.put(addChannelAC(JSON.parse(JSON.stringify(addChannel))));
|
|
15777
15861
|
case 4:
|
|
15778
15862
|
channelToSwitch = _extends({}, channelToSwitch, addChannel);
|
|
15779
|
-
|
|
15863
|
+
_context10.n = 8;
|
|
15780
15864
|
break;
|
|
15781
15865
|
case 5:
|
|
15782
15866
|
_SceytChatClient5 = getClient();
|
|
15783
|
-
|
|
15867
|
+
_context10.n = 6;
|
|
15784
15868
|
return effects.call(_SceytChatClient5.getChannel, channel.id);
|
|
15785
15869
|
case 6:
|
|
15786
|
-
fetchedChannel =
|
|
15870
|
+
fetchedChannel = _context10.v;
|
|
15787
15871
|
addChannelToAllChannels(fetchedChannel);
|
|
15788
15872
|
setChannelInMap(fetchedChannel);
|
|
15789
|
-
|
|
15873
|
+
_context10.n = 7;
|
|
15790
15874
|
return effects.put(addChannelAC(JSON.parse(JSON.stringify(fetchedChannel))));
|
|
15791
15875
|
case 7:
|
|
15792
15876
|
channelToSwitch = _extends({}, channelToSwitch, fetchedChannel);
|
|
15793
15877
|
case 8:
|
|
15794
|
-
|
|
15878
|
+
_context10.n = 10;
|
|
15795
15879
|
break;
|
|
15796
15880
|
case 9:
|
|
15797
15881
|
channelFromMap = getChannelFromMap(channel.id);
|
|
15798
15882
|
channelToSwitch = _extends({}, channelToSwitch, channelFromMap);
|
|
15799
15883
|
case 10:
|
|
15800
15884
|
if (!updateActiveChannel) {
|
|
15801
|
-
|
|
15885
|
+
_context10.n = 13;
|
|
15802
15886
|
break;
|
|
15803
15887
|
}
|
|
15804
15888
|
currentActiveChannel = getChannelFromMap(getActiveChannelId());
|
|
15805
|
-
|
|
15889
|
+
_context10.n = 11;
|
|
15806
15890
|
return effects.call(setUnreadScrollTo, true);
|
|
15807
15891
|
case 11:
|
|
15808
|
-
|
|
15892
|
+
_context10.n = 12;
|
|
15809
15893
|
return effects.call(setActiveChannelId, channel && channel.id);
|
|
15810
15894
|
case 12:
|
|
15811
15895
|
if (channel.isLinkedChannel) {
|
|
15812
15896
|
channelToSwitch.linkedFrom = currentActiveChannel;
|
|
15813
15897
|
}
|
|
15814
|
-
|
|
15898
|
+
_context10.n = 13;
|
|
15815
15899
|
return effects.put(setActiveChannelAC(_extends({}, channelToSwitch)));
|
|
15816
15900
|
case 13:
|
|
15817
|
-
|
|
15901
|
+
_context10.n = 15;
|
|
15818
15902
|
break;
|
|
15819
15903
|
case 14:
|
|
15820
|
-
|
|
15821
|
-
_t11 = _context1.v;
|
|
15822
|
-
log.error('error in switch channel', _t11);
|
|
15823
|
-
case 15:
|
|
15824
|
-
return _context1.a(2);
|
|
15825
|
-
}
|
|
15826
|
-
}, _marked1, null, [[0, 14]]);
|
|
15827
|
-
}
|
|
15828
|
-
function notificationsTurnOff(action) {
|
|
15829
|
-
var expireTime, activeChannelId, channel, updatedChannel, _t12;
|
|
15830
|
-
return _regenerator().w(function (_context10) {
|
|
15831
|
-
while (1) switch (_context10.p = _context10.n) {
|
|
15832
|
-
case 0:
|
|
15833
|
-
expireTime = action.payload.expireTime;
|
|
15834
|
-
_context10.n = 1;
|
|
15835
|
-
return effects.call(getActiveChannelId);
|
|
15836
|
-
case 1:
|
|
15837
|
-
activeChannelId = _context10.v;
|
|
15838
|
-
_context10.n = 2;
|
|
15839
|
-
return effects.call(getChannelFromMap, activeChannelId);
|
|
15840
|
-
case 2:
|
|
15841
|
-
channel = _context10.v;
|
|
15842
|
-
_context10.p = 3;
|
|
15843
|
-
_context10.n = 4;
|
|
15844
|
-
return effects.call(channel.mute, expireTime);
|
|
15845
|
-
case 4:
|
|
15846
|
-
updatedChannel = _context10.v;
|
|
15847
|
-
updateChannelOnAllChannels(channel.id, {
|
|
15848
|
-
muted: updatedChannel.muted,
|
|
15849
|
-
mutedTill: updatedChannel.mutedTill
|
|
15850
|
-
});
|
|
15851
|
-
_context10.n = 5;
|
|
15852
|
-
return effects.put(updateChannelDataAC(updatedChannel.id, {
|
|
15853
|
-
muted: updatedChannel.muted,
|
|
15854
|
-
mutedTill: updatedChannel.mutedTill
|
|
15855
|
-
}));
|
|
15856
|
-
case 5:
|
|
15857
|
-
_context10.n = 7;
|
|
15858
|
-
break;
|
|
15859
|
-
case 6:
|
|
15860
|
-
_context10.p = 6;
|
|
15904
|
+
_context10.p = 14;
|
|
15861
15905
|
_t12 = _context10.v;
|
|
15862
|
-
log.error('
|
|
15863
|
-
case
|
|
15906
|
+
log.error('error in switch channel', _t12);
|
|
15907
|
+
case 15:
|
|
15864
15908
|
return _context10.a(2);
|
|
15865
15909
|
}
|
|
15866
|
-
}, _marked10, null, [[
|
|
15910
|
+
}, _marked10, null, [[0, 14]]);
|
|
15867
15911
|
}
|
|
15868
|
-
function
|
|
15869
|
-
var activeChannelId, channel, updatedChannel, _t13;
|
|
15912
|
+
function notificationsTurnOff(action) {
|
|
15913
|
+
var expireTime, activeChannelId, channel, updatedChannel, _t13;
|
|
15870
15914
|
return _regenerator().w(function (_context11) {
|
|
15871
15915
|
while (1) switch (_context11.p = _context11.n) {
|
|
15872
15916
|
case 0:
|
|
15917
|
+
expireTime = action.payload.expireTime;
|
|
15873
15918
|
_context11.n = 1;
|
|
15874
15919
|
return effects.call(getActiveChannelId);
|
|
15875
15920
|
case 1:
|
|
@@ -15880,7 +15925,7 @@ function notificationsTurnOn() {
|
|
|
15880
15925
|
channel = _context11.v;
|
|
15881
15926
|
_context11.p = 3;
|
|
15882
15927
|
_context11.n = 4;
|
|
15883
|
-
return effects.call(channel.
|
|
15928
|
+
return effects.call(channel.mute, expireTime);
|
|
15884
15929
|
case 4:
|
|
15885
15930
|
updatedChannel = _context11.v;
|
|
15886
15931
|
updateChannelOnAllChannels(channel.id, {
|
|
@@ -15898,51 +15943,53 @@ function notificationsTurnOn() {
|
|
|
15898
15943
|
case 6:
|
|
15899
15944
|
_context11.p = 6;
|
|
15900
15945
|
_t13 = _context11.v;
|
|
15901
|
-
log.error('ERROR turn
|
|
15946
|
+
log.error('ERROR turn off notifications', _t13.message);
|
|
15902
15947
|
case 7:
|
|
15903
15948
|
return _context11.a(2);
|
|
15904
15949
|
}
|
|
15905
15950
|
}, _marked11, null, [[3, 6]]);
|
|
15906
15951
|
}
|
|
15907
|
-
function
|
|
15908
|
-
var
|
|
15952
|
+
function notificationsTurnOn() {
|
|
15953
|
+
var activeChannelId, channel, updatedChannel, _t14;
|
|
15909
15954
|
return _regenerator().w(function (_context12) {
|
|
15910
15955
|
while (1) switch (_context12.p = _context12.n) {
|
|
15911
15956
|
case 0:
|
|
15912
|
-
_context12.p = 0;
|
|
15913
|
-
channelId = action.payload.channelId;
|
|
15914
15957
|
_context12.n = 1;
|
|
15915
|
-
return effects.call(
|
|
15958
|
+
return effects.call(getActiveChannelId);
|
|
15916
15959
|
case 1:
|
|
15917
|
-
|
|
15918
|
-
if (!channel) {
|
|
15919
|
-
channel = getChannelFromAllChannels(channelId);
|
|
15920
|
-
}
|
|
15960
|
+
activeChannelId = _context12.v;
|
|
15921
15961
|
_context12.n = 2;
|
|
15922
|
-
return effects.call(
|
|
15962
|
+
return effects.call(getChannelFromMap, activeChannelId);
|
|
15923
15963
|
case 2:
|
|
15924
|
-
|
|
15925
|
-
|
|
15926
|
-
|
|
15927
|
-
|
|
15928
|
-
|
|
15929
|
-
|
|
15930
|
-
|
|
15931
|
-
|
|
15932
|
-
|
|
15964
|
+
channel = _context12.v;
|
|
15965
|
+
_context12.p = 3;
|
|
15966
|
+
_context12.n = 4;
|
|
15967
|
+
return effects.call(channel.unmute);
|
|
15968
|
+
case 4:
|
|
15969
|
+
updatedChannel = _context12.v;
|
|
15970
|
+
updateChannelOnAllChannels(channel.id, {
|
|
15971
|
+
muted: updatedChannel.muted,
|
|
15972
|
+
mutedTill: updatedChannel.mutedTill
|
|
15973
|
+
});
|
|
15933
15974
|
_context12.n = 5;
|
|
15975
|
+
return effects.put(updateChannelDataAC(updatedChannel.id, {
|
|
15976
|
+
muted: updatedChannel.muted,
|
|
15977
|
+
mutedTill: updatedChannel.mutedTill
|
|
15978
|
+
}));
|
|
15979
|
+
case 5:
|
|
15980
|
+
_context12.n = 7;
|
|
15934
15981
|
break;
|
|
15935
|
-
case
|
|
15936
|
-
_context12.p =
|
|
15982
|
+
case 6:
|
|
15983
|
+
_context12.p = 6;
|
|
15937
15984
|
_t14 = _context12.v;
|
|
15938
|
-
log.error(
|
|
15939
|
-
case
|
|
15985
|
+
log.error('ERROR turn on notifications: ', _t14.message);
|
|
15986
|
+
case 7:
|
|
15940
15987
|
return _context12.a(2);
|
|
15941
15988
|
}
|
|
15942
|
-
}, _marked12, null, [[
|
|
15989
|
+
}, _marked12, null, [[3, 6]]);
|
|
15943
15990
|
}
|
|
15944
|
-
function
|
|
15945
|
-
var channelId, channel, _t15;
|
|
15991
|
+
function markChannelAsRead(action) {
|
|
15992
|
+
var channelId, channel, updateData, _t15;
|
|
15946
15993
|
return _regenerator().w(function (_context13) {
|
|
15947
15994
|
while (1) switch (_context13.p = _context13.n) {
|
|
15948
15995
|
case 0:
|
|
@@ -15956,15 +16003,16 @@ function markChannelAsUnRead(action) {
|
|
|
15956
16003
|
channel = getChannelFromAllChannels(channelId);
|
|
15957
16004
|
}
|
|
15958
16005
|
_context13.n = 2;
|
|
15959
|
-
return effects.call(channel.
|
|
16006
|
+
return effects.call(channel.markAsRead);
|
|
15960
16007
|
case 2:
|
|
15961
|
-
|
|
15962
|
-
unread:
|
|
15963
|
-
|
|
16008
|
+
updateData = {
|
|
16009
|
+
unread: false,
|
|
16010
|
+
newMessageCount: 0,
|
|
16011
|
+
newMentionCount: 0
|
|
16012
|
+
};
|
|
16013
|
+
updateChannelOnAllChannels(channel.id, updateData);
|
|
15964
16014
|
_context13.n = 3;
|
|
15965
|
-
return effects.put(updateChannelDataAC(channel.id,
|
|
15966
|
-
unread: true
|
|
15967
|
-
}));
|
|
16015
|
+
return effects.put(updateChannelDataAC(channel.id, updateData));
|
|
15968
16016
|
case 3:
|
|
15969
16017
|
_context13.n = 5;
|
|
15970
16018
|
break;
|
|
@@ -15977,8 +16025,8 @@ function markChannelAsUnRead(action) {
|
|
|
15977
16025
|
}
|
|
15978
16026
|
}, _marked13, null, [[0, 4]]);
|
|
15979
16027
|
}
|
|
15980
|
-
function
|
|
15981
|
-
var channelId, channel,
|
|
16028
|
+
function markChannelAsUnRead(action) {
|
|
16029
|
+
var channelId, channel, _t16;
|
|
15982
16030
|
return _regenerator().w(function (_context14) {
|
|
15983
16031
|
while (1) switch (_context14.p = _context14.n) {
|
|
15984
16032
|
case 0:
|
|
@@ -15992,29 +16040,28 @@ function pinChannel(action) {
|
|
|
15992
16040
|
channel = getChannelFromAllChannels(channelId);
|
|
15993
16041
|
}
|
|
15994
16042
|
_context14.n = 2;
|
|
15995
|
-
return effects.call(channel.
|
|
16043
|
+
return effects.call(channel.markAsUnRead);
|
|
15996
16044
|
case 2:
|
|
15997
|
-
updatedChannel = _context14.v;
|
|
15998
16045
|
updateChannelOnAllChannels(channel.id, {
|
|
15999
|
-
|
|
16046
|
+
unread: true
|
|
16000
16047
|
});
|
|
16001
16048
|
_context14.n = 3;
|
|
16002
|
-
return effects.put(updateChannelDataAC(
|
|
16003
|
-
|
|
16004
|
-
}
|
|
16049
|
+
return effects.put(updateChannelDataAC(channel.id, {
|
|
16050
|
+
unread: true
|
|
16051
|
+
}));
|
|
16005
16052
|
case 3:
|
|
16006
16053
|
_context14.n = 5;
|
|
16007
16054
|
break;
|
|
16008
16055
|
case 4:
|
|
16009
16056
|
_context14.p = 4;
|
|
16010
16057
|
_t16 = _context14.v;
|
|
16011
|
-
log.error(_t16, 'Error in
|
|
16058
|
+
log.error(_t16, 'Error in set channel unread');
|
|
16012
16059
|
case 5:
|
|
16013
16060
|
return _context14.a(2);
|
|
16014
16061
|
}
|
|
16015
16062
|
}, _marked14, null, [[0, 4]]);
|
|
16016
16063
|
}
|
|
16017
|
-
function
|
|
16064
|
+
function pinChannel(action) {
|
|
16018
16065
|
var channelId, channel, updatedChannel, _t17;
|
|
16019
16066
|
return _regenerator().w(function (_context15) {
|
|
16020
16067
|
while (1) switch (_context15.p = _context15.n) {
|
|
@@ -16029,7 +16076,7 @@ function unpinChannel(action) {
|
|
|
16029
16076
|
channel = getChannelFromAllChannels(channelId);
|
|
16030
16077
|
}
|
|
16031
16078
|
_context15.n = 2;
|
|
16032
|
-
return effects.call(channel.
|
|
16079
|
+
return effects.call(channel.pin);
|
|
16033
16080
|
case 2:
|
|
16034
16081
|
updatedChannel = _context15.v;
|
|
16035
16082
|
updateChannelOnAllChannels(channel.id, {
|
|
@@ -16038,197 +16085,234 @@ function unpinChannel(action) {
|
|
|
16038
16085
|
_context15.n = 3;
|
|
16039
16086
|
return effects.put(updateChannelDataAC(updatedChannel.id, {
|
|
16040
16087
|
pinnedAt: updatedChannel.pinnedAt
|
|
16041
|
-
},
|
|
16088
|
+
}, true));
|
|
16042
16089
|
case 3:
|
|
16043
16090
|
_context15.n = 5;
|
|
16044
16091
|
break;
|
|
16045
16092
|
case 4:
|
|
16046
16093
|
_context15.p = 4;
|
|
16047
16094
|
_t17 = _context15.v;
|
|
16048
|
-
log.error(_t17, 'Error in
|
|
16095
|
+
log.error(_t17, 'Error in pinChannel');
|
|
16049
16096
|
case 5:
|
|
16050
16097
|
return _context15.a(2);
|
|
16051
16098
|
}
|
|
16052
16099
|
}, _marked15, null, [[0, 4]]);
|
|
16053
16100
|
}
|
|
16101
|
+
function unpinChannel(action) {
|
|
16102
|
+
var channelId, channel, updatedChannel, _t18;
|
|
16103
|
+
return _regenerator().w(function (_context16) {
|
|
16104
|
+
while (1) switch (_context16.p = _context16.n) {
|
|
16105
|
+
case 0:
|
|
16106
|
+
_context16.p = 0;
|
|
16107
|
+
channelId = action.payload.channelId;
|
|
16108
|
+
_context16.n = 1;
|
|
16109
|
+
return effects.call(getChannelFromMap, channelId);
|
|
16110
|
+
case 1:
|
|
16111
|
+
channel = _context16.v;
|
|
16112
|
+
if (!channel) {
|
|
16113
|
+
channel = getChannelFromAllChannels(channelId);
|
|
16114
|
+
}
|
|
16115
|
+
_context16.n = 2;
|
|
16116
|
+
return effects.call(channel.unpin);
|
|
16117
|
+
case 2:
|
|
16118
|
+
updatedChannel = _context16.v;
|
|
16119
|
+
updateChannelOnAllChannels(channel.id, {
|
|
16120
|
+
pinnedAt: updatedChannel.pinnedAt
|
|
16121
|
+
});
|
|
16122
|
+
_context16.n = 3;
|
|
16123
|
+
return effects.put(updateChannelDataAC(updatedChannel.id, {
|
|
16124
|
+
pinnedAt: updatedChannel.pinnedAt
|
|
16125
|
+
}, false, true));
|
|
16126
|
+
case 3:
|
|
16127
|
+
_context16.n = 5;
|
|
16128
|
+
break;
|
|
16129
|
+
case 4:
|
|
16130
|
+
_context16.p = 4;
|
|
16131
|
+
_t18 = _context16.v;
|
|
16132
|
+
log.error(_t18, 'Error in unpinChannel');
|
|
16133
|
+
case 5:
|
|
16134
|
+
return _context16.a(2);
|
|
16135
|
+
}
|
|
16136
|
+
}, _marked16, null, [[0, 4]]);
|
|
16137
|
+
}
|
|
16054
16138
|
function removeChannelCaches(action) {
|
|
16055
16139
|
var payload, channelId, activeChannelId, activeChannel;
|
|
16056
|
-
return _regenerator().w(function (
|
|
16057
|
-
while (1) switch (
|
|
16140
|
+
return _regenerator().w(function (_context17) {
|
|
16141
|
+
while (1) switch (_context17.n) {
|
|
16058
16142
|
case 0:
|
|
16059
16143
|
payload = action.payload;
|
|
16060
16144
|
channelId = payload.channelId;
|
|
16061
|
-
|
|
16145
|
+
_context17.n = 1;
|
|
16062
16146
|
return effects.call(getActiveChannelId);
|
|
16063
16147
|
case 1:
|
|
16064
|
-
activeChannelId =
|
|
16148
|
+
activeChannelId = _context17.v;
|
|
16065
16149
|
removeChannelFromMap(channelId);
|
|
16066
16150
|
removeMessagesFromMap(channelId);
|
|
16067
16151
|
if (!(activeChannelId === channelId)) {
|
|
16068
|
-
|
|
16152
|
+
_context17.n = 3;
|
|
16069
16153
|
break;
|
|
16070
16154
|
}
|
|
16071
|
-
|
|
16155
|
+
_context17.n = 2;
|
|
16072
16156
|
return effects.call(getLastChannelFromMap);
|
|
16073
16157
|
case 2:
|
|
16074
|
-
activeChannel =
|
|
16158
|
+
activeChannel = _context17.v;
|
|
16075
16159
|
if (!activeChannel) {
|
|
16076
|
-
|
|
16160
|
+
_context17.n = 3;
|
|
16077
16161
|
break;
|
|
16078
16162
|
}
|
|
16079
|
-
|
|
16163
|
+
_context17.n = 3;
|
|
16080
16164
|
return effects.put(switchChannelActionAC(JSON.parse(JSON.stringify(activeChannel))));
|
|
16081
16165
|
case 3:
|
|
16082
|
-
return
|
|
16166
|
+
return _context17.a(2);
|
|
16083
16167
|
}
|
|
16084
|
-
},
|
|
16168
|
+
}, _marked17);
|
|
16085
16169
|
}
|
|
16086
16170
|
function leaveChannel(action) {
|
|
16087
|
-
var payload, channelId, channel, messageBuilder, messageToSend,
|
|
16088
|
-
return _regenerator().w(function (
|
|
16089
|
-
while (1) switch (
|
|
16171
|
+
var payload, channelId, channel, messageBuilder, messageToSend, _t19;
|
|
16172
|
+
return _regenerator().w(function (_context18) {
|
|
16173
|
+
while (1) switch (_context18.p = _context18.n) {
|
|
16090
16174
|
case 0:
|
|
16091
|
-
|
|
16175
|
+
_context18.p = 0;
|
|
16092
16176
|
payload = action.payload;
|
|
16093
16177
|
channelId = payload.channelId;
|
|
16094
|
-
|
|
16178
|
+
_context18.n = 1;
|
|
16095
16179
|
return effects.call(getChannelFromMap, channelId);
|
|
16096
16180
|
case 1:
|
|
16097
|
-
channel =
|
|
16181
|
+
channel = _context18.v;
|
|
16098
16182
|
if (!channel) {
|
|
16099
16183
|
channel = getChannelFromAllChannels(channelId);
|
|
16100
16184
|
}
|
|
16101
16185
|
if (!channel) {
|
|
16102
|
-
|
|
16186
|
+
_context18.n = 5;
|
|
16103
16187
|
break;
|
|
16104
16188
|
}
|
|
16105
16189
|
if (!(channel.type === DEFAULT_CHANNEL_TYPE.GROUP || channel.type === DEFAULT_CHANNEL_TYPE.PRIVATE)) {
|
|
16106
|
-
|
|
16190
|
+
_context18.n = 2;
|
|
16107
16191
|
break;
|
|
16108
16192
|
}
|
|
16109
16193
|
messageBuilder = channel.createMessageBuilder();
|
|
16110
16194
|
messageBuilder.setBody('LG').setType('system').setDisplayCount(0).setSilent(true);
|
|
16111
16195
|
messageToSend = messageBuilder.create();
|
|
16112
16196
|
log.info('send message for left');
|
|
16113
|
-
|
|
16197
|
+
_context18.n = 2;
|
|
16114
16198
|
return effects.call(channel.sendMessage, messageToSend);
|
|
16115
16199
|
case 2:
|
|
16116
16200
|
log.info('leave');
|
|
16117
|
-
|
|
16201
|
+
_context18.n = 3;
|
|
16118
16202
|
return effects.call(channel.leave);
|
|
16119
16203
|
case 3:
|
|
16120
|
-
|
|
16204
|
+
_context18.n = 4;
|
|
16121
16205
|
return effects.put(removeChannelAC(channelId));
|
|
16122
16206
|
case 4:
|
|
16123
16207
|
deleteChannelFromAllChannels(channelId);
|
|
16124
|
-
|
|
16208
|
+
_context18.n = 5;
|
|
16125
16209
|
return effects.put(removeChannelCachesAC(channelId));
|
|
16126
16210
|
case 5:
|
|
16127
|
-
|
|
16211
|
+
_context18.n = 7;
|
|
16128
16212
|
break;
|
|
16129
16213
|
case 6:
|
|
16130
|
-
|
|
16131
|
-
|
|
16132
|
-
log.error('ERROR in leave channel - ',
|
|
16214
|
+
_context18.p = 6;
|
|
16215
|
+
_t19 = _context18.v;
|
|
16216
|
+
log.error('ERROR in leave channel - ', _t19.message);
|
|
16133
16217
|
case 7:
|
|
16134
|
-
return
|
|
16218
|
+
return _context18.a(2);
|
|
16135
16219
|
}
|
|
16136
|
-
},
|
|
16220
|
+
}, _marked18, null, [[0, 6]]);
|
|
16137
16221
|
}
|
|
16138
16222
|
function deleteChannel(action) {
|
|
16139
|
-
var payload, channelId, channel,
|
|
16140
|
-
return _regenerator().w(function (
|
|
16141
|
-
while (1) switch (
|
|
16223
|
+
var payload, channelId, channel, _t20;
|
|
16224
|
+
return _regenerator().w(function (_context19) {
|
|
16225
|
+
while (1) switch (_context19.p = _context19.n) {
|
|
16142
16226
|
case 0:
|
|
16143
|
-
|
|
16227
|
+
_context19.p = 0;
|
|
16144
16228
|
payload = action.payload;
|
|
16145
16229
|
channelId = payload.channelId;
|
|
16146
|
-
|
|
16230
|
+
_context19.n = 1;
|
|
16147
16231
|
return effects.call(getChannelFromMap, channelId);
|
|
16148
16232
|
case 1:
|
|
16149
|
-
channel =
|
|
16233
|
+
channel = _context19.v;
|
|
16150
16234
|
if (!channel) {
|
|
16151
16235
|
channel = getChannelFromAllChannels(channelId);
|
|
16152
16236
|
}
|
|
16153
16237
|
if (!channel) {
|
|
16154
|
-
|
|
16238
|
+
_context19.n = 5;
|
|
16155
16239
|
break;
|
|
16156
16240
|
}
|
|
16157
|
-
|
|
16241
|
+
_context19.n = 2;
|
|
16158
16242
|
return effects.call(channel["delete"]);
|
|
16159
16243
|
case 2:
|
|
16160
|
-
|
|
16244
|
+
_context19.n = 3;
|
|
16161
16245
|
return effects.put(setChannelToRemoveAC(channel));
|
|
16162
16246
|
case 3:
|
|
16163
|
-
|
|
16247
|
+
_context19.n = 4;
|
|
16164
16248
|
return effects.put(removeChannelAC(channelId));
|
|
16165
16249
|
case 4:
|
|
16166
|
-
|
|
16250
|
+
_context19.n = 5;
|
|
16167
16251
|
return effects.put(removeChannelCachesAC(channelId));
|
|
16168
16252
|
case 5:
|
|
16169
|
-
|
|
16253
|
+
_context19.n = 7;
|
|
16170
16254
|
break;
|
|
16171
16255
|
case 6:
|
|
16172
|
-
|
|
16173
|
-
|
|
16174
|
-
log.error('ERROR in delete channel',
|
|
16256
|
+
_context19.p = 6;
|
|
16257
|
+
_t20 = _context19.v;
|
|
16258
|
+
log.error('ERROR in delete channel', _t20);
|
|
16175
16259
|
case 7:
|
|
16176
|
-
return
|
|
16260
|
+
return _context19.a(2);
|
|
16177
16261
|
}
|
|
16178
|
-
},
|
|
16262
|
+
}, _marked19, null, [[0, 6]]);
|
|
16179
16263
|
}
|
|
16180
16264
|
function blockChannel(action) {
|
|
16181
|
-
var payload, channelId, channel,
|
|
16182
|
-
return _regenerator().w(function (
|
|
16183
|
-
while (1) switch (
|
|
16265
|
+
var payload, channelId, channel, _t21;
|
|
16266
|
+
return _regenerator().w(function (_context20) {
|
|
16267
|
+
while (1) switch (_context20.p = _context20.n) {
|
|
16184
16268
|
case 0:
|
|
16185
|
-
|
|
16269
|
+
_context20.p = 0;
|
|
16186
16270
|
payload = action.payload;
|
|
16187
16271
|
channelId = payload.channelId;
|
|
16188
|
-
|
|
16272
|
+
_context20.n = 1;
|
|
16189
16273
|
return effects.call(getChannelFromMap, channelId);
|
|
16190
16274
|
case 1:
|
|
16191
|
-
channel =
|
|
16275
|
+
channel = _context20.v;
|
|
16192
16276
|
if (!channel) {
|
|
16193
16277
|
channel = getChannelFromAllChannels(channelId);
|
|
16194
16278
|
}
|
|
16195
16279
|
if (!channel) {
|
|
16196
|
-
|
|
16280
|
+
_context20.n = 4;
|
|
16197
16281
|
break;
|
|
16198
16282
|
}
|
|
16199
|
-
|
|
16283
|
+
_context20.n = 2;
|
|
16200
16284
|
return effects.call(channel.block);
|
|
16201
16285
|
case 2:
|
|
16202
|
-
|
|
16286
|
+
_context20.n = 3;
|
|
16203
16287
|
return effects.put(removeChannelAC(channelId));
|
|
16204
16288
|
case 3:
|
|
16205
|
-
|
|
16289
|
+
_context20.n = 4;
|
|
16206
16290
|
return effects.put(removeChannelCachesAC(channelId));
|
|
16207
16291
|
case 4:
|
|
16208
|
-
|
|
16292
|
+
_context20.n = 6;
|
|
16209
16293
|
break;
|
|
16210
16294
|
case 5:
|
|
16211
|
-
|
|
16212
|
-
|
|
16213
|
-
log.error('ERROR in block channel - ',
|
|
16295
|
+
_context20.p = 5;
|
|
16296
|
+
_t21 = _context20.v;
|
|
16297
|
+
log.error('ERROR in block channel - ', _t21.message);
|
|
16214
16298
|
case 6:
|
|
16215
|
-
return
|
|
16299
|
+
return _context20.a(2);
|
|
16216
16300
|
}
|
|
16217
|
-
},
|
|
16301
|
+
}, _marked20, null, [[0, 5]]);
|
|
16218
16302
|
}
|
|
16219
16303
|
function updateChannel(action) {
|
|
16220
|
-
var payload, channelId, config, _SceytChatClient6, channel, paramsToUpdate, fileToUpload, _yield$call5, subject, avatarUrl, metadata,
|
|
16221
|
-
return _regenerator().w(function (
|
|
16222
|
-
while (1) switch (
|
|
16304
|
+
var payload, channelId, config, _SceytChatClient6, channel, paramsToUpdate, fileToUpload, _yield$call5, subject, avatarUrl, metadata, _t22;
|
|
16305
|
+
return _regenerator().w(function (_context21) {
|
|
16306
|
+
while (1) switch (_context21.p = _context21.n) {
|
|
16223
16307
|
case 0:
|
|
16224
|
-
|
|
16308
|
+
_context21.p = 0;
|
|
16225
16309
|
payload = action.payload;
|
|
16226
16310
|
channelId = payload.channelId, config = payload.config;
|
|
16227
16311
|
_SceytChatClient6 = getClient();
|
|
16228
|
-
|
|
16312
|
+
_context21.n = 1;
|
|
16229
16313
|
return effects.call(getChannelFromMap, channelId);
|
|
16230
16314
|
case 1:
|
|
16231
|
-
channel =
|
|
16315
|
+
channel = _context21.v;
|
|
16232
16316
|
if (!channel) {
|
|
16233
16317
|
channel = getChannelFromAllChannels(channelId);
|
|
16234
16318
|
}
|
|
@@ -16239,7 +16323,7 @@ function updateChannel(action) {
|
|
|
16239
16323
|
avatarUrl: channel.avatarUrl
|
|
16240
16324
|
};
|
|
16241
16325
|
if (!config.avatar) {
|
|
16242
|
-
|
|
16326
|
+
_context21.n = 3;
|
|
16243
16327
|
break;
|
|
16244
16328
|
}
|
|
16245
16329
|
fileToUpload = {
|
|
@@ -16248,10 +16332,10 @@ function updateChannel(action) {
|
|
|
16248
16332
|
log.info('upload percent - ', progressPercent);
|
|
16249
16333
|
}
|
|
16250
16334
|
};
|
|
16251
|
-
|
|
16335
|
+
_context21.n = 2;
|
|
16252
16336
|
return effects.call(_SceytChatClient6.uploadFile, fileToUpload);
|
|
16253
16337
|
case 2:
|
|
16254
|
-
paramsToUpdate.avatarUrl =
|
|
16338
|
+
paramsToUpdate.avatarUrl = _context21.v;
|
|
16255
16339
|
case 3:
|
|
16256
16340
|
if (config.subject) {
|
|
16257
16341
|
paramsToUpdate.subject = config.subject;
|
|
@@ -16262,14 +16346,14 @@ function updateChannel(action) {
|
|
|
16262
16346
|
if (config.avatarUrl === '') {
|
|
16263
16347
|
paramsToUpdate.avatarUrl = '';
|
|
16264
16348
|
}
|
|
16265
|
-
|
|
16349
|
+
_context21.n = 4;
|
|
16266
16350
|
return effects.call(channel.update, paramsToUpdate);
|
|
16267
16351
|
case 4:
|
|
16268
|
-
_yield$call5 =
|
|
16352
|
+
_yield$call5 = _context21.v;
|
|
16269
16353
|
subject = _yield$call5.subject;
|
|
16270
16354
|
avatarUrl = _yield$call5.avatarUrl;
|
|
16271
16355
|
metadata = _yield$call5.metadata;
|
|
16272
|
-
|
|
16356
|
+
_context21.n = 5;
|
|
16273
16357
|
return effects.put(updateChannelDataAC(channelId, {
|
|
16274
16358
|
subject: subject,
|
|
16275
16359
|
avatarUrl: avatarUrl,
|
|
@@ -16281,29 +16365,29 @@ function updateChannel(action) {
|
|
|
16281
16365
|
avatarUrl: avatarUrl,
|
|
16282
16366
|
metadata: isJSON(metadata) ? JSON.parse(metadata) : metadata
|
|
16283
16367
|
});
|
|
16284
|
-
|
|
16368
|
+
_context21.n = 7;
|
|
16285
16369
|
break;
|
|
16286
16370
|
case 6:
|
|
16287
|
-
|
|
16288
|
-
|
|
16289
|
-
log.error('ERROR in update channel',
|
|
16371
|
+
_context21.p = 6;
|
|
16372
|
+
_t22 = _context21.v;
|
|
16373
|
+
log.error('ERROR in update channel', _t22.message);
|
|
16290
16374
|
case 7:
|
|
16291
|
-
return
|
|
16375
|
+
return _context21.a(2);
|
|
16292
16376
|
}
|
|
16293
|
-
},
|
|
16377
|
+
}, _marked21, null, [[0, 6]]);
|
|
16294
16378
|
}
|
|
16295
16379
|
function checkUsersStatus() {
|
|
16296
|
-
var _SceytChatClient7, usersForUpdate, updatedUsers, usersToUpdateMap, update, updateData,
|
|
16297
|
-
return _regenerator().w(function (
|
|
16298
|
-
while (1) switch (
|
|
16380
|
+
var _SceytChatClient7, usersForUpdate, updatedUsers, usersToUpdateMap, update, updateData, _t23;
|
|
16381
|
+
return _regenerator().w(function (_context22) {
|
|
16382
|
+
while (1) switch (_context22.p = _context22.n) {
|
|
16299
16383
|
case 0:
|
|
16300
|
-
|
|
16384
|
+
_context22.p = 0;
|
|
16301
16385
|
_SceytChatClient7 = getClient();
|
|
16302
16386
|
usersForUpdate = Object.keys(usersMap);
|
|
16303
|
-
|
|
16387
|
+
_context22.n = 1;
|
|
16304
16388
|
return effects.call(_SceytChatClient7.getUsers, usersForUpdate);
|
|
16305
16389
|
case 1:
|
|
16306
|
-
updatedUsers =
|
|
16390
|
+
updatedUsers = _context22.v;
|
|
16307
16391
|
usersToUpdateMap = {};
|
|
16308
16392
|
update = false;
|
|
16309
16393
|
updatedUsers.forEach(function (updatedUser) {
|
|
@@ -16315,149 +16399,149 @@ function checkUsersStatus() {
|
|
|
16315
16399
|
}
|
|
16316
16400
|
});
|
|
16317
16401
|
if (!update) {
|
|
16318
|
-
|
|
16402
|
+
_context22.n = 4;
|
|
16319
16403
|
break;
|
|
16320
16404
|
}
|
|
16321
16405
|
updateData = JSON.parse(JSON.stringify(usersToUpdateMap));
|
|
16322
|
-
|
|
16406
|
+
_context22.n = 2;
|
|
16323
16407
|
return effects.put(updateMembersPresenceAC(updateData));
|
|
16324
16408
|
case 2:
|
|
16325
|
-
|
|
16409
|
+
_context22.n = 3;
|
|
16326
16410
|
return effects.put(updateUserStatusOnMapAC(updateData));
|
|
16327
16411
|
case 3:
|
|
16328
|
-
|
|
16412
|
+
_context22.n = 4;
|
|
16329
16413
|
return effects.put(updateUserStatusOnChannelAC(updateData));
|
|
16330
16414
|
case 4:
|
|
16331
|
-
|
|
16415
|
+
_context22.n = 6;
|
|
16332
16416
|
break;
|
|
16333
16417
|
case 5:
|
|
16334
|
-
|
|
16335
|
-
|
|
16336
|
-
log.error('ERROR in check user status : ',
|
|
16418
|
+
_context22.p = 5;
|
|
16419
|
+
_t23 = _context22.v;
|
|
16420
|
+
log.error('ERROR in check user status : ', _t23.message);
|
|
16337
16421
|
case 6:
|
|
16338
|
-
return
|
|
16422
|
+
return _context22.a(2);
|
|
16339
16423
|
}
|
|
16340
|
-
},
|
|
16424
|
+
}, _marked22, null, [[0, 5]]);
|
|
16341
16425
|
}
|
|
16342
16426
|
function sendTyping(action) {
|
|
16343
|
-
var state, activeChannelId, channel,
|
|
16344
|
-
return _regenerator().w(function (
|
|
16345
|
-
while (1) switch (
|
|
16427
|
+
var state, activeChannelId, channel, _t24;
|
|
16428
|
+
return _regenerator().w(function (_context23) {
|
|
16429
|
+
while (1) switch (_context23.p = _context23.n) {
|
|
16346
16430
|
case 0:
|
|
16347
16431
|
state = action.payload.state;
|
|
16348
|
-
|
|
16432
|
+
_context23.n = 1;
|
|
16349
16433
|
return effects.call(getActiveChannelId);
|
|
16350
16434
|
case 1:
|
|
16351
|
-
activeChannelId =
|
|
16352
|
-
|
|
16435
|
+
activeChannelId = _context23.v;
|
|
16436
|
+
_context23.n = 2;
|
|
16353
16437
|
return effects.call(getChannelFromMap, activeChannelId);
|
|
16354
16438
|
case 2:
|
|
16355
|
-
channel =
|
|
16356
|
-
|
|
16439
|
+
channel = _context23.v;
|
|
16440
|
+
_context23.p = 3;
|
|
16357
16441
|
if (!channel) {
|
|
16358
|
-
|
|
16442
|
+
_context23.n = 6;
|
|
16359
16443
|
break;
|
|
16360
16444
|
}
|
|
16361
16445
|
if (!state) {
|
|
16362
|
-
|
|
16446
|
+
_context23.n = 5;
|
|
16363
16447
|
break;
|
|
16364
16448
|
}
|
|
16365
|
-
|
|
16449
|
+
_context23.n = 4;
|
|
16366
16450
|
return effects.call(channel.startTyping);
|
|
16367
16451
|
case 4:
|
|
16368
|
-
|
|
16452
|
+
_context23.n = 6;
|
|
16369
16453
|
break;
|
|
16370
16454
|
case 5:
|
|
16371
|
-
|
|
16455
|
+
_context23.n = 6;
|
|
16372
16456
|
return effects.call(channel.stopTyping);
|
|
16373
16457
|
case 6:
|
|
16374
|
-
|
|
16458
|
+
_context23.n = 8;
|
|
16375
16459
|
break;
|
|
16376
16460
|
case 7:
|
|
16377
|
-
|
|
16378
|
-
|
|
16379
|
-
log.error('ERROR in send typing',
|
|
16461
|
+
_context23.p = 7;
|
|
16462
|
+
_t24 = _context23.v;
|
|
16463
|
+
log.error('ERROR in send typing', _t24);
|
|
16380
16464
|
case 8:
|
|
16381
|
-
return
|
|
16465
|
+
return _context23.a(2);
|
|
16382
16466
|
}
|
|
16383
|
-
},
|
|
16467
|
+
}, _marked23, null, [[3, 7]]);
|
|
16384
16468
|
}
|
|
16385
16469
|
function sendRecording(action) {
|
|
16386
|
-
var _action$payload, state, channelId, channel,
|
|
16387
|
-
return _regenerator().w(function (
|
|
16388
|
-
while (1) switch (
|
|
16470
|
+
var _action$payload, state, channelId, channel, _t25;
|
|
16471
|
+
return _regenerator().w(function (_context24) {
|
|
16472
|
+
while (1) switch (_context24.p = _context24.n) {
|
|
16389
16473
|
case 0:
|
|
16390
16474
|
_action$payload = action.payload, state = _action$payload.state, channelId = _action$payload.channelId;
|
|
16391
|
-
|
|
16475
|
+
_context24.n = 1;
|
|
16392
16476
|
return effects.call(getChannelFromMap, channelId);
|
|
16393
16477
|
case 1:
|
|
16394
|
-
channel =
|
|
16395
|
-
|
|
16478
|
+
channel = _context24.v;
|
|
16479
|
+
_context24.p = 2;
|
|
16396
16480
|
if (!channel) {
|
|
16397
|
-
|
|
16481
|
+
_context24.n = 5;
|
|
16398
16482
|
break;
|
|
16399
16483
|
}
|
|
16400
16484
|
if (!state) {
|
|
16401
|
-
|
|
16485
|
+
_context24.n = 4;
|
|
16402
16486
|
break;
|
|
16403
16487
|
}
|
|
16404
|
-
|
|
16488
|
+
_context24.n = 3;
|
|
16405
16489
|
return effects.call(channel.startRecording);
|
|
16406
16490
|
case 3:
|
|
16407
|
-
|
|
16491
|
+
_context24.n = 5;
|
|
16408
16492
|
break;
|
|
16409
16493
|
case 4:
|
|
16410
|
-
|
|
16494
|
+
_context24.n = 5;
|
|
16411
16495
|
return effects.call(channel.stopRecording);
|
|
16412
16496
|
case 5:
|
|
16413
|
-
|
|
16497
|
+
_context24.n = 7;
|
|
16414
16498
|
break;
|
|
16415
16499
|
case 6:
|
|
16416
|
-
|
|
16417
|
-
|
|
16418
|
-
log.error('ERROR in send recording',
|
|
16500
|
+
_context24.p = 6;
|
|
16501
|
+
_t25 = _context24.v;
|
|
16502
|
+
log.error('ERROR in send recording', _t25);
|
|
16419
16503
|
case 7:
|
|
16420
|
-
return
|
|
16504
|
+
return _context24.a(2);
|
|
16421
16505
|
}
|
|
16422
|
-
},
|
|
16506
|
+
}, _marked24, null, [[2, 6]]);
|
|
16423
16507
|
}
|
|
16424
16508
|
function clearHistory(action) {
|
|
16425
|
-
var payload, channelId, channel, activeChannelId, groupName,
|
|
16426
|
-
return _regenerator().w(function (
|
|
16427
|
-
while (1) switch (
|
|
16509
|
+
var payload, channelId, channel, activeChannelId, groupName, _t26;
|
|
16510
|
+
return _regenerator().w(function (_context25) {
|
|
16511
|
+
while (1) switch (_context25.p = _context25.n) {
|
|
16428
16512
|
case 0:
|
|
16429
|
-
|
|
16513
|
+
_context25.p = 0;
|
|
16430
16514
|
payload = action.payload;
|
|
16431
16515
|
channelId = payload.channelId;
|
|
16432
|
-
|
|
16516
|
+
_context25.n = 1;
|
|
16433
16517
|
return effects.call(getChannelFromMap, channelId);
|
|
16434
16518
|
case 1:
|
|
16435
|
-
channel =
|
|
16519
|
+
channel = _context25.v;
|
|
16436
16520
|
if (!channel) {
|
|
16437
16521
|
channel = getChannelFromAllChannels(channelId);
|
|
16438
16522
|
}
|
|
16439
|
-
|
|
16523
|
+
_context25.n = 2;
|
|
16440
16524
|
return effects.call(getActiveChannelId);
|
|
16441
16525
|
case 2:
|
|
16442
|
-
activeChannelId =
|
|
16526
|
+
activeChannelId = _context25.v;
|
|
16443
16527
|
if (!channel) {
|
|
16444
|
-
|
|
16528
|
+
_context25.n = 7;
|
|
16445
16529
|
break;
|
|
16446
16530
|
}
|
|
16447
|
-
|
|
16531
|
+
_context25.n = 3;
|
|
16448
16532
|
return effects.call(channel.deleteAllMessages);
|
|
16449
16533
|
case 3:
|
|
16450
|
-
|
|
16534
|
+
_context25.n = 4;
|
|
16451
16535
|
return effects.put(clearMessagesAC());
|
|
16452
16536
|
case 4:
|
|
16453
16537
|
removeMessagesFromMap(channelId);
|
|
16454
16538
|
if (channelId === activeChannelId) {
|
|
16455
16539
|
removeAllMessages();
|
|
16456
16540
|
}
|
|
16457
|
-
|
|
16541
|
+
_context25.n = 5;
|
|
16458
16542
|
return effects.put(clearSelectedMessagesAC());
|
|
16459
16543
|
case 5:
|
|
16460
|
-
|
|
16544
|
+
_context25.n = 6;
|
|
16461
16545
|
return effects.put(updateChannelDataAC(channel.id, {
|
|
16462
16546
|
lastMessage: null,
|
|
16463
16547
|
newMessageCount: 0,
|
|
@@ -16470,64 +16554,64 @@ function clearHistory(action) {
|
|
|
16470
16554
|
newMentionCount: 0
|
|
16471
16555
|
});
|
|
16472
16556
|
groupName = getChannelGroupName(channel);
|
|
16473
|
-
|
|
16557
|
+
_context25.n = 7;
|
|
16474
16558
|
return effects.put(updateSearchedChannelDataAC(channel.id, {
|
|
16475
16559
|
lastMessage: null,
|
|
16476
16560
|
newMessageCount: 0,
|
|
16477
16561
|
newMentionCount: 0
|
|
16478
16562
|
}, groupName));
|
|
16479
16563
|
case 7:
|
|
16480
|
-
|
|
16564
|
+
_context25.n = 9;
|
|
16481
16565
|
break;
|
|
16482
16566
|
case 8:
|
|
16483
|
-
|
|
16484
|
-
|
|
16485
|
-
log.error('ERROR in clear history',
|
|
16567
|
+
_context25.p = 8;
|
|
16568
|
+
_t26 = _context25.v;
|
|
16569
|
+
log.error('ERROR in clear history', _t26);
|
|
16486
16570
|
case 9:
|
|
16487
|
-
return
|
|
16571
|
+
return _context25.a(2);
|
|
16488
16572
|
}
|
|
16489
|
-
},
|
|
16573
|
+
}, _marked25, null, [[0, 8]]);
|
|
16490
16574
|
}
|
|
16491
16575
|
function deleteAllMessages(action) {
|
|
16492
|
-
var payload, channelId, channel, activeChannelId, groupName,
|
|
16493
|
-
return _regenerator().w(function (
|
|
16494
|
-
while (1) switch (
|
|
16576
|
+
var payload, channelId, channel, activeChannelId, groupName, _t27;
|
|
16577
|
+
return _regenerator().w(function (_context26) {
|
|
16578
|
+
while (1) switch (_context26.p = _context26.n) {
|
|
16495
16579
|
case 0:
|
|
16496
|
-
|
|
16580
|
+
_context26.p = 0;
|
|
16497
16581
|
payload = action.payload;
|
|
16498
16582
|
channelId = payload.channelId;
|
|
16499
|
-
|
|
16583
|
+
_context26.n = 1;
|
|
16500
16584
|
return effects.call(getChannelFromMap, channelId);
|
|
16501
16585
|
case 1:
|
|
16502
|
-
channel =
|
|
16586
|
+
channel = _context26.v;
|
|
16503
16587
|
if (!channel) {
|
|
16504
16588
|
channel = getChannelFromAllChannels(channelId);
|
|
16505
16589
|
}
|
|
16506
|
-
|
|
16590
|
+
_context26.n = 2;
|
|
16507
16591
|
return effects.call(getActiveChannelId);
|
|
16508
16592
|
case 2:
|
|
16509
|
-
activeChannelId =
|
|
16593
|
+
activeChannelId = _context26.v;
|
|
16510
16594
|
if (!channel) {
|
|
16511
|
-
|
|
16595
|
+
_context26.n = 8;
|
|
16512
16596
|
break;
|
|
16513
16597
|
}
|
|
16514
|
-
|
|
16598
|
+
_context26.n = 3;
|
|
16515
16599
|
return effects.call(channel.deleteAllMessages, true);
|
|
16516
16600
|
case 3:
|
|
16517
16601
|
removeMessagesFromMap(channelId);
|
|
16518
16602
|
if (!(channelId === activeChannelId)) {
|
|
16519
|
-
|
|
16603
|
+
_context26.n = 5;
|
|
16520
16604
|
break;
|
|
16521
16605
|
}
|
|
16522
|
-
|
|
16606
|
+
_context26.n = 4;
|
|
16523
16607
|
return effects.put(clearMessagesAC());
|
|
16524
16608
|
case 4:
|
|
16525
16609
|
removeAllMessages();
|
|
16526
16610
|
case 5:
|
|
16527
|
-
|
|
16611
|
+
_context26.n = 6;
|
|
16528
16612
|
return effects.put(clearSelectedMessagesAC());
|
|
16529
16613
|
case 6:
|
|
16530
|
-
|
|
16614
|
+
_context26.n = 7;
|
|
16531
16615
|
return effects.put(updateChannelDataAC(channel.id, {
|
|
16532
16616
|
lastMessage: null,
|
|
16533
16617
|
newMessageCount: 0,
|
|
@@ -16540,182 +16624,185 @@ function deleteAllMessages(action) {
|
|
|
16540
16624
|
newMentionCount: 0
|
|
16541
16625
|
});
|
|
16542
16626
|
groupName = getChannelGroupName(channel);
|
|
16543
|
-
|
|
16627
|
+
_context26.n = 8;
|
|
16544
16628
|
return effects.put(updateSearchedChannelDataAC(channel.id, {
|
|
16545
16629
|
lastMessage: null,
|
|
16546
16630
|
newMessageCount: 0,
|
|
16547
16631
|
newMentionCount: 0
|
|
16548
16632
|
}, groupName));
|
|
16549
16633
|
case 8:
|
|
16550
|
-
|
|
16634
|
+
_context26.n = 10;
|
|
16551
16635
|
break;
|
|
16552
16636
|
case 9:
|
|
16553
|
-
|
|
16554
|
-
|
|
16555
|
-
log.error('ERROR in clear history',
|
|
16637
|
+
_context26.p = 9;
|
|
16638
|
+
_t27 = _context26.v;
|
|
16639
|
+
log.error('ERROR in clear history', _t27);
|
|
16556
16640
|
case 10:
|
|
16557
|
-
return
|
|
16641
|
+
return _context26.a(2);
|
|
16558
16642
|
}
|
|
16559
|
-
},
|
|
16643
|
+
}, _marked26, null, [[0, 9]]);
|
|
16560
16644
|
}
|
|
16561
16645
|
function joinChannel(action) {
|
|
16562
|
-
var payload, channelId, _SceytChatClient8, channel, joinedChannel,
|
|
16563
|
-
return _regenerator().w(function (
|
|
16564
|
-
while (1) switch (
|
|
16646
|
+
var payload, channelId, _SceytChatClient8, channel, joinedChannel, _t28;
|
|
16647
|
+
return _regenerator().w(function (_context27) {
|
|
16648
|
+
while (1) switch (_context27.p = _context27.n) {
|
|
16565
16649
|
case 0:
|
|
16566
|
-
|
|
16650
|
+
_context27.p = 0;
|
|
16567
16651
|
payload = action.payload;
|
|
16568
16652
|
channelId = payload.channelId;
|
|
16569
16653
|
_SceytChatClient8 = getClient();
|
|
16570
|
-
|
|
16654
|
+
_context27.n = 1;
|
|
16571
16655
|
return effects.call(getChannelFromMap, channelId);
|
|
16572
16656
|
case 1:
|
|
16573
|
-
channel =
|
|
16657
|
+
channel = _context27.v;
|
|
16574
16658
|
if (!channel) {
|
|
16575
16659
|
channel = getChannelFromAllChannels(channelId);
|
|
16576
16660
|
}
|
|
16577
16661
|
if (channel) {
|
|
16578
|
-
|
|
16662
|
+
_context27.n = 3;
|
|
16579
16663
|
break;
|
|
16580
16664
|
}
|
|
16581
|
-
|
|
16665
|
+
_context27.n = 2;
|
|
16582
16666
|
return effects.call(_SceytChatClient8.getChannel, channelId);
|
|
16583
16667
|
case 2:
|
|
16584
|
-
channel =
|
|
16668
|
+
channel = _context27.v;
|
|
16585
16669
|
case 3:
|
|
16586
|
-
|
|
16670
|
+
_context27.n = 4;
|
|
16587
16671
|
return effects.call(channel.join);
|
|
16588
16672
|
case 4:
|
|
16589
|
-
joinedChannel =
|
|
16590
|
-
|
|
16673
|
+
joinedChannel = _context27.v;
|
|
16674
|
+
_context27.n = 5;
|
|
16591
16675
|
return effects.put(setCloseSearchChannelsAC(true));
|
|
16592
16676
|
case 5:
|
|
16593
|
-
|
|
16677
|
+
_context27.n = 6;
|
|
16594
16678
|
return effects.put(setChannelToAddAC(JSON.parse(JSON.stringify(joinedChannel))));
|
|
16595
16679
|
case 6:
|
|
16596
|
-
|
|
16680
|
+
_context27.n = 7;
|
|
16597
16681
|
return effects.put(switchChannelActionAC(JSON.parse(JSON.stringify(joinedChannel))));
|
|
16598
16682
|
case 7:
|
|
16599
16683
|
addChannelToAllChannels(joinedChannel);
|
|
16600
|
-
|
|
16684
|
+
_context27.n = 8;
|
|
16601
16685
|
return effects.call(setActiveChannelId, joinedChannel.id);
|
|
16602
16686
|
case 8:
|
|
16603
|
-
|
|
16687
|
+
_context27.n = 10;
|
|
16604
16688
|
break;
|
|
16605
16689
|
case 9:
|
|
16606
|
-
|
|
16607
|
-
|
|
16608
|
-
log.error(
|
|
16690
|
+
_context27.p = 9;
|
|
16691
|
+
_t28 = _context27.v;
|
|
16692
|
+
log.error(_t28, 'Error in join to channel');
|
|
16609
16693
|
case 10:
|
|
16610
|
-
return
|
|
16694
|
+
return _context27.a(2);
|
|
16611
16695
|
}
|
|
16612
|
-
},
|
|
16696
|
+
}, _marked27, null, [[0, 9]]);
|
|
16613
16697
|
}
|
|
16614
16698
|
function watchForChannelEvents() {
|
|
16615
|
-
return _regenerator().w(function (
|
|
16616
|
-
while (1) switch (
|
|
16699
|
+
return _regenerator().w(function (_context28) {
|
|
16700
|
+
while (1) switch (_context28.n) {
|
|
16617
16701
|
case 0:
|
|
16618
|
-
|
|
16702
|
+
_context28.n = 1;
|
|
16619
16703
|
return effects.call(watchForEvents);
|
|
16620
16704
|
case 1:
|
|
16621
|
-
return
|
|
16705
|
+
return _context28.a(2);
|
|
16622
16706
|
}
|
|
16623
|
-
},
|
|
16707
|
+
}, _marked28);
|
|
16624
16708
|
}
|
|
16625
16709
|
function ChannelsSaga() {
|
|
16626
|
-
return _regenerator().w(function (
|
|
16627
|
-
while (1) switch (
|
|
16710
|
+
return _regenerator().w(function (_context29) {
|
|
16711
|
+
while (1) switch (_context29.n) {
|
|
16628
16712
|
case 0:
|
|
16629
|
-
|
|
16713
|
+
_context29.n = 1;
|
|
16630
16714
|
return effects.takeLatest(CREATE_CHANNEL, createChannel);
|
|
16631
16715
|
case 1:
|
|
16632
|
-
|
|
16716
|
+
_context29.n = 2;
|
|
16633
16717
|
return effects.takeLatest(GET_CHANNELS, getChannels);
|
|
16634
16718
|
case 2:
|
|
16635
|
-
|
|
16719
|
+
_context29.n = 3;
|
|
16636
16720
|
return effects.takeLatest(SEARCH_CHANNELS, searchChannels);
|
|
16637
16721
|
case 3:
|
|
16638
|
-
|
|
16722
|
+
_context29.n = 4;
|
|
16639
16723
|
return effects.takeLatest(GET_CHANNELS_FOR_FORWARD, getChannelsForForward);
|
|
16640
16724
|
case 4:
|
|
16641
|
-
|
|
16725
|
+
_context29.n = 5;
|
|
16642
16726
|
return effects.takeLatest(SEARCH_CHANNELS_FOR_FORWARD, searchChannelsForForward);
|
|
16643
16727
|
case 5:
|
|
16644
|
-
|
|
16728
|
+
_context29.n = 6;
|
|
16645
16729
|
return effects.takeLatest(LOAD_MORE_CHANNEL, channelsLoadMore);
|
|
16646
16730
|
case 6:
|
|
16647
|
-
|
|
16731
|
+
_context29.n = 7;
|
|
16648
16732
|
return effects.takeLatest(LOAD_MORE_CHANNELS_FOR_FORWARD, channelsForForwardLoadMore);
|
|
16649
16733
|
case 7:
|
|
16650
|
-
|
|
16734
|
+
_context29.n = 8;
|
|
16651
16735
|
return effects.takeEvery(SWITCH_CHANNEL, switchChannel);
|
|
16652
16736
|
case 8:
|
|
16653
|
-
|
|
16737
|
+
_context29.n = 9;
|
|
16654
16738
|
return effects.takeLatest(LEAVE_CHANNEL, leaveChannel);
|
|
16655
16739
|
case 9:
|
|
16656
|
-
|
|
16740
|
+
_context29.n = 10;
|
|
16657
16741
|
return effects.takeLatest(DELETE_CHANNEL, deleteChannel);
|
|
16658
16742
|
case 10:
|
|
16659
|
-
|
|
16743
|
+
_context29.n = 11;
|
|
16660
16744
|
return effects.takeLatest(BLOCK_CHANNEL, blockChannel);
|
|
16661
16745
|
case 11:
|
|
16662
|
-
|
|
16746
|
+
_context29.n = 12;
|
|
16663
16747
|
return effects.takeLatest(UPDATE_CHANNEL, updateChannel);
|
|
16664
16748
|
case 12:
|
|
16665
|
-
|
|
16749
|
+
_context29.n = 13;
|
|
16666
16750
|
return effects.takeEvery(MARK_MESSAGES_AS_READ, markMessagesRead);
|
|
16667
16751
|
case 13:
|
|
16668
|
-
|
|
16752
|
+
_context29.n = 14;
|
|
16669
16753
|
return effects.takeLatest(MARK_MESSAGES_AS_DELIVERED, markMessagesDelivered);
|
|
16670
16754
|
case 14:
|
|
16671
|
-
|
|
16672
|
-
return effects.takeLatest(
|
|
16755
|
+
_context29.n = 15;
|
|
16756
|
+
return effects.takeLatest(MARK_VOICE_MESSAGE_AS_PLAYED, markVoiceMessageAsPlayed);
|
|
16673
16757
|
case 15:
|
|
16674
|
-
|
|
16675
|
-
return effects.takeLatest(
|
|
16758
|
+
_context29.n = 16;
|
|
16759
|
+
return effects.takeLatest(WATCH_FOR_EVENTS, watchForChannelEvents);
|
|
16676
16760
|
case 16:
|
|
16677
|
-
|
|
16678
|
-
return effects.takeLatest(
|
|
16761
|
+
_context29.n = 17;
|
|
16762
|
+
return effects.takeLatest(TURN_OFF_NOTIFICATION, notificationsTurnOff);
|
|
16679
16763
|
case 17:
|
|
16680
|
-
|
|
16681
|
-
return effects.takeLatest(
|
|
16764
|
+
_context29.n = 18;
|
|
16765
|
+
return effects.takeLatest(TURN_ON_NOTIFICATION, notificationsTurnOn);
|
|
16682
16766
|
case 18:
|
|
16683
|
-
|
|
16684
|
-
return effects.takeLatest(
|
|
16767
|
+
_context29.n = 19;
|
|
16768
|
+
return effects.takeLatest(MARK_CHANNEL_AS_READ, markChannelAsRead);
|
|
16685
16769
|
case 19:
|
|
16686
|
-
|
|
16687
|
-
return effects.takeLatest(
|
|
16770
|
+
_context29.n = 20;
|
|
16771
|
+
return effects.takeLatest(MARK_CHANNEL_AS_UNREAD, markChannelAsUnRead);
|
|
16688
16772
|
case 20:
|
|
16689
|
-
|
|
16690
|
-
return effects.takeLatest(
|
|
16773
|
+
_context29.n = 21;
|
|
16774
|
+
return effects.takeLatest(CHECK_USER_STATUS, checkUsersStatus);
|
|
16691
16775
|
case 21:
|
|
16692
|
-
|
|
16693
|
-
return effects.takeLatest(
|
|
16776
|
+
_context29.n = 22;
|
|
16777
|
+
return effects.takeLatest(SEND_TYPING, sendTyping);
|
|
16694
16778
|
case 22:
|
|
16695
|
-
|
|
16696
|
-
return effects.takeLatest(
|
|
16779
|
+
_context29.n = 23;
|
|
16780
|
+
return effects.takeLatest(SEND_RECORDING, sendRecording);
|
|
16697
16781
|
case 23:
|
|
16698
|
-
|
|
16699
|
-
return effects.takeLatest(
|
|
16782
|
+
_context29.n = 24;
|
|
16783
|
+
return effects.takeLatest(PIN_CHANNEL, pinChannel);
|
|
16700
16784
|
case 24:
|
|
16701
|
-
|
|
16702
|
-
return effects.takeLatest(
|
|
16785
|
+
_context29.n = 25;
|
|
16786
|
+
return effects.takeLatest(UNPIN_CHANNEL, unpinChannel);
|
|
16703
16787
|
case 25:
|
|
16704
|
-
|
|
16705
|
-
return effects.takeLatest(
|
|
16788
|
+
_context29.n = 26;
|
|
16789
|
+
return effects.takeLatest(CLEAR_HISTORY, clearHistory);
|
|
16706
16790
|
case 26:
|
|
16707
|
-
|
|
16708
|
-
return effects.takeLatest(
|
|
16791
|
+
_context29.n = 27;
|
|
16792
|
+
return effects.takeLatest(JOIN_TO_CHANNEL, joinChannel);
|
|
16709
16793
|
case 27:
|
|
16710
|
-
|
|
16711
|
-
return effects.takeLatest(
|
|
16794
|
+
_context29.n = 28;
|
|
16795
|
+
return effects.takeLatest(DELETE_ALL_MESSAGES, deleteAllMessages);
|
|
16712
16796
|
case 28:
|
|
16713
|
-
|
|
16714
|
-
return effects.takeLatest(
|
|
16797
|
+
_context29.n = 29;
|
|
16798
|
+
return effects.takeLatest(REMOVE_CHANNEL_CACHES, removeChannelCaches);
|
|
16715
16799
|
case 29:
|
|
16716
|
-
|
|
16800
|
+
_context29.n = 30;
|
|
16801
|
+
return effects.takeLatest(GET_CHANNEL_MENTIONS, getChannelMentions);
|
|
16802
|
+
case 30:
|
|
16803
|
+
return _context29.a(2);
|
|
16717
16804
|
}
|
|
16718
|
-
},
|
|
16805
|
+
}, _marked29);
|
|
16719
16806
|
}
|
|
16720
16807
|
|
|
16721
16808
|
function rgbaToThumbHash(w, h, rgba) {
|
|
@@ -17135,6 +17222,15 @@ var playingAudioIdSelector = function playingAudioIdSelector(store) {
|
|
|
17135
17222
|
var selectedMessagesMapSelector = function selectedMessagesMapSelector(store) {
|
|
17136
17223
|
return store.MessageReducer.selectedMessagesMap;
|
|
17137
17224
|
};
|
|
17225
|
+
var attachmentUpdatedMapSelector = function attachmentUpdatedMapSelector(store) {
|
|
17226
|
+
return store.MessageReducer.attachmentUpdatedMap;
|
|
17227
|
+
};
|
|
17228
|
+
var messageMarkersSelector = function messageMarkersSelector(store) {
|
|
17229
|
+
return store.MessageReducer.messageMarkers;
|
|
17230
|
+
};
|
|
17231
|
+
var messagesMarkersLoadingStateSelector = function messagesMarkersLoadingStateSelector(store) {
|
|
17232
|
+
return store.MessageReducer.messagesMarkersLoadingState;
|
|
17233
|
+
};
|
|
17138
17234
|
|
|
17139
17235
|
var getFrame = function getFrame(videoSrc, time) {
|
|
17140
17236
|
try {
|
|
@@ -17205,7 +17301,8 @@ var _marked$3 = /*#__PURE__*/_regenerator().m(sendMessage),
|
|
|
17205
17301
|
_marked13$1 = /*#__PURE__*/_regenerator().m(loadMoreMessageAttachments),
|
|
17206
17302
|
_marked14$1 = /*#__PURE__*/_regenerator().m(pauseAttachmentUploading),
|
|
17207
17303
|
_marked15$1 = /*#__PURE__*/_regenerator().m(resumeAttachmentUploading),
|
|
17208
|
-
_marked16$1 = /*#__PURE__*/_regenerator().m(
|
|
17304
|
+
_marked16$1 = /*#__PURE__*/_regenerator().m(getMessageMarkers),
|
|
17305
|
+
_marked17$1 = /*#__PURE__*/_regenerator().m(MessageSaga);
|
|
17209
17306
|
var handleUploadAttachments = function handleUploadAttachments(attachments, message, channel) {
|
|
17210
17307
|
try {
|
|
17211
17308
|
return Promise.resolve(Promise.all(attachments.map(function (attachment) {
|
|
@@ -17291,7 +17388,7 @@ var addPendingMessage = function addPendingMessage(message, messageCopy, channel
|
|
|
17291
17388
|
try {
|
|
17292
17389
|
var messageToAdd = JSON.parse(JSON.stringify(_extends({}, messageCopy, {
|
|
17293
17390
|
createdAt: new Date(Date.now()),
|
|
17294
|
-
mentionedUsers: message.
|
|
17391
|
+
mentionedUsers: message.mentionedUsers,
|
|
17295
17392
|
parentMessage: message.parentMessage
|
|
17296
17393
|
})));
|
|
17297
17394
|
addMessageToMap(channel.id, messageToAdd);
|
|
@@ -17349,7 +17446,7 @@ function sendMessage(action) {
|
|
|
17349
17446
|
_context3.n = 7;
|
|
17350
17447
|
return effects.put(addChannelAC(JSON.parse(JSON.stringify(channel))));
|
|
17351
17448
|
case 7:
|
|
17352
|
-
mentionedUserIds = message.
|
|
17449
|
+
mentionedUserIds = message.mentionedUsers ? message.mentionedUsers.map(function (member) {
|
|
17353
17450
|
return member.id;
|
|
17354
17451
|
}) : [];
|
|
17355
17452
|
customUploader = getCustomUploader();
|
|
@@ -17730,7 +17827,7 @@ function sendTextMessage(action) {
|
|
|
17730
17827
|
_context4.n = 7;
|
|
17731
17828
|
return effects.put(addChannelAC(JSON.parse(JSON.stringify(channel))));
|
|
17732
17829
|
case 7:
|
|
17733
|
-
mentionedUserIds = message.
|
|
17830
|
+
mentionedUserIds = message.mentionedUsers ? message.mentionedUsers.map(function (member) {
|
|
17734
17831
|
return member.id;
|
|
17735
17832
|
}) : [];
|
|
17736
17833
|
attachments = message.attachments;
|
|
@@ -17750,7 +17847,7 @@ function sendTextMessage(action) {
|
|
|
17750
17847
|
messageToSend = messageBuilder.create();
|
|
17751
17848
|
pendingMessage = JSON.parse(JSON.stringify(_extends({}, messageToSend, {
|
|
17752
17849
|
createdAt: new Date(Date.now()),
|
|
17753
|
-
mentionedUsers: message.
|
|
17850
|
+
mentionedUsers: message.mentionedUsers,
|
|
17754
17851
|
parentMessage: message.parentMessage
|
|
17755
17852
|
})));
|
|
17756
17853
|
sendMessageTid = messageToSend.tid;
|
|
@@ -17836,16 +17933,14 @@ function sendTextMessage(action) {
|
|
|
17836
17933
|
case 16:
|
|
17837
17934
|
throw new Error('Connection required to send message');
|
|
17838
17935
|
case 17:
|
|
17936
|
+
store.dispatch(getMessagesAC(channel, true, channel.lastMessage.id, undefined, undefined, false));
|
|
17839
17937
|
_context4.n = 18;
|
|
17840
|
-
return effects.put(scrollToNewMessageAC(true));
|
|
17841
|
-
case 18:
|
|
17842
|
-
_context4.n = 19;
|
|
17843
17938
|
return effects.put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
17844
|
-
case
|
|
17845
|
-
_context4.n =
|
|
17939
|
+
case 18:
|
|
17940
|
+
_context4.n = 21;
|
|
17846
17941
|
break;
|
|
17847
|
-
case
|
|
17848
|
-
_context4.p =
|
|
17942
|
+
case 19:
|
|
17943
|
+
_context4.p = 19;
|
|
17849
17944
|
_t3 = _context4.v;
|
|
17850
17945
|
log.error('error on send text message ... ', _t3);
|
|
17851
17946
|
updateMessageOnMap(channel.id, {
|
|
@@ -17855,23 +17950,23 @@ function sendTextMessage(action) {
|
|
|
17855
17950
|
}
|
|
17856
17951
|
});
|
|
17857
17952
|
if (!(activeChannelId === channel.id)) {
|
|
17858
|
-
_context4.n =
|
|
17953
|
+
_context4.n = 20;
|
|
17859
17954
|
break;
|
|
17860
17955
|
}
|
|
17861
17956
|
updateMessageOnAllMessages(sendMessageTid, {
|
|
17862
17957
|
state: MESSAGE_STATUS.FAILED
|
|
17863
17958
|
});
|
|
17864
|
-
_context4.n =
|
|
17959
|
+
_context4.n = 20;
|
|
17865
17960
|
return effects.put(updateMessageAC(sendMessageTid, {
|
|
17866
17961
|
state: MESSAGE_STATUS.FAILED
|
|
17867
17962
|
}));
|
|
17868
|
-
case
|
|
17869
|
-
_context4.n =
|
|
17963
|
+
case 20:
|
|
17964
|
+
_context4.n = 21;
|
|
17870
17965
|
return effects.put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
17871
|
-
case
|
|
17966
|
+
case 21:
|
|
17872
17967
|
return _context4.a(2);
|
|
17873
17968
|
}
|
|
17874
|
-
}, _marked2$2, null, [[3,
|
|
17969
|
+
}, _marked2$2, null, [[3, 19]]);
|
|
17875
17970
|
}
|
|
17876
17971
|
function forwardMessage(action) {
|
|
17877
17972
|
var payload, message, channelId, connectionState, channel, SceytChatClient, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, messageToSend, pendingMessage, activeChannelId, isCachedChannel, hasNextMessages, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam, _t4;
|
|
@@ -17910,7 +18005,7 @@ function forwardMessage(action) {
|
|
|
17910
18005
|
_context5.n = 6;
|
|
17911
18006
|
return effects.put(addChannelAC(JSON.parse(JSON.stringify(channel))));
|
|
17912
18007
|
case 6:
|
|
17913
|
-
mentionedUserIds = message.
|
|
18008
|
+
mentionedUserIds = message.mentionedUsers ? message.mentionedUsers.map(function (member) {
|
|
17914
18009
|
return member.id;
|
|
17915
18010
|
}) : [];
|
|
17916
18011
|
attachments = message.attachments;
|
|
@@ -17924,7 +18019,7 @@ function forwardMessage(action) {
|
|
|
17924
18019
|
attachments = [att];
|
|
17925
18020
|
}
|
|
17926
18021
|
messageBuilder = channel.createMessageBuilder();
|
|
17927
|
-
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);
|
|
18022
|
+
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);
|
|
17928
18023
|
messageToSend = messageBuilder.create();
|
|
17929
18024
|
pendingMessage = JSON.parse(JSON.stringify(_extends({}, messageToSend, {
|
|
17930
18025
|
createdAt: new Date(Date.now())
|
|
@@ -19418,64 +19513,112 @@ function resumeAttachmentUploading(action) {
|
|
|
19418
19513
|
}
|
|
19419
19514
|
}, _marked15$1, null, [[0, 2]]);
|
|
19420
19515
|
}
|
|
19421
|
-
function
|
|
19516
|
+
function getMessageMarkers(action) {
|
|
19517
|
+
var _action$payload4, messageId, channelId, deliveryStatus, sceytChatClient, messageMarkerListQueryBuilder, messageMarkerListQuery, messageMarkers, _t18;
|
|
19422
19518
|
return _regenerator().w(function (_context18) {
|
|
19423
|
-
while (1) switch (_context18.n) {
|
|
19519
|
+
while (1) switch (_context18.p = _context18.n) {
|
|
19424
19520
|
case 0:
|
|
19521
|
+
_context18.p = 0;
|
|
19425
19522
|
_context18.n = 1;
|
|
19426
|
-
return effects.
|
|
19523
|
+
return effects.put(setMessagesMarkersLoadingStateAC(LOADING_STATE.LOADING));
|
|
19427
19524
|
case 1:
|
|
19525
|
+
_action$payload4 = action.payload, messageId = _action$payload4.messageId, channelId = _action$payload4.channelId, deliveryStatus = _action$payload4.deliveryStatus;
|
|
19526
|
+
sceytChatClient = getClient();
|
|
19527
|
+
if (!sceytChatClient) {
|
|
19528
|
+
_context18.n = 4;
|
|
19529
|
+
break;
|
|
19530
|
+
}
|
|
19531
|
+
messageMarkerListQueryBuilder = new sceytChatClient.MessageMarkerListQueryBuilder(channelId, String(messageId), deliveryStatus);
|
|
19428
19532
|
_context18.n = 2;
|
|
19429
|
-
return effects.
|
|
19533
|
+
return effects.call(messageMarkerListQueryBuilder.build);
|
|
19430
19534
|
case 2:
|
|
19535
|
+
messageMarkerListQuery = _context18.v;
|
|
19431
19536
|
_context18.n = 3;
|
|
19432
|
-
return effects.
|
|
19537
|
+
return effects.call(messageMarkerListQuery.loadNext);
|
|
19433
19538
|
case 3:
|
|
19539
|
+
messageMarkers = _context18.v;
|
|
19540
|
+
console.log('messageMarkers', messageMarkers);
|
|
19434
19541
|
_context18.n = 4;
|
|
19542
|
+
return effects.put(setMessageMarkersAC(channelId, messageId, messageMarkers.markers, deliveryStatus));
|
|
19543
|
+
case 4:
|
|
19544
|
+
_context18.n = 6;
|
|
19545
|
+
break;
|
|
19546
|
+
case 5:
|
|
19547
|
+
_context18.p = 5;
|
|
19548
|
+
_t18 = _context18.v;
|
|
19549
|
+
log.error('error in get message markers', _t18);
|
|
19550
|
+
case 6:
|
|
19551
|
+
_context18.p = 6;
|
|
19552
|
+
_context18.n = 7;
|
|
19553
|
+
return effects.put(setMessagesMarkersLoadingStateAC(LOADING_STATE.LOADED));
|
|
19554
|
+
case 7:
|
|
19555
|
+
return _context18.f(6);
|
|
19556
|
+
case 8:
|
|
19557
|
+
return _context18.a(2);
|
|
19558
|
+
}
|
|
19559
|
+
}, _marked16$1, null, [[0, 5, 6, 8]]);
|
|
19560
|
+
}
|
|
19561
|
+
function MessageSaga() {
|
|
19562
|
+
return _regenerator().w(function (_context19) {
|
|
19563
|
+
while (1) switch (_context19.n) {
|
|
19564
|
+
case 0:
|
|
19565
|
+
_context19.n = 1;
|
|
19566
|
+
return effects.takeEvery(SEND_MESSAGE, sendMessage);
|
|
19567
|
+
case 1:
|
|
19568
|
+
_context19.n = 2;
|
|
19569
|
+
return effects.takeEvery(SEND_TEXT_MESSAGE, sendTextMessage);
|
|
19570
|
+
case 2:
|
|
19571
|
+
_context19.n = 3;
|
|
19572
|
+
return effects.takeEvery(FORWARD_MESSAGE, forwardMessage);
|
|
19573
|
+
case 3:
|
|
19574
|
+
_context19.n = 4;
|
|
19435
19575
|
return effects.takeEvery(RESEND_MESSAGE, resendMessage);
|
|
19436
19576
|
case 4:
|
|
19437
|
-
|
|
19577
|
+
_context19.n = 5;
|
|
19438
19578
|
return effects.takeLatest(EDIT_MESSAGE, editMessage);
|
|
19439
19579
|
case 5:
|
|
19440
|
-
|
|
19580
|
+
_context19.n = 6;
|
|
19441
19581
|
return effects.takeEvery(DELETE_MESSAGE, deleteMessage);
|
|
19442
19582
|
case 6:
|
|
19443
|
-
|
|
19583
|
+
_context19.n = 7;
|
|
19444
19584
|
return effects.takeLatest(GET_MESSAGES, getMessagesQuery);
|
|
19445
19585
|
case 7:
|
|
19446
|
-
|
|
19586
|
+
_context19.n = 8;
|
|
19447
19587
|
return effects.takeEvery(GET_MESSAGE, getMessageQuery);
|
|
19448
19588
|
case 8:
|
|
19449
|
-
|
|
19450
|
-
return effects.takeLatest(
|
|
19589
|
+
_context19.n = 9;
|
|
19590
|
+
return effects.takeLatest(GET_MESSAGE_MARKERS, getMessageMarkers);
|
|
19451
19591
|
case 9:
|
|
19452
|
-
|
|
19453
|
-
return effects.takeLatest(
|
|
19592
|
+
_context19.n = 10;
|
|
19593
|
+
return effects.takeLatest(GET_MESSAGES_ATTACHMENTS, getMessageAttachments);
|
|
19454
19594
|
case 10:
|
|
19455
|
-
|
|
19456
|
-
return effects.takeLatest(
|
|
19595
|
+
_context19.n = 11;
|
|
19596
|
+
return effects.takeLatest(LOAD_MORE_MESSAGES_ATTACHMENTS, loadMoreMessageAttachments);
|
|
19457
19597
|
case 11:
|
|
19458
|
-
|
|
19459
|
-
return effects.takeLatest(
|
|
19598
|
+
_context19.n = 12;
|
|
19599
|
+
return effects.takeLatest(ADD_REACTION, addReaction);
|
|
19460
19600
|
case 12:
|
|
19461
|
-
|
|
19462
|
-
return effects.
|
|
19601
|
+
_context19.n = 13;
|
|
19602
|
+
return effects.takeLatest(DELETE_REACTION, deleteReaction);
|
|
19463
19603
|
case 13:
|
|
19464
|
-
|
|
19465
|
-
return effects.takeEvery(
|
|
19604
|
+
_context19.n = 14;
|
|
19605
|
+
return effects.takeEvery(LOAD_MORE_MESSAGES, loadMoreMessages);
|
|
19466
19606
|
case 14:
|
|
19467
|
-
|
|
19468
|
-
return effects.takeEvery(
|
|
19607
|
+
_context19.n = 15;
|
|
19608
|
+
return effects.takeEvery(GET_REACTIONS, getReactions);
|
|
19469
19609
|
case 15:
|
|
19470
|
-
|
|
19471
|
-
return effects.takeEvery(
|
|
19610
|
+
_context19.n = 16;
|
|
19611
|
+
return effects.takeEvery(LOAD_MORE_REACTIONS, loadMoreReactions);
|
|
19472
19612
|
case 16:
|
|
19473
|
-
|
|
19474
|
-
return effects.takeEvery(
|
|
19613
|
+
_context19.n = 17;
|
|
19614
|
+
return effects.takeEvery(PAUSE_ATTACHMENT_UPLOADING, pauseAttachmentUploading);
|
|
19475
19615
|
case 17:
|
|
19476
|
-
|
|
19616
|
+
_context19.n = 18;
|
|
19617
|
+
return effects.takeEvery(RESUME_ATTACHMENT_UPLOADING, resumeAttachmentUploading);
|
|
19618
|
+
case 18:
|
|
19619
|
+
return _context19.a(2);
|
|
19477
19620
|
}
|
|
19478
|
-
},
|
|
19621
|
+
}, _marked17$1);
|
|
19479
19622
|
}
|
|
19480
19623
|
|
|
19481
19624
|
var _marked$4 = /*#__PURE__*/_regenerator().m(getMembers),
|
|
@@ -19614,7 +19757,7 @@ function addMembers(action) {
|
|
|
19614
19757
|
m: membersIds
|
|
19615
19758
|
},
|
|
19616
19759
|
body: 'AM',
|
|
19617
|
-
|
|
19760
|
+
mentionedUsers: addedMembers,
|
|
19618
19761
|
attachments: [],
|
|
19619
19762
|
type: 'system'
|
|
19620
19763
|
};
|
|
@@ -19676,7 +19819,7 @@ function kickMemberFromChannel(action) {
|
|
|
19676
19819
|
m: membersIds
|
|
19677
19820
|
},
|
|
19678
19821
|
body: 'RM',
|
|
19679
|
-
|
|
19822
|
+
mentionedUsers: removedMembers,
|
|
19680
19823
|
attachments: [],
|
|
19681
19824
|
type: 'system'
|
|
19682
19825
|
};
|
|
@@ -20476,7 +20619,9 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
20476
20619
|
openChatOnUserInteraction = _ref$openChatOnUserIn === void 0 ? true : _ref$openChatOnUserIn,
|
|
20477
20620
|
_ref$autoSelectFirstC = _ref.autoSelectFirstChannel,
|
|
20478
20621
|
autoSelectFirstChannel = _ref$autoSelectFirstC === void 0 ? false : _ref$autoSelectFirstC,
|
|
20479
|
-
memberCount = _ref.memberCount
|
|
20622
|
+
memberCount = _ref.memberCount,
|
|
20623
|
+
_ref$disableFrowardMe = _ref.disableFrowardMentionsCount,
|
|
20624
|
+
disableFrowardMentionsCount = _ref$disableFrowardMe === void 0 ? false : _ref$disableFrowardMe;
|
|
20480
20625
|
var _useColor = useColors(),
|
|
20481
20626
|
backgroundColor = _useColor[THEME_COLORS.BACKGROUND],
|
|
20482
20627
|
highlightedBackground = _useColor[THEME_COLORS.HIGHLIGHTED_BACKGROUND];
|
|
@@ -20681,6 +20826,9 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
20681
20826
|
React.useEffect(function () {
|
|
20682
20827
|
setChannelMembersCount(memberCount || 0);
|
|
20683
20828
|
}, [memberCount]);
|
|
20829
|
+
React.useEffect(function () {
|
|
20830
|
+
setDisableFrowardMentionsCount(disableFrowardMentionsCount);
|
|
20831
|
+
}, [disableFrowardMentionsCount]);
|
|
20684
20832
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, SceytChatClient ? (/*#__PURE__*/React__default.createElement(ChatContainer, {
|
|
20685
20833
|
onDrop: handleDropFile,
|
|
20686
20834
|
onDragOver: handleDragOver,
|
|
@@ -20727,7 +20875,8 @@ var SceytChatContainer = function SceytChatContainer(_ref) {
|
|
|
20727
20875
|
autoSelectFirstChannel = _ref.autoSelectFirstChannel,
|
|
20728
20876
|
_ref$logLevel = _ref.logLevel,
|
|
20729
20877
|
logLevel = _ref$logLevel === void 0 ? 'silent' : _ref$logLevel,
|
|
20730
|
-
memberCount = _ref.memberCount
|
|
20878
|
+
memberCount = _ref.memberCount,
|
|
20879
|
+
disableFrowardMentionsCount = _ref.disableFrowardMentionsCount;
|
|
20731
20880
|
React.useEffect(function () {
|
|
20732
20881
|
log.setLevel(logLevel);
|
|
20733
20882
|
}, []);
|
|
@@ -20752,7 +20901,8 @@ var SceytChatContainer = function SceytChatContainer(_ref) {
|
|
|
20752
20901
|
openChatOnUserInteraction: openChatOnUserInteraction,
|
|
20753
20902
|
autoSelectFirstChannel: autoSelectFirstChannel,
|
|
20754
20903
|
channelTypeFilter: channelTypeFilter,
|
|
20755
|
-
memberCount: memberCount
|
|
20904
|
+
memberCount: memberCount,
|
|
20905
|
+
disableFrowardMentionsCount: disableFrowardMentionsCount
|
|
20756
20906
|
}));
|
|
20757
20907
|
};
|
|
20758
20908
|
|
|
@@ -21374,7 +21524,7 @@ var Channel = function Channel(_ref3) {
|
|
|
21374
21524
|
if (channelDraftMessage) {
|
|
21375
21525
|
setDraftMessageText(channelDraftMessage.text);
|
|
21376
21526
|
setDraftMessage({
|
|
21377
|
-
mentionedUsers: channelDraftMessage.
|
|
21527
|
+
mentionedUsers: channelDraftMessage.mentionedUsers,
|
|
21378
21528
|
body: channelDraftMessage.text,
|
|
21379
21529
|
bodyAttributes: channelDraftMessage.bodyAttributes
|
|
21380
21530
|
});
|
|
@@ -26401,21 +26551,15 @@ function ReactionsPopup(_ref) {
|
|
|
26401
26551
|
var _useState = React.useState('all'),
|
|
26402
26552
|
activeTabKey = _useState[0],
|
|
26403
26553
|
setActiveTabKey = _useState[1];
|
|
26404
|
-
var _useState2 = React.useState(
|
|
26405
|
-
|
|
26406
|
-
|
|
26407
|
-
var _useState3 = React.useState(
|
|
26408
|
-
|
|
26409
|
-
|
|
26410
|
-
var _useState4 = React.useState(
|
|
26411
|
-
|
|
26412
|
-
|
|
26413
|
-
var _useState5 = React.useState(false),
|
|
26414
|
-
calculateSizes = _useState5[0],
|
|
26415
|
-
setCalculateSizes = _useState5[1];
|
|
26416
|
-
var _useState6 = React.useState(false),
|
|
26417
|
-
closeIsApproved = _useState6[0],
|
|
26418
|
-
setCloseIsApproved = _useState6[1];
|
|
26554
|
+
var _useState2 = React.useState(0),
|
|
26555
|
+
popupHeight = _useState2[0],
|
|
26556
|
+
setPopupHeight = _useState2[1];
|
|
26557
|
+
var _useState3 = React.useState(false),
|
|
26558
|
+
calculateSizes = _useState3[0],
|
|
26559
|
+
setCalculateSizes = _useState3[1];
|
|
26560
|
+
var _useState4 = React.useState(false),
|
|
26561
|
+
closeIsApproved = _useState4[0],
|
|
26562
|
+
setCloseIsApproved = _useState4[1];
|
|
26419
26563
|
var totalReactions = 0;
|
|
26420
26564
|
if (reactionTotals) {
|
|
26421
26565
|
reactionTotals.forEach(function (summery) {
|
|
@@ -26424,9 +26568,9 @@ function ReactionsPopup(_ref) {
|
|
|
26424
26568
|
}
|
|
26425
26569
|
var user = getClient().user;
|
|
26426
26570
|
var dispatch = useDispatch();
|
|
26427
|
-
var
|
|
26428
|
-
isScrolling =
|
|
26429
|
-
setIsScrolling =
|
|
26571
|
+
var _useState5 = React.useState(false),
|
|
26572
|
+
isScrolling = _useState5[0],
|
|
26573
|
+
setIsScrolling = _useState5[1];
|
|
26430
26574
|
var handleReactionsListScroll = function handleReactionsListScroll(event) {
|
|
26431
26575
|
if (event.target.scrollTop >= event.target.scrollHeight - event.target.offsetHeight - 100 && reactionsHasNext) {
|
|
26432
26576
|
if (reactionsLoadingState === LOADING_STATE.LOADED) {
|
|
@@ -26455,20 +26599,23 @@ function ReactionsPopup(_ref) {
|
|
|
26455
26599
|
dispatch(setReactionsListAC([], true));
|
|
26456
26600
|
};
|
|
26457
26601
|
}, [messageId]);
|
|
26458
|
-
React.
|
|
26602
|
+
var scoresHeight = React.useMemo(function () {
|
|
26459
26603
|
var scoresElem = scoresRef.current;
|
|
26460
26604
|
if (scoresElem) {
|
|
26461
|
-
|
|
26605
|
+
return scoresElem.offsetHeight;
|
|
26462
26606
|
}
|
|
26463
|
-
|
|
26607
|
+
return 0;
|
|
26608
|
+
}, [scoresRef]);
|
|
26464
26609
|
React.useEffect(function () {
|
|
26465
26610
|
if (!reactionTotals || !reactionTotals.length) {
|
|
26466
26611
|
handleReactionsPopupClose();
|
|
26467
26612
|
}
|
|
26468
26613
|
}, [reactionTotals]);
|
|
26614
|
+
var reactionsHeight = React.useMemo(function () {
|
|
26615
|
+
return reactions.length * 50 + 45;
|
|
26616
|
+
}, [reactions]);
|
|
26469
26617
|
React.useEffect(function () {
|
|
26470
26618
|
if (reactions && reactionsPrevLength < reactions.length) {
|
|
26471
|
-
var reactionsHeight = reactions.length * 44 + 45;
|
|
26472
26619
|
if (reactionsHeight > popupHeight) {
|
|
26473
26620
|
setPopupHeight(reactionsHeight);
|
|
26474
26621
|
}
|
|
@@ -26478,14 +26625,15 @@ function ReactionsPopup(_ref) {
|
|
|
26478
26625
|
}
|
|
26479
26626
|
if (reactions && reactions.length) {
|
|
26480
26627
|
if (calculateSizes) {
|
|
26481
|
-
|
|
26482
|
-
var _reactionsHeight = reactions.length * 50 + 45;
|
|
26483
|
-
setPopupHeight(_reactionsHeight);
|
|
26484
|
-
setPopupVerticalPosition(botPost >= (_reactionsHeight > 320 ? 320 : _reactionsHeight) ? 'bottom' : 'top');
|
|
26628
|
+
setPopupHeight(reactionsHeight);
|
|
26485
26629
|
setCalculateSizes(false);
|
|
26486
26630
|
}
|
|
26487
26631
|
}
|
|
26488
|
-
}, [reactions]);
|
|
26632
|
+
}, [reactions, reactionsHeight]);
|
|
26633
|
+
var popupVerticalPosition = React.useMemo(function () {
|
|
26634
|
+
var botPost = bottomPosition - messageInputHeight - 40;
|
|
26635
|
+
return botPost >= (reactionsHeight > 320 ? 320 : reactionsHeight) ? 'bottom' : 'top';
|
|
26636
|
+
}, [bottomPosition, messageInputHeight, reactionsHeight]);
|
|
26489
26637
|
return /*#__PURE__*/React__default.createElement(Container$d, {
|
|
26490
26638
|
ref: popupRef,
|
|
26491
26639
|
popupVerticalPosition: popupVerticalPosition,
|
|
@@ -26543,7 +26691,10 @@ function ReactionsPopup(_ref) {
|
|
|
26543
26691
|
}, reactions.map(function (reaction) {
|
|
26544
26692
|
return /*#__PURE__*/React__default.createElement(ReactionItem$1, {
|
|
26545
26693
|
key: reaction.id,
|
|
26546
|
-
hoverBackgroundColor: backgroundHovered
|
|
26694
|
+
hoverBackgroundColor: backgroundHovered,
|
|
26695
|
+
onClick: function onClick() {
|
|
26696
|
+
return handleAddDeleteEmoji(reaction.key);
|
|
26697
|
+
}
|
|
26547
26698
|
}, /*#__PURE__*/React__default.createElement(AvatarWrapper, null, /*#__PURE__*/React__default.createElement(Avatar, {
|
|
26548
26699
|
name: reaction.user.firstName || reaction.user.id,
|
|
26549
26700
|
image: reaction.user.avatarUrl,
|
|
@@ -26554,11 +26705,7 @@ function ReactionsPopup(_ref) {
|
|
|
26554
26705
|
color: textPrimary
|
|
26555
26706
|
}, makeUsername(reaction.user.id === user.id ? reaction.user : contactsMap[reaction.user.id], reaction.user, getFromContacts)), /*#__PURE__*/React__default.createElement(SubTitle, {
|
|
26556
26707
|
color: textSecondary
|
|
26557
|
-
}, 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,
|
|
26558
|
-
onClick: function onClick() {
|
|
26559
|
-
return handleAddDeleteEmoji(reaction.key);
|
|
26560
|
-
}
|
|
26561
|
-
}, reaction.key));
|
|
26708
|
+
}, 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));
|
|
26562
26709
|
})));
|
|
26563
26710
|
}
|
|
26564
26711
|
var Container$d = styled__default.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) {
|
|
@@ -26628,7 +26775,7 @@ var ReactionScoreItem = styled__default.div(_templateObject8$9 || (_templateObje
|
|
|
26628
26775
|
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 ";
|
|
26629
26776
|
}, TabKey);
|
|
26630
26777
|
var ReactionKey = styled__default.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"])));
|
|
26631
|
-
var ReactionItem$1 = styled__default.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) {
|
|
26778
|
+
var ReactionItem$1 = styled__default.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) {
|
|
26632
26779
|
return props.hoverBackgroundColor;
|
|
26633
26780
|
}, UserStatus);
|
|
26634
26781
|
|
|
@@ -26893,6 +27040,7 @@ function MessageActions(_ref) {
|
|
|
26893
27040
|
messageStatus = _ref.messageStatus,
|
|
26894
27041
|
handleSelectMessage = _ref.handleSelectMessage,
|
|
26895
27042
|
handleReplyMessage = _ref.handleReplyMessage,
|
|
27043
|
+
handleOpenInfoMessage = _ref.handleOpenInfoMessage,
|
|
26896
27044
|
isThreadMessage = _ref.isThreadMessage,
|
|
26897
27045
|
rtlDirection = _ref.rtlDirection,
|
|
26898
27046
|
showMessageReaction = _ref.showMessageReaction,
|
|
@@ -26904,6 +27052,8 @@ function MessageActions(_ref) {
|
|
|
26904
27052
|
showDeleteMessage = _ref.showDeleteMessage,
|
|
26905
27053
|
showSelectMessage = _ref.showSelectMessage,
|
|
26906
27054
|
showReportMessage = _ref.showReportMessage,
|
|
27055
|
+
showInfoMessage = _ref.showInfoMessage,
|
|
27056
|
+
infoIconOrder = _ref.infoIconOrder,
|
|
26907
27057
|
reactionIcon = _ref.reactionIcon,
|
|
26908
27058
|
editIcon = _ref.editIcon,
|
|
26909
27059
|
copyIcon = _ref.copyIcon,
|
|
@@ -26911,6 +27061,7 @@ function MessageActions(_ref) {
|
|
|
26911
27061
|
replyInThreadIcon = _ref.replyInThreadIcon,
|
|
26912
27062
|
deleteIcon = _ref.deleteIcon,
|
|
26913
27063
|
selectIcon = _ref.selectIcon,
|
|
27064
|
+
infoIcon = _ref.infoIcon,
|
|
26914
27065
|
allowEditDeleteIncomingMessage = _ref.allowEditDeleteIncomingMessage,
|
|
26915
27066
|
reportIcon = _ref.reportIcon,
|
|
26916
27067
|
reactionIconOrder = _ref.reactionIconOrder,
|
|
@@ -26931,6 +27082,7 @@ function MessageActions(_ref) {
|
|
|
26931
27082
|
forwardIconTooltipText = _ref.forwardIconTooltipText,
|
|
26932
27083
|
deleteIconTooltipText = _ref.deleteIconTooltipText,
|
|
26933
27084
|
selectIconTooltipText = _ref.selectIconTooltipText,
|
|
27085
|
+
infoIconTooltipText = _ref.infoIconTooltipText,
|
|
26934
27086
|
reportIconTooltipText = _ref.reportIconTooltipText,
|
|
26935
27087
|
myRole = _ref.myRole,
|
|
26936
27088
|
isIncoming = _ref.isIncoming,
|
|
@@ -27059,8 +27211,20 @@ function MessageActions(_ref) {
|
|
|
27059
27211
|
disabledColor: textSecondary,
|
|
27060
27212
|
bgColor: tooltipBackground,
|
|
27061
27213
|
direction: 'top'
|
|
27062
|
-
}, selectIconTooltipText || 'Select', /*#__PURE__*/React__default.createElement(SvgArrowDown, null)), selectIcon || /*#__PURE__*/React__default.createElement(SvgCheckCircle, null))),
|
|
27063
|
-
order:
|
|
27214
|
+
}, selectIconTooltipText || 'Select', /*#__PURE__*/React__default.createElement(SvgArrowDown, null)), selectIcon || /*#__PURE__*/React__default.createElement(SvgCheckCircle, null))), showInfoMessage && !isIncoming && (/*#__PURE__*/React__default.createElement(Action, {
|
|
27215
|
+
order: infoIconOrder || 7,
|
|
27216
|
+
iconColor: messageActionIconsColor || iconInactive,
|
|
27217
|
+
hoverBackgroundColor: backgroundHovered,
|
|
27218
|
+
hoverIconColor: accentColor,
|
|
27219
|
+
onClick: function onClick() {
|
|
27220
|
+
return handleOpenInfoMessage();
|
|
27221
|
+
}
|
|
27222
|
+
}, /*#__PURE__*/React__default.createElement(ItemNote, {
|
|
27223
|
+
disabledColor: textSecondary,
|
|
27224
|
+
bgColor: tooltipBackground,
|
|
27225
|
+
direction: 'top'
|
|
27226
|
+
}, 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, {
|
|
27227
|
+
order: deleteIconOrder || 8,
|
|
27064
27228
|
iconColor: messageActionIconsColor || warningColor,
|
|
27065
27229
|
hoverBackgroundColor: backgroundHovered,
|
|
27066
27230
|
hoverIconColor: accentColor,
|
|
@@ -27072,7 +27236,7 @@ function MessageActions(_ref) {
|
|
|
27072
27236
|
bgColor: tooltipBackground,
|
|
27073
27237
|
direction: 'top'
|
|
27074
27238
|
}, 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, {
|
|
27075
|
-
order: reportIconOrder ||
|
|
27239
|
+
order: reportIconOrder || 9,
|
|
27076
27240
|
iconColor: messageActionIconsColor || iconInactive,
|
|
27077
27241
|
hoverBackgroundColor: backgroundHovered,
|
|
27078
27242
|
hoverIconColor: accentColor,
|
|
@@ -29334,7 +29498,10 @@ WaveSurfer.dom = dom;
|
|
|
29334
29498
|
var _templateObject$t, _templateObject2$p, _templateObject3$j, _templateObject4$g, _templateObject5$e, _templateObject6$c;
|
|
29335
29499
|
var AudioPlayer = function AudioPlayer(_ref) {
|
|
29336
29500
|
var url = _ref.url,
|
|
29337
|
-
file = _ref.file
|
|
29501
|
+
file = _ref.file,
|
|
29502
|
+
messagePlayed = _ref.messagePlayed,
|
|
29503
|
+
channelId = _ref.channelId,
|
|
29504
|
+
incoming = _ref.incoming;
|
|
29338
29505
|
var recordingInitialState = {
|
|
29339
29506
|
recordingSeconds: 0,
|
|
29340
29507
|
recordingMilliseconds: 0,
|
|
@@ -29400,6 +29567,9 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
29400
29567
|
}
|
|
29401
29568
|
}
|
|
29402
29569
|
wavesurfer.current.playPause();
|
|
29570
|
+
if (!messagePlayed && incoming) {
|
|
29571
|
+
dispatch(markVoiceMessageAsPlayedAC(channelId, [file.messageId]));
|
|
29572
|
+
}
|
|
29403
29573
|
}
|
|
29404
29574
|
};
|
|
29405
29575
|
React.useEffect(function () {
|
|
@@ -29577,7 +29747,10 @@ var Attachment = function Attachment(_ref) {
|
|
|
29577
29747
|
imageAttachmentMaxHeight = _ref.imageAttachmentMaxHeight,
|
|
29578
29748
|
videoAttachmentMaxWidth = _ref.videoAttachmentMaxWidth,
|
|
29579
29749
|
videoAttachmentMaxHeight = _ref.videoAttachmentMaxHeight,
|
|
29580
|
-
messageType = _ref.messageType
|
|
29750
|
+
messageType = _ref.messageType,
|
|
29751
|
+
messagePlayed = _ref.messagePlayed,
|
|
29752
|
+
channelId = _ref.channelId,
|
|
29753
|
+
incoming = _ref.incoming;
|
|
29581
29754
|
var _useColor = useColors(),
|
|
29582
29755
|
accentColor = _useColor[THEME_COLORS.ACCENT],
|
|
29583
29756
|
textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY],
|
|
@@ -29595,13 +29768,17 @@ var Attachment = function Attachment(_ref) {
|
|
|
29595
29768
|
var connectionStatus = useSelector(connectionStatusSelector);
|
|
29596
29769
|
var theme = useSelector(themeSelector);
|
|
29597
29770
|
var imageContRef = React.useRef(null);
|
|
29598
|
-
var
|
|
29771
|
+
var attachmentUpdatedMap = useSelector(attachmentUpdatedMapSelector) || {};
|
|
29772
|
+
var attachmentUrlFromMap = React.useMemo(function () {
|
|
29773
|
+
return attachmentUpdatedMap[attachment.url];
|
|
29774
|
+
}, [attachmentUpdatedMap, attachment.url]);
|
|
29775
|
+
var _useState = React.useState(!attachmentUrlFromMap),
|
|
29599
29776
|
imageLoading = _useState[0],
|
|
29600
29777
|
setImageLoading = _useState[1];
|
|
29601
29778
|
var _useState2 = React.useState(false),
|
|
29602
29779
|
downloadingFile = _useState2[0],
|
|
29603
29780
|
setDownloadingFile = _useState2[1];
|
|
29604
|
-
var _useState3 = React.useState(
|
|
29781
|
+
var _useState3 = React.useState(attachmentUrlFromMap),
|
|
29605
29782
|
attachmentUrl = _useState3[0],
|
|
29606
29783
|
setAttachmentUrl = _useState3[1];
|
|
29607
29784
|
var _useState4 = React.useState(),
|
|
@@ -29625,27 +29802,26 @@ var Attachment = function Attachment(_ref) {
|
|
|
29625
29802
|
var fileNameRef = React.useRef(null);
|
|
29626
29803
|
var customDownloader = getCustomDownloader();
|
|
29627
29804
|
var previewFileType = isPreview && attachment.data.type.split('/')[0];
|
|
29805
|
+
var attachmentMetadata = React.useMemo(function () {
|
|
29806
|
+
return isJSON(attachment.metadata) ? JSON.parse(attachment.metadata) : attachment.metadata;
|
|
29807
|
+
}, [attachment.metadata]);
|
|
29628
29808
|
var _useMemo = React.useMemo(function () {
|
|
29629
29809
|
var attachmentData = null;
|
|
29630
|
-
|
|
29631
|
-
attachmentData = isJSON(attachment.metadata) ? JSON.parse(attachment.metadata) : attachment.metadata;
|
|
29632
|
-
} else if (attachment.metadata && attachment.metadata.szw && attachment.metadata.szh) {
|
|
29633
|
-
attachmentData = attachment.metadata;
|
|
29634
|
-
}
|
|
29810
|
+
attachmentData = attachmentMetadata;
|
|
29635
29811
|
return attachmentData && attachmentData.szw && attachmentData.szh ? calculateRenderedImageWidth(attachmentData.szw, attachmentData.szh, attachment.type === attachmentTypes.image ? imageAttachmentMaxWidth : videoAttachmentMaxWidth, attachment.type === attachmentTypes.image ? imageAttachmentMaxHeight || 400 : videoAttachmentMaxHeight) : [];
|
|
29636
|
-
}, []),
|
|
29812
|
+
}, [attachmentMetadata]),
|
|
29637
29813
|
renderWidth = _useMemo[0],
|
|
29638
29814
|
renderHeight = _useMemo[1];
|
|
29639
29815
|
var isInUploadingState = attachmentCompilationState[attachment.tid] && (attachmentCompilationState[attachment.tid] === UPLOAD_STATE.UPLOADING || attachmentCompilationState[attachment.tid] === UPLOAD_STATE.PAUSED);
|
|
29640
29816
|
var attachmentThumb;
|
|
29641
29817
|
var withPrefix = true;
|
|
29642
|
-
if (attachment.type !== attachmentTypes.voice && attachment.type !== attachmentTypes.link &&
|
|
29818
|
+
if (attachment.type !== attachmentTypes.voice && attachment.type !== attachmentTypes.link && attachmentMetadata && attachmentMetadata.tmb) {
|
|
29643
29819
|
try {
|
|
29644
|
-
if (
|
|
29645
|
-
attachmentThumb = base64ToToDataURL(
|
|
29820
|
+
if (attachmentMetadata.tmb.length < 70) {
|
|
29821
|
+
attachmentThumb = base64ToToDataURL(attachmentMetadata.tmb);
|
|
29646
29822
|
withPrefix = false;
|
|
29647
29823
|
} else {
|
|
29648
|
-
attachmentThumb =
|
|
29824
|
+
attachmentThumb = attachmentMetadata && attachmentMetadata.tmb;
|
|
29649
29825
|
}
|
|
29650
29826
|
} catch (e) {
|
|
29651
29827
|
log.error('error on get attachmentThumb', e);
|
|
@@ -29809,9 +29985,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
29809
29985
|
if (attachment.type === attachmentTypes.image && !isPreview) {
|
|
29810
29986
|
if (cachedUrl) {
|
|
29811
29987
|
setAttachmentUrl(cachedUrl);
|
|
29812
|
-
dispatch(setUpdateMessageAttachmentAC(attachment.url,
|
|
29813
|
-
attachmentUrl: cachedUrl
|
|
29814
|
-
}));
|
|
29988
|
+
dispatch(setUpdateMessageAttachmentAC(attachment.url, cachedUrl));
|
|
29815
29989
|
setIsCached(true);
|
|
29816
29990
|
} else {
|
|
29817
29991
|
setIsCached(false);
|
|
@@ -30095,7 +30269,10 @@ var Attachment = function Attachment(_ref) {
|
|
|
30095
30269
|
}
|
|
30096
30270
|
}))))) : attachment.type === attachmentTypes.voice ? (/*#__PURE__*/React__default.createElement(AudioPlayer, {
|
|
30097
30271
|
url: attachment.attachmentUrl || attachmentUrl,
|
|
30098
|
-
file: attachment
|
|
30272
|
+
file: attachment,
|
|
30273
|
+
messagePlayed: messagePlayed,
|
|
30274
|
+
channelId: channelId,
|
|
30275
|
+
incoming: incoming
|
|
30099
30276
|
})) : attachment.type === attachmentTypes.link ? null : (
|
|
30100
30277
|
/*#__PURE__*/
|
|
30101
30278
|
React__default.createElement(AttachmentFile$1, {
|
|
@@ -31384,54 +31561,99 @@ var validateUrl = function validateUrl(url) {
|
|
|
31384
31561
|
}
|
|
31385
31562
|
};
|
|
31386
31563
|
var OGMetadata = function OGMetadata(_ref) {
|
|
31387
|
-
var _metadata$
|
|
31564
|
+
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;
|
|
31388
31565
|
var attachments = _ref.attachments,
|
|
31389
|
-
state = _ref.state
|
|
31390
|
-
|
|
31391
|
-
|
|
31392
|
-
|
|
31393
|
-
|
|
31394
|
-
|
|
31395
|
-
|
|
31396
|
-
|
|
31397
|
-
|
|
31398
|
-
setFaviconLoadError = _useState3[1];
|
|
31399
|
-
var _useState4 = React.useState(false),
|
|
31400
|
-
imageLoaded = _useState4[0],
|
|
31401
|
-
setImageLoaded = _useState4[1];
|
|
31402
|
-
var _useState5 = React.useState(0),
|
|
31403
|
-
imageWidth = _useState5[0],
|
|
31404
|
-
setImageWidth = _useState5[1];
|
|
31405
|
-
var _useState6 = React.useState(0),
|
|
31406
|
-
imageHeight = _useState6[0],
|
|
31407
|
-
setImageHeight = _useState6[1];
|
|
31566
|
+
state = _ref.state,
|
|
31567
|
+
incoming = _ref.incoming;
|
|
31568
|
+
var dispatch = useDispatch();
|
|
31569
|
+
var oGMetadata = useSelector(function (state) {
|
|
31570
|
+
return state.MessageReducer.oGMetadata;
|
|
31571
|
+
});
|
|
31572
|
+
var _useColor = useColors(),
|
|
31573
|
+
incomingMessageBackgroundX = _useColor[THEME_COLORS.INCOMING_MESSAGE_BACKGROUND_X],
|
|
31574
|
+
outgoingMessageBackgroundX = _useColor[THEME_COLORS.OUTGOING_MESSAGE_BACKGROUND_X];
|
|
31408
31575
|
var attachment = React.useMemo(function () {
|
|
31409
31576
|
return attachments.find(function (attachment) {
|
|
31410
31577
|
return attachment.type === attachmentTypes.link;
|
|
31411
31578
|
});
|
|
31412
31579
|
}, [attachments]);
|
|
31580
|
+
var metadata = React.useMemo(function () {
|
|
31581
|
+
return oGMetadata[attachment === null || attachment === void 0 ? void 0 : attachment.url] || null;
|
|
31582
|
+
}, [oGMetadata, attachment === null || attachment === void 0 ? void 0 : attachment.url]);
|
|
31583
|
+
var _useState = React.useState(false),
|
|
31584
|
+
imageLoadError = _useState[0],
|
|
31585
|
+
setImageLoadError = _useState[1];
|
|
31586
|
+
var _useState2 = React.useState(false),
|
|
31587
|
+
faviconLoadError = _useState2[0],
|
|
31588
|
+
setFaviconLoadError = _useState2[1];
|
|
31589
|
+
var _useState3 = React.useState(false),
|
|
31590
|
+
shouldAnimate = _useState3[0],
|
|
31591
|
+
setShouldAnimate = _useState3[1];
|
|
31592
|
+
var handleMetadata = React.useCallback(function (metadata) {
|
|
31593
|
+
if (metadata) {
|
|
31594
|
+
dispatch(setOGMetadataAC(attachment === null || attachment === void 0 ? void 0 : attachment.url, metadata));
|
|
31595
|
+
} else {
|
|
31596
|
+
dispatch(setOGMetadataAC(attachment === null || attachment === void 0 ? void 0 : attachment.url, null));
|
|
31597
|
+
}
|
|
31598
|
+
}, []);
|
|
31413
31599
|
var ogMetadataQueryBuilder = React.useCallback(function (url) {
|
|
31414
31600
|
try {
|
|
31415
31601
|
var client = getClient();
|
|
31416
|
-
var
|
|
31602
|
+
var _temp3 = function () {
|
|
31417
31603
|
if (client) {
|
|
31418
|
-
var
|
|
31604
|
+
var _temp2 = _catch(function () {
|
|
31419
31605
|
var queryBuilder = new client.MessageLinkOGQueryBuilder(url);
|
|
31420
31606
|
return Promise.resolve(queryBuilder.build()).then(function (query) {
|
|
31421
31607
|
return Promise.resolve(query.loadOGData()).then(function (metadata) {
|
|
31422
|
-
|
|
31423
|
-
|
|
31424
|
-
|
|
31608
|
+
var _metadata$og, _metadata$og$image, _metadata$og$image$;
|
|
31609
|
+
var image = new Image();
|
|
31610
|
+
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;
|
|
31611
|
+
var _temp = function () {
|
|
31612
|
+
if (image.src) {
|
|
31613
|
+
image.onload = function () {
|
|
31614
|
+
try {
|
|
31615
|
+
var imageWidth = image.width;
|
|
31616
|
+
var imageHeight = image.height;
|
|
31617
|
+
return Promise.resolve(storeMetadata(url, _extends({}, metadata, {
|
|
31618
|
+
imageWidth: imageWidth,
|
|
31619
|
+
imageHeight: imageHeight
|
|
31620
|
+
}))).then(function () {
|
|
31621
|
+
handleMetadata(_extends({}, metadata, {
|
|
31622
|
+
imageWidth: imageWidth,
|
|
31623
|
+
imageHeight: imageHeight
|
|
31624
|
+
}));
|
|
31625
|
+
});
|
|
31626
|
+
} catch (e) {
|
|
31627
|
+
return Promise.reject(e);
|
|
31628
|
+
}
|
|
31629
|
+
};
|
|
31630
|
+
image.onerror = function () {
|
|
31631
|
+
try {
|
|
31632
|
+
setImageLoadError(true);
|
|
31633
|
+
return Promise.resolve(storeMetadata(url, _extends({}, metadata))).then(function () {
|
|
31634
|
+
handleMetadata(_extends({}, metadata));
|
|
31635
|
+
});
|
|
31636
|
+
} catch (e) {
|
|
31637
|
+
return Promise.reject(e);
|
|
31638
|
+
}
|
|
31639
|
+
};
|
|
31640
|
+
} else {
|
|
31641
|
+
return Promise.resolve(storeMetadata(url, _extends({}, metadata))).then(function () {
|
|
31642
|
+
handleMetadata(_extends({}, metadata));
|
|
31643
|
+
});
|
|
31644
|
+
}
|
|
31645
|
+
}();
|
|
31646
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
31425
31647
|
});
|
|
31426
31648
|
});
|
|
31427
31649
|
}, function () {
|
|
31428
31650
|
console.log('Failed to fetch OG metadata');
|
|
31429
|
-
|
|
31651
|
+
handleMetadata(null);
|
|
31430
31652
|
});
|
|
31431
|
-
if (
|
|
31653
|
+
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
31432
31654
|
}
|
|
31433
31655
|
}();
|
|
31434
|
-
return Promise.resolve(
|
|
31656
|
+
return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {
|
|
31435
31657
|
return null;
|
|
31436
31658
|
}) : null);
|
|
31437
31659
|
} catch (e) {
|
|
@@ -31439,16 +31661,16 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
31439
31661
|
}
|
|
31440
31662
|
}, []);
|
|
31441
31663
|
React.useEffect(function () {
|
|
31442
|
-
if (attachment !== null && attachment !== void 0 && attachment.id && attachment !== null && attachment !== void 0 && attachment.url) {
|
|
31664
|
+
if (attachment !== null && attachment !== void 0 && attachment.id && attachment !== null && attachment !== void 0 && attachment.url && !metadata) {
|
|
31665
|
+
setShouldAnimate(true);
|
|
31443
31666
|
var url = attachment === null || attachment === void 0 ? void 0 : attachment.url;
|
|
31444
31667
|
if (url) {
|
|
31445
31668
|
getMetadata(url).then(function (cachedMetadata) {
|
|
31446
31669
|
try {
|
|
31447
31670
|
if (cachedMetadata) {
|
|
31448
|
-
|
|
31449
|
-
} else {
|
|
31450
|
-
ogMetadataQueryBuilder(url);
|
|
31671
|
+
handleMetadata(cachedMetadata);
|
|
31451
31672
|
}
|
|
31673
|
+
ogMetadataQueryBuilder(url);
|
|
31452
31674
|
return Promise.resolve();
|
|
31453
31675
|
} catch (e) {
|
|
31454
31676
|
return Promise.reject(e);
|
|
@@ -31458,7 +31680,7 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
31458
31680
|
});
|
|
31459
31681
|
}
|
|
31460
31682
|
}
|
|
31461
|
-
}, [attachment === null || attachment === void 0 ? void 0 : attachment.url]);
|
|
31683
|
+
}, [attachment === null || attachment === void 0 ? void 0 : attachment.url, metadata]);
|
|
31462
31684
|
var ogUrl = React.useMemo(function () {
|
|
31463
31685
|
var url = attachment === null || attachment === void 0 ? void 0 : attachment.url;
|
|
31464
31686
|
var urlObj = validateUrl(url);
|
|
@@ -31468,102 +31690,130 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
31468
31690
|
return url;
|
|
31469
31691
|
}, [attachment === null || attachment === void 0 ? void 0 : attachment.url]);
|
|
31470
31692
|
var showOGMetadata = React.useMemo(function () {
|
|
31471
|
-
var _metadata$
|
|
31472
|
-
return state !== 'deleted' && (metadata === null || metadata === void 0 ? void 0 : (_metadata$
|
|
31693
|
+
var _metadata$og2, _metadata$og3;
|
|
31694
|
+
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;
|
|
31473
31695
|
}, [state, metadata]);
|
|
31474
|
-
React.useEffect(function () {
|
|
31475
|
-
var _metadata$og4, _metadata$og4$image, _metadata$og4$image$;
|
|
31476
|
-
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) {
|
|
31477
|
-
var _metadata$og5, _metadata$og5$image, _metadata$og5$image$;
|
|
31478
|
-
var image = new Image();
|
|
31479
|
-
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;
|
|
31480
|
-
image.onload = function () {
|
|
31481
|
-
var imageWidth = image.width;
|
|
31482
|
-
var imageHeight = image.height;
|
|
31483
|
-
setImageWidth(imageWidth);
|
|
31484
|
-
setImageHeight(imageHeight);
|
|
31485
|
-
setImageLoadError(false);
|
|
31486
|
-
setImageLoaded(true);
|
|
31487
|
-
};
|
|
31488
|
-
image.onerror = function () {
|
|
31489
|
-
setImageLoadError(true);
|
|
31490
|
-
setImageLoaded(true);
|
|
31491
|
-
};
|
|
31492
|
-
}
|
|
31493
|
-
}, [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]);
|
|
31494
31696
|
var calculatedImageHeight = React.useMemo(function () {
|
|
31495
|
-
|
|
31496
|
-
|
|
31697
|
+
if (!(metadata !== null && metadata !== void 0 && metadata.imageWidth)) {
|
|
31698
|
+
return 0;
|
|
31699
|
+
}
|
|
31700
|
+
return (metadata === null || metadata === void 0 ? void 0 : metadata.imageHeight) / ((metadata === null || metadata === void 0 ? void 0 : metadata.imageWidth) / 400);
|
|
31701
|
+
}, [metadata === null || metadata === void 0 ? void 0 : metadata.imageWidth, metadata === null || metadata === void 0 ? void 0 : metadata.imageHeight]);
|
|
31497
31702
|
return /*#__PURE__*/React__default.createElement(OGMetadataContainer, {
|
|
31498
|
-
showOGMetadata: !!showOGMetadata
|
|
31703
|
+
showOGMetadata: !!showOGMetadata,
|
|
31704
|
+
bgColor: incoming ? incomingMessageBackgroundX : outgoingMessageBackgroundX
|
|
31499
31705
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
31500
31706
|
onClick: function onClick() {
|
|
31501
31707
|
window.open(attachment === null || attachment === void 0 ? void 0 : attachment.url, '_blank');
|
|
31708
|
+
},
|
|
31709
|
+
style: {
|
|
31710
|
+
width: showOGMetadata ? '100%' : 'auto'
|
|
31502
31711
|
}
|
|
31503
31712
|
}, /*#__PURE__*/React__default.createElement(ImageContainer, {
|
|
31504
|
-
showOGMetadata: !!showOGMetadata && !imageLoadError
|
|
31505
|
-
|
|
31506
|
-
|
|
31507
|
-
|
|
31508
|
-
|
|
31713
|
+
showOGMetadata: !!showOGMetadata && !imageLoadError,
|
|
31714
|
+
containerWidth: 400,
|
|
31715
|
+
containerHeight: calculatedImageHeight,
|
|
31716
|
+
shouldAnimate: shouldAnimate
|
|
31717
|
+
}, 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, {
|
|
31718
|
+
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,
|
|
31509
31719
|
alt: 'OG metadata image',
|
|
31510
|
-
|
|
31511
|
-
|
|
31512
|
-
|
|
31513
|
-
|
|
31514
|
-
|
|
31515
|
-
|
|
31516
|
-
|
|
31517
|
-
|
|
31720
|
+
imageWidth: 400,
|
|
31721
|
+
imageHeight: calculatedImageHeight,
|
|
31722
|
+
shouldAnimate: shouldAnimate
|
|
31723
|
+
})) : null), showOGMetadata ? (/*#__PURE__*/React__default.createElement(OGText, {
|
|
31724
|
+
shouldAnimate: shouldAnimate
|
|
31725
|
+
}, /*#__PURE__*/React__default.createElement(Url, {
|
|
31726
|
+
maxWidth: 400,
|
|
31727
|
+
shouldAnimate: shouldAnimate
|
|
31728
|
+
}, ogUrl), metadata !== null && metadata !== void 0 && (_metadata$og6 = metadata.og) !== null && _metadata$og6 !== void 0 && _metadata$og6.title ? (/*#__PURE__*/React__default.createElement(Title, {
|
|
31729
|
+
maxWidth: 400,
|
|
31730
|
+
shouldAnimate: shouldAnimate
|
|
31731
|
+
}, 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, {
|
|
31732
|
+
shouldAnimate: shouldAnimate,
|
|
31733
|
+
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,
|
|
31518
31734
|
onLoad: function onLoad() {
|
|
31519
31735
|
return setFaviconLoadError(false);
|
|
31520
31736
|
},
|
|
31521
31737
|
onError: function onError() {
|
|
31522
|
-
|
|
31738
|
+
dispatch(updateOGMetadataAC(attachment === null || attachment === void 0 ? void 0 : attachment.url, _extends({}, metadata, {
|
|
31739
|
+
og: _extends({}, metadata === null || metadata === void 0 ? void 0 : metadata.og, {
|
|
31740
|
+
favicon: {
|
|
31741
|
+
url: ''
|
|
31742
|
+
}
|
|
31743
|
+
})
|
|
31744
|
+
})));
|
|
31745
|
+
setFaviconLoadError(true);
|
|
31523
31746
|
}
|
|
31524
|
-
})) : null, /*#__PURE__*/React__default.createElement("span", null, metadata === null || metadata === void 0 ? void 0 : (_metadata$
|
|
31525
|
-
maxWidth: 400
|
|
31526
|
-
|
|
31747
|
+
})) : 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, {
|
|
31748
|
+
maxWidth: 400,
|
|
31749
|
+
shouldAnimate: shouldAnimate
|
|
31750
|
+
}, metadata === null || metadata === void 0 ? void 0 : (_metadata$og1 = metadata.og) === null || _metadata$og1 === void 0 ? void 0 : _metadata$og1.description)) : null)) : null));
|
|
31527
31751
|
};
|
|
31528
|
-
var OGMetadataContainer = styled__default.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:
|
|
31529
|
-
var
|
|
31752
|
+
var OGMetadataContainer = styled__default.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) {
|
|
31753
|
+
var bgColor = _ref2.bgColor;
|
|
31754
|
+
return bgColor;
|
|
31755
|
+
}, function (_ref3) {
|
|
31756
|
+
var showOGMetadata = _ref3.showOGMetadata;
|
|
31530
31757
|
return showOGMetadata ? '0.8rem' : '0';
|
|
31531
31758
|
});
|
|
31532
|
-
var ImageContainer = styled__default.div(_templateObject2$v || (_templateObject2$v = _taggedTemplateLiteralLoose(["\n ", "\n\n ", "\n\n opacity: ", ";\n overflow: hidden;\n margin: 0 auto;\n padding: ", ";\n
|
|
31533
|
-
var
|
|
31534
|
-
return
|
|
31535
|
-
}, function (_ref4) {
|
|
31536
|
-
var height = _ref4.height,
|
|
31537
|
-
showOGMetadata = _ref4.showOGMetadata;
|
|
31538
|
-
return height ? "\n max-height: " + (height + "px") + ";\n height: " + (showOGMetadata ? height + "px" : '0') + ";\n " : "\n max-height: 200px;\n height: " + (showOGMetadata ? '200px' : '0') + ";\n ";
|
|
31759
|
+
var ImageContainer = styled__default.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) {
|
|
31760
|
+
var containerWidth = _ref4.containerWidth;
|
|
31761
|
+
return containerWidth ? "\n max-width: " + (containerWidth + "px") + ";\n " : "\n max-width: 100%;\n width: 100%;\n ";
|
|
31539
31762
|
}, function (_ref5) {
|
|
31540
|
-
var
|
|
31541
|
-
|
|
31763
|
+
var containerHeight = _ref5.containerHeight,
|
|
31764
|
+
showOGMetadata = _ref5.showOGMetadata;
|
|
31765
|
+
return containerHeight ? "\n max-height: " + (containerHeight + "px") + ";\n height: " + (showOGMetadata ? containerHeight + "px" : '0') + ";\n " : "\n height: 0;\n ";
|
|
31542
31766
|
}, function (_ref6) {
|
|
31543
|
-
var showOGMetadata = _ref6.showOGMetadata
|
|
31544
|
-
|
|
31545
|
-
|
|
31546
|
-
|
|
31547
|
-
var
|
|
31548
|
-
|
|
31767
|
+
var showOGMetadata = _ref6.showOGMetadata,
|
|
31768
|
+
containerHeight = _ref6.containerHeight;
|
|
31769
|
+
return showOGMetadata && containerHeight ? 1 : 0;
|
|
31770
|
+
}, function (_ref7) {
|
|
31771
|
+
var showOGMetadata = _ref7.showOGMetadata,
|
|
31772
|
+
containerHeight = _ref7.containerHeight;
|
|
31773
|
+
return showOGMetadata && containerHeight ? '4px' : '0';
|
|
31774
|
+
}, function (_ref8) {
|
|
31775
|
+
var shouldAnimate = _ref8.shouldAnimate;
|
|
31776
|
+
return shouldAnimate && "\n transition: height 0.2s ease;\n ";
|
|
31777
|
+
});
|
|
31778
|
+
var OGText = styled__default.div(_templateObject3$p || (_templateObject3$p = _taggedTemplateLiteralLoose(["\n padding: 0.5rem;\n margin: 0;\n ", "\n"])), function (_ref9) {
|
|
31779
|
+
var shouldAnimate = _ref9.shouldAnimate;
|
|
31780
|
+
return shouldAnimate && "\n transition: all 0.2s ease;\n ";
|
|
31781
|
+
});
|
|
31782
|
+
var Url = styled__default.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) {
|
|
31783
|
+
var maxWidth = _ref0.maxWidth;
|
|
31549
31784
|
return maxWidth && "\n max-width: " + (maxWidth + "px") + ";\n ";
|
|
31785
|
+
}, function (_ref1) {
|
|
31786
|
+
var shouldAnimate = _ref1.shouldAnimate;
|
|
31787
|
+
return shouldAnimate && "\n transition: all 0.2s ease;\n ";
|
|
31550
31788
|
});
|
|
31551
|
-
var Title = styled__default.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
|
|
31552
|
-
var maxWidth =
|
|
31789
|
+
var Title = styled__default.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) {
|
|
31790
|
+
var maxWidth = _ref10.maxWidth;
|
|
31553
31791
|
return maxWidth && "\n max-width: " + (maxWidth + "px") + ";\n ";
|
|
31792
|
+
}, function (_ref11) {
|
|
31793
|
+
var shouldAnimate = _ref11.shouldAnimate;
|
|
31794
|
+
return shouldAnimate && "\n transition: all 0.2s ease;\n ";
|
|
31554
31795
|
});
|
|
31555
|
-
var Desc = styled__default.p(_templateObject6$f || (_templateObject6$f = _taggedTemplateLiteralLoose(["\n font-weight: normal;\n font-size: 13px;\n padding: 0;\n
|
|
31556
|
-
var maxWidth =
|
|
31796
|
+
var Desc = styled__default.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) {
|
|
31797
|
+
var maxWidth = _ref12.maxWidth;
|
|
31557
31798
|
return maxWidth && "\n max-width: " + (maxWidth + "px") + ";\n ";
|
|
31799
|
+
}, function (_ref13) {
|
|
31800
|
+
var shouldAnimate = _ref13.shouldAnimate;
|
|
31801
|
+
return shouldAnimate && "\n transition: all 0.2s ease;\n ";
|
|
31558
31802
|
});
|
|
31559
|
-
var Img = styled__default.img(_templateObject7$d || (_templateObject7$d = _taggedTemplateLiteralLoose(["\n ", "\n ", "\n object-fit: cover;\n
|
|
31560
|
-
var
|
|
31561
|
-
return
|
|
31562
|
-
}, function (
|
|
31563
|
-
var
|
|
31564
|
-
return
|
|
31803
|
+
var Img = styled__default.img(_templateObject7$d || (_templateObject7$d = _taggedTemplateLiteralLoose(["\n ", "\n ", "\n\n object-fit: cover;\n ", "\n"])), function (_ref14) {
|
|
31804
|
+
var imageWidth = _ref14.imageWidth;
|
|
31805
|
+
return imageWidth && "\n max-width: 100%;\n width: " + ("calc(" + imageWidth + "px - 8px)") + ";\n ";
|
|
31806
|
+
}, function (_ref15) {
|
|
31807
|
+
var imageHeight = _ref15.imageHeight;
|
|
31808
|
+
return imageHeight && "\n max-height: " + (imageHeight + "px") + ";\n min-height: " + (imageHeight + "px") + ";\n height: " + (imageHeight + "px") + ";\n ";
|
|
31809
|
+
}, function (_ref16) {
|
|
31810
|
+
var shouldAnimate = _ref16.shouldAnimate;
|
|
31811
|
+
return shouldAnimate && "\n transition: height 0.2s ease;\n ";
|
|
31812
|
+
});
|
|
31813
|
+
var Favicon = styled__default.img(_templateObject8$c || (_templateObject8$c = _taggedTemplateLiteralLoose(["\n ", "\n width: 24px;\n height: 24px;\n object-fit: contain;\n margin-right: 4px;\n"])), function (_ref17) {
|
|
31814
|
+
var shouldAnimate = _ref17.shouldAnimate;
|
|
31815
|
+
return shouldAnimate && "\n transition: all 0.2s ease;\n ";
|
|
31565
31816
|
});
|
|
31566
|
-
var Favicon = styled__default.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"])));
|
|
31567
31817
|
|
|
31568
31818
|
var _templateObject$B, _templateObject2$w, _templateObject3$q, _templateObject4$m, _templateObject5$i;
|
|
31569
31819
|
var MessageBody = function MessageBody(_ref) {
|
|
@@ -31617,6 +31867,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31617
31867
|
deleteMessage = _ref$deleteMessage === void 0 ? true : _ref$deleteMessage,
|
|
31618
31868
|
_ref$selectMessage = _ref.selectMessage,
|
|
31619
31869
|
selectMessage = _ref$selectMessage === void 0 ? true : _ref$selectMessage,
|
|
31870
|
+
showInfoMessage = _ref.showInfoMessage,
|
|
31620
31871
|
allowEditDeleteIncomingMessage = _ref.allowEditDeleteIncomingMessage,
|
|
31621
31872
|
_ref$forwardMessage = _ref.forwardMessage,
|
|
31622
31873
|
forwardMessage = _ref$forwardMessage === void 0 ? true : _ref$forwardMessage,
|
|
@@ -31629,6 +31880,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31629
31880
|
replyInThreadIcon = _ref.replyInThreadIcon,
|
|
31630
31881
|
forwardIcon = _ref.forwardIcon,
|
|
31631
31882
|
deleteIcon = _ref.deleteIcon,
|
|
31883
|
+
infoIcon = _ref.infoIcon,
|
|
31632
31884
|
selectIcon = _ref.selectIcon,
|
|
31633
31885
|
starIcon = _ref.starIcon,
|
|
31634
31886
|
staredIcon = _ref.staredIcon,
|
|
@@ -31640,6 +31892,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31640
31892
|
replyInThreadIconOrder = _ref.replyInThreadIconOrder,
|
|
31641
31893
|
forwardIconOrder = _ref.forwardIconOrder,
|
|
31642
31894
|
deleteIconOrder = _ref.deleteIconOrder,
|
|
31895
|
+
infoIconOrder = _ref.infoIconOrder,
|
|
31643
31896
|
selectIconOrder = _ref.selectIconOrder,
|
|
31644
31897
|
starIconOrder = _ref.starIconOrder,
|
|
31645
31898
|
reportIconOrder = _ref.reportIconOrder,
|
|
@@ -31653,6 +31906,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31653
31906
|
selectIconTooltipText = _ref.selectIconTooltipText,
|
|
31654
31907
|
starIconTooltipText = _ref.starIconTooltipText,
|
|
31655
31908
|
reportIconTooltipText = _ref.reportIconTooltipText,
|
|
31909
|
+
infoIconTooltipText = _ref.infoIconTooltipText,
|
|
31656
31910
|
messageActionIconsColor = _ref.messageActionIconsColor,
|
|
31657
31911
|
messageStatusSize = _ref.messageStatusSize,
|
|
31658
31912
|
messageStatusColor = _ref.messageStatusColor,
|
|
@@ -31681,6 +31935,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31681
31935
|
messageTextFontSize = _ref.messageTextFontSize,
|
|
31682
31936
|
messageTextLineHeight = _ref.messageTextLineHeight,
|
|
31683
31937
|
handleToggleForwardMessagePopup = _ref.handleToggleForwardMessagePopup,
|
|
31938
|
+
handleToggleInfoMessagePopupOpen = _ref.handleToggleInfoMessagePopupOpen,
|
|
31684
31939
|
messageActionsShow = _ref.messageActionsShow,
|
|
31685
31940
|
closeMessageActions = _ref.closeMessageActions,
|
|
31686
31941
|
handleDeletePendingMessage = _ref.handleDeletePendingMessage,
|
|
@@ -31829,6 +32084,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31829
32084
|
handleCopyMessage: handleCopyMessage,
|
|
31830
32085
|
handleDeletePendingMessage: handleDeletePendingMessage,
|
|
31831
32086
|
handleOpenForwardMessage: handleToggleForwardMessagePopup,
|
|
32087
|
+
handleOpenInfoMessage: handleToggleInfoMessagePopupOpen,
|
|
31832
32088
|
handleResendMessage: handleResendMessage,
|
|
31833
32089
|
handleReplyMessage: _handleReplyMessage,
|
|
31834
32090
|
handleReportMessage: handleToggleReportPopupOpen,
|
|
@@ -31880,7 +32136,11 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31880
32136
|
reportIconTooltipText: reportIconTooltipText,
|
|
31881
32137
|
messageActionIconsColor: messageActionIconsColor,
|
|
31882
32138
|
myRole: channel.userRole,
|
|
31883
|
-
isIncoming: message.incoming
|
|
32139
|
+
isIncoming: message.incoming,
|
|
32140
|
+
infoIconTooltipText: infoIconTooltipText,
|
|
32141
|
+
infoIcon: infoIcon,
|
|
32142
|
+
showInfoMessage: showInfoMessage,
|
|
32143
|
+
infoIconOrder: infoIconOrder
|
|
31884
32144
|
}))), message.parentMessage && message.parentMessage.id && !isThreadMessage && (/*#__PURE__*/React__default.createElement(RepliedMessage$1, {
|
|
31885
32145
|
message: message,
|
|
31886
32146
|
theme: theme,
|
|
@@ -31928,10 +32188,11 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31928
32188
|
incomingMessageStyles: incomingMessageStyles,
|
|
31929
32189
|
incoming: message.incoming,
|
|
31930
32190
|
linkColor: linkColor
|
|
31931
|
-
}, linkAttachment && /*#__PURE__*/React__default.createElement(OGMetadata, {
|
|
32191
|
+
}, linkAttachment && (/*#__PURE__*/React__default.createElement(OGMetadata, {
|
|
31932
32192
|
attachments: [linkAttachment],
|
|
31933
|
-
state: message.state
|
|
31934
|
-
|
|
32193
|
+
state: message.state,
|
|
32194
|
+
incoming: message.incoming
|
|
32195
|
+
})), /*#__PURE__*/React__default.createElement("span", {
|
|
31935
32196
|
ref: messageTextRef
|
|
31936
32197
|
}, MessageTextFormat({
|
|
31937
32198
|
text: message.body,
|
|
@@ -31999,7 +32260,10 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31999
32260
|
imageAttachmentMaxHeight: imageAttachmentMaxHeight,
|
|
32000
32261
|
videoAttachmentMaxWidth: videoAttachmentMaxWidth,
|
|
32001
32262
|
videoAttachmentMaxHeight: videoAttachmentMaxHeight,
|
|
32002
|
-
messageType: message.type
|
|
32263
|
+
messageType: message.type,
|
|
32264
|
+
messagePlayed: message.deliveryStatus === MESSAGE_DELIVERY_STATUS.PLAYED,
|
|
32265
|
+
channelId: message.channelId,
|
|
32266
|
+
incoming: message.incoming
|
|
32003
32267
|
});
|
|
32004
32268
|
}), emojisPopupOpen && emojisPopupPosition && (/*#__PURE__*/React__default.createElement(EmojiContainer, {
|
|
32005
32269
|
id: message.id + "_emoji_popup_container",
|
|
@@ -32079,7 +32343,420 @@ var FrequentlyEmojisContainer = styled__default.div(_templateObject5$i || (_temp
|
|
|
32079
32343
|
return props.rtlDirection && '0';
|
|
32080
32344
|
});
|
|
32081
32345
|
|
|
32082
|
-
var _templateObject$C, _templateObject2$x, _templateObject3$r, _templateObject4$n, _templateObject5$j, _templateObject6$g, _templateObject7$e, _templateObject8$d, _templateObject9$b, _templateObject0$a, _templateObject1$7
|
|
32346
|
+
var _templateObject$C, _templateObject2$x, _templateObject3$r, _templateObject4$n, _templateObject5$j, _templateObject6$g, _templateObject7$e, _templateObject8$d, _templateObject9$b, _templateObject0$a, _templateObject1$7;
|
|
32347
|
+
var defaultFormatDate = function defaultFormatDate(date) {
|
|
32348
|
+
var m = moment(date);
|
|
32349
|
+
if (m.isSame(moment(), 'day')) {
|
|
32350
|
+
return "Today, " + m.format('HH:mm');
|
|
32351
|
+
}
|
|
32352
|
+
if (m.isSame(moment().subtract(1, 'day'), 'day')) {
|
|
32353
|
+
return "Yesterday, " + m.format('HH:mm');
|
|
32354
|
+
}
|
|
32355
|
+
return m.format('DD.MM.YYYY');
|
|
32356
|
+
};
|
|
32357
|
+
var MessageInfo = function MessageInfo(_ref) {
|
|
32358
|
+
var _tabsOrder$;
|
|
32359
|
+
var message = _ref.message,
|
|
32360
|
+
togglePopup = _ref.togglePopup,
|
|
32361
|
+
labels = _ref.labels,
|
|
32362
|
+
_ref$tabsOrder = _ref.tabsOrder,
|
|
32363
|
+
tabsOrder = _ref$tabsOrder === void 0 ? [].concat(message.attachments && message.attachments.length > 0 && message.attachments[0].type === 'voice' ? [{
|
|
32364
|
+
key: 'played',
|
|
32365
|
+
label: 'Played by',
|
|
32366
|
+
data: []
|
|
32367
|
+
}] : [], [{
|
|
32368
|
+
key: 'received',
|
|
32369
|
+
label: 'Delivered to',
|
|
32370
|
+
data: []
|
|
32371
|
+
}, {
|
|
32372
|
+
key: 'displayed',
|
|
32373
|
+
label: 'Seen by',
|
|
32374
|
+
data: []
|
|
32375
|
+
}]) : _ref$tabsOrder,
|
|
32376
|
+
_ref$showCounts = _ref.showCounts,
|
|
32377
|
+
showCounts = _ref$showCounts === void 0 ? false : _ref$showCounts,
|
|
32378
|
+
_ref$avatarSize = _ref.avatarSize,
|
|
32379
|
+
avatarSize = _ref$avatarSize === void 0 ? 32 : _ref$avatarSize,
|
|
32380
|
+
_ref$maxWidth = _ref.maxWidth,
|
|
32381
|
+
maxWidth = _ref$maxWidth === void 0 ? '340px' : _ref$maxWidth,
|
|
32382
|
+
_ref$minWidth = _ref.minWidth,
|
|
32383
|
+
minWidth = _ref$minWidth === void 0 ? '340px' : _ref$minWidth,
|
|
32384
|
+
_ref$height = _ref.height,
|
|
32385
|
+
height = _ref$height === void 0 ? '300px' : _ref$height,
|
|
32386
|
+
renderItem = _ref.renderItem,
|
|
32387
|
+
_ref$formatDate = _ref.formatDate,
|
|
32388
|
+
formatDate = _ref$formatDate === void 0 ? defaultFormatDate : _ref$formatDate,
|
|
32389
|
+
_ref$tabsStyles = _ref.tabsStyles,
|
|
32390
|
+
tabsStyles = _ref$tabsStyles === void 0 ? {} : _ref$tabsStyles,
|
|
32391
|
+
_ref$listItemStyles = _ref.listItemStyles,
|
|
32392
|
+
listItemStyles = _ref$listItemStyles === void 0 ? {} : _ref$listItemStyles,
|
|
32393
|
+
handleOpenUserProfile = _ref.handleOpenUserProfile;
|
|
32394
|
+
var _useColor = useColors(),
|
|
32395
|
+
accentColor = _useColor[THEME_COLORS.ACCENT],
|
|
32396
|
+
textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY],
|
|
32397
|
+
textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY],
|
|
32398
|
+
backgroundHovered = _useColor[THEME_COLORS.BACKGROUND_HOVERED],
|
|
32399
|
+
backgroundSections = _useColor[THEME_COLORS.BACKGROUND_SECTIONS],
|
|
32400
|
+
textOnPrimary = _useColor[THEME_COLORS.TEXT_ON_PRIMARY],
|
|
32401
|
+
border = _useColor[THEME_COLORS.BORDER];
|
|
32402
|
+
var dispatch = useDispatch();
|
|
32403
|
+
var messageMarkers = useSelector(messageMarkersSelector);
|
|
32404
|
+
var messagesMarkersLoadingState = useSelector(messagesMarkersLoadingStateSelector);
|
|
32405
|
+
var markers = React.useMemo(function () {
|
|
32406
|
+
return messageMarkers[message.channelId] && messageMarkers[message.channelId][message.id];
|
|
32407
|
+
}, [messageMarkers, message.channelId, message.id]);
|
|
32408
|
+
var _useState = React.useState(((_tabsOrder$ = tabsOrder[0]) === null || _tabsOrder$ === void 0 ? void 0 : _tabsOrder$.key) || 'played'),
|
|
32409
|
+
activeTab = _useState[0],
|
|
32410
|
+
setActiveTab = _useState[1];
|
|
32411
|
+
var _useState2 = React.useState(false),
|
|
32412
|
+
open = _useState2[0],
|
|
32413
|
+
setOpen = _useState2[1];
|
|
32414
|
+
var rootRef = React.useRef(null);
|
|
32415
|
+
var _useState3 = React.useState(false),
|
|
32416
|
+
flipAbove = _useState3[0],
|
|
32417
|
+
setFlipAbove = _useState3[1];
|
|
32418
|
+
var panelRef = React.useRef(null);
|
|
32419
|
+
var contentRef = React.useRef(null);
|
|
32420
|
+
var tabsRef = React.useRef(null);
|
|
32421
|
+
var listRef = React.useRef(null);
|
|
32422
|
+
var _useState4 = React.useState(0),
|
|
32423
|
+
panelHeightPx = _useState4[0],
|
|
32424
|
+
setPanelHeightPx = _useState4[1];
|
|
32425
|
+
var _useState5 = React.useState(false),
|
|
32426
|
+
isTransitioning = _useState5[0],
|
|
32427
|
+
setIsTransitioning = _useState5[1];
|
|
32428
|
+
var _useState6 = React.useState(false),
|
|
32429
|
+
ready = _useState6[0],
|
|
32430
|
+
setReady = _useState6[1];
|
|
32431
|
+
var _useState7 = React.useState(false),
|
|
32432
|
+
flipLocked = _useState7[0],
|
|
32433
|
+
setFlipLocked = _useState7[1];
|
|
32434
|
+
var activeMarkers = React.useMemo(function () {
|
|
32435
|
+
var list = markers && markers[activeTab] || [];
|
|
32436
|
+
return Array.isArray(list) ? [].concat(list).sort(sortByDateDesc) : [];
|
|
32437
|
+
}, [markers, activeTab]);
|
|
32438
|
+
var rowHeightPx = React.useMemo(function () {
|
|
32439
|
+
return (avatarSize || 32) + 24;
|
|
32440
|
+
}, [avatarSize]);
|
|
32441
|
+
var listMaxHeightPx = React.useMemo(function () {
|
|
32442
|
+
return rowHeightPx * 5 - 16;
|
|
32443
|
+
}, [rowHeightPx]);
|
|
32444
|
+
var tabItems = tabsOrder.map(function (tab) {
|
|
32445
|
+
switch (tab.key) {
|
|
32446
|
+
case 'played':
|
|
32447
|
+
return {
|
|
32448
|
+
key: tab.key,
|
|
32449
|
+
label: (labels === null || labels === void 0 ? void 0 : labels.playedBy) || 'Played by',
|
|
32450
|
+
data: activeMarkers
|
|
32451
|
+
};
|
|
32452
|
+
case 'received':
|
|
32453
|
+
return {
|
|
32454
|
+
key: tab.key,
|
|
32455
|
+
label: (labels === null || labels === void 0 ? void 0 : labels.receivedBy) || 'Delivered to',
|
|
32456
|
+
data: activeMarkers
|
|
32457
|
+
};
|
|
32458
|
+
case 'displayed':
|
|
32459
|
+
default:
|
|
32460
|
+
return {
|
|
32461
|
+
key: 'displayed',
|
|
32462
|
+
label: (labels === null || labels === void 0 ? void 0 : labels.displayedBy) || 'Seen by',
|
|
32463
|
+
data: activeMarkers
|
|
32464
|
+
};
|
|
32465
|
+
}
|
|
32466
|
+
});
|
|
32467
|
+
var renderRow = function renderRow(marker) {
|
|
32468
|
+
var displayName = marker.user ? marker.user.firstName || marker.user.id : 'Deleted User';
|
|
32469
|
+
var avatarUrl = marker.user ? marker.user.avatarUrl : '';
|
|
32470
|
+
var dateVal = marker.createdAt || marker.createAt;
|
|
32471
|
+
var dateFormat = dateVal ? formatDate(new Date(dateVal)) : '';
|
|
32472
|
+
var node = /*#__PURE__*/React__default.createElement(Row$1, {
|
|
32473
|
+
backgroundHover: listItemStyles.hoverBackground || backgroundHovered,
|
|
32474
|
+
onClick: function onClick() {
|
|
32475
|
+
return handleOpenUserProfile === null || handleOpenUserProfile === void 0 ? void 0 : handleOpenUserProfile(marker.user);
|
|
32476
|
+
}
|
|
32477
|
+
}, /*#__PURE__*/React__default.createElement(Avatar, {
|
|
32478
|
+
name: displayName,
|
|
32479
|
+
image: avatarUrl,
|
|
32480
|
+
size: avatarSize,
|
|
32481
|
+
textSize: 12,
|
|
32482
|
+
setDefaultAvatar: true
|
|
32483
|
+
}), /*#__PURE__*/React__default.createElement(RowInfo, null, /*#__PURE__*/React__default.createElement(RowTitle, {
|
|
32484
|
+
color: listItemStyles.nameColor || textPrimary
|
|
32485
|
+
}, displayName), /*#__PURE__*/React__default.createElement(RowDate, {
|
|
32486
|
+
color: listItemStyles.dateColor || textSecondary
|
|
32487
|
+
}, dateFormat)));
|
|
32488
|
+
return renderItem ? renderItem(marker, node) : node;
|
|
32489
|
+
};
|
|
32490
|
+
React.useLayoutEffect(function () {
|
|
32491
|
+
var _rootRef$current;
|
|
32492
|
+
var container = document.getElementById('scrollableDiv');
|
|
32493
|
+
var anchorEl = (_rootRef$current = rootRef.current) === null || _rootRef$current === void 0 ? void 0 : _rootRef$current.parentElement;
|
|
32494
|
+
if (container && anchorEl) {
|
|
32495
|
+
var containerRect = container.getBoundingClientRect();
|
|
32496
|
+
var anchorRect = anchorEl.getBoundingClientRect();
|
|
32497
|
+
var contentEl = contentRef.current;
|
|
32498
|
+
var tabsEl = tabsRef.current;
|
|
32499
|
+
var listEl = listRef.current;
|
|
32500
|
+
var cs = contentEl ? getComputedStyle(contentEl) : {};
|
|
32501
|
+
var padTop = parseFloat((cs === null || cs === void 0 ? void 0 : cs.paddingTop) || '0') || 0;
|
|
32502
|
+
var padBottom = parseFloat((cs === null || cs === void 0 ? void 0 : cs.paddingBottom) || '0') || 0;
|
|
32503
|
+
var contentPaddingY = padTop + padBottom;
|
|
32504
|
+
var tabsHeight = tabsEl ? tabsEl.getBoundingClientRect().height : 0;
|
|
32505
|
+
var tabsMarginBottom = 8;
|
|
32506
|
+
var listMarginTop = 8;
|
|
32507
|
+
var desiredListHeight = Math.min(listEl ? listEl.scrollHeight : 0, listMaxHeightPx);
|
|
32508
|
+
var desiredHeight = contentPaddingY + tabsHeight + tabsMarginBottom + listMarginTop + desiredListHeight;
|
|
32509
|
+
var maxPx = parseInt(String(height || '300'), 10) || 300;
|
|
32510
|
+
var measuredTarget = Math.min(desiredHeight || 0, maxPx);
|
|
32511
|
+
var flipTarget = messagesMarkersLoadingState === LOADING_STATE.LOADING ? maxPx : measuredTarget;
|
|
32512
|
+
setPanelHeightPx(measuredTarget);
|
|
32513
|
+
var availableBelow = containerRect.bottom - anchorRect.bottom - 8;
|
|
32514
|
+
var availableAbove = anchorRect.top - containerRect.top - 8;
|
|
32515
|
+
var nextFlip = Boolean(flipTarget > availableBelow && flipTarget <= availableAbove);
|
|
32516
|
+
setFlipAbove(nextFlip);
|
|
32517
|
+
}
|
|
32518
|
+
setIsTransitioning(true);
|
|
32519
|
+
setOpen(true);
|
|
32520
|
+
setReady(true);
|
|
32521
|
+
setFlipLocked(true);
|
|
32522
|
+
}, []);
|
|
32523
|
+
React.useEffect(function () {
|
|
32524
|
+
var onDown = function onDown(e) {
|
|
32525
|
+
if (rootRef.current && !rootRef.current.contains(e.target)) {
|
|
32526
|
+
togglePopup();
|
|
32527
|
+
}
|
|
32528
|
+
};
|
|
32529
|
+
document.addEventListener('mousedown', onDown);
|
|
32530
|
+
return function () {
|
|
32531
|
+
document.removeEventListener('mousedown', onDown);
|
|
32532
|
+
};
|
|
32533
|
+
}, []);
|
|
32534
|
+
React.useEffect(function () {
|
|
32535
|
+
var container = document.getElementById('scrollableDiv');
|
|
32536
|
+
if (!container) return;
|
|
32537
|
+
var recalc = function recalc() {
|
|
32538
|
+
if (!rootRef.current || !ready) return;
|
|
32539
|
+
if (messagesMarkersLoadingState === LOADING_STATE.LOADING) return;
|
|
32540
|
+
var containerRect = container.getBoundingClientRect();
|
|
32541
|
+
var anchorEl = rootRef.current.parentElement;
|
|
32542
|
+
if (!anchorEl) return;
|
|
32543
|
+
var anchorRect = anchorEl.getBoundingClientRect();
|
|
32544
|
+
var dropdownHeight = panelHeightPx || 0;
|
|
32545
|
+
if (!dropdownHeight || dropdownHeight < 8) {
|
|
32546
|
+
var parsed = parseInt(String(height || '300'), 10);
|
|
32547
|
+
dropdownHeight = isNaN(parsed) ? 300 : parsed;
|
|
32548
|
+
}
|
|
32549
|
+
var availableBelow = containerRect.bottom - anchorRect.bottom - 8;
|
|
32550
|
+
var availableAbove = anchorRect.top - containerRect.top - 8;
|
|
32551
|
+
var overflowBelow = dropdownHeight > availableBelow;
|
|
32552
|
+
var overflowAbove = dropdownHeight > availableAbove;
|
|
32553
|
+
if (!isTransitioning && !flipLocked) {
|
|
32554
|
+
setFlipAbove(function (prev) {
|
|
32555
|
+
if (prev) {
|
|
32556
|
+
if (overflowAbove && !overflowBelow) return false;
|
|
32557
|
+
return true;
|
|
32558
|
+
}
|
|
32559
|
+
if (overflowBelow && !overflowAbove) return true;
|
|
32560
|
+
return false;
|
|
32561
|
+
});
|
|
32562
|
+
}
|
|
32563
|
+
};
|
|
32564
|
+
if (open) {
|
|
32565
|
+
recalc();
|
|
32566
|
+
var raf1 = requestAnimationFrame(recalc);
|
|
32567
|
+
var raf2 = requestAnimationFrame(function () {
|
|
32568
|
+
return requestAnimationFrame(recalc);
|
|
32569
|
+
});
|
|
32570
|
+
var t1 = setTimeout(recalc, 50);
|
|
32571
|
+
var t2 = setTimeout(recalc, 200);
|
|
32572
|
+
panelRef.current && panelRef.current.addEventListener('transitionend', recalc);
|
|
32573
|
+
container.addEventListener('scroll', recalc);
|
|
32574
|
+
window.addEventListener('resize', recalc);
|
|
32575
|
+
return function () {
|
|
32576
|
+
cancelAnimationFrame(raf1);
|
|
32577
|
+
cancelAnimationFrame(raf2);
|
|
32578
|
+
clearTimeout(t1);
|
|
32579
|
+
clearTimeout(t2);
|
|
32580
|
+
panelRef.current && panelRef.current.removeEventListener('transitionend', recalc);
|
|
32581
|
+
container.removeEventListener('scroll', recalc);
|
|
32582
|
+
window.removeEventListener('resize', recalc);
|
|
32583
|
+
};
|
|
32584
|
+
} else {
|
|
32585
|
+
container.addEventListener('scroll', recalc);
|
|
32586
|
+
window.addEventListener('resize', recalc);
|
|
32587
|
+
return function () {
|
|
32588
|
+
container.removeEventListener('scroll', recalc);
|
|
32589
|
+
window.removeEventListener('resize', recalc);
|
|
32590
|
+
};
|
|
32591
|
+
}
|
|
32592
|
+
}, [open, ready, message.id, panelHeightPx, isTransitioning, flipLocked, height]);
|
|
32593
|
+
React.useLayoutEffect(function () {
|
|
32594
|
+
var _rootRef$current2;
|
|
32595
|
+
var container = document.getElementById('scrollableDiv');
|
|
32596
|
+
var anchorEl = (_rootRef$current2 = rootRef.current) === null || _rootRef$current2 === void 0 ? void 0 : _rootRef$current2.parentElement;
|
|
32597
|
+
if (!container || !anchorEl || !ready) return;
|
|
32598
|
+
var containerRect = container.getBoundingClientRect();
|
|
32599
|
+
var anchorRect = anchorEl.getBoundingClientRect();
|
|
32600
|
+
var contentEl = contentRef.current;
|
|
32601
|
+
var tabsEl = tabsRef.current;
|
|
32602
|
+
var listEl = listRef.current;
|
|
32603
|
+
var cs = contentEl ? getComputedStyle(contentEl) : {};
|
|
32604
|
+
var padTop = parseFloat((cs === null || cs === void 0 ? void 0 : cs.paddingTop) || '0') || 0;
|
|
32605
|
+
var padBottom = parseFloat((cs === null || cs === void 0 ? void 0 : cs.paddingBottom) || '0') || 0;
|
|
32606
|
+
var contentPaddingY = padTop + padBottom;
|
|
32607
|
+
var tabsHeight = tabsEl ? tabsEl.getBoundingClientRect().height : 0;
|
|
32608
|
+
var tabsMarginBottom = 8;
|
|
32609
|
+
var listMarginTop = 8;
|
|
32610
|
+
var desiredListHeight = Math.min(listEl ? listEl.scrollHeight : 0, listMaxHeightPx);
|
|
32611
|
+
var desiredHeight = contentPaddingY + tabsHeight + tabsMarginBottom + listMarginTop + desiredListHeight;
|
|
32612
|
+
var maxPx = parseInt(String(height || '300'), 10);
|
|
32613
|
+
var measuredTarget = Math.min(desiredHeight || 0, isNaN(maxPx) ? 300 : Math.min(maxPx, desiredHeight));
|
|
32614
|
+
var nextHeight = Math.max(panelHeightPx || 0, measuredTarget);
|
|
32615
|
+
var availableBelow = containerRect.bottom - anchorRect.bottom - 8;
|
|
32616
|
+
var availableAbove = anchorRect.top - containerRect.top - 8;
|
|
32617
|
+
setFlipLocked(true);
|
|
32618
|
+
if (messagesMarkersLoadingState !== LOADING_STATE.LOADING) {
|
|
32619
|
+
var overflowBelow = nextHeight > availableBelow;
|
|
32620
|
+
var overflowAbove = nextHeight > availableAbove;
|
|
32621
|
+
setFlipAbove(function (prev) {
|
|
32622
|
+
if (prev) {
|
|
32623
|
+
if (overflowAbove && !overflowBelow) return false;
|
|
32624
|
+
return true;
|
|
32625
|
+
}
|
|
32626
|
+
if (overflowBelow && !overflowAbove) return true;
|
|
32627
|
+
return false;
|
|
32628
|
+
});
|
|
32629
|
+
}
|
|
32630
|
+
if (panelHeightPx !== nextHeight) {
|
|
32631
|
+
setIsTransitioning(true);
|
|
32632
|
+
setPanelHeightPx(nextHeight);
|
|
32633
|
+
}
|
|
32634
|
+
}, [ready, panelHeightPx, activeMarkers.length, messagesMarkersLoadingState, height]);
|
|
32635
|
+
React.useEffect(function () {
|
|
32636
|
+
if (messagesMarkersLoadingState === LOADING_STATE.LOADING) {
|
|
32637
|
+
setFlipLocked(true);
|
|
32638
|
+
}
|
|
32639
|
+
}, [messagesMarkersLoadingState]);
|
|
32640
|
+
React.useEffect(function () {
|
|
32641
|
+
var el = panelRef.current;
|
|
32642
|
+
if (!el) return;
|
|
32643
|
+
var onEnd = function onEnd(e) {
|
|
32644
|
+
if (e.propertyName === 'height') {
|
|
32645
|
+
setIsTransitioning(false);
|
|
32646
|
+
setTimeout(function () {
|
|
32647
|
+
setFlipLocked(false);
|
|
32648
|
+
}, 50);
|
|
32649
|
+
}
|
|
32650
|
+
};
|
|
32651
|
+
el.addEventListener('transitionend', onEnd);
|
|
32652
|
+
return function () {
|
|
32653
|
+
el.removeEventListener('transitionend', onEnd);
|
|
32654
|
+
};
|
|
32655
|
+
}, []);
|
|
32656
|
+
React.useEffect(function () {
|
|
32657
|
+
if (activeTab && message.id && message.channelId) {
|
|
32658
|
+
dispatch(getMessageMarkersAC(message.id, message.channelId, activeTab));
|
|
32659
|
+
}
|
|
32660
|
+
}, [activeTab, message.id, message.channelId]);
|
|
32661
|
+
return /*#__PURE__*/React__default.createElement(DropdownRoot, {
|
|
32662
|
+
ref: rootRef,
|
|
32663
|
+
rtl: message.incoming,
|
|
32664
|
+
backgroundColor: backgroundSections,
|
|
32665
|
+
flip: flipAbove,
|
|
32666
|
+
ready: ready
|
|
32667
|
+
}, /*#__PURE__*/React__default.createElement(Panel, {
|
|
32668
|
+
ref: panelRef,
|
|
32669
|
+
bg: backgroundSections,
|
|
32670
|
+
open: open,
|
|
32671
|
+
heightPx: panelHeightPx,
|
|
32672
|
+
maxHeight: height,
|
|
32673
|
+
maxWidth: maxWidth,
|
|
32674
|
+
minWidth: minWidth
|
|
32675
|
+
}, /*#__PURE__*/React__default.createElement(Content, {
|
|
32676
|
+
ref: contentRef
|
|
32677
|
+
}, /*#__PURE__*/React__default.createElement(Tabs, {
|
|
32678
|
+
ref: tabsRef
|
|
32679
|
+
}, tabItems.map(function (tab) {
|
|
32680
|
+
return /*#__PURE__*/React__default.createElement(Tab, {
|
|
32681
|
+
key: tab.key,
|
|
32682
|
+
active: activeTab === tab.key,
|
|
32683
|
+
activeColor: tabsStyles.activeColor || textOnPrimary,
|
|
32684
|
+
inactiveColor: tabsStyles.inactiveColor || textSecondary,
|
|
32685
|
+
onClick: function onClick() {
|
|
32686
|
+
return setActiveTab(tab.key);
|
|
32687
|
+
},
|
|
32688
|
+
textOnPrimary: textOnPrimary,
|
|
32689
|
+
textSecondary: textSecondary,
|
|
32690
|
+
background: activeTab === tab.key ? accentColor : 'transparent',
|
|
32691
|
+
borderColor: border
|
|
32692
|
+
}, tab.label, showCounts ? " (" + tab.data.length + ")" : '');
|
|
32693
|
+
})), /*#__PURE__*/React__default.createElement(List$1, {
|
|
32694
|
+
ref: listRef,
|
|
32695
|
+
maxHeight: listMaxHeightPx
|
|
32696
|
+
}, activeMarkers.map(function (marker) {
|
|
32697
|
+
var _marker$user;
|
|
32698
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
32699
|
+
key: (((_marker$user = marker.user) === null || _marker$user === void 0 ? void 0 : _marker$user.id) || 'deleted') + "-" + (marker.createdAt || '')
|
|
32700
|
+
}, renderRow(marker));
|
|
32701
|
+
}), !activeMarkers.length && messagesMarkersLoadingState !== LOADING_STATE.LOADING && (/*#__PURE__*/React__default.createElement(Empty, {
|
|
32702
|
+
color: textSecondary
|
|
32703
|
+
}, "No results"))))));
|
|
32704
|
+
};
|
|
32705
|
+
function sortByDateDesc(a, b) {
|
|
32706
|
+
var aDate = a.createdAt || a.createAt;
|
|
32707
|
+
var bDate = b.createdAt || b.createAt;
|
|
32708
|
+
var aTime = aDate ? new Date(aDate).getTime() : 0;
|
|
32709
|
+
var bTime = bDate ? new Date(bDate).getTime() : 0;
|
|
32710
|
+
return bTime - aTime;
|
|
32711
|
+
}
|
|
32712
|
+
var Tabs = styled__default.div(_templateObject$C || (_templateObject$C = _taggedTemplateLiteralLoose(["\n display: flex;\n gap: 8px;\n justify-content: start;\n margin-bottom: 8px;\n"])));
|
|
32713
|
+
var Tab = styled__default.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) {
|
|
32714
|
+
return p.active ? p.textOnPrimary : p.textSecondary;
|
|
32715
|
+
}, function (p) {
|
|
32716
|
+
return p.background;
|
|
32717
|
+
}, function (p) {
|
|
32718
|
+
return p.active ? p.background : p.borderColor;
|
|
32719
|
+
});
|
|
32720
|
+
var List$1 = styled__default.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) {
|
|
32721
|
+
return p.maxHeight ? p.maxHeight + "px" : 'unset';
|
|
32722
|
+
});
|
|
32723
|
+
var Row$1 = styled__default.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) {
|
|
32724
|
+
return p.backgroundHover;
|
|
32725
|
+
});
|
|
32726
|
+
var RowInfo = styled__default.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"])));
|
|
32727
|
+
var RowTitle = styled__default.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) {
|
|
32728
|
+
return p.color;
|
|
32729
|
+
});
|
|
32730
|
+
var RowDate = styled__default.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) {
|
|
32731
|
+
return p.color;
|
|
32732
|
+
});
|
|
32733
|
+
var Empty = styled__default.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) {
|
|
32734
|
+
return p.color;
|
|
32735
|
+
});
|
|
32736
|
+
var DropdownRoot = styled__default.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) {
|
|
32737
|
+
return p.flip ? 'auto' : 'calc(100% + 8px)';
|
|
32738
|
+
}, function (p) {
|
|
32739
|
+
return p.flip ? 'calc(100% + 8px)' : 'auto';
|
|
32740
|
+
}, function (p) {
|
|
32741
|
+
return p.rtl ? 'left: 4%;' : 'right: 4%;';
|
|
32742
|
+
}, function (_ref2) {
|
|
32743
|
+
var backgroundColor = _ref2.backgroundColor;
|
|
32744
|
+
return backgroundColor;
|
|
32745
|
+
}, function (p) {
|
|
32746
|
+
return p.ready ? 'visible' : 'hidden';
|
|
32747
|
+
});
|
|
32748
|
+
var Panel = styled__default.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) {
|
|
32749
|
+
return p.bg;
|
|
32750
|
+
}, function (p) {
|
|
32751
|
+
return p.open ? Math.min(p.heightPx || 0, parseInt(String(p.maxHeight || '300'), 10) || 300) + "px" : '0';
|
|
32752
|
+
}, function (p) {
|
|
32753
|
+
return p.maxWidth || '340px';
|
|
32754
|
+
}, function (p) {
|
|
32755
|
+
return p.minWidth || '340px';
|
|
32756
|
+
});
|
|
32757
|
+
var Content = styled__default.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"])));
|
|
32758
|
+
|
|
32759
|
+
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;
|
|
32083
32760
|
var Message$1 = function Message(_ref) {
|
|
32084
32761
|
var message = _ref.message,
|
|
32085
32762
|
channel = _ref.channel,
|
|
@@ -32139,6 +32816,8 @@ var Message$1 = function Message(_ref) {
|
|
|
32139
32816
|
deleteMessage = _ref$deleteMessage === void 0 ? true : _ref$deleteMessage,
|
|
32140
32817
|
_ref$selectMessage = _ref.selectMessage,
|
|
32141
32818
|
selectMessage = _ref$selectMessage === void 0 ? true : _ref$selectMessage,
|
|
32819
|
+
_ref$showInfoMessage = _ref.showInfoMessage,
|
|
32820
|
+
showInfoMessage = _ref$showInfoMessage === void 0 ? true : _ref$showInfoMessage,
|
|
32142
32821
|
allowEditDeleteIncomingMessage = _ref.allowEditDeleteIncomingMessage,
|
|
32143
32822
|
_ref$forwardMessage = _ref.forwardMessage,
|
|
32144
32823
|
forwardMessage = _ref$forwardMessage === void 0 ? true : _ref$forwardMessage,
|
|
@@ -32167,6 +32846,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32167
32846
|
selectIconOrder = _ref.selectIconOrder,
|
|
32168
32847
|
starIconOrder = _ref.starIconOrder,
|
|
32169
32848
|
reportIconOrder = _ref.reportIconOrder,
|
|
32849
|
+
infoIconOrder = _ref.infoIconOrder,
|
|
32170
32850
|
reactionIconTooltipText = _ref.reactionIconTooltipText,
|
|
32171
32851
|
editIconTooltipText = _ref.editIconTooltipText,
|
|
32172
32852
|
copyIconTooltipText = _ref.copyIconTooltipText,
|
|
@@ -32177,6 +32857,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32177
32857
|
selectIconTooltipText = _ref.selectIconTooltipText,
|
|
32178
32858
|
starIconTooltipText = _ref.starIconTooltipText,
|
|
32179
32859
|
reportIconTooltipText = _ref.reportIconTooltipText,
|
|
32860
|
+
infoIconTooltipText = _ref.infoIconTooltipText,
|
|
32180
32861
|
messageActionIconsColor = _ref.messageActionIconsColor,
|
|
32181
32862
|
messageStatusSize = _ref.messageStatusSize,
|
|
32182
32863
|
messageStatusColor = _ref.messageStatusColor,
|
|
@@ -32228,7 +32909,9 @@ var Message$1 = function Message(_ref) {
|
|
|
32228
32909
|
messageTextFontSize = _ref.messageTextFontSize,
|
|
32229
32910
|
messageTextLineHeight = _ref.messageTextLineHeight,
|
|
32230
32911
|
messageTimeColorOnAttachment = _ref.messageTimeColorOnAttachment,
|
|
32231
|
-
shouldOpenUserProfileForMention = _ref.shouldOpenUserProfileForMention
|
|
32912
|
+
shouldOpenUserProfileForMention = _ref.shouldOpenUserProfileForMention,
|
|
32913
|
+
_ref$showInfoMessageP = _ref.showInfoMessageProps,
|
|
32914
|
+
showInfoMessageProps = _ref$showInfoMessageP === void 0 ? {} : _ref$showInfoMessageP;
|
|
32232
32915
|
var _useColor = useColors(),
|
|
32233
32916
|
accentColor = _useColor[THEME_COLORS.ACCENT],
|
|
32234
32917
|
backgroundSections = _useColor[THEME_COLORS.BACKGROUND_SECTIONS],
|
|
@@ -32250,29 +32933,32 @@ var Message$1 = function Message(_ref) {
|
|
|
32250
32933
|
reportPopupOpen = _useState3[0],
|
|
32251
32934
|
setReportPopupOpen = _useState3[1];
|
|
32252
32935
|
var _useState4 = React.useState(false),
|
|
32253
|
-
|
|
32254
|
-
|
|
32936
|
+
infoPopupOpen = _useState4[0],
|
|
32937
|
+
setInfoPopupOpen = _useState4[1];
|
|
32255
32938
|
var _useState5 = React.useState(false),
|
|
32256
|
-
|
|
32257
|
-
|
|
32939
|
+
messageActionsShow = _useState5[0],
|
|
32940
|
+
setMessageActionsShow = _useState5[1];
|
|
32258
32941
|
var _useState6 = React.useState(false),
|
|
32259
|
-
|
|
32260
|
-
|
|
32942
|
+
emojisPopupOpen = _useState6[0],
|
|
32943
|
+
setEmojisPopupOpen = _useState6[1];
|
|
32261
32944
|
var _useState7 = React.useState(false),
|
|
32262
|
-
|
|
32263
|
-
|
|
32264
|
-
var _useState8 = React.useState(
|
|
32265
|
-
|
|
32266
|
-
|
|
32267
|
-
var _useState9 = React.useState(
|
|
32268
|
-
|
|
32269
|
-
|
|
32270
|
-
var _useState0 = React.useState(
|
|
32945
|
+
frequentlyEmojisOpen = _useState7[0],
|
|
32946
|
+
setFrequentlyEmojisOpen = _useState7[1];
|
|
32947
|
+
var _useState8 = React.useState(false),
|
|
32948
|
+
reactionsPopupOpen = _useState8[0],
|
|
32949
|
+
setReactionsPopupOpen = _useState8[1];
|
|
32950
|
+
var _useState9 = React.useState(0),
|
|
32951
|
+
reactionsPopupPosition = _useState9[0],
|
|
32952
|
+
setReactionsPopupPosition = _useState9[1];
|
|
32953
|
+
var _useState0 = React.useState(''),
|
|
32954
|
+
emojisPopupPosition = _useState0[0],
|
|
32955
|
+
setEmojisPopupPosition = _useState0[1];
|
|
32956
|
+
var _useState1 = React.useState({
|
|
32271
32957
|
left: 0,
|
|
32272
32958
|
right: 0
|
|
32273
32959
|
}),
|
|
32274
|
-
reactionsPopupHorizontalPosition =
|
|
32275
|
-
setReactionsPopupHorizontalPosition =
|
|
32960
|
+
reactionsPopupHorizontalPosition = _useState1[0],
|
|
32961
|
+
setReactionsPopupHorizontalPosition = _useState1[1];
|
|
32276
32962
|
var scrollToNewMessage = useSelector(scrollToNewMessageSelector, reactRedux.shallowEqual);
|
|
32277
32963
|
var messageItemRef = React.useRef();
|
|
32278
32964
|
var isVisible = useOnScreen(messageItemRef);
|
|
@@ -32308,6 +32994,11 @@ var Message$1 = function Message(_ref) {
|
|
|
32308
32994
|
setMessageActionsShow(false);
|
|
32309
32995
|
stopScrolling(!forwardPopupOpen);
|
|
32310
32996
|
};
|
|
32997
|
+
var handleToggleInfoMessagePopupOpen = function handleToggleInfoMessagePopupOpen() {
|
|
32998
|
+
setInfoPopupOpen(!infoPopupOpen);
|
|
32999
|
+
setMessageActionsShow(false);
|
|
33000
|
+
};
|
|
33001
|
+
console.log('infoPopupOpen', infoPopupOpen);
|
|
32311
33002
|
var handleReplyMessage = function handleReplyMessage(threadReply) {
|
|
32312
33003
|
if (threadReply) ; else {
|
|
32313
33004
|
dispatch(setMessageForReplyAC(message));
|
|
@@ -32565,6 +33256,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32565
33256
|
emojisPopupPosition: emojisPopupPosition,
|
|
32566
33257
|
handleSetMessageForEdit: toggleEditMode,
|
|
32567
33258
|
handleResendMessage: handleResendMessage,
|
|
33259
|
+
handleOpenInfoMessage: handleToggleInfoMessagePopupOpen,
|
|
32568
33260
|
handleOpenDeleteMessage: handleToggleDeleteMessagePopup,
|
|
32569
33261
|
handleOpenForwardMessage: handleToggleForwardMessagePopup,
|
|
32570
33262
|
handleCopyMessage: handleCopyMessage,
|
|
@@ -32617,6 +33309,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32617
33309
|
replyMessageInThread: replyMessageInThread,
|
|
32618
33310
|
deleteMessage: deleteMessage,
|
|
32619
33311
|
selectMessage: selectMessage,
|
|
33312
|
+
showInfoMessage: showInfoMessage,
|
|
32620
33313
|
allowEditDeleteIncomingMessage: allowEditDeleteIncomingMessage,
|
|
32621
33314
|
forwardMessage: forwardMessage,
|
|
32622
33315
|
reportMessage: reportMessage,
|
|
@@ -32641,6 +33334,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32641
33334
|
selectIconOrder: selectIconOrder,
|
|
32642
33335
|
starIconOrder: starIconOrder,
|
|
32643
33336
|
reportIconOrder: reportIconOrder,
|
|
33337
|
+
infoIconOrder: infoIconOrder,
|
|
32644
33338
|
reactionIconTooltipText: reactionIconTooltipText,
|
|
32645
33339
|
editIconTooltipText: editIconTooltipText,
|
|
32646
33340
|
copyIconTooltipText: copyIconTooltipText,
|
|
@@ -32651,6 +33345,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32651
33345
|
selectIconTooltipText: selectIconTooltipText,
|
|
32652
33346
|
starIconTooltipText: starIconTooltipText,
|
|
32653
33347
|
reportIconTooltipText: reportIconTooltipText,
|
|
33348
|
+
infoIconTooltipText: infoIconTooltipText,
|
|
32654
33349
|
messageActionIconsColor: messageActionIconsColor,
|
|
32655
33350
|
messageStatusSize: messageStatusSize,
|
|
32656
33351
|
messageStatusColor: messageStatusColor,
|
|
@@ -32684,6 +33379,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32684
33379
|
setMessageActionsShow: setMessageActionsShow,
|
|
32685
33380
|
closeMessageActions: closeMessageActions,
|
|
32686
33381
|
handleToggleForwardMessagePopup: handleToggleForwardMessagePopup,
|
|
33382
|
+
handleToggleInfoMessagePopupOpen: handleToggleInfoMessagePopupOpen,
|
|
32687
33383
|
handleReplyMessage: handleReplyMessage,
|
|
32688
33384
|
handleToggleDeleteMessagePopup: handleToggleDeleteMessagePopup,
|
|
32689
33385
|
handleToggleReportPopupOpen: handleToggleReportPopupOpen,
|
|
@@ -32737,7 +33433,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32737
33433
|
handleAddDeleteEmoji: handleReactionAddDelete,
|
|
32738
33434
|
reactionsDetailsPopupBorderRadius: reactionsDetailsPopupBorderRadius,
|
|
32739
33435
|
reactionsDetailsPopupHeaderItemsStyle: reactionsDetailsPopupHeaderItemsStyle
|
|
32740
|
-
})),
|
|
33436
|
+
})), /*#__PURE__*/React__default.createElement(ReactionsContainer, {
|
|
32741
33437
|
id: message.id + "_reactions_container",
|
|
32742
33438
|
border: reactionsContainerBorder,
|
|
32743
33439
|
boxShadow: reactionsContainerBoxShadow,
|
|
@@ -32745,8 +33441,9 @@ var Message$1 = function Message(_ref) {
|
|
|
32745
33441
|
topPosition: reactionsContainerTopPosition,
|
|
32746
33442
|
padding: reactionsContainerPadding,
|
|
32747
33443
|
backgroundColor: reactionsContainerBackground || backgroundSections,
|
|
32748
|
-
rtlDirection: ownMessageOnRightSide && !message.incoming
|
|
32749
|
-
|
|
33444
|
+
rtlDirection: ownMessageOnRightSide && !message.incoming,
|
|
33445
|
+
isReacted: message.reactionTotals && message.reactionTotals.length > 0
|
|
33446
|
+
}, message.reactionTotals && message.reactionTotals.length && (/*#__PURE__*/React__default.createElement(MessageReactionsCont, {
|
|
32750
33447
|
rtlDirection: ownMessageOnRightSide && !message.incoming,
|
|
32751
33448
|
onClick: handleToggleReactionsPopup
|
|
32752
33449
|
}, message.reactionTotals.slice(0, reactionsDisplayCount || 5).map(function (summery) {
|
|
@@ -32790,16 +33487,21 @@ var Message$1 = function Message(_ref) {
|
|
|
32790
33487
|
togglePopup: handleToggleForwardMessagePopup,
|
|
32791
33488
|
buttonText: 'Forward',
|
|
32792
33489
|
title: 'Forward message'
|
|
32793
|
-
}))
|
|
33490
|
+
})), infoPopupOpen && (/*#__PURE__*/React__default.createElement(MessageInfo, Object.assign({
|
|
33491
|
+
message: message,
|
|
33492
|
+
togglePopup: handleToggleInfoMessagePopupOpen
|
|
33493
|
+
}, showInfoMessageProps, {
|
|
33494
|
+
handleOpenUserProfile: handleOpenUserProfile
|
|
33495
|
+
}))));
|
|
32794
33496
|
};
|
|
32795
33497
|
var Message$2 = /*#__PURE__*/React__default.memo(Message$1, function (prevProps, nextProps) {
|
|
32796
33498
|
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;
|
|
32797
33499
|
});
|
|
32798
|
-
var MessageReactionKey = styled__default.span(_templateObject$
|
|
32799
|
-
var ReactionItemCount = styled__default.span(_templateObject2$
|
|
33500
|
+
var MessageReactionKey = styled__default.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"])));
|
|
33501
|
+
var ReactionItemCount = styled__default.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) {
|
|
32800
33502
|
return props.color;
|
|
32801
33503
|
});
|
|
32802
|
-
var MessageReaction = styled__default.span(_templateObject3$
|
|
33504
|
+
var MessageReaction = styled__default.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) {
|
|
32803
33505
|
return props.margin || '0 8px 0 0';
|
|
32804
33506
|
}, function (props) {
|
|
32805
33507
|
return props.isLastReaction && '0';
|
|
@@ -32818,26 +33520,26 @@ var MessageReaction = styled__default.span(_templateObject3$r || (_templateObjec
|
|
|
32818
33520
|
}, function (props) {
|
|
32819
33521
|
return props.backgroundColor;
|
|
32820
33522
|
});
|
|
32821
|
-
var ThreadMessageCountContainer = styled__default.div(_templateObject4$
|
|
33523
|
+
var ThreadMessageCountContainer = styled__default.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) {
|
|
32822
33524
|
return props.color;
|
|
32823
33525
|
});
|
|
32824
|
-
var FailedMessageIcon = styled__default.div(_templateObject5$
|
|
33526
|
+
var FailedMessageIcon = styled__default.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) {
|
|
32825
33527
|
return !props.rtl && '-24px';
|
|
32826
33528
|
}, function (props) {
|
|
32827
33529
|
return props.rtl && '-24px';
|
|
32828
33530
|
});
|
|
32829
|
-
var ErrorIconWrapper = styled__default(SvgErrorIcon)(_templateObject6$
|
|
32830
|
-
var SelectMessageWrapper = styled__default.div(_templateObject7$
|
|
33531
|
+
var ErrorIconWrapper = styled__default(SvgErrorIcon)(_templateObject6$h || (_templateObject6$h = _taggedTemplateLiteralLoose(["\n width: 20px;\n height: 20px;\n"])));
|
|
33532
|
+
var SelectMessageWrapper = styled__default.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) {
|
|
32831
33533
|
return !props.disabled && 'pointer';
|
|
32832
33534
|
}, function (props) {
|
|
32833
33535
|
return props.activeColor;
|
|
32834
33536
|
});
|
|
32835
|
-
var EmptySelection = styled__default.span(_templateObject8$
|
|
33537
|
+
var EmptySelection = styled__default.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) {
|
|
32836
33538
|
return props.borderColor;
|
|
32837
33539
|
}, function (props) {
|
|
32838
33540
|
return props.disabled && '0.5';
|
|
32839
33541
|
});
|
|
32840
|
-
var ReactionsContainer = styled__default.div(_templateObject9$
|
|
33542
|
+
var ReactionsContainer = styled__default.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) {
|
|
32841
33543
|
return props.rtlDirection && 'auto';
|
|
32842
33544
|
}, function (props) {
|
|
32843
33545
|
return !props.rtlDirection && 'auto';
|
|
@@ -32850,14 +33552,16 @@ var ReactionsContainer = styled__default.div(_templateObject9$b || (_templateObj
|
|
|
32850
33552
|
}, function (props) {
|
|
32851
33553
|
return props.backgroundColor;
|
|
32852
33554
|
}, function (props) {
|
|
32853
|
-
return props.padding || '4px 8px';
|
|
33555
|
+
return !props.isReacted ? '0' : props.padding || '4px 8px';
|
|
32854
33556
|
}, function (props) {
|
|
32855
33557
|
return props.topPosition && "\n position: relative;\n top: " + props.topPosition + ";\n ";
|
|
33558
|
+
}, function (props) {
|
|
33559
|
+
return props.isReacted ? '16px' : '0';
|
|
32856
33560
|
});
|
|
32857
|
-
var MessageReactionsCont = styled__default.div(_templateObject0$
|
|
33561
|
+
var MessageReactionsCont = styled__default.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) {
|
|
32858
33562
|
return props.rtlDirection && 'ltr';
|
|
32859
33563
|
});
|
|
32860
|
-
var MessageStatus$1 = styled__default.span(_templateObject1$
|
|
33564
|
+
var MessageStatus$1 = styled__default.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) {
|
|
32861
33565
|
return props.height || '14px';
|
|
32862
33566
|
});
|
|
32863
33567
|
var HiddenMessageTime$1 = styled__default.span(_templateObject10$4 || (_templateObject10$4 = _taggedTemplateLiteralLoose(["\n display: ", ";\n font-weight: 400;\n font-size: ", ";\n color: ", ";\n"])), function (props) {
|
|
@@ -32902,7 +33606,7 @@ var HiddenMessageProperty;
|
|
|
32902
33606
|
HiddenMessageProperty["hideAfterSendMessage"] = "hideAfterSendMessage";
|
|
32903
33607
|
})(HiddenMessageProperty || (HiddenMessageProperty = {}));
|
|
32904
33608
|
|
|
32905
|
-
var _templateObject$
|
|
33609
|
+
var _templateObject$E, _templateObject2$z, _templateObject3$t, _templateObject4$p, _templateObject5$l, _templateObject6$i, _templateObject7$g, _templateObject8$f, _templateObject9$d, _templateObject0$c, _templateObject1$9;
|
|
32906
33610
|
var CreateMessageDateDivider = function CreateMessageDateDivider(_ref) {
|
|
32907
33611
|
var lastIndex = _ref.lastIndex,
|
|
32908
33612
|
currentMessageDate = _ref.currentMessageDate,
|
|
@@ -32979,6 +33683,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
32979
33683
|
forwardMessage = _ref2.forwardMessage,
|
|
32980
33684
|
deleteMessage = _ref2.deleteMessage,
|
|
32981
33685
|
selectMessage = _ref2.selectMessage,
|
|
33686
|
+
showInfoMessage = _ref2.showInfoMessage,
|
|
32982
33687
|
reportMessage = _ref2.reportMessage,
|
|
32983
33688
|
reactionIcon = _ref2.reactionIcon,
|
|
32984
33689
|
editIcon = _ref2.editIcon,
|
|
@@ -33025,6 +33730,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33025
33730
|
selectIconOrder = _ref2.selectIconOrder,
|
|
33026
33731
|
starIconOrder = _ref2.starIconOrder,
|
|
33027
33732
|
reportIconOrder = _ref2.reportIconOrder,
|
|
33733
|
+
infoIconOrder = _ref2.infoIconOrder,
|
|
33028
33734
|
reactionIconTooltipText = _ref2.reactionIconTooltipText,
|
|
33029
33735
|
editIconTooltipText = _ref2.editIconTooltipText,
|
|
33030
33736
|
copyIconTooltipText = _ref2.copyIconTooltipText,
|
|
@@ -33032,6 +33738,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33032
33738
|
replyInThreadIconTooltipText = _ref2.replyInThreadIconTooltipText,
|
|
33033
33739
|
forwardIconTooltipText = _ref2.forwardIconTooltipText,
|
|
33034
33740
|
deleteIconTooltipText = _ref2.deleteIconTooltipText,
|
|
33741
|
+
infoIconTooltipText = _ref2.infoIconTooltipText,
|
|
33035
33742
|
selectIconTooltipText = _ref2.selectIconTooltipText,
|
|
33036
33743
|
starIconTooltipText = _ref2.starIconTooltipText,
|
|
33037
33744
|
reportIconTooltipText = _ref2.reportIconTooltipText,
|
|
@@ -33084,7 +33791,9 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33084
33791
|
messageTimeColor = _ref2.messageTimeColor,
|
|
33085
33792
|
messageStatusAndTimeLineHeight = _ref2.messageStatusAndTimeLineHeight,
|
|
33086
33793
|
hiddenMessagesProperties = _ref2.hiddenMessagesProperties,
|
|
33087
|
-
shouldOpenUserProfileForMention = _ref2.shouldOpenUserProfileForMention
|
|
33794
|
+
shouldOpenUserProfileForMention = _ref2.shouldOpenUserProfileForMention,
|
|
33795
|
+
_ref2$showInfoMessage = _ref2.showInfoMessageProps,
|
|
33796
|
+
showInfoMessageProps = _ref2$showInfoMessage === void 0 ? {} : _ref2$showInfoMessage;
|
|
33088
33797
|
var _useColor = useColors(),
|
|
33089
33798
|
outgoingMessageBackground = _useColor[THEME_COLORS.OUTGOING_MESSAGE_BACKGROUND],
|
|
33090
33799
|
themeBackgroundColor = _useColor[THEME_COLORS.BACKGROUND],
|
|
@@ -33174,7 +33883,14 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33174
33883
|
var text = '';
|
|
33175
33884
|
for (var i = dateLabels.length - 1; i >= 0; i--) {
|
|
33176
33885
|
var dateLabel = dateLabels[i];
|
|
33177
|
-
|
|
33886
|
+
var aroundThreshold = 40;
|
|
33887
|
+
var labelTop = dateLabel.offsetTop - 28;
|
|
33888
|
+
var labelBottom = labelTop + (dateLabel.offsetHeight || 0) - 28;
|
|
33889
|
+
if (container.scrollTop >= labelTop - aroundThreshold && container.scrollTop <= labelBottom + aroundThreshold) {
|
|
33890
|
+
setShowTopDate(false);
|
|
33891
|
+
break;
|
|
33892
|
+
}
|
|
33893
|
+
if (!text && container.scrollTop > labelTop - 28) {
|
|
33178
33894
|
var span = (dateLabel === null || dateLabel === void 0 ? void 0 : dateLabel.firstChild) && dateLabel.firstChild.firstChild;
|
|
33179
33895
|
text = span ? span.innerText || '' : '';
|
|
33180
33896
|
setTopDateLabel(text);
|
|
@@ -33196,9 +33912,6 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33196
33912
|
}
|
|
33197
33913
|
setShowTopDate(true);
|
|
33198
33914
|
clearTimeout(hideTopDateTimeout.current);
|
|
33199
|
-
hideTopDateTimeout.current = setTimeout(function () {
|
|
33200
|
-
setShowTopDate(false);
|
|
33201
|
-
}, 1000);
|
|
33202
33915
|
renderTopDate();
|
|
33203
33916
|
var forceLoadPrevMessages = false;
|
|
33204
33917
|
if (-target.scrollTop + target.offsetHeight + 30 > target.scrollHeight) {
|
|
@@ -33823,6 +34536,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33823
34536
|
replyMessageInThread: replyMessageInThread,
|
|
33824
34537
|
deleteMessage: deleteMessage,
|
|
33825
34538
|
selectMessage: selectMessage,
|
|
34539
|
+
showInfoMessage: showInfoMessage,
|
|
33826
34540
|
allowEditDeleteIncomingMessage: allowEditDeleteIncomingMessage,
|
|
33827
34541
|
reportMessage: reportMessage,
|
|
33828
34542
|
reactionIcon: reactionIcon,
|
|
@@ -33848,6 +34562,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33848
34562
|
replyInThreadIconOrder: replyInThreadIconOrder,
|
|
33849
34563
|
forwardIconOrder: forwardIconOrder,
|
|
33850
34564
|
deleteIconOrder: deleteIconOrder,
|
|
34565
|
+
infoIconOrder: infoIconOrder,
|
|
33851
34566
|
selectIconOrder: selectIconOrder,
|
|
33852
34567
|
starIconOrder: starIconOrder,
|
|
33853
34568
|
reportIconOrder: reportIconOrder,
|
|
@@ -33858,6 +34573,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33858
34573
|
replyInThreadIconTooltipText: replyInThreadIconTooltipText,
|
|
33859
34574
|
forwardIconTooltipText: forwardIconTooltipText,
|
|
33860
34575
|
deleteIconTooltipText: deleteIconTooltipText,
|
|
34576
|
+
infoIconTooltipText: infoIconTooltipText,
|
|
33861
34577
|
selectIconTooltipText: selectIconTooltipText,
|
|
33862
34578
|
starIconTooltipText: starIconTooltipText,
|
|
33863
34579
|
reportIconTooltipText: reportIconTooltipText,
|
|
@@ -33907,7 +34623,8 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33907
34623
|
messageTimeFontSize: messageTimeFontSize,
|
|
33908
34624
|
messageTimeColor: messageTimeColor,
|
|
33909
34625
|
messageStatusAndTimeLineHeight: messageStatusAndTimeLineHeight,
|
|
33910
|
-
shouldOpenUserProfileForMention: shouldOpenUserProfileForMention
|
|
34626
|
+
shouldOpenUserProfileForMention: shouldOpenUserProfileForMention,
|
|
34627
|
+
showInfoMessageProps: showInfoMessageProps
|
|
33911
34628
|
}))), isUnreadMessage ? (/*#__PURE__*/React__default.createElement(MessageDivider, {
|
|
33912
34629
|
theme: theme,
|
|
33913
34630
|
newMessagesSeparatorTextColor: newMessagesSeparatorTextColor,
|
|
@@ -33937,14 +34654,14 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33937
34654
|
attachmentsPreview: attachmentsPreview
|
|
33938
34655
|
})))));
|
|
33939
34656
|
};
|
|
33940
|
-
var Container$h = styled__default.div(_templateObject$
|
|
34657
|
+
var Container$h = styled__default.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) {
|
|
33941
34658
|
return props.backgroundColor;
|
|
33942
34659
|
}, function (props) {
|
|
33943
34660
|
return props.thumbColor;
|
|
33944
34661
|
});
|
|
33945
|
-
var EmptyDiv = styled__default.div(_templateObject2$
|
|
33946
|
-
var MessagesBox = styled__default.div(_templateObject3$
|
|
33947
|
-
var MessageTopDate = styled__default.div(_templateObject4$
|
|
34662
|
+
var EmptyDiv = styled__default.div(_templateObject2$z || (_templateObject2$z = _taggedTemplateLiteralLoose(["\n height: 300px;\n"])));
|
|
34663
|
+
var MessagesBox = styled__default.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"])));
|
|
34664
|
+
var MessageTopDate = styled__default.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) {
|
|
33948
34665
|
return props.topOffset ? props.topOffset + 22 + "px" : '22px';
|
|
33949
34666
|
}, function (props) {
|
|
33950
34667
|
return props.marginTop;
|
|
@@ -33963,19 +34680,19 @@ var MessageTopDate = styled__default.div(_templateObject4$o || (_templateObject4
|
|
|
33963
34680
|
}, function (props) {
|
|
33964
34681
|
return props.dateDividerBorderRadius || '14px';
|
|
33965
34682
|
});
|
|
33966
|
-
var DragAndDropContainer = styled__default.div(_templateObject5$
|
|
34683
|
+
var DragAndDropContainer = styled__default.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) {
|
|
33967
34684
|
return props.topOffset ? props.topOffset + 2 + "px" : 0;
|
|
33968
34685
|
}, function (props) {
|
|
33969
34686
|
return props.height ? props.height + 30 + "px" : '100%';
|
|
33970
34687
|
}, function (props) {
|
|
33971
34688
|
return props.backgroundColor;
|
|
33972
34689
|
});
|
|
33973
|
-
var IconWrapper$1 = styled__default.span(_templateObject6$
|
|
34690
|
+
var IconWrapper$1 = styled__default.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) {
|
|
33974
34691
|
return props.backgroundColor;
|
|
33975
34692
|
}, function (props) {
|
|
33976
34693
|
return props.iconColor;
|
|
33977
34694
|
});
|
|
33978
|
-
var DropAttachmentArea = styled__default.div(_templateObject7$
|
|
34695
|
+
var DropAttachmentArea = styled__default.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) {
|
|
33979
34696
|
return props.borderColor;
|
|
33980
34697
|
}, function (props) {
|
|
33981
34698
|
return props.margin || '12px 32px 32px';
|
|
@@ -33988,16 +34705,16 @@ var DropAttachmentArea = styled__default.div(_templateObject7$f || (_templateObj
|
|
|
33988
34705
|
}, IconWrapper$1, function (props) {
|
|
33989
34706
|
return props.iconBackgroundColor;
|
|
33990
34707
|
});
|
|
33991
|
-
var MessageWrapper = styled__default.div(_templateObject8$
|
|
34708
|
+
var MessageWrapper = styled__default.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) {
|
|
33992
34709
|
return props.highlightBg || '#d5d5d5';
|
|
33993
34710
|
});
|
|
33994
|
-
var NoMessagesContainer = styled__default.div(_templateObject9$
|
|
34711
|
+
var NoMessagesContainer = styled__default.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) {
|
|
33995
34712
|
return props.color;
|
|
33996
34713
|
});
|
|
33997
|
-
var NoMessagesTitle = styled__default.h4(_templateObject0$
|
|
34714
|
+
var NoMessagesTitle = styled__default.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) {
|
|
33998
34715
|
return props.color;
|
|
33999
34716
|
});
|
|
34000
|
-
var NoMessagesText = styled__default.p(_templateObject1$
|
|
34717
|
+
var NoMessagesText = styled__default.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) {
|
|
34001
34718
|
return props.color;
|
|
34002
34719
|
});
|
|
34003
34720
|
|
|
@@ -34037,6 +34754,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34037
34754
|
forwardMessage = _ref.forwardMessage,
|
|
34038
34755
|
deleteMessage = _ref.deleteMessage,
|
|
34039
34756
|
selectMessage = _ref.selectMessage,
|
|
34757
|
+
showInfoMessage = _ref.showInfoMessage,
|
|
34040
34758
|
reportMessage = _ref.reportMessage,
|
|
34041
34759
|
reactionIcon = _ref.reactionIcon,
|
|
34042
34760
|
editIcon = _ref.editIcon,
|
|
@@ -34083,6 +34801,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34083
34801
|
selectIconOrder = _ref.selectIconOrder,
|
|
34084
34802
|
starIconOrder = _ref.starIconOrder,
|
|
34085
34803
|
reportIconOrder = _ref.reportIconOrder,
|
|
34804
|
+
infoIconOrder = _ref.infoIconOrder,
|
|
34086
34805
|
reactionIconTooltipText = _ref.reactionIconTooltipText,
|
|
34087
34806
|
editIconTooltipText = _ref.editIconTooltipText,
|
|
34088
34807
|
copyIconTooltipText = _ref.copyIconTooltipText,
|
|
@@ -34093,6 +34812,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34093
34812
|
selectIconTooltipText = _ref.selectIconTooltipText,
|
|
34094
34813
|
starIconTooltipText = _ref.starIconTooltipText,
|
|
34095
34814
|
reportIconTooltipText = _ref.reportIconTooltipText,
|
|
34815
|
+
infoIconTooltipText = _ref.infoIconTooltipText,
|
|
34096
34816
|
messageActionIconsColor = _ref.messageActionIconsColor,
|
|
34097
34817
|
dateDividerFontSize = _ref.dateDividerFontSize,
|
|
34098
34818
|
dateDividerTextColor = _ref.dateDividerTextColor,
|
|
@@ -34143,7 +34863,9 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34143
34863
|
messageStatusAndTimeLineHeight = _ref.messageStatusAndTimeLineHeight,
|
|
34144
34864
|
_ref$hiddenMessagesPr = _ref.hiddenMessagesProperties,
|
|
34145
34865
|
hiddenMessagesProperties = _ref$hiddenMessagesPr === void 0 ? [] : _ref$hiddenMessagesPr,
|
|
34146
|
-
shouldOpenUserProfileForMention = _ref.shouldOpenUserProfileForMention
|
|
34866
|
+
shouldOpenUserProfileForMention = _ref.shouldOpenUserProfileForMention,
|
|
34867
|
+
_ref$showInfoMessageP = _ref.showInfoMessageProps,
|
|
34868
|
+
showInfoMessageProps = _ref$showInfoMessageP === void 0 ? {} : _ref$showInfoMessageP;
|
|
34147
34869
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(MessageList, {
|
|
34148
34870
|
fontFamily: fontFamily,
|
|
34149
34871
|
ownMessageOnRightSide: ownMessageOnRightSide,
|
|
@@ -34174,6 +34896,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34174
34896
|
forwardMessage: forwardMessage,
|
|
34175
34897
|
deleteMessage: deleteMessage,
|
|
34176
34898
|
selectMessage: selectMessage,
|
|
34899
|
+
showInfoMessage: showInfoMessage,
|
|
34177
34900
|
reportMessage: reportMessage,
|
|
34178
34901
|
reactionIcon: reactionIcon,
|
|
34179
34902
|
editIcon: editIcon,
|
|
@@ -34216,6 +34939,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34216
34939
|
forwardIconOrder: forwardIconOrder,
|
|
34217
34940
|
deleteIconOrder: deleteIconOrder,
|
|
34218
34941
|
selectIconOrder: selectIconOrder,
|
|
34942
|
+
infoIconOrder: infoIconOrder,
|
|
34219
34943
|
starIconOrder: starIconOrder,
|
|
34220
34944
|
reportIconOrder: reportIconOrder,
|
|
34221
34945
|
reactionIconTooltipText: reactionIconTooltipText,
|
|
@@ -34228,6 +34952,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34228
34952
|
selectIconTooltipText: selectIconTooltipText,
|
|
34229
34953
|
starIconTooltipText: starIconTooltipText,
|
|
34230
34954
|
reportIconTooltipText: reportIconTooltipText,
|
|
34955
|
+
infoIconTooltipText: infoIconTooltipText,
|
|
34231
34956
|
messageActionIconsColor: messageActionIconsColor,
|
|
34232
34957
|
dateDividerFontSize: dateDividerFontSize,
|
|
34233
34958
|
dateDividerTextColor: dateDividerTextColor,
|
|
@@ -34270,7 +34995,8 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34270
34995
|
messageTimeColor: messageTimeColor,
|
|
34271
34996
|
messageStatusAndTimeLineHeight: messageStatusAndTimeLineHeight,
|
|
34272
34997
|
hiddenMessagesProperties: hiddenMessagesProperties,
|
|
34273
|
-
shouldOpenUserProfileForMention: shouldOpenUserProfileForMention
|
|
34998
|
+
shouldOpenUserProfileForMention: shouldOpenUserProfileForMention,
|
|
34999
|
+
showInfoMessageProps: showInfoMessageProps
|
|
34274
35000
|
}));
|
|
34275
35001
|
};
|
|
34276
35002
|
|
|
@@ -34382,7 +35108,7 @@ function $isMentionNode(node) {
|
|
|
34382
35108
|
return node instanceof MentionNode;
|
|
34383
35109
|
}
|
|
34384
35110
|
|
|
34385
|
-
var _templateObject$
|
|
35111
|
+
var _templateObject$F, _templateObject2$A, _templateObject3$u, _templateObject4$q, _templateObject5$m;
|
|
34386
35112
|
var PUNCTUATION = '\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%\'"~=<>_:;';
|
|
34387
35113
|
var NAME = '\\b[A-Z][^\\s' + PUNCTUATION + ']';
|
|
34388
35114
|
var DocumentMentionsRegex = {
|
|
@@ -34662,8 +35388,8 @@ function MentionsPlugin(_ref3) {
|
|
|
34662
35388
|
}
|
|
34663
35389
|
});
|
|
34664
35390
|
}
|
|
34665
|
-
var MentionsContainerWrapper = styled__default.div(_templateObject$
|
|
34666
|
-
var MentionsList = styled__default.ul(_templateObject2$
|
|
35391
|
+
var MentionsContainerWrapper = styled__default.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"])));
|
|
35392
|
+
var MentionsList = styled__default.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) {
|
|
34667
35393
|
return props.backgroundColor;
|
|
34668
35394
|
}, function (props) {
|
|
34669
35395
|
return props.withBorder && "1px solid " + props.borderColor;
|
|
@@ -34672,11 +35398,11 @@ var MentionsList = styled__default.ul(_templateObject2$z || (_templateObject2$z
|
|
|
34672
35398
|
}, function (props) {
|
|
34673
35399
|
return props.hidden ? 'hidden' : 'visible';
|
|
34674
35400
|
});
|
|
34675
|
-
var MemberItem = styled__default.li(_templateObject3$
|
|
35401
|
+
var MemberItem = styled__default.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) {
|
|
34676
35402
|
return props.isActiveItem && props.activeBackgroundColor;
|
|
34677
35403
|
}, UserStatus);
|
|
34678
|
-
var UserNamePresence$2 = styled__default.div(_templateObject4$
|
|
34679
|
-
var MemberName$2 = styled__default.h3(_templateObject5$
|
|
35404
|
+
var UserNamePresence$2 = styled__default.div(_templateObject4$q || (_templateObject4$q = _taggedTemplateLiteralLoose(["\n width: calc(100% - 44px);\n margin-left: 12px;\n"])));
|
|
35405
|
+
var MemberName$2 = styled__default.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) {
|
|
34680
35406
|
return props.color;
|
|
34681
35407
|
});
|
|
34682
35408
|
|
|
@@ -34809,7 +35535,7 @@ function SvgUnderline(props) {
|
|
|
34809
35535
|
}))));
|
|
34810
35536
|
}
|
|
34811
35537
|
|
|
34812
|
-
var _templateObject$
|
|
35538
|
+
var _templateObject$G, _templateObject2$B;
|
|
34813
35539
|
function mergeRegister() {
|
|
34814
35540
|
for (var _len = arguments.length, func = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34815
35541
|
func[_key] = arguments[_key];
|
|
@@ -35190,10 +35916,10 @@ function FloatingTextFormatToolbarPlugin(_ref3) {
|
|
|
35190
35916
|
editor = _useLexicalComposerCo[0];
|
|
35191
35917
|
return useFloatingTextFormatToolbar(editor, anchorElem);
|
|
35192
35918
|
}
|
|
35193
|
-
var FloatingTextFormatPopup = styled__default.div(_templateObject$
|
|
35919
|
+
var FloatingTextFormatPopup = styled__default.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) {
|
|
35194
35920
|
return props.popupColor;
|
|
35195
35921
|
});
|
|
35196
|
-
var Action$1 = styled__default.button(_templateObject2$
|
|
35922
|
+
var Action$1 = styled__default.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) {
|
|
35197
35923
|
return props.iconColor;
|
|
35198
35924
|
}, function (props) {
|
|
35199
35925
|
return props.isActive && "\n color: " + props.hoverIconColor + ";\n background-color: " + props.hoverBackgroundColor + ";\n ";
|
|
@@ -35516,7 +36242,7 @@ function FormatMessagePlugin(_ref) {
|
|
|
35516
36242
|
return null;
|
|
35517
36243
|
}
|
|
35518
36244
|
|
|
35519
|
-
var _templateObject$
|
|
36245
|
+
var _templateObject$H, _templateObject2$C, _templateObject3$v, _templateObject4$r, _templateObject5$n, _templateObject6$j, _templateObject7$h, _templateObject8$g;
|
|
35520
36246
|
var EmojiIcon$1 = function EmojiIcon(_ref) {
|
|
35521
36247
|
var collectionName = _ref.collectionName;
|
|
35522
36248
|
switch (collectionName) {
|
|
@@ -35711,7 +36437,7 @@ function EmojisPopup$1(_ref2) {
|
|
|
35711
36437
|
}));
|
|
35712
36438
|
}))));
|
|
35713
36439
|
}
|
|
35714
|
-
var Container$i = styled__default.div(_templateObject$
|
|
36440
|
+
var Container$i = styled__default.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) {
|
|
35715
36441
|
return props.leftPosition ? 'fixed' : props.relativePosition ? 'relative' : 'absolute';
|
|
35716
36442
|
}, function (props) {
|
|
35717
36443
|
return props.rightSide ? "calc(" + props.leftPosition + " - 250px)" : props.leftPosition || (props.rtlDirection ? '' : props.rightSide ? '' : '5px');
|
|
@@ -35732,23 +36458,23 @@ var Container$i = styled__default.div(_templateObject$G || (_templateObject$G =
|
|
|
35732
36458
|
}, function (props) {
|
|
35733
36459
|
return props.rendered && "\n height: 225px;\n ";
|
|
35734
36460
|
});
|
|
35735
|
-
var EmojiHeader$1 = styled__default.div(_templateObject2$
|
|
36461
|
+
var EmojiHeader$1 = styled__default.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) {
|
|
35736
36462
|
return props.color;
|
|
35737
36463
|
}, function (props) {
|
|
35738
36464
|
return props.padding || '6px 18px';
|
|
35739
36465
|
});
|
|
35740
|
-
var EmojiSection$1 = styled__default.div(_templateObject3$
|
|
35741
|
-
var EmojiCollection$1 = styled__default.span(_templateObject4$
|
|
36466
|
+
var EmojiSection$1 = styled__default.div(_templateObject3$v || (_templateObject3$v = _taggedTemplateLiteralLoose(["\n height: 180px;\n overflow-x: hidden;\n\n & ::selection {\n color: inherit;\n background: inherit;\n }\n"])));
|
|
36467
|
+
var EmojiCollection$1 = styled__default.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) {
|
|
35742
36468
|
return props.iconColor;
|
|
35743
36469
|
});
|
|
35744
|
-
var CollectionPointer$1 = styled__default.span(_templateObject5$
|
|
35745
|
-
var AllEmojis$1 = styled__default.ul(_templateObject6$
|
|
35746
|
-
var EmojiFooter$1 = styled__default.div(_templateObject7$
|
|
36470
|
+
var CollectionPointer$1 = styled__default.span(_templateObject5$n || (_templateObject5$n = _taggedTemplateLiteralLoose([""])));
|
|
36471
|
+
var AllEmojis$1 = styled__default.ul(_templateObject6$j || (_templateObject6$j = _taggedTemplateLiteralLoose(["\n overflow: hidden;\n padding: 0 8px 8px;\n margin: 0;\n"])));
|
|
36472
|
+
var EmojiFooter$1 = styled__default.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) {
|
|
35747
36473
|
return props.emojisCategoryIconsPosition !== 'top' && "1px solid " + props.borderColor;
|
|
35748
36474
|
}, function (props) {
|
|
35749
36475
|
return props.emojisCategoryIconsPosition === 'top' && "1px solid " + props.borderColor;
|
|
35750
36476
|
});
|
|
35751
|
-
var Emoji$1 = styled__default.li(_templateObject8$
|
|
36477
|
+
var Emoji$1 = styled__default.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) {
|
|
35752
36478
|
return props.hoverBackgroundColor;
|
|
35753
36479
|
});
|
|
35754
36480
|
|
|
@@ -35949,7 +36675,7 @@ function SvgRecordButton(props) {
|
|
|
35949
36675
|
})));
|
|
35950
36676
|
}
|
|
35951
36677
|
|
|
35952
|
-
var _templateObject$
|
|
36678
|
+
var _templateObject$I, _templateObject2$D, _templateObject3$w, _templateObject4$s, _templateObject5$o, _templateObject6$k, _templateObject7$i;
|
|
35953
36679
|
var shouldDraw = false;
|
|
35954
36680
|
var AudioRecord = function AudioRecord(_ref) {
|
|
35955
36681
|
var sendRecordedFile = _ref.sendRecordedFile,
|
|
@@ -36145,7 +36871,6 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
36145
36871
|
handleStopRecording();
|
|
36146
36872
|
if (currentRecordedFile) {
|
|
36147
36873
|
var _wavesurfer$current2;
|
|
36148
|
-
removeAudioRecordingFromMap(currentChannelId);
|
|
36149
36874
|
dispatch(setChannelDraftMessageIsRemovedAC(currentChannelId));
|
|
36150
36875
|
setRecordedFile(null);
|
|
36151
36876
|
setPlayAudio(false);
|
|
@@ -36154,8 +36879,9 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
36154
36879
|
}
|
|
36155
36880
|
} else {
|
|
36156
36881
|
shouldDraw = false;
|
|
36157
|
-
recorder.stop();
|
|
36882
|
+
recorder === null || recorder === void 0 ? void 0 : recorder.stop();
|
|
36158
36883
|
}
|
|
36884
|
+
removeAudioRecordingFromMap(currentChannelId);
|
|
36159
36885
|
setRecordingIsReadyToPlay(false);
|
|
36160
36886
|
setStartRecording(false);
|
|
36161
36887
|
setCurrentTime(0);
|
|
@@ -36412,29 +37138,20 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
36412
37138
|
}, [currentRecordedFile, currentChannelId]);
|
|
36413
37139
|
React.useEffect(function () {
|
|
36414
37140
|
if (!currentRecordedFile) {
|
|
36415
|
-
|
|
36416
|
-
|
|
36417
|
-
|
|
36418
|
-
|
|
36419
|
-
|
|
36420
|
-
|
|
36421
|
-
|
|
36422
|
-
|
|
36423
|
-
|
|
36424
|
-
|
|
36425
|
-
setRecorder(recorder);
|
|
36426
|
-
});
|
|
36427
|
-
}, function (e) {
|
|
36428
|
-
log.error('Failed to init mic-recorder-to-mp3', e);
|
|
36429
|
-
});
|
|
36430
|
-
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
36431
|
-
}
|
|
36432
|
-
}();
|
|
36433
|
-
return _temp5 && _temp5.then ? _temp5.then(function () {}) : void 0;
|
|
36434
|
-
} catch (e) {
|
|
36435
|
-
Promise.reject(e);
|
|
37141
|
+
try {
|
|
37142
|
+
if (!recorder) {
|
|
37143
|
+
try {
|
|
37144
|
+
var newRecorder = new MicRecorder({
|
|
37145
|
+
bitRate: 128
|
|
37146
|
+
});
|
|
37147
|
+
setRecorder(newRecorder);
|
|
37148
|
+
} catch (e) {
|
|
37149
|
+
log.error('Failed to init mic-recorder-to-mp3', e);
|
|
37150
|
+
}
|
|
36436
37151
|
}
|
|
36437
|
-
}
|
|
37152
|
+
} catch (e) {
|
|
37153
|
+
Promise.reject(e);
|
|
37154
|
+
}
|
|
36438
37155
|
}
|
|
36439
37156
|
}, [currentRecordedFile]);
|
|
36440
37157
|
React.useEffect(function () {
|
|
@@ -36513,10 +37230,10 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
36513
37230
|
iconColor: accentColor
|
|
36514
37231
|
}, showRecording || currentRecordedFile ? /*#__PURE__*/React__default.createElement(SvgSend, null) : /*#__PURE__*/React__default.createElement(SvgRecordButton, null)));
|
|
36515
37232
|
};
|
|
36516
|
-
var Container$j = styled__default.div(_templateObject$
|
|
37233
|
+
var Container$j = styled__default.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) {
|
|
36517
37234
|
return props.recording && "width: 400px";
|
|
36518
37235
|
});
|
|
36519
|
-
var AudioWrapper = styled__default.div(_templateObject2$
|
|
37236
|
+
var AudioWrapper = styled__default.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) {
|
|
36520
37237
|
return props.recording ? 'calc(100% - 84px)' : '0';
|
|
36521
37238
|
}, function (props) {
|
|
36522
37239
|
return props.recording ? '0 8px' : '0';
|
|
@@ -36525,10 +37242,10 @@ var AudioWrapper = styled__default.div(_templateObject2$C || (_templateObject2$C
|
|
|
36525
37242
|
}, function (props) {
|
|
36526
37243
|
return props.recording ? '0 12px 0 0' : '0';
|
|
36527
37244
|
});
|
|
36528
|
-
var RecordIconWrapper = styled__default.span(_templateObject3$
|
|
37245
|
+
var RecordIconWrapper = styled__default.span(_templateObject3$w || (_templateObject3$w = _taggedTemplateLiteralLoose(["\n display: flex;\n cursor: pointer;\n > svg {\n color: ", ";\n }\n"])), function (props) {
|
|
36529
37246
|
return props.iconColor;
|
|
36530
37247
|
});
|
|
36531
|
-
var AudioVisualization$1 = styled__default.div(_templateObject4$
|
|
37248
|
+
var AudioVisualization$1 = styled__default.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) {
|
|
36532
37249
|
var show = _ref5.show;
|
|
36533
37250
|
return show ? '1' : '0';
|
|
36534
37251
|
}, function (_ref6) {
|
|
@@ -36540,10 +37257,10 @@ var AudioVisualization$1 = styled__default.div(_templateObject4$r || (_templateO
|
|
|
36540
37257
|
}, function (props) {
|
|
36541
37258
|
return props.color;
|
|
36542
37259
|
});
|
|
36543
|
-
var PlayPause$1 = styled__default.div(_templateObject5$
|
|
37260
|
+
var PlayPause$1 = styled__default.div(_templateObject5$o || (_templateObject5$o = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n padding: 10px;\n > svg {\n color: ", ";\n }\n"])), function (props) {
|
|
36544
37261
|
return props.iconColor;
|
|
36545
37262
|
});
|
|
36546
|
-
var Canvas = styled__default.canvas(_templateObject6$
|
|
37263
|
+
var Canvas = styled__default.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) {
|
|
36547
37264
|
var recording = _ref8.recording;
|
|
36548
37265
|
return recording ? '300px' : '0';
|
|
36549
37266
|
}, function (_ref9) {
|
|
@@ -36553,14 +37270,14 @@ var Canvas = styled__default.canvas(_templateObject6$j || (_templateObject6$j =
|
|
|
36553
37270
|
var hide = _ref0.hide;
|
|
36554
37271
|
return hide && '-1';
|
|
36555
37272
|
});
|
|
36556
|
-
var Timer$2 = styled__default.div(_templateObject7$
|
|
37273
|
+
var Timer$2 = styled__default.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) {
|
|
36557
37274
|
return props.color;
|
|
36558
37275
|
});
|
|
36559
37276
|
|
|
36560
|
-
var _templateObject$
|
|
36561
|
-
var wave = styled.keyframes(_templateObject$
|
|
36562
|
-
var Wrapper = styled__default.div(_templateObject2$
|
|
36563
|
-
var Bar = styled__default.span(_templateObject3$
|
|
37277
|
+
var _templateObject$J, _templateObject2$E, _templateObject3$x;
|
|
37278
|
+
var wave = styled.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"])));
|
|
37279
|
+
var Wrapper = styled__default.div(_templateObject2$E || (_templateObject2$E = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-end;\n height: 8px;\n gap: 1.5px;\n"])));
|
|
37280
|
+
var Bar = styled__default.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) {
|
|
36564
37281
|
return props.borderColor;
|
|
36565
37282
|
}, wave, function (_ref) {
|
|
36566
37283
|
var delay = _ref.delay;
|
|
@@ -36586,7 +37303,7 @@ var RecordingAnimation = function RecordingAnimation(_ref2) {
|
|
|
36586
37303
|
}));
|
|
36587
37304
|
};
|
|
36588
37305
|
|
|
36589
|
-
var _templateObject$
|
|
37306
|
+
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;
|
|
36590
37307
|
function AutoFocusPlugin(_ref) {
|
|
36591
37308
|
var messageForReply = _ref.messageForReply;
|
|
36592
37309
|
var _useLexicalComposerCo = LexicalComposerContext.useLexicalComposerContext(),
|
|
@@ -36795,8 +37512,8 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
36795
37512
|
messageBodyAttributes = _useState11[0],
|
|
36796
37513
|
setMessageBodyAttributes = _useState11[1];
|
|
36797
37514
|
var _useState12 = React.useState([]),
|
|
36798
|
-
|
|
36799
|
-
|
|
37515
|
+
mentionedUsers = _useState12[0],
|
|
37516
|
+
setMentionedUsers = _useState12[1];
|
|
36800
37517
|
var _useState13 = React.useState(''),
|
|
36801
37518
|
browser = _useState13[0],
|
|
36802
37519
|
setBrowser = _useState13[1];
|
|
@@ -36922,21 +37639,21 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
36922
37639
|
var messageToSend = {
|
|
36923
37640
|
body: messageTexToSend,
|
|
36924
37641
|
bodyAttributes: messageBodyAttributes,
|
|
36925
|
-
|
|
37642
|
+
mentionedUsers: [],
|
|
36926
37643
|
attachments: [],
|
|
36927
37644
|
type: 'text'
|
|
36928
37645
|
};
|
|
36929
|
-
var
|
|
37646
|
+
var mentionUsersToSend = [];
|
|
36930
37647
|
if (messageBodyAttributes && messageBodyAttributes.length) {
|
|
36931
37648
|
messageBodyAttributes.forEach(function (att) {
|
|
36932
37649
|
if (att.type === 'mention') {
|
|
36933
|
-
|
|
37650
|
+
mentionUsersToSend.push({
|
|
36934
37651
|
id: att.metadata
|
|
36935
37652
|
});
|
|
36936
37653
|
}
|
|
36937
37654
|
});
|
|
36938
37655
|
}
|
|
36939
|
-
messageToSend.
|
|
37656
|
+
messageToSend.mentionedUsers = mentionUsersToSend;
|
|
36940
37657
|
log.info('message to send ..........................................', JSON.stringify(messageToSend));
|
|
36941
37658
|
if (messageForReply) {
|
|
36942
37659
|
messageToSend.parentMessage = messageForReply;
|
|
@@ -36996,7 +37713,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
36996
37713
|
setShouldClearEditor({
|
|
36997
37714
|
clear: true
|
|
36998
37715
|
});
|
|
36999
|
-
|
|
37716
|
+
setMentionedUsers([]);
|
|
37000
37717
|
setMessageBodyAttributes([]);
|
|
37001
37718
|
dispatch(setCloseSearchChannelsAC(true));
|
|
37002
37719
|
} else {
|
|
@@ -37028,21 +37745,21 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37028
37745
|
};
|
|
37029
37746
|
}
|
|
37030
37747
|
}
|
|
37031
|
-
var
|
|
37032
|
-
var
|
|
37033
|
-
if (
|
|
37748
|
+
var mentionedUsersPositions = [];
|
|
37749
|
+
var mentionUsersToSend = [];
|
|
37750
|
+
if (mentionedUsers && mentionedUsers.length) {
|
|
37034
37751
|
if (messageBodyAttributes && messageBodyAttributes.length) {
|
|
37035
37752
|
messageBodyAttributes.forEach(function (att) {
|
|
37036
37753
|
if (att.type === 'mention') {
|
|
37037
|
-
var mentionsToFind = [].concat(
|
|
37754
|
+
var mentionsToFind = [].concat(mentionedUsers);
|
|
37038
37755
|
var draftMessage = getDraftMessageFromMap(activeChannel.id);
|
|
37039
37756
|
if (draftMessage) {
|
|
37040
|
-
mentionsToFind = [].concat(draftMessage.
|
|
37757
|
+
mentionsToFind = [].concat(draftMessage.mentionedUsers, mentionedUsers);
|
|
37041
37758
|
}
|
|
37042
37759
|
var mentionToAdd = mentionsToFind.find(function (mention) {
|
|
37043
37760
|
return mention.id === att.metadata;
|
|
37044
37761
|
});
|
|
37045
|
-
|
|
37762
|
+
mentionUsersToSend.push(mentionToAdd);
|
|
37046
37763
|
}
|
|
37047
37764
|
});
|
|
37048
37765
|
}
|
|
@@ -37050,9 +37767,9 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37050
37767
|
var messageToSend = _extends({}, messageToEdit, linkAttachment ? {
|
|
37051
37768
|
attachments: [linkAttachment]
|
|
37052
37769
|
} : {}, {
|
|
37053
|
-
metadata:
|
|
37770
|
+
metadata: mentionedUsersPositions,
|
|
37054
37771
|
bodyAttributes: messageBodyAttributes,
|
|
37055
|
-
mentionedUsers:
|
|
37772
|
+
mentionedUsers: mentionUsersToSend,
|
|
37056
37773
|
body: messageTexToSend
|
|
37057
37774
|
});
|
|
37058
37775
|
messageToSend.type = /(https?:\/\/[^\s]+)/.test(messageToSend.body) ? 'link' : messageToSend.type;
|
|
@@ -37062,7 +37779,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37062
37779
|
};
|
|
37063
37780
|
var handleCloseEditMode = function handleCloseEditMode() {
|
|
37064
37781
|
setEditMessageText('');
|
|
37065
|
-
|
|
37782
|
+
setMentionedUsers([]);
|
|
37066
37783
|
dispatch(setMessageToEditAC(null));
|
|
37067
37784
|
};
|
|
37068
37785
|
var removeUpload = function removeUpload(attachmentId) {
|
|
@@ -37161,7 +37878,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37161
37878
|
};
|
|
37162
37879
|
var handleCut = function handleCut() {
|
|
37163
37880
|
setMessageText('');
|
|
37164
|
-
|
|
37881
|
+
setMentionedUsers([]);
|
|
37165
37882
|
};
|
|
37166
37883
|
var handleEmojiPopupToggle = function handleEmojiPopupToggle(bool) {
|
|
37167
37884
|
setIsEmojisOpened(bool);
|
|
@@ -37229,7 +37946,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37229
37946
|
dispatch(clearSelectedMessagesAC());
|
|
37230
37947
|
};
|
|
37231
37948
|
var handleSetMentionMember = function handleSetMentionMember(mentionMember) {
|
|
37232
|
-
|
|
37949
|
+
setMentionedUsers(function (prevState) {
|
|
37233
37950
|
return [].concat(prevState, [mentionMember]);
|
|
37234
37951
|
});
|
|
37235
37952
|
};
|
|
@@ -37610,7 +38327,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37610
38327
|
var messageToSend = {
|
|
37611
38328
|
metadata: '',
|
|
37612
38329
|
body: '',
|
|
37613
|
-
|
|
38330
|
+
mentionedUsers: [],
|
|
37614
38331
|
attachments: [{
|
|
37615
38332
|
name: uuid.v4() + ".mp3",
|
|
37616
38333
|
data: recordedFile.file,
|
|
@@ -37665,7 +38382,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37665
38382
|
dispatch(setMessageForReplyAC(draftMessage.messageForReply));
|
|
37666
38383
|
}
|
|
37667
38384
|
setMessageText(draftMessage.text);
|
|
37668
|
-
|
|
38385
|
+
setMentionedUsers(draftMessage.mentionedUsers);
|
|
37669
38386
|
}
|
|
37670
38387
|
setShouldClearEditor({
|
|
37671
38388
|
clear: true,
|
|
@@ -37676,7 +38393,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37676
38393
|
prevActiveChannelId = activeChannel.id;
|
|
37677
38394
|
}
|
|
37678
38395
|
dispatch(getMembersAC(activeChannel.id));
|
|
37679
|
-
|
|
38396
|
+
setMentionedUsers([]);
|
|
37680
38397
|
}, [activeChannel.id]);
|
|
37681
38398
|
React.useEffect(function () {
|
|
37682
38399
|
if (messageText.trim() || editMessageText.trim() && editMessageText && editMessageText.trim() !== messageToEdit.body || attachments.length) {
|
|
@@ -37711,10 +38428,10 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37711
38428
|
}
|
|
37712
38429
|
if (messageText.trim()) {
|
|
37713
38430
|
var draftMessage = getDraftMessageFromMap(activeChannel.id);
|
|
37714
|
-
if (draftMessage && draftMessage.
|
|
38431
|
+
if (draftMessage && draftMessage.mentionedUsers && draftMessage.mentionedUsers.length) {
|
|
37715
38432
|
setDraftMessageToMap(activeChannel.id, {
|
|
37716
38433
|
text: messageText,
|
|
37717
|
-
|
|
38434
|
+
mentionedUsers: draftMessage.mentionedUsers,
|
|
37718
38435
|
messageForReply: messageForReply,
|
|
37719
38436
|
editorState: realEditorState,
|
|
37720
38437
|
bodyAttributes: messageBodyAttributes
|
|
@@ -37722,7 +38439,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37722
38439
|
} else {
|
|
37723
38440
|
setDraftMessageToMap(activeChannel.id, {
|
|
37724
38441
|
text: messageText,
|
|
37725
|
-
|
|
38442
|
+
mentionedUsers: mentionedUsers,
|
|
37726
38443
|
messageForReply: messageForReply,
|
|
37727
38444
|
editorState: realEditorState,
|
|
37728
38445
|
bodyAttributes: messageBodyAttributes
|
|
@@ -37742,15 +38459,15 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37742
38459
|
}
|
|
37743
38460
|
}, [messageText, attachments, editMessageText, readyVideoAttachments, messageBodyAttributes]);
|
|
37744
38461
|
useDidUpdate(function () {
|
|
37745
|
-
if (
|
|
38462
|
+
if (mentionedUsers && mentionedUsers.length) {
|
|
37746
38463
|
setDraftMessageToMap(activeChannel.id, {
|
|
37747
38464
|
text: messageText,
|
|
37748
|
-
|
|
38465
|
+
mentionedUsers: mentionedUsers,
|
|
37749
38466
|
messageForReply: messageForReply,
|
|
37750
38467
|
bodyAttributes: messageBodyAttributes
|
|
37751
38468
|
});
|
|
37752
38469
|
}
|
|
37753
|
-
}, [
|
|
38470
|
+
}, [mentionedUsers]);
|
|
37754
38471
|
React.useEffect(function () {
|
|
37755
38472
|
if (connectionStatus === CONNECTION_STATUS.CONNECTED) {
|
|
37756
38473
|
var pendingMessagesMap = getPendingMessagesMap();
|
|
@@ -37801,7 +38518,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37801
38518
|
if (draftMessagesMap[activeChannel.id]) {
|
|
37802
38519
|
setDraftMessageToMap(activeChannel.id, {
|
|
37803
38520
|
text: messageText,
|
|
37804
|
-
|
|
38521
|
+
mentionedUsers: mentionedUsers,
|
|
37805
38522
|
messageForReply: messageForReply,
|
|
37806
38523
|
bodyAttributes: messageBodyAttributes
|
|
37807
38524
|
});
|
|
@@ -38116,7 +38833,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
38116
38833
|
editMessage: messageToEdit,
|
|
38117
38834
|
contactsMap: contactsMap,
|
|
38118
38835
|
getFromContacts: getFromContacts,
|
|
38119
|
-
setMentionedMember:
|
|
38836
|
+
setMentionedMember: setMentionedUsers
|
|
38120
38837
|
}), /*#__PURE__*/React__default.createElement(FormatMessagePlugin, {
|
|
38121
38838
|
editorState: realEditorState,
|
|
38122
38839
|
setMessageBodyAttributes: setMessageBodyAttributes,
|
|
@@ -38173,10 +38890,10 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
38173
38890
|
channelId: activeChannel.id
|
|
38174
38891
|
}))))))))));
|
|
38175
38892
|
};
|
|
38176
|
-
var SendMessageWrapper = styled__default.div(_templateObject$
|
|
38893
|
+
var SendMessageWrapper = styled__default.div(_templateObject$K || (_templateObject$K = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n position: relative;\n z-index: 15;\n"])), function (props) {
|
|
38177
38894
|
return props.backgroundColor;
|
|
38178
38895
|
});
|
|
38179
|
-
var Container$k = styled__default.div(_templateObject2$
|
|
38896
|
+
var Container$k = styled__default.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) {
|
|
38180
38897
|
return props.margin || '30px 0 16px';
|
|
38181
38898
|
}, function (props) {
|
|
38182
38899
|
return props.border || '';
|
|
@@ -38193,7 +38910,7 @@ var Container$k = styled__default.div(_templateObject2$E || (_templateObject2$E
|
|
|
38193
38910
|
}, function (props) {
|
|
38194
38911
|
return props.mentionColor;
|
|
38195
38912
|
});
|
|
38196
|
-
var EditReplyMessageCont = styled__default.div(_templateObject3$
|
|
38913
|
+
var EditReplyMessageCont = styled__default.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) {
|
|
38197
38914
|
return props.left || '0';
|
|
38198
38915
|
}, function (props) {
|
|
38199
38916
|
return props.bottom || '0';
|
|
@@ -38208,19 +38925,19 @@ var EditReplyMessageCont = styled__default.div(_templateObject3$x || (_templateO
|
|
|
38208
38925
|
}, function (props) {
|
|
38209
38926
|
return props.backgroundColor;
|
|
38210
38927
|
});
|
|
38211
|
-
var EditMessageText = styled__default.p(_templateObject4$
|
|
38212
|
-
var UploadErrorMessage = styled__default.p(_templateObject5$
|
|
38928
|
+
var EditMessageText = styled__default.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"])));
|
|
38929
|
+
var UploadErrorMessage = styled__default.p(_templateObject5$p || (_templateObject5$p = _taggedTemplateLiteralLoose(["\n margin: 0;\n position: absolute;\n top: -30px;\n color: ", ";\n"])), function (props) {
|
|
38213
38930
|
return props.color;
|
|
38214
38931
|
});
|
|
38215
|
-
var CloseEditMode = styled__default.span(_templateObject6$
|
|
38932
|
+
var CloseEditMode = styled__default.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) {
|
|
38216
38933
|
return props.color;
|
|
38217
38934
|
});
|
|
38218
|
-
var UserName$1 = styled__default.span(_templateObject7$
|
|
38219
|
-
var ReplyMessageBody$1 = styled__default.div(_templateObject8$
|
|
38220
|
-
var EditReplyMessageHeader = styled__default.h4(_templateObject9$
|
|
38935
|
+
var UserName$1 = styled__default.span(_templateObject7$j || (_templateObject7$j = _taggedTemplateLiteralLoose(["\n font-weight: 500;\n margin-left: 4px;\n"])));
|
|
38936
|
+
var ReplyMessageBody$1 = styled__default.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"])));
|
|
38937
|
+
var EditReplyMessageHeader = styled__default.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) {
|
|
38221
38938
|
return props.color;
|
|
38222
38939
|
});
|
|
38223
|
-
var AddAttachmentIcon = styled__default.span(_templateObject0$
|
|
38940
|
+
var AddAttachmentIcon = styled__default.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) {
|
|
38224
38941
|
return props.height ? props.height + "px" : '36px';
|
|
38225
38942
|
}, function (props) {
|
|
38226
38943
|
return props.order === 0 || props.order ? props.order : 1;
|
|
@@ -38229,7 +38946,7 @@ var AddAttachmentIcon = styled__default.span(_templateObject0$c || (_templateObj
|
|
|
38229
38946
|
}, function (props) {
|
|
38230
38947
|
return props.hoverColor;
|
|
38231
38948
|
});
|
|
38232
|
-
var SendMessageInputContainer = styled__default.div(_templateObject1$
|
|
38949
|
+
var SendMessageInputContainer = styled__default.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) {
|
|
38233
38950
|
return props.minHeight || '36px';
|
|
38234
38951
|
}, function (props) {
|
|
38235
38952
|
return props.messageForReply ? '0 0 4px 4px' : '4px';
|
|
@@ -38525,7 +39242,7 @@ function SvgUnpin(props) {
|
|
|
38525
39242
|
})));
|
|
38526
39243
|
}
|
|
38527
39244
|
|
|
38528
|
-
var _templateObject$
|
|
39245
|
+
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;
|
|
38529
39246
|
var Actions = function Actions(_ref) {
|
|
38530
39247
|
var setActionsHeight = _ref.setActionsHeight,
|
|
38531
39248
|
channel = _ref.channel,
|
|
@@ -38989,21 +39706,21 @@ var Actions = function Actions(_ref) {
|
|
|
38989
39706
|
title: popupTitle
|
|
38990
39707
|
})));
|
|
38991
39708
|
};
|
|
38992
|
-
var Container$l = styled__default.div(_templateObject$
|
|
39709
|
+
var Container$l = styled__default.div(_templateObject$L || (_templateObject$L = _taggedTemplateLiteralLoose(["\n padding: 10px 16px;\n border-bottom: 6px solid ", ";\n]"])), function (props) {
|
|
38993
39710
|
return props.borderColor;
|
|
38994
39711
|
});
|
|
38995
|
-
var ActionHeader = styled__default.div(_templateObject2$
|
|
38996
|
-
var MenuTriggerIcon = styled__default.span(_templateObject3$
|
|
39712
|
+
var ActionHeader = styled__default.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"])));
|
|
39713
|
+
var MenuTriggerIcon = styled__default.span(_templateObject3$z || (_templateObject3$z = _taggedTemplateLiteralLoose(["\n transition: all 0.2s;\n ", "\n"])), function (props) {
|
|
38997
39714
|
return !props.isOpen && ' transform: rotate(-90deg);';
|
|
38998
39715
|
});
|
|
38999
|
-
var ActionsMenu = styled__default.ul(_templateObject4$
|
|
39000
|
-
var DefaultMutedIcon = styled__default(SvgUnmuteNotifications)(_templateObject5$
|
|
39001
|
-
var DefaultMuteIcon = styled__default(SvgNotifications)(_templateObject6$
|
|
39002
|
-
var DefaultStarIcon = styled__default(SvgStar)(_templateObject7$
|
|
39003
|
-
var DefaultUnpinIcon = styled__default(SvgUnpin)(_templateObject8$
|
|
39004
|
-
var DefaultPinIcon = styled__default(SvgPin)(_templateObject9$
|
|
39005
|
-
var DefaultMarkAsRead = styled__default(SvgMarkAsRead)(_templateObject0$
|
|
39006
|
-
var DefaultMarkAsUnRead = styled__default(SvgMarkAsUnRead)(_templateObject1$
|
|
39716
|
+
var ActionsMenu = styled__default.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"])));
|
|
39717
|
+
var DefaultMutedIcon = styled__default(SvgUnmuteNotifications)(_templateObject5$q || (_templateObject5$q = _taggedTemplateLiteralLoose([""])));
|
|
39718
|
+
var DefaultMuteIcon = styled__default(SvgNotifications)(_templateObject6$m || (_templateObject6$m = _taggedTemplateLiteralLoose([""])));
|
|
39719
|
+
var DefaultStarIcon = styled__default(SvgStar)(_templateObject7$k || (_templateObject7$k = _taggedTemplateLiteralLoose([""])));
|
|
39720
|
+
var DefaultUnpinIcon = styled__default(SvgUnpin)(_templateObject8$i || (_templateObject8$i = _taggedTemplateLiteralLoose([""])));
|
|
39721
|
+
var DefaultPinIcon = styled__default(SvgPin)(_templateObject9$f || (_templateObject9$f = _taggedTemplateLiteralLoose([""])));
|
|
39722
|
+
var DefaultMarkAsRead = styled__default(SvgMarkAsRead)(_templateObject0$e || (_templateObject0$e = _taggedTemplateLiteralLoose([""])));
|
|
39723
|
+
var DefaultMarkAsUnRead = styled__default(SvgMarkAsUnRead)(_templateObject1$b || (_templateObject1$b = _taggedTemplateLiteralLoose([""])));
|
|
39007
39724
|
var DefaultBlockIcon = styled__default(SvgBlockChannel)(_templateObject10$6 || (_templateObject10$6 = _taggedTemplateLiteralLoose([""])));
|
|
39008
39725
|
var DefaultReportIcon = styled__default(SvgReport)(_templateObject11$6 || (_templateObject11$6 = _taggedTemplateLiteralLoose([""])));
|
|
39009
39726
|
var DefaultClearIcon = styled__default(SvgClear)(_templateObject12$5 || (_templateObject12$5 = _taggedTemplateLiteralLoose([""])));
|
|
@@ -39083,7 +39800,7 @@ function SvgMoreVert(props) {
|
|
|
39083
39800
|
})));
|
|
39084
39801
|
}
|
|
39085
39802
|
|
|
39086
|
-
var _templateObject$
|
|
39803
|
+
var _templateObject$M, _templateObject2$H, _templateObject3$A;
|
|
39087
39804
|
var ChangeMemberRole = function ChangeMemberRole(_ref) {
|
|
39088
39805
|
var theme = _ref.theme,
|
|
39089
39806
|
channelId = _ref.channelId,
|
|
@@ -39183,14 +39900,14 @@ var ChangeMemberRole = function ChangeMemberRole(_ref) {
|
|
|
39183
39900
|
onClick: handleSave
|
|
39184
39901
|
}, "Save"))));
|
|
39185
39902
|
};
|
|
39186
|
-
var RolesSelect = styled__default.div(_templateObject$
|
|
39187
|
-
var RoleLabel = styled__default.div(_templateObject2$
|
|
39903
|
+
var RolesSelect = styled__default.div(_templateObject$M || (_templateObject$M = _taggedTemplateLiteralLoose(["\n margin-bottom: 32px;\n"])));
|
|
39904
|
+
var RoleLabel = styled__default.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) {
|
|
39188
39905
|
var color = _ref2.color;
|
|
39189
39906
|
return color;
|
|
39190
39907
|
});
|
|
39191
|
-
var RoleSpan = styled__default.span(_templateObject3$
|
|
39908
|
+
var RoleSpan = styled__default.span(_templateObject3$A || (_templateObject3$A = _taggedTemplateLiteralLoose(["\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n text-transform: capitalize;\n"])));
|
|
39192
39909
|
|
|
39193
|
-
var _templateObject$
|
|
39910
|
+
var _templateObject$N, _templateObject2$I, _templateObject3$B, _templateObject4$v, _templateObject5$r, _templateObject6$n, _templateObject7$l, _templateObject8$j, _templateObject9$g;
|
|
39194
39911
|
var Members = function Members(_ref) {
|
|
39195
39912
|
var channel = _ref.channel,
|
|
39196
39913
|
theme = _ref.theme,
|
|
@@ -39493,18 +40210,18 @@ var Members = function Members(_ref) {
|
|
|
39493
40210
|
toggleCreatePopup: handleAddMemberPopup
|
|
39494
40211
|
})));
|
|
39495
40212
|
};
|
|
39496
|
-
var Container$m = styled__default.div(_templateObject$
|
|
39497
|
-
var ActionsMenu$1 = styled__default.div(_templateObject2$
|
|
39498
|
-
var MemberNamePresence = styled__default.div(_templateObject3$
|
|
39499
|
-
var MemberNameWrapper = styled__default.div(_templateObject4$
|
|
39500
|
-
var MemberName$3 = styled__default.h4(_templateObject5$
|
|
40213
|
+
var Container$m = styled__default.div(_templateObject$N || (_templateObject$N = _taggedTemplateLiteralLoose([""])));
|
|
40214
|
+
var ActionsMenu$1 = styled__default.div(_templateObject2$I || (_templateObject2$I = _taggedTemplateLiteralLoose(["\n position: relative;\n transition: all 0.2s;\n"])));
|
|
40215
|
+
var MemberNamePresence = styled__default.div(_templateObject3$B || (_templateObject3$B = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n max-width: calc(100% - 84px);\n\n & > ", " {\n display: block;\n }\n"])), SubTitle);
|
|
40216
|
+
var MemberNameWrapper = styled__default.div(_templateObject4$v || (_templateObject4$v = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n"])));
|
|
40217
|
+
var MemberName$3 = styled__default.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) {
|
|
39501
40218
|
return props.color;
|
|
39502
40219
|
});
|
|
39503
|
-
var EditMemberIcon = styled__default.span(_templateObject6$
|
|
40220
|
+
var EditMemberIcon = styled__default.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) {
|
|
39504
40221
|
return props.color;
|
|
39505
40222
|
});
|
|
39506
|
-
var MembersList = styled__default.ul(_templateObject7$
|
|
39507
|
-
var MemberItem$1 = styled__default.li(_templateObject8$
|
|
40223
|
+
var MembersList = styled__default.ul(_templateObject7$l || (_templateObject7$l = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n list-style: none;\n transition: all 0.2s;\n"])));
|
|
40224
|
+
var MemberItem$1 = styled__default.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) {
|
|
39508
40225
|
return props.fontSize || '15px';
|
|
39509
40226
|
}, function (props) {
|
|
39510
40227
|
return props.color;
|
|
@@ -39515,13 +40232,13 @@ var MemberItem$1 = styled__default.li(_templateObject8$i || (_templateObject8$i
|
|
|
39515
40232
|
}, function (props) {
|
|
39516
40233
|
return props.hoverBackground;
|
|
39517
40234
|
}, EditMemberIcon, UserStatus);
|
|
39518
|
-
var RoleBadge = styled__default.span(_templateObject9$
|
|
40235
|
+
var RoleBadge = styled__default.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) {
|
|
39519
40236
|
return props.color;
|
|
39520
40237
|
}, function (props) {
|
|
39521
40238
|
return props.backgroundColor;
|
|
39522
40239
|
});
|
|
39523
40240
|
|
|
39524
|
-
var _templateObject$
|
|
40241
|
+
var _templateObject$O, _templateObject2$J;
|
|
39525
40242
|
var Media = function Media(_ref) {
|
|
39526
40243
|
var channel = _ref.channel;
|
|
39527
40244
|
var _useColor = useColors(),
|
|
@@ -39567,8 +40284,8 @@ var Media = function Media(_ref) {
|
|
|
39567
40284
|
currentMediaFile: mediaFile
|
|
39568
40285
|
})));
|
|
39569
40286
|
};
|
|
39570
|
-
var Container$n = styled__default.div(_templateObject$
|
|
39571
|
-
var MediaItem = styled__default.div(_templateObject2$
|
|
40287
|
+
var Container$n = styled__default.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"])));
|
|
40288
|
+
var MediaItem = styled__default.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"])));
|
|
39572
40289
|
|
|
39573
40290
|
var _rect$3, _path$1n;
|
|
39574
40291
|
function _extends$1r() {
|
|
@@ -39624,7 +40341,7 @@ function SvgDownloadFile(props) {
|
|
|
39624
40341
|
})));
|
|
39625
40342
|
}
|
|
39626
40343
|
|
|
39627
|
-
var _templateObject$
|
|
40344
|
+
var _templateObject$P, _templateObject2$K, _templateObject3$C, _templateObject4$w, _templateObject5$s, _templateObject6$o, _templateObject7$m, _templateObject8$k;
|
|
39628
40345
|
var Files = function Files(_ref) {
|
|
39629
40346
|
var channelId = _ref.channelId,
|
|
39630
40347
|
filePreviewIcon = _ref.filePreviewIcon,
|
|
@@ -39741,30 +40458,30 @@ var Files = function Files(_ref) {
|
|
|
39741
40458
|
}))) : filePreviewDownloadIcon || /*#__PURE__*/React__default.createElement(SvgDownloadFile, null)));
|
|
39742
40459
|
}));
|
|
39743
40460
|
};
|
|
39744
|
-
var Container$o = styled__default.ul(_templateObject$
|
|
39745
|
-
var DownloadWrapper = styled__default.a(_templateObject2$
|
|
40461
|
+
var Container$o = styled__default.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"])));
|
|
40462
|
+
var DownloadWrapper = styled__default.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) {
|
|
39746
40463
|
return props.visible ? 'visible' : 'hidden';
|
|
39747
40464
|
}, function (props) {
|
|
39748
40465
|
return props.iconColor;
|
|
39749
40466
|
}, function (props) {
|
|
39750
40467
|
return props.iconColor;
|
|
39751
40468
|
});
|
|
39752
|
-
var ProgressWrapper$2 = styled__default.span(_templateObject3$
|
|
39753
|
-
var FileIconCont = styled__default.span(_templateObject4$
|
|
40469
|
+
var ProgressWrapper$2 = styled__default.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"])));
|
|
40470
|
+
var FileIconCont = styled__default.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) {
|
|
39754
40471
|
return props.iconColor;
|
|
39755
40472
|
}, function (props) {
|
|
39756
40473
|
return props.fillColor;
|
|
39757
40474
|
});
|
|
39758
|
-
var FileHoverIconCont = styled__default.span(_templateObject5$
|
|
40475
|
+
var FileHoverIconCont = styled__default.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) {
|
|
39759
40476
|
return props.iconColor;
|
|
39760
40477
|
}, function (props) {
|
|
39761
40478
|
return props.fillColor;
|
|
39762
40479
|
});
|
|
39763
|
-
var FileThumb = styled__default.img(_templateObject6$
|
|
39764
|
-
var FileItem = styled__default.div(_templateObject7$
|
|
40480
|
+
var FileThumb = styled__default.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"])));
|
|
40481
|
+
var FileItem = styled__default.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) {
|
|
39765
40482
|
return props.hoverBackgroundColor;
|
|
39766
40483
|
}, DownloadWrapper, FileIconCont, FileHoverIconCont);
|
|
39767
|
-
var FileSizeAndDate = styled__default.span(_templateObject8$
|
|
40484
|
+
var FileSizeAndDate = styled__default.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) {
|
|
39768
40485
|
return props.fontSize || '13px';
|
|
39769
40486
|
}, function (props) {
|
|
39770
40487
|
return props.lineHeight || '16px';
|
|
@@ -39803,7 +40520,7 @@ function SvgLinkIcon(props) {
|
|
|
39803
40520
|
})));
|
|
39804
40521
|
}
|
|
39805
40522
|
|
|
39806
|
-
var _templateObject$
|
|
40523
|
+
var _templateObject$Q, _templateObject2$L, _templateObject3$D, _templateObject4$x, _templateObject5$t;
|
|
39807
40524
|
var LinkItem = function LinkItem(_ref) {
|
|
39808
40525
|
var link = _ref.link,
|
|
39809
40526
|
linkPreviewIcon = _ref.linkPreviewIcon,
|
|
@@ -39834,25 +40551,25 @@ var LinkItem = function LinkItem(_ref) {
|
|
|
39834
40551
|
color: linkPreviewColor || textPrimary
|
|
39835
40552
|
}, link))));
|
|
39836
40553
|
};
|
|
39837
|
-
var LinkIconCont = styled__default.span(_templateObject$
|
|
40554
|
+
var LinkIconCont = styled__default.span(_templateObject$Q || (_templateObject$Q = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n > svg {\n color: ", ";\n fill: ", ";\n }\n"])), function (props) {
|
|
39838
40555
|
return props.iconColor;
|
|
39839
40556
|
}, function (props) {
|
|
39840
40557
|
return props.fillColor;
|
|
39841
40558
|
});
|
|
39842
|
-
var LinkHoverIconCont = styled__default.span(_templateObject2$
|
|
40559
|
+
var LinkHoverIconCont = styled__default.span(_templateObject2$L || (_templateObject2$L = _taggedTemplateLiteralLoose(["\n display: none;\n > svg {\n color: ", ";\n fill: ", ";\n }\n"])), function (props) {
|
|
39843
40560
|
return props.iconColor;
|
|
39844
40561
|
}, function (props) {
|
|
39845
40562
|
return props.fillColor;
|
|
39846
40563
|
});
|
|
39847
|
-
var LinkInfoCont = styled__default.div(_templateObject3$
|
|
39848
|
-
var FileItem$1 = styled__default.li(_templateObject4$
|
|
40564
|
+
var LinkInfoCont = styled__default.div(_templateObject3$D || (_templateObject3$D = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n width: calc(100% - 40px);\n"])));
|
|
40565
|
+
var FileItem$1 = styled__default.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) {
|
|
39849
40566
|
return props.hoverBackgroundColor;
|
|
39850
40567
|
}, LinkIconCont, LinkHoverIconCont);
|
|
39851
|
-
var LinkUrl = styled__default.span(_templateObject5$
|
|
40568
|
+
var LinkUrl = styled__default.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) {
|
|
39852
40569
|
return props.color;
|
|
39853
40570
|
});
|
|
39854
40571
|
|
|
39855
|
-
var _templateObject$
|
|
40572
|
+
var _templateObject$R;
|
|
39856
40573
|
var Links = function Links(_ref) {
|
|
39857
40574
|
var channelId = _ref.channelId,
|
|
39858
40575
|
linkPreviewIcon = _ref.linkPreviewIcon,
|
|
@@ -39877,7 +40594,7 @@ var Links = function Links(_ref) {
|
|
|
39877
40594
|
});
|
|
39878
40595
|
}));
|
|
39879
40596
|
};
|
|
39880
|
-
var Container$p = styled__default.ul(_templateObject$
|
|
40597
|
+
var Container$p = styled__default.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"])));
|
|
39881
40598
|
|
|
39882
40599
|
var _rect$5, _path$1q;
|
|
39883
40600
|
function _extends$1u() {
|
|
@@ -39933,7 +40650,7 @@ function SvgVoicePreviewPause(props) {
|
|
|
39933
40650
|
})));
|
|
39934
40651
|
}
|
|
39935
40652
|
|
|
39936
|
-
var _templateObject$
|
|
40653
|
+
var _templateObject$S, _templateObject2$M, _templateObject3$E, _templateObject4$y, _templateObject5$u, _templateObject6$p, _templateObject7$n, _templateObject8$l;
|
|
39937
40654
|
var VoiceItem = function VoiceItem(_ref) {
|
|
39938
40655
|
var file = _ref.file,
|
|
39939
40656
|
voicePreviewPlayIcon = _ref.voicePreviewPlayIcon,
|
|
@@ -40058,32 +40775,32 @@ var VoiceItem = function VoiceItem(_ref) {
|
|
|
40058
40775
|
type: 'audio/mpeg'
|
|
40059
40776
|
})));
|
|
40060
40777
|
};
|
|
40061
|
-
var FileIconCont$1 = styled__default.span(_templateObject$
|
|
40778
|
+
var FileIconCont$1 = styled__default.span(_templateObject$S || (_templateObject$S = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: inline-flex;\n fill: ", ";\n rect {\n fill: ", ";\n }\n"])), function (props) {
|
|
40062
40779
|
return props.fill || 'transparent';
|
|
40063
40780
|
}, function (props) {
|
|
40064
40781
|
return props.fill || 'transparent';
|
|
40065
40782
|
});
|
|
40066
|
-
var FileHoverIconCont$1 = styled__default.span(_templateObject2$
|
|
40783
|
+
var FileHoverIconCont$1 = styled__default.span(_templateObject2$M || (_templateObject2$M = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: none;\n fill: ", ";\n rect {\n fill: ", ";\n }\n"])), function (props) {
|
|
40067
40784
|
return props.fill || 'transparent';
|
|
40068
40785
|
}, function (props) {
|
|
40069
40786
|
return props.fill || 'transparent';
|
|
40070
40787
|
});
|
|
40071
|
-
var FileItem$2 = styled__default.li(_templateObject3$
|
|
40788
|
+
var FileItem$2 = styled__default.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) {
|
|
40072
40789
|
return props.hoverBackgroundColor;
|
|
40073
40790
|
}, FileIconCont$1, FileHoverIconCont$1);
|
|
40074
|
-
var AudioInfo = styled__default.div(_templateObject4$
|
|
40075
|
-
var AudioTitle = styled__default.span(_templateObject5$
|
|
40791
|
+
var AudioInfo = styled__default.div(_templateObject4$y || (_templateObject4$y = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
|
|
40792
|
+
var AudioTitle = styled__default.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) {
|
|
40076
40793
|
return props.color;
|
|
40077
40794
|
});
|
|
40078
|
-
var AudioDate = styled__default.span(_templateObject6$
|
|
40795
|
+
var AudioDate = styled__default.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) {
|
|
40079
40796
|
return props.color;
|
|
40080
40797
|
});
|
|
40081
|
-
var AudioSendTime = styled__default.span(_templateObject7$
|
|
40798
|
+
var AudioSendTime = styled__default.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) {
|
|
40082
40799
|
return props.color;
|
|
40083
40800
|
});
|
|
40084
|
-
var Audio = styled__default.audio(_templateObject8$
|
|
40801
|
+
var Audio = styled__default.audio(_templateObject8$l || (_templateObject8$l = _taggedTemplateLiteralLoose(["\n display: none;\n"])));
|
|
40085
40802
|
|
|
40086
|
-
var _templateObject$
|
|
40803
|
+
var _templateObject$T;
|
|
40087
40804
|
var Voices = function Voices(_ref) {
|
|
40088
40805
|
var channelId = _ref.channelId,
|
|
40089
40806
|
voicePreviewPlayIcon = _ref.voicePreviewPlayIcon,
|
|
@@ -40114,9 +40831,9 @@ var Voices = function Voices(_ref) {
|
|
|
40114
40831
|
});
|
|
40115
40832
|
}));
|
|
40116
40833
|
};
|
|
40117
|
-
var Container$q = styled__default.ul(_templateObject$
|
|
40834
|
+
var Container$q = styled__default.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"])));
|
|
40118
40835
|
|
|
40119
|
-
var _templateObject$
|
|
40836
|
+
var _templateObject$U, _templateObject2$N;
|
|
40120
40837
|
var DetailsTab = function DetailsTab(_ref) {
|
|
40121
40838
|
var channel = _ref.channel,
|
|
40122
40839
|
theme = _ref.theme,
|
|
@@ -40265,8 +40982,8 @@ var DetailsTab = function DetailsTab(_ref) {
|
|
|
40265
40982
|
voicePreviewHoverBackgroundColor: voicePreviewHoverBackgroundColor
|
|
40266
40983
|
})));
|
|
40267
40984
|
};
|
|
40268
|
-
var Container$r = styled__default.div(_templateObject$
|
|
40269
|
-
var DetailsTabHeader = styled__default.div(_templateObject2$
|
|
40985
|
+
var Container$r = styled__default.div(_templateObject$U || (_templateObject$U = _taggedTemplateLiteralLoose(["\n min-height: calc(100vh - 64px);\n"])));
|
|
40986
|
+
var DetailsTabHeader = styled__default.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) {
|
|
40270
40987
|
return props.borderColor;
|
|
40271
40988
|
}, function (props) {
|
|
40272
40989
|
return props.backgroundColor || 'transparent';
|
|
@@ -40284,17 +41001,17 @@ var DetailsTabHeader = styled__default.div(_templateObject2$M || (_templateObjec
|
|
|
40284
41001
|
return props.activeTabColor;
|
|
40285
41002
|
});
|
|
40286
41003
|
|
|
40287
|
-
var _templateObject$
|
|
40288
|
-
var Container$s = styled__default.div(_templateObject$
|
|
41004
|
+
var _templateObject$V, _templateObject2$O, _templateObject3$F, _templateObject4$z;
|
|
41005
|
+
var Container$s = styled__default.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) {
|
|
40289
41006
|
return props.active ? 'display: block' : 'display: none';
|
|
40290
41007
|
}, function (props) {
|
|
40291
41008
|
return "calc(100vh - " + (props.heightOffset ? props.heightOffset + 48 : 48) + "px)";
|
|
40292
41009
|
}, function (props) {
|
|
40293
41010
|
return props.backgroundColor;
|
|
40294
41011
|
});
|
|
40295
|
-
var AvatarCont = styled__default.div(_templateObject2$
|
|
40296
|
-
var DropDownWrapper = styled__default.div(_templateObject3$
|
|
40297
|
-
var EditChannelFooter = styled__default(ButtonBlock)(_templateObject4$
|
|
41012
|
+
var AvatarCont = styled__default.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"])));
|
|
41013
|
+
var DropDownWrapper = styled__default.div(_templateObject3$F || (_templateObject3$F = _taggedTemplateLiteralLoose(["\n position: absolute;\n z-index: 4;\n width: 40px;\n height: 40px;\n"])));
|
|
41014
|
+
var EditChannelFooter = styled__default(ButtonBlock)(_templateObject4$z || (_templateObject4$z = _taggedTemplateLiteralLoose(["\n margin-top: 24px;\n\n & > button {\n margin-left: 12px;\n }\n"])));
|
|
40298
41015
|
var EditChannel = function EditChannel(_ref) {
|
|
40299
41016
|
var channel = _ref.channel,
|
|
40300
41017
|
theme = _ref.theme,
|
|
@@ -40549,7 +41266,7 @@ var EditChannel = function EditChannel(_ref) {
|
|
|
40549
41266
|
})));
|
|
40550
41267
|
};
|
|
40551
41268
|
|
|
40552
|
-
var _templateObject$
|
|
41269
|
+
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;
|
|
40553
41270
|
var Details = function Details(_ref) {
|
|
40554
41271
|
var _activeChannel$member;
|
|
40555
41272
|
var detailsTitleText = _ref.detailsTitleText,
|
|
@@ -40936,17 +41653,17 @@ var Details = function Details(_ref) {
|
|
|
40936
41653
|
onTabChange: handleTabChange
|
|
40937
41654
|
}))));
|
|
40938
41655
|
};
|
|
40939
|
-
var Container$t = styled__default.div(_templateObject$
|
|
41656
|
+
var Container$t = styled__default.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) {
|
|
40940
41657
|
return props.borderColor;
|
|
40941
41658
|
}, function (props) {
|
|
40942
41659
|
return props.mounted && " width: " + (props.size === 'small' ? '300px' : props.size === 'medium' ? '350px' : '400px') + ";";
|
|
40943
41660
|
}, function (props) {
|
|
40944
41661
|
return props.backgroundColor;
|
|
40945
41662
|
});
|
|
40946
|
-
var ChannelDetailsHeader = styled__default.div(_templateObject2$
|
|
41663
|
+
var ChannelDetailsHeader = styled__default.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) {
|
|
40947
41664
|
return props.borderColor;
|
|
40948
41665
|
});
|
|
40949
|
-
var ChatDetails = styled__default.div(_templateObject3$
|
|
41666
|
+
var ChatDetails = styled__default.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) {
|
|
40950
41667
|
return props.size === 'small' ? '300px' : props.size === 'medium' ? '350px' : '400px';
|
|
40951
41668
|
}, function (props) {
|
|
40952
41669
|
return props.height ? "calc(100vh - " + props.heightOffset + "px)" : '100vh';
|
|
@@ -40955,37 +41672,37 @@ var ChatDetails = styled__default.div(_templateObject3$F || (_templateObject3$F
|
|
|
40955
41672
|
}, function (props) {
|
|
40956
41673
|
return props.thumbColor;
|
|
40957
41674
|
});
|
|
40958
|
-
var AboutChannel = styled__default.div(_templateObject4$
|
|
40959
|
-
var AboutChannelTitle = styled__default.h4(_templateObject5$
|
|
41675
|
+
var AboutChannel = styled__default.div(_templateObject4$A || (_templateObject4$A = _taggedTemplateLiteralLoose(["\n margin-top: 20px;\n"])));
|
|
41676
|
+
var AboutChannelTitle = styled__default.h4(_templateObject5$v || (_templateObject5$v = _taggedTemplateLiteralLoose(["\n font-size: 12px;\n margin: 0;\n line-height: 16px;\n color: ", ";\n"])), function (props) {
|
|
40960
41677
|
return props.color;
|
|
40961
41678
|
});
|
|
40962
|
-
var AboutChannelText = styled__default.h3(_templateObject6$
|
|
41679
|
+
var AboutChannelText = styled__default.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) {
|
|
40963
41680
|
return props.color;
|
|
40964
41681
|
});
|
|
40965
|
-
var ChannelInfo$4 = styled__default.div(_templateObject7$
|
|
41682
|
+
var ChannelInfo$4 = styled__default.div(_templateObject7$o || (_templateObject7$o = _taggedTemplateLiteralLoose(["\n position: relative;\n margin-left: ", ";\n margin-top: ", ";\n text-align: ", ";\n"])), function (props) {
|
|
40966
41683
|
return (!props.direction || props.direction !== 'column') && '16px';
|
|
40967
41684
|
}, function (props) {
|
|
40968
41685
|
return props.direction && props.direction === 'column' && '16px';
|
|
40969
41686
|
}, function (props) {
|
|
40970
41687
|
return props.direction && props.direction === 'column' && 'center';
|
|
40971
41688
|
});
|
|
40972
|
-
var DetailsHeader = styled__default.div(_templateObject8$
|
|
41689
|
+
var DetailsHeader = styled__default.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) {
|
|
40973
41690
|
return props.borderColor;
|
|
40974
41691
|
});
|
|
40975
|
-
var ChannelAvatarAndName = styled__default.div(_templateObject9$
|
|
41692
|
+
var ChannelAvatarAndName = styled__default.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) {
|
|
40976
41693
|
return props.direction;
|
|
40977
41694
|
});
|
|
40978
|
-
var ChannelName$1 = styled__default(SectionHeader)(_templateObject0$
|
|
41695
|
+
var ChannelName$1 = styled__default(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) {
|
|
40979
41696
|
return props.isDirect ? '200px' : '168px';
|
|
40980
41697
|
}, function (props) {
|
|
40981
41698
|
return props.color;
|
|
40982
41699
|
}, function (props) {
|
|
40983
41700
|
return props.uppercase && 'uppercase';
|
|
40984
41701
|
});
|
|
40985
|
-
var ChannelNameWrapper = styled__default.div(_templateObject1$
|
|
41702
|
+
var ChannelNameWrapper = styled__default.div(_templateObject1$c || (_templateObject1$c = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n"])));
|
|
40986
41703
|
var EditButton = styled__default.span(_templateObject10$7 || (_templateObject10$7 = _taggedTemplateLiteralLoose(["\n margin-left: 6px;\n cursor: pointer;\n color: #b2b6be;\n"])));
|
|
40987
41704
|
|
|
40988
|
-
var _templateObject$
|
|
41705
|
+
var _templateObject$X;
|
|
40989
41706
|
var ChannelDetailsContainer = function ChannelDetailsContainer(_ref) {
|
|
40990
41707
|
var _ref$size = _ref.size,
|
|
40991
41708
|
size = _ref$size === void 0 ? 'large' : _ref$size,
|
|
@@ -41214,7 +41931,7 @@ var ChannelDetailsContainer = function ChannelDetailsContainer(_ref) {
|
|
|
41214
41931
|
showPhoneNumber: showPhoneNumber
|
|
41215
41932
|
})));
|
|
41216
41933
|
};
|
|
41217
|
-
var DetailsWrapper = styled__default.div(_templateObject$
|
|
41934
|
+
var DetailsWrapper = styled__default.div(_templateObject$X || (_templateObject$X = _taggedTemplateLiteralLoose([""])));
|
|
41218
41935
|
|
|
41219
41936
|
var _path$1s;
|
|
41220
41937
|
function _extends$1w() {
|
|
@@ -41238,7 +41955,7 @@ function SvgChevronDown(props) {
|
|
|
41238
41955
|
})));
|
|
41239
41956
|
}
|
|
41240
41957
|
|
|
41241
|
-
var _templateObject$
|
|
41958
|
+
var _templateObject$Y, _templateObject2$Q;
|
|
41242
41959
|
var MessagesScrollToBottomButton = function MessagesScrollToBottomButton(_ref) {
|
|
41243
41960
|
var buttonIcon = _ref.buttonIcon,
|
|
41244
41961
|
buttonWidth = _ref.buttonWidth,
|
|
@@ -41321,7 +42038,7 @@ var MessagesScrollToBottomButton = function MessagesScrollToBottomButton(_ref) {
|
|
|
41321
42038
|
isMuted: channel.muted
|
|
41322
42039
|
}, channel.newMessageCount ? channel.newMessageCount > 99 ? '99+' : channel.newMessageCount : '')), buttonIcon || /*#__PURE__*/React__default.createElement(SvgChevronDown, null)));
|
|
41323
42040
|
};
|
|
41324
|
-
var BottomButton = styled__default.div(_templateObject$
|
|
42041
|
+
var BottomButton = styled__default.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) {
|
|
41325
42042
|
return props.animateFrom === 'bottom' && "bottom: " + (props.bottomOffset + (props.bottomPosition === undefined ? 45 : props.bottomPosition) - 130) + "px";
|
|
41326
42043
|
}, function (props) {
|
|
41327
42044
|
return props.animateFrom === 'right' && "right: " + (props.rightPosition === undefined ? 16 : props.rightPosition - 100) + "px";
|
|
@@ -41332,7 +42049,7 @@ var BottomButton = styled__default.div(_templateObject$X || (_templateObject$X =
|
|
|
41332
42049
|
}, function (props) {
|
|
41333
42050
|
return props.backgroundColor;
|
|
41334
42051
|
});
|
|
41335
|
-
var UnreadCount$1 = styled__default.span(_templateObject2$
|
|
42052
|
+
var UnreadCount$1 = styled__default.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) {
|
|
41336
42053
|
return props.backgroundColor;
|
|
41337
42054
|
}, function (props) {
|
|
41338
42055
|
return props.fontSize || '13px';
|
|
@@ -41375,7 +42092,7 @@ function SvgMention(props) {
|
|
|
41375
42092
|
})));
|
|
41376
42093
|
}
|
|
41377
42094
|
|
|
41378
|
-
var _templateObject$
|
|
42095
|
+
var _templateObject$Z, _templateObject2$R;
|
|
41379
42096
|
var MessagesScrollToUnreadMentionsButton = function MessagesScrollToUnreadMentionsButton(_ref) {
|
|
41380
42097
|
var buttonIcon = _ref.buttonIcon,
|
|
41381
42098
|
buttonWidth = _ref.buttonWidth,
|
|
@@ -41518,7 +42235,7 @@ var MessagesScrollToUnreadMentionsButton = function MessagesScrollToUnreadMentio
|
|
|
41518
42235
|
isMuted: channel.muted
|
|
41519
42236
|
}, channel.newMentionCount ? channel.newMentionCount > 99 ? '99+' : channel.newMentionCount : '')), buttonIcon || /*#__PURE__*/React__default.createElement(SvgMention, null)));
|
|
41520
42237
|
};
|
|
41521
|
-
var BottomButton$1 = styled__default.div(_templateObject$
|
|
42238
|
+
var BottomButton$1 = styled__default.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) {
|
|
41522
42239
|
return props.animateFrom === 'bottom' && "bottom: " + (props.bottomOffset + (props.bottomPosition === undefined ? 45 : props.bottomPosition) + (props.showsUnreadMentionsButton ? 60 : 0) - 180) + "px";
|
|
41523
42240
|
}, function (props) {
|
|
41524
42241
|
return props.animateFrom === 'right' && "right: " + (props.rightPosition === undefined ? 16 : props.rightPosition - 100) + "px";
|
|
@@ -41529,7 +42246,7 @@ var BottomButton$1 = styled__default.div(_templateObject$Y || (_templateObject$Y
|
|
|
41529
42246
|
}, function (props) {
|
|
41530
42247
|
return props.backgroundColor;
|
|
41531
42248
|
});
|
|
41532
|
-
var UnreadCount$2 = styled__default.span(_templateObject2$
|
|
42249
|
+
var UnreadCount$2 = styled__default.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) {
|
|
41533
42250
|
return props.backgroundColor;
|
|
41534
42251
|
}, function (props) {
|
|
41535
42252
|
return props.fontSize || '13px';
|