reachat 2.1.0-alpha.22 → 2.1.0-alpha.23

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/dist/index.js CHANGED
@@ -10,7 +10,7 @@
10
10
  console.error("vite-plugin-css-injected-by-js", e);
11
11
  }
12
12
  })();
13
- import { A, b, c, C, d, g, f, h, F, e, M, q, s, t, u, v, w, x, m, n, N, p, E, G, y, z, B, D, H, I, o, T, j, i, J, k, K, l, r } from "./index-CWCW-OiG.js";
13
+ import { A, b, c, C, d, g, f, h, F, e, M, q, s, t, u, v, w, x, m, n, N, p, E, G, y, z, B, D, H, I, o, T, j, i, J, k, K, l, r } from "./index-tgcYBaMs.js";
14
14
  import "react/jsx-runtime";
15
15
  import "motion/react";
16
16
  import "reablocks";
@@ -2489,8 +2489,11 @@ ${response}`),
2489
2489
  className,
2490
2490
  showMoreText = "Show more",
2491
2491
  autoScroll = true,
2492
- showScrollBottomButton = false,
2493
- onScroll
2492
+ showLoadMoreButton = false,
2493
+ showScrollBottomButton,
2494
+ loadMoreButtonDisabled,
2495
+ onScroll,
2496
+ onLoadMore
2494
2497
  }) => {
2495
2498
  const { activeSession, theme } = React.useContext(ChatContext);
2496
2499
  const contentRef = React.useRef(null);
@@ -2553,13 +2556,14 @@ ${response}`),
2553
2556
  id: activeSession?.id,
2554
2557
  onScrollCapture: onScroll,
2555
2558
  children: [
2556
- hasMore && /* @__PURE__ */ jsxRuntime.jsx(
2559
+ (showLoadMoreButton || hasMore) && /* @__PURE__ */ jsxRuntime.jsx(
2557
2560
  reablocks.Button,
2558
2561
  {
2562
+ disabled: loadMoreButtonDisabled,
2559
2563
  variant: "outline",
2560
2564
  className: reablocks.cn(theme.messages.showMore),
2561
2565
  fullWidth: true,
2562
- onClick: handleShowMore,
2566
+ onClick: onLoadMore ?? handleShowMore,
2563
2567
  children: showMoreText
2564
2568
  }
2565
2569
  ),