sceyt-chat-react-uikit 1.8.7-beta.1 → 1.8.7-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.
Files changed (3) hide show
  1. package/index.js +11 -12
  2. package/index.modern.js +11 -12
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -44984,10 +44984,8 @@ function useChatController(_ref5) {
44984
44984
  return;
44985
44985
  }
44986
44986
  if (currentScrollTop <= historyEdgeScrollTop + PRELOAD_TRIGGER_PX) {
44987
- setScrollTop(container, historyEdgeScrollTop);
44988
44987
  currentScrollTop = historyEdgeScrollTop;
44989
44988
  } else if (currentScrollTop >= latestEdgeScrollTop - PRELOAD_TRIGGER_PX) {
44990
- setScrollTop(container, latestEdgeScrollTop);
44991
44989
  currentScrollTop = latestEdgeScrollTop;
44992
44990
  }
44993
44991
  var distanceFromLatest = latestEdgeScrollTop - currentScrollTop;
@@ -45120,7 +45118,7 @@ function useChatController(_ref5) {
45120
45118
  }, [channel === null || channel === void 0 ? void 0 : channel.id, messages]);
45121
45119
  React.useEffect(function () {
45122
45120
  var el = scrollRef.current;
45123
- if (!el || !shouldUseFirefoxWheelInterop()) {
45121
+ if (!el || !shouldUseFirefoxWheelInterop() || !messages.length) {
45124
45122
  return;
45125
45123
  }
45126
45124
  var onWheel = function onWheel(event) {
@@ -45205,6 +45203,7 @@ function useChatController(_ref5) {
45205
45203
  itemElementsRef.current.clear();
45206
45204
  previousMessagesRef.current = [];
45207
45205
  suppressedMessageChangesRef.current = 0;
45206
+ lastScrollActivityAtRef.current = 0;
45208
45207
  pendingLatestJumpRef.current = null;
45209
45208
  pendingEdgeCheckAfterLoadRef.current = false;
45210
45209
  (_pendingWindowLoadRef = pendingWindowLoadRef.current) === null || _pendingWindowLoadRef === void 0 ? void 0 : _pendingWindowLoadRef.resolve({
@@ -46634,12 +46633,7 @@ var MessageList = function MessageList(_ref) {
46634
46633
  iconColor: accentColor
46635
46634
  }, /*#__PURE__*/React__default.createElement(SvgChoseMedia, null)), "Drag & drop to send as media")))), /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ScrollViewport, null, isJumpingToItem && (/*#__PURE__*/React__default.createElement(JumpOverlay, null, /*#__PURE__*/React__default.createElement(JumpSpinner, {
46636
46635
  "$color": iconInactive
46637
- }))), !messages.length && loadingPrevMessages === LOADING_STATE.LOADING && loadingNextMessages === LOADING_STATE.LOADING ? (/*#__PURE__*/React__default.createElement(NoMessagesContainer, {
46638
- color: textPrimary
46639
- }, /*#__PURE__*/React__default.createElement(JumpSpinner, {
46640
- "$color": iconInactive,
46641
- "$size": 32
46642
- }))) : (/*#__PURE__*/React__default.createElement(Container$j, {
46636
+ }))), /*#__PURE__*/React__default.createElement(Container$j, {
46643
46637
  id: 'scrollableDiv',
46644
46638
  className: 'show-scrollbar',
46645
46639
  ref: scrollRef,
@@ -46700,18 +46694,23 @@ var MessageList = function MessageList(_ref) {
46700
46694
  isHighlighted: timelineItem.isHighlighted,
46701
46695
  ifLatestAndHasNotPreview: timelineItem.ifLatestAndHasNotPreview
46702
46696
  }));
46703
- }))) : loadingPrevMessages === LOADING_STATE.LOADED && loadingNextMessages === LOADING_STATE.LOADED && (/*#__PURE__*/React__default.createElement(NoMessagesContainer, {
46697
+ }))) : loadingPrevMessages === LOADING_STATE.LOADED && loadingNextMessages === LOADING_STATE.LOADED ? (/*#__PURE__*/React__default.createElement(NoMessagesContainer, {
46704
46698
  color: textPrimary
46705
46699
  }, /*#__PURE__*/React__default.createElement(SvgNoMessagesIcon, null), /*#__PURE__*/React__default.createElement(NoMessagesTitle, {
46706
46700
  color: textPrimary
46707
46701
  }, "No Messages yet"), /*#__PURE__*/React__default.createElement(NoMessagesText, {
46708
46702
  color: textSecondary
46709
- }, "No messages yet, start the chat"))), (attachmentsPreview === null || attachmentsPreview === void 0 ? void 0 : attachmentsPreview.show) && mediaFile && (/*#__PURE__*/React__default.createElement(SliderPopup, {
46703
+ }, "No messages yet, start the chat"))) : (/*#__PURE__*/React__default.createElement(NoMessagesContainer, {
46704
+ color: textPrimary
46705
+ }, /*#__PURE__*/React__default.createElement(JumpSpinner, {
46706
+ "$color": iconInactive,
46707
+ "$size": 32
46708
+ }))), (attachmentsPreview === null || attachmentsPreview === void 0 ? void 0 : attachmentsPreview.show) && mediaFile && (/*#__PURE__*/React__default.createElement(SliderPopup, {
46710
46709
  channel: channel,
46711
46710
  setIsSliderOpen: setMediaFile,
46712
46711
  currentMediaFile: mediaFile,
46713
46712
  attachmentsPreview: attachmentsPreview
46714
- })))), showTopFixedDate && stickyDate && (/*#__PURE__*/React__default.createElement(StickyDateLabel, {
46713
+ }))), showTopFixedDate && stickyDate && (/*#__PURE__*/React__default.createElement(StickyDateLabel, {
46715
46714
  dateDividerFontSize: dateDividerFontSize,
46716
46715
  dateDividerTextColor: dateDividerTextColor || textOnPrimary,
46717
46716
  dateDividerBackgroundColor: dateDividerBackgroundColor || newMessagesSeparatorBackground || overlayBackground,
package/index.modern.js CHANGED
@@ -44983,10 +44983,8 @@ function useChatController(_ref5) {
44983
44983
  return;
44984
44984
  }
44985
44985
  if (currentScrollTop <= historyEdgeScrollTop + PRELOAD_TRIGGER_PX) {
44986
- setScrollTop(container, historyEdgeScrollTop);
44987
44986
  currentScrollTop = historyEdgeScrollTop;
44988
44987
  } else if (currentScrollTop >= latestEdgeScrollTop - PRELOAD_TRIGGER_PX) {
44989
- setScrollTop(container, latestEdgeScrollTop);
44990
44988
  currentScrollTop = latestEdgeScrollTop;
44991
44989
  }
44992
44990
  var distanceFromLatest = latestEdgeScrollTop - currentScrollTop;
@@ -45119,7 +45117,7 @@ function useChatController(_ref5) {
45119
45117
  }, [channel === null || channel === void 0 ? void 0 : channel.id, messages]);
45120
45118
  useEffect(function () {
45121
45119
  var el = scrollRef.current;
45122
- if (!el || !shouldUseFirefoxWheelInterop()) {
45120
+ if (!el || !shouldUseFirefoxWheelInterop() || !messages.length) {
45123
45121
  return;
45124
45122
  }
45125
45123
  var onWheel = function onWheel(event) {
@@ -45204,6 +45202,7 @@ function useChatController(_ref5) {
45204
45202
  itemElementsRef.current.clear();
45205
45203
  previousMessagesRef.current = [];
45206
45204
  suppressedMessageChangesRef.current = 0;
45205
+ lastScrollActivityAtRef.current = 0;
45207
45206
  pendingLatestJumpRef.current = null;
45208
45207
  pendingEdgeCheckAfterLoadRef.current = false;
45209
45208
  (_pendingWindowLoadRef = pendingWindowLoadRef.current) === null || _pendingWindowLoadRef === void 0 ? void 0 : _pendingWindowLoadRef.resolve({
@@ -46633,12 +46632,7 @@ var MessageList = function MessageList(_ref) {
46633
46632
  iconColor: accentColor
46634
46633
  }, /*#__PURE__*/React__default.createElement(SvgChoseMedia, null)), "Drag & drop to send as media")))), /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ScrollViewport, null, isJumpingToItem && (/*#__PURE__*/React__default.createElement(JumpOverlay, null, /*#__PURE__*/React__default.createElement(JumpSpinner, {
46635
46634
  "$color": iconInactive
46636
- }))), !messages.length && loadingPrevMessages === LOADING_STATE.LOADING && loadingNextMessages === LOADING_STATE.LOADING ? (/*#__PURE__*/React__default.createElement(NoMessagesContainer, {
46637
- color: textPrimary
46638
- }, /*#__PURE__*/React__default.createElement(JumpSpinner, {
46639
- "$color": iconInactive,
46640
- "$size": 32
46641
- }))) : (/*#__PURE__*/React__default.createElement(Container$j, {
46635
+ }))), /*#__PURE__*/React__default.createElement(Container$j, {
46642
46636
  id: 'scrollableDiv',
46643
46637
  className: 'show-scrollbar',
46644
46638
  ref: scrollRef,
@@ -46699,18 +46693,23 @@ var MessageList = function MessageList(_ref) {
46699
46693
  isHighlighted: timelineItem.isHighlighted,
46700
46694
  ifLatestAndHasNotPreview: timelineItem.ifLatestAndHasNotPreview
46701
46695
  }));
46702
- }))) : loadingPrevMessages === LOADING_STATE.LOADED && loadingNextMessages === LOADING_STATE.LOADED && (/*#__PURE__*/React__default.createElement(NoMessagesContainer, {
46696
+ }))) : loadingPrevMessages === LOADING_STATE.LOADED && loadingNextMessages === LOADING_STATE.LOADED ? (/*#__PURE__*/React__default.createElement(NoMessagesContainer, {
46703
46697
  color: textPrimary
46704
46698
  }, /*#__PURE__*/React__default.createElement(SvgNoMessagesIcon, null), /*#__PURE__*/React__default.createElement(NoMessagesTitle, {
46705
46699
  color: textPrimary
46706
46700
  }, "No Messages yet"), /*#__PURE__*/React__default.createElement(NoMessagesText, {
46707
46701
  color: textSecondary
46708
- }, "No messages yet, start the chat"))), (attachmentsPreview === null || attachmentsPreview === void 0 ? void 0 : attachmentsPreview.show) && mediaFile && (/*#__PURE__*/React__default.createElement(SliderPopup, {
46702
+ }, "No messages yet, start the chat"))) : (/*#__PURE__*/React__default.createElement(NoMessagesContainer, {
46703
+ color: textPrimary
46704
+ }, /*#__PURE__*/React__default.createElement(JumpSpinner, {
46705
+ "$color": iconInactive,
46706
+ "$size": 32
46707
+ }))), (attachmentsPreview === null || attachmentsPreview === void 0 ? void 0 : attachmentsPreview.show) && mediaFile && (/*#__PURE__*/React__default.createElement(SliderPopup, {
46709
46708
  channel: channel,
46710
46709
  setIsSliderOpen: setMediaFile,
46711
46710
  currentMediaFile: mediaFile,
46712
46711
  attachmentsPreview: attachmentsPreview
46713
- })))), showTopFixedDate && stickyDate && (/*#__PURE__*/React__default.createElement(StickyDateLabel, {
46712
+ }))), showTopFixedDate && stickyDate && (/*#__PURE__*/React__default.createElement(StickyDateLabel, {
46714
46713
  dateDividerFontSize: dateDividerFontSize,
46715
46714
  dateDividerTextColor: dateDividerTextColor || textOnPrimary,
46716
46715
  dateDividerBackgroundColor: dateDividerBackgroundColor || newMessagesSeparatorBackground || overlayBackground,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sceyt-chat-react-uikit",
3
- "version": "1.8.7-beta.1",
3
+ "version": "1.8.7-beta.2",
4
4
  "description": "Interactive React UI Components for Sceyt Chat.",
5
5
  "author": "Sceyt",
6
6
  "license": "MIT",