@botpress/webchat 3.1.0-beta.0 → 3.1.1
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/.turbo/turbo-build.log +8 -8
- package/dist/index.d.ts +26 -28
- package/dist/index.js +8588 -8045
- package/dist/index.umd.cjs +151 -124
- package/dist/style.css +1 -1
- package/package.json +6 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/webchat@3.1.
|
|
2
|
+
> @botpress/webchat@3.1.1 build /home/runner/work/genisys/genisys/packages/webchat-components
|
|
3
3
|
> vite build
|
|
4
4
|
|
|
5
5
|
[36mvite v5.4.8 [32mbuilding for production...[36m[39m
|
|
6
6
|
transforming...
|
|
7
|
-
[32m✓[39m
|
|
7
|
+
[32m✓[39m 3186 modules transformed.
|
|
8
8
|
rendering chunks...
|
|
9
9
|
|
|
10
10
|
[vite:dts] Start generate declaration files...
|
|
11
11
|
computing gzip size...
|
|
12
|
-
[2mdist/[22m[35mstyle.css [39m[1m[2m
|
|
13
|
-
[2mdist/[22m[36mindex.js [39m[1m[
|
|
12
|
+
[2mdist/[22m[35mstyle.css [39m[1m[2m 47.29 kB[22m[1m[22m[2m │ gzip: 8.69 kB[22m
|
|
13
|
+
[2mdist/[22m[36mindex.js [39m[1m[33m792.70 kB[39m[22m[2m │ gzip: 217.62 kB[22m
|
|
14
14
|
[vite:dts] Start rollup declaration files...
|
|
15
15
|
Analysis will use the bundled TypeScript version 5.4.2
|
|
16
16
|
*** The target project appears to use TypeScript 5.6.2 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
17
|
-
[vite:dts] Declaration files built in
|
|
17
|
+
[vite:dts] Declaration files built in 22474ms.
|
|
18
18
|
|
|
19
|
-
[2mdist/[22m[35mstyle.css [39m[1m[2m
|
|
20
|
-
[2mdist/[22m[36mindex.umd.cjs [39m[1m[
|
|
21
|
-
[32m✓ built in
|
|
19
|
+
[2mdist/[22m[35mstyle.css [39m[1m[2m 47.29 kB[22m[1m[22m[2m │ gzip: 8.69 kB[22m
|
|
20
|
+
[2mdist/[22m[36mindex.umd.cjs [39m[1m[33m529.39 kB[39m[22m[2m │ gzip: 178.10 kB[22m
|
|
21
|
+
[32m✓ built in 30.77s[39m
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { ClassAttributes } from 'react';
|
|
|
3
3
|
import { Client } from '@botpress/webchat-client';
|
|
4
4
|
import { ComponentProps } from 'react';
|
|
5
5
|
import { ComponentPropsWithRef } from 'react';
|
|
6
|
+
import { LatestWebchatConfig as Configuration } from '@bpinternal/shared';
|
|
6
7
|
import { CSSProperties } from 'react';
|
|
7
8
|
import * as Dialog from '@radix-ui/react-dialog';
|
|
8
9
|
import { EventEmitter } from '@bpinternal/shared';
|
|
@@ -12,7 +13,6 @@ import { HTMLAttributes } from 'react';
|
|
|
12
13
|
import { IntegrationError } from '@botpress/webchat-client';
|
|
13
14
|
import { JSX as JSX_2 } from 'react';
|
|
14
15
|
import { JSX as JSX_3 } from 'react/jsx-runtime';
|
|
15
|
-
import { LatestWebchatConfig } from '@bpinternal/shared';
|
|
16
16
|
import { LatestWebchatTheme } from '@bpinternal/shared';
|
|
17
17
|
import { MemoExoticComponent } from 'react';
|
|
18
18
|
import { Message as Message_2 } from '@botpress/webchat-client';
|
|
@@ -93,7 +93,7 @@ declare type BlockProps<T extends GenericBlock['type']> = {
|
|
|
93
93
|
renderers?: Partial<Renderers>;
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
export declare const BOT_IS_BLOCKED = "This bot
|
|
96
|
+
export declare const BOT_IS_BLOCKED = "This bot has temporarily paused.\nPlease check back later.";
|
|
97
97
|
|
|
98
98
|
declare type BoundWebchatClientStore = ReturnType<typeof createWebchatClientStore>;
|
|
99
99
|
|
|
@@ -162,7 +162,7 @@ export declare const Composer: MemoExoticComponent<ForwardRefExoticComponent<Omi
|
|
|
162
162
|
|
|
163
163
|
export declare const CONFIG_ACCESS_DENIED = "Access denied to configuration file. Please check your credentials or your configuration URL and try again.";
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
export { Configuration }
|
|
166
166
|
|
|
167
167
|
export declare const Container: {
|
|
168
168
|
({ children, className, connected, uploadFile, allowFileUpload, ...props }: Props_4): JSX_3.Element;
|
|
@@ -251,7 +251,7 @@ export declare const getUseWebchatClientStore: typeof WebchatClientStores.getIns
|
|
|
251
251
|
|
|
252
252
|
export declare const handleIntegrationError: (thrown: unknown) => WebchatError;
|
|
253
253
|
|
|
254
|
-
export declare const Header: ({ defaultOpen, closeWindow, configuration, restartConversation, ...props }: HeaderProps) => JSX_3.Element;
|
|
254
|
+
export declare const Header: ({ defaultOpen, closeWindow, configuration, restartConversation, disabled, ...props }: HeaderProps) => JSX_3.Element;
|
|
255
255
|
|
|
256
256
|
declare type HeaderProps = {
|
|
257
257
|
defaultOpen?: boolean;
|
|
@@ -260,13 +260,7 @@ declare type HeaderProps = {
|
|
|
260
260
|
onOpenChange?(open: boolean): void;
|
|
261
261
|
restartConversation?: () => void;
|
|
262
262
|
closeWindow?: () => void;
|
|
263
|
-
configuration: Pick<
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
export declare type HookResult<T> = {
|
|
267
|
-
data: Simplify<T> | undefined;
|
|
268
|
-
isLoading: boolean;
|
|
269
|
-
error: WebchatError | undefined;
|
|
263
|
+
configuration: Pick<Configuration, 'email' | 'phone' | 'privacyPolicy' | 'website' | 'termsOfService' | 'botAvatar' | 'botDescription' | 'botName'>;
|
|
270
264
|
};
|
|
271
265
|
|
|
272
266
|
export declare type ImageBlock = {
|
|
@@ -285,17 +279,17 @@ export declare function integrationMessageToBlockMessage(message: IntegrationMes
|
|
|
285
279
|
|
|
286
280
|
declare type IntegrationMessageTypes = IntegrationMessage['payload']['type'];
|
|
287
281
|
|
|
288
|
-
export declare const INVALID_API_URL = "Invalid API URL
|
|
282
|
+
export declare const INVALID_API_URL = "Invalid API URL.\nPlease use a valid API URL.";
|
|
289
283
|
|
|
290
|
-
export declare const INVALID_BOTPRESS_URL = "Invalid URL
|
|
284
|
+
export declare const INVALID_BOTPRESS_URL = "Invalid URL.\nPlease make sure your client ID and API URL are valid";
|
|
291
285
|
|
|
292
|
-
export declare const INVALID_CLIENT_ID = "Invalid Client ID
|
|
286
|
+
export declare const INVALID_CLIENT_ID = "Invalid Client ID.\nPlease use a valid Botpress Client ID.";
|
|
293
287
|
|
|
294
|
-
export declare const INVALID_CONFIG_URL = "Invalid config URL
|
|
288
|
+
export declare const INVALID_CONFIG_URL = "Invalid config URL.\nPlease make sure your config URL is valid";
|
|
295
289
|
|
|
296
|
-
export declare const INVALID_CONFIGURATION = "Invalid webchat configuration
|
|
290
|
+
export declare const INVALID_CONFIGURATION = "Invalid webchat configuration.\nPlease make sure your config file is valid";
|
|
297
291
|
|
|
298
|
-
export declare const INVALID_MESSAGE_CONTENT_TYPE = "Unable to process the message
|
|
292
|
+
export declare const INVALID_MESSAGE_CONTENT_TYPE = "Unable to process the message.\nPlease start a new conversation.";
|
|
299
293
|
|
|
300
294
|
export declare function isCommonApiErrorType(type: string): type is keyof typeof commonApiErrorMap;
|
|
301
295
|
|
|
@@ -385,7 +379,7 @@ export declare const ModalProvider: ({ children }: {
|
|
|
385
379
|
|
|
386
380
|
export declare const NETWORK_ERROR = "Please check your internet connection and refresh the page.";
|
|
387
381
|
|
|
388
|
-
export declare const NOT_A_PARTICIPANT = "
|
|
382
|
+
export declare const NOT_A_PARTICIPANT = "Something went wrong. To fix it, please clear your browser's local and session storage and then refresh the page";
|
|
389
383
|
|
|
390
384
|
export declare type Options = {
|
|
391
385
|
timeout?: number;
|
|
@@ -394,7 +388,7 @@ export declare type Options = {
|
|
|
394
388
|
export declare type Props = {
|
|
395
389
|
className?: string;
|
|
396
390
|
renderers?: Partial<Renderers>;
|
|
397
|
-
configuration:
|
|
391
|
+
configuration: Configuration;
|
|
398
392
|
messages: BlockMessage[];
|
|
399
393
|
participants: User[];
|
|
400
394
|
connected?: boolean;
|
|
@@ -442,7 +436,7 @@ declare type Props_3 = ComponentProps<'div'> & {
|
|
|
442
436
|
name: string;
|
|
443
437
|
type: FileType;
|
|
444
438
|
}>;
|
|
445
|
-
} & Pick<
|
|
439
|
+
} & Pick<Configuration, 'composerPlaceholder' | 'footer'>;
|
|
446
440
|
|
|
447
441
|
declare type Props_4 = ComponentProps<'div'> & {
|
|
448
442
|
connected?: boolean;
|
|
@@ -464,12 +458,12 @@ declare type Props_6 = {
|
|
|
464
458
|
storageKey?: string;
|
|
465
459
|
user?: UserCredentials;
|
|
466
460
|
conversationId?: string;
|
|
467
|
-
configuration?:
|
|
461
|
+
configuration?: Configuration;
|
|
468
462
|
} & Pick<ComponentProps<typeof Chat>, 'allowFileUpload' | 'renderers'> & ComponentProps<'div'>;
|
|
469
463
|
|
|
470
464
|
declare type Props_7 = Partial<LatestWebchatTheme>;
|
|
471
465
|
|
|
472
|
-
export declare const QUOTA_EXCEEDED = "This bot has temporarily paused
|
|
466
|
+
export declare const QUOTA_EXCEEDED = "This bot has temporarily paused.\nPlease check back later.";
|
|
473
467
|
|
|
474
468
|
export declare type Renderers = {
|
|
475
469
|
[T in GenericBlock['type']]: FC<BlockObjects[T]>;
|
|
@@ -511,11 +505,7 @@ declare type ScopedClient = {
|
|
|
511
505
|
updateUser: (user: UserProfile) => Promise<User>;
|
|
512
506
|
};
|
|
513
507
|
|
|
514
|
-
export declare
|
|
515
|
-
[KeyType in keyof T]: T[KeyType];
|
|
516
|
-
} & {};
|
|
517
|
-
|
|
518
|
-
export declare const SSE_DISCONNECTED_ERROR = "You've been disconnected from the conversation. Please refresh the page.";
|
|
508
|
+
export declare const SSE_DISCONNECTED_ERROR = "You've been disconnected from the conversation.\nPlease refresh the page.";
|
|
519
509
|
|
|
520
510
|
declare type StorageLocation = 'sessionStorage' | 'localStorage';
|
|
521
511
|
|
|
@@ -890,6 +880,9 @@ export declare const webchatClasses: {
|
|
|
890
880
|
readonly image: {
|
|
891
881
|
readonly className: "bpMessageBlocksTextImage";
|
|
892
882
|
};
|
|
883
|
+
readonly imageError: {
|
|
884
|
+
readonly className: "bpMessageBlocksTextImageError";
|
|
885
|
+
};
|
|
893
886
|
readonly horizontalRule: {
|
|
894
887
|
readonly className: "bpMessageBlocksTextHorizontalRule";
|
|
895
888
|
};
|
|
@@ -1027,6 +1020,9 @@ export declare const webchatClasses: {
|
|
|
1027
1020
|
readonly container: {
|
|
1028
1021
|
readonly className: "bpReset bpErrorContainer";
|
|
1029
1022
|
};
|
|
1023
|
+
readonly id: {
|
|
1024
|
+
readonly className: "bpErrorId";
|
|
1025
|
+
};
|
|
1030
1026
|
readonly header: {
|
|
1031
1027
|
readonly className: "bpErrorHeader";
|
|
1032
1028
|
};
|
|
@@ -1067,7 +1063,7 @@ declare class WebchatClientStores {
|
|
|
1067
1063
|
static getInstance(name?: string, storageLocation?: StorageLocation): BoundWebchatClientStore;
|
|
1068
1064
|
}
|
|
1069
1065
|
|
|
1070
|
-
export declare type WebchatError = {
|
|
1066
|
+
export declare type WebchatError = ({
|
|
1071
1067
|
type: 'configuration';
|
|
1072
1068
|
message: typeof MISSING_CLIENT_ID | typeof MISSING_API_URL | typeof MISSING_BOT_ID | typeof INVALID_CLIENT_ID | typeof INVALID_CONFIGURATION | typeof MISSING_CONFIG_URL;
|
|
1073
1069
|
} | {
|
|
@@ -1079,6 +1075,8 @@ export declare type WebchatError = {
|
|
|
1079
1075
|
} | {
|
|
1080
1076
|
type: string;
|
|
1081
1077
|
message: string;
|
|
1078
|
+
}) & {
|
|
1079
|
+
id?: string;
|
|
1082
1080
|
};
|
|
1083
1081
|
|
|
1084
1082
|
export declare type WebchatEvents = {
|