@bcrumbs.net/inbox 0.0.33 → 0.0.37

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bcrumbs.net/inbox",
3
3
  "description": "Inbox widget for Bread Crumbs portals",
4
- "version": "0.0.33",
4
+ "version": "0.0.37",
5
5
  "keyword": [
6
6
  "bcrumbs",
7
7
  "bc-ui",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@bcrumbs.net/bc-shared": "^0.0.7",
28
- "@bcrumbs.net/bc-ui": "^0.0.7",
28
+ "@bcrumbs.net/bc-ui": "^0.0.8",
29
29
  "@bcrumbs.net/bc-api": "^0.0.43",
30
30
  "@azure/storage-blob": "^12.25.0"
31
31
  },
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  declare const buttonVariants: (props?: ({
4
- variant?: "outline" | "default" | "ghost" | null | undefined;
4
+ variant?: "default" | "outline" | "ghost" | null | undefined;
5
5
  size?: "default" | "icon" | null | undefined;
6
6
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
7
  declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
@@ -5,11 +5,11 @@ export type TooltipIconButtonProps = ComponentPropsWithoutRef<typeof Button> & {
5
5
  side?: "top" | "bottom" | "left" | "right";
6
6
  };
7
7
  export declare const TooltipIconButton: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("class-variance-authority").VariantProps<(props?: ({
8
- variant?: "outline" | "default" | "ghost" | null | undefined;
8
+ variant?: "default" | "outline" | "ghost" | null | undefined;
9
9
  size?: "default" | "icon" | null | undefined;
10
10
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & {
11
11
  asChild?: boolean | undefined;
12
12
  }, "ref"> & {
13
13
  tooltip: string;
14
- side?: "left" | "right" | "bottom" | "top" | undefined;
14
+ side?: "bottom" | "left" | "right" | "top" | undefined;
15
15
  } & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface BroadcastDateSectionProps {
3
+ renderField: any;
4
+ }
5
+ declare const _default: React.MemoExoticComponent<({ renderField }: BroadcastDateSectionProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
6
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ interface BroadcastDetailsSectionProps {
3
+ renderField: any;
4
+ renderDroplistField: any;
5
+ templatesData: any;
6
+ loadingTemplates: boolean;
7
+ integrationsData: any;
8
+ loadingIntegrations: boolean;
9
+ }
10
+ declare const _default: React.MemoExoticComponent<({ renderField, renderDroplistField, templatesData, loadingTemplates, integrationsData, loadingIntegrations, }: BroadcastDetailsSectionProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
11
+ export default _default;
@@ -0,0 +1,6 @@
1
+ interface BroadcastEstimitedCostProps {
2
+ wabaTemplateCategory?: string;
3
+ clientsCount?: number;
4
+ }
5
+ declare const BroadcastEstimitedCost: ({ wabaTemplateCategory, clientsCount }: BroadcastEstimitedCostProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
+ export default BroadcastEstimitedCost;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface BroadcastInfoHeaderProps {
3
+ onCancel: () => void;
4
+ onSave: () => void;
5
+ loading: boolean;
6
+ disabledSave: boolean;
7
+ isEditMode: boolean;
8
+ }
9
+ declare const _default: React.MemoExoticComponent<({ onCancel, onSave, loading, disabledSave, isEditMode }: BroadcastInfoHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
10
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { Tag } from '../../../graphql.autogenerated';
3
+ interface BroadcastRecipientsSectionProps {
4
+ renderDroplistField: any;
5
+ clientStages: Tag[];
6
+ clientTags: Tag[];
7
+ loadingTags: boolean;
8
+ selectedTags: string[];
9
+ setSelectedTags: (tags: string[]) => void;
10
+ refetchTags: () => void;
11
+ }
12
+ declare const _default: React.MemoExoticComponent<({ renderDroplistField, clientStages, clientTags, loadingTags, selectedTags, setSelectedTags, refetchTags, }: BroadcastRecipientsSectionProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
13
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface BroadcastSampleContactsProps {
3
+ clients: any[];
4
+ clientsLoading: boolean;
5
+ clientsCount: number;
6
+ }
7
+ declare const _default: React.MemoExoticComponent<({ clients, clientsLoading, clientsCount }: BroadcastSampleContactsProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
8
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface BroadcastSectionCardProps {
3
+ title?: string;
4
+ subtitle?: string;
5
+ columns?: number;
6
+ children: React.ReactNode;
7
+ }
8
+ declare const _default: React.MemoExoticComponent<({ title, subtitle, columns, children }: BroadcastSectionCardProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
9
+ export default _default;
@@ -1,6 +1,11 @@
1
+ import { SerializedStyles } from '@emotion/react';
1
2
  interface EmptyBroadcastListProps {
2
- handleNewBroadcastClick: () => void;
3
+ handleNewBroadcastClick?: () => void;
3
4
  hasFilters?: boolean;
5
+ emptyTitle?: string;
6
+ emptySubtitle?: string;
7
+ containerCss?: SerializedStyles;
8
+ imageCss?: SerializedStyles;
4
9
  }
5
- declare const EmptyBroadcastList: ({ handleNewBroadcastClick, hasFilters }: EmptyBroadcastListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
10
+ declare const EmptyBroadcastList: ({ handleNewBroadcastClick, hasFilters, emptyTitle, emptySubtitle, containerCss, imageCss, }: EmptyBroadcastListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
11
  export default EmptyBroadcastList;
@@ -0,0 +1,2 @@
1
+ declare const BroadcastInfo: () => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export default BroadcastInfo;
@@ -5,5 +5,5 @@ interface ContactInfoProps {
5
5
  onContactCreated?: () => void;
6
6
  contactData?: Client;
7
7
  }
8
- declare const ContactInfo: ({ setContactInfoIsOpen, contactInfoIsOpen, onContactCreated, contactData, }: ContactInfoProps) => import("@emotion/react/jsx-runtime").JSX.Element;
8
+ declare const ContactInfo: ({ setContactInfoIsOpen, contactInfoIsOpen, onContactCreated, contactData }: ContactInfoProps) => import("@emotion/react/jsx-runtime").JSX.Element;
9
9
  export default ContactInfo;
@@ -21,6 +21,7 @@ export interface PaginationOptions {
21
21
  workspaceId?: number;
22
22
  additionalVariables?: Record<string, any>;
23
23
  searchQuery?: string;
24
+ count?: boolean;
24
25
  }
25
26
  export interface UsePaginatedQueryResult<T> {
26
27
  items: T[];
@@ -34,5 +35,6 @@ export interface UsePaginatedQueryResult<T> {
34
35
  loadingMore: boolean;
35
36
  removeItem: (id: string) => void;
36
37
  updateItem: (id: string, updates: Partial<T>) => void;
38
+ count: number;
37
39
  }
38
40
  export declare const usePaginatedQuery: <T = any>(config: QueryConfig, options?: PaginationOptions) => UsePaginatedQueryResult<T>;
@@ -1,3 +1,4 @@
1
+ import { RefObject } from 'react';
1
2
  import { ConvsFilters } from '../../utils/convs';
2
3
  import { Agent, Ai, Conversation, Tag } from '../../../../graphql.autogenerated';
3
4
  interface NewConvListProps {
@@ -12,6 +13,7 @@ interface NewConvListProps {
12
13
  onFiltersChange: (filters: ConvsFilters) => void;
13
14
  setShowStartConv: (show: boolean) => void;
14
15
  aiAgents: Ai[];
16
+ scrollContainerRef?: RefObject<HTMLDivElement>;
15
17
  }
16
- declare const NewConvList: ({ agents, convStages, convs, loading, selectedConvId, convClicked, onConvEnd, filters, onFiltersChange, setShowStartConv, aiAgents, }: NewConvListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
18
+ declare const NewConvList: ({ agents, convStages, convs, loading, selectedConvId, convClicked, onConvEnd, filters, onFiltersChange, setShowStartConv, aiAgents, scrollContainerRef, }: NewConvListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
17
19
  export default NewConvList;
@@ -4,5 +4,5 @@ interface Props {
4
4
  hasAdminOrOwnerRole?: boolean;
5
5
  selectedConv?: Conversation;
6
6
  }
7
- declare const useCanContribute: ({ agents, hasAdminOrOwnerRole, selectedConv, }: Props) => boolean;
7
+ declare const useCanContribute: ({ agents, hasAdminOrOwnerRole, selectedConv }: Props) => boolean;
8
8
  export default useCanContribute;
@@ -27,9 +27,11 @@ interface BuildLifeCycleMenuOptions {
27
27
  addSeparatorAtLast?: boolean;
28
28
  }
29
29
  export declare function getNumOfNewClientMessages(messages: Maybe<Message[]> | undefined): number;
30
- export declare function getLastMessage(messages: Maybe<Message[]> | undefined): Message;
30
+ export declare function getLastMessage(messages: Maybe<Message[]> | undefined, filterFn?: (m: Message) => boolean): Message | undefined;
31
+ export declare function hashStatuses(messages?: Maybe<Message[]> | null): string;
32
+ export declare function isOutside24HourWindow(messageCreatedAt: string | Date | null | undefined): boolean;
31
33
  export declare function formatSeconds(value: number): string;
32
- export declare const getMessageStatusIcon: (message: Message | null) => import("@emotion/react/jsx-runtime").JSX.Element | null;
34
+ export declare const getMessageStatusIcon: (message: Message | null | undefined) => import("@emotion/react/jsx-runtime").JSX.Element | null;
33
35
  export declare const getDisplayName: (clientData: ClientQuery['client'] | undefined) => string;
34
36
  export declare const buildAgentsMenu: ({ agents, myAgent, selectedAgentId, onAgentSelect, onCrumbySelect, t, includeAllOption, onAllSelect, addSeparatorAtLast, }: BuildAgentsMenuOptions) => ActionItem[];
35
37
  export declare const buildLifeCycleMenu: ({ convStages, selectedStageId, onStageSelect, t, addSeparatorAtLast, }: BuildLifeCycleMenuOptions) => ActionItem[];
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TFunction } from "i18next";
2
3
  import { Row, Action } from "@bcrumbs.net/bc-ui";
3
4
  import { ResourceDefinition } from "../../config";
@@ -152,6 +152,7 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
152
152
  upgradePlan: string;
153
153
  activePlan: string;
154
154
  usage2: string;
155
+ userSearchPlaceholder: string;
155
156
  };
156
157
  pages: {
157
158
  yourPages: string;
@@ -299,6 +300,17 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
299
300
  schedule: string;
300
301
  cancel: string;
301
302
  loadingMore: string;
303
+ broadcastInfoDescription: string;
304
+ editBroadcast: string;
305
+ save: string;
306
+ selectClientStage: string;
307
+ clientStage: string;
308
+ sampleContacts: string;
309
+ sampleContactsCount: string;
310
+ noClientsFound: string;
311
+ noClientsFoundDescription: string;
312
+ scheduleAt: string;
313
+ estimatedCost: string;
302
314
  };
303
315
  resources: {
304
316
  loginToFB: string;
@@ -399,6 +411,7 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
399
411
  version: string;
400
412
  contactLifeCycle: string;
401
413
  contact: string;
414
+ select: string;
402
415
  };
403
416
  dashboard: {
404
417
  dashboardOverview: string;
@@ -477,6 +490,7 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
477
490
  edit: string;
478
491
  name: string;
479
492
  delete: string;
493
+ submit: string;
480
494
  pwa: {
481
495
  installApp: string;
482
496
  addAppToHomeScreen: string;