sceyt-chat-react-uikit 1.8.4-beta.7 → 1.8.4-beta.8

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.
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M3.16303 5.89779C2.84355 5.62395 2.36256 5.66095 2.08871 5.98043C1.81487 6.29992 1.85186 6.78091 2.17135 7.05475L7.50468 11.6262C7.79001 11.8707 8.21104 11.8707 8.49637 11.6262L13.8297 7.05475C14.1492 6.78091 14.1862 6.29992 13.9123 5.98043C13.6385 5.66095 13.1575 5.62395 12.838 5.89779L8.00053 10.0442L3.16303 5.89779Z" fill="#818C99"/>
3
+ </svg>
package/index.js CHANGED
@@ -2835,6 +2835,93 @@ function _forOf(target, body, check) {
2835
2835
 
2836
2836
  const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
2837
2837
 
2838
+ // Asynchronously implement a generic for loop
2839
+ function _for(test, update, body) {
2840
+ var stage;
2841
+ for (;;) {
2842
+ var shouldContinue = test();
2843
+ if (_isSettledPact(shouldContinue)) {
2844
+ shouldContinue = shouldContinue.v;
2845
+ }
2846
+ if (!shouldContinue) {
2847
+ return result;
2848
+ }
2849
+ if (shouldContinue.then) {
2850
+ stage = 0;
2851
+ break;
2852
+ }
2853
+ var result = body();
2854
+ if (result && result.then) {
2855
+ if (_isSettledPact(result)) {
2856
+ result = result.s;
2857
+ } else {
2858
+ stage = 1;
2859
+ break;
2860
+ }
2861
+ }
2862
+ if (update) {
2863
+ var updateValue = update();
2864
+ if (updateValue && updateValue.then && !_isSettledPact(updateValue)) {
2865
+ stage = 2;
2866
+ break;
2867
+ }
2868
+ }
2869
+ }
2870
+ var pact = new _Pact();
2871
+ var reject = _settle.bind(null, pact, 2);
2872
+ (stage === 0 ? shouldContinue.then(_resumeAfterTest) : stage === 1 ? result.then(_resumeAfterBody) : updateValue.then(_resumeAfterUpdate)).then(void 0, reject);
2873
+ return pact;
2874
+ function _resumeAfterBody(value) {
2875
+ result = value;
2876
+ do {
2877
+ if (update) {
2878
+ updateValue = update();
2879
+ if (updateValue && updateValue.then && !_isSettledPact(updateValue)) {
2880
+ updateValue.then(_resumeAfterUpdate).then(void 0, reject);
2881
+ return;
2882
+ }
2883
+ }
2884
+ shouldContinue = test();
2885
+ if (!shouldContinue || (_isSettledPact(shouldContinue) && !shouldContinue.v)) {
2886
+ _settle(pact, 1, result);
2887
+ return;
2888
+ }
2889
+ if (shouldContinue.then) {
2890
+ shouldContinue.then(_resumeAfterTest).then(void 0, reject);
2891
+ return;
2892
+ }
2893
+ result = body();
2894
+ if (_isSettledPact(result)) {
2895
+ result = result.v;
2896
+ }
2897
+ } while (!result || !result.then);
2898
+ result.then(_resumeAfterBody).then(void 0, reject);
2899
+ }
2900
+ function _resumeAfterTest(shouldContinue) {
2901
+ if (shouldContinue) {
2902
+ result = body();
2903
+ if (result && result.then) {
2904
+ result.then(_resumeAfterBody).then(void 0, reject);
2905
+ } else {
2906
+ _resumeAfterBody(result);
2907
+ }
2908
+ } else {
2909
+ _settle(pact, 1, result);
2910
+ }
2911
+ }
2912
+ function _resumeAfterUpdate() {
2913
+ if (shouldContinue = test()) {
2914
+ if (shouldContinue.then) {
2915
+ shouldContinue.then(_resumeAfterTest).then(void 0, reject);
2916
+ } else {
2917
+ _resumeAfterTest(shouldContinue);
2918
+ }
2919
+ } else {
2920
+ _settle(pact, 1, result);
2921
+ }
2922
+ }
2923
+ }
2924
+
2838
2925
  // Asynchronously call a function and send errors to recovery continuation
2839
2926
  function _catch(body, recover) {
2840
2927
  try {
@@ -34516,8 +34603,6 @@ var AudioPlayer = function AudioPlayer(_ref) {
34516
34603
  clearInterval(intervalRef.current);
34517
34604
  });
34518
34605
  audio.addEventListener('error', function () {
34519
- var _audio$error, _audio$error2;
34520
- log.error('Audio element error:', (_audio$error = audio.error) === null || _audio$error === void 0 ? void 0 : _audio$error.message, 'code:', (_audio$error2 = audio.error) === null || _audio$error2 === void 0 ? void 0 : _audio$error2.code);
34521
34606
  if (isSafari() && !convertedUrlRef.current) {
34522
34607
  log.info('Attempting Safari audio conversion fallback...');
34523
34608
  fetch(url).then(function (response) {
@@ -35687,7 +35772,7 @@ var Attachment = function Attachment(_ref) {
35687
35772
  isPreview: isPreview,
35688
35773
  isRepliedMessage: isRepliedMessage,
35689
35774
  withBorder: !isPreview && !isDetailsView,
35690
- src: attachmentUrlFromMap || attachmentUrl || attachmentThumb,
35775
+ src: attachmentUrlFromMap || attachmentUrl || (withPrefix && attachmentThumb ? "data:image/jpeg;base64," + attachmentThumb : attachmentThumb),
35691
35776
  fitTheContainer: true,
35692
35777
  imageMaxHeight: (renderHeight || 400) + "px",
35693
35778
  isDetailsView: isDetailsView,
@@ -35965,7 +36050,7 @@ var DownloadFile$1 = styled__default.span(_templateObject4$l || (_templateObject
35965
36050
  }, function (props) {
35966
36051
  return props.widthThumb && 'absolute';
35967
36052
  }, function (props) {
35968
- return props.widthThumb ? '8px' : '50%';
36053
+ return props.widthThumb ? '7.3px' : '50%';
35969
36054
  });
35970
36055
  var ProgressWrapper$1 = styled__default.span(_templateObject5$h || (_templateObject5$h = _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"])));
35971
36056
  var SizeProgress = styled__default.span(_templateObject6$e || (_templateObject6$e = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: -26px;\n background-color: rgba(0, 0, 0, 0.4);\n color: ", ";\n font-size: 12px;\n border-radius: 12px;\n padding: 3px 6px;\n white-space: nowrap;\n"])), function (props) {
@@ -51989,19 +52074,19 @@ function _extends$1P() {
51989
52074
  return n;
51990
52075
  }, _extends$1P.apply(null, arguments);
51991
52076
  }
51992
- function SvgChevronDown(props) {
52077
+ function SvgChevronDownSearch(props) {
51993
52078
  return /*#__PURE__*/React.createElement("svg", _extends$1P({
51994
- width: 32,
51995
- height: 32,
52079
+ width: 16,
52080
+ height: 16,
51996
52081
  fill: "none",
51997
52082
  xmlns: "http://www.w3.org/2000/svg"
51998
52083
  }, props), _path$1L || (_path$1L = /*#__PURE__*/React.createElement("path", {
51999
- d: "M9.298 12.937a1.056 1.056 0 10-1.374 1.603l7.39 6.333c.395.339.978.339 1.373 0l7.389-6.333a1.056 1.056 0 10-1.374-1.603L16 18.68l-6.702-5.744z",
52000
- fill: "CurrentColor"
52084
+ d: "M3.163 5.898a.762.762 0 00-.992 1.157l5.334 4.571a.762.762 0 00.991 0l5.334-4.571a.762.762 0 10-.992-1.157l-4.837 4.146-4.838-4.146z",
52085
+ fill: "#818C99"
52001
52086
  })));
52002
52087
  }
52003
52088
 
52004
- var _templateObject$1a, _templateObject2$15, _templateObject3$Y, _templateObject4$O, _templateObject5$I, _templateObject6$C, _templateObject7$A, _templateObject8$v, _templateObject9$p, _templateObject0$m, _templateObject1$i, _templateObject10$c, _templateObject11$a, _templateObject12$8, _templateObject13$7, _templateObject14$5, _templateObject15$4, _templateObject16$4, _templateObject17$4, _templateObject18$4, _templateObject19$4, _templateObject20$4, _templateObject21$3, _templateObject22$2, _templateObject23$2, _templateObject24$2;
52089
+ var _templateObject$1a, _templateObject2$15, _templateObject3$Y, _templateObject4$O, _templateObject5$I, _templateObject6$C, _templateObject7$A, _templateObject8$v, _templateObject9$p, _templateObject0$m, _templateObject1$i, _templateObject10$c, _templateObject11$a, _templateObject12$8, _templateObject13$7, _templateObject14$5, _templateObject15$4, _templateObject16$4, _templateObject17$4, _templateObject18$4, _templateObject19$4, _templateObject20$4, _templateObject21$3, _templateObject22$2, _templateObject23$2, _templateObject24$2, _templateObject25$2;
52005
52090
  var SEARCH_DEBOUNCE_MS = 400;
52006
52091
  function formatMessageDate(date) {
52007
52092
  if (!date) return '';
@@ -52031,7 +52116,7 @@ function getSnippet(text, keyword) {
52031
52116
  var end = Math.min(text.length, idx + keyword.length + SNIPPET_CONTEXT);
52032
52117
  return (start > 0 ? '…' : '') + text.slice(start, end) + (end < text.length ? '…' : '');
52033
52118
  }
52034
- function highlightText(text, keyword, highlightedBackground) {
52119
+ function highlightText(text, keyword, highlightedBackground, textColor) {
52035
52120
  if (!keyword.trim()) return text;
52036
52121
  var snippet = getSnippet(text, keyword);
52037
52122
  var regex = new RegExp("(" + keyword.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + ")", 'gi');
@@ -52039,7 +52124,8 @@ function highlightText(text, keyword, highlightedBackground) {
52039
52124
  return parts.map(function (part, i) {
52040
52125
  return regex.test(part) ? (/*#__PURE__*/React__default.createElement(Highlight, {
52041
52126
  key: i,
52042
- bgColor: highlightedBackground
52127
+ bgColor: highlightedBackground,
52128
+ color: textColor
52043
52129
  }, part)) : part;
52044
52130
  });
52045
52131
  }
@@ -52050,7 +52136,7 @@ function MessagesSearch(_ref) {
52050
52136
  background = _useColor[THEME_COLORS.BACKGROUND],
52051
52137
  textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY],
52052
52138
  textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY],
52053
- iconPrimary = _useColor[THEME_COLORS.ICON_PRIMARY],
52139
+ accentColor = _useColor[THEME_COLORS.ACCENT],
52054
52140
  border = _useColor[THEME_COLORS.BORDER],
52055
52141
  backgroundHovered = _useColor[THEME_COLORS.BACKGROUND_HOVERED],
52056
52142
  surface1 = _useColor[THEME_COLORS.SURFACE_1],
@@ -52058,6 +52144,7 @@ function MessagesSearch(_ref) {
52058
52144
  var dispatch = useDispatch();
52059
52145
  var activeChannel = useSelector(activeChannelSelector, reactRedux.shallowEqual);
52060
52146
  var contactsMap = useSelector(contactsMapSelector);
52147
+ var connectionStatus = useSelector(connectionStatusSelector);
52061
52148
  var _useState = React.useState(''),
52062
52149
  searchText = _useState[0],
52063
52150
  setSearchText = _useState[1];
@@ -52124,6 +52211,57 @@ function MessagesSearch(_ref) {
52124
52211
  return Promise.reject(e);
52125
52212
  }
52126
52213
  }, [activeChannel === null || activeChannel === void 0 ? void 0 : activeChannel.id]);
52214
+ var refreshSearch = React.useCallback(function (text, currentCount) {
52215
+ try {
52216
+ if (!text.trim() || !(activeChannel !== null && activeChannel !== void 0 && activeChannel.id)) return Promise.resolve();
52217
+ var _temp4 = _catch(function () {
52218
+ var SceytChatClient = getClient();
52219
+ var pagesToLoad = Math.max(1, Math.ceil(currentCount / 20));
52220
+ var builder = new SceytChatClient.MessageListSearchQueryBuilder();
52221
+ builder.setChannelId(activeChannel === null || activeChannel === void 0 ? void 0 : activeChannel.id);
52222
+ builder.addField({
52223
+ key: 0,
52224
+ value: {
52225
+ word: text,
52226
+ op: 1
52227
+ }
52228
+ });
52229
+ builder.setCount(20);
52230
+ return Promise.resolve(builder.build()).then(function (query) {
52231
+ var _interrupt = false;
52232
+ function _temp3() {
52233
+ queryRef.current = query;
52234
+ setResults(refreshed);
52235
+ setHasNext(hasNextRefresh);
52236
+ }
52237
+ var refreshed = [];
52238
+ var hasNextRefresh = false;
52239
+ var i = 0;
52240
+ var _temp2 = _for(function () {
52241
+ return !_interrupt && i < pagesToLoad;
52242
+ }, function () {
52243
+ return i++;
52244
+ }, function () {
52245
+ return Promise.resolve(query.loadNext()).then(function (result) {
52246
+ if (result) {
52247
+ refreshed.push.apply(refreshed, result.messages || []);
52248
+ hasNextRefresh = result.hasNext || false;
52249
+ if (!result.hasNext) {
52250
+ _interrupt = true;
52251
+ }
52252
+ }
52253
+ });
52254
+ });
52255
+ return _temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2);
52256
+ });
52257
+ }, function (e) {
52258
+ console.error('[MessagesSearch] refresh error', e);
52259
+ });
52260
+ return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(function () {}) : void 0);
52261
+ } catch (e) {
52262
+ return Promise.reject(e);
52263
+ }
52264
+ }, [activeChannel === null || activeChannel === void 0 ? void 0 : activeChannel.id]);
52127
52265
  var handleInputChange = function handleInputChange(e) {
52128
52266
  var val = e.target.value;
52129
52267
  setSearchText(val);
@@ -52136,7 +52274,7 @@ function MessagesSearch(_ref) {
52136
52274
  try {
52137
52275
  if (!queryRef.current || !hasNext || loadingMore) return Promise.resolve();
52138
52276
  setLoadingMore(true);
52139
- var _temp2 = _finallyRethrows(function () {
52277
+ var _temp5 = _finallyRethrows(function () {
52140
52278
  return _catch(function () {
52141
52279
  return Promise.resolve(queryRef.current.loadNext()).then(function (result) {
52142
52280
  if (result) {
@@ -52154,7 +52292,7 @@ function MessagesSearch(_ref) {
52154
52292
  if (_wasThrown2) throw _result2;
52155
52293
  return _result2;
52156
52294
  });
52157
- return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
52295
+ return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
52158
52296
  } catch (e) {
52159
52297
  return Promise.reject(e);
52160
52298
  }
@@ -52219,12 +52357,12 @@ function MessagesSearch(_ref) {
52219
52357
  try {
52220
52358
  if (!results.length || !(activeChannel !== null && activeChannel !== void 0 && activeChannel.id)) return Promise.resolve();
52221
52359
  var nextIndex = currentIndex + 1;
52222
- var _temp4 = function () {
52360
+ var _temp7 = function () {
52223
52361
  if (nextIndex < results.length) {
52224
52362
  setCurrentIndex(nextIndex);
52225
52363
  dispatch(getMessagesAC(activeChannel, undefined, results[nextIndex].id, undefined, true, 'smooth', true));
52226
52364
  } else {
52227
- var _temp5 = function () {
52365
+ var _temp8 = function () {
52228
52366
  if (hasNext) {
52229
52367
  return Promise.resolve(handleLoadMore()).then(function () {
52230
52368
  setCurrentIndex(function (prev) {
@@ -52234,10 +52372,10 @@ function MessagesSearch(_ref) {
52234
52372
  });
52235
52373
  }
52236
52374
  }();
52237
- if (_temp5 && _temp5.then) return _temp5.then(function () {});
52375
+ if (_temp8 && _temp8.then) return _temp8.then(function () {});
52238
52376
  }
52239
52377
  }();
52240
- return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(function () {}) : void 0);
52378
+ return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(function () {}) : void 0);
52241
52379
  } catch (e) {
52242
52380
  return Promise.reject(e);
52243
52381
  }
@@ -52256,6 +52394,15 @@ function MessagesSearch(_ref) {
52256
52394
  setHasNext(false);
52257
52395
  queryRef.current = null;
52258
52396
  }, [activeChannel === null || activeChannel === void 0 ? void 0 : activeChannel.id]);
52397
+ React.useEffect(function () {
52398
+ if (connectionStatus === CONNECTION_STATUS.CONNECTED && searchText.trim()) {
52399
+ if (results.length > 0) {
52400
+ refreshSearch(searchText, results.length);
52401
+ } else {
52402
+ buildAndSearch(searchText);
52403
+ }
52404
+ }
52405
+ }, [connectionStatus]);
52259
52406
  var grouped = React.useMemo(function () {
52260
52407
  var groups = [];
52261
52408
  results.forEach(function (msg) {
@@ -52284,8 +52431,8 @@ function MessagesSearch(_ref) {
52284
52431
  onClick: handleClose,
52285
52432
  hoverBackground: backgroundHovered
52286
52433
  }, /*#__PURE__*/React__default.createElement(SvgClose, {
52287
- color: iconPrimary
52288
- }))), /*#__PURE__*/React__default.createElement(SearchInputWrapper, {
52434
+ color: accentColor
52435
+ }))), /*#__PURE__*/React__default.createElement(SearchRow, null, /*#__PURE__*/React__default.createElement(SearchInputWrapper, {
52289
52436
  backgroundColor: surface1
52290
52437
  }, /*#__PURE__*/React__default.createElement(SearchIconWrapper, null, /*#__PURE__*/React__default.createElement(SvgSearch, {
52291
52438
  color: textSecondary
@@ -52296,21 +52443,7 @@ function MessagesSearch(_ref) {
52296
52443
  onChange: handleInputChange,
52297
52444
  color: textPrimary,
52298
52445
  placeholderColor: textSecondary
52299
- }), searchText && results.length > 0 && (/*#__PURE__*/React__default.createElement(NavButtons, null, /*#__PURE__*/React__default.createElement(NavButton, {
52300
- onClick: handleNavNext,
52301
- disabled: currentIndex >= results.length - 1 && !hasNext,
52302
- hoverBackground: backgroundHovered,
52303
- iconColor: textSecondary
52304
- }, /*#__PURE__*/React__default.createElement(SvgChevronDown, null)), /*#__PURE__*/React__default.createElement(NavButton, {
52305
- onClick: handleNavPrev,
52306
- disabled: currentIndex <= 0,
52307
- hoverBackground: backgroundHovered,
52308
- iconColor: textSecondary
52309
- }, /*#__PURE__*/React__default.createElement(SvgChevronDown, {
52310
- style: {
52311
- transform: 'rotate(180deg)'
52312
- }
52313
- })))), searchText && (/*#__PURE__*/React__default.createElement(ClearButton, {
52446
+ }), searchText && (/*#__PURE__*/React__default.createElement(ClearButton, {
52314
52447
  onClick: function onClick() {
52315
52448
  setSearchText('');
52316
52449
  setResults([]);
@@ -52323,6 +52456,22 @@ function MessagesSearch(_ref) {
52323
52456
  color: textSecondary,
52324
52457
  width: 14,
52325
52458
  height: 14
52459
+ })))), /*#__PURE__*/React__default.createElement(NavButtons, {
52460
+ backgroundColor: surface1
52461
+ }, /*#__PURE__*/React__default.createElement(NavButton, {
52462
+ onClick: handleNavNext,
52463
+ disabled: currentIndex >= results.length - 1 && !hasNext,
52464
+ hoverBackground: background,
52465
+ iconColor: textSecondary
52466
+ }, /*#__PURE__*/React__default.createElement(SvgChevronDownSearch, null)), /*#__PURE__*/React__default.createElement(NavButton, {
52467
+ onClick: handleNavPrev,
52468
+ disabled: currentIndex <= 0,
52469
+ hoverBackground: background,
52470
+ iconColor: textSecondary
52471
+ }, /*#__PURE__*/React__default.createElement(SvgChevronDownSearch, {
52472
+ style: {
52473
+ transform: 'rotate(180deg)'
52474
+ }
52326
52475
  })))), /*#__PURE__*/React__default.createElement(ResultsList, {
52327
52476
  ref: listRef,
52328
52477
  onScroll: handleScroll
@@ -52369,7 +52518,7 @@ function MessagesSearch(_ref) {
52369
52518
  color: textSecondary
52370
52519
  }, formatMessageDate(msg.createdAt))), /*#__PURE__*/React__default.createElement(ResultBodyRow, null, /*#__PURE__*/React__default.createElement(ResultBody, {
52371
52520
  color: textSecondary
52372
- }, msg.body ? highlightText(msg.body, searchText === null || searchText === void 0 ? void 0 : searchText.trim(), highlightedBackground) : (_msg$attachments2 = msg.attachments) !== null && _msg$attachments2 !== void 0 && _msg$attachments2.length ? 'Attachment' : ''), firstImage && (/*#__PURE__*/React__default.createElement(ResultAttachmentWrapper, null, /*#__PURE__*/React__default.createElement(Attachment$1, {
52521
+ }, msg.body ? highlightText(msg.body, searchText === null || searchText === void 0 ? void 0 : searchText.trim(), highlightedBackground, textSecondary) : (_msg$attachments2 = msg.attachments) !== null && _msg$attachments2 !== void 0 && _msg$attachments2.length ? 'Attachment' : ''), firstImage && (/*#__PURE__*/React__default.createElement(ResultAttachmentWrapper, null, /*#__PURE__*/React__default.createElement(Attachment$1, {
52373
52522
  attachment: firstImage,
52374
52523
  backgroundColor: background,
52375
52524
  imageAttachmentMaxWidth: 28,
@@ -52400,60 +52549,65 @@ var Title$4 = styled__default.h3(_templateObject3$Y || (_templateObject3$Y = _ta
52400
52549
  var CloseButton$2 = styled__default.button(_templateObject4$O || (_templateObject4$O = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n padding: 8px;\n border-radius: 50%;\n transition: background-color 0.15s;\n &:hover {\n background-color: ", ";\n }\n"])), function (p) {
52401
52550
  return p.hoverBackground;
52402
52551
  });
52403
- var SearchInputWrapper = styled__default.div(_templateObject5$I || (_templateObject5$I = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n margin: 12px;\n padding: 8px 12px;\n background-color: ", ";\n border-radius: 10px;\n flex-shrink: 0;\n"])), function (p) {
52552
+ var SearchRow = styled__default.div(_templateObject5$I || (_templateObject5$I = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px;\n flex-shrink: 0;\n"])));
52553
+ var SearchInputWrapper = styled__default.div(_templateObject6$C || (_templateObject6$C = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n flex: 1;\n padding: 8px 12px;\n background-color: ", ";\n border-radius: 10px;\n min-width: 0;\n"])), function (p) {
52404
52554
  return p.backgroundColor;
52405
52555
  });
52406
- var SearchIconWrapper = styled__default.span(_templateObject6$C || (_templateObject6$C = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-shrink: 0;\n margin-right: 6px;\n > svg {\n width: 16px;\n height: 16px;\n }\n"])));
52407
- var SearchInput$1 = styled__default.input(_templateObject7$A || (_templateObject7$A = _taggedTemplateLiteralLoose(["\n flex: 1;\n border: none;\n outline: none;\n background: none;\n font-size: 15px;\n line-height: 20px;\n color: ", ";\n &::placeholder {\n color: ", ";\n }\n"])), function (p) {
52556
+ var SearchIconWrapper = styled__default.span(_templateObject7$A || (_templateObject7$A = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-shrink: 0;\n margin-right: 6px;\n > svg {\n width: 16px;\n height: 16px;\n }\n"])));
52557
+ var SearchInput$1 = styled__default.input(_templateObject8$v || (_templateObject8$v = _taggedTemplateLiteralLoose(["\n flex: 1;\n border: none;\n outline: none;\n background: none;\n font-size: 15px;\n line-height: 20px;\n color: ", ";\n &::placeholder {\n color: ", ";\n }\n"])), function (p) {
52408
52558
  return p.color;
52409
52559
  }, function (p) {
52410
52560
  return p.placeholderColor;
52411
52561
  });
52412
- var NavButtons = styled__default.div(_templateObject8$v || (_templateObject8$v = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n margin-right: 4px;\n"])));
52413
- var NavButton = styled__default.button(_templateObject9$p || (_templateObject9$p = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n border-radius: 50%;\n margin: -2px;\n transition: background-color 0.15s;\n &:hover:not(:disabled) {\n background-color: ", ";\n }\n &:disabled {\n cursor: default;\n opacity: 0.35;\n }\n & > svg {\n margin: -6px;\n color: ", ";\n }\n"])), function (p) {
52562
+ var NavButtons = styled__default.div(_templateObject9$p || (_templateObject9$p = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n background-color: ", ";\n border-radius: 10px;\n padding: 8px;\n"])), function (p) {
52563
+ return p.backgroundColor;
52564
+ });
52565
+ var NavButton = styled__default.button(_templateObject0$m || (_templateObject0$m = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n border-radius: 50%;\n transition: background-color 0.15s;\n padding: 3px;\n &:hover:not(:disabled) {\n background-color: ", ";\n }\n &:disabled {\n cursor: default;\n opacity: 0.35;\n }\n & > svg {\n path {\n fill: ", ";\n }\n }\n"])), function (p) {
52414
52566
  return p.hoverBackground;
52415
52567
  }, function (p) {
52416
52568
  return p.iconColor;
52417
52569
  });
52418
- var ClearButton = styled__default.button(_templateObject0$m || (_templateObject0$m = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n background: none;\n border: none;\n cursor: pointer;\n padding: 2px;\n border-radius: 50%;\n &:hover {\n background-color: ", ";\n }\n\n & > svg {\n width: 11px;\n height: 11px;\n }\n"])), function (p) {
52570
+ var ClearButton = styled__default.button(_templateObject1$i || (_templateObject1$i = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n background: none;\n border: none;\n cursor: pointer;\n padding: 2px;\n border-radius: 50%;\n &:hover {\n background-color: ", ";\n }\n\n & > svg {\n width: 11px;\n height: 11px;\n }\n"])), function (p) {
52419
52571
  return p.hoverBackground;
52420
52572
  });
52421
- var ResultsList = styled__default.div(_templateObject1$i || (_templateObject1$i = _taggedTemplateLiteralLoose(["\n flex: 1;\n overflow-y: auto;\n padding: 0 8px 8px 8px;\n"])));
52422
- var StatusText$1 = styled__default.p(_templateObject10$c || (_templateObject10$c = _taggedTemplateLiteralLoose(["\n text-align: center;\n color: ", ";\n ", "\n align-items: center;\n display: flex;\n justify-content: center;\n font-weight: 400;\n font-size: 15px;\n line-height: 20px;\n margin: 0;\n"])), function (p) {
52573
+ var ResultsList = styled__default.div(_templateObject10$c || (_templateObject10$c = _taggedTemplateLiteralLoose(["\n flex: 1;\n overflow-y: auto;\n padding: 0 8px 8px 8px;\n"])));
52574
+ var StatusText$1 = styled__default.p(_templateObject11$a || (_templateObject11$a = _taggedTemplateLiteralLoose(["\n text-align: center;\n color: ", ";\n ", "\n align-items: center;\n display: flex;\n justify-content: center;\n font-weight: 400;\n font-size: 15px;\n line-height: 20px;\n margin: 0;\n"])), function (p) {
52423
52575
  return p.color;
52424
52576
  }, function (props) {
52425
52577
  return props.full ? 'height: 100%;' : '';
52426
52578
  });
52427
- var GroupSection = styled__default.div(_templateObject11$a || (_templateObject11$a = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
52428
- var GroupLabel = styled__default.div(_templateObject12$8 || (_templateObject12$8 = _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 letter-spacing: 0px;\n"])), function (p) {
52579
+ var GroupSection = styled__default.div(_templateObject12$8 || (_templateObject12$8 = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
52580
+ var GroupLabel = styled__default.div(_templateObject13$7 || (_templateObject13$7 = _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 letter-spacing: 0px;\n"])), function (p) {
52429
52581
  return p.backgroundColor;
52430
52582
  }, function (p) {
52431
52583
  return p.color;
52432
52584
  });
52433
- var ResultItem = styled__default.div(_templateObject13$7 || (_templateObject13$7 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 7px 8px;\n cursor: pointer;\n transition: background-color 0.1s;\n border-radius: 12px;\n background-color: ", ";\n &:hover {\n background-color: ", ";\n }\n"])), function (p) {
52585
+ var ResultItem = styled__default.div(_templateObject14$5 || (_templateObject14$5 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 7px 8px;\n cursor: pointer;\n transition: background-color 0.1s;\n border-radius: 12px;\n background-color: ", ";\n &:hover {\n background-color: ", ";\n }\n"])), function (p) {
52434
52586
  return p.isActive ? p.hoverBackground : 'transparent';
52435
52587
  }, function (p) {
52436
52588
  return p.hoverBackground;
52437
52589
  });
52438
- var ResultAvatar = styled__default.div(_templateObject14$5 || (_templateObject14$5 = _taggedTemplateLiteralLoose(["\n flex-shrink: 0;\n"])));
52439
- var ResultAttachmentWrapper = styled__default.div(_templateObject15$4 || (_templateObject15$4 = _taggedTemplateLiteralLoose(["\n flex-shrink: 0;\n width: 28px;\n height: 28px;\n border-radius: 8px;\n overflow: hidden;\n align-self: center;\n margin-top: 4px;\n"])));
52440
- var ResultContent = styled__default.div(_templateObject16$4 || (_templateObject16$4 = _taggedTemplateLiteralLoose(["\n flex: 1;\n min-width: 0;\n gap: 4px;\n"])));
52441
- var ResultMeta = styled__default.div(_templateObject17$4 || (_templateObject17$4 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 8px;\n margin-bottom: 2px;\n"])));
52442
- var ResultSender = styled__default.span(_templateObject18$4 || (_templateObject18$4 = _taggedTemplateLiteralLoose(["\n color: ", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-weight: 500;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.2px;\n padding-top: 3px;\n"])), function (p) {
52590
+ var ResultAvatar = styled__default.div(_templateObject15$4 || (_templateObject15$4 = _taggedTemplateLiteralLoose(["\n flex-shrink: 0;\n"])));
52591
+ var ResultAttachmentWrapper = styled__default.div(_templateObject16$4 || (_templateObject16$4 = _taggedTemplateLiteralLoose(["\n flex-shrink: 0;\n width: 28px;\n height: 28px;\n border-radius: 8px;\n overflow: hidden;\n align-self: center;\n margin-top: 4px;\n"])));
52592
+ var ResultContent = styled__default.div(_templateObject17$4 || (_templateObject17$4 = _taggedTemplateLiteralLoose(["\n flex: 1;\n min-width: 0;\n gap: 4px;\n"])));
52593
+ var ResultMeta = styled__default.div(_templateObject18$4 || (_templateObject18$4 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 8px;\n margin-bottom: 2px;\n"])));
52594
+ var ResultSender = styled__default.span(_templateObject19$4 || (_templateObject19$4 = _taggedTemplateLiteralLoose(["\n color: ", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-weight: 500;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.2px;\n padding-top: 3px;\n"])), function (p) {
52443
52595
  return p.color;
52444
52596
  });
52445
- var ResultTime = styled__default.span(_templateObject19$4 || (_templateObject19$4 = _taggedTemplateLiteralLoose(["\n color: ", ";\n flex-shrink: 0;\n font-weight: 400;\n font-size: 12px;\n line-height: 14px;\n letter-spacing: 0px;\n margin-top: 4px;\n"])), function (p) {
52597
+ var ResultTime = styled__default.span(_templateObject20$4 || (_templateObject20$4 = _taggedTemplateLiteralLoose(["\n color: ", ";\n flex-shrink: 0;\n font-weight: 400;\n font-size: 12px;\n line-height: 14px;\n letter-spacing: 0px;\n margin-top: 4px;\n"])), function (p) {
52446
52598
  return p.color;
52447
52599
  });
52448
- var ResultBodyRow = styled__default.div(_templateObject20$4 || (_templateObject20$4 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n max-height: 16px;\n"])));
52449
- var ResultBody = styled__default.div(_templateObject21$3 || (_templateObject21$3 = _taggedTemplateLiteralLoose(["\n color: ", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-weight: 400;\n font-size: 14px;\n line-height: 16px;\n letter-spacing: -0.08px;\n width: 100%;\n margin-top: 4px;\n"])), function (p) {
52600
+ var ResultBodyRow = styled__default.div(_templateObject21$3 || (_templateObject21$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n max-height: 16px;\n"])));
52601
+ var ResultBody = styled__default.div(_templateObject22$2 || (_templateObject22$2 = _taggedTemplateLiteralLoose(["\n color: ", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-weight: 400;\n font-size: 14px;\n line-height: 16px;\n letter-spacing: -0.08px;\n width: 100%;\n margin-top: 4px;\n"])), function (p) {
52450
52602
  return p.color;
52451
52603
  });
52452
- var Highlight = styled__default.mark(_templateObject22$2 || (_templateObject22$2 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n border-radius: 3px;\n padding: 0 2px;\n"])), function (p) {
52604
+ var Highlight = styled__default.mark(_templateObject23$2 || (_templateObject23$2 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n color: ", ";\n border-radius: 3px;\n padding: 0 2px;\n"])), function (p) {
52453
52605
  return p.bgColor;
52606
+ }, function (p) {
52607
+ return p.color;
52454
52608
  });
52455
- var EmptyState = styled__default.div(_templateObject23$2 || (_templateObject23$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n padding: 0 24px;\n gap: 12px;\n & > svg {\n width: 56px;\n height: 56px;\n }\n"])));
52456
- var EmptyStateText = styled__default.p(_templateObject24$2 || (_templateObject24$2 = _taggedTemplateLiteralLoose(["\n margin: 0;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: ", ";\n text-align: center;\n"])), function (p) {
52609
+ var EmptyState = styled__default.div(_templateObject24$2 || (_templateObject24$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n padding: 0 24px;\n gap: 12px;\n & > svg {\n width: 56px;\n height: 56px;\n }\n"])));
52610
+ var EmptyStateText = styled__default.p(_templateObject25$2 || (_templateObject25$2 = _taggedTemplateLiteralLoose(["\n margin: 0;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: ", ";\n text-align: center;\n"])), function (p) {
52457
52611
  return p.color;
52458
52612
  });
52459
52613
 
@@ -52703,6 +52857,28 @@ var ChannelDetailsContainer = function ChannelDetailsContainer(_ref) {
52703
52857
  };
52704
52858
  var DetailsWrapper = styled__default.div(_templateObject$1b || (_templateObject$1b = _taggedTemplateLiteralLoose(["\n user-select: text;\n"])));
52705
52859
 
52860
+ var _path$1M;
52861
+ function _extends$1Q() {
52862
+ return _extends$1Q = Object.assign ? Object.assign.bind() : function (n) {
52863
+ for (var e = 1; e < arguments.length; e++) {
52864
+ var t = arguments[e];
52865
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
52866
+ }
52867
+ return n;
52868
+ }, _extends$1Q.apply(null, arguments);
52869
+ }
52870
+ function SvgChevronDown(props) {
52871
+ return /*#__PURE__*/React.createElement("svg", _extends$1Q({
52872
+ width: 32,
52873
+ height: 32,
52874
+ fill: "none",
52875
+ xmlns: "http://www.w3.org/2000/svg"
52876
+ }, props), _path$1M || (_path$1M = /*#__PURE__*/React.createElement("path", {
52877
+ d: "M9.298 12.937a1.056 1.056 0 10-1.374 1.603l7.39 6.333c.395.339.978.339 1.373 0l7.389-6.333a1.056 1.056 0 10-1.374-1.603L16 18.68l-6.702-5.744z",
52878
+ fill: "CurrentColor"
52879
+ })));
52880
+ }
52881
+
52706
52882
  var _templateObject$1c, _templateObject2$16;
52707
52883
  var MessagesScrollToBottomButton = function MessagesScrollToBottomButton(_ref) {
52708
52884
  var buttonIcon = _ref.buttonIcon,
@@ -52796,23 +52972,23 @@ var UnreadCount$1 = styled__default.span(_templateObject2$16 || (_templateObject
52796
52972
  return props.textColor || '#fff';
52797
52973
  });
52798
52974
 
52799
- var _path$1M, _path2$h;
52800
- function _extends$1Q() {
52801
- return _extends$1Q = Object.assign ? Object.assign.bind() : function (n) {
52975
+ var _path$1N, _path2$h;
52976
+ function _extends$1R() {
52977
+ return _extends$1R = Object.assign ? Object.assign.bind() : function (n) {
52802
52978
  for (var e = 1; e < arguments.length; e++) {
52803
52979
  var t = arguments[e];
52804
52980
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
52805
52981
  }
52806
52982
  return n;
52807
- }, _extends$1Q.apply(null, arguments);
52983
+ }, _extends$1R.apply(null, arguments);
52808
52984
  }
52809
52985
  function SvgMention(props) {
52810
- return /*#__PURE__*/React.createElement("svg", _extends$1Q({
52986
+ return /*#__PURE__*/React.createElement("svg", _extends$1R({
52811
52987
  width: 24,
52812
52988
  height: 24,
52813
52989
  fill: "none",
52814
52990
  xmlns: "http://www.w3.org/2000/svg"
52815
- }, props), _path$1M || (_path$1M = /*#__PURE__*/React.createElement("path", {
52991
+ }, props), _path$1N || (_path$1N = /*#__PURE__*/React.createElement("path", {
52816
52992
  d: "M12 15.6a3.6 3.6 0 100-7.2 3.6 3.6 0 000 7.2z",
52817
52993
  stroke: "currentColor",
52818
52994
  strokeWidth: 1.8,
package/index.modern.js CHANGED
@@ -2833,6 +2833,93 @@ function _forOf(target, body, check) {
2833
2833
 
2834
2834
  const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
2835
2835
 
2836
+ // Asynchronously implement a generic for loop
2837
+ function _for(test, update, body) {
2838
+ var stage;
2839
+ for (;;) {
2840
+ var shouldContinue = test();
2841
+ if (_isSettledPact(shouldContinue)) {
2842
+ shouldContinue = shouldContinue.v;
2843
+ }
2844
+ if (!shouldContinue) {
2845
+ return result;
2846
+ }
2847
+ if (shouldContinue.then) {
2848
+ stage = 0;
2849
+ break;
2850
+ }
2851
+ var result = body();
2852
+ if (result && result.then) {
2853
+ if (_isSettledPact(result)) {
2854
+ result = result.s;
2855
+ } else {
2856
+ stage = 1;
2857
+ break;
2858
+ }
2859
+ }
2860
+ if (update) {
2861
+ var updateValue = update();
2862
+ if (updateValue && updateValue.then && !_isSettledPact(updateValue)) {
2863
+ stage = 2;
2864
+ break;
2865
+ }
2866
+ }
2867
+ }
2868
+ var pact = new _Pact();
2869
+ var reject = _settle.bind(null, pact, 2);
2870
+ (stage === 0 ? shouldContinue.then(_resumeAfterTest) : stage === 1 ? result.then(_resumeAfterBody) : updateValue.then(_resumeAfterUpdate)).then(void 0, reject);
2871
+ return pact;
2872
+ function _resumeAfterBody(value) {
2873
+ result = value;
2874
+ do {
2875
+ if (update) {
2876
+ updateValue = update();
2877
+ if (updateValue && updateValue.then && !_isSettledPact(updateValue)) {
2878
+ updateValue.then(_resumeAfterUpdate).then(void 0, reject);
2879
+ return;
2880
+ }
2881
+ }
2882
+ shouldContinue = test();
2883
+ if (!shouldContinue || (_isSettledPact(shouldContinue) && !shouldContinue.v)) {
2884
+ _settle(pact, 1, result);
2885
+ return;
2886
+ }
2887
+ if (shouldContinue.then) {
2888
+ shouldContinue.then(_resumeAfterTest).then(void 0, reject);
2889
+ return;
2890
+ }
2891
+ result = body();
2892
+ if (_isSettledPact(result)) {
2893
+ result = result.v;
2894
+ }
2895
+ } while (!result || !result.then);
2896
+ result.then(_resumeAfterBody).then(void 0, reject);
2897
+ }
2898
+ function _resumeAfterTest(shouldContinue) {
2899
+ if (shouldContinue) {
2900
+ result = body();
2901
+ if (result && result.then) {
2902
+ result.then(_resumeAfterBody).then(void 0, reject);
2903
+ } else {
2904
+ _resumeAfterBody(result);
2905
+ }
2906
+ } else {
2907
+ _settle(pact, 1, result);
2908
+ }
2909
+ }
2910
+ function _resumeAfterUpdate() {
2911
+ if (shouldContinue = test()) {
2912
+ if (shouldContinue.then) {
2913
+ shouldContinue.then(_resumeAfterTest).then(void 0, reject);
2914
+ } else {
2915
+ _resumeAfterTest(shouldContinue);
2916
+ }
2917
+ } else {
2918
+ _settle(pact, 1, result);
2919
+ }
2920
+ }
2921
+ }
2922
+
2836
2923
  // Asynchronously call a function and send errors to recovery continuation
2837
2924
  function _catch(body, recover) {
2838
2925
  try {
@@ -34515,8 +34602,6 @@ var AudioPlayer = function AudioPlayer(_ref) {
34515
34602
  clearInterval(intervalRef.current);
34516
34603
  });
34517
34604
  audio.addEventListener('error', function () {
34518
- var _audio$error, _audio$error2;
34519
- log.error('Audio element error:', (_audio$error = audio.error) === null || _audio$error === void 0 ? void 0 : _audio$error.message, 'code:', (_audio$error2 = audio.error) === null || _audio$error2 === void 0 ? void 0 : _audio$error2.code);
34520
34605
  if (isSafari() && !convertedUrlRef.current) {
34521
34606
  log.info('Attempting Safari audio conversion fallback...');
34522
34607
  fetch(url).then(function (response) {
@@ -35686,7 +35771,7 @@ var Attachment = function Attachment(_ref) {
35686
35771
  isPreview: isPreview,
35687
35772
  isRepliedMessage: isRepliedMessage,
35688
35773
  withBorder: !isPreview && !isDetailsView,
35689
- src: attachmentUrlFromMap || attachmentUrl || attachmentThumb,
35774
+ src: attachmentUrlFromMap || attachmentUrl || (withPrefix && attachmentThumb ? "data:image/jpeg;base64," + attachmentThumb : attachmentThumb),
35690
35775
  fitTheContainer: true,
35691
35776
  imageMaxHeight: (renderHeight || 400) + "px",
35692
35777
  isDetailsView: isDetailsView,
@@ -35964,7 +36049,7 @@ var DownloadFile$1 = styled.span(_templateObject4$l || (_templateObject4$l = _ta
35964
36049
  }, function (props) {
35965
36050
  return props.widthThumb && 'absolute';
35966
36051
  }, function (props) {
35967
- return props.widthThumb ? '8px' : '50%';
36052
+ return props.widthThumb ? '7.3px' : '50%';
35968
36053
  });
35969
36054
  var ProgressWrapper$1 = styled.span(_templateObject5$h || (_templateObject5$h = _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"])));
35970
36055
  var SizeProgress = styled.span(_templateObject6$e || (_templateObject6$e = _taggedTemplateLiteralLoose(["\n position: absolute;\n bottom: -26px;\n background-color: rgba(0, 0, 0, 0.4);\n color: ", ";\n font-size: 12px;\n border-radius: 12px;\n padding: 3px 6px;\n white-space: nowrap;\n"])), function (props) {
@@ -51988,19 +52073,19 @@ function _extends$1P() {
51988
52073
  return n;
51989
52074
  }, _extends$1P.apply(null, arguments);
51990
52075
  }
51991
- function SvgChevronDown(props) {
52076
+ function SvgChevronDownSearch(props) {
51992
52077
  return /*#__PURE__*/createElement("svg", _extends$1P({
51993
- width: 32,
51994
- height: 32,
52078
+ width: 16,
52079
+ height: 16,
51995
52080
  fill: "none",
51996
52081
  xmlns: "http://www.w3.org/2000/svg"
51997
52082
  }, props), _path$1L || (_path$1L = /*#__PURE__*/createElement("path", {
51998
- d: "M9.298 12.937a1.056 1.056 0 10-1.374 1.603l7.39 6.333c.395.339.978.339 1.373 0l7.389-6.333a1.056 1.056 0 10-1.374-1.603L16 18.68l-6.702-5.744z",
51999
- fill: "CurrentColor"
52083
+ d: "M3.163 5.898a.762.762 0 00-.992 1.157l5.334 4.571a.762.762 0 00.991 0l5.334-4.571a.762.762 0 10-.992-1.157l-4.837 4.146-4.838-4.146z",
52084
+ fill: "#818C99"
52000
52085
  })));
52001
52086
  }
52002
52087
 
52003
- var _templateObject$1a, _templateObject2$15, _templateObject3$Y, _templateObject4$O, _templateObject5$I, _templateObject6$C, _templateObject7$A, _templateObject8$v, _templateObject9$p, _templateObject0$m, _templateObject1$i, _templateObject10$c, _templateObject11$a, _templateObject12$8, _templateObject13$7, _templateObject14$5, _templateObject15$4, _templateObject16$4, _templateObject17$4, _templateObject18$4, _templateObject19$4, _templateObject20$4, _templateObject21$3, _templateObject22$2, _templateObject23$2, _templateObject24$2;
52088
+ var _templateObject$1a, _templateObject2$15, _templateObject3$Y, _templateObject4$O, _templateObject5$I, _templateObject6$C, _templateObject7$A, _templateObject8$v, _templateObject9$p, _templateObject0$m, _templateObject1$i, _templateObject10$c, _templateObject11$a, _templateObject12$8, _templateObject13$7, _templateObject14$5, _templateObject15$4, _templateObject16$4, _templateObject17$4, _templateObject18$4, _templateObject19$4, _templateObject20$4, _templateObject21$3, _templateObject22$2, _templateObject23$2, _templateObject24$2, _templateObject25$2;
52004
52089
  var SEARCH_DEBOUNCE_MS = 400;
52005
52090
  function formatMessageDate(date) {
52006
52091
  if (!date) return '';
@@ -52030,7 +52115,7 @@ function getSnippet(text, keyword) {
52030
52115
  var end = Math.min(text.length, idx + keyword.length + SNIPPET_CONTEXT);
52031
52116
  return (start > 0 ? '…' : '') + text.slice(start, end) + (end < text.length ? '…' : '');
52032
52117
  }
52033
- function highlightText(text, keyword, highlightedBackground) {
52118
+ function highlightText(text, keyword, highlightedBackground, textColor) {
52034
52119
  if (!keyword.trim()) return text;
52035
52120
  var snippet = getSnippet(text, keyword);
52036
52121
  var regex = new RegExp("(" + keyword.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + ")", 'gi');
@@ -52038,7 +52123,8 @@ function highlightText(text, keyword, highlightedBackground) {
52038
52123
  return parts.map(function (part, i) {
52039
52124
  return regex.test(part) ? (/*#__PURE__*/React__default.createElement(Highlight, {
52040
52125
  key: i,
52041
- bgColor: highlightedBackground
52126
+ bgColor: highlightedBackground,
52127
+ color: textColor
52042
52128
  }, part)) : part;
52043
52129
  });
52044
52130
  }
@@ -52049,7 +52135,7 @@ function MessagesSearch(_ref) {
52049
52135
  background = _useColor[THEME_COLORS.BACKGROUND],
52050
52136
  textPrimary = _useColor[THEME_COLORS.TEXT_PRIMARY],
52051
52137
  textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY],
52052
- iconPrimary = _useColor[THEME_COLORS.ICON_PRIMARY],
52138
+ accentColor = _useColor[THEME_COLORS.ACCENT],
52053
52139
  border = _useColor[THEME_COLORS.BORDER],
52054
52140
  backgroundHovered = _useColor[THEME_COLORS.BACKGROUND_HOVERED],
52055
52141
  surface1 = _useColor[THEME_COLORS.SURFACE_1],
@@ -52057,6 +52143,7 @@ function MessagesSearch(_ref) {
52057
52143
  var dispatch = useDispatch();
52058
52144
  var activeChannel = useSelector(activeChannelSelector, shallowEqual);
52059
52145
  var contactsMap = useSelector(contactsMapSelector);
52146
+ var connectionStatus = useSelector(connectionStatusSelector);
52060
52147
  var _useState = useState(''),
52061
52148
  searchText = _useState[0],
52062
52149
  setSearchText = _useState[1];
@@ -52123,6 +52210,57 @@ function MessagesSearch(_ref) {
52123
52210
  return Promise.reject(e);
52124
52211
  }
52125
52212
  }, [activeChannel === null || activeChannel === void 0 ? void 0 : activeChannel.id]);
52213
+ var refreshSearch = useCallback(function (text, currentCount) {
52214
+ try {
52215
+ if (!text.trim() || !(activeChannel !== null && activeChannel !== void 0 && activeChannel.id)) return Promise.resolve();
52216
+ var _temp4 = _catch(function () {
52217
+ var SceytChatClient = getClient();
52218
+ var pagesToLoad = Math.max(1, Math.ceil(currentCount / 20));
52219
+ var builder = new SceytChatClient.MessageListSearchQueryBuilder();
52220
+ builder.setChannelId(activeChannel === null || activeChannel === void 0 ? void 0 : activeChannel.id);
52221
+ builder.addField({
52222
+ key: 0,
52223
+ value: {
52224
+ word: text,
52225
+ op: 1
52226
+ }
52227
+ });
52228
+ builder.setCount(20);
52229
+ return Promise.resolve(builder.build()).then(function (query) {
52230
+ var _interrupt = false;
52231
+ function _temp3() {
52232
+ queryRef.current = query;
52233
+ setResults(refreshed);
52234
+ setHasNext(hasNextRefresh);
52235
+ }
52236
+ var refreshed = [];
52237
+ var hasNextRefresh = false;
52238
+ var i = 0;
52239
+ var _temp2 = _for(function () {
52240
+ return !_interrupt && i < pagesToLoad;
52241
+ }, function () {
52242
+ return i++;
52243
+ }, function () {
52244
+ return Promise.resolve(query.loadNext()).then(function (result) {
52245
+ if (result) {
52246
+ refreshed.push.apply(refreshed, result.messages || []);
52247
+ hasNextRefresh = result.hasNext || false;
52248
+ if (!result.hasNext) {
52249
+ _interrupt = true;
52250
+ }
52251
+ }
52252
+ });
52253
+ });
52254
+ return _temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2);
52255
+ });
52256
+ }, function (e) {
52257
+ console.error('[MessagesSearch] refresh error', e);
52258
+ });
52259
+ return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(function () {}) : void 0);
52260
+ } catch (e) {
52261
+ return Promise.reject(e);
52262
+ }
52263
+ }, [activeChannel === null || activeChannel === void 0 ? void 0 : activeChannel.id]);
52126
52264
  var handleInputChange = function handleInputChange(e) {
52127
52265
  var val = e.target.value;
52128
52266
  setSearchText(val);
@@ -52135,7 +52273,7 @@ function MessagesSearch(_ref) {
52135
52273
  try {
52136
52274
  if (!queryRef.current || !hasNext || loadingMore) return Promise.resolve();
52137
52275
  setLoadingMore(true);
52138
- var _temp2 = _finallyRethrows(function () {
52276
+ var _temp5 = _finallyRethrows(function () {
52139
52277
  return _catch(function () {
52140
52278
  return Promise.resolve(queryRef.current.loadNext()).then(function (result) {
52141
52279
  if (result) {
@@ -52153,7 +52291,7 @@ function MessagesSearch(_ref) {
52153
52291
  if (_wasThrown2) throw _result2;
52154
52292
  return _result2;
52155
52293
  });
52156
- return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
52294
+ return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
52157
52295
  } catch (e) {
52158
52296
  return Promise.reject(e);
52159
52297
  }
@@ -52218,12 +52356,12 @@ function MessagesSearch(_ref) {
52218
52356
  try {
52219
52357
  if (!results.length || !(activeChannel !== null && activeChannel !== void 0 && activeChannel.id)) return Promise.resolve();
52220
52358
  var nextIndex = currentIndex + 1;
52221
- var _temp4 = function () {
52359
+ var _temp7 = function () {
52222
52360
  if (nextIndex < results.length) {
52223
52361
  setCurrentIndex(nextIndex);
52224
52362
  dispatch(getMessagesAC(activeChannel, undefined, results[nextIndex].id, undefined, true, 'smooth', true));
52225
52363
  } else {
52226
- var _temp5 = function () {
52364
+ var _temp8 = function () {
52227
52365
  if (hasNext) {
52228
52366
  return Promise.resolve(handleLoadMore()).then(function () {
52229
52367
  setCurrentIndex(function (prev) {
@@ -52233,10 +52371,10 @@ function MessagesSearch(_ref) {
52233
52371
  });
52234
52372
  }
52235
52373
  }();
52236
- if (_temp5 && _temp5.then) return _temp5.then(function () {});
52374
+ if (_temp8 && _temp8.then) return _temp8.then(function () {});
52237
52375
  }
52238
52376
  }();
52239
- return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(function () {}) : void 0);
52377
+ return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(function () {}) : void 0);
52240
52378
  } catch (e) {
52241
52379
  return Promise.reject(e);
52242
52380
  }
@@ -52255,6 +52393,15 @@ function MessagesSearch(_ref) {
52255
52393
  setHasNext(false);
52256
52394
  queryRef.current = null;
52257
52395
  }, [activeChannel === null || activeChannel === void 0 ? void 0 : activeChannel.id]);
52396
+ useEffect(function () {
52397
+ if (connectionStatus === CONNECTION_STATUS.CONNECTED && searchText.trim()) {
52398
+ if (results.length > 0) {
52399
+ refreshSearch(searchText, results.length);
52400
+ } else {
52401
+ buildAndSearch(searchText);
52402
+ }
52403
+ }
52404
+ }, [connectionStatus]);
52258
52405
  var grouped = useMemo(function () {
52259
52406
  var groups = [];
52260
52407
  results.forEach(function (msg) {
@@ -52283,8 +52430,8 @@ function MessagesSearch(_ref) {
52283
52430
  onClick: handleClose,
52284
52431
  hoverBackground: backgroundHovered
52285
52432
  }, /*#__PURE__*/React__default.createElement(SvgClose, {
52286
- color: iconPrimary
52287
- }))), /*#__PURE__*/React__default.createElement(SearchInputWrapper, {
52433
+ color: accentColor
52434
+ }))), /*#__PURE__*/React__default.createElement(SearchRow, null, /*#__PURE__*/React__default.createElement(SearchInputWrapper, {
52288
52435
  backgroundColor: surface1
52289
52436
  }, /*#__PURE__*/React__default.createElement(SearchIconWrapper, null, /*#__PURE__*/React__default.createElement(SvgSearch, {
52290
52437
  color: textSecondary
@@ -52295,21 +52442,7 @@ function MessagesSearch(_ref) {
52295
52442
  onChange: handleInputChange,
52296
52443
  color: textPrimary,
52297
52444
  placeholderColor: textSecondary
52298
- }), searchText && results.length > 0 && (/*#__PURE__*/React__default.createElement(NavButtons, null, /*#__PURE__*/React__default.createElement(NavButton, {
52299
- onClick: handleNavNext,
52300
- disabled: currentIndex >= results.length - 1 && !hasNext,
52301
- hoverBackground: backgroundHovered,
52302
- iconColor: textSecondary
52303
- }, /*#__PURE__*/React__default.createElement(SvgChevronDown, null)), /*#__PURE__*/React__default.createElement(NavButton, {
52304
- onClick: handleNavPrev,
52305
- disabled: currentIndex <= 0,
52306
- hoverBackground: backgroundHovered,
52307
- iconColor: textSecondary
52308
- }, /*#__PURE__*/React__default.createElement(SvgChevronDown, {
52309
- style: {
52310
- transform: 'rotate(180deg)'
52311
- }
52312
- })))), searchText && (/*#__PURE__*/React__default.createElement(ClearButton, {
52445
+ }), searchText && (/*#__PURE__*/React__default.createElement(ClearButton, {
52313
52446
  onClick: function onClick() {
52314
52447
  setSearchText('');
52315
52448
  setResults([]);
@@ -52322,6 +52455,22 @@ function MessagesSearch(_ref) {
52322
52455
  color: textSecondary,
52323
52456
  width: 14,
52324
52457
  height: 14
52458
+ })))), /*#__PURE__*/React__default.createElement(NavButtons, {
52459
+ backgroundColor: surface1
52460
+ }, /*#__PURE__*/React__default.createElement(NavButton, {
52461
+ onClick: handleNavNext,
52462
+ disabled: currentIndex >= results.length - 1 && !hasNext,
52463
+ hoverBackground: background,
52464
+ iconColor: textSecondary
52465
+ }, /*#__PURE__*/React__default.createElement(SvgChevronDownSearch, null)), /*#__PURE__*/React__default.createElement(NavButton, {
52466
+ onClick: handleNavPrev,
52467
+ disabled: currentIndex <= 0,
52468
+ hoverBackground: background,
52469
+ iconColor: textSecondary
52470
+ }, /*#__PURE__*/React__default.createElement(SvgChevronDownSearch, {
52471
+ style: {
52472
+ transform: 'rotate(180deg)'
52473
+ }
52325
52474
  })))), /*#__PURE__*/React__default.createElement(ResultsList, {
52326
52475
  ref: listRef,
52327
52476
  onScroll: handleScroll
@@ -52368,7 +52517,7 @@ function MessagesSearch(_ref) {
52368
52517
  color: textSecondary
52369
52518
  }, formatMessageDate(msg.createdAt))), /*#__PURE__*/React__default.createElement(ResultBodyRow, null, /*#__PURE__*/React__default.createElement(ResultBody, {
52370
52519
  color: textSecondary
52371
- }, msg.body ? highlightText(msg.body, searchText === null || searchText === void 0 ? void 0 : searchText.trim(), highlightedBackground) : (_msg$attachments2 = msg.attachments) !== null && _msg$attachments2 !== void 0 && _msg$attachments2.length ? 'Attachment' : ''), firstImage && (/*#__PURE__*/React__default.createElement(ResultAttachmentWrapper, null, /*#__PURE__*/React__default.createElement(Attachment$1, {
52520
+ }, msg.body ? highlightText(msg.body, searchText === null || searchText === void 0 ? void 0 : searchText.trim(), highlightedBackground, textSecondary) : (_msg$attachments2 = msg.attachments) !== null && _msg$attachments2 !== void 0 && _msg$attachments2.length ? 'Attachment' : ''), firstImage && (/*#__PURE__*/React__default.createElement(ResultAttachmentWrapper, null, /*#__PURE__*/React__default.createElement(Attachment$1, {
52372
52521
  attachment: firstImage,
52373
52522
  backgroundColor: background,
52374
52523
  imageAttachmentMaxWidth: 28,
@@ -52399,60 +52548,65 @@ var Title$4 = styled.h3(_templateObject3$Y || (_templateObject3$Y = _taggedTempl
52399
52548
  var CloseButton$2 = styled.button(_templateObject4$O || (_templateObject4$O = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n padding: 8px;\n border-radius: 50%;\n transition: background-color 0.15s;\n &:hover {\n background-color: ", ";\n }\n"])), function (p) {
52400
52549
  return p.hoverBackground;
52401
52550
  });
52402
- var SearchInputWrapper = styled.div(_templateObject5$I || (_templateObject5$I = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n margin: 12px;\n padding: 8px 12px;\n background-color: ", ";\n border-radius: 10px;\n flex-shrink: 0;\n"])), function (p) {
52551
+ var SearchRow = styled.div(_templateObject5$I || (_templateObject5$I = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px;\n flex-shrink: 0;\n"])));
52552
+ var SearchInputWrapper = styled.div(_templateObject6$C || (_templateObject6$C = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n flex: 1;\n padding: 8px 12px;\n background-color: ", ";\n border-radius: 10px;\n min-width: 0;\n"])), function (p) {
52403
52553
  return p.backgroundColor;
52404
52554
  });
52405
- var SearchIconWrapper = styled.span(_templateObject6$C || (_templateObject6$C = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-shrink: 0;\n margin-right: 6px;\n > svg {\n width: 16px;\n height: 16px;\n }\n"])));
52406
- var SearchInput$1 = styled.input(_templateObject7$A || (_templateObject7$A = _taggedTemplateLiteralLoose(["\n flex: 1;\n border: none;\n outline: none;\n background: none;\n font-size: 15px;\n line-height: 20px;\n color: ", ";\n &::placeholder {\n color: ", ";\n }\n"])), function (p) {
52555
+ var SearchIconWrapper = styled.span(_templateObject7$A || (_templateObject7$A = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-shrink: 0;\n margin-right: 6px;\n > svg {\n width: 16px;\n height: 16px;\n }\n"])));
52556
+ var SearchInput$1 = styled.input(_templateObject8$v || (_templateObject8$v = _taggedTemplateLiteralLoose(["\n flex: 1;\n border: none;\n outline: none;\n background: none;\n font-size: 15px;\n line-height: 20px;\n color: ", ";\n &::placeholder {\n color: ", ";\n }\n"])), function (p) {
52407
52557
  return p.color;
52408
52558
  }, function (p) {
52409
52559
  return p.placeholderColor;
52410
52560
  });
52411
- var NavButtons = styled.div(_templateObject8$v || (_templateObject8$v = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n margin-right: 4px;\n"])));
52412
- var NavButton = styled.button(_templateObject9$p || (_templateObject9$p = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n border-radius: 50%;\n margin: -2px;\n transition: background-color 0.15s;\n &:hover:not(:disabled) {\n background-color: ", ";\n }\n &:disabled {\n cursor: default;\n opacity: 0.35;\n }\n & > svg {\n margin: -6px;\n color: ", ";\n }\n"])), function (p) {
52561
+ var NavButtons = styled.div(_templateObject9$p || (_templateObject9$p = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n background-color: ", ";\n border-radius: 10px;\n padding: 8px;\n"])), function (p) {
52562
+ return p.backgroundColor;
52563
+ });
52564
+ var NavButton = styled.button(_templateObject0$m || (_templateObject0$m = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n border-radius: 50%;\n transition: background-color 0.15s;\n padding: 3px;\n &:hover:not(:disabled) {\n background-color: ", ";\n }\n &:disabled {\n cursor: default;\n opacity: 0.35;\n }\n & > svg {\n path {\n fill: ", ";\n }\n }\n"])), function (p) {
52413
52565
  return p.hoverBackground;
52414
52566
  }, function (p) {
52415
52567
  return p.iconColor;
52416
52568
  });
52417
- var ClearButton = styled.button(_templateObject0$m || (_templateObject0$m = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n background: none;\n border: none;\n cursor: pointer;\n padding: 2px;\n border-radius: 50%;\n &:hover {\n background-color: ", ";\n }\n\n & > svg {\n width: 11px;\n height: 11px;\n }\n"])), function (p) {
52569
+ var ClearButton = styled.button(_templateObject1$i || (_templateObject1$i = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n background: none;\n border: none;\n cursor: pointer;\n padding: 2px;\n border-radius: 50%;\n &:hover {\n background-color: ", ";\n }\n\n & > svg {\n width: 11px;\n height: 11px;\n }\n"])), function (p) {
52418
52570
  return p.hoverBackground;
52419
52571
  });
52420
- var ResultsList = styled.div(_templateObject1$i || (_templateObject1$i = _taggedTemplateLiteralLoose(["\n flex: 1;\n overflow-y: auto;\n padding: 0 8px 8px 8px;\n"])));
52421
- var StatusText$1 = styled.p(_templateObject10$c || (_templateObject10$c = _taggedTemplateLiteralLoose(["\n text-align: center;\n color: ", ";\n ", "\n align-items: center;\n display: flex;\n justify-content: center;\n font-weight: 400;\n font-size: 15px;\n line-height: 20px;\n margin: 0;\n"])), function (p) {
52572
+ var ResultsList = styled.div(_templateObject10$c || (_templateObject10$c = _taggedTemplateLiteralLoose(["\n flex: 1;\n overflow-y: auto;\n padding: 0 8px 8px 8px;\n"])));
52573
+ var StatusText$1 = styled.p(_templateObject11$a || (_templateObject11$a = _taggedTemplateLiteralLoose(["\n text-align: center;\n color: ", ";\n ", "\n align-items: center;\n display: flex;\n justify-content: center;\n font-weight: 400;\n font-size: 15px;\n line-height: 20px;\n margin: 0;\n"])), function (p) {
52422
52574
  return p.color;
52423
52575
  }, function (props) {
52424
52576
  return props.full ? 'height: 100%;' : '';
52425
52577
  });
52426
- var GroupSection = styled.div(_templateObject11$a || (_templateObject11$a = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
52427
- var GroupLabel = styled.div(_templateObject12$8 || (_templateObject12$8 = _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 letter-spacing: 0px;\n"])), function (p) {
52578
+ var GroupSection = styled.div(_templateObject12$8 || (_templateObject12$8 = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
52579
+ var GroupLabel = styled.div(_templateObject13$7 || (_templateObject13$7 = _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 letter-spacing: 0px;\n"])), function (p) {
52428
52580
  return p.backgroundColor;
52429
52581
  }, function (p) {
52430
52582
  return p.color;
52431
52583
  });
52432
- var ResultItem = styled.div(_templateObject13$7 || (_templateObject13$7 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 7px 8px;\n cursor: pointer;\n transition: background-color 0.1s;\n border-radius: 12px;\n background-color: ", ";\n &:hover {\n background-color: ", ";\n }\n"])), function (p) {
52584
+ var ResultItem = styled.div(_templateObject14$5 || (_templateObject14$5 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 7px 8px;\n cursor: pointer;\n transition: background-color 0.1s;\n border-radius: 12px;\n background-color: ", ";\n &:hover {\n background-color: ", ";\n }\n"])), function (p) {
52433
52585
  return p.isActive ? p.hoverBackground : 'transparent';
52434
52586
  }, function (p) {
52435
52587
  return p.hoverBackground;
52436
52588
  });
52437
- var ResultAvatar = styled.div(_templateObject14$5 || (_templateObject14$5 = _taggedTemplateLiteralLoose(["\n flex-shrink: 0;\n"])));
52438
- var ResultAttachmentWrapper = styled.div(_templateObject15$4 || (_templateObject15$4 = _taggedTemplateLiteralLoose(["\n flex-shrink: 0;\n width: 28px;\n height: 28px;\n border-radius: 8px;\n overflow: hidden;\n align-self: center;\n margin-top: 4px;\n"])));
52439
- var ResultContent = styled.div(_templateObject16$4 || (_templateObject16$4 = _taggedTemplateLiteralLoose(["\n flex: 1;\n min-width: 0;\n gap: 4px;\n"])));
52440
- var ResultMeta = styled.div(_templateObject17$4 || (_templateObject17$4 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 8px;\n margin-bottom: 2px;\n"])));
52441
- var ResultSender = styled.span(_templateObject18$4 || (_templateObject18$4 = _taggedTemplateLiteralLoose(["\n color: ", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-weight: 500;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.2px;\n padding-top: 3px;\n"])), function (p) {
52589
+ var ResultAvatar = styled.div(_templateObject15$4 || (_templateObject15$4 = _taggedTemplateLiteralLoose(["\n flex-shrink: 0;\n"])));
52590
+ var ResultAttachmentWrapper = styled.div(_templateObject16$4 || (_templateObject16$4 = _taggedTemplateLiteralLoose(["\n flex-shrink: 0;\n width: 28px;\n height: 28px;\n border-radius: 8px;\n overflow: hidden;\n align-self: center;\n margin-top: 4px;\n"])));
52591
+ var ResultContent = styled.div(_templateObject17$4 || (_templateObject17$4 = _taggedTemplateLiteralLoose(["\n flex: 1;\n min-width: 0;\n gap: 4px;\n"])));
52592
+ var ResultMeta = styled.div(_templateObject18$4 || (_templateObject18$4 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 8px;\n margin-bottom: 2px;\n"])));
52593
+ var ResultSender = styled.span(_templateObject19$4 || (_templateObject19$4 = _taggedTemplateLiteralLoose(["\n color: ", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-weight: 500;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.2px;\n padding-top: 3px;\n"])), function (p) {
52442
52594
  return p.color;
52443
52595
  });
52444
- var ResultTime = styled.span(_templateObject19$4 || (_templateObject19$4 = _taggedTemplateLiteralLoose(["\n color: ", ";\n flex-shrink: 0;\n font-weight: 400;\n font-size: 12px;\n line-height: 14px;\n letter-spacing: 0px;\n margin-top: 4px;\n"])), function (p) {
52596
+ var ResultTime = styled.span(_templateObject20$4 || (_templateObject20$4 = _taggedTemplateLiteralLoose(["\n color: ", ";\n flex-shrink: 0;\n font-weight: 400;\n font-size: 12px;\n line-height: 14px;\n letter-spacing: 0px;\n margin-top: 4px;\n"])), function (p) {
52445
52597
  return p.color;
52446
52598
  });
52447
- var ResultBodyRow = styled.div(_templateObject20$4 || (_templateObject20$4 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n max-height: 16px;\n"])));
52448
- var ResultBody = styled.div(_templateObject21$3 || (_templateObject21$3 = _taggedTemplateLiteralLoose(["\n color: ", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-weight: 400;\n font-size: 14px;\n line-height: 16px;\n letter-spacing: -0.08px;\n width: 100%;\n margin-top: 4px;\n"])), function (p) {
52599
+ var ResultBodyRow = styled.div(_templateObject21$3 || (_templateObject21$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n max-height: 16px;\n"])));
52600
+ var ResultBody = styled.div(_templateObject22$2 || (_templateObject22$2 = _taggedTemplateLiteralLoose(["\n color: ", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-weight: 400;\n font-size: 14px;\n line-height: 16px;\n letter-spacing: -0.08px;\n width: 100%;\n margin-top: 4px;\n"])), function (p) {
52449
52601
  return p.color;
52450
52602
  });
52451
- var Highlight = styled.mark(_templateObject22$2 || (_templateObject22$2 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n border-radius: 3px;\n padding: 0 2px;\n"])), function (p) {
52603
+ var Highlight = styled.mark(_templateObject23$2 || (_templateObject23$2 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n color: ", ";\n border-radius: 3px;\n padding: 0 2px;\n"])), function (p) {
52452
52604
  return p.bgColor;
52605
+ }, function (p) {
52606
+ return p.color;
52453
52607
  });
52454
- var EmptyState = styled.div(_templateObject23$2 || (_templateObject23$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n padding: 0 24px;\n gap: 12px;\n & > svg {\n width: 56px;\n height: 56px;\n }\n"])));
52455
- var EmptyStateText = styled.p(_templateObject24$2 || (_templateObject24$2 = _taggedTemplateLiteralLoose(["\n margin: 0;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: ", ";\n text-align: center;\n"])), function (p) {
52608
+ var EmptyState = styled.div(_templateObject24$2 || (_templateObject24$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n padding: 0 24px;\n gap: 12px;\n & > svg {\n width: 56px;\n height: 56px;\n }\n"])));
52609
+ var EmptyStateText = styled.p(_templateObject25$2 || (_templateObject25$2 = _taggedTemplateLiteralLoose(["\n margin: 0;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: ", ";\n text-align: center;\n"])), function (p) {
52456
52610
  return p.color;
52457
52611
  });
52458
52612
 
@@ -52702,6 +52856,28 @@ var ChannelDetailsContainer = function ChannelDetailsContainer(_ref) {
52702
52856
  };
52703
52857
  var DetailsWrapper = styled.div(_templateObject$1b || (_templateObject$1b = _taggedTemplateLiteralLoose(["\n user-select: text;\n"])));
52704
52858
 
52859
+ var _path$1M;
52860
+ function _extends$1Q() {
52861
+ return _extends$1Q = Object.assign ? Object.assign.bind() : function (n) {
52862
+ for (var e = 1; e < arguments.length; e++) {
52863
+ var t = arguments[e];
52864
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
52865
+ }
52866
+ return n;
52867
+ }, _extends$1Q.apply(null, arguments);
52868
+ }
52869
+ function SvgChevronDown(props) {
52870
+ return /*#__PURE__*/createElement("svg", _extends$1Q({
52871
+ width: 32,
52872
+ height: 32,
52873
+ fill: "none",
52874
+ xmlns: "http://www.w3.org/2000/svg"
52875
+ }, props), _path$1M || (_path$1M = /*#__PURE__*/createElement("path", {
52876
+ d: "M9.298 12.937a1.056 1.056 0 10-1.374 1.603l7.39 6.333c.395.339.978.339 1.373 0l7.389-6.333a1.056 1.056 0 10-1.374-1.603L16 18.68l-6.702-5.744z",
52877
+ fill: "CurrentColor"
52878
+ })));
52879
+ }
52880
+
52705
52881
  var _templateObject$1c, _templateObject2$16;
52706
52882
  var MessagesScrollToBottomButton = function MessagesScrollToBottomButton(_ref) {
52707
52883
  var buttonIcon = _ref.buttonIcon,
@@ -52795,23 +52971,23 @@ var UnreadCount$1 = styled.span(_templateObject2$16 || (_templateObject2$16 = _t
52795
52971
  return props.textColor || '#fff';
52796
52972
  });
52797
52973
 
52798
- var _path$1M, _path2$h;
52799
- function _extends$1Q() {
52800
- return _extends$1Q = Object.assign ? Object.assign.bind() : function (n) {
52974
+ var _path$1N, _path2$h;
52975
+ function _extends$1R() {
52976
+ return _extends$1R = Object.assign ? Object.assign.bind() : function (n) {
52801
52977
  for (var e = 1; e < arguments.length; e++) {
52802
52978
  var t = arguments[e];
52803
52979
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
52804
52980
  }
52805
52981
  return n;
52806
- }, _extends$1Q.apply(null, arguments);
52982
+ }, _extends$1R.apply(null, arguments);
52807
52983
  }
52808
52984
  function SvgMention(props) {
52809
- return /*#__PURE__*/createElement("svg", _extends$1Q({
52985
+ return /*#__PURE__*/createElement("svg", _extends$1R({
52810
52986
  width: 24,
52811
52987
  height: 24,
52812
52988
  fill: "none",
52813
52989
  xmlns: "http://www.w3.org/2000/svg"
52814
- }, props), _path$1M || (_path$1M = /*#__PURE__*/createElement("path", {
52990
+ }, props), _path$1N || (_path$1N = /*#__PURE__*/createElement("path", {
52815
52991
  d: "M12 15.6a3.6 3.6 0 100-7.2 3.6 3.6 0 000 7.2z",
52816
52992
  stroke: "currentColor",
52817
52993
  strokeWidth: 1.8,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sceyt-chat-react-uikit",
3
- "version": "1.8.4-beta.7",
3
+ "version": "1.8.4-beta.8",
4
4
  "description": "Interactive React UI Components for Sceyt Chat.",
5
5
  "author": "Sceyt",
6
6
  "license": "MIT",