sceyt-chat-react-uikit 1.8.0-beta.15 → 1.8.0-beta.17

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 CHANGED
@@ -14302,7 +14302,9 @@ var CopiedTooltip = styled__default.span(_templateObject41 || (_templateObject41
14302
14302
  }, function (p) {
14303
14303
  return p.color;
14304
14304
  });
14305
- var ViewOnceToggleCont = styled__default.div(_templateObject42 || (_templateObject42 = _taggedTemplateLiteralLoose(["\n position: relative;\n cursor: pointer;\n margin: auto 0px 0px;\n height: 32px;\n align-items: center;\n display: flex;\n order: ", ";\n\n svg {\n circle {\n fill: ", ";\n }\n path {\n fill: ", ";\n }\n }\n"])), function (props) {
14305
+ var ViewOnceToggleCont = styled__default.div(_templateObject42 || (_templateObject42 = _taggedTemplateLiteralLoose(["\n position: relative;\n cursor: pointer;\n margin: auto 0px 0px;\n height: ", ";\n align-items: center;\n display: flex;\n order: ", ";\n\n svg {\n circle {\n fill: ", ";\n }\n path {\n fill: ", ";\n }\n }\n"])), function (props) {
14306
+ return props.height ? props.height + "px" : '36px';
14307
+ }, function (props) {
14306
14308
  return props.order === 0 || props.order ? props.order : 2;
14307
14309
  }, function (props) {
14308
14310
  return props.color;
@@ -31203,7 +31205,9 @@ var SliderPopup = function SliderPopup(_ref) {
31203
31205
  log.error('Error getting initial attachment from cache:', error);
31204
31206
  });
31205
31207
  }
31206
- if (currentMediaFile) {
31208
+ if (currentMediaFile && !attachmentsList.find(function (item) {
31209
+ return item.id === currentMediaFile.id;
31210
+ })) {
31207
31211
  dispatch(getAttachmentsAC(channel.id, channelDetailsTabs.media, 34, queryDirection.NEAR, currentMediaFile.id, true));
31208
31212
  }
31209
31213
  return function () {
@@ -31262,7 +31266,6 @@ var SliderPopup = function SliderPopup(_ref) {
31262
31266
  }
31263
31267
  }, []);
31264
31268
  var loadNextMoreAttachments = React.useCallback(function () {
31265
- debugger;
31266
31269
  if (activeFileIndex > attachmentsList.length - 5 && attachmentLoadingStateForPopup === LOADING_STATE.LOADED && attachmentsForPopupHasNext) {
31267
31270
  dispatch(loadMoreAttachmentsAC(34, queryDirection.NEXT, attachmentsList[attachmentsList.length - 1].id, true));
31268
31271
  }
@@ -31272,9 +31275,6 @@ var SliderPopup = function SliderPopup(_ref) {
31272
31275
  dispatch(loadMoreAttachmentsAC(34, queryDirection.PREV, attachmentsList[0].id, true));
31273
31276
  }
31274
31277
  }, [activeFileIndex, attachmentLoadingStateForPopup, attachmentsForPopupHasPrev, attachmentsList, dispatch]);
31275
- console.log('attachmentsForPopupHasNext', attachmentsForPopupHasNext);
31276
- console.log('attachmentsForPopupHasPrev', attachmentsForPopupHasPrev);
31277
- console.log('attachmentsList', attachmentsList);
31278
31278
  return /*#__PURE__*/React__default.createElement(Container$b, {
31279
31279
  draggable: false
31280
31280
  }, /*#__PURE__*/React__default.createElement(SliderHeader, null, /*#__PURE__*/React__default.createElement(FileInfo, null, /*#__PURE__*/React__default.createElement(Avatar, {
@@ -46619,7 +46619,8 @@ var SendMessageInput = function SendMessageInput(_ref3) {
46619
46619
  return setViewOnce(!viewOnce);
46620
46620
  },
46621
46621
  color: viewOnce ? accentColor : iconInactive,
46622
- textColor: viewOnce ? textOnPrimary : iconInactive
46622
+ textColor: viewOnce ? textOnPrimary : iconInactive,
46623
+ height: inputContainerHeight || minHeight
46623
46624
  }, viewOnce ? ViewOnceSelectedSVGIcon || /*#__PURE__*/React__default.createElement(SvgViewOnceSelected, null) : ViewOnceNotSelectedSVGIcon || /*#__PURE__*/React__default.createElement(SvgViewOnceNotSelected, null))), showAddAttachments && addAttachmentByMenu && !messageToEdit ? (/*#__PURE__*/React__default.createElement(DropDown, {
46624
46625
  forceClose: showChooseAttachmentType,
46625
46626
  position: addAttachmentsInRightSide ? 'top' : 'topRight',
@@ -50608,7 +50609,7 @@ var Details = function Details(_ref) {
50608
50609
  dispatch(loadMoreMembersAC(15, activeChannel.id));
50609
50610
  }
50610
50611
  } else if (attachmentLoadingState === LOADING_STATE.LOADED && attachmentsHasNex) {
50611
- dispatch(loadMoreAttachmentsAC(20));
50612
+ dispatch(loadMoreAttachmentsAC(20, queryDirection.PREV));
50612
50613
  }
50613
50614
  }
50614
50615
  };
package/index.modern.js CHANGED
@@ -14301,7 +14301,9 @@ var CopiedTooltip = styled.span(_templateObject41 || (_templateObject41 = _tagge
14301
14301
  }, function (p) {
14302
14302
  return p.color;
14303
14303
  });
14304
- var ViewOnceToggleCont = styled.div(_templateObject42 || (_templateObject42 = _taggedTemplateLiteralLoose(["\n position: relative;\n cursor: pointer;\n margin: auto 0px 0px;\n height: 32px;\n align-items: center;\n display: flex;\n order: ", ";\n\n svg {\n circle {\n fill: ", ";\n }\n path {\n fill: ", ";\n }\n }\n"])), function (props) {
14304
+ var ViewOnceToggleCont = styled.div(_templateObject42 || (_templateObject42 = _taggedTemplateLiteralLoose(["\n position: relative;\n cursor: pointer;\n margin: auto 0px 0px;\n height: ", ";\n align-items: center;\n display: flex;\n order: ", ";\n\n svg {\n circle {\n fill: ", ";\n }\n path {\n fill: ", ";\n }\n }\n"])), function (props) {
14305
+ return props.height ? props.height + "px" : '36px';
14306
+ }, function (props) {
14305
14307
  return props.order === 0 || props.order ? props.order : 2;
14306
14308
  }, function (props) {
14307
14309
  return props.color;
@@ -31202,7 +31204,9 @@ var SliderPopup = function SliderPopup(_ref) {
31202
31204
  log.error('Error getting initial attachment from cache:', error);
31203
31205
  });
31204
31206
  }
31205
- if (currentMediaFile) {
31207
+ if (currentMediaFile && !attachmentsList.find(function (item) {
31208
+ return item.id === currentMediaFile.id;
31209
+ })) {
31206
31210
  dispatch(getAttachmentsAC(channel.id, channelDetailsTabs.media, 34, queryDirection.NEAR, currentMediaFile.id, true));
31207
31211
  }
31208
31212
  return function () {
@@ -31261,7 +31265,6 @@ var SliderPopup = function SliderPopup(_ref) {
31261
31265
  }
31262
31266
  }, []);
31263
31267
  var loadNextMoreAttachments = useCallback(function () {
31264
- debugger;
31265
31268
  if (activeFileIndex > attachmentsList.length - 5 && attachmentLoadingStateForPopup === LOADING_STATE.LOADED && attachmentsForPopupHasNext) {
31266
31269
  dispatch(loadMoreAttachmentsAC(34, queryDirection.NEXT, attachmentsList[attachmentsList.length - 1].id, true));
31267
31270
  }
@@ -31271,9 +31274,6 @@ var SliderPopup = function SliderPopup(_ref) {
31271
31274
  dispatch(loadMoreAttachmentsAC(34, queryDirection.PREV, attachmentsList[0].id, true));
31272
31275
  }
31273
31276
  }, [activeFileIndex, attachmentLoadingStateForPopup, attachmentsForPopupHasPrev, attachmentsList, dispatch]);
31274
- console.log('attachmentsForPopupHasNext', attachmentsForPopupHasNext);
31275
- console.log('attachmentsForPopupHasPrev', attachmentsForPopupHasPrev);
31276
- console.log('attachmentsList', attachmentsList);
31277
31277
  return /*#__PURE__*/React__default.createElement(Container$b, {
31278
31278
  draggable: false
31279
31279
  }, /*#__PURE__*/React__default.createElement(SliderHeader, null, /*#__PURE__*/React__default.createElement(FileInfo, null, /*#__PURE__*/React__default.createElement(Avatar, {
@@ -46618,7 +46618,8 @@ var SendMessageInput = function SendMessageInput(_ref3) {
46618
46618
  return setViewOnce(!viewOnce);
46619
46619
  },
46620
46620
  color: viewOnce ? accentColor : iconInactive,
46621
- textColor: viewOnce ? textOnPrimary : iconInactive
46621
+ textColor: viewOnce ? textOnPrimary : iconInactive,
46622
+ height: inputContainerHeight || minHeight
46622
46623
  }, viewOnce ? ViewOnceSelectedSVGIcon || /*#__PURE__*/React__default.createElement(SvgViewOnceSelected, null) : ViewOnceNotSelectedSVGIcon || /*#__PURE__*/React__default.createElement(SvgViewOnceNotSelected, null))), showAddAttachments && addAttachmentByMenu && !messageToEdit ? (/*#__PURE__*/React__default.createElement(DropDown, {
46623
46624
  forceClose: showChooseAttachmentType,
46624
46625
  position: addAttachmentsInRightSide ? 'top' : 'topRight',
@@ -50607,7 +50608,7 @@ var Details = function Details(_ref) {
50607
50608
  dispatch(loadMoreMembersAC(15, activeChannel.id));
50608
50609
  }
50609
50610
  } else if (attachmentLoadingState === LOADING_STATE.LOADED && attachmentsHasNex) {
50610
- dispatch(loadMoreAttachmentsAC(20));
50611
+ dispatch(loadMoreAttachmentsAC(20, queryDirection.PREV));
50611
50612
  }
50612
50613
  }
50613
50614
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sceyt-chat-react-uikit",
3
- "version": "1.8.0-beta.15",
3
+ "version": "1.8.0-beta.17",
4
4
  "description": "Interactive React UI Components for Sceyt Chat.",
5
5
  "author": "Sceyt",
6
6
  "license": "MIT",