dce-reactkit 3.5.9 → 3.5.10

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.
@@ -12,6 +12,8 @@ type Props = {
12
12
  itemsName?: string;
13
13
  items: AutoScrollItem[];
14
14
  jumpToBottomButtonVariant?: Variant;
15
+ messageBeforeItems?: React.ReactNode;
16
+ messageAfterItems?: React.ReactNode;
15
17
  };
16
18
  type AutoScrollItem = {
17
19
  id: string | number;
package/dist/esm/index.js CHANGED
@@ -40811,7 +40811,7 @@ const AutoscrollToBottomContainer = (props) => {
40811
40811
  /*------------------------------------------------------------------------*/
40812
40812
  /* -------------- Props ------------- */
40813
40813
  // Destructure all props
40814
- const { itemsName, items, jumpToBottomButtonVariant = Variant$1.Danger, } = props;
40814
+ const { itemsName, items, jumpToBottomButtonVariant = Variant$1.Danger, messageBeforeItems, messageAfterItems, } = props;
40815
40815
  /* -------------- State ------------- */
40816
40816
  // Initial state
40817
40817
  const initialState = {
@@ -40905,6 +40905,8 @@ const AutoscrollToBottomContainer = (props) => {
40905
40905
  const currentItemIds = getItemIds(items);
40906
40906
  // Check if new content appeared at bottom
40907
40907
  const newContentAppeared = (currentItemIds.length > 0
40908
+ && lastItemIds.current
40909
+ && lastItemIds.current.length > 0
40908
40910
  && (currentItemIds[currentItemIds.length - 1]
40909
40911
  !== lastItemIds.current[lastItemIds.current.length - 1]));
40910
40912
  // Do nothing if no new content
@@ -40948,11 +40950,14 @@ const AutoscrollToBottomContainer = (props) => {
40948
40950
  return (React__default.createElement("div", { className: "AutoscrollToBottomContainer-outer-container" },
40949
40951
  React__default.createElement("style", null, style),
40950
40952
  jumpToBottomButton,
40951
- React__default.createElement("div", { className: "AutoscrollToBottomContainer-scrollable-container", onScroll: handleScroll, ref: container }, items
40952
- // Render each item with a key
40953
- .map((item) => {
40954
- return (React__default.createElement("div", { className: "AutoscrollToBottomContainer-item-container", key: item.id }, item.item));
40955
- }))));
40953
+ React__default.createElement("div", { className: "AutoscrollToBottomContainer-scrollable-container", onScroll: handleScroll, ref: container },
40954
+ messageBeforeItems,
40955
+ items
40956
+ // Render each item with a key
40957
+ .map((item) => {
40958
+ return (React__default.createElement("div", { className: "AutoscrollToBottomContainer-item-container", key: item.id }, item.item));
40959
+ }),
40960
+ messageAfterItems)));
40956
40961
  };
40957
40962
 
40958
40963
  /**