sceyt-chat-react-uikit 1.7.2-beta.1 → 1.7.2-beta.11
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 +1666 -906
- package/index.modern.js +1666 -887
- package/package.json +1 -1
- package/types/index.d.ts +28 -9
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,69 @@ 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
|
+
updateMessagesMarkers: function updateMessagesMarkers(state, action) {
|
|
10692
|
+
var _marker$user;
|
|
10693
|
+
var _action$payload13 = action.payload,
|
|
10694
|
+
channelId = _action$payload13.channelId,
|
|
10695
|
+
deliveryStatus = _action$payload13.deliveryStatus,
|
|
10696
|
+
marker = _action$payload13.marker;
|
|
10697
|
+
var userId = (_marker$user = marker.user) === null || _marker$user === void 0 ? void 0 : _marker$user.id;
|
|
10698
|
+
var messageIds = marker.messageIds;
|
|
10699
|
+
for (var _iterator = _createForOfIteratorHelperLoose(messageIds), _step; !(_step = _iterator()).done;) {
|
|
10700
|
+
var messageId = _step.value;
|
|
10701
|
+
if (!state.messageMarkers[channelId]) {
|
|
10702
|
+
state.messageMarkers[channelId] = {};
|
|
10703
|
+
}
|
|
10704
|
+
if (!state.messageMarkers[channelId][messageId]) {
|
|
10705
|
+
state.messageMarkers[channelId][messageId] = {};
|
|
10706
|
+
}
|
|
10707
|
+
if (!state.messageMarkers[channelId][messageId][deliveryStatus]) {
|
|
10708
|
+
state.messageMarkers[channelId][messageId][deliveryStatus] = [];
|
|
10709
|
+
}
|
|
10710
|
+
var isUserMarkered = state.messageMarkers[channelId][messageId][deliveryStatus].some(function (marker) {
|
|
10711
|
+
var _marker$user2;
|
|
10712
|
+
return ((_marker$user2 = marker.user) === null || _marker$user2 === void 0 ? void 0 : _marker$user2.id) === userId;
|
|
10713
|
+
});
|
|
10714
|
+
if (!isUserMarkered) {
|
|
10715
|
+
state.messageMarkers[channelId][messageId][deliveryStatus].push(marker);
|
|
10716
|
+
}
|
|
10717
|
+
}
|
|
10718
|
+
},
|
|
10719
|
+
setMessagesMarkersLoadingState: function setMessagesMarkersLoadingState(state, action) {
|
|
10720
|
+
state.messagesMarkersLoadingState = action.payload.state;
|
|
10694
10721
|
}
|
|
10695
10722
|
},
|
|
10696
10723
|
extraReducers: function extraReducers(builder) {
|
|
@@ -10740,7 +10767,12 @@ var _messageSlice$actions = messageSlice.actions,
|
|
|
10740
10767
|
setPlayingAudioId = _messageSlice$actions.setPlayingAudioId,
|
|
10741
10768
|
addSelectedMessage = _messageSlice$actions.addSelectedMessage,
|
|
10742
10769
|
removeSelectedMessage = _messageSlice$actions.removeSelectedMessage,
|
|
10743
|
-
clearSelectedMessages = _messageSlice$actions.clearSelectedMessages
|
|
10770
|
+
clearSelectedMessages = _messageSlice$actions.clearSelectedMessages,
|
|
10771
|
+
setOGMetadata = _messageSlice$actions.setOGMetadata,
|
|
10772
|
+
updateOGMetadata = _messageSlice$actions.updateOGMetadata,
|
|
10773
|
+
setMessageMarkers = _messageSlice$actions.setMessageMarkers,
|
|
10774
|
+
setMessagesMarkersLoadingState = _messageSlice$actions.setMessagesMarkersLoadingState,
|
|
10775
|
+
updateMessagesMarkers = _messageSlice$actions.updateMessagesMarkers;
|
|
10744
10776
|
var MessageReducer = messageSlice.reducer;
|
|
10745
10777
|
|
|
10746
10778
|
var initialState$2 = {
|
|
@@ -11352,6 +11384,15 @@ var markMessagesAsDeliveredAC = function markMessagesAsDeliveredAC(channelId, me
|
|
|
11352
11384
|
}
|
|
11353
11385
|
};
|
|
11354
11386
|
};
|
|
11387
|
+
var markVoiceMessageAsPlayedAC = function markVoiceMessageAsPlayedAC(channelId, messageIds) {
|
|
11388
|
+
return {
|
|
11389
|
+
type: MARK_VOICE_MESSAGE_AS_PLAYED,
|
|
11390
|
+
payload: {
|
|
11391
|
+
channelId: channelId,
|
|
11392
|
+
messageIds: messageIds
|
|
11393
|
+
}
|
|
11394
|
+
};
|
|
11395
|
+
};
|
|
11355
11396
|
var sendTypingAC = function sendTypingAC(state) {
|
|
11356
11397
|
return {
|
|
11357
11398
|
type: SEND_TYPING,
|
|
@@ -11527,6 +11568,7 @@ var getChannelMentionsAC = function getChannelMentionsAC(channelId) {
|
|
|
11527
11568
|
|
|
11528
11569
|
var GET_MESSAGES = 'GET_MESSAGES';
|
|
11529
11570
|
var GET_MESSAGE = 'GET_MESSAGE';
|
|
11571
|
+
var GET_MESSAGE_MARKERS = 'GET_MESSAGE_MARKERS';
|
|
11530
11572
|
var LOAD_MORE_MESSAGES = 'LOAD_MORE_MESSAGES';
|
|
11531
11573
|
var SEND_MESSAGE = 'SEND_MESSAGE';
|
|
11532
11574
|
var SEND_TEXT_MESSAGE = 'SEND_TEXT_MESSAGE';
|
|
@@ -11820,11 +11862,22 @@ function setMessagesHasNextAC(hasNext) {
|
|
|
11820
11862
|
hasNext: hasNext
|
|
11821
11863
|
});
|
|
11822
11864
|
}
|
|
11823
|
-
function
|
|
11865
|
+
function setOGMetadataAC(url, metadata) {
|
|
11866
|
+
return setOGMetadata({
|
|
11867
|
+
url: url,
|
|
11868
|
+
metadata: metadata
|
|
11869
|
+
});
|
|
11870
|
+
}
|
|
11871
|
+
function updateOGMetadataAC(url, metadata) {
|
|
11872
|
+
return updateOGMetadata({
|
|
11873
|
+
url: url,
|
|
11874
|
+
metadata: metadata
|
|
11875
|
+
});
|
|
11876
|
+
}
|
|
11877
|
+
function setUpdateMessageAttachmentAC(url, attachmentUrl) {
|
|
11824
11878
|
return updateMessageAttachment({
|
|
11825
11879
|
url: url,
|
|
11826
|
-
|
|
11827
|
-
params: params
|
|
11880
|
+
attachmentUrl: attachmentUrl
|
|
11828
11881
|
});
|
|
11829
11882
|
}
|
|
11830
11883
|
function updateMessageAC(messageId, params, addIfNotExists) {
|
|
@@ -11949,6 +12002,36 @@ function removeSelectedMessageAC(messageId) {
|
|
|
11949
12002
|
function clearSelectedMessagesAC() {
|
|
11950
12003
|
return clearSelectedMessages();
|
|
11951
12004
|
}
|
|
12005
|
+
function getMessageMarkersAC(messageId, channelId, deliveryStatus) {
|
|
12006
|
+
return {
|
|
12007
|
+
type: GET_MESSAGE_MARKERS,
|
|
12008
|
+
payload: {
|
|
12009
|
+
messageId: messageId,
|
|
12010
|
+
channelId: channelId,
|
|
12011
|
+
deliveryStatus: deliveryStatus
|
|
12012
|
+
}
|
|
12013
|
+
};
|
|
12014
|
+
}
|
|
12015
|
+
function setMessageMarkersAC(channelId, messageId, messageMarkers, deliveryStatus) {
|
|
12016
|
+
return setMessageMarkers({
|
|
12017
|
+
channelId: channelId,
|
|
12018
|
+
messageId: messageId,
|
|
12019
|
+
messageMarkers: messageMarkers,
|
|
12020
|
+
deliveryStatus: deliveryStatus
|
|
12021
|
+
});
|
|
12022
|
+
}
|
|
12023
|
+
function updateMessagesMarkersAC(channelId, deliveryStatus, marker) {
|
|
12024
|
+
return updateMessagesMarkers({
|
|
12025
|
+
channelId: channelId,
|
|
12026
|
+
deliveryStatus: deliveryStatus,
|
|
12027
|
+
marker: marker
|
|
12028
|
+
});
|
|
12029
|
+
}
|
|
12030
|
+
function setMessagesMarkersLoadingStateAC(state) {
|
|
12031
|
+
return setMessagesMarkersLoadingState({
|
|
12032
|
+
state: state
|
|
12033
|
+
});
|
|
12034
|
+
}
|
|
11952
12035
|
|
|
11953
12036
|
var SET_CONTACT_LOADING_STATE = 'SET_CONTACT_LOADING_STATE';
|
|
11954
12037
|
var GET_CONTACTS = 'GET_CONTACTS';
|
|
@@ -14223,6 +14306,8 @@ function watchForEvents() {
|
|
|
14223
14306
|
name: markerList.name,
|
|
14224
14307
|
markersMap: markersMap
|
|
14225
14308
|
});
|
|
14309
|
+
_context.n = 71;
|
|
14310
|
+
return effects.put(updateMessagesMarkersAC(channelId, markerList.name, markerList));
|
|
14226
14311
|
case 71:
|
|
14227
14312
|
return _context.a(3, 142);
|
|
14228
14313
|
case 72:
|
|
@@ -14757,27 +14842,28 @@ var _marked$2 = /*#__PURE__*/_regenerator().m(createChannel),
|
|
|
14757
14842
|
_marked7 = /*#__PURE__*/_regenerator().m(getChannelMentions),
|
|
14758
14843
|
_marked8 = /*#__PURE__*/_regenerator().m(channelsForForwardLoadMore),
|
|
14759
14844
|
_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(
|
|
14845
|
+
_marked0 = /*#__PURE__*/_regenerator().m(markVoiceMessageAsPlayed),
|
|
14846
|
+
_marked1 = /*#__PURE__*/_regenerator().m(markMessagesDelivered),
|
|
14847
|
+
_marked10 = /*#__PURE__*/_regenerator().m(switchChannel),
|
|
14848
|
+
_marked11 = /*#__PURE__*/_regenerator().m(notificationsTurnOff),
|
|
14849
|
+
_marked12 = /*#__PURE__*/_regenerator().m(notificationsTurnOn),
|
|
14850
|
+
_marked13 = /*#__PURE__*/_regenerator().m(markChannelAsRead),
|
|
14851
|
+
_marked14 = /*#__PURE__*/_regenerator().m(markChannelAsUnRead),
|
|
14852
|
+
_marked15 = /*#__PURE__*/_regenerator().m(pinChannel),
|
|
14853
|
+
_marked16 = /*#__PURE__*/_regenerator().m(unpinChannel),
|
|
14854
|
+
_marked17 = /*#__PURE__*/_regenerator().m(removeChannelCaches),
|
|
14855
|
+
_marked18 = /*#__PURE__*/_regenerator().m(leaveChannel),
|
|
14856
|
+
_marked19 = /*#__PURE__*/_regenerator().m(deleteChannel),
|
|
14857
|
+
_marked20 = /*#__PURE__*/_regenerator().m(blockChannel),
|
|
14858
|
+
_marked21 = /*#__PURE__*/_regenerator().m(updateChannel),
|
|
14859
|
+
_marked22 = /*#__PURE__*/_regenerator().m(checkUsersStatus),
|
|
14860
|
+
_marked23 = /*#__PURE__*/_regenerator().m(sendTyping),
|
|
14861
|
+
_marked24 = /*#__PURE__*/_regenerator().m(sendRecording),
|
|
14862
|
+
_marked25 = /*#__PURE__*/_regenerator().m(clearHistory),
|
|
14863
|
+
_marked26 = /*#__PURE__*/_regenerator().m(deleteAllMessages),
|
|
14864
|
+
_marked27 = /*#__PURE__*/_regenerator().m(joinChannel),
|
|
14865
|
+
_marked28 = /*#__PURE__*/_regenerator().m(watchForChannelEvents),
|
|
14866
|
+
_marked29 = /*#__PURE__*/_regenerator().m(ChannelsSaga);
|
|
14781
14867
|
function createChannel(action) {
|
|
14782
14868
|
var payload, channelData, dontCreateIfNotExists, callback, SceytChatClient, createChannelData, fileToUpload, isSelfChannel, channelIsExistOnAllChannels, createdChannel, allChannels, memberId, checkChannelExist, messageToSend, _allChannels, _memberId, _t;
|
|
14783
14869
|
return _regenerator().w(function (_context) {
|
|
@@ -14895,7 +14981,7 @@ function createChannel(action) {
|
|
|
14895
14981
|
}
|
|
14896
14982
|
messageToSend = {
|
|
14897
14983
|
body: createdChannel.type === DEFAULT_CHANNEL_TYPE.BROADCAST || createdChannel.type === DEFAULT_CHANNEL_TYPE.PUBLIC ? 'CC' : 'CG',
|
|
14898
|
-
|
|
14984
|
+
mentionedUsers: [],
|
|
14899
14985
|
attachments: [],
|
|
14900
14986
|
type: 'system'
|
|
14901
14987
|
};
|
|
@@ -15675,7 +15761,7 @@ function markMessagesRead(action) {
|
|
|
15675
15761
|
deliveryStatus: MESSAGE_DELIVERY_STATUS.READ,
|
|
15676
15762
|
userMarkers: [{
|
|
15677
15763
|
user: messageListMarker.user,
|
|
15678
|
-
createdAt: messageListMarker.
|
|
15764
|
+
createdAt: messageListMarker.createdAt,
|
|
15679
15765
|
messageId: messageId,
|
|
15680
15766
|
name: MESSAGE_DELIVERY_STATUS.READ
|
|
15681
15767
|
}]
|
|
@@ -15703,7 +15789,7 @@ function markMessagesRead(action) {
|
|
|
15703
15789
|
}
|
|
15704
15790
|
}, _marked9, null, [[2, 9]]);
|
|
15705
15791
|
}
|
|
15706
|
-
function
|
|
15792
|
+
function markVoiceMessageAsPlayed(action) {
|
|
15707
15793
|
var payload, channelId, messageIds, channel, _t10;
|
|
15708
15794
|
return _regenerator().w(function (_context0) {
|
|
15709
15795
|
while (1) switch (_context0.p = _context0.n) {
|
|
@@ -15725,151 +15811,148 @@ function markMessagesDelivered(action) {
|
|
|
15725
15811
|
_context0.n = 3;
|
|
15726
15812
|
break;
|
|
15727
15813
|
}
|
|
15728
|
-
log.info('send delivered marker ', messageIds);
|
|
15729
15814
|
_context0.n = 3;
|
|
15730
|
-
return effects.call(channel.
|
|
15815
|
+
return effects.call(channel.markVoiceMessagesAsPlayed, messageIds);
|
|
15731
15816
|
case 3:
|
|
15732
15817
|
_context0.n = 5;
|
|
15733
15818
|
break;
|
|
15734
15819
|
case 4:
|
|
15735
15820
|
_context0.p = 4;
|
|
15736
15821
|
_t10 = _context0.v;
|
|
15737
|
-
log.error(_t10, 'Error on mark messages
|
|
15822
|
+
log.error(_t10, 'Error on mark voice messages read');
|
|
15738
15823
|
case 5:
|
|
15739
15824
|
return _context0.a(2);
|
|
15740
15825
|
}
|
|
15741
15826
|
}, _marked0, null, [[1, 4]]);
|
|
15742
15827
|
}
|
|
15743
|
-
function
|
|
15744
|
-
var payload,
|
|
15828
|
+
function markMessagesDelivered(action) {
|
|
15829
|
+
var payload, channelId, messageIds, channel, _t11;
|
|
15745
15830
|
return _regenerator().w(function (_context1) {
|
|
15746
15831
|
while (1) switch (_context1.p = _context1.n) {
|
|
15747
15832
|
case 0:
|
|
15748
|
-
|
|
15833
|
+
payload = action.payload;
|
|
15834
|
+
channelId = payload.channelId, messageIds = payload.messageIds;
|
|
15835
|
+
_context1.p = 1;
|
|
15836
|
+
_context1.n = 2;
|
|
15837
|
+
return effects.call(getChannelFromMap, channelId);
|
|
15838
|
+
case 2:
|
|
15839
|
+
channel = _context1.v;
|
|
15840
|
+
if (!channel) {
|
|
15841
|
+
channel = getChannelFromAllChannels(channelId);
|
|
15842
|
+
if (channel) {
|
|
15843
|
+
setChannelInMap(channel);
|
|
15844
|
+
}
|
|
15845
|
+
}
|
|
15846
|
+
if (!channel) {
|
|
15847
|
+
_context1.n = 3;
|
|
15848
|
+
break;
|
|
15849
|
+
}
|
|
15850
|
+
log.info('send delivered marker ', messageIds);
|
|
15851
|
+
_context1.n = 3;
|
|
15852
|
+
return effects.call(channel.markMessagesAsReceived, messageIds);
|
|
15853
|
+
case 3:
|
|
15854
|
+
_context1.n = 5;
|
|
15855
|
+
break;
|
|
15856
|
+
case 4:
|
|
15857
|
+
_context1.p = 4;
|
|
15858
|
+
_t11 = _context1.v;
|
|
15859
|
+
log.error(_t11, 'Error on mark messages delivered');
|
|
15860
|
+
case 5:
|
|
15861
|
+
return _context1.a(2);
|
|
15862
|
+
}
|
|
15863
|
+
}, _marked1, null, [[1, 4]]);
|
|
15864
|
+
}
|
|
15865
|
+
function switchChannel(action) {
|
|
15866
|
+
var payload, channel, updateActiveChannel, channelToSwitch, existingChannel, addChannel, _SceytChatClient5, fetchedChannel, channelFromMap, currentActiveChannel, _t12;
|
|
15867
|
+
return _regenerator().w(function (_context10) {
|
|
15868
|
+
while (1) switch (_context10.p = _context10.n) {
|
|
15869
|
+
case 0:
|
|
15870
|
+
_context10.p = 0;
|
|
15749
15871
|
payload = action.payload;
|
|
15750
15872
|
channel = payload.channel, updateActiveChannel = payload.updateActiveChannel;
|
|
15751
15873
|
channelToSwitch = channel;
|
|
15752
15874
|
if (!(!(channel !== null && channel !== void 0 && channel.id) && updateActiveChannel)) {
|
|
15753
|
-
|
|
15875
|
+
_context10.n = 3;
|
|
15754
15876
|
break;
|
|
15755
15877
|
}
|
|
15756
|
-
|
|
15878
|
+
_context10.n = 1;
|
|
15757
15879
|
return effects.call(setActiveChannelId, '');
|
|
15758
15880
|
case 1:
|
|
15759
|
-
|
|
15881
|
+
_context10.n = 2;
|
|
15760
15882
|
return effects.put(setActiveChannelAC({}));
|
|
15761
15883
|
case 2:
|
|
15762
|
-
return
|
|
15884
|
+
return _context10.a(2);
|
|
15763
15885
|
case 3:
|
|
15764
15886
|
existingChannel = checkChannelExists(channel.id);
|
|
15765
15887
|
if (existingChannel) {
|
|
15766
|
-
|
|
15888
|
+
_context10.n = 9;
|
|
15767
15889
|
break;
|
|
15768
15890
|
}
|
|
15769
15891
|
addChannel = getChannelFromAllChannels(channel.id);
|
|
15770
15892
|
if (!addChannel) {
|
|
15771
|
-
|
|
15893
|
+
_context10.n = 5;
|
|
15772
15894
|
break;
|
|
15773
15895
|
}
|
|
15774
15896
|
setChannelInMap(addChannel);
|
|
15775
|
-
|
|
15897
|
+
_context10.n = 4;
|
|
15776
15898
|
return effects.put(addChannelAC(JSON.parse(JSON.stringify(addChannel))));
|
|
15777
15899
|
case 4:
|
|
15778
15900
|
channelToSwitch = _extends({}, channelToSwitch, addChannel);
|
|
15779
|
-
|
|
15901
|
+
_context10.n = 8;
|
|
15780
15902
|
break;
|
|
15781
15903
|
case 5:
|
|
15782
15904
|
_SceytChatClient5 = getClient();
|
|
15783
|
-
|
|
15905
|
+
_context10.n = 6;
|
|
15784
15906
|
return effects.call(_SceytChatClient5.getChannel, channel.id);
|
|
15785
15907
|
case 6:
|
|
15786
|
-
fetchedChannel =
|
|
15908
|
+
fetchedChannel = _context10.v;
|
|
15787
15909
|
addChannelToAllChannels(fetchedChannel);
|
|
15788
15910
|
setChannelInMap(fetchedChannel);
|
|
15789
|
-
|
|
15911
|
+
_context10.n = 7;
|
|
15790
15912
|
return effects.put(addChannelAC(JSON.parse(JSON.stringify(fetchedChannel))));
|
|
15791
15913
|
case 7:
|
|
15792
15914
|
channelToSwitch = _extends({}, channelToSwitch, fetchedChannel);
|
|
15793
15915
|
case 8:
|
|
15794
|
-
|
|
15916
|
+
_context10.n = 10;
|
|
15795
15917
|
break;
|
|
15796
15918
|
case 9:
|
|
15797
15919
|
channelFromMap = getChannelFromMap(channel.id);
|
|
15798
15920
|
channelToSwitch = _extends({}, channelToSwitch, channelFromMap);
|
|
15799
15921
|
case 10:
|
|
15800
15922
|
if (!updateActiveChannel) {
|
|
15801
|
-
|
|
15923
|
+
_context10.n = 13;
|
|
15802
15924
|
break;
|
|
15803
15925
|
}
|
|
15804
15926
|
currentActiveChannel = getChannelFromMap(getActiveChannelId());
|
|
15805
|
-
|
|
15927
|
+
_context10.n = 11;
|
|
15806
15928
|
return effects.call(setUnreadScrollTo, true);
|
|
15807
15929
|
case 11:
|
|
15808
|
-
|
|
15930
|
+
_context10.n = 12;
|
|
15809
15931
|
return effects.call(setActiveChannelId, channel && channel.id);
|
|
15810
15932
|
case 12:
|
|
15811
15933
|
if (channel.isLinkedChannel) {
|
|
15812
15934
|
channelToSwitch.linkedFrom = currentActiveChannel;
|
|
15813
15935
|
}
|
|
15814
|
-
|
|
15936
|
+
_context10.n = 13;
|
|
15815
15937
|
return effects.put(setActiveChannelAC(_extends({}, channelToSwitch)));
|
|
15816
15938
|
case 13:
|
|
15817
|
-
|
|
15939
|
+
_context10.n = 15;
|
|
15818
15940
|
break;
|
|
15819
15941
|
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;
|
|
15942
|
+
_context10.p = 14;
|
|
15861
15943
|
_t12 = _context10.v;
|
|
15862
|
-
log.error('
|
|
15863
|
-
case
|
|
15944
|
+
log.error('error in switch channel', _t12);
|
|
15945
|
+
case 15:
|
|
15864
15946
|
return _context10.a(2);
|
|
15865
15947
|
}
|
|
15866
|
-
}, _marked10, null, [[
|
|
15948
|
+
}, _marked10, null, [[0, 14]]);
|
|
15867
15949
|
}
|
|
15868
|
-
function
|
|
15869
|
-
var activeChannelId, channel, updatedChannel, _t13;
|
|
15950
|
+
function notificationsTurnOff(action) {
|
|
15951
|
+
var expireTime, activeChannelId, channel, updatedChannel, _t13;
|
|
15870
15952
|
return _regenerator().w(function (_context11) {
|
|
15871
15953
|
while (1) switch (_context11.p = _context11.n) {
|
|
15872
15954
|
case 0:
|
|
15955
|
+
expireTime = action.payload.expireTime;
|
|
15873
15956
|
_context11.n = 1;
|
|
15874
15957
|
return effects.call(getActiveChannelId);
|
|
15875
15958
|
case 1:
|
|
@@ -15880,7 +15963,7 @@ function notificationsTurnOn() {
|
|
|
15880
15963
|
channel = _context11.v;
|
|
15881
15964
|
_context11.p = 3;
|
|
15882
15965
|
_context11.n = 4;
|
|
15883
|
-
return effects.call(channel.
|
|
15966
|
+
return effects.call(channel.mute, expireTime);
|
|
15884
15967
|
case 4:
|
|
15885
15968
|
updatedChannel = _context11.v;
|
|
15886
15969
|
updateChannelOnAllChannels(channel.id, {
|
|
@@ -15898,51 +15981,53 @@ function notificationsTurnOn() {
|
|
|
15898
15981
|
case 6:
|
|
15899
15982
|
_context11.p = 6;
|
|
15900
15983
|
_t13 = _context11.v;
|
|
15901
|
-
log.error('ERROR turn
|
|
15984
|
+
log.error('ERROR turn off notifications', _t13.message);
|
|
15902
15985
|
case 7:
|
|
15903
15986
|
return _context11.a(2);
|
|
15904
15987
|
}
|
|
15905
15988
|
}, _marked11, null, [[3, 6]]);
|
|
15906
15989
|
}
|
|
15907
|
-
function
|
|
15908
|
-
var
|
|
15990
|
+
function notificationsTurnOn() {
|
|
15991
|
+
var activeChannelId, channel, updatedChannel, _t14;
|
|
15909
15992
|
return _regenerator().w(function (_context12) {
|
|
15910
15993
|
while (1) switch (_context12.p = _context12.n) {
|
|
15911
15994
|
case 0:
|
|
15912
|
-
_context12.p = 0;
|
|
15913
|
-
channelId = action.payload.channelId;
|
|
15914
15995
|
_context12.n = 1;
|
|
15915
|
-
return effects.call(
|
|
15996
|
+
return effects.call(getActiveChannelId);
|
|
15916
15997
|
case 1:
|
|
15917
|
-
|
|
15918
|
-
if (!channel) {
|
|
15919
|
-
channel = getChannelFromAllChannels(channelId);
|
|
15920
|
-
}
|
|
15998
|
+
activeChannelId = _context12.v;
|
|
15921
15999
|
_context12.n = 2;
|
|
15922
|
-
return effects.call(
|
|
16000
|
+
return effects.call(getChannelFromMap, activeChannelId);
|
|
15923
16001
|
case 2:
|
|
15924
|
-
|
|
15925
|
-
|
|
15926
|
-
|
|
15927
|
-
|
|
15928
|
-
|
|
15929
|
-
|
|
15930
|
-
|
|
15931
|
-
|
|
15932
|
-
|
|
16002
|
+
channel = _context12.v;
|
|
16003
|
+
_context12.p = 3;
|
|
16004
|
+
_context12.n = 4;
|
|
16005
|
+
return effects.call(channel.unmute);
|
|
16006
|
+
case 4:
|
|
16007
|
+
updatedChannel = _context12.v;
|
|
16008
|
+
updateChannelOnAllChannels(channel.id, {
|
|
16009
|
+
muted: updatedChannel.muted,
|
|
16010
|
+
mutedTill: updatedChannel.mutedTill
|
|
16011
|
+
});
|
|
15933
16012
|
_context12.n = 5;
|
|
16013
|
+
return effects.put(updateChannelDataAC(updatedChannel.id, {
|
|
16014
|
+
muted: updatedChannel.muted,
|
|
16015
|
+
mutedTill: updatedChannel.mutedTill
|
|
16016
|
+
}));
|
|
16017
|
+
case 5:
|
|
16018
|
+
_context12.n = 7;
|
|
15934
16019
|
break;
|
|
15935
|
-
case
|
|
15936
|
-
_context12.p =
|
|
16020
|
+
case 6:
|
|
16021
|
+
_context12.p = 6;
|
|
15937
16022
|
_t14 = _context12.v;
|
|
15938
|
-
log.error(
|
|
15939
|
-
case
|
|
16023
|
+
log.error('ERROR turn on notifications: ', _t14.message);
|
|
16024
|
+
case 7:
|
|
15940
16025
|
return _context12.a(2);
|
|
15941
16026
|
}
|
|
15942
|
-
}, _marked12, null, [[
|
|
16027
|
+
}, _marked12, null, [[3, 6]]);
|
|
15943
16028
|
}
|
|
15944
|
-
function
|
|
15945
|
-
var channelId, channel, _t15;
|
|
16029
|
+
function markChannelAsRead(action) {
|
|
16030
|
+
var channelId, channel, updateData, _t15;
|
|
15946
16031
|
return _regenerator().w(function (_context13) {
|
|
15947
16032
|
while (1) switch (_context13.p = _context13.n) {
|
|
15948
16033
|
case 0:
|
|
@@ -15956,15 +16041,16 @@ function markChannelAsUnRead(action) {
|
|
|
15956
16041
|
channel = getChannelFromAllChannels(channelId);
|
|
15957
16042
|
}
|
|
15958
16043
|
_context13.n = 2;
|
|
15959
|
-
return effects.call(channel.
|
|
16044
|
+
return effects.call(channel.markAsRead);
|
|
15960
16045
|
case 2:
|
|
15961
|
-
|
|
15962
|
-
unread:
|
|
15963
|
-
|
|
16046
|
+
updateData = {
|
|
16047
|
+
unread: false,
|
|
16048
|
+
newMessageCount: 0,
|
|
16049
|
+
newMentionCount: 0
|
|
16050
|
+
};
|
|
16051
|
+
updateChannelOnAllChannels(channel.id, updateData);
|
|
15964
16052
|
_context13.n = 3;
|
|
15965
|
-
return effects.put(updateChannelDataAC(channel.id,
|
|
15966
|
-
unread: true
|
|
15967
|
-
}));
|
|
16053
|
+
return effects.put(updateChannelDataAC(channel.id, updateData));
|
|
15968
16054
|
case 3:
|
|
15969
16055
|
_context13.n = 5;
|
|
15970
16056
|
break;
|
|
@@ -15977,8 +16063,8 @@ function markChannelAsUnRead(action) {
|
|
|
15977
16063
|
}
|
|
15978
16064
|
}, _marked13, null, [[0, 4]]);
|
|
15979
16065
|
}
|
|
15980
|
-
function
|
|
15981
|
-
var channelId, channel,
|
|
16066
|
+
function markChannelAsUnRead(action) {
|
|
16067
|
+
var channelId, channel, _t16;
|
|
15982
16068
|
return _regenerator().w(function (_context14) {
|
|
15983
16069
|
while (1) switch (_context14.p = _context14.n) {
|
|
15984
16070
|
case 0:
|
|
@@ -15992,29 +16078,28 @@ function pinChannel(action) {
|
|
|
15992
16078
|
channel = getChannelFromAllChannels(channelId);
|
|
15993
16079
|
}
|
|
15994
16080
|
_context14.n = 2;
|
|
15995
|
-
return effects.call(channel.
|
|
16081
|
+
return effects.call(channel.markAsUnRead);
|
|
15996
16082
|
case 2:
|
|
15997
|
-
updatedChannel = _context14.v;
|
|
15998
16083
|
updateChannelOnAllChannels(channel.id, {
|
|
15999
|
-
|
|
16084
|
+
unread: true
|
|
16000
16085
|
});
|
|
16001
16086
|
_context14.n = 3;
|
|
16002
|
-
return effects.put(updateChannelDataAC(
|
|
16003
|
-
|
|
16004
|
-
}
|
|
16087
|
+
return effects.put(updateChannelDataAC(channel.id, {
|
|
16088
|
+
unread: true
|
|
16089
|
+
}));
|
|
16005
16090
|
case 3:
|
|
16006
16091
|
_context14.n = 5;
|
|
16007
16092
|
break;
|
|
16008
16093
|
case 4:
|
|
16009
16094
|
_context14.p = 4;
|
|
16010
16095
|
_t16 = _context14.v;
|
|
16011
|
-
log.error(_t16, 'Error in
|
|
16096
|
+
log.error(_t16, 'Error in set channel unread');
|
|
16012
16097
|
case 5:
|
|
16013
16098
|
return _context14.a(2);
|
|
16014
16099
|
}
|
|
16015
16100
|
}, _marked14, null, [[0, 4]]);
|
|
16016
16101
|
}
|
|
16017
|
-
function
|
|
16102
|
+
function pinChannel(action) {
|
|
16018
16103
|
var channelId, channel, updatedChannel, _t17;
|
|
16019
16104
|
return _regenerator().w(function (_context15) {
|
|
16020
16105
|
while (1) switch (_context15.p = _context15.n) {
|
|
@@ -16029,7 +16114,7 @@ function unpinChannel(action) {
|
|
|
16029
16114
|
channel = getChannelFromAllChannels(channelId);
|
|
16030
16115
|
}
|
|
16031
16116
|
_context15.n = 2;
|
|
16032
|
-
return effects.call(channel.
|
|
16117
|
+
return effects.call(channel.pin);
|
|
16033
16118
|
case 2:
|
|
16034
16119
|
updatedChannel = _context15.v;
|
|
16035
16120
|
updateChannelOnAllChannels(channel.id, {
|
|
@@ -16038,197 +16123,234 @@ function unpinChannel(action) {
|
|
|
16038
16123
|
_context15.n = 3;
|
|
16039
16124
|
return effects.put(updateChannelDataAC(updatedChannel.id, {
|
|
16040
16125
|
pinnedAt: updatedChannel.pinnedAt
|
|
16041
|
-
},
|
|
16126
|
+
}, true));
|
|
16042
16127
|
case 3:
|
|
16043
16128
|
_context15.n = 5;
|
|
16044
16129
|
break;
|
|
16045
16130
|
case 4:
|
|
16046
16131
|
_context15.p = 4;
|
|
16047
16132
|
_t17 = _context15.v;
|
|
16048
|
-
log.error(_t17, 'Error in
|
|
16133
|
+
log.error(_t17, 'Error in pinChannel');
|
|
16049
16134
|
case 5:
|
|
16050
16135
|
return _context15.a(2);
|
|
16051
16136
|
}
|
|
16052
16137
|
}, _marked15, null, [[0, 4]]);
|
|
16053
16138
|
}
|
|
16139
|
+
function unpinChannel(action) {
|
|
16140
|
+
var channelId, channel, updatedChannel, _t18;
|
|
16141
|
+
return _regenerator().w(function (_context16) {
|
|
16142
|
+
while (1) switch (_context16.p = _context16.n) {
|
|
16143
|
+
case 0:
|
|
16144
|
+
_context16.p = 0;
|
|
16145
|
+
channelId = action.payload.channelId;
|
|
16146
|
+
_context16.n = 1;
|
|
16147
|
+
return effects.call(getChannelFromMap, channelId);
|
|
16148
|
+
case 1:
|
|
16149
|
+
channel = _context16.v;
|
|
16150
|
+
if (!channel) {
|
|
16151
|
+
channel = getChannelFromAllChannels(channelId);
|
|
16152
|
+
}
|
|
16153
|
+
_context16.n = 2;
|
|
16154
|
+
return effects.call(channel.unpin);
|
|
16155
|
+
case 2:
|
|
16156
|
+
updatedChannel = _context16.v;
|
|
16157
|
+
updateChannelOnAllChannels(channel.id, {
|
|
16158
|
+
pinnedAt: updatedChannel.pinnedAt
|
|
16159
|
+
});
|
|
16160
|
+
_context16.n = 3;
|
|
16161
|
+
return effects.put(updateChannelDataAC(updatedChannel.id, {
|
|
16162
|
+
pinnedAt: updatedChannel.pinnedAt
|
|
16163
|
+
}, false, true));
|
|
16164
|
+
case 3:
|
|
16165
|
+
_context16.n = 5;
|
|
16166
|
+
break;
|
|
16167
|
+
case 4:
|
|
16168
|
+
_context16.p = 4;
|
|
16169
|
+
_t18 = _context16.v;
|
|
16170
|
+
log.error(_t18, 'Error in unpinChannel');
|
|
16171
|
+
case 5:
|
|
16172
|
+
return _context16.a(2);
|
|
16173
|
+
}
|
|
16174
|
+
}, _marked16, null, [[0, 4]]);
|
|
16175
|
+
}
|
|
16054
16176
|
function removeChannelCaches(action) {
|
|
16055
16177
|
var payload, channelId, activeChannelId, activeChannel;
|
|
16056
|
-
return _regenerator().w(function (
|
|
16057
|
-
while (1) switch (
|
|
16178
|
+
return _regenerator().w(function (_context17) {
|
|
16179
|
+
while (1) switch (_context17.n) {
|
|
16058
16180
|
case 0:
|
|
16059
16181
|
payload = action.payload;
|
|
16060
16182
|
channelId = payload.channelId;
|
|
16061
|
-
|
|
16183
|
+
_context17.n = 1;
|
|
16062
16184
|
return effects.call(getActiveChannelId);
|
|
16063
16185
|
case 1:
|
|
16064
|
-
activeChannelId =
|
|
16186
|
+
activeChannelId = _context17.v;
|
|
16065
16187
|
removeChannelFromMap(channelId);
|
|
16066
16188
|
removeMessagesFromMap(channelId);
|
|
16067
16189
|
if (!(activeChannelId === channelId)) {
|
|
16068
|
-
|
|
16190
|
+
_context17.n = 3;
|
|
16069
16191
|
break;
|
|
16070
16192
|
}
|
|
16071
|
-
|
|
16193
|
+
_context17.n = 2;
|
|
16072
16194
|
return effects.call(getLastChannelFromMap);
|
|
16073
16195
|
case 2:
|
|
16074
|
-
activeChannel =
|
|
16196
|
+
activeChannel = _context17.v;
|
|
16075
16197
|
if (!activeChannel) {
|
|
16076
|
-
|
|
16198
|
+
_context17.n = 3;
|
|
16077
16199
|
break;
|
|
16078
16200
|
}
|
|
16079
|
-
|
|
16201
|
+
_context17.n = 3;
|
|
16080
16202
|
return effects.put(switchChannelActionAC(JSON.parse(JSON.stringify(activeChannel))));
|
|
16081
16203
|
case 3:
|
|
16082
|
-
return
|
|
16204
|
+
return _context17.a(2);
|
|
16083
16205
|
}
|
|
16084
|
-
},
|
|
16206
|
+
}, _marked17);
|
|
16085
16207
|
}
|
|
16086
16208
|
function leaveChannel(action) {
|
|
16087
|
-
var payload, channelId, channel, messageBuilder, messageToSend,
|
|
16088
|
-
return _regenerator().w(function (
|
|
16089
|
-
while (1) switch (
|
|
16209
|
+
var payload, channelId, channel, messageBuilder, messageToSend, _t19;
|
|
16210
|
+
return _regenerator().w(function (_context18) {
|
|
16211
|
+
while (1) switch (_context18.p = _context18.n) {
|
|
16090
16212
|
case 0:
|
|
16091
|
-
|
|
16213
|
+
_context18.p = 0;
|
|
16092
16214
|
payload = action.payload;
|
|
16093
16215
|
channelId = payload.channelId;
|
|
16094
|
-
|
|
16216
|
+
_context18.n = 1;
|
|
16095
16217
|
return effects.call(getChannelFromMap, channelId);
|
|
16096
16218
|
case 1:
|
|
16097
|
-
channel =
|
|
16219
|
+
channel = _context18.v;
|
|
16098
16220
|
if (!channel) {
|
|
16099
16221
|
channel = getChannelFromAllChannels(channelId);
|
|
16100
16222
|
}
|
|
16101
16223
|
if (!channel) {
|
|
16102
|
-
|
|
16224
|
+
_context18.n = 5;
|
|
16103
16225
|
break;
|
|
16104
16226
|
}
|
|
16105
16227
|
if (!(channel.type === DEFAULT_CHANNEL_TYPE.GROUP || channel.type === DEFAULT_CHANNEL_TYPE.PRIVATE)) {
|
|
16106
|
-
|
|
16228
|
+
_context18.n = 2;
|
|
16107
16229
|
break;
|
|
16108
16230
|
}
|
|
16109
16231
|
messageBuilder = channel.createMessageBuilder();
|
|
16110
16232
|
messageBuilder.setBody('LG').setType('system').setDisplayCount(0).setSilent(true);
|
|
16111
16233
|
messageToSend = messageBuilder.create();
|
|
16112
16234
|
log.info('send message for left');
|
|
16113
|
-
|
|
16235
|
+
_context18.n = 2;
|
|
16114
16236
|
return effects.call(channel.sendMessage, messageToSend);
|
|
16115
16237
|
case 2:
|
|
16116
16238
|
log.info('leave');
|
|
16117
|
-
|
|
16239
|
+
_context18.n = 3;
|
|
16118
16240
|
return effects.call(channel.leave);
|
|
16119
16241
|
case 3:
|
|
16120
|
-
|
|
16242
|
+
_context18.n = 4;
|
|
16121
16243
|
return effects.put(removeChannelAC(channelId));
|
|
16122
16244
|
case 4:
|
|
16123
16245
|
deleteChannelFromAllChannels(channelId);
|
|
16124
|
-
|
|
16246
|
+
_context18.n = 5;
|
|
16125
16247
|
return effects.put(removeChannelCachesAC(channelId));
|
|
16126
16248
|
case 5:
|
|
16127
|
-
|
|
16249
|
+
_context18.n = 7;
|
|
16128
16250
|
break;
|
|
16129
16251
|
case 6:
|
|
16130
|
-
|
|
16131
|
-
|
|
16132
|
-
log.error('ERROR in leave channel - ',
|
|
16252
|
+
_context18.p = 6;
|
|
16253
|
+
_t19 = _context18.v;
|
|
16254
|
+
log.error('ERROR in leave channel - ', _t19.message);
|
|
16133
16255
|
case 7:
|
|
16134
|
-
return
|
|
16256
|
+
return _context18.a(2);
|
|
16135
16257
|
}
|
|
16136
|
-
},
|
|
16258
|
+
}, _marked18, null, [[0, 6]]);
|
|
16137
16259
|
}
|
|
16138
16260
|
function deleteChannel(action) {
|
|
16139
|
-
var payload, channelId, channel,
|
|
16140
|
-
return _regenerator().w(function (
|
|
16141
|
-
while (1) switch (
|
|
16261
|
+
var payload, channelId, channel, _t20;
|
|
16262
|
+
return _regenerator().w(function (_context19) {
|
|
16263
|
+
while (1) switch (_context19.p = _context19.n) {
|
|
16142
16264
|
case 0:
|
|
16143
|
-
|
|
16265
|
+
_context19.p = 0;
|
|
16144
16266
|
payload = action.payload;
|
|
16145
16267
|
channelId = payload.channelId;
|
|
16146
|
-
|
|
16268
|
+
_context19.n = 1;
|
|
16147
16269
|
return effects.call(getChannelFromMap, channelId);
|
|
16148
16270
|
case 1:
|
|
16149
|
-
channel =
|
|
16271
|
+
channel = _context19.v;
|
|
16150
16272
|
if (!channel) {
|
|
16151
16273
|
channel = getChannelFromAllChannels(channelId);
|
|
16152
16274
|
}
|
|
16153
16275
|
if (!channel) {
|
|
16154
|
-
|
|
16276
|
+
_context19.n = 5;
|
|
16155
16277
|
break;
|
|
16156
16278
|
}
|
|
16157
|
-
|
|
16279
|
+
_context19.n = 2;
|
|
16158
16280
|
return effects.call(channel["delete"]);
|
|
16159
16281
|
case 2:
|
|
16160
|
-
|
|
16282
|
+
_context19.n = 3;
|
|
16161
16283
|
return effects.put(setChannelToRemoveAC(channel));
|
|
16162
16284
|
case 3:
|
|
16163
|
-
|
|
16285
|
+
_context19.n = 4;
|
|
16164
16286
|
return effects.put(removeChannelAC(channelId));
|
|
16165
16287
|
case 4:
|
|
16166
|
-
|
|
16288
|
+
_context19.n = 5;
|
|
16167
16289
|
return effects.put(removeChannelCachesAC(channelId));
|
|
16168
16290
|
case 5:
|
|
16169
|
-
|
|
16291
|
+
_context19.n = 7;
|
|
16170
16292
|
break;
|
|
16171
16293
|
case 6:
|
|
16172
|
-
|
|
16173
|
-
|
|
16174
|
-
log.error('ERROR in delete channel',
|
|
16294
|
+
_context19.p = 6;
|
|
16295
|
+
_t20 = _context19.v;
|
|
16296
|
+
log.error('ERROR in delete channel', _t20);
|
|
16175
16297
|
case 7:
|
|
16176
|
-
return
|
|
16298
|
+
return _context19.a(2);
|
|
16177
16299
|
}
|
|
16178
|
-
},
|
|
16300
|
+
}, _marked19, null, [[0, 6]]);
|
|
16179
16301
|
}
|
|
16180
16302
|
function blockChannel(action) {
|
|
16181
|
-
var payload, channelId, channel,
|
|
16182
|
-
return _regenerator().w(function (
|
|
16183
|
-
while (1) switch (
|
|
16303
|
+
var payload, channelId, channel, _t21;
|
|
16304
|
+
return _regenerator().w(function (_context20) {
|
|
16305
|
+
while (1) switch (_context20.p = _context20.n) {
|
|
16184
16306
|
case 0:
|
|
16185
|
-
|
|
16307
|
+
_context20.p = 0;
|
|
16186
16308
|
payload = action.payload;
|
|
16187
16309
|
channelId = payload.channelId;
|
|
16188
|
-
|
|
16310
|
+
_context20.n = 1;
|
|
16189
16311
|
return effects.call(getChannelFromMap, channelId);
|
|
16190
16312
|
case 1:
|
|
16191
|
-
channel =
|
|
16313
|
+
channel = _context20.v;
|
|
16192
16314
|
if (!channel) {
|
|
16193
16315
|
channel = getChannelFromAllChannels(channelId);
|
|
16194
16316
|
}
|
|
16195
16317
|
if (!channel) {
|
|
16196
|
-
|
|
16318
|
+
_context20.n = 4;
|
|
16197
16319
|
break;
|
|
16198
16320
|
}
|
|
16199
|
-
|
|
16321
|
+
_context20.n = 2;
|
|
16200
16322
|
return effects.call(channel.block);
|
|
16201
16323
|
case 2:
|
|
16202
|
-
|
|
16324
|
+
_context20.n = 3;
|
|
16203
16325
|
return effects.put(removeChannelAC(channelId));
|
|
16204
16326
|
case 3:
|
|
16205
|
-
|
|
16327
|
+
_context20.n = 4;
|
|
16206
16328
|
return effects.put(removeChannelCachesAC(channelId));
|
|
16207
16329
|
case 4:
|
|
16208
|
-
|
|
16330
|
+
_context20.n = 6;
|
|
16209
16331
|
break;
|
|
16210
16332
|
case 5:
|
|
16211
|
-
|
|
16212
|
-
|
|
16213
|
-
log.error('ERROR in block channel - ',
|
|
16333
|
+
_context20.p = 5;
|
|
16334
|
+
_t21 = _context20.v;
|
|
16335
|
+
log.error('ERROR in block channel - ', _t21.message);
|
|
16214
16336
|
case 6:
|
|
16215
|
-
return
|
|
16337
|
+
return _context20.a(2);
|
|
16216
16338
|
}
|
|
16217
|
-
},
|
|
16339
|
+
}, _marked20, null, [[0, 5]]);
|
|
16218
16340
|
}
|
|
16219
16341
|
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 (
|
|
16342
|
+
var payload, channelId, config, _SceytChatClient6, channel, paramsToUpdate, fileToUpload, _yield$call5, subject, avatarUrl, metadata, _t22;
|
|
16343
|
+
return _regenerator().w(function (_context21) {
|
|
16344
|
+
while (1) switch (_context21.p = _context21.n) {
|
|
16223
16345
|
case 0:
|
|
16224
|
-
|
|
16346
|
+
_context21.p = 0;
|
|
16225
16347
|
payload = action.payload;
|
|
16226
16348
|
channelId = payload.channelId, config = payload.config;
|
|
16227
16349
|
_SceytChatClient6 = getClient();
|
|
16228
|
-
|
|
16350
|
+
_context21.n = 1;
|
|
16229
16351
|
return effects.call(getChannelFromMap, channelId);
|
|
16230
16352
|
case 1:
|
|
16231
|
-
channel =
|
|
16353
|
+
channel = _context21.v;
|
|
16232
16354
|
if (!channel) {
|
|
16233
16355
|
channel = getChannelFromAllChannels(channelId);
|
|
16234
16356
|
}
|
|
@@ -16239,7 +16361,7 @@ function updateChannel(action) {
|
|
|
16239
16361
|
avatarUrl: channel.avatarUrl
|
|
16240
16362
|
};
|
|
16241
16363
|
if (!config.avatar) {
|
|
16242
|
-
|
|
16364
|
+
_context21.n = 3;
|
|
16243
16365
|
break;
|
|
16244
16366
|
}
|
|
16245
16367
|
fileToUpload = {
|
|
@@ -16248,10 +16370,10 @@ function updateChannel(action) {
|
|
|
16248
16370
|
log.info('upload percent - ', progressPercent);
|
|
16249
16371
|
}
|
|
16250
16372
|
};
|
|
16251
|
-
|
|
16373
|
+
_context21.n = 2;
|
|
16252
16374
|
return effects.call(_SceytChatClient6.uploadFile, fileToUpload);
|
|
16253
16375
|
case 2:
|
|
16254
|
-
paramsToUpdate.avatarUrl =
|
|
16376
|
+
paramsToUpdate.avatarUrl = _context21.v;
|
|
16255
16377
|
case 3:
|
|
16256
16378
|
if (config.subject) {
|
|
16257
16379
|
paramsToUpdate.subject = config.subject;
|
|
@@ -16262,14 +16384,14 @@ function updateChannel(action) {
|
|
|
16262
16384
|
if (config.avatarUrl === '') {
|
|
16263
16385
|
paramsToUpdate.avatarUrl = '';
|
|
16264
16386
|
}
|
|
16265
|
-
|
|
16387
|
+
_context21.n = 4;
|
|
16266
16388
|
return effects.call(channel.update, paramsToUpdate);
|
|
16267
16389
|
case 4:
|
|
16268
|
-
_yield$call5 =
|
|
16390
|
+
_yield$call5 = _context21.v;
|
|
16269
16391
|
subject = _yield$call5.subject;
|
|
16270
16392
|
avatarUrl = _yield$call5.avatarUrl;
|
|
16271
16393
|
metadata = _yield$call5.metadata;
|
|
16272
|
-
|
|
16394
|
+
_context21.n = 5;
|
|
16273
16395
|
return effects.put(updateChannelDataAC(channelId, {
|
|
16274
16396
|
subject: subject,
|
|
16275
16397
|
avatarUrl: avatarUrl,
|
|
@@ -16281,29 +16403,29 @@ function updateChannel(action) {
|
|
|
16281
16403
|
avatarUrl: avatarUrl,
|
|
16282
16404
|
metadata: isJSON(metadata) ? JSON.parse(metadata) : metadata
|
|
16283
16405
|
});
|
|
16284
|
-
|
|
16406
|
+
_context21.n = 7;
|
|
16285
16407
|
break;
|
|
16286
16408
|
case 6:
|
|
16287
|
-
|
|
16288
|
-
|
|
16289
|
-
log.error('ERROR in update channel',
|
|
16409
|
+
_context21.p = 6;
|
|
16410
|
+
_t22 = _context21.v;
|
|
16411
|
+
log.error('ERROR in update channel', _t22.message);
|
|
16290
16412
|
case 7:
|
|
16291
|
-
return
|
|
16413
|
+
return _context21.a(2);
|
|
16292
16414
|
}
|
|
16293
|
-
},
|
|
16415
|
+
}, _marked21, null, [[0, 6]]);
|
|
16294
16416
|
}
|
|
16295
16417
|
function checkUsersStatus() {
|
|
16296
|
-
var _SceytChatClient7, usersForUpdate, updatedUsers, usersToUpdateMap, update, updateData,
|
|
16297
|
-
return _regenerator().w(function (
|
|
16298
|
-
while (1) switch (
|
|
16418
|
+
var _SceytChatClient7, usersForUpdate, updatedUsers, usersToUpdateMap, update, updateData, _t23;
|
|
16419
|
+
return _regenerator().w(function (_context22) {
|
|
16420
|
+
while (1) switch (_context22.p = _context22.n) {
|
|
16299
16421
|
case 0:
|
|
16300
|
-
|
|
16422
|
+
_context22.p = 0;
|
|
16301
16423
|
_SceytChatClient7 = getClient();
|
|
16302
16424
|
usersForUpdate = Object.keys(usersMap);
|
|
16303
|
-
|
|
16425
|
+
_context22.n = 1;
|
|
16304
16426
|
return effects.call(_SceytChatClient7.getUsers, usersForUpdate);
|
|
16305
16427
|
case 1:
|
|
16306
|
-
updatedUsers =
|
|
16428
|
+
updatedUsers = _context22.v;
|
|
16307
16429
|
usersToUpdateMap = {};
|
|
16308
16430
|
update = false;
|
|
16309
16431
|
updatedUsers.forEach(function (updatedUser) {
|
|
@@ -16315,149 +16437,149 @@ function checkUsersStatus() {
|
|
|
16315
16437
|
}
|
|
16316
16438
|
});
|
|
16317
16439
|
if (!update) {
|
|
16318
|
-
|
|
16440
|
+
_context22.n = 4;
|
|
16319
16441
|
break;
|
|
16320
16442
|
}
|
|
16321
16443
|
updateData = JSON.parse(JSON.stringify(usersToUpdateMap));
|
|
16322
|
-
|
|
16444
|
+
_context22.n = 2;
|
|
16323
16445
|
return effects.put(updateMembersPresenceAC(updateData));
|
|
16324
16446
|
case 2:
|
|
16325
|
-
|
|
16447
|
+
_context22.n = 3;
|
|
16326
16448
|
return effects.put(updateUserStatusOnMapAC(updateData));
|
|
16327
16449
|
case 3:
|
|
16328
|
-
|
|
16450
|
+
_context22.n = 4;
|
|
16329
16451
|
return effects.put(updateUserStatusOnChannelAC(updateData));
|
|
16330
16452
|
case 4:
|
|
16331
|
-
|
|
16453
|
+
_context22.n = 6;
|
|
16332
16454
|
break;
|
|
16333
16455
|
case 5:
|
|
16334
|
-
|
|
16335
|
-
|
|
16336
|
-
log.error('ERROR in check user status : ',
|
|
16456
|
+
_context22.p = 5;
|
|
16457
|
+
_t23 = _context22.v;
|
|
16458
|
+
log.error('ERROR in check user status : ', _t23.message);
|
|
16337
16459
|
case 6:
|
|
16338
|
-
return
|
|
16460
|
+
return _context22.a(2);
|
|
16339
16461
|
}
|
|
16340
|
-
},
|
|
16462
|
+
}, _marked22, null, [[0, 5]]);
|
|
16341
16463
|
}
|
|
16342
16464
|
function sendTyping(action) {
|
|
16343
|
-
var state, activeChannelId, channel,
|
|
16344
|
-
return _regenerator().w(function (
|
|
16345
|
-
while (1) switch (
|
|
16465
|
+
var state, activeChannelId, channel, _t24;
|
|
16466
|
+
return _regenerator().w(function (_context23) {
|
|
16467
|
+
while (1) switch (_context23.p = _context23.n) {
|
|
16346
16468
|
case 0:
|
|
16347
16469
|
state = action.payload.state;
|
|
16348
|
-
|
|
16470
|
+
_context23.n = 1;
|
|
16349
16471
|
return effects.call(getActiveChannelId);
|
|
16350
16472
|
case 1:
|
|
16351
|
-
activeChannelId =
|
|
16352
|
-
|
|
16473
|
+
activeChannelId = _context23.v;
|
|
16474
|
+
_context23.n = 2;
|
|
16353
16475
|
return effects.call(getChannelFromMap, activeChannelId);
|
|
16354
16476
|
case 2:
|
|
16355
|
-
channel =
|
|
16356
|
-
|
|
16477
|
+
channel = _context23.v;
|
|
16478
|
+
_context23.p = 3;
|
|
16357
16479
|
if (!channel) {
|
|
16358
|
-
|
|
16480
|
+
_context23.n = 6;
|
|
16359
16481
|
break;
|
|
16360
16482
|
}
|
|
16361
16483
|
if (!state) {
|
|
16362
|
-
|
|
16484
|
+
_context23.n = 5;
|
|
16363
16485
|
break;
|
|
16364
16486
|
}
|
|
16365
|
-
|
|
16487
|
+
_context23.n = 4;
|
|
16366
16488
|
return effects.call(channel.startTyping);
|
|
16367
16489
|
case 4:
|
|
16368
|
-
|
|
16490
|
+
_context23.n = 6;
|
|
16369
16491
|
break;
|
|
16370
16492
|
case 5:
|
|
16371
|
-
|
|
16493
|
+
_context23.n = 6;
|
|
16372
16494
|
return effects.call(channel.stopTyping);
|
|
16373
16495
|
case 6:
|
|
16374
|
-
|
|
16496
|
+
_context23.n = 8;
|
|
16375
16497
|
break;
|
|
16376
16498
|
case 7:
|
|
16377
|
-
|
|
16378
|
-
|
|
16379
|
-
log.error('ERROR in send typing',
|
|
16499
|
+
_context23.p = 7;
|
|
16500
|
+
_t24 = _context23.v;
|
|
16501
|
+
log.error('ERROR in send typing', _t24);
|
|
16380
16502
|
case 8:
|
|
16381
|
-
return
|
|
16503
|
+
return _context23.a(2);
|
|
16382
16504
|
}
|
|
16383
|
-
},
|
|
16505
|
+
}, _marked23, null, [[3, 7]]);
|
|
16384
16506
|
}
|
|
16385
16507
|
function sendRecording(action) {
|
|
16386
|
-
var _action$payload, state, channelId, channel,
|
|
16387
|
-
return _regenerator().w(function (
|
|
16388
|
-
while (1) switch (
|
|
16508
|
+
var _action$payload, state, channelId, channel, _t25;
|
|
16509
|
+
return _regenerator().w(function (_context24) {
|
|
16510
|
+
while (1) switch (_context24.p = _context24.n) {
|
|
16389
16511
|
case 0:
|
|
16390
16512
|
_action$payload = action.payload, state = _action$payload.state, channelId = _action$payload.channelId;
|
|
16391
|
-
|
|
16513
|
+
_context24.n = 1;
|
|
16392
16514
|
return effects.call(getChannelFromMap, channelId);
|
|
16393
16515
|
case 1:
|
|
16394
|
-
channel =
|
|
16395
|
-
|
|
16516
|
+
channel = _context24.v;
|
|
16517
|
+
_context24.p = 2;
|
|
16396
16518
|
if (!channel) {
|
|
16397
|
-
|
|
16519
|
+
_context24.n = 5;
|
|
16398
16520
|
break;
|
|
16399
16521
|
}
|
|
16400
16522
|
if (!state) {
|
|
16401
|
-
|
|
16523
|
+
_context24.n = 4;
|
|
16402
16524
|
break;
|
|
16403
16525
|
}
|
|
16404
|
-
|
|
16526
|
+
_context24.n = 3;
|
|
16405
16527
|
return effects.call(channel.startRecording);
|
|
16406
16528
|
case 3:
|
|
16407
|
-
|
|
16529
|
+
_context24.n = 5;
|
|
16408
16530
|
break;
|
|
16409
16531
|
case 4:
|
|
16410
|
-
|
|
16532
|
+
_context24.n = 5;
|
|
16411
16533
|
return effects.call(channel.stopRecording);
|
|
16412
16534
|
case 5:
|
|
16413
|
-
|
|
16535
|
+
_context24.n = 7;
|
|
16414
16536
|
break;
|
|
16415
16537
|
case 6:
|
|
16416
|
-
|
|
16417
|
-
|
|
16418
|
-
log.error('ERROR in send recording',
|
|
16538
|
+
_context24.p = 6;
|
|
16539
|
+
_t25 = _context24.v;
|
|
16540
|
+
log.error('ERROR in send recording', _t25);
|
|
16419
16541
|
case 7:
|
|
16420
|
-
return
|
|
16542
|
+
return _context24.a(2);
|
|
16421
16543
|
}
|
|
16422
|
-
},
|
|
16544
|
+
}, _marked24, null, [[2, 6]]);
|
|
16423
16545
|
}
|
|
16424
16546
|
function clearHistory(action) {
|
|
16425
|
-
var payload, channelId, channel, activeChannelId, groupName,
|
|
16426
|
-
return _regenerator().w(function (
|
|
16427
|
-
while (1) switch (
|
|
16547
|
+
var payload, channelId, channel, activeChannelId, groupName, _t26;
|
|
16548
|
+
return _regenerator().w(function (_context25) {
|
|
16549
|
+
while (1) switch (_context25.p = _context25.n) {
|
|
16428
16550
|
case 0:
|
|
16429
|
-
|
|
16551
|
+
_context25.p = 0;
|
|
16430
16552
|
payload = action.payload;
|
|
16431
16553
|
channelId = payload.channelId;
|
|
16432
|
-
|
|
16554
|
+
_context25.n = 1;
|
|
16433
16555
|
return effects.call(getChannelFromMap, channelId);
|
|
16434
16556
|
case 1:
|
|
16435
|
-
channel =
|
|
16557
|
+
channel = _context25.v;
|
|
16436
16558
|
if (!channel) {
|
|
16437
16559
|
channel = getChannelFromAllChannels(channelId);
|
|
16438
16560
|
}
|
|
16439
|
-
|
|
16561
|
+
_context25.n = 2;
|
|
16440
16562
|
return effects.call(getActiveChannelId);
|
|
16441
16563
|
case 2:
|
|
16442
|
-
activeChannelId =
|
|
16564
|
+
activeChannelId = _context25.v;
|
|
16443
16565
|
if (!channel) {
|
|
16444
|
-
|
|
16566
|
+
_context25.n = 7;
|
|
16445
16567
|
break;
|
|
16446
16568
|
}
|
|
16447
|
-
|
|
16569
|
+
_context25.n = 3;
|
|
16448
16570
|
return effects.call(channel.deleteAllMessages);
|
|
16449
16571
|
case 3:
|
|
16450
|
-
|
|
16572
|
+
_context25.n = 4;
|
|
16451
16573
|
return effects.put(clearMessagesAC());
|
|
16452
16574
|
case 4:
|
|
16453
16575
|
removeMessagesFromMap(channelId);
|
|
16454
16576
|
if (channelId === activeChannelId) {
|
|
16455
16577
|
removeAllMessages();
|
|
16456
16578
|
}
|
|
16457
|
-
|
|
16579
|
+
_context25.n = 5;
|
|
16458
16580
|
return effects.put(clearSelectedMessagesAC());
|
|
16459
16581
|
case 5:
|
|
16460
|
-
|
|
16582
|
+
_context25.n = 6;
|
|
16461
16583
|
return effects.put(updateChannelDataAC(channel.id, {
|
|
16462
16584
|
lastMessage: null,
|
|
16463
16585
|
newMessageCount: 0,
|
|
@@ -16470,64 +16592,64 @@ function clearHistory(action) {
|
|
|
16470
16592
|
newMentionCount: 0
|
|
16471
16593
|
});
|
|
16472
16594
|
groupName = getChannelGroupName(channel);
|
|
16473
|
-
|
|
16595
|
+
_context25.n = 7;
|
|
16474
16596
|
return effects.put(updateSearchedChannelDataAC(channel.id, {
|
|
16475
16597
|
lastMessage: null,
|
|
16476
16598
|
newMessageCount: 0,
|
|
16477
16599
|
newMentionCount: 0
|
|
16478
16600
|
}, groupName));
|
|
16479
16601
|
case 7:
|
|
16480
|
-
|
|
16602
|
+
_context25.n = 9;
|
|
16481
16603
|
break;
|
|
16482
16604
|
case 8:
|
|
16483
|
-
|
|
16484
|
-
|
|
16485
|
-
log.error('ERROR in clear history',
|
|
16605
|
+
_context25.p = 8;
|
|
16606
|
+
_t26 = _context25.v;
|
|
16607
|
+
log.error('ERROR in clear history', _t26);
|
|
16486
16608
|
case 9:
|
|
16487
|
-
return
|
|
16609
|
+
return _context25.a(2);
|
|
16488
16610
|
}
|
|
16489
|
-
},
|
|
16611
|
+
}, _marked25, null, [[0, 8]]);
|
|
16490
16612
|
}
|
|
16491
16613
|
function deleteAllMessages(action) {
|
|
16492
|
-
var payload, channelId, channel, activeChannelId, groupName,
|
|
16493
|
-
return _regenerator().w(function (
|
|
16494
|
-
while (1) switch (
|
|
16614
|
+
var payload, channelId, channel, activeChannelId, groupName, _t27;
|
|
16615
|
+
return _regenerator().w(function (_context26) {
|
|
16616
|
+
while (1) switch (_context26.p = _context26.n) {
|
|
16495
16617
|
case 0:
|
|
16496
|
-
|
|
16618
|
+
_context26.p = 0;
|
|
16497
16619
|
payload = action.payload;
|
|
16498
16620
|
channelId = payload.channelId;
|
|
16499
|
-
|
|
16621
|
+
_context26.n = 1;
|
|
16500
16622
|
return effects.call(getChannelFromMap, channelId);
|
|
16501
16623
|
case 1:
|
|
16502
|
-
channel =
|
|
16624
|
+
channel = _context26.v;
|
|
16503
16625
|
if (!channel) {
|
|
16504
16626
|
channel = getChannelFromAllChannels(channelId);
|
|
16505
16627
|
}
|
|
16506
|
-
|
|
16628
|
+
_context26.n = 2;
|
|
16507
16629
|
return effects.call(getActiveChannelId);
|
|
16508
16630
|
case 2:
|
|
16509
|
-
activeChannelId =
|
|
16631
|
+
activeChannelId = _context26.v;
|
|
16510
16632
|
if (!channel) {
|
|
16511
|
-
|
|
16633
|
+
_context26.n = 8;
|
|
16512
16634
|
break;
|
|
16513
16635
|
}
|
|
16514
|
-
|
|
16636
|
+
_context26.n = 3;
|
|
16515
16637
|
return effects.call(channel.deleteAllMessages, true);
|
|
16516
16638
|
case 3:
|
|
16517
16639
|
removeMessagesFromMap(channelId);
|
|
16518
16640
|
if (!(channelId === activeChannelId)) {
|
|
16519
|
-
|
|
16641
|
+
_context26.n = 5;
|
|
16520
16642
|
break;
|
|
16521
16643
|
}
|
|
16522
|
-
|
|
16644
|
+
_context26.n = 4;
|
|
16523
16645
|
return effects.put(clearMessagesAC());
|
|
16524
16646
|
case 4:
|
|
16525
16647
|
removeAllMessages();
|
|
16526
16648
|
case 5:
|
|
16527
|
-
|
|
16649
|
+
_context26.n = 6;
|
|
16528
16650
|
return effects.put(clearSelectedMessagesAC());
|
|
16529
16651
|
case 6:
|
|
16530
|
-
|
|
16652
|
+
_context26.n = 7;
|
|
16531
16653
|
return effects.put(updateChannelDataAC(channel.id, {
|
|
16532
16654
|
lastMessage: null,
|
|
16533
16655
|
newMessageCount: 0,
|
|
@@ -16540,182 +16662,185 @@ function deleteAllMessages(action) {
|
|
|
16540
16662
|
newMentionCount: 0
|
|
16541
16663
|
});
|
|
16542
16664
|
groupName = getChannelGroupName(channel);
|
|
16543
|
-
|
|
16665
|
+
_context26.n = 8;
|
|
16544
16666
|
return effects.put(updateSearchedChannelDataAC(channel.id, {
|
|
16545
16667
|
lastMessage: null,
|
|
16546
16668
|
newMessageCount: 0,
|
|
16547
16669
|
newMentionCount: 0
|
|
16548
16670
|
}, groupName));
|
|
16549
16671
|
case 8:
|
|
16550
|
-
|
|
16672
|
+
_context26.n = 10;
|
|
16551
16673
|
break;
|
|
16552
16674
|
case 9:
|
|
16553
|
-
|
|
16554
|
-
|
|
16555
|
-
log.error('ERROR in clear history',
|
|
16675
|
+
_context26.p = 9;
|
|
16676
|
+
_t27 = _context26.v;
|
|
16677
|
+
log.error('ERROR in clear history', _t27);
|
|
16556
16678
|
case 10:
|
|
16557
|
-
return
|
|
16679
|
+
return _context26.a(2);
|
|
16558
16680
|
}
|
|
16559
|
-
},
|
|
16681
|
+
}, _marked26, null, [[0, 9]]);
|
|
16560
16682
|
}
|
|
16561
16683
|
function joinChannel(action) {
|
|
16562
|
-
var payload, channelId, _SceytChatClient8, channel, joinedChannel,
|
|
16563
|
-
return _regenerator().w(function (
|
|
16564
|
-
while (1) switch (
|
|
16684
|
+
var payload, channelId, _SceytChatClient8, channel, joinedChannel, _t28;
|
|
16685
|
+
return _regenerator().w(function (_context27) {
|
|
16686
|
+
while (1) switch (_context27.p = _context27.n) {
|
|
16565
16687
|
case 0:
|
|
16566
|
-
|
|
16688
|
+
_context27.p = 0;
|
|
16567
16689
|
payload = action.payload;
|
|
16568
16690
|
channelId = payload.channelId;
|
|
16569
16691
|
_SceytChatClient8 = getClient();
|
|
16570
|
-
|
|
16692
|
+
_context27.n = 1;
|
|
16571
16693
|
return effects.call(getChannelFromMap, channelId);
|
|
16572
16694
|
case 1:
|
|
16573
|
-
channel =
|
|
16695
|
+
channel = _context27.v;
|
|
16574
16696
|
if (!channel) {
|
|
16575
16697
|
channel = getChannelFromAllChannels(channelId);
|
|
16576
16698
|
}
|
|
16577
16699
|
if (channel) {
|
|
16578
|
-
|
|
16700
|
+
_context27.n = 3;
|
|
16579
16701
|
break;
|
|
16580
16702
|
}
|
|
16581
|
-
|
|
16703
|
+
_context27.n = 2;
|
|
16582
16704
|
return effects.call(_SceytChatClient8.getChannel, channelId);
|
|
16583
16705
|
case 2:
|
|
16584
|
-
channel =
|
|
16706
|
+
channel = _context27.v;
|
|
16585
16707
|
case 3:
|
|
16586
|
-
|
|
16708
|
+
_context27.n = 4;
|
|
16587
16709
|
return effects.call(channel.join);
|
|
16588
16710
|
case 4:
|
|
16589
|
-
joinedChannel =
|
|
16590
|
-
|
|
16711
|
+
joinedChannel = _context27.v;
|
|
16712
|
+
_context27.n = 5;
|
|
16591
16713
|
return effects.put(setCloseSearchChannelsAC(true));
|
|
16592
16714
|
case 5:
|
|
16593
|
-
|
|
16715
|
+
_context27.n = 6;
|
|
16594
16716
|
return effects.put(setChannelToAddAC(JSON.parse(JSON.stringify(joinedChannel))));
|
|
16595
16717
|
case 6:
|
|
16596
|
-
|
|
16718
|
+
_context27.n = 7;
|
|
16597
16719
|
return effects.put(switchChannelActionAC(JSON.parse(JSON.stringify(joinedChannel))));
|
|
16598
16720
|
case 7:
|
|
16599
16721
|
addChannelToAllChannels(joinedChannel);
|
|
16600
|
-
|
|
16722
|
+
_context27.n = 8;
|
|
16601
16723
|
return effects.call(setActiveChannelId, joinedChannel.id);
|
|
16602
16724
|
case 8:
|
|
16603
|
-
|
|
16725
|
+
_context27.n = 10;
|
|
16604
16726
|
break;
|
|
16605
16727
|
case 9:
|
|
16606
|
-
|
|
16607
|
-
|
|
16608
|
-
log.error(
|
|
16728
|
+
_context27.p = 9;
|
|
16729
|
+
_t28 = _context27.v;
|
|
16730
|
+
log.error(_t28, 'Error in join to channel');
|
|
16609
16731
|
case 10:
|
|
16610
|
-
return
|
|
16732
|
+
return _context27.a(2);
|
|
16611
16733
|
}
|
|
16612
|
-
},
|
|
16734
|
+
}, _marked27, null, [[0, 9]]);
|
|
16613
16735
|
}
|
|
16614
16736
|
function watchForChannelEvents() {
|
|
16615
|
-
return _regenerator().w(function (
|
|
16616
|
-
while (1) switch (
|
|
16737
|
+
return _regenerator().w(function (_context28) {
|
|
16738
|
+
while (1) switch (_context28.n) {
|
|
16617
16739
|
case 0:
|
|
16618
|
-
|
|
16740
|
+
_context28.n = 1;
|
|
16619
16741
|
return effects.call(watchForEvents);
|
|
16620
16742
|
case 1:
|
|
16621
|
-
return
|
|
16743
|
+
return _context28.a(2);
|
|
16622
16744
|
}
|
|
16623
|
-
},
|
|
16745
|
+
}, _marked28);
|
|
16624
16746
|
}
|
|
16625
16747
|
function ChannelsSaga() {
|
|
16626
|
-
return _regenerator().w(function (
|
|
16627
|
-
while (1) switch (
|
|
16748
|
+
return _regenerator().w(function (_context29) {
|
|
16749
|
+
while (1) switch (_context29.n) {
|
|
16628
16750
|
case 0:
|
|
16629
|
-
|
|
16751
|
+
_context29.n = 1;
|
|
16630
16752
|
return effects.takeLatest(CREATE_CHANNEL, createChannel);
|
|
16631
16753
|
case 1:
|
|
16632
|
-
|
|
16754
|
+
_context29.n = 2;
|
|
16633
16755
|
return effects.takeLatest(GET_CHANNELS, getChannels);
|
|
16634
16756
|
case 2:
|
|
16635
|
-
|
|
16757
|
+
_context29.n = 3;
|
|
16636
16758
|
return effects.takeLatest(SEARCH_CHANNELS, searchChannels);
|
|
16637
16759
|
case 3:
|
|
16638
|
-
|
|
16760
|
+
_context29.n = 4;
|
|
16639
16761
|
return effects.takeLatest(GET_CHANNELS_FOR_FORWARD, getChannelsForForward);
|
|
16640
16762
|
case 4:
|
|
16641
|
-
|
|
16763
|
+
_context29.n = 5;
|
|
16642
16764
|
return effects.takeLatest(SEARCH_CHANNELS_FOR_FORWARD, searchChannelsForForward);
|
|
16643
16765
|
case 5:
|
|
16644
|
-
|
|
16766
|
+
_context29.n = 6;
|
|
16645
16767
|
return effects.takeLatest(LOAD_MORE_CHANNEL, channelsLoadMore);
|
|
16646
16768
|
case 6:
|
|
16647
|
-
|
|
16769
|
+
_context29.n = 7;
|
|
16648
16770
|
return effects.takeLatest(LOAD_MORE_CHANNELS_FOR_FORWARD, channelsForForwardLoadMore);
|
|
16649
16771
|
case 7:
|
|
16650
|
-
|
|
16772
|
+
_context29.n = 8;
|
|
16651
16773
|
return effects.takeEvery(SWITCH_CHANNEL, switchChannel);
|
|
16652
16774
|
case 8:
|
|
16653
|
-
|
|
16775
|
+
_context29.n = 9;
|
|
16654
16776
|
return effects.takeLatest(LEAVE_CHANNEL, leaveChannel);
|
|
16655
16777
|
case 9:
|
|
16656
|
-
|
|
16778
|
+
_context29.n = 10;
|
|
16657
16779
|
return effects.takeLatest(DELETE_CHANNEL, deleteChannel);
|
|
16658
16780
|
case 10:
|
|
16659
|
-
|
|
16781
|
+
_context29.n = 11;
|
|
16660
16782
|
return effects.takeLatest(BLOCK_CHANNEL, blockChannel);
|
|
16661
16783
|
case 11:
|
|
16662
|
-
|
|
16784
|
+
_context29.n = 12;
|
|
16663
16785
|
return effects.takeLatest(UPDATE_CHANNEL, updateChannel);
|
|
16664
16786
|
case 12:
|
|
16665
|
-
|
|
16787
|
+
_context29.n = 13;
|
|
16666
16788
|
return effects.takeEvery(MARK_MESSAGES_AS_READ, markMessagesRead);
|
|
16667
16789
|
case 13:
|
|
16668
|
-
|
|
16790
|
+
_context29.n = 14;
|
|
16669
16791
|
return effects.takeLatest(MARK_MESSAGES_AS_DELIVERED, markMessagesDelivered);
|
|
16670
16792
|
case 14:
|
|
16671
|
-
|
|
16672
|
-
return effects.takeLatest(
|
|
16793
|
+
_context29.n = 15;
|
|
16794
|
+
return effects.takeLatest(MARK_VOICE_MESSAGE_AS_PLAYED, markVoiceMessageAsPlayed);
|
|
16673
16795
|
case 15:
|
|
16674
|
-
|
|
16675
|
-
return effects.takeLatest(
|
|
16796
|
+
_context29.n = 16;
|
|
16797
|
+
return effects.takeLatest(WATCH_FOR_EVENTS, watchForChannelEvents);
|
|
16676
16798
|
case 16:
|
|
16677
|
-
|
|
16678
|
-
return effects.takeLatest(
|
|
16799
|
+
_context29.n = 17;
|
|
16800
|
+
return effects.takeLatest(TURN_OFF_NOTIFICATION, notificationsTurnOff);
|
|
16679
16801
|
case 17:
|
|
16680
|
-
|
|
16681
|
-
return effects.takeLatest(
|
|
16802
|
+
_context29.n = 18;
|
|
16803
|
+
return effects.takeLatest(TURN_ON_NOTIFICATION, notificationsTurnOn);
|
|
16682
16804
|
case 18:
|
|
16683
|
-
|
|
16684
|
-
return effects.takeLatest(
|
|
16805
|
+
_context29.n = 19;
|
|
16806
|
+
return effects.takeLatest(MARK_CHANNEL_AS_READ, markChannelAsRead);
|
|
16685
16807
|
case 19:
|
|
16686
|
-
|
|
16687
|
-
return effects.takeLatest(
|
|
16808
|
+
_context29.n = 20;
|
|
16809
|
+
return effects.takeLatest(MARK_CHANNEL_AS_UNREAD, markChannelAsUnRead);
|
|
16688
16810
|
case 20:
|
|
16689
|
-
|
|
16690
|
-
return effects.takeLatest(
|
|
16811
|
+
_context29.n = 21;
|
|
16812
|
+
return effects.takeLatest(CHECK_USER_STATUS, checkUsersStatus);
|
|
16691
16813
|
case 21:
|
|
16692
|
-
|
|
16693
|
-
return effects.takeLatest(
|
|
16814
|
+
_context29.n = 22;
|
|
16815
|
+
return effects.takeLatest(SEND_TYPING, sendTyping);
|
|
16694
16816
|
case 22:
|
|
16695
|
-
|
|
16696
|
-
return effects.takeLatest(
|
|
16817
|
+
_context29.n = 23;
|
|
16818
|
+
return effects.takeLatest(SEND_RECORDING, sendRecording);
|
|
16697
16819
|
case 23:
|
|
16698
|
-
|
|
16699
|
-
return effects.takeLatest(
|
|
16820
|
+
_context29.n = 24;
|
|
16821
|
+
return effects.takeLatest(PIN_CHANNEL, pinChannel);
|
|
16700
16822
|
case 24:
|
|
16701
|
-
|
|
16702
|
-
return effects.takeLatest(
|
|
16823
|
+
_context29.n = 25;
|
|
16824
|
+
return effects.takeLatest(UNPIN_CHANNEL, unpinChannel);
|
|
16703
16825
|
case 25:
|
|
16704
|
-
|
|
16705
|
-
return effects.takeLatest(
|
|
16826
|
+
_context29.n = 26;
|
|
16827
|
+
return effects.takeLatest(CLEAR_HISTORY, clearHistory);
|
|
16706
16828
|
case 26:
|
|
16707
|
-
|
|
16708
|
-
return effects.takeLatest(
|
|
16829
|
+
_context29.n = 27;
|
|
16830
|
+
return effects.takeLatest(JOIN_TO_CHANNEL, joinChannel);
|
|
16709
16831
|
case 27:
|
|
16710
|
-
|
|
16711
|
-
return effects.takeLatest(
|
|
16832
|
+
_context29.n = 28;
|
|
16833
|
+
return effects.takeLatest(DELETE_ALL_MESSAGES, deleteAllMessages);
|
|
16712
16834
|
case 28:
|
|
16713
|
-
|
|
16714
|
-
return effects.takeLatest(
|
|
16835
|
+
_context29.n = 29;
|
|
16836
|
+
return effects.takeLatest(REMOVE_CHANNEL_CACHES, removeChannelCaches);
|
|
16715
16837
|
case 29:
|
|
16716
|
-
|
|
16838
|
+
_context29.n = 30;
|
|
16839
|
+
return effects.takeLatest(GET_CHANNEL_MENTIONS, getChannelMentions);
|
|
16840
|
+
case 30:
|
|
16841
|
+
return _context29.a(2);
|
|
16717
16842
|
}
|
|
16718
|
-
},
|
|
16843
|
+
}, _marked29);
|
|
16719
16844
|
}
|
|
16720
16845
|
|
|
16721
16846
|
function rgbaToThumbHash(w, h, rgba) {
|
|
@@ -17135,6 +17260,15 @@ var playingAudioIdSelector = function playingAudioIdSelector(store) {
|
|
|
17135
17260
|
var selectedMessagesMapSelector = function selectedMessagesMapSelector(store) {
|
|
17136
17261
|
return store.MessageReducer.selectedMessagesMap;
|
|
17137
17262
|
};
|
|
17263
|
+
var attachmentUpdatedMapSelector = function attachmentUpdatedMapSelector(store) {
|
|
17264
|
+
return store.MessageReducer.attachmentUpdatedMap;
|
|
17265
|
+
};
|
|
17266
|
+
var messageMarkersSelector = function messageMarkersSelector(store) {
|
|
17267
|
+
return store.MessageReducer.messageMarkers;
|
|
17268
|
+
};
|
|
17269
|
+
var messagesMarkersLoadingStateSelector = function messagesMarkersLoadingStateSelector(store) {
|
|
17270
|
+
return store.MessageReducer.messagesMarkersLoadingState;
|
|
17271
|
+
};
|
|
17138
17272
|
|
|
17139
17273
|
var getFrame = function getFrame(videoSrc, time) {
|
|
17140
17274
|
try {
|
|
@@ -17205,7 +17339,8 @@ var _marked$3 = /*#__PURE__*/_regenerator().m(sendMessage),
|
|
|
17205
17339
|
_marked13$1 = /*#__PURE__*/_regenerator().m(loadMoreMessageAttachments),
|
|
17206
17340
|
_marked14$1 = /*#__PURE__*/_regenerator().m(pauseAttachmentUploading),
|
|
17207
17341
|
_marked15$1 = /*#__PURE__*/_regenerator().m(resumeAttachmentUploading),
|
|
17208
|
-
_marked16$1 = /*#__PURE__*/_regenerator().m(
|
|
17342
|
+
_marked16$1 = /*#__PURE__*/_regenerator().m(getMessageMarkers),
|
|
17343
|
+
_marked17$1 = /*#__PURE__*/_regenerator().m(MessageSaga);
|
|
17209
17344
|
var handleUploadAttachments = function handleUploadAttachments(attachments, message, channel) {
|
|
17210
17345
|
try {
|
|
17211
17346
|
return Promise.resolve(Promise.all(attachments.map(function (attachment) {
|
|
@@ -17219,7 +17354,7 @@ var handleUploadAttachments = function handleUploadAttachments(attachments, mess
|
|
|
17219
17354
|
}, thumbnailMetas.duration ? {
|
|
17220
17355
|
dur: thumbnailMetas.duration
|
|
17221
17356
|
} : {})));
|
|
17222
|
-
var attachmentBuilder = channel.
|
|
17357
|
+
var attachmentBuilder = channel.createdAttachmentBuilder(uri, attachment.type);
|
|
17223
17358
|
var attachmentToSend = attachmentBuilder.setName(attachment.name).setMetadata(attachmentMeta).setFileSize(fileSize || attachment.size).setUpload(false).create();
|
|
17224
17359
|
return attachmentToSend;
|
|
17225
17360
|
}
|
|
@@ -17291,7 +17426,7 @@ var addPendingMessage = function addPendingMessage(message, messageCopy, channel
|
|
|
17291
17426
|
try {
|
|
17292
17427
|
var messageToAdd = JSON.parse(JSON.stringify(_extends({}, messageCopy, {
|
|
17293
17428
|
createdAt: new Date(Date.now()),
|
|
17294
|
-
mentionedUsers: message.
|
|
17429
|
+
mentionedUsers: message.mentionedUsers,
|
|
17295
17430
|
parentMessage: message.parentMessage
|
|
17296
17431
|
})));
|
|
17297
17432
|
addMessageToMap(channel.id, messageToAdd);
|
|
@@ -17349,7 +17484,7 @@ function sendMessage(action) {
|
|
|
17349
17484
|
_context3.n = 7;
|
|
17350
17485
|
return effects.put(addChannelAC(JSON.parse(JSON.stringify(channel))));
|
|
17351
17486
|
case 7:
|
|
17352
|
-
mentionedUserIds = message.
|
|
17487
|
+
mentionedUserIds = message.mentionedUsers ? message.mentionedUsers.map(function (member) {
|
|
17353
17488
|
return member.id;
|
|
17354
17489
|
}) : [];
|
|
17355
17490
|
customUploader = getCustomUploader();
|
|
@@ -17379,7 +17514,7 @@ function sendMessage(action) {
|
|
|
17379
17514
|
if (attachment.cachedUrl) {
|
|
17380
17515
|
uri = attachment.cachedUrl;
|
|
17381
17516
|
}
|
|
17382
|
-
attachmentBuilder = channel.
|
|
17517
|
+
attachmentBuilder = channel.createdAttachmentBuilder(uri || attachment.data, attachment.type);
|
|
17383
17518
|
messageAttachment = attachmentBuilder.setName(attachment.name).setMetadata(attachment.metadata).setUpload(customUploader ? false : attachment.upload).setFileSize(attachment.size).create();
|
|
17384
17519
|
if (!customUploader) {
|
|
17385
17520
|
handleUpdateUploadProgress = function handleUpdateUploadProgress(percent) {
|
|
@@ -17527,7 +17662,7 @@ function sendMessage(action) {
|
|
|
17527
17662
|
case 3:
|
|
17528
17663
|
linkAttachmentToSend = null;
|
|
17529
17664
|
if (_i === 0 && linkAttachment) {
|
|
17530
|
-
linkAttachmentBuilder = channel.
|
|
17665
|
+
linkAttachmentBuilder = channel.createdAttachmentBuilder(linkAttachment.data, linkAttachment.type);
|
|
17531
17666
|
linkAttachmentToSend = linkAttachmentBuilder.setName(linkAttachment.name).setUpload(linkAttachment.upload).create();
|
|
17532
17667
|
}
|
|
17533
17668
|
if (linkAttachmentToSend) {
|
|
@@ -17730,12 +17865,12 @@ function sendTextMessage(action) {
|
|
|
17730
17865
|
_context4.n = 7;
|
|
17731
17866
|
return effects.put(addChannelAC(JSON.parse(JSON.stringify(channel))));
|
|
17732
17867
|
case 7:
|
|
17733
|
-
mentionedUserIds = message.
|
|
17868
|
+
mentionedUserIds = message.mentionedUsers ? message.mentionedUsers.map(function (member) {
|
|
17734
17869
|
return member.id;
|
|
17735
17870
|
}) : [];
|
|
17736
17871
|
attachments = message.attachments;
|
|
17737
17872
|
if (message.attachments && message.attachments.length) {
|
|
17738
|
-
attachmentBuilder = channel.
|
|
17873
|
+
attachmentBuilder = channel.createdAttachmentBuilder(attachments[0].data, attachments[0].type);
|
|
17739
17874
|
att = attachmentBuilder.setName('').setUpload(attachments[0].upload).create();
|
|
17740
17875
|
attachments = [att];
|
|
17741
17876
|
}
|
|
@@ -17750,7 +17885,7 @@ function sendTextMessage(action) {
|
|
|
17750
17885
|
messageToSend = messageBuilder.create();
|
|
17751
17886
|
pendingMessage = JSON.parse(JSON.stringify(_extends({}, messageToSend, {
|
|
17752
17887
|
createdAt: new Date(Date.now()),
|
|
17753
|
-
mentionedUsers: message.
|
|
17888
|
+
mentionedUsers: message.mentionedUsers,
|
|
17754
17889
|
parentMessage: message.parentMessage
|
|
17755
17890
|
})));
|
|
17756
17891
|
sendMessageTid = messageToSend.tid;
|
|
@@ -17836,16 +17971,14 @@ function sendTextMessage(action) {
|
|
|
17836
17971
|
case 16:
|
|
17837
17972
|
throw new Error('Connection required to send message');
|
|
17838
17973
|
case 17:
|
|
17974
|
+
store.dispatch(getMessagesAC(channel, true, channel.lastMessage.id, undefined, undefined, false));
|
|
17839
17975
|
_context4.n = 18;
|
|
17840
|
-
return effects.put(scrollToNewMessageAC(true));
|
|
17841
|
-
case 18:
|
|
17842
|
-
_context4.n = 19;
|
|
17843
17976
|
return effects.put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
17844
|
-
case
|
|
17845
|
-
_context4.n =
|
|
17977
|
+
case 18:
|
|
17978
|
+
_context4.n = 21;
|
|
17846
17979
|
break;
|
|
17847
|
-
case
|
|
17848
|
-
_context4.p =
|
|
17980
|
+
case 19:
|
|
17981
|
+
_context4.p = 19;
|
|
17849
17982
|
_t3 = _context4.v;
|
|
17850
17983
|
log.error('error on send text message ... ', _t3);
|
|
17851
17984
|
updateMessageOnMap(channel.id, {
|
|
@@ -17855,23 +17988,23 @@ function sendTextMessage(action) {
|
|
|
17855
17988
|
}
|
|
17856
17989
|
});
|
|
17857
17990
|
if (!(activeChannelId === channel.id)) {
|
|
17858
|
-
_context4.n =
|
|
17991
|
+
_context4.n = 20;
|
|
17859
17992
|
break;
|
|
17860
17993
|
}
|
|
17861
17994
|
updateMessageOnAllMessages(sendMessageTid, {
|
|
17862
17995
|
state: MESSAGE_STATUS.FAILED
|
|
17863
17996
|
});
|
|
17864
|
-
_context4.n =
|
|
17997
|
+
_context4.n = 20;
|
|
17865
17998
|
return effects.put(updateMessageAC(sendMessageTid, {
|
|
17866
17999
|
state: MESSAGE_STATUS.FAILED
|
|
17867
18000
|
}));
|
|
17868
|
-
case
|
|
17869
|
-
_context4.n =
|
|
18001
|
+
case 20:
|
|
18002
|
+
_context4.n = 21;
|
|
17870
18003
|
return effects.put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
17871
|
-
case
|
|
18004
|
+
case 21:
|
|
17872
18005
|
return _context4.a(2);
|
|
17873
18006
|
}
|
|
17874
|
-
}, _marked2$2, null, [[3,
|
|
18007
|
+
}, _marked2$2, null, [[3, 19]]);
|
|
17875
18008
|
}
|
|
17876
18009
|
function forwardMessage(action) {
|
|
17877
18010
|
var payload, message, channelId, connectionState, channel, SceytChatClient, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, messageToSend, pendingMessage, activeChannelId, isCachedChannel, hasNextMessages, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam, _t4;
|
|
@@ -17910,7 +18043,7 @@ function forwardMessage(action) {
|
|
|
17910
18043
|
_context5.n = 6;
|
|
17911
18044
|
return effects.put(addChannelAC(JSON.parse(JSON.stringify(channel))));
|
|
17912
18045
|
case 6:
|
|
17913
|
-
mentionedUserIds = message.
|
|
18046
|
+
mentionedUserIds = message.mentionedUsers ? message.mentionedUsers.map(function (member) {
|
|
17914
18047
|
return member.id;
|
|
17915
18048
|
}) : [];
|
|
17916
18049
|
attachments = message.attachments;
|
|
@@ -17919,12 +18052,12 @@ function forwardMessage(action) {
|
|
|
17919
18052
|
break;
|
|
17920
18053
|
}
|
|
17921
18054
|
if (message.attachments && message.attachments.length) {
|
|
17922
|
-
attachmentBuilder = channel.
|
|
18055
|
+
attachmentBuilder = channel.createdAttachmentBuilder(attachments[0].url, attachments[0].type);
|
|
17923
18056
|
att = attachmentBuilder.setName(attachments[0].name).setMetadata(attachments[0].metadata).setFileSize(attachments[0].size).setUpload(false).create();
|
|
17924
18057
|
attachments = [att];
|
|
17925
18058
|
}
|
|
17926
18059
|
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);
|
|
18060
|
+
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
18061
|
messageToSend = messageBuilder.create();
|
|
17929
18062
|
pendingMessage = JSON.parse(JSON.stringify(_extends({}, messageToSend, {
|
|
17930
18063
|
createdAt: new Date(Date.now())
|
|
@@ -18205,7 +18338,7 @@ function resendMessage(action) {
|
|
|
18205
18338
|
} : {})));
|
|
18206
18339
|
}
|
|
18207
18340
|
log.info('attachmentMeta ... ', attachmentMeta);
|
|
18208
|
-
attachmentBuilder = channel.
|
|
18341
|
+
attachmentBuilder = channel.createdAttachmentBuilder(uri, messageAttachment.type);
|
|
18209
18342
|
attachmentToSend = attachmentBuilder.setName(messageAttachment.name).setMetadata(attachmentMeta).setFileSize(fileSize).setUpload(false).create();
|
|
18210
18343
|
log.info('attachmentToSend ... ', attachmentToSend);
|
|
18211
18344
|
attachmentToSend.tid = messageAttachment.tid;
|
|
@@ -18464,7 +18597,7 @@ function editMessage(action) {
|
|
|
18464
18597
|
});
|
|
18465
18598
|
linkAttachmentsToSend = [];
|
|
18466
18599
|
linkAttachments.forEach(function (linkAttachment) {
|
|
18467
|
-
var linkAttachmentBuilder = channel.
|
|
18600
|
+
var linkAttachmentBuilder = channel.createdAttachmentBuilder(linkAttachment.data, linkAttachment.type);
|
|
18468
18601
|
var linkAttachmentToSend = linkAttachmentBuilder.setName(linkAttachment.name).setUpload(linkAttachment.upload).create();
|
|
18469
18602
|
linkAttachmentsToSend.push(linkAttachmentToSend);
|
|
18470
18603
|
});
|
|
@@ -19418,64 +19551,111 @@ function resumeAttachmentUploading(action) {
|
|
|
19418
19551
|
}
|
|
19419
19552
|
}, _marked15$1, null, [[0, 2]]);
|
|
19420
19553
|
}
|
|
19421
|
-
function
|
|
19554
|
+
function getMessageMarkers(action) {
|
|
19555
|
+
var _action$payload4, messageId, channelId, deliveryStatus, sceytChatClient, messageMarkerListQueryBuilder, messageMarkerListQuery, messageMarkers, _t18;
|
|
19422
19556
|
return _regenerator().w(function (_context18) {
|
|
19423
|
-
while (1) switch (_context18.n) {
|
|
19557
|
+
while (1) switch (_context18.p = _context18.n) {
|
|
19424
19558
|
case 0:
|
|
19559
|
+
_context18.p = 0;
|
|
19425
19560
|
_context18.n = 1;
|
|
19426
|
-
return effects.
|
|
19561
|
+
return effects.put(setMessagesMarkersLoadingStateAC(LOADING_STATE.LOADING));
|
|
19427
19562
|
case 1:
|
|
19563
|
+
_action$payload4 = action.payload, messageId = _action$payload4.messageId, channelId = _action$payload4.channelId, deliveryStatus = _action$payload4.deliveryStatus;
|
|
19564
|
+
sceytChatClient = getClient();
|
|
19565
|
+
if (!sceytChatClient) {
|
|
19566
|
+
_context18.n = 4;
|
|
19567
|
+
break;
|
|
19568
|
+
}
|
|
19569
|
+
messageMarkerListQueryBuilder = new sceytChatClient.MessageMarkerListQueryBuilder(channelId, String(messageId), deliveryStatus);
|
|
19428
19570
|
_context18.n = 2;
|
|
19429
|
-
return effects.
|
|
19571
|
+
return effects.call(messageMarkerListQueryBuilder.build);
|
|
19430
19572
|
case 2:
|
|
19573
|
+
messageMarkerListQuery = _context18.v;
|
|
19431
19574
|
_context18.n = 3;
|
|
19432
|
-
return effects.
|
|
19575
|
+
return effects.call(messageMarkerListQuery.loadNext);
|
|
19433
19576
|
case 3:
|
|
19577
|
+
messageMarkers = _context18.v;
|
|
19434
19578
|
_context18.n = 4;
|
|
19579
|
+
return effects.put(setMessageMarkersAC(channelId, messageId, messageMarkers.markers, deliveryStatus));
|
|
19580
|
+
case 4:
|
|
19581
|
+
_context18.n = 6;
|
|
19582
|
+
break;
|
|
19583
|
+
case 5:
|
|
19584
|
+
_context18.p = 5;
|
|
19585
|
+
_t18 = _context18.v;
|
|
19586
|
+
log.error('error in get message markers', _t18);
|
|
19587
|
+
case 6:
|
|
19588
|
+
_context18.p = 6;
|
|
19589
|
+
_context18.n = 7;
|
|
19590
|
+
return effects.put(setMessagesMarkersLoadingStateAC(LOADING_STATE.LOADED));
|
|
19591
|
+
case 7:
|
|
19592
|
+
return _context18.f(6);
|
|
19593
|
+
case 8:
|
|
19594
|
+
return _context18.a(2);
|
|
19595
|
+
}
|
|
19596
|
+
}, _marked16$1, null, [[0, 5, 6, 8]]);
|
|
19597
|
+
}
|
|
19598
|
+
function MessageSaga() {
|
|
19599
|
+
return _regenerator().w(function (_context19) {
|
|
19600
|
+
while (1) switch (_context19.n) {
|
|
19601
|
+
case 0:
|
|
19602
|
+
_context19.n = 1;
|
|
19603
|
+
return effects.takeEvery(SEND_MESSAGE, sendMessage);
|
|
19604
|
+
case 1:
|
|
19605
|
+
_context19.n = 2;
|
|
19606
|
+
return effects.takeEvery(SEND_TEXT_MESSAGE, sendTextMessage);
|
|
19607
|
+
case 2:
|
|
19608
|
+
_context19.n = 3;
|
|
19609
|
+
return effects.takeEvery(FORWARD_MESSAGE, forwardMessage);
|
|
19610
|
+
case 3:
|
|
19611
|
+
_context19.n = 4;
|
|
19435
19612
|
return effects.takeEvery(RESEND_MESSAGE, resendMessage);
|
|
19436
19613
|
case 4:
|
|
19437
|
-
|
|
19614
|
+
_context19.n = 5;
|
|
19438
19615
|
return effects.takeLatest(EDIT_MESSAGE, editMessage);
|
|
19439
19616
|
case 5:
|
|
19440
|
-
|
|
19617
|
+
_context19.n = 6;
|
|
19441
19618
|
return effects.takeEvery(DELETE_MESSAGE, deleteMessage);
|
|
19442
19619
|
case 6:
|
|
19443
|
-
|
|
19620
|
+
_context19.n = 7;
|
|
19444
19621
|
return effects.takeLatest(GET_MESSAGES, getMessagesQuery);
|
|
19445
19622
|
case 7:
|
|
19446
|
-
|
|
19623
|
+
_context19.n = 8;
|
|
19447
19624
|
return effects.takeEvery(GET_MESSAGE, getMessageQuery);
|
|
19448
19625
|
case 8:
|
|
19449
|
-
|
|
19450
|
-
return effects.takeLatest(
|
|
19626
|
+
_context19.n = 9;
|
|
19627
|
+
return effects.takeLatest(GET_MESSAGE_MARKERS, getMessageMarkers);
|
|
19451
19628
|
case 9:
|
|
19452
|
-
|
|
19453
|
-
return effects.takeLatest(
|
|
19629
|
+
_context19.n = 10;
|
|
19630
|
+
return effects.takeLatest(GET_MESSAGES_ATTACHMENTS, getMessageAttachments);
|
|
19454
19631
|
case 10:
|
|
19455
|
-
|
|
19456
|
-
return effects.takeLatest(
|
|
19632
|
+
_context19.n = 11;
|
|
19633
|
+
return effects.takeLatest(LOAD_MORE_MESSAGES_ATTACHMENTS, loadMoreMessageAttachments);
|
|
19457
19634
|
case 11:
|
|
19458
|
-
|
|
19459
|
-
return effects.takeLatest(
|
|
19635
|
+
_context19.n = 12;
|
|
19636
|
+
return effects.takeLatest(ADD_REACTION, addReaction);
|
|
19460
19637
|
case 12:
|
|
19461
|
-
|
|
19462
|
-
return effects.
|
|
19638
|
+
_context19.n = 13;
|
|
19639
|
+
return effects.takeLatest(DELETE_REACTION, deleteReaction);
|
|
19463
19640
|
case 13:
|
|
19464
|
-
|
|
19465
|
-
return effects.takeEvery(
|
|
19641
|
+
_context19.n = 14;
|
|
19642
|
+
return effects.takeEvery(LOAD_MORE_MESSAGES, loadMoreMessages);
|
|
19466
19643
|
case 14:
|
|
19467
|
-
|
|
19468
|
-
return effects.takeEvery(
|
|
19644
|
+
_context19.n = 15;
|
|
19645
|
+
return effects.takeEvery(GET_REACTIONS, getReactions);
|
|
19469
19646
|
case 15:
|
|
19470
|
-
|
|
19471
|
-
return effects.takeEvery(
|
|
19647
|
+
_context19.n = 16;
|
|
19648
|
+
return effects.takeEvery(LOAD_MORE_REACTIONS, loadMoreReactions);
|
|
19472
19649
|
case 16:
|
|
19473
|
-
|
|
19474
|
-
return effects.takeEvery(
|
|
19650
|
+
_context19.n = 17;
|
|
19651
|
+
return effects.takeEvery(PAUSE_ATTACHMENT_UPLOADING, pauseAttachmentUploading);
|
|
19475
19652
|
case 17:
|
|
19476
|
-
|
|
19653
|
+
_context19.n = 18;
|
|
19654
|
+
return effects.takeEvery(RESUME_ATTACHMENT_UPLOADING, resumeAttachmentUploading);
|
|
19655
|
+
case 18:
|
|
19656
|
+
return _context19.a(2);
|
|
19477
19657
|
}
|
|
19478
|
-
},
|
|
19658
|
+
}, _marked17$1);
|
|
19479
19659
|
}
|
|
19480
19660
|
|
|
19481
19661
|
var _marked$4 = /*#__PURE__*/_regenerator().m(getMembers),
|
|
@@ -19614,7 +19794,7 @@ function addMembers(action) {
|
|
|
19614
19794
|
m: membersIds
|
|
19615
19795
|
},
|
|
19616
19796
|
body: 'AM',
|
|
19617
|
-
|
|
19797
|
+
mentionedUsers: addedMembers,
|
|
19618
19798
|
attachments: [],
|
|
19619
19799
|
type: 'system'
|
|
19620
19800
|
};
|
|
@@ -19676,7 +19856,7 @@ function kickMemberFromChannel(action) {
|
|
|
19676
19856
|
m: membersIds
|
|
19677
19857
|
},
|
|
19678
19858
|
body: 'RM',
|
|
19679
|
-
|
|
19859
|
+
mentionedUsers: removedMembers,
|
|
19680
19860
|
attachments: [],
|
|
19681
19861
|
type: 'system'
|
|
19682
19862
|
};
|
|
@@ -20476,7 +20656,9 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
20476
20656
|
openChatOnUserInteraction = _ref$openChatOnUserIn === void 0 ? true : _ref$openChatOnUserIn,
|
|
20477
20657
|
_ref$autoSelectFirstC = _ref.autoSelectFirstChannel,
|
|
20478
20658
|
autoSelectFirstChannel = _ref$autoSelectFirstC === void 0 ? false : _ref$autoSelectFirstC,
|
|
20479
|
-
memberCount = _ref.memberCount
|
|
20659
|
+
memberCount = _ref.memberCount,
|
|
20660
|
+
_ref$disableFrowardMe = _ref.disableFrowardMentionsCount,
|
|
20661
|
+
disableFrowardMentionsCount = _ref$disableFrowardMe === void 0 ? false : _ref$disableFrowardMe;
|
|
20480
20662
|
var _useColor = useColors(),
|
|
20481
20663
|
backgroundColor = _useColor[THEME_COLORS.BACKGROUND],
|
|
20482
20664
|
highlightedBackground = _useColor[THEME_COLORS.HIGHLIGHTED_BACKGROUND];
|
|
@@ -20681,6 +20863,9 @@ var SceytChat = function SceytChat(_ref) {
|
|
|
20681
20863
|
React.useEffect(function () {
|
|
20682
20864
|
setChannelMembersCount(memberCount || 0);
|
|
20683
20865
|
}, [memberCount]);
|
|
20866
|
+
React.useEffect(function () {
|
|
20867
|
+
setDisableFrowardMentionsCount(disableFrowardMentionsCount);
|
|
20868
|
+
}, [disableFrowardMentionsCount]);
|
|
20684
20869
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, SceytChatClient ? (/*#__PURE__*/React__default.createElement(ChatContainer, {
|
|
20685
20870
|
onDrop: handleDropFile,
|
|
20686
20871
|
onDragOver: handleDragOver,
|
|
@@ -20727,7 +20912,8 @@ var SceytChatContainer = function SceytChatContainer(_ref) {
|
|
|
20727
20912
|
autoSelectFirstChannel = _ref.autoSelectFirstChannel,
|
|
20728
20913
|
_ref$logLevel = _ref.logLevel,
|
|
20729
20914
|
logLevel = _ref$logLevel === void 0 ? 'silent' : _ref$logLevel,
|
|
20730
|
-
memberCount = _ref.memberCount
|
|
20915
|
+
memberCount = _ref.memberCount,
|
|
20916
|
+
disableFrowardMentionsCount = _ref.disableFrowardMentionsCount;
|
|
20731
20917
|
React.useEffect(function () {
|
|
20732
20918
|
log.setLevel(logLevel);
|
|
20733
20919
|
}, []);
|
|
@@ -20752,7 +20938,8 @@ var SceytChatContainer = function SceytChatContainer(_ref) {
|
|
|
20752
20938
|
openChatOnUserInteraction: openChatOnUserInteraction,
|
|
20753
20939
|
autoSelectFirstChannel: autoSelectFirstChannel,
|
|
20754
20940
|
channelTypeFilter: channelTypeFilter,
|
|
20755
|
-
memberCount: memberCount
|
|
20941
|
+
memberCount: memberCount,
|
|
20942
|
+
disableFrowardMentionsCount: disableFrowardMentionsCount
|
|
20756
20943
|
}));
|
|
20757
20944
|
};
|
|
20758
20945
|
|
|
@@ -21374,7 +21561,7 @@ var Channel = function Channel(_ref3) {
|
|
|
21374
21561
|
if (channelDraftMessage) {
|
|
21375
21562
|
setDraftMessageText(channelDraftMessage.text);
|
|
21376
21563
|
setDraftMessage({
|
|
21377
|
-
mentionedUsers: channelDraftMessage.
|
|
21564
|
+
mentionedUsers: channelDraftMessage.mentionedUsers,
|
|
21378
21565
|
body: channelDraftMessage.text,
|
|
21379
21566
|
bodyAttributes: channelDraftMessage.bodyAttributes
|
|
21380
21567
|
});
|
|
@@ -26401,21 +26588,15 @@ function ReactionsPopup(_ref) {
|
|
|
26401
26588
|
var _useState = React.useState('all'),
|
|
26402
26589
|
activeTabKey = _useState[0],
|
|
26403
26590
|
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];
|
|
26591
|
+
var _useState2 = React.useState(0),
|
|
26592
|
+
popupHeight = _useState2[0],
|
|
26593
|
+
setPopupHeight = _useState2[1];
|
|
26594
|
+
var _useState3 = React.useState(false),
|
|
26595
|
+
calculateSizes = _useState3[0],
|
|
26596
|
+
setCalculateSizes = _useState3[1];
|
|
26597
|
+
var _useState4 = React.useState(false),
|
|
26598
|
+
closeIsApproved = _useState4[0],
|
|
26599
|
+
setCloseIsApproved = _useState4[1];
|
|
26419
26600
|
var totalReactions = 0;
|
|
26420
26601
|
if (reactionTotals) {
|
|
26421
26602
|
reactionTotals.forEach(function (summery) {
|
|
@@ -26424,9 +26605,9 @@ function ReactionsPopup(_ref) {
|
|
|
26424
26605
|
}
|
|
26425
26606
|
var user = getClient().user;
|
|
26426
26607
|
var dispatch = useDispatch();
|
|
26427
|
-
var
|
|
26428
|
-
isScrolling =
|
|
26429
|
-
setIsScrolling =
|
|
26608
|
+
var _useState5 = React.useState(false),
|
|
26609
|
+
isScrolling = _useState5[0],
|
|
26610
|
+
setIsScrolling = _useState5[1];
|
|
26430
26611
|
var handleReactionsListScroll = function handleReactionsListScroll(event) {
|
|
26431
26612
|
if (event.target.scrollTop >= event.target.scrollHeight - event.target.offsetHeight - 100 && reactionsHasNext) {
|
|
26432
26613
|
if (reactionsLoadingState === LOADING_STATE.LOADED) {
|
|
@@ -26455,20 +26636,23 @@ function ReactionsPopup(_ref) {
|
|
|
26455
26636
|
dispatch(setReactionsListAC([], true));
|
|
26456
26637
|
};
|
|
26457
26638
|
}, [messageId]);
|
|
26458
|
-
React.
|
|
26639
|
+
var scoresHeight = React.useMemo(function () {
|
|
26459
26640
|
var scoresElem = scoresRef.current;
|
|
26460
26641
|
if (scoresElem) {
|
|
26461
|
-
|
|
26642
|
+
return scoresElem.offsetHeight;
|
|
26462
26643
|
}
|
|
26463
|
-
|
|
26644
|
+
return 0;
|
|
26645
|
+
}, [scoresRef]);
|
|
26464
26646
|
React.useEffect(function () {
|
|
26465
26647
|
if (!reactionTotals || !reactionTotals.length) {
|
|
26466
26648
|
handleReactionsPopupClose();
|
|
26467
26649
|
}
|
|
26468
26650
|
}, [reactionTotals]);
|
|
26651
|
+
var reactionsHeight = React.useMemo(function () {
|
|
26652
|
+
return reactions.length * 50 + 45;
|
|
26653
|
+
}, [reactions]);
|
|
26469
26654
|
React.useEffect(function () {
|
|
26470
26655
|
if (reactions && reactionsPrevLength < reactions.length) {
|
|
26471
|
-
var reactionsHeight = reactions.length * 44 + 45;
|
|
26472
26656
|
if (reactionsHeight > popupHeight) {
|
|
26473
26657
|
setPopupHeight(reactionsHeight);
|
|
26474
26658
|
}
|
|
@@ -26478,14 +26662,15 @@ function ReactionsPopup(_ref) {
|
|
|
26478
26662
|
}
|
|
26479
26663
|
if (reactions && reactions.length) {
|
|
26480
26664
|
if (calculateSizes) {
|
|
26481
|
-
|
|
26482
|
-
var _reactionsHeight = reactions.length * 50 + 45;
|
|
26483
|
-
setPopupHeight(_reactionsHeight);
|
|
26484
|
-
setPopupVerticalPosition(botPost >= (_reactionsHeight > 320 ? 320 : _reactionsHeight) ? 'bottom' : 'top');
|
|
26665
|
+
setPopupHeight(reactionsHeight);
|
|
26485
26666
|
setCalculateSizes(false);
|
|
26486
26667
|
}
|
|
26487
26668
|
}
|
|
26488
|
-
}, [reactions]);
|
|
26669
|
+
}, [reactions, reactionsHeight]);
|
|
26670
|
+
var popupVerticalPosition = React.useMemo(function () {
|
|
26671
|
+
var botPost = bottomPosition - messageInputHeight - 40;
|
|
26672
|
+
return botPost >= (reactionsHeight > 320 ? 320 : reactionsHeight) ? 'bottom' : 'top';
|
|
26673
|
+
}, [bottomPosition, messageInputHeight, reactionsHeight]);
|
|
26489
26674
|
return /*#__PURE__*/React__default.createElement(Container$d, {
|
|
26490
26675
|
ref: popupRef,
|
|
26491
26676
|
popupVerticalPosition: popupVerticalPosition,
|
|
@@ -26543,7 +26728,10 @@ function ReactionsPopup(_ref) {
|
|
|
26543
26728
|
}, reactions.map(function (reaction) {
|
|
26544
26729
|
return /*#__PURE__*/React__default.createElement(ReactionItem$1, {
|
|
26545
26730
|
key: reaction.id,
|
|
26546
|
-
hoverBackgroundColor: backgroundHovered
|
|
26731
|
+
hoverBackgroundColor: backgroundHovered,
|
|
26732
|
+
onClick: function onClick() {
|
|
26733
|
+
return handleAddDeleteEmoji(reaction.key);
|
|
26734
|
+
}
|
|
26547
26735
|
}, /*#__PURE__*/React__default.createElement(AvatarWrapper, null, /*#__PURE__*/React__default.createElement(Avatar, {
|
|
26548
26736
|
name: reaction.user.firstName || reaction.user.id,
|
|
26549
26737
|
image: reaction.user.avatarUrl,
|
|
@@ -26554,11 +26742,7 @@ function ReactionsPopup(_ref) {
|
|
|
26554
26742
|
color: textPrimary
|
|
26555
26743
|
}, makeUsername(reaction.user.id === user.id ? reaction.user : contactsMap[reaction.user.id], reaction.user, getFromContacts)), /*#__PURE__*/React__default.createElement(SubTitle, {
|
|
26556
26744
|
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));
|
|
26745
|
+
}, 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
26746
|
})));
|
|
26563
26747
|
}
|
|
26564
26748
|
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 +26812,7 @@ var ReactionScoreItem = styled__default.div(_templateObject8$9 || (_templateObje
|
|
|
26628
26812
|
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
26813
|
}, TabKey);
|
|
26630
26814
|
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) {
|
|
26815
|
+
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
26816
|
return props.hoverBackgroundColor;
|
|
26633
26817
|
}, UserStatus);
|
|
26634
26818
|
|
|
@@ -26893,6 +27077,7 @@ function MessageActions(_ref) {
|
|
|
26893
27077
|
messageStatus = _ref.messageStatus,
|
|
26894
27078
|
handleSelectMessage = _ref.handleSelectMessage,
|
|
26895
27079
|
handleReplyMessage = _ref.handleReplyMessage,
|
|
27080
|
+
handleOpenInfoMessage = _ref.handleOpenInfoMessage,
|
|
26896
27081
|
isThreadMessage = _ref.isThreadMessage,
|
|
26897
27082
|
rtlDirection = _ref.rtlDirection,
|
|
26898
27083
|
showMessageReaction = _ref.showMessageReaction,
|
|
@@ -26904,6 +27089,8 @@ function MessageActions(_ref) {
|
|
|
26904
27089
|
showDeleteMessage = _ref.showDeleteMessage,
|
|
26905
27090
|
showSelectMessage = _ref.showSelectMessage,
|
|
26906
27091
|
showReportMessage = _ref.showReportMessage,
|
|
27092
|
+
showInfoMessage = _ref.showInfoMessage,
|
|
27093
|
+
infoIconOrder = _ref.infoIconOrder,
|
|
26907
27094
|
reactionIcon = _ref.reactionIcon,
|
|
26908
27095
|
editIcon = _ref.editIcon,
|
|
26909
27096
|
copyIcon = _ref.copyIcon,
|
|
@@ -26911,6 +27098,7 @@ function MessageActions(_ref) {
|
|
|
26911
27098
|
replyInThreadIcon = _ref.replyInThreadIcon,
|
|
26912
27099
|
deleteIcon = _ref.deleteIcon,
|
|
26913
27100
|
selectIcon = _ref.selectIcon,
|
|
27101
|
+
infoIcon = _ref.infoIcon,
|
|
26914
27102
|
allowEditDeleteIncomingMessage = _ref.allowEditDeleteIncomingMessage,
|
|
26915
27103
|
reportIcon = _ref.reportIcon,
|
|
26916
27104
|
reactionIconOrder = _ref.reactionIconOrder,
|
|
@@ -26931,6 +27119,7 @@ function MessageActions(_ref) {
|
|
|
26931
27119
|
forwardIconTooltipText = _ref.forwardIconTooltipText,
|
|
26932
27120
|
deleteIconTooltipText = _ref.deleteIconTooltipText,
|
|
26933
27121
|
selectIconTooltipText = _ref.selectIconTooltipText,
|
|
27122
|
+
infoIconTooltipText = _ref.infoIconTooltipText,
|
|
26934
27123
|
reportIconTooltipText = _ref.reportIconTooltipText,
|
|
26935
27124
|
myRole = _ref.myRole,
|
|
26936
27125
|
isIncoming = _ref.isIncoming,
|
|
@@ -27059,8 +27248,20 @@ function MessageActions(_ref) {
|
|
|
27059
27248
|
disabledColor: textSecondary,
|
|
27060
27249
|
bgColor: tooltipBackground,
|
|
27061
27250
|
direction: 'top'
|
|
27062
|
-
}, selectIconTooltipText || 'Select', /*#__PURE__*/React__default.createElement(SvgArrowDown, null)), selectIcon || /*#__PURE__*/React__default.createElement(SvgCheckCircle, null))),
|
|
27063
|
-
order:
|
|
27251
|
+
}, selectIconTooltipText || 'Select', /*#__PURE__*/React__default.createElement(SvgArrowDown, null)), selectIcon || /*#__PURE__*/React__default.createElement(SvgCheckCircle, null))), showInfoMessage && !isIncoming && (/*#__PURE__*/React__default.createElement(Action, {
|
|
27252
|
+
order: infoIconOrder || 7,
|
|
27253
|
+
iconColor: messageActionIconsColor || iconInactive,
|
|
27254
|
+
hoverBackgroundColor: backgroundHovered,
|
|
27255
|
+
hoverIconColor: accentColor,
|
|
27256
|
+
onClick: function onClick() {
|
|
27257
|
+
return handleOpenInfoMessage();
|
|
27258
|
+
}
|
|
27259
|
+
}, /*#__PURE__*/React__default.createElement(ItemNote, {
|
|
27260
|
+
disabledColor: textSecondary,
|
|
27261
|
+
bgColor: tooltipBackground,
|
|
27262
|
+
direction: 'top'
|
|
27263
|
+
}, 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, {
|
|
27264
|
+
order: deleteIconOrder || 8,
|
|
27064
27265
|
iconColor: messageActionIconsColor || warningColor,
|
|
27065
27266
|
hoverBackgroundColor: backgroundHovered,
|
|
27066
27267
|
hoverIconColor: accentColor,
|
|
@@ -27072,7 +27273,7 @@ function MessageActions(_ref) {
|
|
|
27072
27273
|
bgColor: tooltipBackground,
|
|
27073
27274
|
direction: 'top'
|
|
27074
27275
|
}, 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 ||
|
|
27276
|
+
order: reportIconOrder || 9,
|
|
27076
27277
|
iconColor: messageActionIconsColor || iconInactive,
|
|
27077
27278
|
hoverBackgroundColor: backgroundHovered,
|
|
27078
27279
|
hoverIconColor: accentColor,
|
|
@@ -29334,7 +29535,10 @@ WaveSurfer.dom = dom;
|
|
|
29334
29535
|
var _templateObject$t, _templateObject2$p, _templateObject3$j, _templateObject4$g, _templateObject5$e, _templateObject6$c;
|
|
29335
29536
|
var AudioPlayer = function AudioPlayer(_ref) {
|
|
29336
29537
|
var url = _ref.url,
|
|
29337
|
-
file = _ref.file
|
|
29538
|
+
file = _ref.file,
|
|
29539
|
+
messagePlayed = _ref.messagePlayed,
|
|
29540
|
+
channelId = _ref.channelId,
|
|
29541
|
+
incoming = _ref.incoming;
|
|
29338
29542
|
var recordingInitialState = {
|
|
29339
29543
|
recordingSeconds: 0,
|
|
29340
29544
|
recordingMilliseconds: 0,
|
|
@@ -29400,6 +29604,9 @@ var AudioPlayer = function AudioPlayer(_ref) {
|
|
|
29400
29604
|
}
|
|
29401
29605
|
}
|
|
29402
29606
|
wavesurfer.current.playPause();
|
|
29607
|
+
if (!messagePlayed && incoming) {
|
|
29608
|
+
dispatch(markVoiceMessageAsPlayedAC(channelId, [file.messageId]));
|
|
29609
|
+
}
|
|
29403
29610
|
}
|
|
29404
29611
|
};
|
|
29405
29612
|
React.useEffect(function () {
|
|
@@ -29577,7 +29784,10 @@ var Attachment = function Attachment(_ref) {
|
|
|
29577
29784
|
imageAttachmentMaxHeight = _ref.imageAttachmentMaxHeight,
|
|
29578
29785
|
videoAttachmentMaxWidth = _ref.videoAttachmentMaxWidth,
|
|
29579
29786
|
videoAttachmentMaxHeight = _ref.videoAttachmentMaxHeight,
|
|
29580
|
-
messageType = _ref.messageType
|
|
29787
|
+
messageType = _ref.messageType,
|
|
29788
|
+
messagePlayed = _ref.messagePlayed,
|
|
29789
|
+
channelId = _ref.channelId,
|
|
29790
|
+
incoming = _ref.incoming;
|
|
29581
29791
|
var _useColor = useColors(),
|
|
29582
29792
|
accentColor = _useColor[THEME_COLORS.ACCENT],
|
|
29583
29793
|
textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY],
|
|
@@ -29595,13 +29805,17 @@ var Attachment = function Attachment(_ref) {
|
|
|
29595
29805
|
var connectionStatus = useSelector(connectionStatusSelector);
|
|
29596
29806
|
var theme = useSelector(themeSelector);
|
|
29597
29807
|
var imageContRef = React.useRef(null);
|
|
29598
|
-
var
|
|
29808
|
+
var attachmentUpdatedMap = useSelector(attachmentUpdatedMapSelector) || {};
|
|
29809
|
+
var attachmentUrlFromMap = React.useMemo(function () {
|
|
29810
|
+
return attachmentUpdatedMap[attachment.url];
|
|
29811
|
+
}, [attachmentUpdatedMap, attachment.url]);
|
|
29812
|
+
var _useState = React.useState(!attachmentUrlFromMap),
|
|
29599
29813
|
imageLoading = _useState[0],
|
|
29600
29814
|
setImageLoading = _useState[1];
|
|
29601
29815
|
var _useState2 = React.useState(false),
|
|
29602
29816
|
downloadingFile = _useState2[0],
|
|
29603
29817
|
setDownloadingFile = _useState2[1];
|
|
29604
|
-
var _useState3 = React.useState(
|
|
29818
|
+
var _useState3 = React.useState(attachmentUrlFromMap),
|
|
29605
29819
|
attachmentUrl = _useState3[0],
|
|
29606
29820
|
setAttachmentUrl = _useState3[1];
|
|
29607
29821
|
var _useState4 = React.useState(),
|
|
@@ -29625,27 +29839,26 @@ var Attachment = function Attachment(_ref) {
|
|
|
29625
29839
|
var fileNameRef = React.useRef(null);
|
|
29626
29840
|
var customDownloader = getCustomDownloader();
|
|
29627
29841
|
var previewFileType = isPreview && attachment.data.type.split('/')[0];
|
|
29842
|
+
var attachmentMetadata = React.useMemo(function () {
|
|
29843
|
+
return isJSON(attachment.metadata) ? JSON.parse(attachment.metadata) : attachment.metadata;
|
|
29844
|
+
}, [attachment.metadata]);
|
|
29628
29845
|
var _useMemo = React.useMemo(function () {
|
|
29629
29846
|
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
|
-
}
|
|
29847
|
+
attachmentData = attachmentMetadata;
|
|
29635
29848
|
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
|
-
}, []),
|
|
29849
|
+
}, [attachmentMetadata]),
|
|
29637
29850
|
renderWidth = _useMemo[0],
|
|
29638
29851
|
renderHeight = _useMemo[1];
|
|
29639
29852
|
var isInUploadingState = attachmentCompilationState[attachment.tid] && (attachmentCompilationState[attachment.tid] === UPLOAD_STATE.UPLOADING || attachmentCompilationState[attachment.tid] === UPLOAD_STATE.PAUSED);
|
|
29640
29853
|
var attachmentThumb;
|
|
29641
29854
|
var withPrefix = true;
|
|
29642
|
-
if (attachment.type !== attachmentTypes.voice && attachment.type !== attachmentTypes.link &&
|
|
29855
|
+
if (attachment.type !== attachmentTypes.voice && attachment.type !== attachmentTypes.link && attachmentMetadata && attachmentMetadata.tmb) {
|
|
29643
29856
|
try {
|
|
29644
|
-
if (
|
|
29645
|
-
attachmentThumb = base64ToToDataURL(
|
|
29857
|
+
if (attachmentMetadata.tmb.length < 70) {
|
|
29858
|
+
attachmentThumb = base64ToToDataURL(attachmentMetadata.tmb);
|
|
29646
29859
|
withPrefix = false;
|
|
29647
29860
|
} else {
|
|
29648
|
-
attachmentThumb =
|
|
29861
|
+
attachmentThumb = attachmentMetadata && attachmentMetadata.tmb;
|
|
29649
29862
|
}
|
|
29650
29863
|
} catch (e) {
|
|
29651
29864
|
log.error('error on get attachmentThumb', e);
|
|
@@ -29809,9 +30022,7 @@ var Attachment = function Attachment(_ref) {
|
|
|
29809
30022
|
if (attachment.type === attachmentTypes.image && !isPreview) {
|
|
29810
30023
|
if (cachedUrl) {
|
|
29811
30024
|
setAttachmentUrl(cachedUrl);
|
|
29812
|
-
dispatch(setUpdateMessageAttachmentAC(attachment.url,
|
|
29813
|
-
attachmentUrl: cachedUrl
|
|
29814
|
-
}));
|
|
30025
|
+
dispatch(setUpdateMessageAttachmentAC(attachment.url, cachedUrl));
|
|
29815
30026
|
setIsCached(true);
|
|
29816
30027
|
} else {
|
|
29817
30028
|
setIsCached(false);
|
|
@@ -30095,7 +30306,10 @@ var Attachment = function Attachment(_ref) {
|
|
|
30095
30306
|
}
|
|
30096
30307
|
}))))) : attachment.type === attachmentTypes.voice ? (/*#__PURE__*/React__default.createElement(AudioPlayer, {
|
|
30097
30308
|
url: attachment.attachmentUrl || attachmentUrl,
|
|
30098
|
-
file: attachment
|
|
30309
|
+
file: attachment,
|
|
30310
|
+
messagePlayed: messagePlayed,
|
|
30311
|
+
channelId: channelId,
|
|
30312
|
+
incoming: incoming
|
|
30099
30313
|
})) : attachment.type === attachmentTypes.link ? null : (
|
|
30100
30314
|
/*#__PURE__*/
|
|
30101
30315
|
React__default.createElement(AttachmentFile$1, {
|
|
@@ -31384,54 +31598,99 @@ var validateUrl = function validateUrl(url) {
|
|
|
31384
31598
|
}
|
|
31385
31599
|
};
|
|
31386
31600
|
var OGMetadata = function OGMetadata(_ref) {
|
|
31387
|
-
var _metadata$
|
|
31601
|
+
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
31602
|
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];
|
|
31603
|
+
state = _ref.state,
|
|
31604
|
+
incoming = _ref.incoming;
|
|
31605
|
+
var dispatch = useDispatch();
|
|
31606
|
+
var oGMetadata = useSelector(function (state) {
|
|
31607
|
+
return state.MessageReducer.oGMetadata;
|
|
31608
|
+
});
|
|
31609
|
+
var _useColor = useColors(),
|
|
31610
|
+
incomingMessageBackgroundX = _useColor[THEME_COLORS.INCOMING_MESSAGE_BACKGROUND_X],
|
|
31611
|
+
outgoingMessageBackgroundX = _useColor[THEME_COLORS.OUTGOING_MESSAGE_BACKGROUND_X];
|
|
31408
31612
|
var attachment = React.useMemo(function () {
|
|
31409
31613
|
return attachments.find(function (attachment) {
|
|
31410
31614
|
return attachment.type === attachmentTypes.link;
|
|
31411
31615
|
});
|
|
31412
31616
|
}, [attachments]);
|
|
31617
|
+
var metadata = React.useMemo(function () {
|
|
31618
|
+
return oGMetadata[attachment === null || attachment === void 0 ? void 0 : attachment.url] || null;
|
|
31619
|
+
}, [oGMetadata, attachment === null || attachment === void 0 ? void 0 : attachment.url]);
|
|
31620
|
+
var _useState = React.useState(false),
|
|
31621
|
+
imageLoadError = _useState[0],
|
|
31622
|
+
setImageLoadError = _useState[1];
|
|
31623
|
+
var _useState2 = React.useState(false),
|
|
31624
|
+
faviconLoadError = _useState2[0],
|
|
31625
|
+
setFaviconLoadError = _useState2[1];
|
|
31626
|
+
var _useState3 = React.useState(false),
|
|
31627
|
+
shouldAnimate = _useState3[0],
|
|
31628
|
+
setShouldAnimate = _useState3[1];
|
|
31629
|
+
var handleMetadata = React.useCallback(function (metadata) {
|
|
31630
|
+
if (metadata) {
|
|
31631
|
+
dispatch(setOGMetadataAC(attachment === null || attachment === void 0 ? void 0 : attachment.url, metadata));
|
|
31632
|
+
} else {
|
|
31633
|
+
dispatch(setOGMetadataAC(attachment === null || attachment === void 0 ? void 0 : attachment.url, null));
|
|
31634
|
+
}
|
|
31635
|
+
}, []);
|
|
31413
31636
|
var ogMetadataQueryBuilder = React.useCallback(function (url) {
|
|
31414
31637
|
try {
|
|
31415
31638
|
var client = getClient();
|
|
31416
|
-
var
|
|
31639
|
+
var _temp3 = function () {
|
|
31417
31640
|
if (client) {
|
|
31418
|
-
var
|
|
31641
|
+
var _temp2 = _catch(function () {
|
|
31419
31642
|
var queryBuilder = new client.MessageLinkOGQueryBuilder(url);
|
|
31420
31643
|
return Promise.resolve(queryBuilder.build()).then(function (query) {
|
|
31421
31644
|
return Promise.resolve(query.loadOGData()).then(function (metadata) {
|
|
31422
|
-
|
|
31423
|
-
|
|
31424
|
-
|
|
31645
|
+
var _metadata$og, _metadata$og$image, _metadata$og$image$;
|
|
31646
|
+
var image = new Image();
|
|
31647
|
+
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;
|
|
31648
|
+
var _temp = function () {
|
|
31649
|
+
if (image.src) {
|
|
31650
|
+
image.onload = function () {
|
|
31651
|
+
try {
|
|
31652
|
+
var imageWidth = image.width;
|
|
31653
|
+
var imageHeight = image.height;
|
|
31654
|
+
return Promise.resolve(storeMetadata(url, _extends({}, metadata, {
|
|
31655
|
+
imageWidth: imageWidth,
|
|
31656
|
+
imageHeight: imageHeight
|
|
31657
|
+
}))).then(function () {
|
|
31658
|
+
handleMetadata(_extends({}, metadata, {
|
|
31659
|
+
imageWidth: imageWidth,
|
|
31660
|
+
imageHeight: imageHeight
|
|
31661
|
+
}));
|
|
31662
|
+
});
|
|
31663
|
+
} catch (e) {
|
|
31664
|
+
return Promise.reject(e);
|
|
31665
|
+
}
|
|
31666
|
+
};
|
|
31667
|
+
image.onerror = function () {
|
|
31668
|
+
try {
|
|
31669
|
+
setImageLoadError(true);
|
|
31670
|
+
return Promise.resolve(storeMetadata(url, _extends({}, metadata))).then(function () {
|
|
31671
|
+
handleMetadata(_extends({}, metadata));
|
|
31672
|
+
});
|
|
31673
|
+
} catch (e) {
|
|
31674
|
+
return Promise.reject(e);
|
|
31675
|
+
}
|
|
31676
|
+
};
|
|
31677
|
+
} else {
|
|
31678
|
+
return Promise.resolve(storeMetadata(url, _extends({}, metadata))).then(function () {
|
|
31679
|
+
handleMetadata(_extends({}, metadata));
|
|
31680
|
+
});
|
|
31681
|
+
}
|
|
31682
|
+
}();
|
|
31683
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
31425
31684
|
});
|
|
31426
31685
|
});
|
|
31427
31686
|
}, function () {
|
|
31428
31687
|
console.log('Failed to fetch OG metadata');
|
|
31429
|
-
|
|
31688
|
+
handleMetadata(null);
|
|
31430
31689
|
});
|
|
31431
|
-
if (
|
|
31690
|
+
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
31432
31691
|
}
|
|
31433
31692
|
}();
|
|
31434
|
-
return Promise.resolve(
|
|
31693
|
+
return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {
|
|
31435
31694
|
return null;
|
|
31436
31695
|
}) : null);
|
|
31437
31696
|
} catch (e) {
|
|
@@ -31439,16 +31698,16 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
31439
31698
|
}
|
|
31440
31699
|
}, []);
|
|
31441
31700
|
React.useEffect(function () {
|
|
31442
|
-
if (attachment !== null && attachment !== void 0 && attachment.id && attachment !== null && attachment !== void 0 && attachment.url) {
|
|
31701
|
+
if (attachment !== null && attachment !== void 0 && attachment.id && attachment !== null && attachment !== void 0 && attachment.url && !metadata) {
|
|
31702
|
+
setShouldAnimate(true);
|
|
31443
31703
|
var url = attachment === null || attachment === void 0 ? void 0 : attachment.url;
|
|
31444
31704
|
if (url) {
|
|
31445
31705
|
getMetadata(url).then(function (cachedMetadata) {
|
|
31446
31706
|
try {
|
|
31447
31707
|
if (cachedMetadata) {
|
|
31448
|
-
|
|
31449
|
-
} else {
|
|
31450
|
-
ogMetadataQueryBuilder(url);
|
|
31708
|
+
handleMetadata(cachedMetadata);
|
|
31451
31709
|
}
|
|
31710
|
+
ogMetadataQueryBuilder(url);
|
|
31452
31711
|
return Promise.resolve();
|
|
31453
31712
|
} catch (e) {
|
|
31454
31713
|
return Promise.reject(e);
|
|
@@ -31458,7 +31717,7 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
31458
31717
|
});
|
|
31459
31718
|
}
|
|
31460
31719
|
}
|
|
31461
|
-
}, [attachment === null || attachment === void 0 ? void 0 : attachment.url]);
|
|
31720
|
+
}, [attachment === null || attachment === void 0 ? void 0 : attachment.url, metadata]);
|
|
31462
31721
|
var ogUrl = React.useMemo(function () {
|
|
31463
31722
|
var url = attachment === null || attachment === void 0 ? void 0 : attachment.url;
|
|
31464
31723
|
var urlObj = validateUrl(url);
|
|
@@ -31468,102 +31727,130 @@ var OGMetadata = function OGMetadata(_ref) {
|
|
|
31468
31727
|
return url;
|
|
31469
31728
|
}, [attachment === null || attachment === void 0 ? void 0 : attachment.url]);
|
|
31470
31729
|
var showOGMetadata = React.useMemo(function () {
|
|
31471
|
-
var _metadata$
|
|
31472
|
-
return state !== 'deleted' && (metadata === null || metadata === void 0 ? void 0 : (_metadata$
|
|
31730
|
+
var _metadata$og2, _metadata$og3;
|
|
31731
|
+
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
31732
|
}, [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
31733
|
var calculatedImageHeight = React.useMemo(function () {
|
|
31495
|
-
|
|
31496
|
-
|
|
31734
|
+
if (!(metadata !== null && metadata !== void 0 && metadata.imageWidth)) {
|
|
31735
|
+
return 0;
|
|
31736
|
+
}
|
|
31737
|
+
return (metadata === null || metadata === void 0 ? void 0 : metadata.imageHeight) / ((metadata === null || metadata === void 0 ? void 0 : metadata.imageWidth) / 400);
|
|
31738
|
+
}, [metadata === null || metadata === void 0 ? void 0 : metadata.imageWidth, metadata === null || metadata === void 0 ? void 0 : metadata.imageHeight]);
|
|
31497
31739
|
return /*#__PURE__*/React__default.createElement(OGMetadataContainer, {
|
|
31498
|
-
showOGMetadata: !!showOGMetadata
|
|
31740
|
+
showOGMetadata: !!showOGMetadata,
|
|
31741
|
+
bgColor: incoming ? incomingMessageBackgroundX : outgoingMessageBackgroundX
|
|
31499
31742
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
31500
31743
|
onClick: function onClick() {
|
|
31501
31744
|
window.open(attachment === null || attachment === void 0 ? void 0 : attachment.url, '_blank');
|
|
31745
|
+
},
|
|
31746
|
+
style: {
|
|
31747
|
+
width: showOGMetadata ? '100%' : 'auto'
|
|
31502
31748
|
}
|
|
31503
31749
|
}, /*#__PURE__*/React__default.createElement(ImageContainer, {
|
|
31504
|
-
showOGMetadata: !!showOGMetadata && !imageLoadError
|
|
31505
|
-
|
|
31506
|
-
|
|
31507
|
-
|
|
31508
|
-
|
|
31750
|
+
showOGMetadata: !!showOGMetadata && !imageLoadError,
|
|
31751
|
+
containerWidth: 400,
|
|
31752
|
+
containerHeight: calculatedImageHeight,
|
|
31753
|
+
shouldAnimate: shouldAnimate
|
|
31754
|
+
}, 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, {
|
|
31755
|
+
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
31756
|
alt: 'OG metadata image',
|
|
31510
|
-
|
|
31511
|
-
|
|
31512
|
-
|
|
31513
|
-
|
|
31514
|
-
|
|
31515
|
-
|
|
31516
|
-
|
|
31517
|
-
|
|
31757
|
+
imageWidth: 400,
|
|
31758
|
+
imageHeight: calculatedImageHeight,
|
|
31759
|
+
shouldAnimate: shouldAnimate
|
|
31760
|
+
})) : null), showOGMetadata ? (/*#__PURE__*/React__default.createElement(OGText, {
|
|
31761
|
+
shouldAnimate: shouldAnimate
|
|
31762
|
+
}, /*#__PURE__*/React__default.createElement(Url, {
|
|
31763
|
+
maxWidth: 400,
|
|
31764
|
+
shouldAnimate: shouldAnimate
|
|
31765
|
+
}, ogUrl), metadata !== null && metadata !== void 0 && (_metadata$og6 = metadata.og) !== null && _metadata$og6 !== void 0 && _metadata$og6.title ? (/*#__PURE__*/React__default.createElement(Title, {
|
|
31766
|
+
maxWidth: 400,
|
|
31767
|
+
shouldAnimate: shouldAnimate
|
|
31768
|
+
}, 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, {
|
|
31769
|
+
shouldAnimate: shouldAnimate,
|
|
31770
|
+
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
31771
|
onLoad: function onLoad() {
|
|
31519
31772
|
return setFaviconLoadError(false);
|
|
31520
31773
|
},
|
|
31521
31774
|
onError: function onError() {
|
|
31522
|
-
|
|
31775
|
+
dispatch(updateOGMetadataAC(attachment === null || attachment === void 0 ? void 0 : attachment.url, _extends({}, metadata, {
|
|
31776
|
+
og: _extends({}, metadata === null || metadata === void 0 ? void 0 : metadata.og, {
|
|
31777
|
+
favicon: {
|
|
31778
|
+
url: ''
|
|
31779
|
+
}
|
|
31780
|
+
})
|
|
31781
|
+
})));
|
|
31782
|
+
setFaviconLoadError(true);
|
|
31523
31783
|
}
|
|
31524
|
-
})) : null, /*#__PURE__*/React__default.createElement("span", null, metadata === null || metadata === void 0 ? void 0 : (_metadata$
|
|
31525
|
-
maxWidth: 400
|
|
31526
|
-
|
|
31784
|
+
})) : 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, {
|
|
31785
|
+
maxWidth: 400,
|
|
31786
|
+
shouldAnimate: shouldAnimate
|
|
31787
|
+
}, metadata === null || metadata === void 0 ? void 0 : (_metadata$og1 = metadata.og) === null || _metadata$og1 === void 0 ? void 0 : _metadata$og1.description)) : null)) : null));
|
|
31527
31788
|
};
|
|
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
|
|
31789
|
+
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) {
|
|
31790
|
+
var bgColor = _ref2.bgColor;
|
|
31791
|
+
return bgColor;
|
|
31792
|
+
}, function (_ref3) {
|
|
31793
|
+
var showOGMetadata = _ref3.showOGMetadata;
|
|
31530
31794
|
return showOGMetadata ? '0.8rem' : '0';
|
|
31531
31795
|
});
|
|
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 ";
|
|
31796
|
+
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) {
|
|
31797
|
+
var containerWidth = _ref4.containerWidth;
|
|
31798
|
+
return containerWidth ? "\n max-width: " + (containerWidth + "px") + ";\n " : "\n max-width: 100%;\n width: 100%;\n ";
|
|
31539
31799
|
}, function (_ref5) {
|
|
31540
|
-
var
|
|
31541
|
-
|
|
31800
|
+
var containerHeight = _ref5.containerHeight,
|
|
31801
|
+
showOGMetadata = _ref5.showOGMetadata;
|
|
31802
|
+
return containerHeight ? "\n max-height: " + (containerHeight + "px") + ";\n height: " + (showOGMetadata ? containerHeight + "px" : '0') + ";\n " : "\n height: 0;\n ";
|
|
31542
31803
|
}, function (_ref6) {
|
|
31543
|
-
var showOGMetadata = _ref6.showOGMetadata
|
|
31544
|
-
|
|
31545
|
-
|
|
31546
|
-
|
|
31547
|
-
var
|
|
31548
|
-
|
|
31804
|
+
var showOGMetadata = _ref6.showOGMetadata,
|
|
31805
|
+
containerHeight = _ref6.containerHeight;
|
|
31806
|
+
return showOGMetadata && containerHeight ? 1 : 0;
|
|
31807
|
+
}, function (_ref7) {
|
|
31808
|
+
var showOGMetadata = _ref7.showOGMetadata,
|
|
31809
|
+
containerHeight = _ref7.containerHeight;
|
|
31810
|
+
return showOGMetadata && containerHeight ? '4px' : '0';
|
|
31811
|
+
}, function (_ref8) {
|
|
31812
|
+
var shouldAnimate = _ref8.shouldAnimate;
|
|
31813
|
+
return shouldAnimate && "\n transition: height 0.2s ease;\n ";
|
|
31814
|
+
});
|
|
31815
|
+
var OGText = styled__default.div(_templateObject3$p || (_templateObject3$p = _taggedTemplateLiteralLoose(["\n padding: 0.5rem;\n margin: 0;\n ", "\n"])), function (_ref9) {
|
|
31816
|
+
var shouldAnimate = _ref9.shouldAnimate;
|
|
31817
|
+
return shouldAnimate && "\n transition: all 0.2s ease;\n ";
|
|
31818
|
+
});
|
|
31819
|
+
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) {
|
|
31820
|
+
var maxWidth = _ref0.maxWidth;
|
|
31549
31821
|
return maxWidth && "\n max-width: " + (maxWidth + "px") + ";\n ";
|
|
31822
|
+
}, function (_ref1) {
|
|
31823
|
+
var shouldAnimate = _ref1.shouldAnimate;
|
|
31824
|
+
return shouldAnimate && "\n transition: all 0.2s ease;\n ";
|
|
31550
31825
|
});
|
|
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 =
|
|
31826
|
+
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) {
|
|
31827
|
+
var maxWidth = _ref10.maxWidth;
|
|
31553
31828
|
return maxWidth && "\n max-width: " + (maxWidth + "px") + ";\n ";
|
|
31829
|
+
}, function (_ref11) {
|
|
31830
|
+
var shouldAnimate = _ref11.shouldAnimate;
|
|
31831
|
+
return shouldAnimate && "\n transition: all 0.2s ease;\n ";
|
|
31554
31832
|
});
|
|
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 =
|
|
31833
|
+
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) {
|
|
31834
|
+
var maxWidth = _ref12.maxWidth;
|
|
31557
31835
|
return maxWidth && "\n max-width: " + (maxWidth + "px") + ";\n ";
|
|
31836
|
+
}, function (_ref13) {
|
|
31837
|
+
var shouldAnimate = _ref13.shouldAnimate;
|
|
31838
|
+
return shouldAnimate && "\n transition: all 0.2s ease;\n ";
|
|
31558
31839
|
});
|
|
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
|
|
31840
|
+
var Img = styled__default.img(_templateObject7$d || (_templateObject7$d = _taggedTemplateLiteralLoose(["\n ", "\n ", "\n\n object-fit: cover;\n ", "\n"])), function (_ref14) {
|
|
31841
|
+
var imageWidth = _ref14.imageWidth;
|
|
31842
|
+
return imageWidth && "\n max-width: 100%;\n width: " + ("calc(" + imageWidth + "px - 8px)") + ";\n ";
|
|
31843
|
+
}, function (_ref15) {
|
|
31844
|
+
var imageHeight = _ref15.imageHeight;
|
|
31845
|
+
return imageHeight && "\n max-height: " + (imageHeight + "px") + ";\n min-height: " + (imageHeight + "px") + ";\n height: " + (imageHeight + "px") + ";\n ";
|
|
31846
|
+
}, function (_ref16) {
|
|
31847
|
+
var shouldAnimate = _ref16.shouldAnimate;
|
|
31848
|
+
return shouldAnimate && "\n transition: height 0.2s ease;\n ";
|
|
31849
|
+
});
|
|
31850
|
+
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) {
|
|
31851
|
+
var shouldAnimate = _ref17.shouldAnimate;
|
|
31852
|
+
return shouldAnimate && "\n transition: all 0.2s ease;\n ";
|
|
31565
31853
|
});
|
|
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
31854
|
|
|
31568
31855
|
var _templateObject$B, _templateObject2$w, _templateObject3$q, _templateObject4$m, _templateObject5$i;
|
|
31569
31856
|
var MessageBody = function MessageBody(_ref) {
|
|
@@ -31617,6 +31904,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31617
31904
|
deleteMessage = _ref$deleteMessage === void 0 ? true : _ref$deleteMessage,
|
|
31618
31905
|
_ref$selectMessage = _ref.selectMessage,
|
|
31619
31906
|
selectMessage = _ref$selectMessage === void 0 ? true : _ref$selectMessage,
|
|
31907
|
+
showInfoMessage = _ref.showInfoMessage,
|
|
31620
31908
|
allowEditDeleteIncomingMessage = _ref.allowEditDeleteIncomingMessage,
|
|
31621
31909
|
_ref$forwardMessage = _ref.forwardMessage,
|
|
31622
31910
|
forwardMessage = _ref$forwardMessage === void 0 ? true : _ref$forwardMessage,
|
|
@@ -31629,6 +31917,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31629
31917
|
replyInThreadIcon = _ref.replyInThreadIcon,
|
|
31630
31918
|
forwardIcon = _ref.forwardIcon,
|
|
31631
31919
|
deleteIcon = _ref.deleteIcon,
|
|
31920
|
+
infoIcon = _ref.infoIcon,
|
|
31632
31921
|
selectIcon = _ref.selectIcon,
|
|
31633
31922
|
starIcon = _ref.starIcon,
|
|
31634
31923
|
staredIcon = _ref.staredIcon,
|
|
@@ -31640,6 +31929,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31640
31929
|
replyInThreadIconOrder = _ref.replyInThreadIconOrder,
|
|
31641
31930
|
forwardIconOrder = _ref.forwardIconOrder,
|
|
31642
31931
|
deleteIconOrder = _ref.deleteIconOrder,
|
|
31932
|
+
infoIconOrder = _ref.infoIconOrder,
|
|
31643
31933
|
selectIconOrder = _ref.selectIconOrder,
|
|
31644
31934
|
starIconOrder = _ref.starIconOrder,
|
|
31645
31935
|
reportIconOrder = _ref.reportIconOrder,
|
|
@@ -31653,6 +31943,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31653
31943
|
selectIconTooltipText = _ref.selectIconTooltipText,
|
|
31654
31944
|
starIconTooltipText = _ref.starIconTooltipText,
|
|
31655
31945
|
reportIconTooltipText = _ref.reportIconTooltipText,
|
|
31946
|
+
infoIconTooltipText = _ref.infoIconTooltipText,
|
|
31656
31947
|
messageActionIconsColor = _ref.messageActionIconsColor,
|
|
31657
31948
|
messageStatusSize = _ref.messageStatusSize,
|
|
31658
31949
|
messageStatusColor = _ref.messageStatusColor,
|
|
@@ -31681,6 +31972,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31681
31972
|
messageTextFontSize = _ref.messageTextFontSize,
|
|
31682
31973
|
messageTextLineHeight = _ref.messageTextLineHeight,
|
|
31683
31974
|
handleToggleForwardMessagePopup = _ref.handleToggleForwardMessagePopup,
|
|
31975
|
+
handleToggleInfoMessagePopupOpen = _ref.handleToggleInfoMessagePopupOpen,
|
|
31684
31976
|
messageActionsShow = _ref.messageActionsShow,
|
|
31685
31977
|
closeMessageActions = _ref.closeMessageActions,
|
|
31686
31978
|
handleDeletePendingMessage = _ref.handleDeletePendingMessage,
|
|
@@ -31829,6 +32121,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31829
32121
|
handleCopyMessage: handleCopyMessage,
|
|
31830
32122
|
handleDeletePendingMessage: handleDeletePendingMessage,
|
|
31831
32123
|
handleOpenForwardMessage: handleToggleForwardMessagePopup,
|
|
32124
|
+
handleOpenInfoMessage: handleToggleInfoMessagePopupOpen,
|
|
31832
32125
|
handleResendMessage: handleResendMessage,
|
|
31833
32126
|
handleReplyMessage: _handleReplyMessage,
|
|
31834
32127
|
handleReportMessage: handleToggleReportPopupOpen,
|
|
@@ -31880,7 +32173,11 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31880
32173
|
reportIconTooltipText: reportIconTooltipText,
|
|
31881
32174
|
messageActionIconsColor: messageActionIconsColor,
|
|
31882
32175
|
myRole: channel.userRole,
|
|
31883
|
-
isIncoming: message.incoming
|
|
32176
|
+
isIncoming: message.incoming,
|
|
32177
|
+
infoIconTooltipText: infoIconTooltipText,
|
|
32178
|
+
infoIcon: infoIcon,
|
|
32179
|
+
showInfoMessage: showInfoMessage,
|
|
32180
|
+
infoIconOrder: infoIconOrder
|
|
31884
32181
|
}))), message.parentMessage && message.parentMessage.id && !isThreadMessage && (/*#__PURE__*/React__default.createElement(RepliedMessage$1, {
|
|
31885
32182
|
message: message,
|
|
31886
32183
|
theme: theme,
|
|
@@ -31928,10 +32225,11 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31928
32225
|
incomingMessageStyles: incomingMessageStyles,
|
|
31929
32226
|
incoming: message.incoming,
|
|
31930
32227
|
linkColor: linkColor
|
|
31931
|
-
}, linkAttachment && /*#__PURE__*/React__default.createElement(OGMetadata, {
|
|
32228
|
+
}, linkAttachment && (/*#__PURE__*/React__default.createElement(OGMetadata, {
|
|
31932
32229
|
attachments: [linkAttachment],
|
|
31933
|
-
state: message.state
|
|
31934
|
-
|
|
32230
|
+
state: message.state,
|
|
32231
|
+
incoming: message.incoming
|
|
32232
|
+
})), /*#__PURE__*/React__default.createElement("span", {
|
|
31935
32233
|
ref: messageTextRef
|
|
31936
32234
|
}, MessageTextFormat({
|
|
31937
32235
|
text: message.body,
|
|
@@ -31999,7 +32297,10 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
31999
32297
|
imageAttachmentMaxHeight: imageAttachmentMaxHeight,
|
|
32000
32298
|
videoAttachmentMaxWidth: videoAttachmentMaxWidth,
|
|
32001
32299
|
videoAttachmentMaxHeight: videoAttachmentMaxHeight,
|
|
32002
|
-
messageType: message.type
|
|
32300
|
+
messageType: message.type,
|
|
32301
|
+
messagePlayed: message.deliveryStatus === MESSAGE_DELIVERY_STATUS.PLAYED,
|
|
32302
|
+
channelId: message.channelId,
|
|
32303
|
+
incoming: message.incoming
|
|
32003
32304
|
});
|
|
32004
32305
|
}), emojisPopupOpen && emojisPopupPosition && (/*#__PURE__*/React__default.createElement(EmojiContainer, {
|
|
32005
32306
|
id: message.id + "_emoji_popup_container",
|
|
@@ -32079,7 +32380,426 @@ var FrequentlyEmojisContainer = styled__default.div(_templateObject5$i || (_temp
|
|
|
32079
32380
|
return props.rtlDirection && '0';
|
|
32080
32381
|
});
|
|
32081
32382
|
|
|
32082
|
-
var _templateObject$C, _templateObject2$x, _templateObject3$r, _templateObject4$n, _templateObject5$j, _templateObject6$g, _templateObject7$e, _templateObject8$d, _templateObject9$b, _templateObject0$a, _templateObject1$7
|
|
32383
|
+
var _templateObject$C, _templateObject2$x, _templateObject3$r, _templateObject4$n, _templateObject5$j, _templateObject6$g, _templateObject7$e, _templateObject8$d, _templateObject9$b, _templateObject0$a, _templateObject1$7;
|
|
32384
|
+
var defaultFormatDate = function defaultFormatDate(date) {
|
|
32385
|
+
var m = moment(date);
|
|
32386
|
+
if (m.isSame(moment(), 'day')) {
|
|
32387
|
+
return "Today, " + m.format('HH:mm');
|
|
32388
|
+
}
|
|
32389
|
+
if (m.isSame(moment().subtract(1, 'day'), 'day')) {
|
|
32390
|
+
return "Yesterday, " + m.format('HH:mm');
|
|
32391
|
+
}
|
|
32392
|
+
return m.format('DD.MM.YYYY');
|
|
32393
|
+
};
|
|
32394
|
+
var MessageInfo = function MessageInfo(_ref) {
|
|
32395
|
+
var _tabsOrder$;
|
|
32396
|
+
var message = _ref.message,
|
|
32397
|
+
togglePopup = _ref.togglePopup,
|
|
32398
|
+
labels = _ref.labels,
|
|
32399
|
+
_ref$tabsOrder = _ref.tabsOrder,
|
|
32400
|
+
tabsOrder = _ref$tabsOrder === void 0 ? [].concat(message.attachments && message.attachments.length > 0 && message.attachments[0].type === 'voice' ? [{
|
|
32401
|
+
key: 'played',
|
|
32402
|
+
label: 'Played by',
|
|
32403
|
+
data: []
|
|
32404
|
+
}] : [], [{
|
|
32405
|
+
key: 'received',
|
|
32406
|
+
label: 'Delivered to',
|
|
32407
|
+
data: []
|
|
32408
|
+
}, {
|
|
32409
|
+
key: 'displayed',
|
|
32410
|
+
label: 'Seen by',
|
|
32411
|
+
data: []
|
|
32412
|
+
}]) : _ref$tabsOrder,
|
|
32413
|
+
_ref$showCounts = _ref.showCounts,
|
|
32414
|
+
showCounts = _ref$showCounts === void 0 ? false : _ref$showCounts,
|
|
32415
|
+
_ref$avatarSize = _ref.avatarSize,
|
|
32416
|
+
avatarSize = _ref$avatarSize === void 0 ? 32 : _ref$avatarSize,
|
|
32417
|
+
_ref$maxWidth = _ref.maxWidth,
|
|
32418
|
+
maxWidth = _ref$maxWidth === void 0 ? '340px' : _ref$maxWidth,
|
|
32419
|
+
_ref$minWidth = _ref.minWidth,
|
|
32420
|
+
minWidth = _ref$minWidth === void 0 ? '340px' : _ref$minWidth,
|
|
32421
|
+
_ref$height = _ref.height,
|
|
32422
|
+
height = _ref$height === void 0 ? '300px' : _ref$height,
|
|
32423
|
+
renderItem = _ref.renderItem,
|
|
32424
|
+
_ref$formatDate = _ref.formatDate,
|
|
32425
|
+
formatDate = _ref$formatDate === void 0 ? defaultFormatDate : _ref$formatDate,
|
|
32426
|
+
_ref$tabsStyles = _ref.tabsStyles,
|
|
32427
|
+
tabsStyles = _ref$tabsStyles === void 0 ? {} : _ref$tabsStyles,
|
|
32428
|
+
_ref$listItemStyles = _ref.listItemStyles,
|
|
32429
|
+
listItemStyles = _ref$listItemStyles === void 0 ? {} : _ref$listItemStyles,
|
|
32430
|
+
handleOpenUserProfile = _ref.handleOpenUserProfile,
|
|
32431
|
+
contacts = _ref.contacts;
|
|
32432
|
+
var _useColor = useColors(),
|
|
32433
|
+
accentColor = _useColor[THEME_COLORS.ACCENT],
|
|
32434
|
+
textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY],
|
|
32435
|
+
textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY],
|
|
32436
|
+
backgroundHovered = _useColor[THEME_COLORS.BACKGROUND_HOVERED],
|
|
32437
|
+
backgroundSections = _useColor[THEME_COLORS.BACKGROUND_SECTIONS],
|
|
32438
|
+
textOnPrimary = _useColor[THEME_COLORS.TEXT_ON_PRIMARY],
|
|
32439
|
+
border = _useColor[THEME_COLORS.BORDER];
|
|
32440
|
+
var dispatch = useDispatch();
|
|
32441
|
+
var messageMarkers = useSelector(messageMarkersSelector);
|
|
32442
|
+
var messagesMarkersLoadingState = useSelector(messagesMarkersLoadingStateSelector);
|
|
32443
|
+
var markers = React.useMemo(function () {
|
|
32444
|
+
return messageMarkers[message.channelId] && messageMarkers[message.channelId][message.id];
|
|
32445
|
+
}, [messageMarkers, message.channelId, message.id]);
|
|
32446
|
+
var _useState = React.useState(((_tabsOrder$ = tabsOrder[0]) === null || _tabsOrder$ === void 0 ? void 0 : _tabsOrder$.key) || 'played'),
|
|
32447
|
+
activeTab = _useState[0],
|
|
32448
|
+
setActiveTab = _useState[1];
|
|
32449
|
+
var _useState2 = React.useState(false),
|
|
32450
|
+
open = _useState2[0],
|
|
32451
|
+
setOpen = _useState2[1];
|
|
32452
|
+
var rootRef = React.useRef(null);
|
|
32453
|
+
var _useState3 = React.useState(false),
|
|
32454
|
+
flipAbove = _useState3[0],
|
|
32455
|
+
setFlipAbove = _useState3[1];
|
|
32456
|
+
var panelRef = React.useRef(null);
|
|
32457
|
+
var contentRef = React.useRef(null);
|
|
32458
|
+
var tabsRef = React.useRef(null);
|
|
32459
|
+
var listRef = React.useRef(null);
|
|
32460
|
+
var _useState4 = React.useState(0),
|
|
32461
|
+
panelHeightPx = _useState4[0],
|
|
32462
|
+
setPanelHeightPx = _useState4[1];
|
|
32463
|
+
var _useState5 = React.useState(false),
|
|
32464
|
+
isTransitioning = _useState5[0],
|
|
32465
|
+
setIsTransitioning = _useState5[1];
|
|
32466
|
+
var _useState6 = React.useState(false),
|
|
32467
|
+
ready = _useState6[0],
|
|
32468
|
+
setReady = _useState6[1];
|
|
32469
|
+
var _useState7 = React.useState(false),
|
|
32470
|
+
flipLocked = _useState7[0],
|
|
32471
|
+
setFlipLocked = _useState7[1];
|
|
32472
|
+
var getFromContacts = React.useMemo(function () {
|
|
32473
|
+
return getShowOnlyContactUsers();
|
|
32474
|
+
}, []);
|
|
32475
|
+
var activeMarkers = React.useMemo(function () {
|
|
32476
|
+
var list = markers && markers[activeTab] || [];
|
|
32477
|
+
return Array.isArray(list) ? [].concat(list).sort(sortByDateDesc) : [];
|
|
32478
|
+
}, [markers, activeTab]);
|
|
32479
|
+
var rowHeightPx = React.useMemo(function () {
|
|
32480
|
+
return (avatarSize || 32) + 24;
|
|
32481
|
+
}, [avatarSize]);
|
|
32482
|
+
var listMaxHeightPx = React.useMemo(function () {
|
|
32483
|
+
return rowHeightPx * 5 - 16;
|
|
32484
|
+
}, [rowHeightPx]);
|
|
32485
|
+
var tabItems = tabsOrder.map(function (tab) {
|
|
32486
|
+
switch (tab.key) {
|
|
32487
|
+
case 'played':
|
|
32488
|
+
return {
|
|
32489
|
+
key: tab.key,
|
|
32490
|
+
label: (labels === null || labels === void 0 ? void 0 : labels.playedBy) || 'Played by',
|
|
32491
|
+
data: activeMarkers
|
|
32492
|
+
};
|
|
32493
|
+
case 'received':
|
|
32494
|
+
return {
|
|
32495
|
+
key: tab.key,
|
|
32496
|
+
label: (labels === null || labels === void 0 ? void 0 : labels.receivedBy) || 'Delivered to',
|
|
32497
|
+
data: activeMarkers
|
|
32498
|
+
};
|
|
32499
|
+
case 'displayed':
|
|
32500
|
+
default:
|
|
32501
|
+
return {
|
|
32502
|
+
key: 'displayed',
|
|
32503
|
+
label: (labels === null || labels === void 0 ? void 0 : labels.displayedBy) || 'Seen by',
|
|
32504
|
+
data: activeMarkers
|
|
32505
|
+
};
|
|
32506
|
+
}
|
|
32507
|
+
});
|
|
32508
|
+
var renderRow = function renderRow(marker) {
|
|
32509
|
+
var _marker$user;
|
|
32510
|
+
var contact = contacts[((_marker$user = marker.user) === null || _marker$user === void 0 ? void 0 : _marker$user.id) || ''];
|
|
32511
|
+
var displayName = makeUsername(contact, marker.user, getFromContacts);
|
|
32512
|
+
var avatarUrl = marker.user ? marker.user.avatarUrl : '';
|
|
32513
|
+
var dateVal = marker.createdAt || marker.createdAt;
|
|
32514
|
+
var dateFormat = dateVal ? formatDate(new Date(dateVal)) : '';
|
|
32515
|
+
var node = /*#__PURE__*/React__default.createElement(Row$1, {
|
|
32516
|
+
backgroundHover: listItemStyles.hoverBackground || backgroundHovered,
|
|
32517
|
+
onClick: function onClick() {
|
|
32518
|
+
return handleOpenUserProfile === null || handleOpenUserProfile === void 0 ? void 0 : handleOpenUserProfile(marker.user);
|
|
32519
|
+
}
|
|
32520
|
+
}, /*#__PURE__*/React__default.createElement(Avatar, {
|
|
32521
|
+
name: displayName,
|
|
32522
|
+
image: avatarUrl,
|
|
32523
|
+
size: avatarSize,
|
|
32524
|
+
textSize: 12,
|
|
32525
|
+
setDefaultAvatar: true
|
|
32526
|
+
}), /*#__PURE__*/React__default.createElement(RowInfo, null, /*#__PURE__*/React__default.createElement(RowTitle, {
|
|
32527
|
+
color: listItemStyles.nameColor || textPrimary
|
|
32528
|
+
}, displayName), /*#__PURE__*/React__default.createElement(RowDate, {
|
|
32529
|
+
color: listItemStyles.dateColor || textSecondary
|
|
32530
|
+
}, dateFormat)));
|
|
32531
|
+
return renderItem ? renderItem(marker, node) : node;
|
|
32532
|
+
};
|
|
32533
|
+
React.useLayoutEffect(function () {
|
|
32534
|
+
var _rootRef$current;
|
|
32535
|
+
var container = document.getElementById('scrollableDiv');
|
|
32536
|
+
var anchorEl = (_rootRef$current = rootRef.current) === null || _rootRef$current === void 0 ? void 0 : _rootRef$current.parentElement;
|
|
32537
|
+
if (container && anchorEl) {
|
|
32538
|
+
var containerRect = container.getBoundingClientRect();
|
|
32539
|
+
var anchorRect = anchorEl.getBoundingClientRect();
|
|
32540
|
+
var contentEl = contentRef.current;
|
|
32541
|
+
var tabsEl = tabsRef.current;
|
|
32542
|
+
var listEl = listRef.current;
|
|
32543
|
+
var cs = contentEl ? getComputedStyle(contentEl) : {};
|
|
32544
|
+
var padTop = parseFloat((cs === null || cs === void 0 ? void 0 : cs.paddingTop) || '0') || 0;
|
|
32545
|
+
var padBottom = parseFloat((cs === null || cs === void 0 ? void 0 : cs.paddingBottom) || '0') || 0;
|
|
32546
|
+
var contentPaddingY = padTop + padBottom;
|
|
32547
|
+
var tabsHeight = tabsEl ? tabsEl.getBoundingClientRect().height : 0;
|
|
32548
|
+
var tabsMarginBottom = 8;
|
|
32549
|
+
var listMarginTop = 8;
|
|
32550
|
+
var desiredListHeight = Math.min(listEl ? listEl.scrollHeight : 0, listMaxHeightPx);
|
|
32551
|
+
var desiredHeight = contentPaddingY + tabsHeight + tabsMarginBottom + listMarginTop + desiredListHeight;
|
|
32552
|
+
var maxPx = parseInt(String(height || '300'), 10) || 300;
|
|
32553
|
+
var measuredTarget = Math.min(desiredHeight || 0, maxPx);
|
|
32554
|
+
var flipTarget = messagesMarkersLoadingState === LOADING_STATE.LOADING ? maxPx : measuredTarget;
|
|
32555
|
+
setPanelHeightPx(measuredTarget);
|
|
32556
|
+
var availableBelow = containerRect.bottom - anchorRect.bottom - 8;
|
|
32557
|
+
var availableAbove = anchorRect.top - containerRect.top - 8;
|
|
32558
|
+
var nextFlip = Boolean(flipTarget > availableBelow && flipTarget <= availableAbove);
|
|
32559
|
+
setFlipAbove(nextFlip);
|
|
32560
|
+
}
|
|
32561
|
+
setIsTransitioning(true);
|
|
32562
|
+
setOpen(true);
|
|
32563
|
+
setReady(true);
|
|
32564
|
+
setFlipLocked(true);
|
|
32565
|
+
}, []);
|
|
32566
|
+
React.useEffect(function () {
|
|
32567
|
+
var onDown = function onDown(e) {
|
|
32568
|
+
if (rootRef.current && !rootRef.current.contains(e.target)) {
|
|
32569
|
+
togglePopup();
|
|
32570
|
+
}
|
|
32571
|
+
};
|
|
32572
|
+
document.addEventListener('mousedown', onDown);
|
|
32573
|
+
return function () {
|
|
32574
|
+
document.removeEventListener('mousedown', onDown);
|
|
32575
|
+
};
|
|
32576
|
+
}, []);
|
|
32577
|
+
React.useEffect(function () {
|
|
32578
|
+
var container = document.getElementById('scrollableDiv');
|
|
32579
|
+
if (!container) return;
|
|
32580
|
+
var recalc = function recalc() {
|
|
32581
|
+
if (!rootRef.current || !ready) return;
|
|
32582
|
+
if (messagesMarkersLoadingState === LOADING_STATE.LOADING) return;
|
|
32583
|
+
var containerRect = container.getBoundingClientRect();
|
|
32584
|
+
var anchorEl = rootRef.current.parentElement;
|
|
32585
|
+
if (!anchorEl) return;
|
|
32586
|
+
var anchorRect = anchorEl.getBoundingClientRect();
|
|
32587
|
+
var dropdownHeight = panelHeightPx || 0;
|
|
32588
|
+
if (!dropdownHeight || dropdownHeight < 8) {
|
|
32589
|
+
var parsed = parseInt(String(height || '300'), 10);
|
|
32590
|
+
dropdownHeight = isNaN(parsed) ? 300 : parsed;
|
|
32591
|
+
}
|
|
32592
|
+
var availableBelow = containerRect.bottom - anchorRect.bottom - 8;
|
|
32593
|
+
var availableAbove = anchorRect.top - containerRect.top - 8;
|
|
32594
|
+
var overflowBelow = dropdownHeight > availableBelow;
|
|
32595
|
+
var overflowAbove = dropdownHeight > availableAbove;
|
|
32596
|
+
if (!isTransitioning && !flipLocked) {
|
|
32597
|
+
setFlipAbove(function (prev) {
|
|
32598
|
+
if (prev) {
|
|
32599
|
+
if (overflowAbove && !overflowBelow) return false;
|
|
32600
|
+
return true;
|
|
32601
|
+
}
|
|
32602
|
+
if (overflowBelow && !overflowAbove) return true;
|
|
32603
|
+
return false;
|
|
32604
|
+
});
|
|
32605
|
+
}
|
|
32606
|
+
};
|
|
32607
|
+
if (open) {
|
|
32608
|
+
recalc();
|
|
32609
|
+
var raf1 = requestAnimationFrame(recalc);
|
|
32610
|
+
var raf2 = requestAnimationFrame(function () {
|
|
32611
|
+
return requestAnimationFrame(recalc);
|
|
32612
|
+
});
|
|
32613
|
+
var t1 = setTimeout(recalc, 50);
|
|
32614
|
+
var t2 = setTimeout(recalc, 200);
|
|
32615
|
+
panelRef.current && panelRef.current.addEventListener('transitionend', recalc);
|
|
32616
|
+
container.addEventListener('scroll', recalc);
|
|
32617
|
+
window.addEventListener('resize', recalc);
|
|
32618
|
+
return function () {
|
|
32619
|
+
cancelAnimationFrame(raf1);
|
|
32620
|
+
cancelAnimationFrame(raf2);
|
|
32621
|
+
clearTimeout(t1);
|
|
32622
|
+
clearTimeout(t2);
|
|
32623
|
+
panelRef.current && panelRef.current.removeEventListener('transitionend', recalc);
|
|
32624
|
+
container.removeEventListener('scroll', recalc);
|
|
32625
|
+
window.removeEventListener('resize', recalc);
|
|
32626
|
+
};
|
|
32627
|
+
} else {
|
|
32628
|
+
container.addEventListener('scroll', recalc);
|
|
32629
|
+
window.addEventListener('resize', recalc);
|
|
32630
|
+
return function () {
|
|
32631
|
+
container.removeEventListener('scroll', recalc);
|
|
32632
|
+
window.removeEventListener('resize', recalc);
|
|
32633
|
+
};
|
|
32634
|
+
}
|
|
32635
|
+
}, [open, ready, message.id, panelHeightPx, isTransitioning, flipLocked, height]);
|
|
32636
|
+
React.useLayoutEffect(function () {
|
|
32637
|
+
var _rootRef$current2;
|
|
32638
|
+
var container = document.getElementById('scrollableDiv');
|
|
32639
|
+
var anchorEl = (_rootRef$current2 = rootRef.current) === null || _rootRef$current2 === void 0 ? void 0 : _rootRef$current2.parentElement;
|
|
32640
|
+
if (!container || !anchorEl || !ready) return;
|
|
32641
|
+
var containerRect = container.getBoundingClientRect();
|
|
32642
|
+
var anchorRect = anchorEl.getBoundingClientRect();
|
|
32643
|
+
var contentEl = contentRef.current;
|
|
32644
|
+
var tabsEl = tabsRef.current;
|
|
32645
|
+
var listEl = listRef.current;
|
|
32646
|
+
var cs = contentEl ? getComputedStyle(contentEl) : {};
|
|
32647
|
+
var padTop = parseFloat((cs === null || cs === void 0 ? void 0 : cs.paddingTop) || '0') || 0;
|
|
32648
|
+
var padBottom = parseFloat((cs === null || cs === void 0 ? void 0 : cs.paddingBottom) || '0') || 0;
|
|
32649
|
+
var contentPaddingY = padTop + padBottom;
|
|
32650
|
+
var tabsHeight = tabsEl ? tabsEl.getBoundingClientRect().height : 0;
|
|
32651
|
+
var tabsMarginBottom = 8;
|
|
32652
|
+
var listMarginTop = 8;
|
|
32653
|
+
var desiredListHeight = Math.min(listEl ? listEl.scrollHeight : 0, listMaxHeightPx);
|
|
32654
|
+
var desiredHeight = contentPaddingY + tabsHeight + tabsMarginBottom + listMarginTop + desiredListHeight;
|
|
32655
|
+
var maxPx = parseInt(String(height || '300'), 10);
|
|
32656
|
+
var measuredTarget = Math.min(desiredHeight || 0, isNaN(maxPx) ? 300 : Math.min(maxPx, desiredHeight));
|
|
32657
|
+
var nextHeight = Math.max(panelHeightPx || 0, measuredTarget);
|
|
32658
|
+
var availableBelow = containerRect.bottom - anchorRect.bottom - 8;
|
|
32659
|
+
var availableAbove = anchorRect.top - containerRect.top - 8;
|
|
32660
|
+
setFlipLocked(true);
|
|
32661
|
+
if (messagesMarkersLoadingState !== LOADING_STATE.LOADING) {
|
|
32662
|
+
var overflowBelow = nextHeight > availableBelow;
|
|
32663
|
+
var overflowAbove = nextHeight > availableAbove;
|
|
32664
|
+
setFlipAbove(function (prev) {
|
|
32665
|
+
if (prev) {
|
|
32666
|
+
if (overflowAbove && !overflowBelow) return false;
|
|
32667
|
+
return true;
|
|
32668
|
+
}
|
|
32669
|
+
if (overflowBelow && !overflowAbove) return true;
|
|
32670
|
+
return false;
|
|
32671
|
+
});
|
|
32672
|
+
}
|
|
32673
|
+
if (panelHeightPx !== nextHeight) {
|
|
32674
|
+
setIsTransitioning(true);
|
|
32675
|
+
setPanelHeightPx(nextHeight);
|
|
32676
|
+
}
|
|
32677
|
+
}, [ready, panelHeightPx, activeMarkers.length, messagesMarkersLoadingState, height]);
|
|
32678
|
+
React.useEffect(function () {
|
|
32679
|
+
if (messagesMarkersLoadingState === LOADING_STATE.LOADING) {
|
|
32680
|
+
setFlipLocked(true);
|
|
32681
|
+
}
|
|
32682
|
+
}, [messagesMarkersLoadingState]);
|
|
32683
|
+
React.useEffect(function () {
|
|
32684
|
+
var el = panelRef.current;
|
|
32685
|
+
if (!el) return;
|
|
32686
|
+
var onEnd = function onEnd(e) {
|
|
32687
|
+
if (e.propertyName === 'height') {
|
|
32688
|
+
setIsTransitioning(false);
|
|
32689
|
+
setTimeout(function () {
|
|
32690
|
+
setFlipLocked(false);
|
|
32691
|
+
}, 50);
|
|
32692
|
+
}
|
|
32693
|
+
};
|
|
32694
|
+
el.addEventListener('transitionend', onEnd);
|
|
32695
|
+
return function () {
|
|
32696
|
+
el.removeEventListener('transitionend', onEnd);
|
|
32697
|
+
};
|
|
32698
|
+
}, []);
|
|
32699
|
+
React.useEffect(function () {
|
|
32700
|
+
if (activeTab && message.id && message.channelId) {
|
|
32701
|
+
dispatch(getMessageMarkersAC(message.id, message.channelId, activeTab));
|
|
32702
|
+
}
|
|
32703
|
+
}, [activeTab, message.id, message.channelId]);
|
|
32704
|
+
return /*#__PURE__*/React__default.createElement(DropdownRoot, {
|
|
32705
|
+
ref: rootRef,
|
|
32706
|
+
rtl: message.incoming,
|
|
32707
|
+
backgroundColor: backgroundSections,
|
|
32708
|
+
flip: flipAbove,
|
|
32709
|
+
ready: ready
|
|
32710
|
+
}, /*#__PURE__*/React__default.createElement(Panel, {
|
|
32711
|
+
ref: panelRef,
|
|
32712
|
+
bg: backgroundSections,
|
|
32713
|
+
open: open,
|
|
32714
|
+
heightPx: panelHeightPx,
|
|
32715
|
+
maxHeight: height,
|
|
32716
|
+
maxWidth: maxWidth,
|
|
32717
|
+
minWidth: minWidth
|
|
32718
|
+
}, /*#__PURE__*/React__default.createElement(Content, {
|
|
32719
|
+
ref: contentRef
|
|
32720
|
+
}, /*#__PURE__*/React__default.createElement(Tabs, {
|
|
32721
|
+
ref: tabsRef
|
|
32722
|
+
}, tabItems.map(function (tab) {
|
|
32723
|
+
return /*#__PURE__*/React__default.createElement(Tab, {
|
|
32724
|
+
key: tab.key,
|
|
32725
|
+
active: activeTab === tab.key,
|
|
32726
|
+
activeColor: tabsStyles.activeColor || textOnPrimary,
|
|
32727
|
+
inactiveColor: tabsStyles.inactiveColor || textSecondary,
|
|
32728
|
+
onClick: function onClick() {
|
|
32729
|
+
return setActiveTab(tab.key);
|
|
32730
|
+
},
|
|
32731
|
+
textOnPrimary: textOnPrimary,
|
|
32732
|
+
textSecondary: textSecondary,
|
|
32733
|
+
background: activeTab === tab.key ? accentColor : 'transparent',
|
|
32734
|
+
borderColor: border
|
|
32735
|
+
}, tab.label, showCounts ? " (" + tab.data.length + ")" : '');
|
|
32736
|
+
})), /*#__PURE__*/React__default.createElement(List$1, {
|
|
32737
|
+
ref: listRef,
|
|
32738
|
+
maxHeight: listMaxHeightPx
|
|
32739
|
+
}, activeMarkers.map(function (marker) {
|
|
32740
|
+
var _marker$user2;
|
|
32741
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
32742
|
+
key: (((_marker$user2 = marker.user) === null || _marker$user2 === void 0 ? void 0 : _marker$user2.id) || 'deleted') + "-" + (marker.createdAt || '')
|
|
32743
|
+
}, renderRow(marker));
|
|
32744
|
+
}), !activeMarkers.length && messagesMarkersLoadingState !== LOADING_STATE.LOADING && (/*#__PURE__*/React__default.createElement(Empty, {
|
|
32745
|
+
color: textSecondary
|
|
32746
|
+
}, "No results"))))));
|
|
32747
|
+
};
|
|
32748
|
+
function sortByDateDesc(a, b) {
|
|
32749
|
+
var aDate = a.createdAt || a.createdAt;
|
|
32750
|
+
var bDate = b.createdAt || b.createdAt;
|
|
32751
|
+
var aTime = aDate ? new Date(aDate).getTime() : 0;
|
|
32752
|
+
var bTime = bDate ? new Date(bDate).getTime() : 0;
|
|
32753
|
+
return bTime - aTime;
|
|
32754
|
+
}
|
|
32755
|
+
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"])));
|
|
32756
|
+
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) {
|
|
32757
|
+
return p.active ? p.textOnPrimary : p.textSecondary;
|
|
32758
|
+
}, function (p) {
|
|
32759
|
+
return p.background;
|
|
32760
|
+
}, function (p) {
|
|
32761
|
+
return p.active ? p.background : p.borderColor;
|
|
32762
|
+
});
|
|
32763
|
+
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) {
|
|
32764
|
+
return p.maxHeight ? p.maxHeight + "px" : 'unset';
|
|
32765
|
+
});
|
|
32766
|
+
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) {
|
|
32767
|
+
return p.backgroundHover;
|
|
32768
|
+
});
|
|
32769
|
+
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"])));
|
|
32770
|
+
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) {
|
|
32771
|
+
return p.color;
|
|
32772
|
+
});
|
|
32773
|
+
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) {
|
|
32774
|
+
return p.color;
|
|
32775
|
+
});
|
|
32776
|
+
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) {
|
|
32777
|
+
return p.color;
|
|
32778
|
+
});
|
|
32779
|
+
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) {
|
|
32780
|
+
return p.flip ? 'auto' : 'calc(100% + 8px)';
|
|
32781
|
+
}, function (p) {
|
|
32782
|
+
return p.flip ? 'calc(100% + 8px)' : 'auto';
|
|
32783
|
+
}, function (p) {
|
|
32784
|
+
return p.rtl ? 'left: 4%;' : 'right: 4%;';
|
|
32785
|
+
}, function (_ref2) {
|
|
32786
|
+
var backgroundColor = _ref2.backgroundColor;
|
|
32787
|
+
return backgroundColor;
|
|
32788
|
+
}, function (p) {
|
|
32789
|
+
return p.ready ? 'visible' : 'hidden';
|
|
32790
|
+
});
|
|
32791
|
+
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) {
|
|
32792
|
+
return p.bg;
|
|
32793
|
+
}, function (p) {
|
|
32794
|
+
return p.open ? Math.min(p.heightPx || 0, parseInt(String(p.maxHeight || '300'), 10) || 300) + "px" : '0';
|
|
32795
|
+
}, function (p) {
|
|
32796
|
+
return p.maxWidth || '340px';
|
|
32797
|
+
}, function (p) {
|
|
32798
|
+
return p.minWidth || '340px';
|
|
32799
|
+
});
|
|
32800
|
+
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"])));
|
|
32801
|
+
|
|
32802
|
+
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
32803
|
var Message$1 = function Message(_ref) {
|
|
32084
32804
|
var message = _ref.message,
|
|
32085
32805
|
channel = _ref.channel,
|
|
@@ -32139,6 +32859,8 @@ var Message$1 = function Message(_ref) {
|
|
|
32139
32859
|
deleteMessage = _ref$deleteMessage === void 0 ? true : _ref$deleteMessage,
|
|
32140
32860
|
_ref$selectMessage = _ref.selectMessage,
|
|
32141
32861
|
selectMessage = _ref$selectMessage === void 0 ? true : _ref$selectMessage,
|
|
32862
|
+
_ref$showInfoMessage = _ref.showInfoMessage,
|
|
32863
|
+
showInfoMessage = _ref$showInfoMessage === void 0 ? true : _ref$showInfoMessage,
|
|
32142
32864
|
allowEditDeleteIncomingMessage = _ref.allowEditDeleteIncomingMessage,
|
|
32143
32865
|
_ref$forwardMessage = _ref.forwardMessage,
|
|
32144
32866
|
forwardMessage = _ref$forwardMessage === void 0 ? true : _ref$forwardMessage,
|
|
@@ -32167,6 +32889,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32167
32889
|
selectIconOrder = _ref.selectIconOrder,
|
|
32168
32890
|
starIconOrder = _ref.starIconOrder,
|
|
32169
32891
|
reportIconOrder = _ref.reportIconOrder,
|
|
32892
|
+
infoIconOrder = _ref.infoIconOrder,
|
|
32170
32893
|
reactionIconTooltipText = _ref.reactionIconTooltipText,
|
|
32171
32894
|
editIconTooltipText = _ref.editIconTooltipText,
|
|
32172
32895
|
copyIconTooltipText = _ref.copyIconTooltipText,
|
|
@@ -32177,6 +32900,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32177
32900
|
selectIconTooltipText = _ref.selectIconTooltipText,
|
|
32178
32901
|
starIconTooltipText = _ref.starIconTooltipText,
|
|
32179
32902
|
reportIconTooltipText = _ref.reportIconTooltipText,
|
|
32903
|
+
infoIconTooltipText = _ref.infoIconTooltipText,
|
|
32180
32904
|
messageActionIconsColor = _ref.messageActionIconsColor,
|
|
32181
32905
|
messageStatusSize = _ref.messageStatusSize,
|
|
32182
32906
|
messageStatusColor = _ref.messageStatusColor,
|
|
@@ -32228,7 +32952,9 @@ var Message$1 = function Message(_ref) {
|
|
|
32228
32952
|
messageTextFontSize = _ref.messageTextFontSize,
|
|
32229
32953
|
messageTextLineHeight = _ref.messageTextLineHeight,
|
|
32230
32954
|
messageTimeColorOnAttachment = _ref.messageTimeColorOnAttachment,
|
|
32231
|
-
shouldOpenUserProfileForMention = _ref.shouldOpenUserProfileForMention
|
|
32955
|
+
shouldOpenUserProfileForMention = _ref.shouldOpenUserProfileForMention,
|
|
32956
|
+
_ref$showInfoMessageP = _ref.showInfoMessageProps,
|
|
32957
|
+
showInfoMessageProps = _ref$showInfoMessageP === void 0 ? {} : _ref$showInfoMessageP;
|
|
32232
32958
|
var _useColor = useColors(),
|
|
32233
32959
|
accentColor = _useColor[THEME_COLORS.ACCENT],
|
|
32234
32960
|
backgroundSections = _useColor[THEME_COLORS.BACKGROUND_SECTIONS],
|
|
@@ -32250,29 +32976,32 @@ var Message$1 = function Message(_ref) {
|
|
|
32250
32976
|
reportPopupOpen = _useState3[0],
|
|
32251
32977
|
setReportPopupOpen = _useState3[1];
|
|
32252
32978
|
var _useState4 = React.useState(false),
|
|
32253
|
-
|
|
32254
|
-
|
|
32979
|
+
infoPopupOpen = _useState4[0],
|
|
32980
|
+
setInfoPopupOpen = _useState4[1];
|
|
32255
32981
|
var _useState5 = React.useState(false),
|
|
32256
|
-
|
|
32257
|
-
|
|
32982
|
+
messageActionsShow = _useState5[0],
|
|
32983
|
+
setMessageActionsShow = _useState5[1];
|
|
32258
32984
|
var _useState6 = React.useState(false),
|
|
32259
|
-
|
|
32260
|
-
|
|
32985
|
+
emojisPopupOpen = _useState6[0],
|
|
32986
|
+
setEmojisPopupOpen = _useState6[1];
|
|
32261
32987
|
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(
|
|
32988
|
+
frequentlyEmojisOpen = _useState7[0],
|
|
32989
|
+
setFrequentlyEmojisOpen = _useState7[1];
|
|
32990
|
+
var _useState8 = React.useState(false),
|
|
32991
|
+
reactionsPopupOpen = _useState8[0],
|
|
32992
|
+
setReactionsPopupOpen = _useState8[1];
|
|
32993
|
+
var _useState9 = React.useState(0),
|
|
32994
|
+
reactionsPopupPosition = _useState9[0],
|
|
32995
|
+
setReactionsPopupPosition = _useState9[1];
|
|
32996
|
+
var _useState0 = React.useState(''),
|
|
32997
|
+
emojisPopupPosition = _useState0[0],
|
|
32998
|
+
setEmojisPopupPosition = _useState0[1];
|
|
32999
|
+
var _useState1 = React.useState({
|
|
32271
33000
|
left: 0,
|
|
32272
33001
|
right: 0
|
|
32273
33002
|
}),
|
|
32274
|
-
reactionsPopupHorizontalPosition =
|
|
32275
|
-
setReactionsPopupHorizontalPosition =
|
|
33003
|
+
reactionsPopupHorizontalPosition = _useState1[0],
|
|
33004
|
+
setReactionsPopupHorizontalPosition = _useState1[1];
|
|
32276
33005
|
var scrollToNewMessage = useSelector(scrollToNewMessageSelector, reactRedux.shallowEqual);
|
|
32277
33006
|
var messageItemRef = React.useRef();
|
|
32278
33007
|
var isVisible = useOnScreen(messageItemRef);
|
|
@@ -32308,6 +33037,10 @@ var Message$1 = function Message(_ref) {
|
|
|
32308
33037
|
setMessageActionsShow(false);
|
|
32309
33038
|
stopScrolling(!forwardPopupOpen);
|
|
32310
33039
|
};
|
|
33040
|
+
var handleToggleInfoMessagePopupOpen = function handleToggleInfoMessagePopupOpen() {
|
|
33041
|
+
setInfoPopupOpen(!infoPopupOpen);
|
|
33042
|
+
setMessageActionsShow(false);
|
|
33043
|
+
};
|
|
32311
33044
|
var handleReplyMessage = function handleReplyMessage(threadReply) {
|
|
32312
33045
|
if (threadReply) ; else {
|
|
32313
33046
|
dispatch(setMessageForReplyAC(message));
|
|
@@ -32565,6 +33298,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32565
33298
|
emojisPopupPosition: emojisPopupPosition,
|
|
32566
33299
|
handleSetMessageForEdit: toggleEditMode,
|
|
32567
33300
|
handleResendMessage: handleResendMessage,
|
|
33301
|
+
handleOpenInfoMessage: handleToggleInfoMessagePopupOpen,
|
|
32568
33302
|
handleOpenDeleteMessage: handleToggleDeleteMessagePopup,
|
|
32569
33303
|
handleOpenForwardMessage: handleToggleForwardMessagePopup,
|
|
32570
33304
|
handleCopyMessage: handleCopyMessage,
|
|
@@ -32617,6 +33351,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32617
33351
|
replyMessageInThread: replyMessageInThread,
|
|
32618
33352
|
deleteMessage: deleteMessage,
|
|
32619
33353
|
selectMessage: selectMessage,
|
|
33354
|
+
showInfoMessage: showInfoMessage,
|
|
32620
33355
|
allowEditDeleteIncomingMessage: allowEditDeleteIncomingMessage,
|
|
32621
33356
|
forwardMessage: forwardMessage,
|
|
32622
33357
|
reportMessage: reportMessage,
|
|
@@ -32641,6 +33376,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32641
33376
|
selectIconOrder: selectIconOrder,
|
|
32642
33377
|
starIconOrder: starIconOrder,
|
|
32643
33378
|
reportIconOrder: reportIconOrder,
|
|
33379
|
+
infoIconOrder: infoIconOrder,
|
|
32644
33380
|
reactionIconTooltipText: reactionIconTooltipText,
|
|
32645
33381
|
editIconTooltipText: editIconTooltipText,
|
|
32646
33382
|
copyIconTooltipText: copyIconTooltipText,
|
|
@@ -32651,6 +33387,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32651
33387
|
selectIconTooltipText: selectIconTooltipText,
|
|
32652
33388
|
starIconTooltipText: starIconTooltipText,
|
|
32653
33389
|
reportIconTooltipText: reportIconTooltipText,
|
|
33390
|
+
infoIconTooltipText: infoIconTooltipText,
|
|
32654
33391
|
messageActionIconsColor: messageActionIconsColor,
|
|
32655
33392
|
messageStatusSize: messageStatusSize,
|
|
32656
33393
|
messageStatusColor: messageStatusColor,
|
|
@@ -32684,6 +33421,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32684
33421
|
setMessageActionsShow: setMessageActionsShow,
|
|
32685
33422
|
closeMessageActions: closeMessageActions,
|
|
32686
33423
|
handleToggleForwardMessagePopup: handleToggleForwardMessagePopup,
|
|
33424
|
+
handleToggleInfoMessagePopupOpen: handleToggleInfoMessagePopupOpen,
|
|
32687
33425
|
handleReplyMessage: handleReplyMessage,
|
|
32688
33426
|
handleToggleDeleteMessagePopup: handleToggleDeleteMessagePopup,
|
|
32689
33427
|
handleToggleReportPopupOpen: handleToggleReportPopupOpen,
|
|
@@ -32737,7 +33475,7 @@ var Message$1 = function Message(_ref) {
|
|
|
32737
33475
|
handleAddDeleteEmoji: handleReactionAddDelete,
|
|
32738
33476
|
reactionsDetailsPopupBorderRadius: reactionsDetailsPopupBorderRadius,
|
|
32739
33477
|
reactionsDetailsPopupHeaderItemsStyle: reactionsDetailsPopupHeaderItemsStyle
|
|
32740
|
-
})),
|
|
33478
|
+
})), /*#__PURE__*/React__default.createElement(ReactionsContainer, {
|
|
32741
33479
|
id: message.id + "_reactions_container",
|
|
32742
33480
|
border: reactionsContainerBorder,
|
|
32743
33481
|
boxShadow: reactionsContainerBoxShadow,
|
|
@@ -32745,8 +33483,9 @@ var Message$1 = function Message(_ref) {
|
|
|
32745
33483
|
topPosition: reactionsContainerTopPosition,
|
|
32746
33484
|
padding: reactionsContainerPadding,
|
|
32747
33485
|
backgroundColor: reactionsContainerBackground || backgroundSections,
|
|
32748
|
-
rtlDirection: ownMessageOnRightSide && !message.incoming
|
|
32749
|
-
|
|
33486
|
+
rtlDirection: ownMessageOnRightSide && !message.incoming,
|
|
33487
|
+
isReacted: message.reactionTotals && message.reactionTotals.length > 0
|
|
33488
|
+
}, message.reactionTotals && message.reactionTotals.length && (/*#__PURE__*/React__default.createElement(MessageReactionsCont, {
|
|
32750
33489
|
rtlDirection: ownMessageOnRightSide && !message.incoming,
|
|
32751
33490
|
onClick: handleToggleReactionsPopup
|
|
32752
33491
|
}, message.reactionTotals.slice(0, reactionsDisplayCount || 5).map(function (summery) {
|
|
@@ -32790,16 +33529,22 @@ var Message$1 = function Message(_ref) {
|
|
|
32790
33529
|
togglePopup: handleToggleForwardMessagePopup,
|
|
32791
33530
|
buttonText: 'Forward',
|
|
32792
33531
|
title: 'Forward message'
|
|
32793
|
-
}))
|
|
33532
|
+
})), infoPopupOpen && (/*#__PURE__*/React__default.createElement(MessageInfo, Object.assign({
|
|
33533
|
+
message: message,
|
|
33534
|
+
togglePopup: handleToggleInfoMessagePopupOpen
|
|
33535
|
+
}, showInfoMessageProps, {
|
|
33536
|
+
contacts: contactsMap,
|
|
33537
|
+
handleOpenUserProfile: handleOpenUserProfile
|
|
33538
|
+
}))));
|
|
32794
33539
|
};
|
|
32795
33540
|
var Message$2 = /*#__PURE__*/React__default.memo(Message$1, function (prevProps, nextProps) {
|
|
32796
33541
|
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
33542
|
});
|
|
32798
|
-
var MessageReactionKey = styled__default.span(_templateObject$
|
|
32799
|
-
var ReactionItemCount = styled__default.span(_templateObject2$
|
|
33543
|
+
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"])));
|
|
33544
|
+
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
33545
|
return props.color;
|
|
32801
33546
|
});
|
|
32802
|
-
var MessageReaction = styled__default.span(_templateObject3$
|
|
33547
|
+
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
33548
|
return props.margin || '0 8px 0 0';
|
|
32804
33549
|
}, function (props) {
|
|
32805
33550
|
return props.isLastReaction && '0';
|
|
@@ -32818,26 +33563,26 @@ var MessageReaction = styled__default.span(_templateObject3$r || (_templateObjec
|
|
|
32818
33563
|
}, function (props) {
|
|
32819
33564
|
return props.backgroundColor;
|
|
32820
33565
|
});
|
|
32821
|
-
var ThreadMessageCountContainer = styled__default.div(_templateObject4$
|
|
33566
|
+
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
33567
|
return props.color;
|
|
32823
33568
|
});
|
|
32824
|
-
var FailedMessageIcon = styled__default.div(_templateObject5$
|
|
33569
|
+
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
33570
|
return !props.rtl && '-24px';
|
|
32826
33571
|
}, function (props) {
|
|
32827
33572
|
return props.rtl && '-24px';
|
|
32828
33573
|
});
|
|
32829
|
-
var ErrorIconWrapper = styled__default(SvgErrorIcon)(_templateObject6$
|
|
32830
|
-
var SelectMessageWrapper = styled__default.div(_templateObject7$
|
|
33574
|
+
var ErrorIconWrapper = styled__default(SvgErrorIcon)(_templateObject6$h || (_templateObject6$h = _taggedTemplateLiteralLoose(["\n width: 20px;\n height: 20px;\n"])));
|
|
33575
|
+
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
33576
|
return !props.disabled && 'pointer';
|
|
32832
33577
|
}, function (props) {
|
|
32833
33578
|
return props.activeColor;
|
|
32834
33579
|
});
|
|
32835
|
-
var EmptySelection = styled__default.span(_templateObject8$
|
|
33580
|
+
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
33581
|
return props.borderColor;
|
|
32837
33582
|
}, function (props) {
|
|
32838
33583
|
return props.disabled && '0.5';
|
|
32839
33584
|
});
|
|
32840
|
-
var ReactionsContainer = styled__default.div(_templateObject9$
|
|
33585
|
+
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
33586
|
return props.rtlDirection && 'auto';
|
|
32842
33587
|
}, function (props) {
|
|
32843
33588
|
return !props.rtlDirection && 'auto';
|
|
@@ -32850,14 +33595,16 @@ var ReactionsContainer = styled__default.div(_templateObject9$b || (_templateObj
|
|
|
32850
33595
|
}, function (props) {
|
|
32851
33596
|
return props.backgroundColor;
|
|
32852
33597
|
}, function (props) {
|
|
32853
|
-
return props.padding || '4px 8px';
|
|
33598
|
+
return !props.isReacted ? '0' : props.padding || '4px 8px';
|
|
32854
33599
|
}, function (props) {
|
|
32855
33600
|
return props.topPosition && "\n position: relative;\n top: " + props.topPosition + ";\n ";
|
|
33601
|
+
}, function (props) {
|
|
33602
|
+
return props.isReacted ? '16px' : '0';
|
|
32856
33603
|
});
|
|
32857
|
-
var MessageReactionsCont = styled__default.div(_templateObject0$
|
|
33604
|
+
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
33605
|
return props.rtlDirection && 'ltr';
|
|
32859
33606
|
});
|
|
32860
|
-
var MessageStatus$1 = styled__default.span(_templateObject1$
|
|
33607
|
+
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
33608
|
return props.height || '14px';
|
|
32862
33609
|
});
|
|
32863
33610
|
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 +33649,7 @@ var HiddenMessageProperty;
|
|
|
32902
33649
|
HiddenMessageProperty["hideAfterSendMessage"] = "hideAfterSendMessage";
|
|
32903
33650
|
})(HiddenMessageProperty || (HiddenMessageProperty = {}));
|
|
32904
33651
|
|
|
32905
|
-
var _templateObject$
|
|
33652
|
+
var _templateObject$E, _templateObject2$z, _templateObject3$t, _templateObject4$p, _templateObject5$l, _templateObject6$i, _templateObject7$g, _templateObject8$f, _templateObject9$d, _templateObject0$c, _templateObject1$9;
|
|
32906
33653
|
var CreateMessageDateDivider = function CreateMessageDateDivider(_ref) {
|
|
32907
33654
|
var lastIndex = _ref.lastIndex,
|
|
32908
33655
|
currentMessageDate = _ref.currentMessageDate,
|
|
@@ -32979,6 +33726,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
32979
33726
|
forwardMessage = _ref2.forwardMessage,
|
|
32980
33727
|
deleteMessage = _ref2.deleteMessage,
|
|
32981
33728
|
selectMessage = _ref2.selectMessage,
|
|
33729
|
+
showInfoMessage = _ref2.showInfoMessage,
|
|
32982
33730
|
reportMessage = _ref2.reportMessage,
|
|
32983
33731
|
reactionIcon = _ref2.reactionIcon,
|
|
32984
33732
|
editIcon = _ref2.editIcon,
|
|
@@ -33025,6 +33773,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33025
33773
|
selectIconOrder = _ref2.selectIconOrder,
|
|
33026
33774
|
starIconOrder = _ref2.starIconOrder,
|
|
33027
33775
|
reportIconOrder = _ref2.reportIconOrder,
|
|
33776
|
+
infoIconOrder = _ref2.infoIconOrder,
|
|
33028
33777
|
reactionIconTooltipText = _ref2.reactionIconTooltipText,
|
|
33029
33778
|
editIconTooltipText = _ref2.editIconTooltipText,
|
|
33030
33779
|
copyIconTooltipText = _ref2.copyIconTooltipText,
|
|
@@ -33032,6 +33781,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33032
33781
|
replyInThreadIconTooltipText = _ref2.replyInThreadIconTooltipText,
|
|
33033
33782
|
forwardIconTooltipText = _ref2.forwardIconTooltipText,
|
|
33034
33783
|
deleteIconTooltipText = _ref2.deleteIconTooltipText,
|
|
33784
|
+
infoIconTooltipText = _ref2.infoIconTooltipText,
|
|
33035
33785
|
selectIconTooltipText = _ref2.selectIconTooltipText,
|
|
33036
33786
|
starIconTooltipText = _ref2.starIconTooltipText,
|
|
33037
33787
|
reportIconTooltipText = _ref2.reportIconTooltipText,
|
|
@@ -33084,7 +33834,9 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33084
33834
|
messageTimeColor = _ref2.messageTimeColor,
|
|
33085
33835
|
messageStatusAndTimeLineHeight = _ref2.messageStatusAndTimeLineHeight,
|
|
33086
33836
|
hiddenMessagesProperties = _ref2.hiddenMessagesProperties,
|
|
33087
|
-
shouldOpenUserProfileForMention = _ref2.shouldOpenUserProfileForMention
|
|
33837
|
+
shouldOpenUserProfileForMention = _ref2.shouldOpenUserProfileForMention,
|
|
33838
|
+
_ref2$showInfoMessage = _ref2.showInfoMessageProps,
|
|
33839
|
+
showInfoMessageProps = _ref2$showInfoMessage === void 0 ? {} : _ref2$showInfoMessage;
|
|
33088
33840
|
var _useColor = useColors(),
|
|
33089
33841
|
outgoingMessageBackground = _useColor[THEME_COLORS.OUTGOING_MESSAGE_BACKGROUND],
|
|
33090
33842
|
themeBackgroundColor = _useColor[THEME_COLORS.BACKGROUND],
|
|
@@ -33174,7 +33926,14 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33174
33926
|
var text = '';
|
|
33175
33927
|
for (var i = dateLabels.length - 1; i >= 0; i--) {
|
|
33176
33928
|
var dateLabel = dateLabels[i];
|
|
33177
|
-
|
|
33929
|
+
var aroundThreshold = 40;
|
|
33930
|
+
var labelTop = dateLabel.offsetTop - 28;
|
|
33931
|
+
var labelBottom = labelTop + (dateLabel.offsetHeight || 0) - 28;
|
|
33932
|
+
if (container.scrollTop >= labelTop - aroundThreshold && container.scrollTop <= labelBottom + aroundThreshold) {
|
|
33933
|
+
setShowTopDate(false);
|
|
33934
|
+
break;
|
|
33935
|
+
}
|
|
33936
|
+
if (!text && container.scrollTop > labelTop - 28) {
|
|
33178
33937
|
var span = (dateLabel === null || dateLabel === void 0 ? void 0 : dateLabel.firstChild) && dateLabel.firstChild.firstChild;
|
|
33179
33938
|
text = span ? span.innerText || '' : '';
|
|
33180
33939
|
setTopDateLabel(text);
|
|
@@ -33196,9 +33955,6 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33196
33955
|
}
|
|
33197
33956
|
setShowTopDate(true);
|
|
33198
33957
|
clearTimeout(hideTopDateTimeout.current);
|
|
33199
|
-
hideTopDateTimeout.current = setTimeout(function () {
|
|
33200
|
-
setShowTopDate(false);
|
|
33201
|
-
}, 1000);
|
|
33202
33958
|
renderTopDate();
|
|
33203
33959
|
var forceLoadPrevMessages = false;
|
|
33204
33960
|
if (-target.scrollTop + target.offsetHeight + 30 > target.scrollHeight) {
|
|
@@ -33823,6 +34579,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33823
34579
|
replyMessageInThread: replyMessageInThread,
|
|
33824
34580
|
deleteMessage: deleteMessage,
|
|
33825
34581
|
selectMessage: selectMessage,
|
|
34582
|
+
showInfoMessage: showInfoMessage,
|
|
33826
34583
|
allowEditDeleteIncomingMessage: allowEditDeleteIncomingMessage,
|
|
33827
34584
|
reportMessage: reportMessage,
|
|
33828
34585
|
reactionIcon: reactionIcon,
|
|
@@ -33848,6 +34605,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33848
34605
|
replyInThreadIconOrder: replyInThreadIconOrder,
|
|
33849
34606
|
forwardIconOrder: forwardIconOrder,
|
|
33850
34607
|
deleteIconOrder: deleteIconOrder,
|
|
34608
|
+
infoIconOrder: infoIconOrder,
|
|
33851
34609
|
selectIconOrder: selectIconOrder,
|
|
33852
34610
|
starIconOrder: starIconOrder,
|
|
33853
34611
|
reportIconOrder: reportIconOrder,
|
|
@@ -33858,6 +34616,7 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33858
34616
|
replyInThreadIconTooltipText: replyInThreadIconTooltipText,
|
|
33859
34617
|
forwardIconTooltipText: forwardIconTooltipText,
|
|
33860
34618
|
deleteIconTooltipText: deleteIconTooltipText,
|
|
34619
|
+
infoIconTooltipText: infoIconTooltipText,
|
|
33861
34620
|
selectIconTooltipText: selectIconTooltipText,
|
|
33862
34621
|
starIconTooltipText: starIconTooltipText,
|
|
33863
34622
|
reportIconTooltipText: reportIconTooltipText,
|
|
@@ -33907,7 +34666,8 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33907
34666
|
messageTimeFontSize: messageTimeFontSize,
|
|
33908
34667
|
messageTimeColor: messageTimeColor,
|
|
33909
34668
|
messageStatusAndTimeLineHeight: messageStatusAndTimeLineHeight,
|
|
33910
|
-
shouldOpenUserProfileForMention: shouldOpenUserProfileForMention
|
|
34669
|
+
shouldOpenUserProfileForMention: shouldOpenUserProfileForMention,
|
|
34670
|
+
showInfoMessageProps: showInfoMessageProps
|
|
33911
34671
|
}))), isUnreadMessage ? (/*#__PURE__*/React__default.createElement(MessageDivider, {
|
|
33912
34672
|
theme: theme,
|
|
33913
34673
|
newMessagesSeparatorTextColor: newMessagesSeparatorTextColor,
|
|
@@ -33937,14 +34697,14 @@ var MessageList = function MessageList(_ref2) {
|
|
|
33937
34697
|
attachmentsPreview: attachmentsPreview
|
|
33938
34698
|
})))));
|
|
33939
34699
|
};
|
|
33940
|
-
var Container$h = styled__default.div(_templateObject$
|
|
34700
|
+
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
34701
|
return props.backgroundColor;
|
|
33942
34702
|
}, function (props) {
|
|
33943
34703
|
return props.thumbColor;
|
|
33944
34704
|
});
|
|
33945
|
-
var EmptyDiv = styled__default.div(_templateObject2$
|
|
33946
|
-
var MessagesBox = styled__default.div(_templateObject3$
|
|
33947
|
-
var MessageTopDate = styled__default.div(_templateObject4$
|
|
34705
|
+
var EmptyDiv = styled__default.div(_templateObject2$z || (_templateObject2$z = _taggedTemplateLiteralLoose(["\n height: 300px;\n"])));
|
|
34706
|
+
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"])));
|
|
34707
|
+
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
34708
|
return props.topOffset ? props.topOffset + 22 + "px" : '22px';
|
|
33949
34709
|
}, function (props) {
|
|
33950
34710
|
return props.marginTop;
|
|
@@ -33963,19 +34723,19 @@ var MessageTopDate = styled__default.div(_templateObject4$o || (_templateObject4
|
|
|
33963
34723
|
}, function (props) {
|
|
33964
34724
|
return props.dateDividerBorderRadius || '14px';
|
|
33965
34725
|
});
|
|
33966
|
-
var DragAndDropContainer = styled__default.div(_templateObject5$
|
|
34726
|
+
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
34727
|
return props.topOffset ? props.topOffset + 2 + "px" : 0;
|
|
33968
34728
|
}, function (props) {
|
|
33969
34729
|
return props.height ? props.height + 30 + "px" : '100%';
|
|
33970
34730
|
}, function (props) {
|
|
33971
34731
|
return props.backgroundColor;
|
|
33972
34732
|
});
|
|
33973
|
-
var IconWrapper$1 = styled__default.span(_templateObject6$
|
|
34733
|
+
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
34734
|
return props.backgroundColor;
|
|
33975
34735
|
}, function (props) {
|
|
33976
34736
|
return props.iconColor;
|
|
33977
34737
|
});
|
|
33978
|
-
var DropAttachmentArea = styled__default.div(_templateObject7$
|
|
34738
|
+
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
34739
|
return props.borderColor;
|
|
33980
34740
|
}, function (props) {
|
|
33981
34741
|
return props.margin || '12px 32px 32px';
|
|
@@ -33988,16 +34748,16 @@ var DropAttachmentArea = styled__default.div(_templateObject7$f || (_templateObj
|
|
|
33988
34748
|
}, IconWrapper$1, function (props) {
|
|
33989
34749
|
return props.iconBackgroundColor;
|
|
33990
34750
|
});
|
|
33991
|
-
var MessageWrapper = styled__default.div(_templateObject8$
|
|
34751
|
+
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
34752
|
return props.highlightBg || '#d5d5d5';
|
|
33993
34753
|
});
|
|
33994
|
-
var NoMessagesContainer = styled__default.div(_templateObject9$
|
|
34754
|
+
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
34755
|
return props.color;
|
|
33996
34756
|
});
|
|
33997
|
-
var NoMessagesTitle = styled__default.h4(_templateObject0$
|
|
34757
|
+
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
34758
|
return props.color;
|
|
33999
34759
|
});
|
|
34000
|
-
var NoMessagesText = styled__default.p(_templateObject1$
|
|
34760
|
+
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
34761
|
return props.color;
|
|
34002
34762
|
});
|
|
34003
34763
|
|
|
@@ -34037,6 +34797,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34037
34797
|
forwardMessage = _ref.forwardMessage,
|
|
34038
34798
|
deleteMessage = _ref.deleteMessage,
|
|
34039
34799
|
selectMessage = _ref.selectMessage,
|
|
34800
|
+
showInfoMessage = _ref.showInfoMessage,
|
|
34040
34801
|
reportMessage = _ref.reportMessage,
|
|
34041
34802
|
reactionIcon = _ref.reactionIcon,
|
|
34042
34803
|
editIcon = _ref.editIcon,
|
|
@@ -34083,6 +34844,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34083
34844
|
selectIconOrder = _ref.selectIconOrder,
|
|
34084
34845
|
starIconOrder = _ref.starIconOrder,
|
|
34085
34846
|
reportIconOrder = _ref.reportIconOrder,
|
|
34847
|
+
infoIconOrder = _ref.infoIconOrder,
|
|
34086
34848
|
reactionIconTooltipText = _ref.reactionIconTooltipText,
|
|
34087
34849
|
editIconTooltipText = _ref.editIconTooltipText,
|
|
34088
34850
|
copyIconTooltipText = _ref.copyIconTooltipText,
|
|
@@ -34093,6 +34855,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34093
34855
|
selectIconTooltipText = _ref.selectIconTooltipText,
|
|
34094
34856
|
starIconTooltipText = _ref.starIconTooltipText,
|
|
34095
34857
|
reportIconTooltipText = _ref.reportIconTooltipText,
|
|
34858
|
+
infoIconTooltipText = _ref.infoIconTooltipText,
|
|
34096
34859
|
messageActionIconsColor = _ref.messageActionIconsColor,
|
|
34097
34860
|
dateDividerFontSize = _ref.dateDividerFontSize,
|
|
34098
34861
|
dateDividerTextColor = _ref.dateDividerTextColor,
|
|
@@ -34143,7 +34906,9 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34143
34906
|
messageStatusAndTimeLineHeight = _ref.messageStatusAndTimeLineHeight,
|
|
34144
34907
|
_ref$hiddenMessagesPr = _ref.hiddenMessagesProperties,
|
|
34145
34908
|
hiddenMessagesProperties = _ref$hiddenMessagesPr === void 0 ? [] : _ref$hiddenMessagesPr,
|
|
34146
|
-
shouldOpenUserProfileForMention = _ref.shouldOpenUserProfileForMention
|
|
34909
|
+
shouldOpenUserProfileForMention = _ref.shouldOpenUserProfileForMention,
|
|
34910
|
+
_ref$showInfoMessageP = _ref.showInfoMessageProps,
|
|
34911
|
+
showInfoMessageProps = _ref$showInfoMessageP === void 0 ? {} : _ref$showInfoMessageP;
|
|
34147
34912
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(MessageList, {
|
|
34148
34913
|
fontFamily: fontFamily,
|
|
34149
34914
|
ownMessageOnRightSide: ownMessageOnRightSide,
|
|
@@ -34174,6 +34939,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34174
34939
|
forwardMessage: forwardMessage,
|
|
34175
34940
|
deleteMessage: deleteMessage,
|
|
34176
34941
|
selectMessage: selectMessage,
|
|
34942
|
+
showInfoMessage: showInfoMessage,
|
|
34177
34943
|
reportMessage: reportMessage,
|
|
34178
34944
|
reactionIcon: reactionIcon,
|
|
34179
34945
|
editIcon: editIcon,
|
|
@@ -34216,6 +34982,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34216
34982
|
forwardIconOrder: forwardIconOrder,
|
|
34217
34983
|
deleteIconOrder: deleteIconOrder,
|
|
34218
34984
|
selectIconOrder: selectIconOrder,
|
|
34985
|
+
infoIconOrder: infoIconOrder,
|
|
34219
34986
|
starIconOrder: starIconOrder,
|
|
34220
34987
|
reportIconOrder: reportIconOrder,
|
|
34221
34988
|
reactionIconTooltipText: reactionIconTooltipText,
|
|
@@ -34228,6 +34995,7 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34228
34995
|
selectIconTooltipText: selectIconTooltipText,
|
|
34229
34996
|
starIconTooltipText: starIconTooltipText,
|
|
34230
34997
|
reportIconTooltipText: reportIconTooltipText,
|
|
34998
|
+
infoIconTooltipText: infoIconTooltipText,
|
|
34231
34999
|
messageActionIconsColor: messageActionIconsColor,
|
|
34232
35000
|
dateDividerFontSize: dateDividerFontSize,
|
|
34233
35001
|
dateDividerTextColor: dateDividerTextColor,
|
|
@@ -34270,7 +35038,8 @@ var MessagesContainer = function MessagesContainer(_ref) {
|
|
|
34270
35038
|
messageTimeColor: messageTimeColor,
|
|
34271
35039
|
messageStatusAndTimeLineHeight: messageStatusAndTimeLineHeight,
|
|
34272
35040
|
hiddenMessagesProperties: hiddenMessagesProperties,
|
|
34273
|
-
shouldOpenUserProfileForMention: shouldOpenUserProfileForMention
|
|
35041
|
+
shouldOpenUserProfileForMention: shouldOpenUserProfileForMention,
|
|
35042
|
+
showInfoMessageProps: showInfoMessageProps
|
|
34274
35043
|
}));
|
|
34275
35044
|
};
|
|
34276
35045
|
|
|
@@ -34382,7 +35151,7 @@ function $isMentionNode(node) {
|
|
|
34382
35151
|
return node instanceof MentionNode;
|
|
34383
35152
|
}
|
|
34384
35153
|
|
|
34385
|
-
var _templateObject$
|
|
35154
|
+
var _templateObject$F, _templateObject2$A, _templateObject3$u, _templateObject4$q, _templateObject5$m;
|
|
34386
35155
|
var PUNCTUATION = '\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%\'"~=<>_:;';
|
|
34387
35156
|
var NAME = '\\b[A-Z][^\\s' + PUNCTUATION + ']';
|
|
34388
35157
|
var DocumentMentionsRegex = {
|
|
@@ -34662,8 +35431,8 @@ function MentionsPlugin(_ref3) {
|
|
|
34662
35431
|
}
|
|
34663
35432
|
});
|
|
34664
35433
|
}
|
|
34665
|
-
var MentionsContainerWrapper = styled__default.div(_templateObject$
|
|
34666
|
-
var MentionsList = styled__default.ul(_templateObject2$
|
|
35434
|
+
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"])));
|
|
35435
|
+
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
35436
|
return props.backgroundColor;
|
|
34668
35437
|
}, function (props) {
|
|
34669
35438
|
return props.withBorder && "1px solid " + props.borderColor;
|
|
@@ -34672,11 +35441,11 @@ var MentionsList = styled__default.ul(_templateObject2$z || (_templateObject2$z
|
|
|
34672
35441
|
}, function (props) {
|
|
34673
35442
|
return props.hidden ? 'hidden' : 'visible';
|
|
34674
35443
|
});
|
|
34675
|
-
var MemberItem = styled__default.li(_templateObject3$
|
|
35444
|
+
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
35445
|
return props.isActiveItem && props.activeBackgroundColor;
|
|
34677
35446
|
}, UserStatus);
|
|
34678
|
-
var UserNamePresence$2 = styled__default.div(_templateObject4$
|
|
34679
|
-
var MemberName$2 = styled__default.h3(_templateObject5$
|
|
35447
|
+
var UserNamePresence$2 = styled__default.div(_templateObject4$q || (_templateObject4$q = _taggedTemplateLiteralLoose(["\n width: calc(100% - 44px);\n margin-left: 12px;\n"])));
|
|
35448
|
+
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
35449
|
return props.color;
|
|
34681
35450
|
});
|
|
34682
35451
|
|
|
@@ -34809,7 +35578,7 @@ function SvgUnderline(props) {
|
|
|
34809
35578
|
}))));
|
|
34810
35579
|
}
|
|
34811
35580
|
|
|
34812
|
-
var _templateObject$
|
|
35581
|
+
var _templateObject$G, _templateObject2$B;
|
|
34813
35582
|
function mergeRegister() {
|
|
34814
35583
|
for (var _len = arguments.length, func = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34815
35584
|
func[_key] = arguments[_key];
|
|
@@ -35190,10 +35959,10 @@ function FloatingTextFormatToolbarPlugin(_ref3) {
|
|
|
35190
35959
|
editor = _useLexicalComposerCo[0];
|
|
35191
35960
|
return useFloatingTextFormatToolbar(editor, anchorElem);
|
|
35192
35961
|
}
|
|
35193
|
-
var FloatingTextFormatPopup = styled__default.div(_templateObject$
|
|
35962
|
+
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
35963
|
return props.popupColor;
|
|
35195
35964
|
});
|
|
35196
|
-
var Action$1 = styled__default.button(_templateObject2$
|
|
35965
|
+
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
35966
|
return props.iconColor;
|
|
35198
35967
|
}, function (props) {
|
|
35199
35968
|
return props.isActive && "\n color: " + props.hoverIconColor + ";\n background-color: " + props.hoverBackgroundColor + ";\n ";
|
|
@@ -35516,7 +36285,7 @@ function FormatMessagePlugin(_ref) {
|
|
|
35516
36285
|
return null;
|
|
35517
36286
|
}
|
|
35518
36287
|
|
|
35519
|
-
var _templateObject$
|
|
36288
|
+
var _templateObject$H, _templateObject2$C, _templateObject3$v, _templateObject4$r, _templateObject5$n, _templateObject6$j, _templateObject7$h, _templateObject8$g;
|
|
35520
36289
|
var EmojiIcon$1 = function EmojiIcon(_ref) {
|
|
35521
36290
|
var collectionName = _ref.collectionName;
|
|
35522
36291
|
switch (collectionName) {
|
|
@@ -35711,7 +36480,7 @@ function EmojisPopup$1(_ref2) {
|
|
|
35711
36480
|
}));
|
|
35712
36481
|
}))));
|
|
35713
36482
|
}
|
|
35714
|
-
var Container$i = styled__default.div(_templateObject$
|
|
36483
|
+
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
36484
|
return props.leftPosition ? 'fixed' : props.relativePosition ? 'relative' : 'absolute';
|
|
35716
36485
|
}, function (props) {
|
|
35717
36486
|
return props.rightSide ? "calc(" + props.leftPosition + " - 250px)" : props.leftPosition || (props.rtlDirection ? '' : props.rightSide ? '' : '5px');
|
|
@@ -35732,23 +36501,23 @@ var Container$i = styled__default.div(_templateObject$G || (_templateObject$G =
|
|
|
35732
36501
|
}, function (props) {
|
|
35733
36502
|
return props.rendered && "\n height: 225px;\n ";
|
|
35734
36503
|
});
|
|
35735
|
-
var EmojiHeader$1 = styled__default.div(_templateObject2$
|
|
36504
|
+
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
36505
|
return props.color;
|
|
35737
36506
|
}, function (props) {
|
|
35738
36507
|
return props.padding || '6px 18px';
|
|
35739
36508
|
});
|
|
35740
|
-
var EmojiSection$1 = styled__default.div(_templateObject3$
|
|
35741
|
-
var EmojiCollection$1 = styled__default.span(_templateObject4$
|
|
36509
|
+
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"])));
|
|
36510
|
+
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
36511
|
return props.iconColor;
|
|
35743
36512
|
});
|
|
35744
|
-
var CollectionPointer$1 = styled__default.span(_templateObject5$
|
|
35745
|
-
var AllEmojis$1 = styled__default.ul(_templateObject6$
|
|
35746
|
-
var EmojiFooter$1 = styled__default.div(_templateObject7$
|
|
36513
|
+
var CollectionPointer$1 = styled__default.span(_templateObject5$n || (_templateObject5$n = _taggedTemplateLiteralLoose([""])));
|
|
36514
|
+
var AllEmojis$1 = styled__default.ul(_templateObject6$j || (_templateObject6$j = _taggedTemplateLiteralLoose(["\n overflow: hidden;\n padding: 0 8px 8px;\n margin: 0;\n"])));
|
|
36515
|
+
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
36516
|
return props.emojisCategoryIconsPosition !== 'top' && "1px solid " + props.borderColor;
|
|
35748
36517
|
}, function (props) {
|
|
35749
36518
|
return props.emojisCategoryIconsPosition === 'top' && "1px solid " + props.borderColor;
|
|
35750
36519
|
});
|
|
35751
|
-
var Emoji$1 = styled__default.li(_templateObject8$
|
|
36520
|
+
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
36521
|
return props.hoverBackgroundColor;
|
|
35753
36522
|
});
|
|
35754
36523
|
|
|
@@ -35949,7 +36718,7 @@ function SvgRecordButton(props) {
|
|
|
35949
36718
|
})));
|
|
35950
36719
|
}
|
|
35951
36720
|
|
|
35952
|
-
var _templateObject$
|
|
36721
|
+
var _templateObject$I, _templateObject2$D, _templateObject3$w, _templateObject4$s, _templateObject5$o, _templateObject6$k, _templateObject7$i;
|
|
35953
36722
|
var shouldDraw = false;
|
|
35954
36723
|
var AudioRecord = function AudioRecord(_ref) {
|
|
35955
36724
|
var sendRecordedFile = _ref.sendRecordedFile,
|
|
@@ -36145,7 +36914,6 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
36145
36914
|
handleStopRecording();
|
|
36146
36915
|
if (currentRecordedFile) {
|
|
36147
36916
|
var _wavesurfer$current2;
|
|
36148
|
-
removeAudioRecordingFromMap(currentChannelId);
|
|
36149
36917
|
dispatch(setChannelDraftMessageIsRemovedAC(currentChannelId));
|
|
36150
36918
|
setRecordedFile(null);
|
|
36151
36919
|
setPlayAudio(false);
|
|
@@ -36154,8 +36922,9 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
36154
36922
|
}
|
|
36155
36923
|
} else {
|
|
36156
36924
|
shouldDraw = false;
|
|
36157
|
-
recorder.stop();
|
|
36925
|
+
recorder === null || recorder === void 0 ? void 0 : recorder.stop();
|
|
36158
36926
|
}
|
|
36927
|
+
removeAudioRecordingFromMap(currentChannelId);
|
|
36159
36928
|
setRecordingIsReadyToPlay(false);
|
|
36160
36929
|
setStartRecording(false);
|
|
36161
36930
|
setCurrentTime(0);
|
|
@@ -36412,29 +37181,20 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
36412
37181
|
}, [currentRecordedFile, currentChannelId]);
|
|
36413
37182
|
React.useEffect(function () {
|
|
36414
37183
|
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);
|
|
37184
|
+
try {
|
|
37185
|
+
if (!recorder) {
|
|
37186
|
+
try {
|
|
37187
|
+
var newRecorder = new MicRecorder({
|
|
37188
|
+
bitRate: 128
|
|
37189
|
+
});
|
|
37190
|
+
setRecorder(newRecorder);
|
|
37191
|
+
} catch (e) {
|
|
37192
|
+
log.error('Failed to init mic-recorder-to-mp3', e);
|
|
37193
|
+
}
|
|
36436
37194
|
}
|
|
36437
|
-
}
|
|
37195
|
+
} catch (e) {
|
|
37196
|
+
Promise.reject(e);
|
|
37197
|
+
}
|
|
36438
37198
|
}
|
|
36439
37199
|
}, [currentRecordedFile]);
|
|
36440
37200
|
React.useEffect(function () {
|
|
@@ -36513,10 +37273,10 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
36513
37273
|
iconColor: accentColor
|
|
36514
37274
|
}, showRecording || currentRecordedFile ? /*#__PURE__*/React__default.createElement(SvgSend, null) : /*#__PURE__*/React__default.createElement(SvgRecordButton, null)));
|
|
36515
37275
|
};
|
|
36516
|
-
var Container$j = styled__default.div(_templateObject$
|
|
37276
|
+
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
37277
|
return props.recording && "width: 400px";
|
|
36518
37278
|
});
|
|
36519
|
-
var AudioWrapper = styled__default.div(_templateObject2$
|
|
37279
|
+
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
37280
|
return props.recording ? 'calc(100% - 84px)' : '0';
|
|
36521
37281
|
}, function (props) {
|
|
36522
37282
|
return props.recording ? '0 8px' : '0';
|
|
@@ -36525,10 +37285,10 @@ var AudioWrapper = styled__default.div(_templateObject2$C || (_templateObject2$C
|
|
|
36525
37285
|
}, function (props) {
|
|
36526
37286
|
return props.recording ? '0 12px 0 0' : '0';
|
|
36527
37287
|
});
|
|
36528
|
-
var RecordIconWrapper = styled__default.span(_templateObject3$
|
|
37288
|
+
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
37289
|
return props.iconColor;
|
|
36530
37290
|
});
|
|
36531
|
-
var AudioVisualization$1 = styled__default.div(_templateObject4$
|
|
37291
|
+
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
37292
|
var show = _ref5.show;
|
|
36533
37293
|
return show ? '1' : '0';
|
|
36534
37294
|
}, function (_ref6) {
|
|
@@ -36540,10 +37300,10 @@ var AudioVisualization$1 = styled__default.div(_templateObject4$r || (_templateO
|
|
|
36540
37300
|
}, function (props) {
|
|
36541
37301
|
return props.color;
|
|
36542
37302
|
});
|
|
36543
|
-
var PlayPause$1 = styled__default.div(_templateObject5$
|
|
37303
|
+
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
37304
|
return props.iconColor;
|
|
36545
37305
|
});
|
|
36546
|
-
var Canvas = styled__default.canvas(_templateObject6$
|
|
37306
|
+
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
37307
|
var recording = _ref8.recording;
|
|
36548
37308
|
return recording ? '300px' : '0';
|
|
36549
37309
|
}, function (_ref9) {
|
|
@@ -36553,14 +37313,14 @@ var Canvas = styled__default.canvas(_templateObject6$j || (_templateObject6$j =
|
|
|
36553
37313
|
var hide = _ref0.hide;
|
|
36554
37314
|
return hide && '-1';
|
|
36555
37315
|
});
|
|
36556
|
-
var Timer$2 = styled__default.div(_templateObject7$
|
|
37316
|
+
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
37317
|
return props.color;
|
|
36558
37318
|
});
|
|
36559
37319
|
|
|
36560
|
-
var _templateObject$
|
|
36561
|
-
var wave = styled.keyframes(_templateObject$
|
|
36562
|
-
var Wrapper = styled__default.div(_templateObject2$
|
|
36563
|
-
var Bar = styled__default.span(_templateObject3$
|
|
37320
|
+
var _templateObject$J, _templateObject2$E, _templateObject3$x;
|
|
37321
|
+
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"])));
|
|
37322
|
+
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"])));
|
|
37323
|
+
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
37324
|
return props.borderColor;
|
|
36565
37325
|
}, wave, function (_ref) {
|
|
36566
37326
|
var delay = _ref.delay;
|
|
@@ -36586,7 +37346,7 @@ var RecordingAnimation = function RecordingAnimation(_ref2) {
|
|
|
36586
37346
|
}));
|
|
36587
37347
|
};
|
|
36588
37348
|
|
|
36589
|
-
var _templateObject$
|
|
37349
|
+
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
37350
|
function AutoFocusPlugin(_ref) {
|
|
36591
37351
|
var messageForReply = _ref.messageForReply;
|
|
36592
37352
|
var _useLexicalComposerCo = LexicalComposerContext.useLexicalComposerContext(),
|
|
@@ -36795,8 +37555,8 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
36795
37555
|
messageBodyAttributes = _useState11[0],
|
|
36796
37556
|
setMessageBodyAttributes = _useState11[1];
|
|
36797
37557
|
var _useState12 = React.useState([]),
|
|
36798
|
-
|
|
36799
|
-
|
|
37558
|
+
mentionedUsers = _useState12[0],
|
|
37559
|
+
setMentionedUsers = _useState12[1];
|
|
36800
37560
|
var _useState13 = React.useState(''),
|
|
36801
37561
|
browser = _useState13[0],
|
|
36802
37562
|
setBrowser = _useState13[1];
|
|
@@ -36922,21 +37682,21 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
36922
37682
|
var messageToSend = {
|
|
36923
37683
|
body: messageTexToSend,
|
|
36924
37684
|
bodyAttributes: messageBodyAttributes,
|
|
36925
|
-
|
|
37685
|
+
mentionedUsers: [],
|
|
36926
37686
|
attachments: [],
|
|
36927
37687
|
type: 'text'
|
|
36928
37688
|
};
|
|
36929
|
-
var
|
|
37689
|
+
var mentionUsersToSend = [];
|
|
36930
37690
|
if (messageBodyAttributes && messageBodyAttributes.length) {
|
|
36931
37691
|
messageBodyAttributes.forEach(function (att) {
|
|
36932
37692
|
if (att.type === 'mention') {
|
|
36933
|
-
|
|
37693
|
+
mentionUsersToSend.push({
|
|
36934
37694
|
id: att.metadata
|
|
36935
37695
|
});
|
|
36936
37696
|
}
|
|
36937
37697
|
});
|
|
36938
37698
|
}
|
|
36939
|
-
messageToSend.
|
|
37699
|
+
messageToSend.mentionedUsers = mentionUsersToSend;
|
|
36940
37700
|
log.info('message to send ..........................................', JSON.stringify(messageToSend));
|
|
36941
37701
|
if (messageForReply) {
|
|
36942
37702
|
messageToSend.parentMessage = messageForReply;
|
|
@@ -36996,7 +37756,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
36996
37756
|
setShouldClearEditor({
|
|
36997
37757
|
clear: true
|
|
36998
37758
|
});
|
|
36999
|
-
|
|
37759
|
+
setMentionedUsers([]);
|
|
37000
37760
|
setMessageBodyAttributes([]);
|
|
37001
37761
|
dispatch(setCloseSearchChannelsAC(true));
|
|
37002
37762
|
} else {
|
|
@@ -37028,21 +37788,21 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37028
37788
|
};
|
|
37029
37789
|
}
|
|
37030
37790
|
}
|
|
37031
|
-
var
|
|
37032
|
-
var
|
|
37033
|
-
if (
|
|
37791
|
+
var mentionedUsersPositions = [];
|
|
37792
|
+
var mentionUsersToSend = [];
|
|
37793
|
+
if (mentionedUsers && mentionedUsers.length) {
|
|
37034
37794
|
if (messageBodyAttributes && messageBodyAttributes.length) {
|
|
37035
37795
|
messageBodyAttributes.forEach(function (att) {
|
|
37036
37796
|
if (att.type === 'mention') {
|
|
37037
|
-
var mentionsToFind = [].concat(
|
|
37797
|
+
var mentionsToFind = [].concat(mentionedUsers);
|
|
37038
37798
|
var draftMessage = getDraftMessageFromMap(activeChannel.id);
|
|
37039
37799
|
if (draftMessage) {
|
|
37040
|
-
mentionsToFind = [].concat(draftMessage.
|
|
37800
|
+
mentionsToFind = [].concat(draftMessage.mentionedUsers, mentionedUsers);
|
|
37041
37801
|
}
|
|
37042
37802
|
var mentionToAdd = mentionsToFind.find(function (mention) {
|
|
37043
37803
|
return mention.id === att.metadata;
|
|
37044
37804
|
});
|
|
37045
|
-
|
|
37805
|
+
mentionUsersToSend.push(mentionToAdd);
|
|
37046
37806
|
}
|
|
37047
37807
|
});
|
|
37048
37808
|
}
|
|
@@ -37050,9 +37810,9 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37050
37810
|
var messageToSend = _extends({}, messageToEdit, linkAttachment ? {
|
|
37051
37811
|
attachments: [linkAttachment]
|
|
37052
37812
|
} : {}, {
|
|
37053
|
-
metadata:
|
|
37813
|
+
metadata: mentionedUsersPositions,
|
|
37054
37814
|
bodyAttributes: messageBodyAttributes,
|
|
37055
|
-
mentionedUsers:
|
|
37815
|
+
mentionedUsers: mentionUsersToSend,
|
|
37056
37816
|
body: messageTexToSend
|
|
37057
37817
|
});
|
|
37058
37818
|
messageToSend.type = /(https?:\/\/[^\s]+)/.test(messageToSend.body) ? 'link' : messageToSend.type;
|
|
@@ -37062,7 +37822,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37062
37822
|
};
|
|
37063
37823
|
var handleCloseEditMode = function handleCloseEditMode() {
|
|
37064
37824
|
setEditMessageText('');
|
|
37065
|
-
|
|
37825
|
+
setMentionedUsers([]);
|
|
37066
37826
|
dispatch(setMessageToEditAC(null));
|
|
37067
37827
|
};
|
|
37068
37828
|
var removeUpload = function removeUpload(attachmentId) {
|
|
@@ -37161,7 +37921,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37161
37921
|
};
|
|
37162
37922
|
var handleCut = function handleCut() {
|
|
37163
37923
|
setMessageText('');
|
|
37164
|
-
|
|
37924
|
+
setMentionedUsers([]);
|
|
37165
37925
|
};
|
|
37166
37926
|
var handleEmojiPopupToggle = function handleEmojiPopupToggle(bool) {
|
|
37167
37927
|
setIsEmojisOpened(bool);
|
|
@@ -37229,7 +37989,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37229
37989
|
dispatch(clearSelectedMessagesAC());
|
|
37230
37990
|
};
|
|
37231
37991
|
var handleSetMentionMember = function handleSetMentionMember(mentionMember) {
|
|
37232
|
-
|
|
37992
|
+
setMentionedUsers(function (prevState) {
|
|
37233
37993
|
return [].concat(prevState, [mentionMember]);
|
|
37234
37994
|
});
|
|
37235
37995
|
};
|
|
@@ -37610,7 +38370,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37610
38370
|
var messageToSend = {
|
|
37611
38371
|
metadata: '',
|
|
37612
38372
|
body: '',
|
|
37613
|
-
|
|
38373
|
+
mentionedUsers: [],
|
|
37614
38374
|
attachments: [{
|
|
37615
38375
|
name: uuid.v4() + ".mp3",
|
|
37616
38376
|
data: recordedFile.file,
|
|
@@ -37665,7 +38425,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37665
38425
|
dispatch(setMessageForReplyAC(draftMessage.messageForReply));
|
|
37666
38426
|
}
|
|
37667
38427
|
setMessageText(draftMessage.text);
|
|
37668
|
-
|
|
38428
|
+
setMentionedUsers(draftMessage.mentionedUsers);
|
|
37669
38429
|
}
|
|
37670
38430
|
setShouldClearEditor({
|
|
37671
38431
|
clear: true,
|
|
@@ -37676,7 +38436,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37676
38436
|
prevActiveChannelId = activeChannel.id;
|
|
37677
38437
|
}
|
|
37678
38438
|
dispatch(getMembersAC(activeChannel.id));
|
|
37679
|
-
|
|
38439
|
+
setMentionedUsers([]);
|
|
37680
38440
|
}, [activeChannel.id]);
|
|
37681
38441
|
React.useEffect(function () {
|
|
37682
38442
|
if (messageText.trim() || editMessageText.trim() && editMessageText && editMessageText.trim() !== messageToEdit.body || attachments.length) {
|
|
@@ -37711,10 +38471,10 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37711
38471
|
}
|
|
37712
38472
|
if (messageText.trim()) {
|
|
37713
38473
|
var draftMessage = getDraftMessageFromMap(activeChannel.id);
|
|
37714
|
-
if (draftMessage && draftMessage.
|
|
38474
|
+
if (draftMessage && draftMessage.mentionedUsers && draftMessage.mentionedUsers.length) {
|
|
37715
38475
|
setDraftMessageToMap(activeChannel.id, {
|
|
37716
38476
|
text: messageText,
|
|
37717
|
-
|
|
38477
|
+
mentionedUsers: draftMessage.mentionedUsers,
|
|
37718
38478
|
messageForReply: messageForReply,
|
|
37719
38479
|
editorState: realEditorState,
|
|
37720
38480
|
bodyAttributes: messageBodyAttributes
|
|
@@ -37722,7 +38482,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37722
38482
|
} else {
|
|
37723
38483
|
setDraftMessageToMap(activeChannel.id, {
|
|
37724
38484
|
text: messageText,
|
|
37725
|
-
|
|
38485
|
+
mentionedUsers: mentionedUsers,
|
|
37726
38486
|
messageForReply: messageForReply,
|
|
37727
38487
|
editorState: realEditorState,
|
|
37728
38488
|
bodyAttributes: messageBodyAttributes
|
|
@@ -37742,15 +38502,15 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37742
38502
|
}
|
|
37743
38503
|
}, [messageText, attachments, editMessageText, readyVideoAttachments, messageBodyAttributes]);
|
|
37744
38504
|
useDidUpdate(function () {
|
|
37745
|
-
if (
|
|
38505
|
+
if (mentionedUsers && mentionedUsers.length) {
|
|
37746
38506
|
setDraftMessageToMap(activeChannel.id, {
|
|
37747
38507
|
text: messageText,
|
|
37748
|
-
|
|
38508
|
+
mentionedUsers: mentionedUsers,
|
|
37749
38509
|
messageForReply: messageForReply,
|
|
37750
38510
|
bodyAttributes: messageBodyAttributes
|
|
37751
38511
|
});
|
|
37752
38512
|
}
|
|
37753
|
-
}, [
|
|
38513
|
+
}, [mentionedUsers]);
|
|
37754
38514
|
React.useEffect(function () {
|
|
37755
38515
|
if (connectionStatus === CONNECTION_STATUS.CONNECTED) {
|
|
37756
38516
|
var pendingMessagesMap = getPendingMessagesMap();
|
|
@@ -37801,7 +38561,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
37801
38561
|
if (draftMessagesMap[activeChannel.id]) {
|
|
37802
38562
|
setDraftMessageToMap(activeChannel.id, {
|
|
37803
38563
|
text: messageText,
|
|
37804
|
-
|
|
38564
|
+
mentionedUsers: mentionedUsers,
|
|
37805
38565
|
messageForReply: messageForReply,
|
|
37806
38566
|
bodyAttributes: messageBodyAttributes
|
|
37807
38567
|
});
|
|
@@ -38116,7 +38876,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
38116
38876
|
editMessage: messageToEdit,
|
|
38117
38877
|
contactsMap: contactsMap,
|
|
38118
38878
|
getFromContacts: getFromContacts,
|
|
38119
|
-
setMentionedMember:
|
|
38879
|
+
setMentionedMember: setMentionedUsers
|
|
38120
38880
|
}), /*#__PURE__*/React__default.createElement(FormatMessagePlugin, {
|
|
38121
38881
|
editorState: realEditorState,
|
|
38122
38882
|
setMessageBodyAttributes: setMessageBodyAttributes,
|
|
@@ -38173,10 +38933,10 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
38173
38933
|
channelId: activeChannel.id
|
|
38174
38934
|
}))))))))));
|
|
38175
38935
|
};
|
|
38176
|
-
var SendMessageWrapper = styled__default.div(_templateObject$
|
|
38936
|
+
var SendMessageWrapper = styled__default.div(_templateObject$K || (_templateObject$K = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n position: relative;\n z-index: 15;\n"])), function (props) {
|
|
38177
38937
|
return props.backgroundColor;
|
|
38178
38938
|
});
|
|
38179
|
-
var Container$k = styled__default.div(_templateObject2$
|
|
38939
|
+
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
38940
|
return props.margin || '30px 0 16px';
|
|
38181
38941
|
}, function (props) {
|
|
38182
38942
|
return props.border || '';
|
|
@@ -38193,7 +38953,7 @@ var Container$k = styled__default.div(_templateObject2$E || (_templateObject2$E
|
|
|
38193
38953
|
}, function (props) {
|
|
38194
38954
|
return props.mentionColor;
|
|
38195
38955
|
});
|
|
38196
|
-
var EditReplyMessageCont = styled__default.div(_templateObject3$
|
|
38956
|
+
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
38957
|
return props.left || '0';
|
|
38198
38958
|
}, function (props) {
|
|
38199
38959
|
return props.bottom || '0';
|
|
@@ -38208,19 +38968,19 @@ var EditReplyMessageCont = styled__default.div(_templateObject3$x || (_templateO
|
|
|
38208
38968
|
}, function (props) {
|
|
38209
38969
|
return props.backgroundColor;
|
|
38210
38970
|
});
|
|
38211
|
-
var EditMessageText = styled__default.p(_templateObject4$
|
|
38212
|
-
var UploadErrorMessage = styled__default.p(_templateObject5$
|
|
38971
|
+
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"])));
|
|
38972
|
+
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
38973
|
return props.color;
|
|
38214
38974
|
});
|
|
38215
|
-
var CloseEditMode = styled__default.span(_templateObject6$
|
|
38975
|
+
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
38976
|
return props.color;
|
|
38217
38977
|
});
|
|
38218
|
-
var UserName$1 = styled__default.span(_templateObject7$
|
|
38219
|
-
var ReplyMessageBody$1 = styled__default.div(_templateObject8$
|
|
38220
|
-
var EditReplyMessageHeader = styled__default.h4(_templateObject9$
|
|
38978
|
+
var UserName$1 = styled__default.span(_templateObject7$j || (_templateObject7$j = _taggedTemplateLiteralLoose(["\n font-weight: 500;\n margin-left: 4px;\n"])));
|
|
38979
|
+
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"])));
|
|
38980
|
+
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
38981
|
return props.color;
|
|
38222
38982
|
});
|
|
38223
|
-
var AddAttachmentIcon = styled__default.span(_templateObject0$
|
|
38983
|
+
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
38984
|
return props.height ? props.height + "px" : '36px';
|
|
38225
38985
|
}, function (props) {
|
|
38226
38986
|
return props.order === 0 || props.order ? props.order : 1;
|
|
@@ -38229,7 +38989,7 @@ var AddAttachmentIcon = styled__default.span(_templateObject0$c || (_templateObj
|
|
|
38229
38989
|
}, function (props) {
|
|
38230
38990
|
return props.hoverColor;
|
|
38231
38991
|
});
|
|
38232
|
-
var SendMessageInputContainer = styled__default.div(_templateObject1$
|
|
38992
|
+
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
38993
|
return props.minHeight || '36px';
|
|
38234
38994
|
}, function (props) {
|
|
38235
38995
|
return props.messageForReply ? '0 0 4px 4px' : '4px';
|
|
@@ -38525,7 +39285,7 @@ function SvgUnpin(props) {
|
|
|
38525
39285
|
})));
|
|
38526
39286
|
}
|
|
38527
39287
|
|
|
38528
|
-
var _templateObject$
|
|
39288
|
+
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
39289
|
var Actions = function Actions(_ref) {
|
|
38530
39290
|
var setActionsHeight = _ref.setActionsHeight,
|
|
38531
39291
|
channel = _ref.channel,
|
|
@@ -38989,21 +39749,21 @@ var Actions = function Actions(_ref) {
|
|
|
38989
39749
|
title: popupTitle
|
|
38990
39750
|
})));
|
|
38991
39751
|
};
|
|
38992
|
-
var Container$l = styled__default.div(_templateObject$
|
|
39752
|
+
var Container$l = styled__default.div(_templateObject$L || (_templateObject$L = _taggedTemplateLiteralLoose(["\n padding: 10px 16px;\n border-bottom: 6px solid ", ";\n]"])), function (props) {
|
|
38993
39753
|
return props.borderColor;
|
|
38994
39754
|
});
|
|
38995
|
-
var ActionHeader = styled__default.div(_templateObject2$
|
|
38996
|
-
var MenuTriggerIcon = styled__default.span(_templateObject3$
|
|
39755
|
+
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"])));
|
|
39756
|
+
var MenuTriggerIcon = styled__default.span(_templateObject3$z || (_templateObject3$z = _taggedTemplateLiteralLoose(["\n transition: all 0.2s;\n ", "\n"])), function (props) {
|
|
38997
39757
|
return !props.isOpen && ' transform: rotate(-90deg);';
|
|
38998
39758
|
});
|
|
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$
|
|
39759
|
+
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"])));
|
|
39760
|
+
var DefaultMutedIcon = styled__default(SvgUnmuteNotifications)(_templateObject5$q || (_templateObject5$q = _taggedTemplateLiteralLoose([""])));
|
|
39761
|
+
var DefaultMuteIcon = styled__default(SvgNotifications)(_templateObject6$m || (_templateObject6$m = _taggedTemplateLiteralLoose([""])));
|
|
39762
|
+
var DefaultStarIcon = styled__default(SvgStar)(_templateObject7$k || (_templateObject7$k = _taggedTemplateLiteralLoose([""])));
|
|
39763
|
+
var DefaultUnpinIcon = styled__default(SvgUnpin)(_templateObject8$i || (_templateObject8$i = _taggedTemplateLiteralLoose([""])));
|
|
39764
|
+
var DefaultPinIcon = styled__default(SvgPin)(_templateObject9$f || (_templateObject9$f = _taggedTemplateLiteralLoose([""])));
|
|
39765
|
+
var DefaultMarkAsRead = styled__default(SvgMarkAsRead)(_templateObject0$e || (_templateObject0$e = _taggedTemplateLiteralLoose([""])));
|
|
39766
|
+
var DefaultMarkAsUnRead = styled__default(SvgMarkAsUnRead)(_templateObject1$b || (_templateObject1$b = _taggedTemplateLiteralLoose([""])));
|
|
39007
39767
|
var DefaultBlockIcon = styled__default(SvgBlockChannel)(_templateObject10$6 || (_templateObject10$6 = _taggedTemplateLiteralLoose([""])));
|
|
39008
39768
|
var DefaultReportIcon = styled__default(SvgReport)(_templateObject11$6 || (_templateObject11$6 = _taggedTemplateLiteralLoose([""])));
|
|
39009
39769
|
var DefaultClearIcon = styled__default(SvgClear)(_templateObject12$5 || (_templateObject12$5 = _taggedTemplateLiteralLoose([""])));
|
|
@@ -39083,7 +39843,7 @@ function SvgMoreVert(props) {
|
|
|
39083
39843
|
})));
|
|
39084
39844
|
}
|
|
39085
39845
|
|
|
39086
|
-
var _templateObject$
|
|
39846
|
+
var _templateObject$M, _templateObject2$H, _templateObject3$A;
|
|
39087
39847
|
var ChangeMemberRole = function ChangeMemberRole(_ref) {
|
|
39088
39848
|
var theme = _ref.theme,
|
|
39089
39849
|
channelId = _ref.channelId,
|
|
@@ -39183,14 +39943,14 @@ var ChangeMemberRole = function ChangeMemberRole(_ref) {
|
|
|
39183
39943
|
onClick: handleSave
|
|
39184
39944
|
}, "Save"))));
|
|
39185
39945
|
};
|
|
39186
|
-
var RolesSelect = styled__default.div(_templateObject$
|
|
39187
|
-
var RoleLabel = styled__default.div(_templateObject2$
|
|
39946
|
+
var RolesSelect = styled__default.div(_templateObject$M || (_templateObject$M = _taggedTemplateLiteralLoose(["\n margin-bottom: 32px;\n"])));
|
|
39947
|
+
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
39948
|
var color = _ref2.color;
|
|
39189
39949
|
return color;
|
|
39190
39950
|
});
|
|
39191
|
-
var RoleSpan = styled__default.span(_templateObject3$
|
|
39951
|
+
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
39952
|
|
|
39193
|
-
var _templateObject$
|
|
39953
|
+
var _templateObject$N, _templateObject2$I, _templateObject3$B, _templateObject4$v, _templateObject5$r, _templateObject6$n, _templateObject7$l, _templateObject8$j, _templateObject9$g;
|
|
39194
39954
|
var Members = function Members(_ref) {
|
|
39195
39955
|
var channel = _ref.channel,
|
|
39196
39956
|
theme = _ref.theme,
|
|
@@ -39493,18 +40253,18 @@ var Members = function Members(_ref) {
|
|
|
39493
40253
|
toggleCreatePopup: handleAddMemberPopup
|
|
39494
40254
|
})));
|
|
39495
40255
|
};
|
|
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$
|
|
40256
|
+
var Container$m = styled__default.div(_templateObject$N || (_templateObject$N = _taggedTemplateLiteralLoose([""])));
|
|
40257
|
+
var ActionsMenu$1 = styled__default.div(_templateObject2$I || (_templateObject2$I = _taggedTemplateLiteralLoose(["\n position: relative;\n transition: all 0.2s;\n"])));
|
|
40258
|
+
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);
|
|
40259
|
+
var MemberNameWrapper = styled__default.div(_templateObject4$v || (_templateObject4$v = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n"])));
|
|
40260
|
+
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
40261
|
return props.color;
|
|
39502
40262
|
});
|
|
39503
|
-
var EditMemberIcon = styled__default.span(_templateObject6$
|
|
40263
|
+
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
40264
|
return props.color;
|
|
39505
40265
|
});
|
|
39506
|
-
var MembersList = styled__default.ul(_templateObject7$
|
|
39507
|
-
var MemberItem$1 = styled__default.li(_templateObject8$
|
|
40266
|
+
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"])));
|
|
40267
|
+
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
40268
|
return props.fontSize || '15px';
|
|
39509
40269
|
}, function (props) {
|
|
39510
40270
|
return props.color;
|
|
@@ -39515,13 +40275,13 @@ var MemberItem$1 = styled__default.li(_templateObject8$i || (_templateObject8$i
|
|
|
39515
40275
|
}, function (props) {
|
|
39516
40276
|
return props.hoverBackground;
|
|
39517
40277
|
}, EditMemberIcon, UserStatus);
|
|
39518
|
-
var RoleBadge = styled__default.span(_templateObject9$
|
|
40278
|
+
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
40279
|
return props.color;
|
|
39520
40280
|
}, function (props) {
|
|
39521
40281
|
return props.backgroundColor;
|
|
39522
40282
|
});
|
|
39523
40283
|
|
|
39524
|
-
var _templateObject$
|
|
40284
|
+
var _templateObject$O, _templateObject2$J;
|
|
39525
40285
|
var Media = function Media(_ref) {
|
|
39526
40286
|
var channel = _ref.channel;
|
|
39527
40287
|
var _useColor = useColors(),
|
|
@@ -39567,8 +40327,8 @@ var Media = function Media(_ref) {
|
|
|
39567
40327
|
currentMediaFile: mediaFile
|
|
39568
40328
|
})));
|
|
39569
40329
|
};
|
|
39570
|
-
var Container$n = styled__default.div(_templateObject$
|
|
39571
|
-
var MediaItem = styled__default.div(_templateObject2$
|
|
40330
|
+
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"])));
|
|
40331
|
+
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
40332
|
|
|
39573
40333
|
var _rect$3, _path$1n;
|
|
39574
40334
|
function _extends$1r() {
|
|
@@ -39624,7 +40384,7 @@ function SvgDownloadFile(props) {
|
|
|
39624
40384
|
})));
|
|
39625
40385
|
}
|
|
39626
40386
|
|
|
39627
|
-
var _templateObject$
|
|
40387
|
+
var _templateObject$P, _templateObject2$K, _templateObject3$C, _templateObject4$w, _templateObject5$s, _templateObject6$o, _templateObject7$m, _templateObject8$k;
|
|
39628
40388
|
var Files = function Files(_ref) {
|
|
39629
40389
|
var channelId = _ref.channelId,
|
|
39630
40390
|
filePreviewIcon = _ref.filePreviewIcon,
|
|
@@ -39741,30 +40501,30 @@ var Files = function Files(_ref) {
|
|
|
39741
40501
|
}))) : filePreviewDownloadIcon || /*#__PURE__*/React__default.createElement(SvgDownloadFile, null)));
|
|
39742
40502
|
}));
|
|
39743
40503
|
};
|
|
39744
|
-
var Container$o = styled__default.ul(_templateObject$
|
|
39745
|
-
var DownloadWrapper = styled__default.a(_templateObject2$
|
|
40504
|
+
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"])));
|
|
40505
|
+
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
40506
|
return props.visible ? 'visible' : 'hidden';
|
|
39747
40507
|
}, function (props) {
|
|
39748
40508
|
return props.iconColor;
|
|
39749
40509
|
}, function (props) {
|
|
39750
40510
|
return props.iconColor;
|
|
39751
40511
|
});
|
|
39752
|
-
var ProgressWrapper$2 = styled__default.span(_templateObject3$
|
|
39753
|
-
var FileIconCont = styled__default.span(_templateObject4$
|
|
40512
|
+
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"])));
|
|
40513
|
+
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
40514
|
return props.iconColor;
|
|
39755
40515
|
}, function (props) {
|
|
39756
40516
|
return props.fillColor;
|
|
39757
40517
|
});
|
|
39758
|
-
var FileHoverIconCont = styled__default.span(_templateObject5$
|
|
40518
|
+
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
40519
|
return props.iconColor;
|
|
39760
40520
|
}, function (props) {
|
|
39761
40521
|
return props.fillColor;
|
|
39762
40522
|
});
|
|
39763
|
-
var FileThumb = styled__default.img(_templateObject6$
|
|
39764
|
-
var FileItem = styled__default.div(_templateObject7$
|
|
40523
|
+
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"])));
|
|
40524
|
+
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
40525
|
return props.hoverBackgroundColor;
|
|
39766
40526
|
}, DownloadWrapper, FileIconCont, FileHoverIconCont);
|
|
39767
|
-
var FileSizeAndDate = styled__default.span(_templateObject8$
|
|
40527
|
+
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
40528
|
return props.fontSize || '13px';
|
|
39769
40529
|
}, function (props) {
|
|
39770
40530
|
return props.lineHeight || '16px';
|
|
@@ -39803,7 +40563,7 @@ function SvgLinkIcon(props) {
|
|
|
39803
40563
|
})));
|
|
39804
40564
|
}
|
|
39805
40565
|
|
|
39806
|
-
var _templateObject$
|
|
40566
|
+
var _templateObject$Q, _templateObject2$L, _templateObject3$D, _templateObject4$x, _templateObject5$t;
|
|
39807
40567
|
var LinkItem = function LinkItem(_ref) {
|
|
39808
40568
|
var link = _ref.link,
|
|
39809
40569
|
linkPreviewIcon = _ref.linkPreviewIcon,
|
|
@@ -39834,25 +40594,25 @@ var LinkItem = function LinkItem(_ref) {
|
|
|
39834
40594
|
color: linkPreviewColor || textPrimary
|
|
39835
40595
|
}, link))));
|
|
39836
40596
|
};
|
|
39837
|
-
var LinkIconCont = styled__default.span(_templateObject$
|
|
40597
|
+
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
40598
|
return props.iconColor;
|
|
39839
40599
|
}, function (props) {
|
|
39840
40600
|
return props.fillColor;
|
|
39841
40601
|
});
|
|
39842
|
-
var LinkHoverIconCont = styled__default.span(_templateObject2$
|
|
40602
|
+
var LinkHoverIconCont = styled__default.span(_templateObject2$L || (_templateObject2$L = _taggedTemplateLiteralLoose(["\n display: none;\n > svg {\n color: ", ";\n fill: ", ";\n }\n"])), function (props) {
|
|
39843
40603
|
return props.iconColor;
|
|
39844
40604
|
}, function (props) {
|
|
39845
40605
|
return props.fillColor;
|
|
39846
40606
|
});
|
|
39847
|
-
var LinkInfoCont = styled__default.div(_templateObject3$
|
|
39848
|
-
var FileItem$1 = styled__default.li(_templateObject4$
|
|
40607
|
+
var LinkInfoCont = styled__default.div(_templateObject3$D || (_templateObject3$D = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n width: calc(100% - 40px);\n"])));
|
|
40608
|
+
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
40609
|
return props.hoverBackgroundColor;
|
|
39850
40610
|
}, LinkIconCont, LinkHoverIconCont);
|
|
39851
|
-
var LinkUrl = styled__default.span(_templateObject5$
|
|
40611
|
+
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
40612
|
return props.color;
|
|
39853
40613
|
});
|
|
39854
40614
|
|
|
39855
|
-
var _templateObject$
|
|
40615
|
+
var _templateObject$R;
|
|
39856
40616
|
var Links = function Links(_ref) {
|
|
39857
40617
|
var channelId = _ref.channelId,
|
|
39858
40618
|
linkPreviewIcon = _ref.linkPreviewIcon,
|
|
@@ -39877,7 +40637,7 @@ var Links = function Links(_ref) {
|
|
|
39877
40637
|
});
|
|
39878
40638
|
}));
|
|
39879
40639
|
};
|
|
39880
|
-
var Container$p = styled__default.ul(_templateObject$
|
|
40640
|
+
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
40641
|
|
|
39882
40642
|
var _rect$5, _path$1q;
|
|
39883
40643
|
function _extends$1u() {
|
|
@@ -39933,7 +40693,7 @@ function SvgVoicePreviewPause(props) {
|
|
|
39933
40693
|
})));
|
|
39934
40694
|
}
|
|
39935
40695
|
|
|
39936
|
-
var _templateObject$
|
|
40696
|
+
var _templateObject$S, _templateObject2$M, _templateObject3$E, _templateObject4$y, _templateObject5$u, _templateObject6$p, _templateObject7$n, _templateObject8$l;
|
|
39937
40697
|
var VoiceItem = function VoiceItem(_ref) {
|
|
39938
40698
|
var file = _ref.file,
|
|
39939
40699
|
voicePreviewPlayIcon = _ref.voicePreviewPlayIcon,
|
|
@@ -40058,32 +40818,32 @@ var VoiceItem = function VoiceItem(_ref) {
|
|
|
40058
40818
|
type: 'audio/mpeg'
|
|
40059
40819
|
})));
|
|
40060
40820
|
};
|
|
40061
|
-
var FileIconCont$1 = styled__default.span(_templateObject$
|
|
40821
|
+
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
40822
|
return props.fill || 'transparent';
|
|
40063
40823
|
}, function (props) {
|
|
40064
40824
|
return props.fill || 'transparent';
|
|
40065
40825
|
});
|
|
40066
|
-
var FileHoverIconCont$1 = styled__default.span(_templateObject2$
|
|
40826
|
+
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
40827
|
return props.fill || 'transparent';
|
|
40068
40828
|
}, function (props) {
|
|
40069
40829
|
return props.fill || 'transparent';
|
|
40070
40830
|
});
|
|
40071
|
-
var FileItem$2 = styled__default.li(_templateObject3$
|
|
40831
|
+
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
40832
|
return props.hoverBackgroundColor;
|
|
40073
40833
|
}, FileIconCont$1, FileHoverIconCont$1);
|
|
40074
|
-
var AudioInfo = styled__default.div(_templateObject4$
|
|
40075
|
-
var AudioTitle = styled__default.span(_templateObject5$
|
|
40834
|
+
var AudioInfo = styled__default.div(_templateObject4$y || (_templateObject4$y = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
|
|
40835
|
+
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
40836
|
return props.color;
|
|
40077
40837
|
});
|
|
40078
|
-
var AudioDate = styled__default.span(_templateObject6$
|
|
40838
|
+
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
40839
|
return props.color;
|
|
40080
40840
|
});
|
|
40081
|
-
var AudioSendTime = styled__default.span(_templateObject7$
|
|
40841
|
+
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
40842
|
return props.color;
|
|
40083
40843
|
});
|
|
40084
|
-
var Audio = styled__default.audio(_templateObject8$
|
|
40844
|
+
var Audio = styled__default.audio(_templateObject8$l || (_templateObject8$l = _taggedTemplateLiteralLoose(["\n display: none;\n"])));
|
|
40085
40845
|
|
|
40086
|
-
var _templateObject$
|
|
40846
|
+
var _templateObject$T;
|
|
40087
40847
|
var Voices = function Voices(_ref) {
|
|
40088
40848
|
var channelId = _ref.channelId,
|
|
40089
40849
|
voicePreviewPlayIcon = _ref.voicePreviewPlayIcon,
|
|
@@ -40114,9 +40874,9 @@ var Voices = function Voices(_ref) {
|
|
|
40114
40874
|
});
|
|
40115
40875
|
}));
|
|
40116
40876
|
};
|
|
40117
|
-
var Container$q = styled__default.ul(_templateObject$
|
|
40877
|
+
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
40878
|
|
|
40119
|
-
var _templateObject$
|
|
40879
|
+
var _templateObject$U, _templateObject2$N;
|
|
40120
40880
|
var DetailsTab = function DetailsTab(_ref) {
|
|
40121
40881
|
var channel = _ref.channel,
|
|
40122
40882
|
theme = _ref.theme,
|
|
@@ -40265,8 +41025,8 @@ var DetailsTab = function DetailsTab(_ref) {
|
|
|
40265
41025
|
voicePreviewHoverBackgroundColor: voicePreviewHoverBackgroundColor
|
|
40266
41026
|
})));
|
|
40267
41027
|
};
|
|
40268
|
-
var Container$r = styled__default.div(_templateObject$
|
|
40269
|
-
var DetailsTabHeader = styled__default.div(_templateObject2$
|
|
41028
|
+
var Container$r = styled__default.div(_templateObject$U || (_templateObject$U = _taggedTemplateLiteralLoose(["\n min-height: calc(100vh - 64px);\n"])));
|
|
41029
|
+
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
41030
|
return props.borderColor;
|
|
40271
41031
|
}, function (props) {
|
|
40272
41032
|
return props.backgroundColor || 'transparent';
|
|
@@ -40284,17 +41044,17 @@ var DetailsTabHeader = styled__default.div(_templateObject2$M || (_templateObjec
|
|
|
40284
41044
|
return props.activeTabColor;
|
|
40285
41045
|
});
|
|
40286
41046
|
|
|
40287
|
-
var _templateObject$
|
|
40288
|
-
var Container$s = styled__default.div(_templateObject$
|
|
41047
|
+
var _templateObject$V, _templateObject2$O, _templateObject3$F, _templateObject4$z;
|
|
41048
|
+
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
41049
|
return props.active ? 'display: block' : 'display: none';
|
|
40290
41050
|
}, function (props) {
|
|
40291
41051
|
return "calc(100vh - " + (props.heightOffset ? props.heightOffset + 48 : 48) + "px)";
|
|
40292
41052
|
}, function (props) {
|
|
40293
41053
|
return props.backgroundColor;
|
|
40294
41054
|
});
|
|
40295
|
-
var AvatarCont = styled__default.div(_templateObject2$
|
|
40296
|
-
var DropDownWrapper = styled__default.div(_templateObject3$
|
|
40297
|
-
var EditChannelFooter = styled__default(ButtonBlock)(_templateObject4$
|
|
41055
|
+
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"])));
|
|
41056
|
+
var DropDownWrapper = styled__default.div(_templateObject3$F || (_templateObject3$F = _taggedTemplateLiteralLoose(["\n position: absolute;\n z-index: 4;\n width: 40px;\n height: 40px;\n"])));
|
|
41057
|
+
var EditChannelFooter = styled__default(ButtonBlock)(_templateObject4$z || (_templateObject4$z = _taggedTemplateLiteralLoose(["\n margin-top: 24px;\n\n & > button {\n margin-left: 12px;\n }\n"])));
|
|
40298
41058
|
var EditChannel = function EditChannel(_ref) {
|
|
40299
41059
|
var channel = _ref.channel,
|
|
40300
41060
|
theme = _ref.theme,
|
|
@@ -40549,7 +41309,7 @@ var EditChannel = function EditChannel(_ref) {
|
|
|
40549
41309
|
})));
|
|
40550
41310
|
};
|
|
40551
41311
|
|
|
40552
|
-
var _templateObject$
|
|
41312
|
+
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
41313
|
var Details = function Details(_ref) {
|
|
40554
41314
|
var _activeChannel$member;
|
|
40555
41315
|
var detailsTitleText = _ref.detailsTitleText,
|
|
@@ -40936,17 +41696,17 @@ var Details = function Details(_ref) {
|
|
|
40936
41696
|
onTabChange: handleTabChange
|
|
40937
41697
|
}))));
|
|
40938
41698
|
};
|
|
40939
|
-
var Container$t = styled__default.div(_templateObject$
|
|
41699
|
+
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
41700
|
return props.borderColor;
|
|
40941
41701
|
}, function (props) {
|
|
40942
41702
|
return props.mounted && " width: " + (props.size === 'small' ? '300px' : props.size === 'medium' ? '350px' : '400px') + ";";
|
|
40943
41703
|
}, function (props) {
|
|
40944
41704
|
return props.backgroundColor;
|
|
40945
41705
|
});
|
|
40946
|
-
var ChannelDetailsHeader = styled__default.div(_templateObject2$
|
|
41706
|
+
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
41707
|
return props.borderColor;
|
|
40948
41708
|
});
|
|
40949
|
-
var ChatDetails = styled__default.div(_templateObject3$
|
|
41709
|
+
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
41710
|
return props.size === 'small' ? '300px' : props.size === 'medium' ? '350px' : '400px';
|
|
40951
41711
|
}, function (props) {
|
|
40952
41712
|
return props.height ? "calc(100vh - " + props.heightOffset + "px)" : '100vh';
|
|
@@ -40955,37 +41715,37 @@ var ChatDetails = styled__default.div(_templateObject3$F || (_templateObject3$F
|
|
|
40955
41715
|
}, function (props) {
|
|
40956
41716
|
return props.thumbColor;
|
|
40957
41717
|
});
|
|
40958
|
-
var AboutChannel = styled__default.div(_templateObject4$
|
|
40959
|
-
var AboutChannelTitle = styled__default.h4(_templateObject5$
|
|
41718
|
+
var AboutChannel = styled__default.div(_templateObject4$A || (_templateObject4$A = _taggedTemplateLiteralLoose(["\n margin-top: 20px;\n"])));
|
|
41719
|
+
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
41720
|
return props.color;
|
|
40961
41721
|
});
|
|
40962
|
-
var AboutChannelText = styled__default.h3(_templateObject6$
|
|
41722
|
+
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
41723
|
return props.color;
|
|
40964
41724
|
});
|
|
40965
|
-
var ChannelInfo$4 = styled__default.div(_templateObject7$
|
|
41725
|
+
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
41726
|
return (!props.direction || props.direction !== 'column') && '16px';
|
|
40967
41727
|
}, function (props) {
|
|
40968
41728
|
return props.direction && props.direction === 'column' && '16px';
|
|
40969
41729
|
}, function (props) {
|
|
40970
41730
|
return props.direction && props.direction === 'column' && 'center';
|
|
40971
41731
|
});
|
|
40972
|
-
var DetailsHeader = styled__default.div(_templateObject8$
|
|
41732
|
+
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
41733
|
return props.borderColor;
|
|
40974
41734
|
});
|
|
40975
|
-
var ChannelAvatarAndName = styled__default.div(_templateObject9$
|
|
41735
|
+
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
41736
|
return props.direction;
|
|
40977
41737
|
});
|
|
40978
|
-
var ChannelName$1 = styled__default(SectionHeader)(_templateObject0$
|
|
41738
|
+
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
41739
|
return props.isDirect ? '200px' : '168px';
|
|
40980
41740
|
}, function (props) {
|
|
40981
41741
|
return props.color;
|
|
40982
41742
|
}, function (props) {
|
|
40983
41743
|
return props.uppercase && 'uppercase';
|
|
40984
41744
|
});
|
|
40985
|
-
var ChannelNameWrapper = styled__default.div(_templateObject1$
|
|
41745
|
+
var ChannelNameWrapper = styled__default.div(_templateObject1$c || (_templateObject1$c = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n"])));
|
|
40986
41746
|
var EditButton = styled__default.span(_templateObject10$7 || (_templateObject10$7 = _taggedTemplateLiteralLoose(["\n margin-left: 6px;\n cursor: pointer;\n color: #b2b6be;\n"])));
|
|
40987
41747
|
|
|
40988
|
-
var _templateObject$
|
|
41748
|
+
var _templateObject$X;
|
|
40989
41749
|
var ChannelDetailsContainer = function ChannelDetailsContainer(_ref) {
|
|
40990
41750
|
var _ref$size = _ref.size,
|
|
40991
41751
|
size = _ref$size === void 0 ? 'large' : _ref$size,
|
|
@@ -41214,7 +41974,7 @@ var ChannelDetailsContainer = function ChannelDetailsContainer(_ref) {
|
|
|
41214
41974
|
showPhoneNumber: showPhoneNumber
|
|
41215
41975
|
})));
|
|
41216
41976
|
};
|
|
41217
|
-
var DetailsWrapper = styled__default.div(_templateObject$
|
|
41977
|
+
var DetailsWrapper = styled__default.div(_templateObject$X || (_templateObject$X = _taggedTemplateLiteralLoose([""])));
|
|
41218
41978
|
|
|
41219
41979
|
var _path$1s;
|
|
41220
41980
|
function _extends$1w() {
|
|
@@ -41238,7 +41998,7 @@ function SvgChevronDown(props) {
|
|
|
41238
41998
|
})));
|
|
41239
41999
|
}
|
|
41240
42000
|
|
|
41241
|
-
var _templateObject$
|
|
42001
|
+
var _templateObject$Y, _templateObject2$Q;
|
|
41242
42002
|
var MessagesScrollToBottomButton = function MessagesScrollToBottomButton(_ref) {
|
|
41243
42003
|
var buttonIcon = _ref.buttonIcon,
|
|
41244
42004
|
buttonWidth = _ref.buttonWidth,
|
|
@@ -41321,7 +42081,7 @@ var MessagesScrollToBottomButton = function MessagesScrollToBottomButton(_ref) {
|
|
|
41321
42081
|
isMuted: channel.muted
|
|
41322
42082
|
}, channel.newMessageCount ? channel.newMessageCount > 99 ? '99+' : channel.newMessageCount : '')), buttonIcon || /*#__PURE__*/React__default.createElement(SvgChevronDown, null)));
|
|
41323
42083
|
};
|
|
41324
|
-
var BottomButton = styled__default.div(_templateObject$
|
|
42084
|
+
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
42085
|
return props.animateFrom === 'bottom' && "bottom: " + (props.bottomOffset + (props.bottomPosition === undefined ? 45 : props.bottomPosition) - 130) + "px";
|
|
41326
42086
|
}, function (props) {
|
|
41327
42087
|
return props.animateFrom === 'right' && "right: " + (props.rightPosition === undefined ? 16 : props.rightPosition - 100) + "px";
|
|
@@ -41332,7 +42092,7 @@ var BottomButton = styled__default.div(_templateObject$X || (_templateObject$X =
|
|
|
41332
42092
|
}, function (props) {
|
|
41333
42093
|
return props.backgroundColor;
|
|
41334
42094
|
});
|
|
41335
|
-
var UnreadCount$1 = styled__default.span(_templateObject2$
|
|
42095
|
+
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
42096
|
return props.backgroundColor;
|
|
41337
42097
|
}, function (props) {
|
|
41338
42098
|
return props.fontSize || '13px';
|
|
@@ -41375,7 +42135,7 @@ function SvgMention(props) {
|
|
|
41375
42135
|
})));
|
|
41376
42136
|
}
|
|
41377
42137
|
|
|
41378
|
-
var _templateObject$
|
|
42138
|
+
var _templateObject$Z, _templateObject2$R;
|
|
41379
42139
|
var MessagesScrollToUnreadMentionsButton = function MessagesScrollToUnreadMentionsButton(_ref) {
|
|
41380
42140
|
var buttonIcon = _ref.buttonIcon,
|
|
41381
42141
|
buttonWidth = _ref.buttonWidth,
|
|
@@ -41518,7 +42278,7 @@ var MessagesScrollToUnreadMentionsButton = function MessagesScrollToUnreadMentio
|
|
|
41518
42278
|
isMuted: channel.muted
|
|
41519
42279
|
}, channel.newMentionCount ? channel.newMentionCount > 99 ? '99+' : channel.newMentionCount : '')), buttonIcon || /*#__PURE__*/React__default.createElement(SvgMention, null)));
|
|
41520
42280
|
};
|
|
41521
|
-
var BottomButton$1 = styled__default.div(_templateObject$
|
|
42281
|
+
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
42282
|
return props.animateFrom === 'bottom' && "bottom: " + (props.bottomOffset + (props.bottomPosition === undefined ? 45 : props.bottomPosition) + (props.showsUnreadMentionsButton ? 60 : 0) - 180) + "px";
|
|
41523
42283
|
}, function (props) {
|
|
41524
42284
|
return props.animateFrom === 'right' && "right: " + (props.rightPosition === undefined ? 16 : props.rightPosition - 100) + "px";
|
|
@@ -41529,7 +42289,7 @@ var BottomButton$1 = styled__default.div(_templateObject$Y || (_templateObject$Y
|
|
|
41529
42289
|
}, function (props) {
|
|
41530
42290
|
return props.backgroundColor;
|
|
41531
42291
|
});
|
|
41532
|
-
var UnreadCount$2 = styled__default.span(_templateObject2$
|
|
42292
|
+
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
42293
|
return props.backgroundColor;
|
|
41534
42294
|
}, function (props) {
|
|
41535
42295
|
return props.fontSize || '13px';
|