@axiom-lattice/react-sdk 2.1.53 → 2.1.54

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.d.mts CHANGED
@@ -694,6 +694,7 @@ interface ChatingProps {
694
694
  showSender?: boolean;
695
695
  showHITL?: boolean;
696
696
  showRefreshButton?: boolean;
697
+ showEmptyState?: boolean;
697
698
  emptyStateGreeting?: React__default.ReactNode;
698
699
  emptyStateQuestion?: string;
699
700
  welcomePrefix?: string;
package/dist/index.d.ts CHANGED
@@ -694,6 +694,7 @@ interface ChatingProps {
694
694
  showSender?: boolean;
695
695
  showHITL?: boolean;
696
696
  showRefreshButton?: boolean;
697
+ showEmptyState?: boolean;
697
698
  emptyStateGreeting?: React__default.ReactNode;
698
699
  emptyStateQuestion?: string;
699
700
  welcomePrefix?: string;
package/dist/index.js CHANGED
@@ -18737,6 +18737,7 @@ var Chating = ({
18737
18737
  showSender = true,
18738
18738
  showHITL = true,
18739
18739
  showRefreshButton = false,
18740
+ showEmptyState = true,
18740
18741
  emptyStateGreeting,
18741
18742
  emptyStateQuestion = "Ready to turn data into insightful charts in seconds?",
18742
18743
  welcomePrefix = "Hey"
@@ -18775,9 +18776,13 @@ var Chating = ({
18775
18776
  return () => clearInterval(interval);
18776
18777
  }, [isStreaming]);
18777
18778
  const conversationContext = useConversationContext();
18778
- const [isEmptyState, setIsEmptyState] = (0, import_react62.useState)(messages.length === 0 && !pendingMessages?.length);
18779
+ const [isEmptyState, setIsEmptyState] = (0, import_react62.useState)(showEmptyState && messages.length === 0 && !pendingMessages?.length);
18779
18780
  const [isTransitioning, setIsTransitioning] = (0, import_react62.useState)(false);
18780
18781
  (0, import_react62.useEffect)(() => {
18782
+ if (!showEmptyState) {
18783
+ setIsEmptyState(false);
18784
+ return;
18785
+ }
18781
18786
  const isEmpty = messages.length === 0 && !pendingMessages?.length;
18782
18787
  if (!isEmpty && isEmptyState) {
18783
18788
  setIsTransitioning(true);
@@ -18788,7 +18793,7 @@ var Chating = ({
18788
18793
  } else if (isEmpty && !isEmptyState) {
18789
18794
  setIsEmptyState(true);
18790
18795
  }
18791
- }, [messages.length, pendingMessages?.length, isEmptyState]);
18796
+ }, [messages.length, pendingMessages?.length, isEmptyState, showEmptyState]);
18792
18797
  const { config } = useLatticeChatShellContext();
18793
18798
  const { baseURL } = config;
18794
18799
  const user = useAuthOptional()?.user;
@@ -18999,10 +19004,10 @@ var Chating = ({
18999
19004
  )
19000
19005
  }
19001
19006
  );
19002
- const showDatabaseSlot = config.enableDatabaseSlot !== false;
19003
- const showSkillSlot = config.enableSkillSlot !== false;
19004
- const showAgentSlot = config.enableAgentSlot !== false;
19005
- const showMetricsDataSourceSlot = config.enableMetricsDataSourceSlot !== false;
19007
+ const showDatabaseSlot = config.enableDatabaseSlot;
19008
+ const showSkillSlot = config.enableSkillSlot;
19009
+ const showAgentSlot = config.enableAgentSlot;
19010
+ const showMetricsDataSourceSlot = config.enableMetricsDataSourceSlot;
19006
19011
  const senderFooter = (actionNode) => {
19007
19012
  const hasSlotButtons = showAgentSlot || showDatabaseSlot || showSkillSlot || showMetricsDataSourceSlot;
19008
19013
  return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_antd59.Flex, { justify: "space-between", align: "center", style: { padding: "8px 0" }, children: [