@bcrumbs.net/inbox 0.0.28 → 0.0.33

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.
Files changed (115) hide show
  1. package/assets/ar/inbox.json +71 -8
  2. package/assets/en/inbox.json +85 -21
  3. package/index.cjs.js +26016 -5463
  4. package/index.esm.js +26023 -5470
  5. package/package.json +5 -4
  6. package/src/app/ai/components/TestNumbers/AddTestNumber.d.ts +8 -0
  7. package/src/app/ai/components/TestNumbers/TestNumberCard.d.ts +19 -0
  8. package/src/app/ai/components/TestNumbers/TestNumbersLoader.d.ts +2 -0
  9. package/src/app/ai/components/TestNumbers/TestNumbersNoResultPage.d.ts +11 -0
  10. package/src/app/ai/components/playground/AssistantActionBar.d.ts +2 -0
  11. package/src/app/ai/components/playground/AssistantMessage.d.ts +2 -0
  12. package/src/app/ai/components/playground/BranchPicker.d.ts +4 -0
  13. package/src/app/ai/components/playground/Button.d.ts +10 -0
  14. package/src/app/ai/components/playground/Composer.d.ts +2 -0
  15. package/src/app/ai/components/playground/ComposerAction.d.ts +4 -0
  16. package/src/app/ai/components/playground/EditComposer.d.ts +2 -0
  17. package/src/app/ai/components/playground/MarkdownText.d.ts +3 -0
  18. package/src/app/ai/components/playground/PlaygroundChat.d.ts +5 -0
  19. package/src/app/ai/components/playground/PlaygroundLoader.d.ts +2 -0
  20. package/src/app/ai/components/playground/Thread.d.ts +2 -0
  21. package/src/app/ai/components/playground/ThreadList.d.ts +2 -0
  22. package/src/app/ai/components/playground/ThreadMessages.d.ts +2 -0
  23. package/src/app/ai/components/playground/ThreadWelcome.d.ts +2 -0
  24. package/src/app/ai/components/playground/Tooltip.d.ts +7 -0
  25. package/src/app/ai/components/playground/TooltipIconButton.d.ts +15 -0
  26. package/src/app/ai/components/playground/UserActionBar.d.ts +2 -0
  27. package/src/app/ai/components/playground/UserMessage.d.ts +2 -0
  28. package/src/app/ai/components/playground/index.d.ts +5 -0
  29. package/src/app/ai/components/playground/shared.d.ts +6 -0
  30. package/src/app/ai/components/sources/FileTable.d.ts +14 -0
  31. package/src/app/ai/components/sources/FileUpload.d.ts +14 -0
  32. package/src/app/ai/components/sources/FileUploadsContainer.d.ts +12 -0
  33. package/src/app/ai/components/sources/StorageQuota.d.ts +9 -0
  34. package/src/app/ai/components/sources/UploadProgress.d.ts +9 -0
  35. package/src/app/ai/components/sources/index.d.ts +5 -0
  36. package/src/app/ai/config/index.d.ts +3 -0
  37. package/src/app/ai/config/source.d.ts +4 -0
  38. package/src/app/ai/config/types.d.ts +61 -0
  39. package/src/app/ai/hooks/useCrumbyAi.d.ts +17 -0
  40. package/src/app/ai/hooks/useFileColumns.d.ts +17 -0
  41. package/src/app/ai/pages/FilesPage.d.ts +3 -0
  42. package/src/app/ai/pages/Playground.d.ts +2 -0
  43. package/src/app/ai/pages/TestNumbers.d.ts +2 -0
  44. package/src/app/ai/types/index.d.ts +64 -0
  45. package/src/app/ai/utils/index.d.ts +2 -0
  46. package/src/app/broadcast/components/BroadcastList.d.ts +3 -0
  47. package/src/app/broadcast/components/BroadcastListTable.d.ts +14 -0
  48. package/src/app/broadcast/components/BroadcastOverview.d.ts +3 -0
  49. package/src/app/broadcast/components/EmptyBroadcastList.d.ts +6 -0
  50. package/src/app/broadcast/components/StatisticsCard.d.ts +9 -0
  51. package/src/app/broadcast/pages/BroadcastHistory.d.ts +8 -0
  52. package/src/app/broadcast/utils/helper.d.ts +1 -0
  53. package/src/app/contact/components/AddContactLifeCycle.d.ts +6 -0
  54. package/src/app/contact/components/ContactFormFields.d.ts +7 -0
  55. package/src/app/contact/components/ContactInfo.d.ts +9 -0
  56. package/src/app/contact/config/contactForm.d.ts +54 -0
  57. package/src/app/dashboard/components/ConvsAnalytics/LiveConvsAnalytics.d.ts +2 -2
  58. package/src/app/generic/components/ComingSoon.d.ts +5 -0
  59. package/src/app/generic/components/Containers.d.ts +3 -0
  60. package/src/app/generic/hooks/usePaginatedQuery.d.ts +25 -7
  61. package/src/app/inbox/components/Chat/ChatHeader.d.ts +5 -0
  62. package/src/app/inbox/components/Chat/NoConvSelected.d.ts +6 -1
  63. package/src/app/inbox/components/Chat/index.d.ts +4 -1
  64. package/src/app/inbox/components/ClientDetails/ClientProfile.d.ts +0 -2
  65. package/src/app/inbox/components/NewConvList/BottomSection.d.ts +8 -0
  66. package/src/app/inbox/components/NewConvList/ConvList.d.ts +8 -11
  67. package/src/app/inbox/components/NewConvList/ConversationItem.d.ts +7 -11
  68. package/src/app/inbox/components/NewConvList/HeaderSection.d.ts +9 -3
  69. package/src/app/inbox/components/NewConvList/index.d.ts +10 -5
  70. package/src/app/inbox/components/NewDetails/ChatDetails.d.ts +15 -0
  71. package/src/app/inbox/components/NewDetails/ChatDetailsAndTimeline.d.ts +13 -0
  72. package/src/app/inbox/components/NewDetails/ChatTimeline.d.ts +7 -0
  73. package/src/app/inbox/components/NewDetails/ClientInfo.d.ts +14 -0
  74. package/src/app/inbox/components/NewDetails/ComponentLoaders/ClientInfoLoader.d.ts +2 -0
  75. package/src/app/inbox/components/NewDetails/ConversationOverview.d.ts +10 -0
  76. package/src/app/inbox/components/NewDetails/EditClientInfo.d.ts +8 -0
  77. package/src/app/inbox/components/NewDetails/TabSwitcher.d.ts +5 -0
  78. package/src/app/inbox/components/NewDetails/TagsSelector.d.ts +15 -0
  79. package/src/app/inbox/components/NewDetails/UserHeader.d.ts +7 -0
  80. package/src/app/inbox/components/NewDetails/ViewInfo.d.ts +6 -0
  81. package/src/app/inbox/components/NewDetails/index.d.ts +13 -0
  82. package/src/app/inbox/components/Popups/NewStartConv.d.ts +6 -0
  83. package/src/app/inbox/components/Shared/Inbox.d.ts +2 -1
  84. package/src/app/inbox/components/Shared/SharedStyle.d.ts +30 -0
  85. package/src/app/inbox/hooks/useConvActions.d.ts +16 -0
  86. package/src/app/inbox/hooks/useConvFilters.d.ts +14 -0
  87. package/src/app/inbox/hooks/useConversationsPerodicFetch.d.ts +2 -0
  88. package/src/app/inbox/hooks/useNewSortedEvents.d.ts +24 -0
  89. package/src/app/inbox/utils/convs.d.ts +27 -3
  90. package/src/app/inbox/utils/getFlagByCountry.d.ts +1 -0
  91. package/src/app/layout/components/Header.d.ts +3 -1
  92. package/src/app/layout/constants/index.d.ts +16 -0
  93. package/src/app/layout/constants/subMenu.d.ts +26 -0
  94. package/src/app/layout/hooks/useCrumbyEnabled.d.ts +1 -0
  95. package/src/app/managemnet/config/agentDefinition.d.ts +4 -0
  96. package/src/app/managemnet/types.d.ts +61 -0
  97. package/src/app/resources/components/Broadcasts/BroadcastClients.d.ts +2 -1
  98. package/src/app/resources/components/Broadcasts/CreateBroadcast.d.ts +2 -1
  99. package/src/app/resources/components/ListResources/Utils.d.ts +0 -1
  100. package/src/app/resources/config/broadcast.d.ts +1 -0
  101. package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionHeader.d.ts +10 -0
  102. package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionProfile.d.ts +7 -1
  103. package/src/app/subscriptions/components/SubscriptionSettings/SubscriptionUsers.d.ts +1 -1
  104. package/src/app/subscriptions/components/SubscriptionsList.d.ts +6 -5
  105. package/src/app/subscriptions/pages/Subscriptions.d.ts +1 -1
  106. package/src/assets/locales/translations.d.ts +142 -0
  107. package/src/context/SidebarContext.d.ts +12 -0
  108. package/src/graphql.autogenerated.d.ts +851 -1
  109. package/src/lib/inbox.d.ts +1 -0
  110. package/src/routes/PrivateRoutes.d.ts +6 -1
  111. package/src/utils/sessionStorage.d.ts +10 -0
  112. package/src/utils/textUtils.d.ts +1 -0
  113. package/src/utils/uploadFileToAzureBlob.d.ts +2 -0
  114. package/src/app/contact/components/AddContact.d.ts +0 -7
  115. package/src/app/inbox/hooks/useConvFilter.d.ts +0 -15
@@ -1,20 +1,38 @@
1
- interface PaginationOptions {
1
+ import { ApolloClient, NormalizedCacheObject } from '@apollo/client';
2
+ export interface NormalQueryConfig {
3
+ reactHook: any;
4
+ queryName: string;
5
+ isPaginated?: boolean;
6
+ client?: ApolloClient<NormalizedCacheObject>;
7
+ }
8
+ export interface ResourceDefinitionConfig {
9
+ listQuery: {
10
+ reactHook: any;
11
+ queryName: string;
12
+ isPaginated?: boolean;
13
+ type?: 'query' | 'lazyQuery' | 'mutation';
14
+ fields?: any[];
15
+ };
16
+ client?: ApolloClient<NormalizedCacheObject>;
17
+ }
18
+ export type QueryConfig = NormalQueryConfig | ResourceDefinitionConfig;
19
+ export interface PaginationOptions {
2
20
  limit?: number;
3
- workspaceId?: string;
21
+ workspaceId?: number;
4
22
  additionalVariables?: Record<string, any>;
5
23
  searchQuery?: string;
6
- tags?: string[];
7
- stageId?: string;
8
24
  }
9
- interface UsePaginatedQueryResult<T> {
25
+ export interface UsePaginatedQueryResult<T> {
10
26
  items: T[];
11
27
  hasMore: boolean;
12
28
  loading: boolean;
13
29
  error: any;
14
30
  loadMoreItems?: () => void;
15
31
  refetch: () => void;
32
+ refetchAll: () => void;
16
33
  reset: () => void;
17
34
  loadingMore: boolean;
35
+ removeItem: (id: string) => void;
36
+ updateItem: (id: string, updates: Partial<T>) => void;
18
37
  }
19
- export declare const usePaginatedQuery: <T = any>(resourceDef: any, options?: PaginationOptions) => UsePaginatedQueryResult<T>;
20
- export {};
38
+ export declare const usePaginatedQuery: <T = any>(config: QueryConfig, options?: PaginationOptions) => UsePaginatedQueryResult<T>;
@@ -3,6 +3,11 @@ import { Conversation } from '../../../../../src/graphql.autogenerated';
3
3
  interface Props {
4
4
  selectedConv: Conversation;
5
5
  onConvEnd: () => void;
6
+ searchPattern?: string;
7
+ onSearchChange?: (value: string) => void;
8
+ searchMatchNo?: number;
9
+ onSearchMatchChange?: (matchNo: number) => void;
10
+ searchMatchCount?: number;
6
11
  }
7
12
  export declare const HeaderContainer: import("styled-components").StyledComponent<({ distance, alignItems, justifyContent, marginTop, marginRight, marginBottom, marginLeft, spaceBetween, overflow, children, width, height, dataTestid, minWidth, className, rtl, }: React.PropsWithChildren<import("@bcrumbs.net/bc-ui").HorizontalLayoutProps>) => import("@emotion/react/jsx-runtime").JSX.Element, any, {
8
13
  rtl: boolean;
@@ -1,3 +1,8 @@
1
1
  /// <reference types="react" />
2
- declare const NoConvSelected: React.FC;
2
+ interface NoConvSelectedProps {
3
+ convsLength: number;
4
+ loadingConvs: boolean;
5
+ handleStartConversation?: () => void;
6
+ }
7
+ declare const NoConvSelected: React.FC<NoConvSelectedProps>;
3
8
  export default NoConvSelected;
@@ -5,6 +5,9 @@ interface Props {
5
5
  agents?: Agent[];
6
6
  logo?: string;
7
7
  rtl: boolean;
8
+ convsLength?: number;
9
+ loadingConvs?: boolean;
10
+ handleStartConversation?: () => void;
8
11
  }
9
- declare const Chat: ({ selectedConv, onConvEnd, agents, logo, rtl }: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
12
+ declare const Chat: ({ selectedConv, onConvEnd, agents, logo, rtl, convsLength, loadingConvs, handleStartConversation, }: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
10
13
  export default Chat;
@@ -1,7 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { Tag } from '../../../../graphql.autogenerated';
3
- import 'i18n-iso-countries/langs/en.json';
4
- import 'i18n-iso-countries/langs/ar.json';
5
3
  interface Props {
6
4
  clientId: string;
7
5
  clientTags: Tag[];
@@ -0,0 +1,8 @@
1
+ import { ConvsFilters } from '../../utils/convs';
2
+ interface BottomSectionProps {
3
+ filters: ConvsFilters;
4
+ setFilters: (filters: ConvsFilters) => void;
5
+ unreadMessages: number;
6
+ }
7
+ declare const BottomSection: ({ filters, setFilters, unreadMessages }: BottomSectionProps) => import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export default BottomSection;
@@ -1,17 +1,14 @@
1
- import { ActionItem } from '@bcrumbs.net/bc-ui';
2
- import { Agent, Conversation, Tag } from '../../../../graphql.autogenerated';
3
- import { ConvsFilters } from '../../utils/convs';
1
+ import { Agent, Ai, Conversation, Tag } from '../../../../graphql.autogenerated';
4
2
  interface ConvListProps {
5
3
  convs: Conversation[];
6
4
  loading: boolean;
7
- conversationTags: Tag[];
8
- clientTags: Tag[];
9
- clientStages: Tag[];
10
- convStages: Tag[];
5
+ onConvEnd?: () => void;
6
+ selectedConvId?: string | null;
7
+ convClicked: (conv: Conversation) => void;
11
8
  agents: Agent[];
12
- filters: ConvsFilters;
13
- setFilters: (filters: ConvsFilters) => void;
14
- DropdownActions: ActionItem[];
9
+ convStages: Tag[];
10
+ myAgent: Agent | undefined;
11
+ aiAgents: Ai[];
15
12
  }
16
- declare const ConvList: ({ convs, loading, conversationTags, clientTags, clientStages, convStages, agents, filters, setFilters, DropdownActions, }: ConvListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
13
+ declare const ConvList: ({ convs, loading, selectedConvId, convClicked, onConvEnd, agents, convStages, myAgent, aiAgents, }: ConvListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
17
14
  export default ConvList;
@@ -1,17 +1,13 @@
1
- import { Agent, Conversation, Tag } from '../../../../graphql.autogenerated';
2
- import { ActionItem } from '@bcrumbs.net/bc-ui';
3
- import { ConvsFilters } from '../../utils/convs';
1
+ import { Conversation, Agent, Tag, Ai } from '../../../../graphql.autogenerated';
4
2
  interface ConversationItemProps {
5
3
  conv: Conversation;
6
4
  isActive?: boolean;
7
- conversationTags: Tag[];
8
- clientTags: Tag[];
9
- clientStages: Tag[];
10
- convStages: Tag[];
5
+ convClicked: (conv: Conversation) => void;
6
+ onConvEnd?: () => void;
11
7
  agents: Agent[];
12
- filters: ConvsFilters;
13
- setFilters: (filters: ConvsFilters) => void;
14
- DropdownActions: ActionItem[];
8
+ convStages: Tag[];
9
+ myAgent: Agent | undefined;
10
+ aiAgents: Ai[];
15
11
  }
16
- declare const ConversationItem: ({ conv, isActive, conversationTags, clientTags, clientStages, convStages, agents, filters, setFilters, DropdownActions, }: ConversationItemProps) => import("@emotion/react/jsx-runtime").JSX.Element;
12
+ declare const ConversationItem: ({ conv, isActive, convClicked, onConvEnd, agents, convStages, myAgent, aiAgents, }: ConversationItemProps) => import("@emotion/react/jsx-runtime").JSX.Element;
17
13
  export default ConversationItem;
@@ -1,9 +1,15 @@
1
1
  import { ActionItem } from '@bcrumbs.net/bc-ui';
2
+ import { ConvsFilters } from '../../utils/convs';
3
+ import { Agent, Tag } from '../../../../graphql.autogenerated';
2
4
  interface HeaderSectionProps {
3
- searchQuery: string;
4
- setSearchQuery: (value: string) => void;
5
5
  agentsMenu: ActionItem[];
6
6
  lifeCycleMenu: ActionItem[];
7
+ filters: ConvsFilters;
8
+ agents: Agent[];
9
+ convStages: Tag[];
10
+ myAgent: Agent | undefined;
11
+ onFiltersChange: (filters: ConvsFilters) => void;
12
+ setShowStartConv: (show: boolean) => void;
7
13
  }
8
- declare const HeaderSection: ({ searchQuery, setSearchQuery, agentsMenu, lifeCycleMenu }: HeaderSectionProps) => import("@emotion/react/jsx-runtime").JSX.Element;
14
+ declare const HeaderSection: ({ agentsMenu, lifeCycleMenu, filters, agents, convStages, myAgent, onFiltersChange, setShowStartConv, }: HeaderSectionProps) => import("@emotion/react/jsx-runtime").JSX.Element;
9
15
  export default HeaderSection;
@@ -1,12 +1,17 @@
1
- import { Agent, Conversation, Tag } from '../../../../graphql.autogenerated';
1
+ import { ConvsFilters } from '../../utils/convs';
2
+ import { Agent, Ai, Conversation, Tag } from '../../../../graphql.autogenerated';
2
3
  interface NewConvListProps {
3
4
  agents: Agent[];
4
5
  convStages: Tag[];
5
6
  convs: Conversation[];
6
7
  loading: boolean;
7
- conversationTags: Tag[];
8
- clientTags: Tag[];
9
- clientStages: Tag[];
8
+ selectedConvId?: string;
9
+ convClicked: (conv: Conversation) => void;
10
+ onConvEnd?: () => void;
11
+ filters: ConvsFilters;
12
+ onFiltersChange: (filters: ConvsFilters) => void;
13
+ setShowStartConv: (show: boolean) => void;
14
+ aiAgents: Ai[];
10
15
  }
11
- declare const NewConvList: ({ agents, convStages, convs, loading, conversationTags, clientTags, clientStages, }: NewConvListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
16
+ declare const NewConvList: ({ agents, convStages, convs, loading, selectedConvId, convClicked, onConvEnd, filters, onFiltersChange, setShowStartConv, aiAgents, }: NewConvListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
12
17
  export default NewConvList;
@@ -0,0 +1,15 @@
1
+ import { Conversation, Agent, Tag } from '../../../../graphql.autogenerated';
2
+ interface ChatDetailsProps {
3
+ conversationTags: Tag[];
4
+ tagsLoading: boolean;
5
+ refetchTags: () => void;
6
+ }
7
+ interface ChatDetailsProps {
8
+ conv: Conversation;
9
+ agents: Agent[];
10
+ convStages: Tag[];
11
+ onUpdate?: () => void;
12
+ convEnded: boolean;
13
+ }
14
+ declare const ChatDetails: ({ conv, agents, convStages, onUpdate, conversationTags, tagsLoading, refetchTags, convEnded, }: ChatDetailsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
15
+ export default ChatDetails;
@@ -0,0 +1,13 @@
1
+ import { Conversation, Agent, Tag } from '../../../../graphql.autogenerated';
2
+ interface ChatDetailsAndTimelineProps {
3
+ conv: Conversation;
4
+ agents: Agent[];
5
+ convStages: Tag[];
6
+ onUpdate?: () => void;
7
+ conversationTags: Tag[];
8
+ tagsLoading: boolean;
9
+ refetchTags: () => void;
10
+ convEnded: boolean;
11
+ }
12
+ declare const ChatDetailsAndTimeline: ({ conv, agents, convStages, onUpdate, conversationTags, tagsLoading, refetchTags, convEnded, }: ChatDetailsAndTimelineProps) => import("@emotion/react/jsx-runtime").JSX.Element;
13
+ export default ChatDetailsAndTimeline;
@@ -0,0 +1,7 @@
1
+ import { Agent, Conversation } from '../../../../graphql.autogenerated';
2
+ interface ChatTimelineProps {
3
+ conv: Conversation;
4
+ agents: Agent[];
5
+ }
6
+ declare const ChatTimeline: ({ conv, agents }: ChatTimelineProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export default ChatTimeline;
@@ -0,0 +1,14 @@
1
+ import { Tag, ClientQuery } from '../../../../graphql.autogenerated';
2
+ interface ClientInfoProps {
3
+ clientData: ClientQuery['client'] | undefined;
4
+ clientTags: Tag[];
5
+ conversationTags: Tag[];
6
+ tagsLoading: boolean;
7
+ refetchTags: () => void;
8
+ editMode: boolean;
9
+ setEditMode: (editMode: boolean) => void;
10
+ loading: boolean;
11
+ refetch: () => void;
12
+ }
13
+ declare const ClientInfo: ({ clientData, loading, clientTags, conversationTags, tagsLoading, refetchTags, editMode, setEditMode, refetch, }: ClientInfoProps) => import("@emotion/react/jsx-runtime").JSX.Element;
14
+ export default ClientInfo;
@@ -0,0 +1,2 @@
1
+ declare const ClientInfoLoader: () => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export default ClientInfoLoader;
@@ -0,0 +1,10 @@
1
+ import { Conversation, Agent, Tag } from '../../../../graphql.autogenerated';
2
+ interface ConversationOverviewProps {
3
+ conv: Conversation;
4
+ agents: Agent[];
5
+ convStages: Tag[];
6
+ onUpdate?: () => void;
7
+ convEnded: boolean;
8
+ }
9
+ declare const ConversationOverview: ({ conv, agents, convStages, onUpdate, convEnded }: ConversationOverviewProps) => import("@emotion/react/jsx-runtime").JSX.Element;
10
+ export default ConversationOverview;
@@ -0,0 +1,8 @@
1
+ import { ClientQuery } from '../../../../graphql.autogenerated';
2
+ interface EditInfoProps {
3
+ setEditMode: (editMode: boolean) => void;
4
+ clientData: ClientQuery['client'];
5
+ onClientUpdate?: () => void;
6
+ }
7
+ declare const EditClientInfo: ({ setEditMode, clientData, onClientUpdate }: EditInfoProps) => import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export default EditClientInfo;
@@ -0,0 +1,5 @@
1
+ declare const TabSwitcher: ({ activeTab, setActiveTab, }: {
2
+ activeTab: 'chatDetails' | 'chatTimeline';
3
+ setActiveTab: (tab: 'chatDetails' | 'chatTimeline') => void;
4
+ }) => import("@emotion/react/jsx-runtime").JSX.Element;
5
+ export default TabSwitcher;
@@ -0,0 +1,15 @@
1
+ import { BCDropListOptionsType } from '@bcrumbs.net/bc-ui';
2
+ import { TagType } from '../../../../graphql.autogenerated';
3
+ interface TagsSelectorProps {
4
+ handleTagSelect: (tag: string | undefined) => void;
5
+ availableTags: BCDropListOptionsType[];
6
+ rtl: boolean;
7
+ contactsTagsLoading: boolean;
8
+ addedTags: string[];
9
+ handleTagRemove: (tag: string) => void;
10
+ type: TagType;
11
+ refetchTags: () => void;
12
+ convEnded?: boolean;
13
+ }
14
+ declare const TagsSelector: ({ handleTagSelect, availableTags, rtl, contactsTagsLoading, addedTags, handleTagRemove, type, refetchTags, convEnded, }: TagsSelectorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
15
+ export default TagsSelector;
@@ -0,0 +1,7 @@
1
+ import { ClientQuery } from '../../../../graphql.autogenerated';
2
+ interface UserHeaderProps {
3
+ clientData: ClientQuery['client'] | undefined;
4
+ setEditMode: (editMode: boolean) => void;
5
+ }
6
+ declare const UserHeader: ({ clientData, setEditMode }: UserHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export default UserHeader;
@@ -0,0 +1,6 @@
1
+ import { ClientQuery } from '../../../../graphql.autogenerated';
2
+ interface ViewInfoProps {
3
+ clientData: ClientQuery['client'];
4
+ }
5
+ declare const ViewInfo: ({ clientData }: ViewInfoProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
+ export default ViewInfo;
@@ -0,0 +1,13 @@
1
+ import { Conversation, Agent, Tag } from '../../../../graphql.autogenerated';
2
+ interface Props {
3
+ conv: Conversation;
4
+ clientTags: Tag[];
5
+ conversationTags: Tag[];
6
+ tagsLoading: boolean;
7
+ refetchTags: () => void;
8
+ agents: Agent[];
9
+ convStages: Tag[];
10
+ onUpdate?: () => void;
11
+ }
12
+ declare const NewDetails: ({ conv, clientTags, conversationTags, tagsLoading, refetchTags, agents, convStages, onUpdate, }: Props) => import("@emotion/react/jsx-runtime").JSX.Element;
13
+ export default NewDetails;
@@ -0,0 +1,6 @@
1
+ interface NewStartConvProps {
2
+ setAddContactIsOpen: (isOpen: boolean) => void;
3
+ onStartConv?: () => void;
4
+ }
5
+ declare const NewStartConv: ({ setAddContactIsOpen, onStartConv }: NewStartConvProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
+ export default NewStartConv;
@@ -10,8 +10,9 @@ export declare const MobileContent: import("@emotion/styled").StyledComponent<{
10
10
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
11
11
  export declare const InboxNoSelectionContainer: () => import("@emotion/react/jsx-runtime").JSX.Element;
12
12
  export type MobileViews = 'convList' | 'chat' | 'details';
13
- export declare const MobileMenu: ({ embeddedMode, activePage, setActivePage }: {
13
+ export declare const MobileMenu: ({ embeddedMode, activePage, setActivePage, hideDetails }: {
14
14
  embeddedMode?: boolean;
15
15
  activePage: MobileViews;
16
16
  setActivePage: (page: MobileViews) => void;
17
+ hideDetails?: boolean;
17
18
  }) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,30 @@
1
+ /// <reference types="react" />
2
+ import { LineHeightRem, TextSizeRem } from '@bcrumbs.net/bc-ui';
3
+ export declare const SectionContainer: import("@emotion/styled").StyledComponent<{
4
+ theme?: import("@emotion/react").Theme | undefined;
5
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
6
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
+ export declare const DetailsSectionLabel: import("@emotion/styled").StyledComponent<{
8
+ theme?: import("@emotion/react").Theme | undefined;
9
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
10
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
11
+ export declare const EditButton: import("@emotion/styled").StyledComponent<import("@bcrumbs.net/bc-ui").ButtonProps & import("react").RefAttributes<HTMLButtonElement> & {
12
+ theme?: import("@emotion/react").Theme | undefined;
13
+ }, {}, {}>;
14
+ export declare const TagContainer: import("@emotion/styled").StyledComponent<{
15
+ theme?: import("@emotion/react").Theme | undefined;
16
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
17
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
18
+ export declare const ClientDetailsContainer: import("@emotion/styled").StyledComponent<{
19
+ theme?: import("@emotion/react").Theme | undefined;
20
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
21
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
22
+ export declare const ClientDetailsItem: import("@emotion/styled").StyledComponent<{
23
+ theme?: import("@emotion/react").Theme | undefined;
24
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
25
+ } & {
26
+ highlight?: boolean | undefined;
27
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
28
+ export declare const clientDetailsItemCss: import("@emotion/react").SerializedStyles;
29
+ export declare const clientDetailsItemPhoneCss: import("@emotion/react").SerializedStyles;
30
+ export declare const createImageContainerStyle: (width: number | string, height: number | string, fontSize?: TextSizeRem, LineHeight?: LineHeightRem) => import("@emotion/react").SerializedStyles;
@@ -0,0 +1,16 @@
1
+ import { Agent, Ai, Conversation, Tag } from '../../../graphql.autogenerated';
2
+ import { ActionItem } from '@bcrumbs.net/bc-ui';
3
+ interface ConvActionsProps {
4
+ conv?: Conversation;
5
+ handleChangeStage?: (conv: Conversation, stage: string) => Promise<void>;
6
+ handleAssignAgent?: (conv: Conversation, agentId: string, isAi?: boolean) => Promise<void>;
7
+ agents: Agent[];
8
+ convStages: Tag[];
9
+ myAgent: Agent | undefined;
10
+ onConvEnd?: () => void;
11
+ aiAgents: Ai[];
12
+ }
13
+ declare const useConvActions: ({ conv, handleChangeStage, handleAssignAgent, agents, convStages, myAgent, onConvEnd, aiAgents, }: ConvActionsProps) => {
14
+ DropdownActions: ActionItem[];
15
+ };
16
+ export default useConvActions;
@@ -0,0 +1,14 @@
1
+ import { Agent, Tag } from '../../../graphql.autogenerated';
2
+ import { ConvsFilters } from '../utils/convs';
3
+ interface ConvFiltersProps {
4
+ filters?: ConvsFilters;
5
+ onFiltersChange?: (filters: ConvsFilters) => void;
6
+ agents: Agent[];
7
+ convStages: Tag[];
8
+ myAgent: Agent | undefined;
9
+ }
10
+ declare const useConvFilters: ({ filters, onFiltersChange, agents, convStages, myAgent }: ConvFiltersProps) => {
11
+ getAgentsFilterMenu: (addSeparatorAtLast?: boolean) => import("dist/packages/bc-ui/src").ActionItem[];
12
+ getLifeCycleFilterMenu: (addSeparatorAtLast?: boolean) => import("dist/packages/bc-ui/src").ActionItem[];
13
+ };
14
+ export default useConvFilters;
@@ -9,6 +9,7 @@ declare function useConversationsPeriodicFetch(selectedConvId?: string, onSelect
9
9
  integrationType: import("../../../graphql.autogenerated").IntegrationType;
10
10
  clientId: string;
11
11
  ended: boolean;
12
+ endedBy?: string | null | undefined;
12
13
  externalConversationId?: string | null | undefined;
13
14
  tags?: string[] | null | undefined;
14
15
  createdAt: any;
@@ -52,5 +53,6 @@ declare function useConversationsPeriodicFetch(selectedConvId?: string, onSelect
52
53
  } | null)[] | null | undefined;
53
54
  }[] | null | undefined;
54
55
  loading: boolean;
56
+ refetch: () => void;
55
57
  };
56
58
  export default useConversationsPeriodicFetch;
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { Agent, Conversation } from '../../../graphql.autogenerated';
3
+ export type NoteType = 'ASSIGN' | 'UNASSIGN' | 'STAGE' | 'UNSTAGE' | 'TAG' | 'UNTAG' | 'MEMO';
4
+ export type EventType = {
5
+ id: string;
6
+ date: string;
7
+ timestamp: number;
8
+ formattedDate: string;
9
+ formattedTime: string;
10
+ type: 'assignee' | 'note' | 'start' | 'end';
11
+ noteType?: NoteType;
12
+ content: string;
13
+ Icon: React.ReactNode;
14
+ };
15
+ export declare const NOTE_TYPE_ICONS: {
16
+ readonly ASSIGN: "user-check";
17
+ readonly UNASSIGN: "user-slash";
18
+ readonly STAGE: "workflow";
19
+ readonly UNSTAGE: "workflow-off";
20
+ readonly TAG: "tag";
21
+ readonly UNTAG: "tag-off";
22
+ readonly MEMO: "message-square";
23
+ };
24
+ export declare const useNewSortedEvents: (selectedConv: Conversation, agents: Agent[]) => EventType[];
@@ -1,13 +1,37 @@
1
1
  import { Maybe } from 'graphql/jsutils/Maybe';
2
- import { Message } from '../../../graphql.autogenerated';
2
+ import { Agent, ClientQuery, Message, Tag } from '../../../graphql.autogenerated';
3
+ import { ActionItem } from '@bcrumbs.net/bc-ui';
3
4
  export type ConvsFilters = {
4
5
  ended?: boolean;
5
6
  clientId?: string;
6
7
  assigneeId?: string | null;
7
- stageId?: string;
8
+ stageId?: string | null;
8
9
  nameOrPhone?: string;
9
10
  };
11
+ interface BuildAgentsMenuOptions {
12
+ agents: Agent[];
13
+ myAgent: Agent | undefined;
14
+ selectedAgentId: string | null | undefined;
15
+ onAgentSelect: (agentId: string, agentName?: string) => void;
16
+ onCrumbySelect?: () => void;
17
+ t: any;
18
+ includeAllOption?: boolean;
19
+ onAllSelect?: () => void;
20
+ addSeparatorAtLast?: boolean;
21
+ }
22
+ interface BuildLifeCycleMenuOptions {
23
+ convStages: Tag[];
24
+ selectedStageId: string | null | undefined;
25
+ onStageSelect: (stageId: string | undefined, stageTag: string) => void;
26
+ t: any;
27
+ addSeparatorAtLast?: boolean;
28
+ }
10
29
  export declare function getNumOfNewClientMessages(messages: Maybe<Message[]> | undefined): number;
11
30
  export declare function getLastMessage(messages: Maybe<Message[]> | undefined): Message;
12
- export declare function truncateParagraph(paragraph: string, count?: number): string;
13
31
  export declare function formatSeconds(value: number): string;
32
+ export declare const getMessageStatusIcon: (message: Message | null) => import("@emotion/react/jsx-runtime").JSX.Element | null;
33
+ export declare const getDisplayName: (clientData: ClientQuery['client'] | undefined) => string;
34
+ export declare const buildAgentsMenu: ({ agents, myAgent, selectedAgentId, onAgentSelect, onCrumbySelect, t, includeAllOption, onAllSelect, addSeparatorAtLast, }: BuildAgentsMenuOptions) => ActionItem[];
35
+ export declare const buildLifeCycleMenu: ({ convStages, selectedStageId, onStageSelect, t, addSeparatorAtLast, }: BuildLifeCycleMenuOptions) => ActionItem[];
36
+ export declare const formatPhoneForWhatsApp: (phone: string | null | undefined) => string;
37
+ export {};
@@ -0,0 +1 @@
1
+ export declare const getFlagByCountry: (countryCode?: string | null) => any;
@@ -5,12 +5,14 @@ export declare const HeaderContainer: import("@emotion/styled").StyledComponent<
5
5
  } & {
6
6
  rtl: boolean;
7
7
  mobileInboxVersion: boolean;
8
+ hasSubMenu?: boolean | undefined;
8
9
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
10
  export declare const Separator: import("@emotion/styled").StyledComponent<{
10
11
  theme?: import("@emotion/react").Theme | undefined;
11
12
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
12
13
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
13
- declare function Header({ onLogout }: {
14
+ declare function Header({ onLogout, hasSubMenu }: {
14
15
  onLogout: () => void;
16
+ hasSubMenu: boolean;
15
17
  }): import("@emotion/react/jsx-runtime").JSX.Element;
16
18
  export default Header;
@@ -5,6 +5,21 @@ export declare const BCMainNavigation: {
5
5
  icon: import("@emotion/react/jsx-runtime").JSX.Element;
6
6
  link: string;
7
7
  action: string;
8
+ subMenu?: undefined;
9
+ requiredPermissions?: undefined;
10
+ } | {
11
+ label: string;
12
+ icon: import("@emotion/react/jsx-runtime").JSX.Element;
13
+ link: string;
14
+ action: string;
15
+ subMenu: {
16
+ items: {
17
+ label: string;
18
+ icon: import("@emotion/react/jsx-runtime").JSX.Element;
19
+ link: string;
20
+ action: string;
21
+ }[];
22
+ }[];
8
23
  requiredPermissions?: undefined;
9
24
  } | {
10
25
  label: string;
@@ -12,6 +27,7 @@ export declare const BCMainNavigation: {
12
27
  link: string;
13
28
  action: string;
14
29
  requiredPermissions: Permission[];
30
+ subMenu?: undefined;
15
31
  })[];
16
32
  leftBottomLinks: {
17
33
  label: string;
@@ -0,0 +1,26 @@
1
+ export declare const ManagementSubmenu: {
2
+ title: string;
3
+ items: {
4
+ label: string;
5
+ icon: import("@emotion/react/jsx-runtime").JSX.Element;
6
+ link: string;
7
+ action: string;
8
+ }[];
9
+ }[];
10
+ export declare const ContactSubmenu: {
11
+ items: {
12
+ label: string;
13
+ icon: import("@emotion/react/jsx-runtime").JSX.Element;
14
+ link: string;
15
+ action: string;
16
+ }[];
17
+ }[];
18
+ export declare const CrumpySubmenu: {
19
+ title: string;
20
+ items: {
21
+ label: string;
22
+ icon: import("@emotion/react/jsx-runtime").JSX.Element;
23
+ link: string;
24
+ action: string;
25
+ }[];
26
+ }[];
@@ -0,0 +1 @@
1
+ export declare const useCrumbyEnabled: () => any;
@@ -0,0 +1,4 @@
1
+ import { Agent } from '../../../graphql.autogenerated';
2
+ import { ResourceDefinition } from '../types';
3
+ declare const agentDefinition: ResourceDefinition<Agent>;
4
+ export default agentDefinition;