@bcrumbs.net/inbox 0.0.78 → 0.0.80
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/index.cjs.js +2 -2
- package/index.esm.js +2 -2
- package/package.json +2 -2
- package/src/app/ai/components/Crumby/CrumbyPageContext.d.ts +8 -0
- package/src/app/gatewayHome/hooks/useSendableTemplates.d.ts +1 -1
- package/src/app/gatewayHome/utils/isSendableTemplate.d.ts +7 -0
- package/src/app/generic/utils/reportError.d.ts +10 -0
- package/src/app/inbox/components/EmptyInboxOnboarding/ChannelConnectCard.d.ts +9 -0
- package/src/app/inbox/components/EmptyInboxOnboarding/EmptyInboxOnboarding.d.ts +10 -0
- package/src/app/inbox/components/EmptyInboxOnboarding/GetStartedChecklist.d.ts +10 -0
- package/src/app/inbox/components/EmptyInboxOnboarding/SetupHelpCard.d.ts +9 -0
- package/src/app/inbox/constants/emptyInboxChannels.d.ts +15 -0
- package/src/app/inbox/hooks/useConnectChannelDialog.d.ts +14 -0
- package/src/app/inbox/utils/emptyInboxTracking.d.ts +12 -0
- package/src/app/onboarding/utils/guideAutoOpen.d.ts +7 -0
- package/src/app/resources/utils/channelSetupTracking.d.ts +3 -0
- package/src/app/subscriptions/utils/newWorkspaceContext.d.ts +5 -0
- package/src/assets/locales/translations.d.ts +44 -0
- package/src/config/constants.d.ts +2 -0
package/index.cjs.js
CHANGED
|
@@ -12127,8 +12127,8 @@ const getClientAvatarUrl = (avatarUrl, email, size = 36) => {
|
|
|
12127
12127
|
|
|
12128
12128
|
const BLUR_CONTAINER = 'root';
|
|
12129
12129
|
const LOADING_COLOR = bcUi.Color.PRIMARY;
|
|
12130
|
-
const FavIcon16 =
|
|
12131
|
-
const FavIcon32 =
|
|
12130
|
+
const FavIcon16 = '/assets/icons/favicons/favicon-16x16.png';
|
|
12131
|
+
const FavIcon32 = '/assets/icons/favicons/favicon-32x32.png';
|
|
12132
12132
|
//export const HELPDESK_URL = 'https://bcrumbs.featurebase.app/help';
|
|
12133
12133
|
const HELPDESK_URL = 'https://docs.bcrumbs.net/';
|
|
12134
12134
|
|
package/index.esm.js
CHANGED
|
@@ -12109,8 +12109,8 @@ const getClientAvatarUrl = (avatarUrl, email, size = 36) => {
|
|
|
12109
12109
|
|
|
12110
12110
|
const BLUR_CONTAINER = 'root';
|
|
12111
12111
|
const LOADING_COLOR = Color.PRIMARY;
|
|
12112
|
-
const FavIcon16 =
|
|
12113
|
-
const FavIcon32 =
|
|
12112
|
+
const FavIcon16 = '/assets/icons/favicons/favicon-16x16.png';
|
|
12113
|
+
const FavIcon32 = '/assets/icons/favicons/favicon-32x32.png';
|
|
12114
12114
|
//export const HELPDESK_URL = 'https://bcrumbs.featurebase.app/help';
|
|
12115
12115
|
const HELPDESK_URL = 'https://docs.bcrumbs.net/';
|
|
12116
12116
|
|
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.
|
|
4
|
+
"version": "0.0.80",
|
|
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.12",
|
|
28
|
-
"@bcrumbs.net/bc-ui": "^0.0.
|
|
28
|
+
"@bcrumbs.net/bc-ui": "^0.0.19",
|
|
29
29
|
"@bcrumbs.net/bc-api": "^0.0.49",
|
|
30
30
|
"@azure/storage-blob": "^12.25.0"
|
|
31
31
|
},
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type MutableRefObject } from 'react';
|
|
2
2
|
import type { PromptSectionChange, PromptSectionsUpdateResult, PromptState } from '../../config/promptSettings';
|
|
3
|
+
import type { OnboardingChecklistStepId } from '../../../onboarding/utils/onboardingChecklistStorage';
|
|
3
4
|
/** Lets Crumby read and edit the Prompt settings form while that page is mounted. */
|
|
4
5
|
export type PromptEditorBridge = {
|
|
5
6
|
getSections: () => PromptState;
|
|
6
7
|
applyChanges: (changes: PromptSectionChange[]) => PromptSectionsUpdateResult;
|
|
7
8
|
};
|
|
9
|
+
export type OnboardingStepOpener = (stepId: OnboardingChecklistStepId) => void;
|
|
8
10
|
type CrumbyPageContextValue = {
|
|
9
11
|
/** Ref (not state) so the chat transport always reads the latest page values at send time. */
|
|
10
12
|
promptEditorRef: MutableRefObject<PromptEditorBridge | null>;
|
|
@@ -13,6 +15,12 @@ type CrumbyPageContextValue = {
|
|
|
13
15
|
/** Increments on every open request; the widget opens its chat when it changes. */
|
|
14
16
|
openRequestId: number;
|
|
15
17
|
requestOpen: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* Opens a checklist step's guide in the widget, as if picked there. Null while no widget can
|
|
20
|
+
* show it (the mobile Inbox has none, and only workspace managers see the checklist).
|
|
21
|
+
*/
|
|
22
|
+
openOnboardingStep: OnboardingStepOpener | null;
|
|
23
|
+
registerOnboardingStepOpener: (opener: OnboardingStepOpener) => () => void;
|
|
16
24
|
};
|
|
17
25
|
/** Shares page-level state between portal pages and the Crumby widget mounted in the layout. */
|
|
18
26
|
export declare const CrumbyPageProvider: ({ children }: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TemplateOption } from '../types';
|
|
2
2
|
/**
|
|
3
|
-
* Approved WhatsApp templates that need no parameters, so the console can send them as-is.
|
|
3
|
+
* Approved WhatsApp templates with a language that need no parameters, so the console can send them as-is.
|
|
4
4
|
* The list query has no components, so each template's details are fetched (and cached by Apollo).
|
|
5
5
|
*/
|
|
6
6
|
export declare function useSendableTemplates(workspaceId: number, integrationId?: string): {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type TemplateSummary = {
|
|
2
|
+
status?: string | null;
|
|
3
|
+
language?: string | null;
|
|
4
|
+
};
|
|
5
|
+
/** Approved and has a language code: Meta rejects template sends without `language.code`. */
|
|
6
|
+
export declare function isSendableTemplate(template: TemplateSummary): boolean;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type ReportErrorContext = {
|
|
2
|
+
/** Sent as Sentry `extra` and as PostHog exception properties. */
|
|
3
|
+
extra?: Record<string, unknown>;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Reports a handled error to Sentry and PostHog error tracking. Uncaught errors reach both on
|
|
7
|
+
* their own, but an error swallowed by a catch block only gets reported through here.
|
|
8
|
+
*/
|
|
9
|
+
export declare const reportError: (error: unknown, context?: ReportErrorContext) => void;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { EmptyInboxChannelOption } from '../../constants/emptyInboxChannels';
|
|
2
|
+
type ChannelConnectCardProps = {
|
|
3
|
+
option: EmptyInboxChannelOption;
|
|
4
|
+
/** Omitted for users who cannot create channels: the card then only describes the channel. */
|
|
5
|
+
onConnect?: (option: EmptyInboxChannelOption) => void;
|
|
6
|
+
};
|
|
7
|
+
/** One channel offered on the empty Inbox: what it does, setup time, and a direct Connect action. */
|
|
8
|
+
declare const ChannelConnectCard: ({ option, onConnect }: ChannelConnectCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default ChannelConnectCard;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type EmptyInboxOnboardingProps = {
|
|
2
|
+
/** Called after a channel was created and its setup dialog closed. */
|
|
3
|
+
onChannelConnected: () => void;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* First screen for a workspace without channels: channel cards with direct Connect actions,
|
|
7
|
+
* the onboarding checklist inline, and a way to reach the team for help (BCR-871).
|
|
8
|
+
*/
|
|
9
|
+
declare const EmptyInboxOnboarding: ({ onChannelConnected }: EmptyInboxOnboardingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default EmptyInboxOnboarding;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type GetStartedChecklistProps = {
|
|
2
|
+
/** Mobile: show only the progress summary until the user expands it. */
|
|
3
|
+
collapsible?: boolean;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Inline "Get started" checklist for the empty Inbox; mirrors the floating widget's steps.
|
|
7
|
+
* Renders nothing when the workspace has no checklist or the user cannot manage the workspace.
|
|
8
|
+
*/
|
|
9
|
+
declare const GetStartedChecklist: ({ collapsible }: GetStartedChecklistProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export default GetStartedChecklist;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { EmptyInboxHelpAction } from '../../utils/emptyInboxTracking';
|
|
2
|
+
type SetupHelpCardProps = {
|
|
3
|
+
onHelpClick: (action: EmptyInboxHelpAction) => void;
|
|
4
|
+
/** Mobile: stack the actions full width. */
|
|
5
|
+
stacked?: boolean;
|
|
6
|
+
};
|
|
7
|
+
/** "Need help connecting WhatsApp?" card: chat with support or book a guided setup call. */
|
|
8
|
+
declare const SetupHelpCard: ({ onHelpClick, stacked }: SetupHelpCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default SetupHelpCard;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IntegrationType } from '../../../graphql.autogenerated';
|
|
2
|
+
/** i18n key under `emptyInboxOnboarding.channels`. */
|
|
3
|
+
export type EmptyInboxChannelKey = 'whatsapp' | 'instagram' | 'messenger' | 'telegram';
|
|
4
|
+
export type EmptyInboxChannelOption = {
|
|
5
|
+
key: EmptyInboxChannelKey;
|
|
6
|
+
type: IntegrationType;
|
|
7
|
+
/** Rough setup time shown on the card. */
|
|
8
|
+
setupMinutes: number;
|
|
9
|
+
/** Background of the provider icon tile. */
|
|
10
|
+
iconBackground: string;
|
|
11
|
+
/** Highlighted as the main option, with a "Most popular" badge. */
|
|
12
|
+
featured?: boolean;
|
|
13
|
+
};
|
|
14
|
+
/** Channels offered on the empty Inbox, in display order. */
|
|
15
|
+
export declare const EMPTY_INBOX_CHANNELS: EmptyInboxChannelOption[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { EmptyInboxChannelOption } from '../constants/emptyInboxChannels';
|
|
2
|
+
/**
|
|
3
|
+
* Drives the channel setup dialog opened from the empty Inbox.
|
|
4
|
+
*
|
|
5
|
+
* A created channel is only reported once the dialog closes: reporting it straight away would
|
|
6
|
+
* swap the empty Inbox for the regular one and unmount the dialog's success step mid-view.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useConnectChannelDialog(onChannelConnected: () => void): {
|
|
9
|
+
activeChannel: EmptyInboxChannelOption | null;
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
open: (option: EmptyInboxChannelOption) => void;
|
|
12
|
+
close: () => void;
|
|
13
|
+
markCreated: () => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PostHog } from 'posthog-js';
|
|
2
|
+
import type { EmptyInboxChannelKey } from '../constants/emptyInboxChannels';
|
|
3
|
+
/** Funnel events for the empty-Inbox onboarding (BCR-871). */
|
|
4
|
+
export declare const EmptyInboxEvents: {
|
|
5
|
+
readonly Viewed: "Empty Inbox Viewed";
|
|
6
|
+
readonly ChannelCardClicked: "Empty Inbox Channel Card Clicked";
|
|
7
|
+
readonly HelpClicked: "Empty Inbox Help Clicked";
|
|
8
|
+
};
|
|
9
|
+
export type EmptyInboxHelpAction = 'chat' | 'setup_call';
|
|
10
|
+
export declare function captureEmptyInboxViewed(posthog: PostHog | null | undefined): void;
|
|
11
|
+
export declare function captureChannelCardClicked(posthog: PostHog | null | undefined, channel: EmptyInboxChannelKey): void;
|
|
12
|
+
export declare function captureHelpClicked(posthog: PostHog | null | undefined, action: EmptyInboxHelpAction): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pages where the floating guide waits instead of opening on its own: the Inbox (it shows the
|
|
3
|
+
* checklist itself when there are no channels, and conversations otherwise) and the workspace
|
|
4
|
+
* creation wizard, Welcome included since it only forwards to the Inbox. The guide then opens
|
|
5
|
+
* once, on the first other page the user visits.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isGuideAutoOpenHeld(pathname: string, search: string): boolean;
|
|
@@ -4,6 +4,7 @@ export declare const ChannelSetupEvents: {
|
|
|
4
4
|
readonly Started: "Channel Setup Started";
|
|
5
5
|
readonly Failed: "Channel Setup Failed";
|
|
6
6
|
readonly Timeout: "Channel Setup Timeout";
|
|
7
|
+
readonly Connected: "Channel Connected";
|
|
7
8
|
};
|
|
8
9
|
/** Why a provider handoff ended without an access token. */
|
|
9
10
|
export declare const ChannelSetupFailureReason: {
|
|
@@ -18,4 +19,6 @@ export declare function failureReasonFromLoginStatus(res: {
|
|
|
18
19
|
} | null | undefined): string;
|
|
19
20
|
export declare function captureChannelSetupStarted(posthog: PostHog | null | undefined, provider: ChannelSetupProvider): void;
|
|
20
21
|
export declare function captureChannelSetupFailed(posthog: PostHog | null | undefined, provider: ChannelSetupProvider, reason: string): void;
|
|
22
|
+
/** A channel of any type was created; `type` is the integration type, lower-cased. */
|
|
23
|
+
export declare function captureChannelConnected(posthog: PostHog | null | undefined, type: string): void;
|
|
21
24
|
export declare function captureChannelSetupTimeout(posthog: PostHog | null | undefined, provider: ChannelSetupProvider): void;
|
|
@@ -11,3 +11,8 @@ export declare function getCreatePageWorkspaceId(pathname: string, search: strin
|
|
|
11
11
|
export declare function isNamingNewWorkspace(pathname: string, search: string): boolean;
|
|
12
12
|
export declare function newWorkspaceSearch(): string;
|
|
13
13
|
export declare function buildNewWorkspaceSubscriptionPath(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Upgrade page search for a workspace that was just created. The flag tells Upgrade it is a plan
|
|
16
|
+
* pick, not a plan change, so the new workspace's Free plan is offered instead of shown as current.
|
|
17
|
+
*/
|
|
18
|
+
export declare function buildNewWorkspaceUpgradeSearch(workspaceId: number): string;
|
|
@@ -1089,6 +1089,48 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
|
|
|
1089
1089
|
};
|
|
1090
1090
|
};
|
|
1091
1091
|
};
|
|
1092
|
+
emptyInboxOnboarding: {
|
|
1093
|
+
welcome: string;
|
|
1094
|
+
subtitle: string;
|
|
1095
|
+
subtitleAskAdmin: string;
|
|
1096
|
+
connectFirstChannel: string;
|
|
1097
|
+
mostPopular: string;
|
|
1098
|
+
setupTime: string;
|
|
1099
|
+
connect: string;
|
|
1100
|
+
channels: {
|
|
1101
|
+
whatsapp: {
|
|
1102
|
+
name: string;
|
|
1103
|
+
description: string;
|
|
1104
|
+
requirement: string;
|
|
1105
|
+
};
|
|
1106
|
+
instagram: {
|
|
1107
|
+
name: string;
|
|
1108
|
+
description: string;
|
|
1109
|
+
requirement: string;
|
|
1110
|
+
};
|
|
1111
|
+
messenger: {
|
|
1112
|
+
name: string;
|
|
1113
|
+
description: string;
|
|
1114
|
+
requirement: string;
|
|
1115
|
+
};
|
|
1116
|
+
telegram: {
|
|
1117
|
+
name: string;
|
|
1118
|
+
description: string;
|
|
1119
|
+
requirement: string;
|
|
1120
|
+
};
|
|
1121
|
+
};
|
|
1122
|
+
checklist: {
|
|
1123
|
+
title: string;
|
|
1124
|
+
progress: string;
|
|
1125
|
+
progressLabel: string;
|
|
1126
|
+
};
|
|
1127
|
+
help: {
|
|
1128
|
+
title: string;
|
|
1129
|
+
description: string;
|
|
1130
|
+
chat: string;
|
|
1131
|
+
bookCall: string;
|
|
1132
|
+
};
|
|
1133
|
+
};
|
|
1092
1134
|
onboardingChecklist: {
|
|
1093
1135
|
title: string;
|
|
1094
1136
|
getStarted: string;
|
|
@@ -1651,6 +1693,8 @@ export declare const convertLanguageJsonToObject: (json: any, objToConvertTo?: C
|
|
|
1651
1693
|
stuck: string;
|
|
1652
1694
|
ourTeam: string;
|
|
1653
1695
|
isHereForYou: string;
|
|
1696
|
+
stuckContact: string;
|
|
1697
|
+
stuckContactOrCall: string;
|
|
1654
1698
|
customChannelSetup: string;
|
|
1655
1699
|
customChannelDescription: string;
|
|
1656
1700
|
webChatChannelDescription: string;
|
|
@@ -8,3 +8,5 @@ export declare const CHANGELOG_URL = "https://bcrumbs.featurebase.app/changelog"
|
|
|
8
8
|
export declare const FEEDBACK_URL = "https://bcrumbs.featurebase.app/";
|
|
9
9
|
export declare const ROADMAP_URL = "https://bcrumbs.featurebase.app/roadmap";
|
|
10
10
|
export declare const SUPPORT_PHONE = "905301749170";
|
|
11
|
+
/** Calendar link for a guided channel setup call. Empty hides the "Book a setup call" actions. */
|
|
12
|
+
export declare const SETUP_CALL_URL = "https://cal.com/muneer-alwais-yisu4f/intro";
|