sceyt-chat-react-uikit 1.8.8 → 1.8.9-beta.2
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/index.js +412 -341
- package/index.modern.js +412 -341
- package/package.json +1 -1
package/index.modern.js
CHANGED
|
@@ -10470,7 +10470,7 @@ if (isBrowser) {
|
|
|
10470
10470
|
} else {
|
|
10471
10471
|
cacheAvailable = 'caches' in global;
|
|
10472
10472
|
}
|
|
10473
|
-
var ATTACHMENT_VERSION = "
|
|
10473
|
+
var ATTACHMENT_VERSION = "_1_0_2";
|
|
10474
10474
|
var setAttachmentToCache = function setAttachmentToCache(attachmentUrl, attachmentResponse) {
|
|
10475
10475
|
try {
|
|
10476
10476
|
var attachmentURLVersion = attachmentUrl + ATTACHMENT_VERSION;
|
|
@@ -15964,7 +15964,8 @@ var compressAndCacheImage = function compressAndCacheImage(url, cacheKey, maxWid
|
|
|
15964
15964
|
var file = new File([blob], 'image.jpeg', {
|
|
15965
15965
|
type: blob.type
|
|
15966
15966
|
});
|
|
15967
|
-
|
|
15967
|
+
var dpr = Math.min(window.devicePixelRatio || 1, 2);
|
|
15968
|
+
return Promise.resolve(resizeImageWithPica(file, (maxWidth || 1280) * dpr, (maxHeight || 1080) * dpr, quality || 1)).then(function (_ref2) {
|
|
15968
15969
|
var compressedBlob = _ref2.blob;
|
|
15969
15970
|
var returningUrl = compressedBlob ? URL.createObjectURL(compressedBlob) : '';
|
|
15970
15971
|
if (compressedBlob) {
|
|
@@ -16051,6 +16052,75 @@ var createAttachmentUnavailableError = function createAttachmentUnavailableError
|
|
|
16051
16052
|
return error;
|
|
16052
16053
|
};
|
|
16053
16054
|
|
|
16055
|
+
var preparations = new Map();
|
|
16056
|
+
var beginVideoPreparation = function beginVideoPreparation(tid, file) {
|
|
16057
|
+
var resolvePreparation;
|
|
16058
|
+
var promise = new Promise(function (resolve) {
|
|
16059
|
+
resolvePreparation = resolve;
|
|
16060
|
+
});
|
|
16061
|
+
preparations.set(tid, {
|
|
16062
|
+
file: file,
|
|
16063
|
+
status: 'loading',
|
|
16064
|
+
promise: promise,
|
|
16065
|
+
resolve: resolvePreparation
|
|
16066
|
+
});
|
|
16067
|
+
};
|
|
16068
|
+
var completeVideoPreparation = function completeVideoPreparation(tid, preparation) {
|
|
16069
|
+
var entry = preparations.get(tid);
|
|
16070
|
+
if (!entry || entry.status !== 'loading') return;
|
|
16071
|
+
var completed = _extends({}, preparation, {
|
|
16072
|
+
status: 'ready'
|
|
16073
|
+
});
|
|
16074
|
+
preparations.set(tid, _extends({}, entry, completed));
|
|
16075
|
+
entry.resolve(completed);
|
|
16076
|
+
};
|
|
16077
|
+
var failVideoPreparation = function failVideoPreparation(tid) {
|
|
16078
|
+
var entry = preparations.get(tid);
|
|
16079
|
+
if (!entry || entry.status !== 'loading') return;
|
|
16080
|
+
var failed = {
|
|
16081
|
+
file: entry.file,
|
|
16082
|
+
status: 'failed'
|
|
16083
|
+
};
|
|
16084
|
+
preparations.set(tid, _extends({}, entry, failed));
|
|
16085
|
+
entry.resolve(failed);
|
|
16086
|
+
};
|
|
16087
|
+
var waitForVideoPreparation = function waitForVideoPreparation(tid, timeoutMs) {
|
|
16088
|
+
try {
|
|
16089
|
+
var _temp2 = function _temp2(_result) {
|
|
16090
|
+
return _exit ? _result : Promise.resolve(new Promise(function (resolve) {
|
|
16091
|
+
var timeout = setTimeout(function () {
|
|
16092
|
+
return resolve({
|
|
16093
|
+
file: entry.file,
|
|
16094
|
+
status: 'failed'
|
|
16095
|
+
});
|
|
16096
|
+
}, timeoutMs);
|
|
16097
|
+
entry.promise.then(function (prepared) {
|
|
16098
|
+
clearTimeout(timeout);
|
|
16099
|
+
resolve(prepared);
|
|
16100
|
+
});
|
|
16101
|
+
}));
|
|
16102
|
+
};
|
|
16103
|
+
var _exit = false;
|
|
16104
|
+
var entry = preparations.get(tid);
|
|
16105
|
+
if (!entry) return Promise.resolve(null);
|
|
16106
|
+
if (entry.status !== 'loading') return Promise.resolve(entry);
|
|
16107
|
+
var _temp = function () {
|
|
16108
|
+
if (timeoutMs === undefined) {
|
|
16109
|
+
return Promise.resolve(entry.promise).then(function (_await$entry$promise) {
|
|
16110
|
+
_exit = true;
|
|
16111
|
+
return _await$entry$promise;
|
|
16112
|
+
});
|
|
16113
|
+
}
|
|
16114
|
+
}();
|
|
16115
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp));
|
|
16116
|
+
} catch (e) {
|
|
16117
|
+
return Promise.reject(e);
|
|
16118
|
+
}
|
|
16119
|
+
};
|
|
16120
|
+
var clearVideoPreparation = function clearVideoPreparation(tid) {
|
|
16121
|
+
preparations["delete"](tid);
|
|
16122
|
+
};
|
|
16123
|
+
|
|
16054
16124
|
var _excluded$1 = ["lastMessage"];
|
|
16055
16125
|
var _marked = /*#__PURE__*/_regenerator().m(setMessageListLoading),
|
|
16056
16126
|
_marked2 = /*#__PURE__*/_regenerator().m(cancelChannelMessageProcesses),
|
|
@@ -16120,6 +16190,31 @@ var queuedPrefetchRequests = new Map();
|
|
|
16120
16190
|
var prefetchCompletionWaiters = new Map();
|
|
16121
16191
|
var prefetchCancelVersions = new Map();
|
|
16122
16192
|
var ACTIVE_CHANNEL_RECONNECT_REFRESH_TIMEOUT_MS = 1500;
|
|
16193
|
+
var applyPreparedVideoAttachments = function applyPreparedVideoAttachments(attachments) {
|
|
16194
|
+
try {
|
|
16195
|
+
return Promise.resolve(Promise.all(attachments.map(function (attachment) {
|
|
16196
|
+
try {
|
|
16197
|
+
if (!attachment.tid) return Promise.resolve();
|
|
16198
|
+
return Promise.resolve(waitForVideoPreparation(attachment.tid)).then(function (prepared) {
|
|
16199
|
+
if ((prepared === null || prepared === void 0 ? void 0 : prepared.status) === 'ready' && prepared.metadata) {
|
|
16200
|
+
attachment.url = prepared.file;
|
|
16201
|
+
attachment.data = prepared.file;
|
|
16202
|
+
attachment.name = prepared.file.name;
|
|
16203
|
+
attachment.size = prepared.file.size;
|
|
16204
|
+
attachment.metadata = prepared.metadata;
|
|
16205
|
+
}
|
|
16206
|
+
clearVideoPreparation(attachment.tid);
|
|
16207
|
+
});
|
|
16208
|
+
} catch (e) {
|
|
16209
|
+
return Promise.reject(e);
|
|
16210
|
+
}
|
|
16211
|
+
}))).then(function () {
|
|
16212
|
+
return attachments;
|
|
16213
|
+
});
|
|
16214
|
+
} catch (e) {
|
|
16215
|
+
return Promise.reject(e);
|
|
16216
|
+
}
|
|
16217
|
+
};
|
|
16123
16218
|
var activeDisplayedCacheKey = null;
|
|
16124
16219
|
var updateTabAttachmentCache = function updateTabAttachmentCache(channelId, attachments, messageUser) {
|
|
16125
16220
|
if (!(attachments !== null && attachments !== void 0 && attachments.length)) return;
|
|
@@ -17239,7 +17334,7 @@ function sendMessage(action) {
|
|
|
17239
17334
|
messagesToSend.push(messageToSend);
|
|
17240
17335
|
case 12:
|
|
17241
17336
|
_loop3 = /*#__PURE__*/_regenerator().m(function _callee4() {
|
|
17242
|
-
var messageAttachment, messageToSend, pendingState, messageCopy, _getStoredChannel6, _attachmentsToSend, linkAttachmentToSend, linkAttachmentBuilder, messageResponse, k, attachmentsToUpdate, currentAttachmentsMap, messageUpdateData, activeChannelId, messageToUpdate, resolvedLastMessage, channelUpdateParam, _channel2, _messageToSend2, isErrorResendable, _messageToSend$attach, _iterator2, _step2, att, _t;
|
|
17337
|
+
var messageAttachment, messageToSend, pendingState, pendingAttachments, messageCopy, _getStoredChannel6, _attachmentsToSend, linkAttachmentToSend, linkAttachmentBuilder, messageResponse, k, attachmentsToUpdate, currentAttachmentsMap, messageUpdateData, activeChannelId, messageToUpdate, resolvedLastMessage, channelUpdateParam, _channel2, _messageToSend2, isErrorResendable, _messageToSend$attach, _iterator2, _step2, att, _t;
|
|
17243
17338
|
return _regenerator().w(function (_context12) {
|
|
17244
17339
|
while (1) switch (_context12.p = _context12.n) {
|
|
17245
17340
|
case 0:
|
|
@@ -17262,21 +17357,40 @@ function sendMessage(action) {
|
|
|
17262
17357
|
messageToSend = _extends({}, messageToSend, pendingState);
|
|
17263
17358
|
case 2:
|
|
17264
17359
|
_context12.p = 2;
|
|
17360
|
+
_context12.n = 3;
|
|
17361
|
+
return call(applyPreparedVideoAttachments, messageAttachment);
|
|
17362
|
+
case 3:
|
|
17363
|
+
pendingAttachments = messageAttachment.map(function (attachment) {
|
|
17364
|
+
return _extends({}, attachment, {
|
|
17365
|
+
data: attachment.data || attachment.url
|
|
17366
|
+
});
|
|
17367
|
+
});
|
|
17368
|
+
updateMessageOnMap(channel.id, {
|
|
17369
|
+
messageId: messageToSend.tid,
|
|
17370
|
+
params: {
|
|
17371
|
+
attachments: pendingAttachments
|
|
17372
|
+
}
|
|
17373
|
+
});
|
|
17374
|
+
_context12.n = 4;
|
|
17375
|
+
return put(updateMessageAC(messageToSend.tid, {
|
|
17376
|
+
attachments: pendingAttachments
|
|
17377
|
+
}));
|
|
17378
|
+
case 4:
|
|
17265
17379
|
messageCopy = JSON.parse(JSON.stringify(messagesToSend[_i2]));
|
|
17266
17380
|
if (!(connectionState === CONNECTION_STATUS.CONNECTED)) {
|
|
17267
|
-
_context12.n =
|
|
17381
|
+
_context12.n = 17;
|
|
17268
17382
|
break;
|
|
17269
17383
|
}
|
|
17270
17384
|
_attachmentsToSend = messageAttachment;
|
|
17271
17385
|
if (!customUploader) {
|
|
17272
|
-
_context12.n =
|
|
17386
|
+
_context12.n = 6;
|
|
17273
17387
|
break;
|
|
17274
17388
|
}
|
|
17275
|
-
_context12.n =
|
|
17389
|
+
_context12.n = 5;
|
|
17276
17390
|
return call(handleUploadAttachments, messageAttachment || [], messageCopy, channel);
|
|
17277
|
-
case
|
|
17391
|
+
case 5:
|
|
17278
17392
|
_attachmentsToSend = _context12.v;
|
|
17279
|
-
case
|
|
17393
|
+
case 6:
|
|
17280
17394
|
linkAttachmentToSend = null;
|
|
17281
17395
|
if (_i2 === 0 && linkAttachment) {
|
|
17282
17396
|
linkAttachmentBuilder = channel.createAttachmentBuilder(linkAttachment.data, linkAttachment.type);
|
|
@@ -17291,40 +17405,40 @@ function sendMessage(action) {
|
|
|
17291
17405
|
attachments: [].concat(_attachmentsToSend)
|
|
17292
17406
|
});
|
|
17293
17407
|
}
|
|
17294
|
-
_context12.n =
|
|
17408
|
+
_context12.n = 7;
|
|
17295
17409
|
return call(channel.sendMessage, messageToSend);
|
|
17296
|
-
case
|
|
17410
|
+
case 7:
|
|
17297
17411
|
messageResponse = _context12.v;
|
|
17298
17412
|
if (messageToSend.tid) {
|
|
17299
17413
|
autoResendAttempts["delete"](messageToSend.tid);
|
|
17300
17414
|
}
|
|
17301
17415
|
if (!customUploader) {
|
|
17302
|
-
_context12.n =
|
|
17416
|
+
_context12.n = 12;
|
|
17303
17417
|
break;
|
|
17304
17418
|
}
|
|
17305
17419
|
k = 0;
|
|
17306
|
-
case
|
|
17420
|
+
case 8:
|
|
17307
17421
|
if (!(k < messageAttachment.length)) {
|
|
17308
|
-
_context12.n =
|
|
17422
|
+
_context12.n = 12;
|
|
17309
17423
|
break;
|
|
17310
17424
|
}
|
|
17311
17425
|
messageResponse.attachments[k] = _extends({}, messageResponse.attachments[k], {
|
|
17312
17426
|
user: JSON.parse(JSON.stringify(messageResponse.user)),
|
|
17313
17427
|
tid: messageAttachment[k].tid
|
|
17314
17428
|
});
|
|
17315
|
-
_context12.n =
|
|
17429
|
+
_context12.n = 9;
|
|
17316
17430
|
return put(removeAttachmentProgressAC(messageAttachment[k].tid));
|
|
17317
|
-
case
|
|
17318
|
-
_context12.n =
|
|
17431
|
+
case 9:
|
|
17432
|
+
_context12.n = 10;
|
|
17319
17433
|
return put(removeAttachmentUploadingStateAC(messageAttachment[k].tid));
|
|
17320
|
-
case
|
|
17434
|
+
case 10:
|
|
17321
17435
|
deletePendingAttachment(messageAttachment[k].tid);
|
|
17322
17436
|
releaseBlobUrls(["compose_" + messageAttachment[k].tid]);
|
|
17323
|
-
case
|
|
17437
|
+
case 11:
|
|
17324
17438
|
k++;
|
|
17325
|
-
_context12.n =
|
|
17439
|
+
_context12.n = 8;
|
|
17326
17440
|
break;
|
|
17327
|
-
case
|
|
17441
|
+
case 12:
|
|
17328
17442
|
attachmentsToUpdate = [];
|
|
17329
17443
|
if (messageResponse.attachments && messageResponse.attachments.length > 0) {
|
|
17330
17444
|
currentAttachmentsMap = {};
|
|
@@ -17351,25 +17465,25 @@ function sendMessage(action) {
|
|
|
17351
17465
|
});
|
|
17352
17466
|
activeChannelId = getActiveChannelId();
|
|
17353
17467
|
if (!(activeChannelId === channel.id)) {
|
|
17354
|
-
_context12.n =
|
|
17468
|
+
_context12.n = 13;
|
|
17355
17469
|
break;
|
|
17356
17470
|
}
|
|
17357
|
-
_context12.n =
|
|
17471
|
+
_context12.n = 13;
|
|
17358
17472
|
return put(updateMessageAC(messageToSend.tid, messageUpdateData, true));
|
|
17359
|
-
case
|
|
17473
|
+
case 13:
|
|
17360
17474
|
messageToUpdate = JSON.parse(JSON.stringify(messageResponse));
|
|
17361
17475
|
addConfirmedMessageToCache(channel.id, messageToUpdate);
|
|
17362
17476
|
updateTabAttachmentCache(channel.id, attachmentsToUpdate, messageResponse.user);
|
|
17363
17477
|
if (!channel.unread) {
|
|
17364
|
-
_context12.n =
|
|
17478
|
+
_context12.n = 14;
|
|
17365
17479
|
break;
|
|
17366
17480
|
}
|
|
17367
|
-
_context12.n =
|
|
17481
|
+
_context12.n = 14;
|
|
17368
17482
|
return put(markChannelAsReadAC(channel.id));
|
|
17369
|
-
case
|
|
17483
|
+
case 14:
|
|
17370
17484
|
resolvedLastMessage = getResolvedChannelLastMessage(channel.id, messageToUpdate, messageToSend);
|
|
17371
17485
|
if (!lastMessageNeedsUpdate((_getStoredChannel6 = getStoredChannel(channel.id)) === null || _getStoredChannel6 === void 0 ? void 0 : _getStoredChannel6.lastMessage, resolvedLastMessage)) {
|
|
17372
|
-
_context12.n =
|
|
17486
|
+
_context12.n = 16;
|
|
17373
17487
|
break;
|
|
17374
17488
|
}
|
|
17375
17489
|
updateChannelLastMessageOnAllChannels(channel.id, resolvedLastMessage);
|
|
@@ -17377,54 +17491,54 @@ function sendMessage(action) {
|
|
|
17377
17491
|
lastMessage: resolvedLastMessage,
|
|
17378
17492
|
lastReactedMessage: null
|
|
17379
17493
|
};
|
|
17380
|
-
_context12.n =
|
|
17494
|
+
_context12.n = 15;
|
|
17381
17495
|
return put(updateChannelDataAC(channel.id, channelUpdateParam, true));
|
|
17382
|
-
case 13:
|
|
17383
|
-
updateChannelOnAllChannels(channel.id, channelUpdateParam);
|
|
17384
|
-
case 14:
|
|
17385
|
-
_context12.n = 16;
|
|
17386
|
-
break;
|
|
17387
17496
|
case 15:
|
|
17388
|
-
|
|
17497
|
+
updateChannelOnAllChannels(channel.id, channelUpdateParam);
|
|
17389
17498
|
case 16:
|
|
17390
|
-
_context12.n =
|
|
17499
|
+
_context12.n = 18;
|
|
17391
17500
|
break;
|
|
17392
17501
|
case 17:
|
|
17393
|
-
|
|
17502
|
+
throw new Error('Connection required to send message');
|
|
17503
|
+
case 18:
|
|
17504
|
+
_context12.n = 23;
|
|
17505
|
+
break;
|
|
17506
|
+
case 19:
|
|
17507
|
+
_context12.p = 19;
|
|
17394
17508
|
_t = _context12.v;
|
|
17395
17509
|
isErrorResendable = isResendableError(_t === null || _t === void 0 ? void 0 : _t.type);
|
|
17396
17510
|
if (!((_channel2 = channel) !== null && _channel2 !== void 0 && _channel2.id && (_messageToSend2 = messageToSend) !== null && _messageToSend2 !== void 0 && _messageToSend2.tid)) {
|
|
17397
|
-
_context12.n =
|
|
17511
|
+
_context12.n = 23;
|
|
17398
17512
|
break;
|
|
17399
17513
|
}
|
|
17400
17514
|
log.error('Error on uploading attachment', messageToSend.tid, _t);
|
|
17401
17515
|
if (!((_messageToSend$attach = messageToSend.attachments) !== null && _messageToSend$attach !== void 0 && _messageToSend$attach.length)) {
|
|
17402
|
-
_context12.n =
|
|
17516
|
+
_context12.n = 22;
|
|
17403
17517
|
break;
|
|
17404
17518
|
}
|
|
17405
17519
|
_iterator2 = _createForOfIteratorHelperLoose(messageToSend.attachments);
|
|
17406
|
-
case
|
|
17520
|
+
case 20:
|
|
17407
17521
|
if ((_step2 = _iterator2()).done) {
|
|
17408
|
-
_context12.n =
|
|
17522
|
+
_context12.n = 22;
|
|
17409
17523
|
break;
|
|
17410
17524
|
}
|
|
17411
17525
|
att = _step2.value;
|
|
17412
17526
|
if (!att.tid) {
|
|
17413
|
-
_context12.n =
|
|
17527
|
+
_context12.n = 21;
|
|
17414
17528
|
break;
|
|
17415
17529
|
}
|
|
17416
|
-
_context12.n =
|
|
17530
|
+
_context12.n = 21;
|
|
17417
17531
|
return put(updateAttachmentUploadingStateAC(UPLOAD_STATE.FAIL, att.tid));
|
|
17418
|
-
case
|
|
17419
|
-
_context12.n =
|
|
17532
|
+
case 21:
|
|
17533
|
+
_context12.n = 20;
|
|
17420
17534
|
break;
|
|
17421
|
-
case
|
|
17422
|
-
_context12.n =
|
|
17535
|
+
case 22:
|
|
17536
|
+
_context12.n = 23;
|
|
17423
17537
|
return call(syncFailedMessageState, channel, messageToSend.tid, pendingMessages[_i2] || messageToSend, isErrorResendable);
|
|
17424
|
-
case
|
|
17538
|
+
case 23:
|
|
17425
17539
|
return _context12.a(2);
|
|
17426
17540
|
}
|
|
17427
|
-
}, _callee4, null, [[2,
|
|
17541
|
+
}, _callee4, null, [[2, 19]]);
|
|
17428
17542
|
});
|
|
17429
17543
|
_i2 = 0;
|
|
17430
17544
|
case 13:
|
|
@@ -39563,7 +39677,7 @@ var VideoIcon = styled.div(_templateObject8$a || (_templateObject8$a = _taggedTe
|
|
|
39563
39677
|
return bg;
|
|
39564
39678
|
});
|
|
39565
39679
|
|
|
39566
|
-
var _templateObject$z, _templateObject2$v, _templateObject3$p, _templateObject4$l, _templateObject5$h, _templateObject6$e, _templateObject7$d, _templateObject8$b, _templateObject9$9, _templateObject0$8, _templateObject1$8, _templateObject10$6, _templateObject11$5;
|
|
39680
|
+
var _templateObject$z, _templateObject2$v, _templateObject3$p, _templateObject4$l, _templateObject5$h, _templateObject6$e, _templateObject7$d, _templateObject8$b, _templateObject9$9, _templateObject0$8, _templateObject1$8, _templateObject10$6, _templateObject11$5, _templateObject12$4, _templateObject13$4;
|
|
39567
39681
|
var Attachment = function Attachment(_ref) {
|
|
39568
39682
|
var attachment = _ref.attachment,
|
|
39569
39683
|
_ref$isPreview = _ref.isPreview,
|
|
@@ -40362,7 +40476,9 @@ var Attachment = function Attachment(_ref) {
|
|
|
40362
40476
|
border: selectedFileAttachmentsBoxBorder || (theme === THEME.DARK ? 'none' : ''),
|
|
40363
40477
|
width: fileAttachmentWidth,
|
|
40364
40478
|
borderColor: borderColor
|
|
40365
|
-
},
|
|
40479
|
+
}, attachment.thumbnailState === 'loading' ? (/*#__PURE__*/React__default.createElement(FileThumbnailSkeleton, {
|
|
40480
|
+
color: overlayBackground2
|
|
40481
|
+
})) : attachmentThumb ? (/*#__PURE__*/React__default.createElement(FileThumbnail, {
|
|
40366
40482
|
src: withPrefix ? "data:image/jpeg;base64," + attachmentThumb : attachmentThumb,
|
|
40367
40483
|
loading: 'lazy',
|
|
40368
40484
|
decoding: 'async',
|
|
@@ -40472,18 +40588,26 @@ var AttachmentImgCont = styled.div(_templateObject2$v || (_templateObject2$v = _
|
|
|
40472
40588
|
return props.isPreview && "\n width: 48px;\n min-width: 48px;\n height: 48px;\n ";
|
|
40473
40589
|
});
|
|
40474
40590
|
var FileThumbnail = styled.img(_templateObject3$p || (_templateObject3$p = _taggedTemplateLiteralLoose(["\n min-width: 40px;\n max-width: 40px;\n height: 40px;\n object-fit: cover;\n border-radius: 8px;\n"])));
|
|
40475
|
-
var
|
|
40591
|
+
var fileThumbnailShimmer = keyframes(_templateObject4$l || (_templateObject4$l = _taggedTemplateLiteralLoose(["\n 0% { background-position: -120px 0; }\n 100% { background-position: 120px 0; }\n"])));
|
|
40592
|
+
var FileThumbnailSkeleton = styled.div(_templateObject5$h || (_templateObject5$h = _taggedTemplateLiteralLoose(["\n min-width: 40px;\n max-width: 40px;\n height: 40px;\n border-radius: 8px;\n background-color: ", ";\n background-image: linear-gradient(\n 90deg,\n ", ",\n rgba(255, 255, 255, 0.55),\n ", "\n );\n background-size: 240px 100%;\n animation: ", " 1.1s ease infinite;\n"])), function (props) {
|
|
40593
|
+
return props.color;
|
|
40594
|
+
}, function (props) {
|
|
40595
|
+
return props.color;
|
|
40596
|
+
}, function (props) {
|
|
40597
|
+
return props.color;
|
|
40598
|
+
}, fileThumbnailShimmer);
|
|
40599
|
+
var DownloadFile$1 = styled.span(_templateObject6$e || (_templateObject6$e = _taggedTemplateLiteralLoose(["\n display: none;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n background-color: ", ";\n min-width: 40px;\n max-width: 40px;\n height: 40px;\n position: ", ";\n border-radius: ", ";\n\n & > svg {\n width: 20px;\n height: 20px;\n }\n"])), function (props) {
|
|
40476
40600
|
return props.backgroundColor;
|
|
40477
40601
|
}, function (props) {
|
|
40478
40602
|
return props.widthThumb && 'absolute';
|
|
40479
40603
|
}, function (props) {
|
|
40480
40604
|
return props.widthThumb ? '7.3px' : '50%';
|
|
40481
40605
|
});
|
|
40482
|
-
var ProgressWrapper$1 = styled.span(
|
|
40483
|
-
var SizeProgress = styled.span(
|
|
40606
|
+
var ProgressWrapper$1 = styled.span(_templateObject7$d || (_templateObject7$d = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: 100%;\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"])));
|
|
40607
|
+
var SizeProgress = styled.span(_templateObject8$b || (_templateObject8$b = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: -26px;\n background-color: rgba(0, 0, 0, 0.4);\n color: ", ";\n font-size: 12px;\n border-radius: 12px;\n padding: 3px 6px;\n white-space: nowrap;\n"])), function (props) {
|
|
40484
40608
|
return props.color;
|
|
40485
40609
|
});
|
|
40486
|
-
var AttachmentFile$1 = styled.div(
|
|
40610
|
+
var AttachmentFile$1 = styled.div(_templateObject9$9 || (_templateObject9$9 = _taggedTemplateLiteralLoose(["\n display: flex;\n position: relative;\n align-items: center;\n padding: ", ";\n //width: ", ";\n min-width: ", ";\n //height: 70px;\n background: ", ";\n border: ", ";\n box-sizing: border-box;\n margin-right: ", ";\n border-radius: ", ";\n\n ", "\n\n & > ", " svg {\n width: 40px;\n height: 40px;\n }\n"])), function (props) {
|
|
40487
40611
|
return !props.isRepliedMessage && '8px 12px;';
|
|
40488
40612
|
}, function (props) {
|
|
40489
40613
|
return !props.isRepliedMessage && (props.width ? props.width + "px" : '350px');
|
|
@@ -40500,25 +40624,25 @@ var AttachmentFile$1 = styled.div(_templateObject7$d || (_templateObject7$d = _t
|
|
|
40500
40624
|
}, function (props) {
|
|
40501
40625
|
return !props.isRepliedMessage && !props.isPreview && !props.isUploading && "\n &:hover " + DownloadFile$1 + " {\n display: flex;\n }\n\n &:hover " + UploadPercent + " {\n border-radius: 50%\n }\n\n &:hover " + FileThumbnail + " {\n }\n &:hover " + AttachmentIconCont + " {\n display: none;\n }\n ";
|
|
40502
40626
|
}, AttachmentIconCont);
|
|
40503
|
-
var RemoveChosenFile = styled(SvgDeleteUpload)(
|
|
40627
|
+
var RemoveChosenFile = styled(SvgDeleteUpload)(_templateObject0$8 || (_templateObject0$8 = _taggedTemplateLiteralLoose(["\n position: absolute;\n width: 20px;\n height: 20px !important;\n top: -11px;\n right: -11px;\n padding: 2px;\n cursor: pointer;\n color: ", ";\n z-index: 5;\n circle {\n stroke: ", ";\n }\n path {\n stroke: ", ";\n }\n"])), function (props) {
|
|
40504
40628
|
return props.color;
|
|
40505
40629
|
}, function (props) {
|
|
40506
40630
|
return props.$backgroundColor;
|
|
40507
40631
|
}, function (props) {
|
|
40508
40632
|
return props.$backgroundColor;
|
|
40509
40633
|
});
|
|
40510
|
-
var AttachmentName = styled.h3(
|
|
40634
|
+
var AttachmentName = styled.h3(_templateObject1$8 || (_templateObject1$8 = _taggedTemplateLiteralLoose(["\n font-size: 15px;\n font-weight: 500;\n line-height: 18px;\n color: ", ";\n max-width: 275px;\n white-space: nowrap;\n margin: 0;\n"])), function (props) {
|
|
40511
40635
|
return props.color;
|
|
40512
40636
|
});
|
|
40513
|
-
var AttachmentSize = styled.span(
|
|
40637
|
+
var AttachmentSize = styled.span(_templateObject10$6 || (_templateObject10$6 = _taggedTemplateLiteralLoose(["\n font-size: 13px;\n color: ", ";\n & > span {\n color: ", ";\n margin-left: 8px;\n }\n"])), function (props) {
|
|
40514
40638
|
return props.color;
|
|
40515
40639
|
}, function (props) {
|
|
40516
40640
|
return props.errorColor;
|
|
40517
40641
|
});
|
|
40518
|
-
var AttachmentFileInfo = styled.div(
|
|
40642
|
+
var AttachmentFileInfo = styled.div(_templateObject11$5 || (_templateObject11$5 = _taggedTemplateLiteralLoose(["\n margin-left: 12px;\n ", "\n"])), function (props) {
|
|
40519
40643
|
return props.isPreview && "line-height: 14px;\n max-width: calc(100% - 44px);\n ";
|
|
40520
40644
|
});
|
|
40521
|
-
var AttachmentImg = styled.img(
|
|
40645
|
+
var AttachmentImg = styled.img(_templateObject12$4 || (_templateObject12$4 = _taggedTemplateLiteralLoose(["\n position: ", ";\n border-radius: ", ";\n padding: ", ";\n box-sizing: border-box;\n width: ", ";\n height: ", ";\n object-fit: cover;\n visibility: ", ";\n z-index: 2;\n opacity: ", ";\n transition: opacity 0.3s ease-in-out;\n"])), function (props) {
|
|
40522
40646
|
return props.absolute && 'absolute';
|
|
40523
40647
|
}, function (props) {
|
|
40524
40648
|
return props.isRepliedMessage ? '4px' : props.borderRadius || '6px';
|
|
@@ -40533,7 +40657,7 @@ var AttachmentImg = styled.img(_templateObject10$6 || (_templateObject10$6 = _ta
|
|
|
40533
40657
|
}, function (props) {
|
|
40534
40658
|
return props.$shouldAnimate && !props.$isLoaded ? 0 : 1;
|
|
40535
40659
|
});
|
|
40536
|
-
var VideoCont = styled.div(
|
|
40660
|
+
var VideoCont = styled.div(_templateObject13$4 || (_templateObject13$4 = _taggedTemplateLiteralLoose(["\n position: relative;\n cursor: pointer;\n height: ", ";\n"])), function (props) {
|
|
40537
40661
|
return props.isDetailsView && '100%';
|
|
40538
40662
|
});
|
|
40539
40663
|
|
|
@@ -41916,7 +42040,7 @@ function SvgFilledCheckbox(props) {
|
|
|
41916
42040
|
})));
|
|
41917
42041
|
}
|
|
41918
42042
|
|
|
41919
|
-
var _templateObject$G, _templateObject2$B, _templateObject3$v, _templateObject4$q, _templateObject5$l, _templateObject6$i, _templateObject7$h, _templateObject8$f, _templateObject9$c, _templateObject0$b, _templateObject1$b, _templateObject10$9, _templateObject11$6, _templateObject12$
|
|
42043
|
+
var _templateObject$G, _templateObject2$B, _templateObject3$v, _templateObject4$q, _templateObject5$l, _templateObject6$i, _templateObject7$h, _templateObject8$f, _templateObject9$c, _templateObject0$b, _templateObject1$b, _templateObject10$9, _templateObject11$6, _templateObject12$5;
|
|
41920
42044
|
var PollMessage = function PollMessage(_ref) {
|
|
41921
42045
|
var _poll$voteDetails3, _poll$voteDetails4, _poll$voteDetails5, _poll$voteDetails6, _poll$voteDetails7;
|
|
41922
42046
|
var message = _ref.message,
|
|
@@ -42107,7 +42231,7 @@ var Bar = styled.div(_templateObject10$9 || (_templateObject10$9 = _taggedTempla
|
|
|
42107
42231
|
return p.track;
|
|
42108
42232
|
});
|
|
42109
42233
|
var Fill = styled.div(_templateObject11$6 || (_templateObject11$6 = _taggedTemplateLiteralLoose(["\n height: 100%;\n border-radius: 6px;\n transition: width 0.3s ease-in-out;\n"])));
|
|
42110
|
-
var UsersContainer = styled.div(_templateObject12$
|
|
42234
|
+
var UsersContainer = styled.div(_templateObject12$5 || (_templateObject12$5 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n margin-left: auto;\n padding-left: 16px;\n height: max-content;\n cursor: ", ";\n"])), function (p) {
|
|
42111
42235
|
return p.cursor;
|
|
42112
42236
|
});
|
|
42113
42237
|
|
|
@@ -43682,7 +43806,7 @@ function SvgCircleDashed(props) {
|
|
|
43682
43806
|
})));
|
|
43683
43807
|
}
|
|
43684
43808
|
|
|
43685
|
-
var _templateObject$L, _templateObject2$G, _templateObject3$A, _templateObject4$v, _templateObject5$q, _templateObject6$m, _templateObject7$l, _templateObject8$j, _templateObject9$g, _templateObject0$f, _templateObject1$d, _templateObject10$a, _templateObject11$7, _templateObject12$
|
|
43809
|
+
var _templateObject$L, _templateObject2$G, _templateObject3$A, _templateObject4$v, _templateObject5$q, _templateObject6$m, _templateObject7$l, _templateObject8$j, _templateObject9$g, _templateObject0$f, _templateObject1$d, _templateObject10$a, _templateObject11$7, _templateObject12$6, _templateObject13$5;
|
|
43686
43810
|
var defaultFormatDate = function defaultFormatDate(date) {
|
|
43687
43811
|
var m = moment(date);
|
|
43688
43812
|
if (m.isSame(moment(), 'day')) {
|
|
@@ -44305,10 +44429,10 @@ var Content = styled.div(_templateObject1$d || (_templateObject1$d = _taggedTemp
|
|
|
44305
44429
|
});
|
|
44306
44430
|
var P2PStatusList = styled.div(_templateObject10$a || (_templateObject10$a = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n"])));
|
|
44307
44431
|
var P2PStatusRow = styled.div(_templateObject11$7 || (_templateObject11$7 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 4px;\n height: 48px;\n"])));
|
|
44308
|
-
var P2PStatusLabel = styled.div(_templateObject12$
|
|
44432
|
+
var P2PStatusLabel = styled.div(_templateObject12$6 || (_templateObject12$6 = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-family: Inter;\n font-weight: 500;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.2px;\n"])), function (p) {
|
|
44309
44433
|
return p.color;
|
|
44310
44434
|
});
|
|
44311
|
-
var P2PStatusDate = styled.div(_templateObject13$
|
|
44435
|
+
var P2PStatusDate = styled.div(_templateObject13$5 || (_templateObject13$5 = _taggedTemplateLiteralLoose(["\n color: ", ";\n min-width: max-content;\n font-family: Inter;\n font-weight: 400;\n font-size: 13px;\n line-height: 16px;\n letter-spacing: 0px;\n"])), function (p) {
|
|
44312
44436
|
return p.color;
|
|
44313
44437
|
});
|
|
44314
44438
|
|
|
@@ -52235,7 +52359,7 @@ var SettingItem = styled.div(_templateObject9$i || (_templateObject9$i = _tagged
|
|
|
52235
52359
|
return props.color;
|
|
52236
52360
|
});
|
|
52237
52361
|
|
|
52238
|
-
var _templateObject$W, _templateObject2$R, _templateObject3$I, _templateObject4$C, _templateObject5$x, _templateObject6$t, _templateObject7$q, _templateObject8$n, _templateObject9$j, _templateObject0$h, _templateObject1$f, _templateObject10$c, _templateObject11$9, _templateObject12$
|
|
52362
|
+
var _templateObject$W, _templateObject2$R, _templateObject3$I, _templateObject4$C, _templateObject5$x, _templateObject6$t, _templateObject7$q, _templateObject8$n, _templateObject9$j, _templateObject0$h, _templateObject1$f, _templateObject10$c, _templateObject11$9, _templateObject12$7, _templateObject13$6, _templateObject14$4, _templateObject15$2, _templateObject16$2, _templateObject17$2, _templateObject18$2, _templateObject19$2, _templateObject20$2, _templateObject21$2, _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, _templateObject35$1, _templateObject36$1, _templateObject37$1, _templateObject38$1, _templateObject39$1, _templateObject40$1, _templateObject41$1, _templateObject42, _templateObject43, _templateObject44, _templateObject45;
|
|
52239
52363
|
function AutoFocusPlugin(_ref) {
|
|
52240
52364
|
var messageForReply = _ref.messageForReply;
|
|
52241
52365
|
var _useLexicalComposerCo = useLexicalComposerContext(),
|
|
@@ -52790,7 +52914,8 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
52790
52914
|
upload: attachment.upload,
|
|
52791
52915
|
metadata: attachment.metadata,
|
|
52792
52916
|
type: attachment.type,
|
|
52793
|
-
size: attachment.size
|
|
52917
|
+
size: attachment.size,
|
|
52918
|
+
thumbnailState: attachment.thumbnailState
|
|
52794
52919
|
};
|
|
52795
52920
|
});
|
|
52796
52921
|
if (viewOnce && canShowViewOnceToggle) {
|
|
@@ -52934,10 +53059,14 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
52934
53059
|
var updatedAttachments = attachmentsUpdate.filter(function (item) {
|
|
52935
53060
|
return item.tid !== attachmentId;
|
|
52936
53061
|
});
|
|
53062
|
+
clearVideoPreparation(attachmentId);
|
|
52937
53063
|
releaseBlobUrls(["compose_" + attachmentId]);
|
|
52938
53064
|
setAttachments(updatedAttachments);
|
|
52939
53065
|
attachmentsUpdate = updatedAttachments;
|
|
52940
53066
|
} else {
|
|
53067
|
+
attachmentsUpdate.forEach(function (attachment) {
|
|
53068
|
+
return clearVideoPreparation(attachment.tid);
|
|
53069
|
+
});
|
|
52941
53070
|
releaseBlobUrls(attachmentsUpdate.map(function (item) {
|
|
52942
53071
|
return "compose_" + item.tid;
|
|
52943
53072
|
}));
|
|
@@ -53169,260 +53298,213 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
53169
53298
|
};
|
|
53170
53299
|
var handleAddAttachment = function handleAddAttachment(file, isMediaAttachment) {
|
|
53171
53300
|
try {
|
|
53172
|
-
var
|
|
53173
|
-
|
|
53174
|
-
|
|
53175
|
-
|
|
53176
|
-
|
|
53177
|
-
|
|
53178
|
-
|
|
53179
|
-
|
|
53180
|
-
|
|
53181
|
-
|
|
53182
|
-
|
|
53183
|
-
|
|
53184
|
-
|
|
53185
|
-
|
|
53186
|
-
|
|
53187
|
-
|
|
53188
|
-
|
|
53189
|
-
|
|
53190
|
-
|
|
53191
|
-
|
|
53192
|
-
|
|
53193
|
-
|
|
53194
|
-
|
|
53195
|
-
|
|
53196
|
-
|
|
53197
|
-
|
|
53198
|
-
|
|
53199
|
-
|
|
53200
|
-
|
|
53201
|
-
|
|
53202
|
-
|
|
53203
|
-
|
|
53204
|
-
|
|
53205
|
-
|
|
53206
|
-
|
|
53207
|
-
|
|
53208
|
-
|
|
53209
|
-
|
|
53210
|
-
|
|
53211
|
-
|
|
53212
|
-
|
|
53213
|
-
|
|
53214
|
-
|
|
53215
|
-
|
|
53216
|
-
|
|
53217
|
-
|
|
53218
|
-
|
|
53219
|
-
|
|
53220
|
-
|
|
53221
|
-
|
|
53222
|
-
|
|
53223
|
-
|
|
53224
|
-
|
|
53225
|
-
|
|
53226
|
-
|
|
53227
|
-
|
|
53228
|
-
|
|
53229
|
-
|
|
53230
|
-
|
|
53231
|
-
|
|
53232
|
-
|
|
53233
|
-
|
|
53234
|
-
|
|
53235
|
-
|
|
53236
|
-
|
|
53237
|
-
|
|
53238
|
-
|
|
53239
|
-
|
|
53240
|
-
|
|
53241
|
-
|
|
53242
|
-
|
|
53243
|
-
|
|
53244
|
-
|
|
53245
|
-
|
|
53246
|
-
|
|
53247
|
-
|
|
53248
|
-
var attachment = {
|
|
53249
|
-
data: file,
|
|
53250
|
-
upload: false,
|
|
53251
|
-
type: isMediaAttachment ? fileType : 'file',
|
|
53252
|
-
attachmentUrl: createComposePreviewUrl(tid, file),
|
|
53253
|
-
tid: tid,
|
|
53254
|
-
size: file.size,
|
|
53255
|
-
metadata: {
|
|
53256
|
-
szw: width,
|
|
53257
|
-
szh: height,
|
|
53258
|
-
tmb: thumb,
|
|
53259
|
-
dur: duration
|
|
53260
|
-
}
|
|
53261
|
-
};
|
|
53262
|
-
handleAttachmentVideoForCache(attachment);
|
|
53263
|
-
setAttachments(function (prevState) {
|
|
53264
|
-
return [].concat(prevState, [attachment]);
|
|
53265
|
-
});
|
|
53266
|
-
});
|
|
53267
|
-
} else {
|
|
53268
|
-
setAttachments(function (prevState) {
|
|
53269
|
-
return [].concat(prevState, [{
|
|
53270
|
-
data: file,
|
|
53271
|
-
upload: false,
|
|
53272
|
-
type: 'file',
|
|
53273
|
-
tid: tid,
|
|
53274
|
-
size: file.size
|
|
53275
|
-
}]);
|
|
53276
|
-
});
|
|
53277
|
-
}
|
|
53278
|
-
}();
|
|
53279
|
-
if (_temp1 && _temp1.then) return _temp1.then(function () {});
|
|
53280
|
-
}
|
|
53281
|
-
}();
|
|
53282
|
-
if (_temp6 && _temp6.then) return _temp6.then(function () {});
|
|
53283
|
-
} else {
|
|
53284
|
-
var _temp9 = function () {
|
|
53285
|
-
if (fileType === 'image') {
|
|
53286
|
-
var _temp7 = function () {
|
|
53287
|
-
if (isMediaAttachment) {
|
|
53288
|
-
return Promise.resolve(createImageThumbnail(file)).then(function (_ref6) {
|
|
53289
|
-
var thumbnail = _ref6.thumbnail,
|
|
53290
|
-
imageWidth = _ref6.imageWidth,
|
|
53291
|
-
imageHeight = _ref6.imageHeight;
|
|
53292
|
-
var metas = {
|
|
53293
|
-
thumbnail: thumbnail,
|
|
53294
|
-
imageWidth: imageWidth,
|
|
53295
|
-
imageHeight: imageHeight
|
|
53296
|
-
};
|
|
53297
|
-
if (file.type === 'image/gif') {
|
|
53298
|
-
setAttachments(function (prevState) {
|
|
53299
|
-
return [].concat(prevState, [{
|
|
53300
|
-
data: file,
|
|
53301
|
-
upload: true,
|
|
53302
|
-
attachmentUrl: createComposePreviewUrl(tid, file),
|
|
53303
|
-
tid: tid,
|
|
53304
|
-
type: fileType,
|
|
53305
|
-
size: file.size,
|
|
53306
|
-
metadata: JSON.stringify({
|
|
53307
|
-
tmb: metas.thumbnail,
|
|
53308
|
-
szw: metas.imageWidth,
|
|
53309
|
-
szh: metas.imageHeight
|
|
53310
|
-
})
|
|
53311
|
-
}]);
|
|
53312
|
-
});
|
|
53313
|
-
} else {
|
|
53314
|
-
resizeImage(file).then(function (resizedFileData) {
|
|
53315
|
-
try {
|
|
53316
|
-
var resizedFile = new File([resizedFileData.blob], resizedFileData.file.name);
|
|
53317
|
-
var attachment = {
|
|
53318
|
-
data: resizedFile,
|
|
53319
|
-
upload: true,
|
|
53320
|
-
attachmentUrl: createComposePreviewUrl(tid, resizedFile),
|
|
53321
|
-
tid: tid,
|
|
53322
|
-
type: fileType,
|
|
53323
|
-
size: resizedFile.size,
|
|
53324
|
-
metadata: JSON.stringify({
|
|
53325
|
-
tmb: metas.thumbnail,
|
|
53326
|
-
szw: resizedFileData.newWidth,
|
|
53327
|
-
szh: resizedFileData.newHeight
|
|
53328
|
-
})
|
|
53329
|
-
};
|
|
53330
|
-
handleAttachmentImageForCache(attachment);
|
|
53331
|
-
setAttachments(function (prevState) {
|
|
53332
|
-
return [].concat(prevState, [attachment]);
|
|
53333
|
-
});
|
|
53334
|
-
return Promise.resolve();
|
|
53335
|
-
} catch (e) {
|
|
53336
|
-
return Promise.reject(e);
|
|
53337
|
-
}
|
|
53338
|
-
});
|
|
53301
|
+
var customUploader = getCustomUploader();
|
|
53302
|
+
var fileType = file.type.split('/')[0];
|
|
53303
|
+
var tid = v4();
|
|
53304
|
+
var handleAttachmentImageForCache = function handleAttachmentImageForCache(attachment) {
|
|
53305
|
+
try {
|
|
53306
|
+
var _attachment$metadata;
|
|
53307
|
+
var url = URL.createObjectURL(attachment.data);
|
|
53308
|
+
dispatch(setUpdateMessageAttachmentAC((attachment === null || attachment === void 0 ? void 0 : (_attachment$metadata = attachment.metadata) === null || _attachment$metadata === void 0 ? void 0 : _attachment$metadata.tmb) || '', url));
|
|
53309
|
+
return Promise.resolve();
|
|
53310
|
+
} catch (e) {
|
|
53311
|
+
return Promise.reject(e);
|
|
53312
|
+
}
|
|
53313
|
+
};
|
|
53314
|
+
var handleAttachmentVideoForCache = function handleAttachmentVideoForCache(attachment) {
|
|
53315
|
+
try {
|
|
53316
|
+
var _calculateRenderedIma = calculateRenderedImageWidth(attachment.metadata.szh || 400, attachment.metadata.szh || 400),
|
|
53317
|
+
newWidth = _calculateRenderedIma[0],
|
|
53318
|
+
newHeight = _calculateRenderedIma[1];
|
|
53319
|
+
return Promise.resolve(getVideoFirstFrame(attachment.data, newWidth, newHeight)).then(function (result) {
|
|
53320
|
+
if (result) {
|
|
53321
|
+
var _attachment$metadata2;
|
|
53322
|
+
var frameBlobUrl = result.frameBlobUrl;
|
|
53323
|
+
dispatch(setUpdateMessageAttachmentAC((attachment === null || attachment === void 0 ? void 0 : (_attachment$metadata2 = attachment.metadata) === null || _attachment$metadata2 === void 0 ? void 0 : _attachment$metadata2.tmb) || '', frameBlobUrl));
|
|
53324
|
+
}
|
|
53325
|
+
});
|
|
53326
|
+
} catch (e) {
|
|
53327
|
+
return Promise.reject(e);
|
|
53328
|
+
}
|
|
53329
|
+
};
|
|
53330
|
+
setPendingAttachment(tid, {
|
|
53331
|
+
file: file
|
|
53332
|
+
});
|
|
53333
|
+
if (fileType === 'video') {
|
|
53334
|
+
beginVideoPreparation(tid, file);
|
|
53335
|
+
}
|
|
53336
|
+
var type = fileType === 'video' && (!customUploader || isMediaAttachment) ? 'video' : isMediaAttachment && fileType === 'image' ? 'image' : 'file';
|
|
53337
|
+
var attachment = _extends({
|
|
53338
|
+
data: file,
|
|
53339
|
+
upload: !customUploader,
|
|
53340
|
+
type: type,
|
|
53341
|
+
tid: tid,
|
|
53342
|
+
size: file.size
|
|
53343
|
+
}, fileType === 'video' && !isMediaAttachment ? {
|
|
53344
|
+
thumbnailState: 'loading'
|
|
53345
|
+
} : {}, fileType === 'image' || fileType === 'video' ? {
|
|
53346
|
+
attachmentUrl: createComposePreviewUrl(tid, file),
|
|
53347
|
+
metadata: customUploader ? {} : '{}'
|
|
53348
|
+
} : {});
|
|
53349
|
+
setAttachments(function (prevState) {
|
|
53350
|
+
return [].concat(prevState, [attachment]);
|
|
53351
|
+
});
|
|
53352
|
+
var updateAttachment = function updateAttachment(patch) {
|
|
53353
|
+
setAttachments(function (prevState) {
|
|
53354
|
+
return prevState.map(function (current) {
|
|
53355
|
+
return current.tid === tid ? _extends({}, current, patch) : current;
|
|
53356
|
+
});
|
|
53357
|
+
});
|
|
53358
|
+
};
|
|
53359
|
+
setTimeout(function () {
|
|
53360
|
+
try {
|
|
53361
|
+
var _temp1 = function () {
|
|
53362
|
+
if (fileType === 'image') {
|
|
53363
|
+
var _temp5 = _catch(function () {
|
|
53364
|
+
return Promise.resolve(createImageThumbnail(file)).then(function (_ref4) {
|
|
53365
|
+
var thumbnail = _ref4.thumbnail,
|
|
53366
|
+
imageWidth = _ref4.imageWidth,
|
|
53367
|
+
imageHeight = _ref4.imageHeight;
|
|
53368
|
+
var _temp4 = function () {
|
|
53369
|
+
if (customUploader) {
|
|
53370
|
+
return Promise.resolve(resizeImage(file)).then(function (resizedFile) {
|
|
53371
|
+
var patch = {
|
|
53372
|
+
size: isMediaAttachment && resizedFile !== null && resizedFile !== void 0 && resizedFile.blob ? resizedFile.blob.size : file.size,
|
|
53373
|
+
metadata: {
|
|
53374
|
+
szw: imageWidth,
|
|
53375
|
+
szh: imageHeight,
|
|
53376
|
+
tmb: thumbnail
|
|
53339
53377
|
}
|
|
53340
|
-
}
|
|
53341
|
-
|
|
53342
|
-
|
|
53343
|
-
|
|
53344
|
-
|
|
53345
|
-
|
|
53346
|
-
|
|
53347
|
-
|
|
53348
|
-
|
|
53349
|
-
|
|
53350
|
-
|
|
53351
|
-
|
|
53378
|
+
};
|
|
53379
|
+
updateAttachment(patch);
|
|
53380
|
+
handleAttachmentImageForCache(_extends({}, attachment, patch));
|
|
53381
|
+
});
|
|
53382
|
+
} else {
|
|
53383
|
+
var _temp10 = function () {
|
|
53384
|
+
if (isMediaAttachment && file.type !== 'image/gif') {
|
|
53385
|
+
return Promise.resolve(resizeImage(file)).then(function (resizedFileData) {
|
|
53386
|
+
var resizedFile = resizedFileData.blob ? new File([resizedFileData.blob], resizedFileData.file.name, {
|
|
53387
|
+
type: file.type
|
|
53388
|
+
}) : file;
|
|
53389
|
+
var patch = {
|
|
53390
|
+
data: resizedFile,
|
|
53391
|
+
size: resizedFile.size,
|
|
53352
53392
|
metadata: JSON.stringify({
|
|
53353
|
-
tmb: thumbnail
|
|
53393
|
+
tmb: thumbnail,
|
|
53394
|
+
szw: resizedFileData.newWidth,
|
|
53395
|
+
szh: resizedFileData.newHeight
|
|
53354
53396
|
})
|
|
53355
|
-
}
|
|
53397
|
+
};
|
|
53398
|
+
updateAttachment(patch);
|
|
53399
|
+
setPendingAttachment(tid, {
|
|
53400
|
+
file: resizedFile
|
|
53401
|
+
});
|
|
53402
|
+
handleAttachmentImageForCache(_extends({}, attachment, patch));
|
|
53403
|
+
});
|
|
53404
|
+
} else {
|
|
53405
|
+
updateAttachment({
|
|
53406
|
+
metadata: JSON.stringify({
|
|
53407
|
+
tmb: thumbnail,
|
|
53408
|
+
szw: imageWidth,
|
|
53409
|
+
szh: imageHeight
|
|
53410
|
+
})
|
|
53356
53411
|
});
|
|
53412
|
+
}
|
|
53413
|
+
}();
|
|
53414
|
+
if (_temp10 && _temp10.then) return _temp10.then(function () {});
|
|
53415
|
+
}
|
|
53416
|
+
}();
|
|
53417
|
+
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
53418
|
+
});
|
|
53419
|
+
}, function (error) {
|
|
53420
|
+
log.warn('Unable to prepare image attachment preview:', error);
|
|
53421
|
+
});
|
|
53422
|
+
if (_temp5 && _temp5.then) return _temp5.then(function () {});
|
|
53423
|
+
} else {
|
|
53424
|
+
var _temp11 = function () {
|
|
53425
|
+
if (fileType === 'video') {
|
|
53426
|
+
var _temp9 = function _temp9() {
|
|
53427
|
+
return Promise.resolve(remuxPromise).then(function (uploadFile) {
|
|
53428
|
+
if (uploadFile !== file) {
|
|
53429
|
+
updateAttachment({
|
|
53430
|
+
data: uploadFile,
|
|
53431
|
+
size: uploadFile.size
|
|
53432
|
+
});
|
|
53433
|
+
setPendingAttachment(tid, {
|
|
53434
|
+
file: uploadFile
|
|
53357
53435
|
});
|
|
53358
53436
|
}
|
|
53359
|
-
|
|
53360
|
-
|
|
53361
|
-
|
|
53362
|
-
|
|
53363
|
-
if (fileType === 'video') {
|
|
53364
|
-
return Promise.resolve(getFrame(file, 0)).then(function (_ref8) {
|
|
53365
|
-
var thumb = _ref8.thumb,
|
|
53366
|
-
width = _ref8.width,
|
|
53367
|
-
height = _ref8.height,
|
|
53368
|
-
duration = _ref8.duration;
|
|
53369
|
-
var metas = JSON.stringify({
|
|
53370
|
-
tmb: thumb,
|
|
53371
|
-
width: width,
|
|
53372
|
-
height: height,
|
|
53373
|
-
dur: duration
|
|
53374
|
-
});
|
|
53375
|
-
var attachment = {
|
|
53376
|
-
data: file,
|
|
53377
|
-
type: 'video',
|
|
53378
|
-
upload: true,
|
|
53379
|
-
size: file.size,
|
|
53380
|
-
attachmentUrl: createComposePreviewUrl(tid, file),
|
|
53381
|
-
tid: tid,
|
|
53382
|
-
metadata: metas
|
|
53383
|
-
};
|
|
53384
|
-
handleAttachmentVideoForCache(attachment);
|
|
53385
|
-
setAttachments(function (prevState) {
|
|
53386
|
-
return [].concat(prevState, [attachment]);
|
|
53387
|
-
});
|
|
53437
|
+
if (metadata) {
|
|
53438
|
+
completeVideoPreparation(tid, {
|
|
53439
|
+
file: uploadFile,
|
|
53440
|
+
metadata: metadata
|
|
53388
53441
|
});
|
|
53389
53442
|
} else {
|
|
53390
|
-
|
|
53391
|
-
|
|
53392
|
-
|
|
53393
|
-
upload: true,
|
|
53394
|
-
type: 'file',
|
|
53395
|
-
size: file.size,
|
|
53396
|
-
tid: tid
|
|
53397
|
-
}]);
|
|
53443
|
+
failVideoPreparation(tid);
|
|
53444
|
+
updateAttachment({
|
|
53445
|
+
thumbnailState: 'failed'
|
|
53398
53446
|
});
|
|
53399
53447
|
}
|
|
53400
|
-
}
|
|
53401
|
-
|
|
53402
|
-
|
|
53403
|
-
|
|
53404
|
-
|
|
53405
|
-
|
|
53406
|
-
|
|
53407
|
-
|
|
53408
|
-
|
|
53409
|
-
|
|
53410
|
-
|
|
53411
|
-
|
|
53412
|
-
|
|
53413
|
-
|
|
53414
|
-
|
|
53415
|
-
|
|
53416
|
-
|
|
53417
|
-
|
|
53418
|
-
|
|
53419
|
-
|
|
53420
|
-
|
|
53421
|
-
|
|
53422
|
-
|
|
53448
|
+
});
|
|
53449
|
+
};
|
|
53450
|
+
var remuxPromise = remuxVideoFileForUpload(file);
|
|
53451
|
+
var thumbnailSource = file;
|
|
53452
|
+
var metadata;
|
|
53453
|
+
var _temp8 = _catch(function () {
|
|
53454
|
+
function _temp7() {
|
|
53455
|
+
var _frame = frame,
|
|
53456
|
+
thumb = _frame.thumb,
|
|
53457
|
+
width = _frame.width,
|
|
53458
|
+
height = _frame.height,
|
|
53459
|
+
duration = _frame.duration;
|
|
53460
|
+
metadata = customUploader ? {
|
|
53461
|
+
szw: width,
|
|
53462
|
+
szh: height,
|
|
53463
|
+
tmb: thumb,
|
|
53464
|
+
dur: duration
|
|
53465
|
+
} : JSON.stringify({
|
|
53466
|
+
tmb: thumb,
|
|
53467
|
+
szw: width,
|
|
53468
|
+
szh: height,
|
|
53469
|
+
dur: duration
|
|
53470
|
+
});
|
|
53471
|
+
updateAttachment({
|
|
53472
|
+
metadata: metadata,
|
|
53473
|
+
thumbnailState: 'ready'
|
|
53474
|
+
});
|
|
53475
|
+
handleAttachmentVideoForCache(_extends({}, attachment, {
|
|
53476
|
+
metadata: metadata
|
|
53477
|
+
}));
|
|
53478
|
+
}
|
|
53479
|
+
var frame;
|
|
53480
|
+
var _temp6 = _catch(function () {
|
|
53481
|
+
return Promise.resolve(getFrame(thumbnailSource, 0)).then(function (_getFrame) {
|
|
53482
|
+
frame = _getFrame;
|
|
53483
|
+
});
|
|
53484
|
+
}, function () {
|
|
53485
|
+
return Promise.resolve(remuxPromise).then(function (_remuxPromise) {
|
|
53486
|
+
thumbnailSource = _remuxPromise;
|
|
53487
|
+
return Promise.resolve(getFrame(thumbnailSource, 0)).then(function (_getFrame2) {
|
|
53488
|
+
frame = _getFrame2;
|
|
53489
|
+
});
|
|
53490
|
+
});
|
|
53491
|
+
});
|
|
53492
|
+
return _temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6);
|
|
53493
|
+
}, function (error) {
|
|
53494
|
+
log.warn('Unable to generate video thumbnail:', error);
|
|
53495
|
+
});
|
|
53496
|
+
return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
|
|
53497
|
+
}
|
|
53498
|
+
}();
|
|
53499
|
+
if (_temp11 && _temp11.then) return _temp11.then(function () {});
|
|
53500
|
+
}
|
|
53501
|
+
}();
|
|
53502
|
+
return Promise.resolve(_temp1 && _temp1.then ? _temp1.then(function () {}) : void 0);
|
|
53503
|
+
} catch (e) {
|
|
53504
|
+
return Promise.reject(e);
|
|
53423
53505
|
}
|
|
53424
|
-
}
|
|
53425
|
-
return Promise.resolve(
|
|
53506
|
+
}, 0);
|
|
53507
|
+
return Promise.resolve();
|
|
53426
53508
|
} catch (e) {
|
|
53427
53509
|
return Promise.reject(e);
|
|
53428
53510
|
}
|
|
@@ -53481,14 +53563,14 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
53481
53563
|
}
|
|
53482
53564
|
}
|
|
53483
53565
|
}
|
|
53484
|
-
var
|
|
53566
|
+
var _temp12 = function () {
|
|
53485
53567
|
if (allowUpload) {
|
|
53486
53568
|
return Promise.resolve(handleAddAttachmentWithViewOnceCheck(file, isMediaAttachment)).then(function () {});
|
|
53487
53569
|
} else {
|
|
53488
53570
|
showFileUploadError(errorMessage);
|
|
53489
53571
|
}
|
|
53490
53572
|
}();
|
|
53491
|
-
return Promise.resolve(
|
|
53573
|
+
return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(function () {}) : void 0);
|
|
53492
53574
|
} catch (e) {
|
|
53493
53575
|
return Promise.reject(e);
|
|
53494
53576
|
}
|
|
@@ -53591,18 +53673,7 @@ var SendMessageInput = function SendMessageInput(_ref3) {
|
|
|
53591
53673
|
useEffect(function () {
|
|
53592
53674
|
if (messageText.trim() || editMessageText !== null && editMessageText !== void 0 && editMessageText.trim() && editMessageText && (editMessageText === null || editMessageText === void 0 ? void 0 : editMessageText.trim()) !== (messageToEdit === null || messageToEdit === void 0 ? void 0 : messageToEdit.body) || attachments.length) {
|
|
53593
53675
|
if (attachments.length) {
|
|
53594
|
-
|
|
53595
|
-
attachments.forEach(function (att) {
|
|
53596
|
-
if ((att.type === 'video' || att.data.type.split('/')[0] === 'video') && att.type !== 'file') {
|
|
53597
|
-
videoAttachment = true;
|
|
53598
|
-
if (readyVideoAttachments[att.tid]) {
|
|
53599
|
-
setSendMessageIsActive(true);
|
|
53600
|
-
}
|
|
53601
|
-
}
|
|
53602
|
-
});
|
|
53603
|
-
if (!videoAttachment) {
|
|
53604
|
-
setSendMessageIsActive(true);
|
|
53605
|
-
}
|
|
53676
|
+
setSendMessageIsActive(true);
|
|
53606
53677
|
} else {
|
|
53607
53678
|
setSendMessageIsActive(true);
|
|
53608
53679
|
}
|
|
@@ -54285,14 +54356,14 @@ var SendMessageInputContainer = styled.div(_templateObject11$9 || (_templateObje
|
|
|
54285
54356
|
}, AddAttachmentIcon, function (props) {
|
|
54286
54357
|
return props.iconColor;
|
|
54287
54358
|
});
|
|
54288
|
-
var MessageInputWrapper = styled.div(_templateObject12$
|
|
54359
|
+
var MessageInputWrapper = styled.div(_templateObject12$7 || (_templateObject12$7 = _taggedTemplateLiteralLoose(["\n display: flex;\n width: 100%;\n max-width: calc(100% - 50px);\n //max-width: ", ";\n //max-width: calc(100% - 110px);\n background-color: ", ";\n border-radius: ", ";\n position: relative;\n"])), function (props) {
|
|
54289
54360
|
return props.channelDetailsIsOpen ? "calc(100% - " + (props.channelDetailsIsOpen ? 362 : 0) + "px)" : '';
|
|
54290
54361
|
}, function (props) {
|
|
54291
54362
|
return props.backgroundColor;
|
|
54292
54363
|
}, function (props) {
|
|
54293
54364
|
return props.borderRadius || '18px';
|
|
54294
54365
|
});
|
|
54295
|
-
var LexicalWrapper = styled.div(_templateObject13$
|
|
54366
|
+
var LexicalWrapper = styled.div(_templateObject13$6 || (_templateObject13$6 = _taggedTemplateLiteralLoose(["\n position: relative;\n width: 100%;\n\n & .rich_text_editor {\n width: 100%;\n max-height: 80px;\n min-height: 20px;\n display: block;\n border: none;\n box-sizing: border-box;\n outline: none !important;\n border-radius: ", ";\n background-color: ", ";\n padding: ", ";\n color: ", ";\n order: ", ";\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-width: none;\n scrollbar-color: transparent transparent;\n overscroll-behavior: none;\n\n @supports (overflow: overlay) {\n overflow-y: overlay;\n }\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\n &.show-scrollbar {\n scrollbar-width: thin;\n scrollbar-color: ", " transparent;\n }\n\n & p {\n font-size: 15px;\n line-height: 20px;\n color: ", ";\n }\n\n &::selection {\n background-color: ", ";\n }\n\n & *::selection {\n background-color: ", ";\n }\n\n & span::selection {\n background-color: ", ";\n }\n\n &:empty:before {\n content: attr(data-placeholder);\n }\n\n & .content_editable_input {\n border: none !important;\n outline: none !important;\n }\n\n & .mention {\n color: ", ";\n background-color: inherit !important;\n user-modify: read-only;\n }\n\n & span.bold {\n font-weight: bold;\n }\n\n & .editor_paragraph {\n margin: 0;\n }\n\n & .text_bold {\n font-weight: 600;\n }\n\n & .text_italic {\n font-style: italic;\n }\n\n & .text_underline {\n text-decoration: underline;\n }\n\n & .text_strikethrough {\n text-decoration: line-through;\n }\n\n & .text_underlineStrikethrough {\n text-decoration: underline line-through;\n }\n\n & code {\n font-family: inherit;\n letter-spacing: 4px;\n }\n }\n"])), function (props) {
|
|
54296
54367
|
return props.borderRadius;
|
|
54297
54368
|
}, function (props) {
|
|
54298
54369
|
return props.backgroundColor;
|
|
@@ -55164,7 +55235,7 @@ var EmptyText = styled.div(_templateObject7$s || (_templateObject7$s = _taggedTe
|
|
|
55164
55235
|
});
|
|
55165
55236
|
var ChevronRightIconWrapper = styled.span(_templateObject8$p || (_templateObject8$p = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n\n & > svg {\n width: 16px;\n height: 16px;\n transform: rotate(-90deg);\n }\n"])));
|
|
55166
55237
|
|
|
55167
|
-
var _templateObject$_, _templateObject2$V, _templateObject3$M, _templateObject4$F, _templateObject5$A, _templateObject6$w, _templateObject7$t, _templateObject8$q, _templateObject9$k, _templateObject0$i, _templateObject1$g, _templateObject10$d, _templateObject11$a, _templateObject12$
|
|
55238
|
+
var _templateObject$_, _templateObject2$V, _templateObject3$M, _templateObject4$F, _templateObject5$A, _templateObject6$w, _templateObject7$t, _templateObject8$q, _templateObject9$k, _templateObject0$i, _templateObject1$g, _templateObject10$d, _templateObject11$a, _templateObject12$8, _templateObject13$7, _templateObject14$5, _templateObject15$3, _templateObject16$3, _templateObject17$3, _templateObject18$3, _templateObject19$3, _templateObject20$3;
|
|
55168
55239
|
var Actions = function Actions(_ref) {
|
|
55169
55240
|
var _getDisappearingSetti;
|
|
55170
55241
|
var setActionsHeight = _ref.setActionsHeight,
|
|
@@ -55701,8 +55772,8 @@ var DefaultMarkAsRead = styled(SvgMarkAsRead)(_templateObject0$i || (_templateOb
|
|
|
55701
55772
|
var DefaultMarkAsUnRead = styled(SvgMarkAsUnRead)(_templateObject1$g || (_templateObject1$g = _taggedTemplateLiteralLoose([""])));
|
|
55702
55773
|
var DefaultBlockIcon = styled(SvgBlockChannel)(_templateObject10$d || (_templateObject10$d = _taggedTemplateLiteralLoose([""])));
|
|
55703
55774
|
var DefaultReportIcon = styled(SvgReport)(_templateObject11$a || (_templateObject11$a = _taggedTemplateLiteralLoose([""])));
|
|
55704
|
-
var DefaultClearIcon = styled(SvgClear)(_templateObject12$
|
|
55705
|
-
var DefaultDeleteChannelIcon = styled(SvgDeleteChannel)(_templateObject13$
|
|
55775
|
+
var DefaultClearIcon = styled(SvgClear)(_templateObject12$8 || (_templateObject12$8 = _taggedTemplateLiteralLoose([""])));
|
|
55776
|
+
var DefaultDeleteChannelIcon = styled(SvgDeleteChannel)(_templateObject13$7 || (_templateObject13$7 = _taggedTemplateLiteralLoose([""])));
|
|
55706
55777
|
var DefaultBottomIcon = styled(SvgBottom)(_templateObject14$5 || (_templateObject14$5 = _taggedTemplateLiteralLoose([""])));
|
|
55707
55778
|
var DefaultMarkAsReadIcon = styled(SvgLeave)(_templateObject15$3 || (_templateObject15$3 = _taggedTemplateLiteralLoose([""])));
|
|
55708
55779
|
var DefaultWatchIcon = styled(SvgWatch)(_templateObject16$3 || (_templateObject16$3 = _taggedTemplateLiteralLoose(["\n width: 24px;\n height: 24px;\n\n path.watch-ticks,\n path:nth-child(2) {\n fill: ", " !important;\n }\n"])), function (props) {
|
|
@@ -55891,7 +55962,7 @@ function SvgDownloadFile(props) {
|
|
|
55891
55962
|
})));
|
|
55892
55963
|
}
|
|
55893
55964
|
|
|
55894
|
-
var _templateObject$10, _templateObject2$X, _templateObject3$O, _templateObject4$H, _templateObject5$C, _templateObject6$y, _templateObject7$v, _templateObject8$s, _templateObject9$m, _templateObject0$k, _templateObject1$h, _templateObject10$e, _templateObject11$b, _templateObject12$
|
|
55965
|
+
var _templateObject$10, _templateObject2$X, _templateObject3$O, _templateObject4$H, _templateObject5$C, _templateObject6$y, _templateObject7$v, _templateObject8$s, _templateObject9$m, _templateObject0$k, _templateObject1$h, _templateObject10$e, _templateObject11$b, _templateObject12$9, _templateObject13$8, _templateObject14$6, _templateObject15$4;
|
|
55895
55966
|
var Files = function Files(_ref) {
|
|
55896
55967
|
var channelId = _ref.channelId,
|
|
55897
55968
|
filePreviewIcon = _ref.filePreviewIcon,
|
|
@@ -56106,12 +56177,12 @@ var FileIconCont = styled.span(_templateObject11$b || (_templateObject11$b = _ta
|
|
|
56106
56177
|
}, function (props) {
|
|
56107
56178
|
return props.fillColor;
|
|
56108
56179
|
});
|
|
56109
|
-
var FileHoverIconCont = styled.span(_templateObject12$
|
|
56180
|
+
var FileHoverIconCont = styled.span(_templateObject12$9 || (_templateObject12$9 = _taggedTemplateLiteralLoose(["\n display: none;\n & > svg {\n width: 40px;\n height: 40px;\n color: ", ";\n rect {\n fill: ", ";\n }\n }\n"])), function (props) {
|
|
56110
56181
|
return props.iconColor;
|
|
56111
56182
|
}, function (props) {
|
|
56112
56183
|
return props.fillColor;
|
|
56113
56184
|
});
|
|
56114
|
-
var FileThumb = styled.img(_templateObject13$
|
|
56185
|
+
var FileThumb = styled.img(_templateObject13$8 || (_templateObject13$8 = _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"])));
|
|
56115
56186
|
var FileItem = styled.div(_templateObject14$6 || (_templateObject14$6 = _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"])), function (props) {
|
|
56116
56187
|
return props.hoverBackgroundColor;
|
|
56117
56188
|
}, DownloadWrapper, FileIconCont, FileHoverIconCont);
|
|
@@ -56800,7 +56871,7 @@ function ResetLinkConfirmModal(_ref) {
|
|
|
56800
56871
|
});
|
|
56801
56872
|
}
|
|
56802
56873
|
|
|
56803
|
-
var _templateObject$16, _templateObject2$11, _templateObject3$U, _templateObject4$M, _templateObject5$H, _templateObject6$C, _templateObject7$z, _templateObject8$w, _templateObject9$p, _templateObject0$m, _templateObject1$i, _templateObject10$f, _templateObject11$c, _templateObject12$
|
|
56874
|
+
var _templateObject$16, _templateObject2$11, _templateObject3$U, _templateObject4$M, _templateObject5$H, _templateObject6$C, _templateObject7$z, _templateObject8$w, _templateObject9$p, _templateObject0$m, _templateObject1$i, _templateObject10$f, _templateObject11$c, _templateObject12$a, _templateObject13$9;
|
|
56804
56875
|
function loadImage$1(src) {
|
|
56805
56876
|
return new Promise(function (resolve, reject) {
|
|
56806
56877
|
var img = document.createElement('img');
|
|
@@ -57417,16 +57488,16 @@ var Switch = styled.div(_templateObject10$f || (_templateObject10$f = _taggedTem
|
|
|
57417
57488
|
return p.active ? '22px' : '3px';
|
|
57418
57489
|
});
|
|
57419
57490
|
var ResetLink = styled.button(_templateObject11$c || (_templateObject11$c = _taggedTemplateLiteralLoose(["\n margin-top: 12px;\n border: none;\n background: transparent;\n color: #ff4d4f;\n cursor: pointer;\n"])));
|
|
57420
|
-
var QRCodeBox = styled.div(_templateObject12$
|
|
57491
|
+
var QRCodeBox = styled.div(_templateObject12$a || (_templateObject12$a = _taggedTemplateLiteralLoose(["\n border-radius: 8px;\n border: 1px solid ", ";\n background-color: ", ";\n display: flex;\n width: max-content;\n padding: 13.5px;\n margin: auto;\n position: relative;\n"])), function (p) {
|
|
57421
57492
|
return p.borderColor;
|
|
57422
57493
|
}, function (p) {
|
|
57423
57494
|
return p.backgroundColor;
|
|
57424
57495
|
});
|
|
57425
|
-
var QrHint = styled.p(_templateObject13$
|
|
57496
|
+
var QrHint = styled.p(_templateObject13$9 || (_templateObject13$9 = _taggedTemplateLiteralLoose(["\n text-align: center;\n font-size: 14px;\n line-height: 16px;\n color: ", ";\n margin: 12px 0 0;\n"])), function (p) {
|
|
57426
57497
|
return p.color;
|
|
57427
57498
|
});
|
|
57428
57499
|
|
|
57429
|
-
var _templateObject$17, _templateObject2$12, _templateObject3$V, _templateObject4$N, _templateObject5$I, _templateObject6$D, _templateObject7$A, _templateObject8$x, _templateObject9$q, _templateObject0$n, _templateObject1$j, _templateObject10$g, _templateObject11$d, _templateObject12$
|
|
57500
|
+
var _templateObject$17, _templateObject2$12, _templateObject3$V, _templateObject4$N, _templateObject5$I, _templateObject6$D, _templateObject7$A, _templateObject8$x, _templateObject9$q, _templateObject0$n, _templateObject1$j, _templateObject10$g, _templateObject11$d, _templateObject12$b, _templateObject13$a;
|
|
57430
57501
|
var Members = function Members(_ref) {
|
|
57431
57502
|
var _members$find;
|
|
57432
57503
|
var channel = _ref.channel,
|
|
@@ -57784,12 +57855,12 @@ var SkeletonBlock$5 = styled.div(_templateObject0$n || (_templateObject0$n = _ta
|
|
|
57784
57855
|
var SkeletonMemberRow = styled.div(_templateObject1$j || (_templateObject1$j = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n padding: 6px 16px;\n gap: 12px;\n height: 56px;\n"])));
|
|
57785
57856
|
var SkeletonAvatar$1 = styled(SkeletonBlock$5)(_templateObject10$g || (_templateObject10$g = _taggedTemplateLiteralLoose(["\n width: 40px;\n height: 40px;\n border-radius: 50%;\n flex-shrink: 0;\n"])));
|
|
57786
57857
|
var SkeletonTextGroup$2 = styled.div(_templateObject11$d || (_templateObject11$d = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
57787
|
-
var SkeletonLine$4 = styled(SkeletonBlock$5)(_templateObject12$
|
|
57858
|
+
var SkeletonLine$4 = styled(SkeletonBlock$5)(_templateObject12$b || (_templateObject12$b = _taggedTemplateLiteralLoose(["\n width: ", ";\n height: ", ";\n border-radius: 7px;\n"])), function (p) {
|
|
57788
57859
|
return p.width;
|
|
57789
57860
|
}, function (p) {
|
|
57790
57861
|
return p.height || '14px';
|
|
57791
57862
|
});
|
|
57792
|
-
var RoleBadge = styled.span(_templateObject13$
|
|
57863
|
+
var RoleBadge = styled.span(_templateObject13$a || (_templateObject13$a = _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) {
|
|
57793
57864
|
return props.color;
|
|
57794
57865
|
}, function (props) {
|
|
57795
57866
|
return props.backgroundColor;
|
|
@@ -58769,7 +58840,7 @@ function SvgChevronDownSearch(props) {
|
|
|
58769
58840
|
})));
|
|
58770
58841
|
}
|
|
58771
58842
|
|
|
58772
|
-
var _templateObject$1b, _templateObject2$16, _templateObject3$Y, _templateObject4$Q, _templateObject5$K, _templateObject6$F, _templateObject7$C, _templateObject8$z, _templateObject9$s, _templateObject0$p, _templateObject1$l, _templateObject10$i, _templateObject11$f, _templateObject12$
|
|
58843
|
+
var _templateObject$1b, _templateObject2$16, _templateObject3$Y, _templateObject4$Q, _templateObject5$K, _templateObject6$F, _templateObject7$C, _templateObject8$z, _templateObject9$s, _templateObject0$p, _templateObject1$l, _templateObject10$i, _templateObject11$f, _templateObject12$c, _templateObject13$b, _templateObject14$7, _templateObject15$5, _templateObject16$4, _templateObject17$4, _templateObject18$4, _templateObject19$4, _templateObject20$4, _templateObject21$3, _templateObject22$2, _templateObject23$2, _templateObject24$2, _templateObject25$2;
|
|
58773
58844
|
var SEARCH_DEBOUNCE_MS = 400;
|
|
58774
58845
|
function formatMessageDate(date) {
|
|
58775
58846
|
if (!date) return '';
|
|
@@ -59211,8 +59282,8 @@ var StatusText$1 = styled.p(_templateObject11$f || (_templateObject11$f = _tagge
|
|
|
59211
59282
|
}, function (props) {
|
|
59212
59283
|
return props.full ? 'height: 100%;' : '';
|
|
59213
59284
|
});
|
|
59214
|
-
var GroupSection = styled.div(_templateObject12$
|
|
59215
|
-
var GroupLabel = styled.div(_templateObject13$
|
|
59285
|
+
var GroupSection = styled.div(_templateObject12$c || (_templateObject12$c = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
|
|
59286
|
+
var GroupLabel = styled.div(_templateObject13$b || (_templateObject13$b = _taggedTemplateLiteralLoose(["\n position: sticky;\n top: 0;\n z-index: 1;\n background-color: ", ";\n text-transform: capitalize;\n letter-spacing: 0.5px;\n color: ", ";\n padding: 12px 16px 4px;\n font-weight: 500;\n font-size: 13px;\n line-height: 16px;\n user-select: none;\n"])), function (p) {
|
|
59216
59287
|
return p.backgroundColor;
|
|
59217
59288
|
}, function (p) {
|
|
59218
59289
|
return p.color;
|