@greatapps/greatchat-ui 0.1.5 → 0.1.6

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 CHANGED
@@ -2,7 +2,8 @@ import { ClassValue } from 'clsx';
2
2
  import * as _tanstack_react_query from '@tanstack/react-query';
3
3
  import * as _tanstack_query_core from '@tanstack/query-core';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import { ReactNode } from 'react';
5
+ import { ReactNode, SVGProps } from 'react';
6
+ import { ColumnDef } from '@tanstack/react-table';
6
7
 
7
8
  interface ApiResponse<T> {
8
9
  status: 0 | 1;
@@ -484,4 +485,106 @@ interface WhatsappStatusBadgeProps {
484
485
  }
485
486
  declare function WhatsappStatusBadge({ status, hasSession, }: WhatsappStatusBadgeProps): react_jsx_runtime.JSX.Element;
486
487
 
487
- export { type ApiResponse, type Channel, ChannelCard, type ChannelCardProps, 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, WhatsappStatusBadge, type WhatsappStatusBadgeProps, 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 };
488
+ declare function WhatsappIcon(props: SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
489
+
490
+ interface WhatsappQrDialogProps {
491
+ open: boolean;
492
+ onOpenChange: (open: boolean) => void;
493
+ channelId: number;
494
+ config: GchatHookConfig;
495
+ }
496
+ declare function WhatsappQrDialog({ open, onOpenChange, channelId, config, }: WhatsappQrDialogProps): react_jsx_runtime.JSX.Element;
497
+
498
+ interface ChannelCreateDialogProps {
499
+ open: boolean;
500
+ onOpenChange: (open: boolean) => void;
501
+ config: GchatHookConfig;
502
+ renderAgentSelect?: (props: {
503
+ value: number | null;
504
+ onChange: (value: number | null) => void;
505
+ disabled?: boolean;
506
+ }) => ReactNode;
507
+ }
508
+ declare function ChannelCreateDialog({ open, onOpenChange, config, renderAgentSelect, }: ChannelCreateDialogProps): react_jsx_runtime.JSX.Element;
509
+
510
+ interface ChannelEditDialogProps {
511
+ open: boolean;
512
+ onOpenChange: (open: boolean) => void;
513
+ channel: Channel;
514
+ config: GchatHookConfig;
515
+ renderAgentSelect?: (props: {
516
+ value: number | null;
517
+ onChange: (value: number | null) => void;
518
+ disabled?: boolean;
519
+ }) => ReactNode;
520
+ }
521
+ declare function ChannelEditDialog({ open, onOpenChange, channel, config, renderAgentSelect, }: ChannelEditDialogProps): react_jsx_runtime.JSX.Element;
522
+
523
+ interface ContactFormDialogProps {
524
+ open: boolean;
525
+ onOpenChange: (open: boolean) => void;
526
+ contact?: Contact;
527
+ config: GchatHookConfig;
528
+ }
529
+ declare function ContactFormDialog({ open, onOpenChange, contact, config, }: ContactFormDialogProps): react_jsx_runtime.JSX.Element;
530
+
531
+ interface ContactsTableProps {
532
+ config: GchatHookConfig;
533
+ }
534
+ declare function ContactsTable({ config }: ContactsTableProps): react_jsx_runtime.JSX.Element;
535
+
536
+ interface DataTableProps<TData, TValue> {
537
+ columns: ColumnDef<TData, TValue>[];
538
+ data: TData[];
539
+ isLoading?: boolean;
540
+ emptyMessage?: string;
541
+ total?: number;
542
+ page?: number;
543
+ onPageChange?: (page: number) => void;
544
+ pageSize?: number;
545
+ onRowClick?: (row: TData) => void;
546
+ selectedRowId?: string | number | null;
547
+ getRowId?: (row: TData) => string | number;
548
+ compact?: boolean;
549
+ }
550
+ declare function DataTable<TData, TValue>({ columns, data, isLoading, emptyMessage, total, page, onPageChange, pageSize, onRowClick, selectedRowId, getRowId, compact, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
551
+
552
+ interface InboxPageProps {
553
+ config: GchatHookConfig;
554
+ filterChannelId?: number | null;
555
+ }
556
+ declare function InboxPage({ config, filterChannelId }: InboxPageProps): react_jsx_runtime.JSX.Element;
557
+
558
+ interface ChannelsPageProps {
559
+ config: GchatHookConfig;
560
+ renderAgentSelect?: (props: {
561
+ value: number | null;
562
+ onChange: (value: number | null) => void;
563
+ disabled?: boolean;
564
+ }) => ReactNode;
565
+ /** Optional: resolve agent info for a channel. Returns { name, active } */
566
+ getAgentInfo?: (idAgent: number | null) => {
567
+ name: string;
568
+ active: boolean;
569
+ } | null;
570
+ }
571
+ declare function ChannelsPage({ config, renderAgentSelect, getAgentInfo, }: ChannelsPageProps): react_jsx_runtime.JSX.Element;
572
+
573
+ interface ContactsPageProps {
574
+ config: GchatHookConfig;
575
+ }
576
+ declare function ContactsPage({ config }: ContactsPageProps): react_jsx_runtime.JSX.Element;
577
+
578
+ interface ChatDashboardProps {
579
+ config: GchatHookConfig;
580
+ userName?: string;
581
+ onNavigateToInbox?: (filters?: {
582
+ status?: string;
583
+ channelId?: number;
584
+ }) => void;
585
+ onNavigateToChannels?: () => void;
586
+ renderExtraSection?: () => ReactNode;
587
+ }
588
+ declare function ChatDashboard({ config, userName, onNavigateToInbox, onNavigateToChannels, renderExtraSection, }: ChatDashboardProps): react_jsx_runtime.JSX.Element;
589
+
590
+ export { type ApiResponse, type Channel, ChannelCard, type ChannelCardProps, ChannelCreateDialog, type ChannelCreateDialogProps, ChannelEditDialog, type ChannelEditDialogProps, ChannelsPage, type ChannelsPageProps, ChatDashboard, type ChatDashboardProps, ChatInput, type ChatInputProps, ChatView, type ChatViewProps, type Contact, ContactAvatar, type ContactAvatarProps, ContactFormDialog, type ContactFormDialogProps, ContactInfoPanel, type ContactInfoPanelProps, ContactsPage, type ContactsPageProps, ContactsTable, type ContactsTableProps, DEFAULT_CHANNEL_STATUS_POLLING, DEFAULT_INBOX_POLLING, DEFAULT_MESSAGES_POLLING, DEFAULT_QR_POLLING, DataTable, type DataTableProps, type GchatClientConfig, type GchatHookConfig, type Inbox, InboxItem, type InboxItemProps, type InboxMessage, InboxPage, type InboxPageProps, InboxSidebar, type InboxSidebarProps, type InboxStats, MessageBubble, type MessageBubbleProps, type MessageContentType, NewConversationDialog, type NewConversationDialogProps, WhatsappIcon, WhatsappQrDialog, type WhatsappQrDialogProps, type WhatsappStatus, WhatsappStatusBadge, type WhatsappStatusBadgeProps, 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 };