@droppii-org/chat-sdk 0.0.55 → 0.0.56

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ChatBubble.d.ts","sourceRoot":"","sources":["../../../src/components/chatBubble/ChatBubble.tsx"],"names":[],"mappings":"AAQA,UAAU,eAAe;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,UAAU,GAAI,eAAe,eAAe,4CA6FjD,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"ChatBubble.d.ts","sourceRoot":"","sources":["../../../src/components/chatBubble/ChatBubble.tsx"],"names":[],"mappings":"AAQA,UAAU,eAAe;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,UAAU,GAAI,eAAe,eAAe,4CA8FjD,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -11,6 +11,7 @@ const ChatBubble = ({ className }) => {
11
11
  const selectedConversationId = useConversationStore((state) => state.selectedConversationId);
12
12
  const searchClientMsgID = useConversationStore((state) => state.searchClientMsgID);
13
13
  const unreadCount = useConversationStore((state) => { var _a; return ((_a = state.conversationData) === null || _a === void 0 ? void 0 : _a.unreadCount) || 0; });
14
+ const displayUnread = unreadCount > 99 ? "99+" : unreadCount;
14
15
  const [isOpen, setIsOpen] = useState(false);
15
16
  const toggleChat = () => {
16
17
  setIsOpen(!isOpen);
@@ -21,7 +22,7 @@ const ChatBubble = ({ className }) => {
21
22
  bottom: 24,
22
23
  width: 60,
23
24
  height: 60,
24
- }, onClick: toggleChat, className: className, badge: { count: unreadCount, color: "red" } }), _jsx(Drawer, { placement: "right", onClose: () => setIsOpen(false), open: isOpen, mask: true, closable: false, styles: {
25
+ }, onClick: toggleChat, className: className, badge: { count: displayUnread, color: "red" } }), _jsx(Drawer, { placement: "right", onClose: () => setIsOpen(false), open: isOpen, mask: true, closable: false, styles: {
25
26
  body: { padding: 0 },
26
27
  }, classNames: {
27
28
  wrapper: "!z-[9999]",
@@ -32,6 +33,6 @@ const ChatBubble = ({ className }) => {
32
33
  bottom: 24,
33
34
  width: 60,
34
35
  height: 60,
35
- }, className: className, badge: { count: unreadCount, color: "red" } }) }));
36
+ }, className: className, badge: { count: displayUnread, color: "red" } }) }));
36
37
  };
37
38
  export default ChatBubble;