@botpress/webchat 4.4.8 → 4.5.0
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 +6 -6
- package/dist/index.d.ts +68 -2
- package/dist/index.js +9400 -9040
- package/dist/index.umd.cjs +97 -97
- package/package.json +3 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/webchat@4.
|
|
2
|
+
> @botpress/webchat@4.5.0 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 2420 modules transformed.
|
|
8
8
|
rendering chunks...
|
|
9
9
|
|
|
10
10
|
[vite:dts] Start generate declaration files...
|
|
11
11
|
computing gzip size...
|
|
12
12
|
[2mdist/[22m[35mstyle.css [39m[1m[2m 56.94 kB[22m[1m[22m[2m │ gzip: 9.46 kB[22m
|
|
13
|
-
[2mdist/[22m[36mindex.js [39m[1m[
|
|
13
|
+
[2mdist/[22m[36mindex.js [39m[1m[33m889.68 kB[39m[22m[2m │ gzip: 235.29 kB[22m
|
|
14
14
|
[vite:dts] Start rollup declaration files...
|
|
15
15
|
Analysis will use the bundled TypeScript version 5.8.2
|
|
16
16
|
*** The target project appears to use TypeScript 5.9.3 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 20423ms.
|
|
18
18
|
|
|
19
19
|
[2mdist/[22m[35mstyle.css [39m[1m[2m 56.94 kB[22m[1m[22m[2m │ gzip: 9.46 kB[22m
|
|
20
|
-
[2mdist/[22m[36mindex.umd.cjs [39m[1m[
|
|
21
|
-
[32m✓ built in 25.
|
|
20
|
+
[2mdist/[22m[36mindex.umd.cjs [39m[1m[33m550.63 kB[39m[22m[2m │ gzip: 180.37 kB[22m
|
|
21
|
+
[32m✓ built in 25.89s[39m
|
package/dist/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ import { MemoExoticComponent } from '../../../node_modules/@types/react';
|
|
|
25
25
|
import { Message as Message_2 } from '@botpress/webchat-client';
|
|
26
26
|
import { NamedExoticComponent } from '../../../node_modules/@types/react';
|
|
27
27
|
import { PersistOptions } from 'zustand/middleware';
|
|
28
|
+
import { Provider } from '../../node_modules/@types/react';
|
|
28
29
|
import { ReactNode } from '../../../node_modules/@types/react';
|
|
29
30
|
import { ReactNode as ReactNode_2 } from '../../node_modules/@types/react';
|
|
30
31
|
import { Ref } from '../../../node_modules/@types/react';
|
|
@@ -46,6 +47,8 @@ declare type AnyEvent = ValueOf<{
|
|
|
46
47
|
};
|
|
47
48
|
}>;
|
|
48
49
|
|
|
50
|
+
export declare const ar: WebchatTranslations;
|
|
51
|
+
|
|
49
52
|
export declare type AudioBlock = {
|
|
50
53
|
type: 'audio';
|
|
51
54
|
url: string;
|
|
@@ -142,7 +145,7 @@ export declare type CarouselBlock = {
|
|
|
142
145
|
blocks: GenericBlock[];
|
|
143
146
|
};
|
|
144
147
|
|
|
145
|
-
export declare const Chat: ({ connected, configuration, isTyping, messages, user, isLoading, renderers, isReadOnly, disableComposer, error, participants, closeWindow, sendMessage, uploadFile, addMessageFeedback, listConversations, restartConversation, clientId, storageKey, soundOn, toggleSound, disableSendButton, conversationId, ...props }: Props) => JSX_2.Element;
|
|
148
|
+
export declare const Chat: ({ connected, configuration, isTyping, messages, user, isLoading, renderers, isReadOnly, disableComposer, error, participants, closeWindow, sendMessage, uploadFile, addMessageFeedback, listConversations, restartConversation, clientId, storageKey, soundOn, toggleSound, disableSendButton, conversationId, locale, ...props }: Props) => JSX_2.Element;
|
|
146
149
|
|
|
147
150
|
declare type ChatSoundStore = {
|
|
148
151
|
soundOn: boolean;
|
|
@@ -268,6 +271,47 @@ export declare type CustomBlock = {
|
|
|
268
271
|
name: string;
|
|
269
272
|
};
|
|
270
273
|
|
|
274
|
+
export declare const de: WebchatTranslations;
|
|
275
|
+
|
|
276
|
+
export declare const defaultTranslations: {
|
|
277
|
+
readonly 'composer.placeholder': "Type your message...";
|
|
278
|
+
readonly 'composer.sendButton.ariaLabel': "Send Message Button";
|
|
279
|
+
readonly 'composer.voiceButton.ariaLabel': "Voice Input Button";
|
|
280
|
+
readonly 'composer.fileButton.ariaLabel': "Upload File Button";
|
|
281
|
+
readonly 'composer.messageInput.ariaLabel': "Message Input";
|
|
282
|
+
readonly 'fileAttachment.uploadError': "Upload Error";
|
|
283
|
+
readonly 'fileAttachment.fallbackExtension': "File";
|
|
284
|
+
readonly 'fileAttachment.removeButton.ariaLabel': "Remove File Button";
|
|
285
|
+
readonly 'header.defaultBotName': "Bot";
|
|
286
|
+
readonly 'header.expandButton.ariaLabel': "Expand Header Button";
|
|
287
|
+
readonly 'header.sound.enable': "Enable chat sounds";
|
|
288
|
+
readonly 'header.sound.disable': "Disable chat sounds";
|
|
289
|
+
readonly 'conversationHistory.title': "Conversations";
|
|
290
|
+
readonly 'conversationHistory.empty': "No conversation started yet";
|
|
291
|
+
readonly 'conversationHistory.newConversation': "New conversation";
|
|
292
|
+
readonly 'conversationHistory.sentAttachment': "Sent an attachment";
|
|
293
|
+
readonly 'conversationHistory.showButton.ariaLabel': "Show Recent Conversations Button";
|
|
294
|
+
readonly 'restartConversation.title': "Create New Conversation";
|
|
295
|
+
readonly 'restartConversation.description': "This will clear the current conversation and start a new one.";
|
|
296
|
+
readonly 'restartConversation.confirm': "New conversation";
|
|
297
|
+
readonly 'restartConversation.cancel': "Cancel";
|
|
298
|
+
readonly 'restartConversation.button.ariaLabel': "Restart Conversation Button";
|
|
299
|
+
readonly 'closeButton.ariaLabel': "Close Chatbot Button";
|
|
300
|
+
readonly 'feedback.title': "Help us improve";
|
|
301
|
+
readonly 'feedback.description': "Please provide feedback to help us improve.";
|
|
302
|
+
readonly 'feedback.confirm': "Send feedback";
|
|
303
|
+
readonly 'feedback.cancel': "Cancel";
|
|
304
|
+
readonly 'feedback.placeholder': "Let us know what went wrong...";
|
|
305
|
+
readonly 'error.configuration': "Configuration error";
|
|
306
|
+
readonly 'error.bot': "Bot error";
|
|
307
|
+
readonly 'error.network': "Network error";
|
|
308
|
+
readonly 'error.disconnected': "Disconnected";
|
|
309
|
+
readonly 'error.unexpected': "Unexpected error";
|
|
310
|
+
readonly 'dropdown.placeholder': "Select...";
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
export declare function detectLocale(language?: string): WebchatTranslations;
|
|
314
|
+
|
|
271
315
|
export declare type Dimensions = {
|
|
272
316
|
width: number;
|
|
273
317
|
height: number;
|
|
@@ -293,6 +337,8 @@ declare type ErrorProps = {
|
|
|
293
337
|
|
|
294
338
|
export declare function ErrorState({ error, restartConversation, closeWindow }: ErrorProps): JSX_2.Element;
|
|
295
339
|
|
|
340
|
+
export declare const es: WebchatTranslations;
|
|
341
|
+
|
|
296
342
|
declare type EventError = Error & {
|
|
297
343
|
type: 'error';
|
|
298
344
|
};
|
|
@@ -321,6 +367,8 @@ export declare type FileType = (typeof fileTypes)[number];
|
|
|
321
367
|
|
|
322
368
|
export declare const fileTypes: readonly ["audio", "file", "image", "video"];
|
|
323
369
|
|
|
370
|
+
export declare const fr: WebchatTranslations;
|
|
371
|
+
|
|
324
372
|
export declare function generateThemeOverride(theme: LatestWebchatTheme): Record<string, string>;
|
|
325
373
|
|
|
326
374
|
export declare function generateThemeStylesheet(theme: LatestWebchatTheme): string;
|
|
@@ -399,6 +447,12 @@ export declare function isIntegrationError(thrown: unknown): thrown is Integrati
|
|
|
399
447
|
|
|
400
448
|
export declare function isWebhookHandlerErrorType(type: string): type is keyof typeof webhookHandlerErrorMap;
|
|
401
449
|
|
|
450
|
+
export declare const it: WebchatTranslations;
|
|
451
|
+
|
|
452
|
+
export declare const ja: WebchatTranslations;
|
|
453
|
+
|
|
454
|
+
export declare const ko: WebchatTranslations;
|
|
455
|
+
|
|
402
456
|
export declare type LocationBlock = {
|
|
403
457
|
type: 'location';
|
|
404
458
|
latitude: number;
|
|
@@ -530,6 +584,7 @@ export declare type Props = {
|
|
|
530
584
|
storageKey?: string;
|
|
531
585
|
disableSendButton?: boolean;
|
|
532
586
|
conversationId?: string;
|
|
587
|
+
locale?: Partial<WebchatTranslations>;
|
|
533
588
|
};
|
|
534
589
|
|
|
535
590
|
declare type Props_2 = {
|
|
@@ -582,10 +637,13 @@ declare type Props_6 = {
|
|
|
582
637
|
/** @deprecated This prop is no longer used, pass the allowFileUpload via the configuration object */
|
|
583
638
|
allowFileUpload?: boolean;
|
|
584
639
|
renderers?: Partial<Renderers>;
|
|
640
|
+
locale?: Partial<WebchatTranslations>;
|
|
585
641
|
} & ComponentProps_2<'div'>;
|
|
586
642
|
|
|
587
643
|
declare type Props_7 = Partial<LatestWebchatTheme>;
|
|
588
644
|
|
|
645
|
+
export declare const pt: WebchatTranslations;
|
|
646
|
+
|
|
589
647
|
export declare const QUOTA_EXCEEDED = "This bot has temporarily paused.\nPlease check back later.";
|
|
590
648
|
|
|
591
649
|
export declare type Renderers = {
|
|
@@ -655,7 +713,7 @@ export declare type StyleOptions = {
|
|
|
655
713
|
/**
|
|
656
714
|
* StylesheetProvider component that manages theme styles and font loading
|
|
657
715
|
*/
|
|
658
|
-
export declare const StylesheetProvider: ({ color, fontFamily, radius, themeMode, variant, headerVariant, additionalStylesheetUrl, }: Props_7) => JSX_2.Element;
|
|
716
|
+
export declare const StylesheetProvider: ({ color, fontFamily, radius, themeMode, variant, headerVariant, additionalStylesheet, additionalStylesheetUrl, }: Props_7) => JSX_2.Element;
|
|
659
717
|
|
|
660
718
|
export declare type TextBlock = {
|
|
661
719
|
type: 'text';
|
|
@@ -671,6 +729,8 @@ declare type ToPayloadType<T extends IntegrationMessageTypes> = {
|
|
|
671
729
|
|
|
672
730
|
declare let _trackFn: ((event: string, properties?: Record<string, unknown>) => void) | null;
|
|
673
731
|
|
|
732
|
+
export declare const TranslationProvider: Provider<WebchatTranslations>;
|
|
733
|
+
|
|
674
734
|
export declare const TypingIndicator: MemoExoticComponent<({ ...props }: ComponentProps<"div">) => JSX_2.Element>;
|
|
675
735
|
|
|
676
736
|
export declare function useActiveConversation(): UseActiveConversationReturn;
|
|
@@ -735,6 +795,8 @@ export declare type UserProfile = Omit<User, 'id' | 'createdAt' | 'updatedAt'>;
|
|
|
735
795
|
|
|
736
796
|
export declare type UserResponse = Awaited<ReturnType<Client['getUser']>>['user'];
|
|
737
797
|
|
|
798
|
+
export declare function useTranslations(): WebchatTranslations;
|
|
799
|
+
|
|
738
800
|
export declare const useUser: () => UseUserReturn;
|
|
739
801
|
|
|
740
802
|
declare type UseUserReturn = {
|
|
@@ -1467,6 +1529,10 @@ declare type WebchatStore = {
|
|
|
1467
1529
|
eventEmitter: EventEmitter<Events_2>;
|
|
1468
1530
|
};
|
|
1469
1531
|
|
|
1532
|
+
export declare type WebchatTranslations = {
|
|
1533
|
+
[K in keyof typeof defaultTranslations]: string;
|
|
1534
|
+
};
|
|
1535
|
+
|
|
1470
1536
|
export declare const webhookHandlerErrorMap: {
|
|
1471
1537
|
[key in 'ResourceNotFound' | 'Forbidden']: WebchatError;
|
|
1472
1538
|
};
|