@greatapps/greatchat-ui 0.1.2 → 0.1.4
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.ts +50 -1
- package/dist/index.js +942 -0
- package/dist/index.js.map +1 -1
- package/package.json +8 -3
- package/src/components/contact-avatar.tsx +59 -0
- package/src/components/contact-info-panel.tsx +139 -0
- package/src/components/inbox-item.tsx +149 -0
- package/src/components/inbox-sidebar.tsx +148 -0
- package/src/components/index.ts +15 -0
- package/src/components/new-conversation-dialog.tsx +172 -0
- package/src/components/ui/avatar.tsx +51 -0
- package/src/components/ui/command.tsx +106 -0
- package/src/components/ui/dialog.tsx +133 -0
- package/src/components/ui/input.tsx +19 -0
- package/src/components/ui/scroll-area.tsx +50 -0
- package/src/components/ui/separator.tsx +26 -0
- package/src/components/ui/tabs.tsx +64 -0
- package/src/components/ui/tooltip.tsx +58 -0
- package/src/index.ts +20 -2
package/dist/index.d.ts
CHANGED
|
@@ -417,4 +417,53 @@ interface MessageBubbleProps {
|
|
|
417
417
|
}
|
|
418
418
|
declare function MessageBubble({ message, onRetry, onRevoke, onEdit, renderActions, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
|
|
419
419
|
|
|
420
|
-
|
|
420
|
+
interface ContactAvatarProps {
|
|
421
|
+
name: string | null;
|
|
422
|
+
className?: string;
|
|
423
|
+
size?: "sm" | "md" | "lg";
|
|
424
|
+
}
|
|
425
|
+
declare function ContactAvatar({ name, className, size, }: ContactAvatarProps): react_jsx_runtime.JSX.Element;
|
|
426
|
+
|
|
427
|
+
interface InboxItemProps {
|
|
428
|
+
inbox: Inbox;
|
|
429
|
+
isSelected: boolean;
|
|
430
|
+
onClick: () => void;
|
|
431
|
+
onDelete?: (id: number) => void;
|
|
432
|
+
renderActions?: (inbox: Inbox) => React.ReactNode;
|
|
433
|
+
}
|
|
434
|
+
declare function InboxItem({ inbox, isSelected, onClick, onDelete, renderActions, }: InboxItemProps): react_jsx_runtime.JSX.Element;
|
|
435
|
+
|
|
436
|
+
interface InboxSidebarProps {
|
|
437
|
+
inboxes: Inbox[] | undefined;
|
|
438
|
+
isLoading: boolean;
|
|
439
|
+
selectedInboxId: number | null;
|
|
440
|
+
onSelectInbox: (inbox: Inbox) => void;
|
|
441
|
+
onDeleteInbox?: (id: number) => void;
|
|
442
|
+
onCreateInbox?: () => void;
|
|
443
|
+
filterChannelId?: number | null;
|
|
444
|
+
renderHeader?: React.ReactNode;
|
|
445
|
+
renderFooter?: React.ReactNode;
|
|
446
|
+
}
|
|
447
|
+
declare function InboxSidebar({ inboxes, isLoading, selectedInboxId, onSelectInbox, onDeleteInbox, onCreateInbox, filterChannelId, renderHeader, renderFooter, }: InboxSidebarProps): react_jsx_runtime.JSX.Element;
|
|
448
|
+
|
|
449
|
+
interface ContactInfoPanelProps {
|
|
450
|
+
contact: Contact | null;
|
|
451
|
+
isLoading?: boolean;
|
|
452
|
+
onClose?: () => void;
|
|
453
|
+
className?: string;
|
|
454
|
+
}
|
|
455
|
+
declare function ContactInfoPanel({ contact, isLoading, onClose, className, }: ContactInfoPanelProps): react_jsx_runtime.JSX.Element;
|
|
456
|
+
|
|
457
|
+
interface NewConversationDialogProps {
|
|
458
|
+
open: boolean;
|
|
459
|
+
onOpenChange: (open: boolean) => void;
|
|
460
|
+
contacts: Contact[];
|
|
461
|
+
channels: Channel[];
|
|
462
|
+
existingInboxes?: Inbox[];
|
|
463
|
+
onCreateInbox: (contactId: number, channelId: number) => void;
|
|
464
|
+
isCreating?: boolean;
|
|
465
|
+
onCreated?: (inboxId: number) => void;
|
|
466
|
+
}
|
|
467
|
+
declare function NewConversationDialog({ open, onOpenChange, contacts, channels, existingInboxes, onCreateInbox, isCreating, onCreated, }: NewConversationDialogProps): react_jsx_runtime.JSX.Element;
|
|
468
|
+
|
|
469
|
+
export { type ApiResponse, type Channel, ChatInput, type ChatInputProps, ChatView, type ChatViewProps, type Contact, ContactAvatar, type ContactAvatarProps, ContactInfoPanel, type ContactInfoPanelProps, DEFAULT_CHANNEL_STATUS_POLLING, DEFAULT_INBOX_POLLING, DEFAULT_MESSAGES_POLLING, DEFAULT_QR_POLLING, type GchatClientConfig, type GchatHookConfig, type Inbox, InboxItem, type InboxItemProps, type InboxMessage, InboxSidebar, type InboxSidebarProps, type InboxStats, MessageBubble, type MessageBubbleProps, type MessageContentType, NewConversationDialog, type NewConversationDialogProps, type WhatsappStatus, cn, createGchatClient, formatDateGroup, formatMessageTime, groupMessagesByDate, useChannelQR, useChannelWhatsappStatus, useChannels, useConnectChannel, useContacts, useCreateChannel, useCreateContact, useCreateInbox, useDeleteChannel, useDeleteContact, useDeleteInbox, useDisconnectChannel, useEditMessage, useGetContact, useInbox, useInboxMessages, useInboxStats, useInboxes, useLogoutChannel, useRetryMessage, useRevokeMessage, useSendMessage, useUpdateChannel, useUpdateContact, useUpdateInbox };
|