@urbiport/js 0.0.11 → 0.0.13
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/README.md +39 -39
- package/dist/components/Bot.d.ts +8 -4
- package/dist/components/Bot.d.ts.map +1 -1
- package/dist/components/Button.d.ts +0 -1
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/{SendButton.d.ts → ButtonSubmit.d.ts} +3 -4
- package/dist/components/ButtonSubmit.d.ts.map +1 -0
- package/dist/components/{InputChatBlock.d.ts → ChatInputFooter.d.ts} +4 -5
- package/dist/components/ChatInputFooter.d.ts.map +1 -0
- package/dist/components/ConversationContainer/ConversationContainer.d.ts +7 -2
- package/dist/components/ConversationContainer/ConversationContainer.d.ts.map +1 -1
- package/dist/components/ConversationContainer/ConversationContainerBody.d.ts +14 -0
- package/dist/components/ConversationContainer/ConversationContainerBody.d.ts.map +1 -0
- package/dist/components/ConversationContainer/ConversationContainerFooter.d.ts +17 -0
- package/dist/components/ConversationContainer/ConversationContainerFooter.d.ts.map +1 -0
- package/dist/components/ConversationContainer/{ChatChunk.d.ts → ConversationMessageChunk.d.ts} +5 -4
- package/dist/components/ConversationContainer/ConversationMessageChunk.d.ts.map +1 -0
- package/dist/components/ConversationContainer/ConversationPopupBlockedToast.d.ts +7 -0
- package/dist/components/ConversationContainer/ConversationPopupBlockedToast.d.ts.map +1 -0
- package/dist/components/ConversationContainer/ConversationProgressBar.d.ts +6 -0
- package/dist/components/ConversationContainer/ConversationProgressBar.d.ts.map +1 -0
- package/dist/components/ConversationContainer/HostAvatar.d.ts +8 -0
- package/dist/components/ConversationContainer/HostAvatar.d.ts.map +1 -0
- package/dist/components/ConversationContainer/InputAnswer.d.ts +18 -0
- package/dist/components/ConversationContainer/InputAnswer.d.ts.map +1 -0
- package/dist/components/ConversationContainer/helpers.d.ts +6 -0
- package/dist/components/ConversationContainer/helpers.d.ts.map +1 -0
- package/dist/components/FooterEndConversation.d.ts +2 -0
- package/dist/components/FooterEndConversation.d.ts.map +1 -0
- package/dist/components/FooterLiteBadge.d.ts +6 -0
- package/dist/components/FooterLiteBadge.d.ts.map +1 -0
- package/dist/components/InputAnswerContext.d.ts +46 -0
- package/dist/components/InputAnswerContext.d.ts.map +1 -0
- package/dist/components/InputFormLayout.d.ts +19 -0
- package/dist/components/InputFormLayout.d.ts.map +1 -0
- package/dist/components/Spinner.d.ts.map +1 -1
- package/dist/components/avatars/AvatarPlaceholder.d.ts +7 -0
- package/dist/components/avatars/AvatarPlaceholder.d.ts.map +1 -0
- package/dist/components/bubbles/HostBubble.d.ts +1 -1
- package/dist/components/bubbles/HostBubble.d.ts.map +1 -1
- package/dist/components/bubbles/HostBubbleStreaming.d.ts +8 -0
- package/dist/components/bubbles/HostBubbleStreaming.d.ts.map +1 -0
- package/dist/components/icons/LogoIcon.d.ts +2 -0
- package/dist/components/icons/LogoIcon.d.ts.map +1 -0
- package/dist/components/icons/MicrophoneIcon.d.ts.map +1 -1
- package/dist/components/icons/SendIcon.d.ts.map +1 -1
- package/dist/{features/blocks/inputs/fileUpload/components/SelectedFile.d.ts → components/inputs/FileAttached.d.ts} +2 -2
- package/dist/components/inputs/FileAttached.d.ts.map +1 -0
- package/dist/components/inputs/{ShortTextInput.d.ts → Input.d.ts} +2 -2
- package/dist/components/inputs/Input.d.ts.map +1 -0
- package/dist/components/inputs/Textarea.d.ts +2 -1
- package/dist/components/inputs/Textarea.d.ts.map +1 -1
- package/dist/features/blocks/bubbles/audio/components/AudioBubble.d.ts +1 -1
- package/dist/features/blocks/bubbles/audio/components/AudioBubble.d.ts.map +1 -1
- package/dist/features/blocks/bubbles/embed/components/EmbedBubble.d.ts +1 -2
- package/dist/features/blocks/bubbles/embed/components/EmbedBubble.d.ts.map +1 -1
- package/dist/features/blocks/bubbles/image/components/ImageBubble.d.ts +1 -3
- package/dist/features/blocks/bubbles/image/components/ImageBubble.d.ts.map +1 -1
- package/dist/features/blocks/bubbles/textBubble/components/TextBubble.d.ts +1 -2
- package/dist/features/blocks/bubbles/textBubble/components/TextBubble.d.ts.map +1 -1
- package/dist/features/blocks/bubbles/video/components/VideoBubble.d.ts +1 -2
- package/dist/features/blocks/bubbles/video/components/VideoBubble.d.ts.map +1 -1
- package/dist/features/blocks/inputs/buttons/components/Buttons.d.ts +4 -2
- package/dist/features/blocks/inputs/buttons/components/Buttons.d.ts.map +1 -1
- package/dist/{components/inputs/SearchInput.d.ts → features/blocks/inputs/buttons/components/ButtonsSearch.d.ts} +2 -2
- package/dist/features/blocks/inputs/buttons/components/ButtonsSearch.d.ts.map +1 -0
- package/dist/features/blocks/inputs/buttons/index.d.ts +2 -0
- package/dist/features/blocks/inputs/buttons/index.d.ts.map +1 -0
- package/dist/features/blocks/inputs/date/components/DateForm.d.ts +1 -1
- package/dist/features/blocks/inputs/date/components/DateForm.d.ts.map +1 -1
- package/dist/features/blocks/inputs/email/components/EmailInput.d.ts +3 -1
- package/dist/features/blocks/inputs/email/components/EmailInput.d.ts.map +1 -1
- package/dist/features/blocks/inputs/fileUpload/components/FileUploadForm.d.ts +1 -1
- package/dist/features/blocks/inputs/fileUpload/components/FileUploadForm.d.ts.map +1 -1
- package/dist/features/blocks/inputs/fileUpload/{helpers → utils}/sanitizeSelectedFiles.d.ts +2 -4
- package/dist/features/blocks/inputs/fileUpload/utils/sanitizeSelectedFiles.d.ts.map +1 -0
- package/dist/features/blocks/inputs/fileUpload/utils/uploadFiles.d.ts.map +1 -0
- package/dist/features/blocks/inputs/number/components/NumberInput.d.ts +1 -1
- package/dist/features/blocks/inputs/number/components/NumberInput.d.ts.map +1 -1
- package/dist/features/blocks/inputs/number/utils/numberInputHelper.d.ts.map +1 -0
- package/dist/features/blocks/inputs/payment/components/PaymentForm.d.ts +1 -1
- package/dist/features/blocks/inputs/payment/components/PaymentForm.d.ts.map +1 -1
- package/dist/features/blocks/inputs/payment/components/StripePaymentForm.d.ts +1 -1
- package/dist/features/blocks/inputs/payment/components/StripePaymentForm.d.ts.map +1 -1
- package/dist/features/blocks/inputs/payment/{helpers → utils}/paymentInProgressStorage.d.ts +2 -2
- package/dist/features/blocks/inputs/payment/utils/paymentInProgressStorage.d.ts.map +1 -0
- package/dist/features/blocks/inputs/phone/components/PhoneInput.d.ts +3 -1
- package/dist/features/blocks/inputs/phone/components/PhoneInput.d.ts.map +1 -1
- package/dist/features/blocks/inputs/rating/components/RatingForm.d.ts +1 -1
- package/dist/features/blocks/inputs/rating/components/RatingForm.d.ts.map +1 -1
- package/dist/features/blocks/inputs/{textInput → text}/components/TextInput.d.ts +3 -1
- package/dist/features/blocks/inputs/text/components/TextInput.d.ts.map +1 -0
- package/dist/features/blocks/inputs/{textInput → text}/components/VoiceRecorder.d.ts +2 -2
- package/dist/features/blocks/inputs/text/components/VoiceRecorder.d.ts.map +1 -0
- package/dist/features/blocks/inputs/text/components/VolumeProcessor.d.ts.map +1 -0
- package/dist/features/blocks/inputs/text/index.d.ts.map +1 -0
- package/dist/features/blocks/inputs/url/components/UrlInput.d.ts +3 -1
- package/dist/features/blocks/inputs/url/components/UrlInput.d.ts.map +1 -1
- package/dist/features/blocks/integrations/chatwoot/utils/executeChatwoot.d.ts +1 -1
- package/dist/features/blocks/integrations/chatwoot/utils/executeChatwoot.d.ts.map +1 -1
- package/dist/features/blocks/integrations/pixel/executePixel.d.ts +1 -1
- package/dist/features/blocks/integrations/pixel/executePixel.d.ts.map +1 -1
- package/dist/features/blocks/integrations/webhook/executeWebhook.d.ts +1 -1
- package/dist/features/blocks/integrations/webhook/executeWebhook.d.ts.map +1 -1
- package/dist/features/blocks/logic/redirect/utils/executeRedirect.d.ts +1 -1
- package/dist/features/blocks/logic/redirect/utils/executeRedirect.d.ts.map +1 -1
- package/dist/features/blocks/logic/script/executeScript.d.ts +1 -1
- package/dist/features/blocks/logic/script/executeScript.d.ts.map +1 -1
- package/dist/features/blocks/logic/variable/executeVariable.d.ts +6 -0
- package/dist/features/blocks/logic/variable/executeVariable.d.ts.map +1 -0
- package/dist/features/bubble/components/Bubble.d.ts +1 -0
- package/dist/features/bubble/components/Bubble.d.ts.map +1 -1
- package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -1
- package/dist/features/bubble/components/{PreviewMessage.d.ts → BubbleMessage.d.ts} +2 -2
- package/dist/features/bubble/components/BubbleMessage.d.ts.map +1 -0
- package/dist/features/commands/types.d.ts +1 -1
- package/dist/features/commands/types.d.ts.map +1 -1
- package/dist/features/popup/components/Popup.d.ts +1 -0
- package/dist/features/popup/components/Popup.d.ts.map +1 -1
- package/dist/features/standard/components/Standard.d.ts +1 -0
- package/dist/features/standard/components/Standard.d.ts.map +1 -1
- package/dist/features/streaming/streamChat.d.ts.map +1 -0
- package/dist/hooks/useMessageListener.d.ts +11 -0
- package/dist/hooks/useMessageListener.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -1
- package/dist/lib/gtm.d.ts +0 -1
- package/dist/lib/gtm.d.ts.map +1 -1
- package/dist/lib/pixel.d.ts +1 -1
- package/dist/lib/pixel.d.ts.map +1 -1
- package/dist/queries/continueChatQuery.d.ts +97 -223
- package/dist/queries/continueChatQuery.d.ts.map +1 -1
- package/dist/queries/saveClientLogsQuery.d.ts +1 -1
- package/dist/queries/saveClientLogsQuery.d.ts.map +1 -1
- package/dist/queries/startChatQuery.d.ts +193 -308
- package/dist/queries/startChatQuery.d.ts.map +1 -1
- package/dist/types.d.ts +6 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/botContainerSignal.d.ts +1 -1
- package/dist/utils/botContainerSignal.d.ts.map +1 -1
- package/dist/utils/executeClientSideActions.d.ts +1 -1
- package/dist/utils/executeClientSideActions.d.ts.map +1 -1
- package/dist/utils/guessApiHost.d.ts.map +1 -1
- package/dist/utils/injectFont.d.ts +2 -2
- package/dist/utils/injectFont.d.ts.map +1 -1
- package/dist/utils/injectStartProps.d.ts +1 -1
- package/dist/utils/injectStartProps.d.ts.map +1 -1
- package/dist/utils/setCssVariablesValue.d.ts +2 -2
- package/dist/utils/setCssVariablesValue.d.ts.map +1 -1
- package/dist/utils/storage.d.ts +197 -313
- package/dist/utils/storage.d.ts.map +1 -1
- package/dist/web.d.ts +1 -16
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +30 -7
- package/dist/window.d.ts +6 -6
- package/dist/window.d.ts.map +1 -1
- package/package.json +25 -20
- package/.turbo/turbo-build.log +0 -11
- package/LICENSE +0 -669
- package/dist/components/ConversationContainer/AvatarSideContainer.d.ts +0 -8
- package/dist/components/ConversationContainer/AvatarSideContainer.d.ts.map +0 -1
- package/dist/components/ConversationContainer/ChatChunk.d.ts.map +0 -1
- package/dist/components/ConversationContainer/LoadingChunk.d.ts +0 -7
- package/dist/components/ConversationContainer/LoadingChunk.d.ts.map +0 -1
- package/dist/components/ConversationContainer/PopupBlockedToast.d.ts +0 -7
- package/dist/components/ConversationContainer/PopupBlockedToast.d.ts.map +0 -1
- package/dist/components/InputChatBlock.d.ts.map +0 -1
- package/dist/components/LiteBadge.d.ts +0 -6
- package/dist/components/LiteBadge.d.ts.map +0 -1
- package/dist/components/ProgressBar.d.ts +0 -6
- package/dist/components/ProgressBar.d.ts.map +0 -1
- package/dist/components/SendButton.d.ts.map +0 -1
- package/dist/components/avatars/DefaultAvatar.d.ts +0 -2
- package/dist/components/avatars/DefaultAvatar.d.ts.map +0 -1
- package/dist/components/bubbles/LoadingBubble.d.ts +0 -2
- package/dist/components/bubbles/LoadingBubble.d.ts.map +0 -1
- package/dist/components/bubbles/StreamingBubble.d.ts +0 -8
- package/dist/components/bubbles/StreamingBubble.d.ts.map +0 -1
- package/dist/components/icons/CameraIcon.d.ts +0 -3
- package/dist/components/icons/CameraIcon.d.ts.map +0 -1
- package/dist/components/icons/PlusIcon.d.ts +0 -3
- package/dist/components/icons/PlusIcon.d.ts.map +0 -1
- package/dist/components/icons/TypebotLogo.d.ts +0 -2
- package/dist/components/icons/TypebotLogo.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -4
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/inputs/SearchInput.d.ts.map +0 -1
- package/dist/components/inputs/ShortTextInput.d.ts.map +0 -1
- package/dist/components/inputs/index.d.ts +0 -3
- package/dist/components/inputs/index.d.ts.map +0 -1
- package/dist/features/blocks/bubbles/embed/components/CustomEmbedBubble.d.ts +0 -11
- package/dist/features/blocks/bubbles/embed/components/CustomEmbedBubble.d.ts.map +0 -1
- package/dist/features/blocks/bubbles/textBubble/helpers/convertRichTextToPlainText.d.ts +0 -3
- package/dist/features/blocks/bubbles/textBubble/helpers/convertRichTextToPlainText.d.ts.map +0 -1
- package/dist/features/blocks/inputs/buttons/components/Checkbox.d.ts +0 -7
- package/dist/features/blocks/inputs/buttons/components/Checkbox.d.ts.map +0 -1
- package/dist/features/blocks/inputs/buttons/components/MultipleChoicesForm.d.ts +0 -10
- package/dist/features/blocks/inputs/buttons/components/MultipleChoicesForm.d.ts.map +0 -1
- package/dist/features/blocks/inputs/fileUpload/components/SelectedFile.d.ts.map +0 -1
- package/dist/features/blocks/inputs/fileUpload/helpers/sanitizeSelectedFiles.d.ts.map +0 -1
- package/dist/features/blocks/inputs/fileUpload/helpers/uploadFiles.d.ts.map +0 -1
- package/dist/features/blocks/inputs/number/numberInputHelper.d.ts.map +0 -1
- package/dist/features/blocks/inputs/payment/helpers/paymentInProgressStorage.d.ts.map +0 -1
- package/dist/features/blocks/inputs/pictureChoice/MultiplePictureChoice.d.ts +0 -11
- package/dist/features/blocks/inputs/pictureChoice/MultiplePictureChoice.d.ts.map +0 -1
- package/dist/features/blocks/inputs/pictureChoice/SinglePictureChoice.d.ts +0 -11
- package/dist/features/blocks/inputs/pictureChoice/SinglePictureChoice.d.ts.map +0 -1
- package/dist/features/blocks/inputs/textInput/components/TextInput.d.ts.map +0 -1
- package/dist/features/blocks/inputs/textInput/components/VoiceRecorder.d.ts.map +0 -1
- package/dist/features/blocks/inputs/textInput/components/VolumeProcessor.d.ts.map +0 -1
- package/dist/features/blocks/inputs/textInput/index.d.ts.map +0 -1
- package/dist/features/blocks/integrations/googleAnalytics/index.d.ts +0 -2
- package/dist/features/blocks/integrations/googleAnalytics/index.d.ts.map +0 -1
- package/dist/features/blocks/integrations/googleAnalytics/utils/executeGoogleAnalytics.d.ts +0 -3
- package/dist/features/blocks/integrations/googleAnalytics/utils/executeGoogleAnalytics.d.ts.map +0 -1
- package/dist/features/blocks/integrations/googleAnalytics/utils/index.d.ts +0 -2
- package/dist/features/blocks/integrations/googleAnalytics/utils/index.d.ts.map +0 -1
- package/dist/features/blocks/integrations/openai/streamChat.d.ts.map +0 -1
- package/dist/features/blocks/logic/setVariable/executeSetVariable.d.ts +0 -6
- package/dist/features/blocks/logic/setVariable/executeSetVariable.d.ts.map +0 -1
- package/dist/features/bubble/components/PreviewMessage.d.ts.map +0 -1
- package/dist/lib/gtag.d.ts +0 -4
- package/dist/lib/gtag.d.ts.map +0 -1
- /package/dist/features/blocks/inputs/fileUpload/{helpers → utils}/uploadFiles.d.ts +0 -0
- /package/dist/features/blocks/inputs/number/{numberInputHelper.d.ts → utils/numberInputHelper.d.ts} +0 -0
- /package/dist/features/blocks/inputs/{textInput → text}/components/VolumeProcessor.d.ts +0 -0
- /package/dist/features/blocks/inputs/{textInput → text}/index.d.ts +0 -0
- /package/dist/features/{blocks/integrations/openai → streaming}/streamChat.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# QuickBot JS library
|
|
2
2
|
|
|
3
|
-
Frontend library to embed
|
|
3
|
+
Frontend library to embed bots from [QuickBot](https://quick.bot/).
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -16,50 +16,50 @@ npm install @urbiport/js
|
|
|
16
16
|
|
|
17
17
|
```
|
|
18
18
|
<script type="module">
|
|
19
|
-
import
|
|
19
|
+
import QuickBot from 'https://cdn.jsdelivr.net/npm/@urbiport/js@0.3/dist/web.js'
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
QuickBot.initStandard({
|
|
22
|
+
bot: 'my-bot',
|
|
23
23
|
})
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
|
-
<
|
|
26
|
+
<quickbot-standard style="width: 100%; height: 600px; "></quickbot-standard>
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
## Standard
|
|
30
30
|
|
|
31
|
-
You can get the standard HTML and Javascript code by clicking on the "
|
|
32
|
-
|
|
31
|
+
You can get the standard HTML and Javascript code by clicking on the "Javascript" button in the
|
|
32
|
+
"Deploy" tab of your bot.
|
|
33
33
|
|
|
34
34
|
There, you can change the container dimensions. Here is a code example:
|
|
35
35
|
|
|
36
36
|
```html
|
|
37
37
|
<script type="module">
|
|
38
|
-
import
|
|
38
|
+
import QuickBot from 'https://cdn.jsdelivr.net/npm/@urbiport/js@0.3/dist/web.js'
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
QuickBot.initStandard({
|
|
41
|
+
bot: 'my-bot',
|
|
42
42
|
})
|
|
43
43
|
</script>
|
|
44
44
|
|
|
45
|
-
<
|
|
45
|
+
<quickbot-standard style="width: 100%; height: 600px; "></quickbot-standard>
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
This code is creating a container with a 100% width (will match parent width) and 600px height.
|
|
49
49
|
|
|
50
50
|
## Popup
|
|
51
51
|
|
|
52
|
-
You can get the popup HTML and Javascript code by clicking on the "
|
|
53
|
-
"
|
|
52
|
+
You can get the popup HTML and Javascript code by clicking on the "Javascript" button in the
|
|
53
|
+
"Deploy" tab of your bot.
|
|
54
54
|
|
|
55
55
|
Here is an example:
|
|
56
56
|
|
|
57
57
|
```html
|
|
58
58
|
<script type="module">
|
|
59
|
-
import
|
|
59
|
+
import QuickBot from 'https://cdn.jsdelivr.net/npm/@urbiport/js@0.3/dist/web.js'
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
QuickBot.initPopup({
|
|
62
|
+
bot: 'my-bot',
|
|
63
63
|
apiHost: 'http://localhost:3001',
|
|
64
64
|
autoShowDelay: 3000,
|
|
65
65
|
})
|
|
@@ -73,43 +73,43 @@ This code will automatically trigger the popup window after 3 seconds.
|
|
|
73
73
|
You can use these commands:
|
|
74
74
|
|
|
75
75
|
```js
|
|
76
|
-
|
|
76
|
+
QuickBot.open()
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
```js
|
|
80
|
-
|
|
80
|
+
QuickBot.close()
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
```js
|
|
84
|
-
|
|
84
|
+
QuickBot.toggle()
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
You can bind these commands on a button element, for example:
|
|
88
88
|
|
|
89
89
|
```html
|
|
90
|
-
<button onclick="
|
|
90
|
+
<button onclick="QuickBot.open()">Contact us</button>
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
## Bubble
|
|
94
94
|
|
|
95
|
-
You can get the bubble HTML and Javascript code by clicking on the "
|
|
96
|
-
"
|
|
95
|
+
You can get the bubble HTML and Javascript code by clicking on the "Javascript" button in the
|
|
96
|
+
"Deploy" tab of your bot.
|
|
97
97
|
|
|
98
98
|
Here is an example:
|
|
99
99
|
|
|
100
100
|
```html
|
|
101
101
|
<script type="module">
|
|
102
|
-
import
|
|
102
|
+
import QuickBot from 'https://cdn.jsdelivr.net/npm/@urbiport/js@0.3/dist/web.js'
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
QuickBot.initBubble({
|
|
105
|
+
bot: 'my-bot',
|
|
106
106
|
previewMessage: {
|
|
107
107
|
message: 'I have a question for you!',
|
|
108
108
|
autoShowDelay: 5000,
|
|
109
109
|
avatarUrl: 'https://avatars.githubusercontent.com/u/6652831?v=4',
|
|
110
110
|
},
|
|
111
111
|
theme: {
|
|
112
|
-
button: { backgroundColor: '#
|
|
112
|
+
button: { backgroundColor: '#01a952', iconColor: '#FFFFFF' },
|
|
113
113
|
previewMessage: { backgroundColor: '#ffffff', textColor: 'black' },
|
|
114
114
|
chatWindow: { backgroundColor: '#ffffff' },
|
|
115
115
|
},
|
|
@@ -124,33 +124,33 @@ This code will show the bubble and let a preview message appear after 5 seconds.
|
|
|
124
124
|
You can use these commands:
|
|
125
125
|
|
|
126
126
|
```js
|
|
127
|
-
|
|
127
|
+
QuickBot.showPreviewMessage()
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
```js
|
|
131
|
-
|
|
131
|
+
QuickBot.hidePreviewMessage()
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
### Open or close the
|
|
134
|
+
### Open or close the bot
|
|
135
135
|
|
|
136
136
|
You can use these commands:
|
|
137
137
|
|
|
138
138
|
```js
|
|
139
|
-
|
|
139
|
+
QuickBot.open()
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
```js
|
|
143
|
-
|
|
143
|
+
QuickBot.close()
|
|
144
144
|
```
|
|
145
145
|
|
|
146
146
|
```js
|
|
147
|
-
|
|
147
|
+
QuickBot.toggle()
|
|
148
148
|
```
|
|
149
149
|
|
|
150
150
|
You can bind these commands on a button element, for example:
|
|
151
151
|
|
|
152
152
|
```html
|
|
153
|
-
<button onclick="
|
|
153
|
+
<button onclick="QuickBot.open()">Contact us</button>
|
|
154
154
|
```
|
|
155
155
|
|
|
156
156
|
## Additional configuration
|
|
@@ -159,18 +159,18 @@ You can prefill the bot variable values in your embed code by adding the `prefil
|
|
|
159
159
|
option. Here is an example:
|
|
160
160
|
|
|
161
161
|
```js
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
QuickBot.initStandard({
|
|
163
|
+
bot: 'my-bot',
|
|
164
164
|
prefilledVariables: {
|
|
165
|
-
'Current URL': 'https://my-site/account',
|
|
165
|
+
'Current URL': 'https://my-site.com/account',
|
|
166
166
|
'User name': 'Francisco',
|
|
167
167
|
},
|
|
168
168
|
})
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
-
It will prefill the `Current URL` variable with "https://my-site/account" and the `User name`
|
|
171
|
+
It will prefill the `Current URL` variable with "https://my-site.com/account" and the `User name`
|
|
172
172
|
variable with "Francisco". More info about variables: [here](/editor/variables).
|
|
173
173
|
|
|
174
174
|
Note that if your site URL contains query params (i.e. https://quick.bot?User%20name=John%20Doe),
|
|
175
|
-
the variables will automatically be injected to the
|
|
175
|
+
the variables will automatically be injected to the bot. So you don't need to manually transfer
|
|
176
176
|
query params to the bot embed configuration.
|
package/dist/components/Bot.d.ts
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { OutgoingLog } from '@/types';
|
|
2
|
-
import {
|
|
2
|
+
import { ThemeFontProps, StartFrom } from '@quickbot.io/schemas';
|
|
3
3
|
export type BotProps = {
|
|
4
|
-
|
|
4
|
+
bot: string | any;
|
|
5
5
|
isPreview?: boolean;
|
|
6
6
|
resultId?: string;
|
|
7
7
|
prefilledVariables?: Record<string, unknown>;
|
|
8
8
|
apiHost?: string;
|
|
9
|
-
font?:
|
|
9
|
+
font?: ThemeFontProps;
|
|
10
10
|
progressBarRef?: HTMLDivElement;
|
|
11
11
|
startFrom?: StartFrom;
|
|
12
12
|
sessionId?: string;
|
|
13
|
-
|
|
13
|
+
onNewBlock?: (block: {
|
|
14
|
+
id: string;
|
|
15
|
+
type: string;
|
|
16
|
+
}) => void;
|
|
14
17
|
onAnswer?: (answer: {
|
|
15
18
|
message: string;
|
|
16
19
|
blockId: string;
|
|
@@ -19,6 +22,7 @@ export type BotProps = {
|
|
|
19
22
|
onEnd?: () => void;
|
|
20
23
|
onNewLogs?: (logs: OutgoingLog[]) => void;
|
|
21
24
|
onChatStatePersisted?: (isEnabled: boolean) => void;
|
|
25
|
+
onBubblesDisplayed?: () => void;
|
|
22
26
|
};
|
|
23
27
|
export declare const Bot: (props: BotProps & {
|
|
24
28
|
class?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bot.d.ts","sourceRoot":"","sources":["../../src/components/Bot.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Bot.d.ts","sourceRoot":"","sources":["../../src/components/Bot.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAc,WAAW,EAAE,MAAM,SAAS,CAAA;AAWjD,OAAO,EAAE,cAAc,EAAqB,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAoBnF,MAAM,MAAM,QAAQ,GAAG;IAErB,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IAC1D,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IACjE,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;IAClB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,IAAI,CAAA;IACzC,oBAAoB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;IACnD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,GAAG,UAAW,QAAQ,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,mCA8MvD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,GAAG,EAAoB,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,GAAG,EAAoB,MAAM,UAAU,CAAA;AAI1D,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,GAAG,GAAG,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAA;AAE/C,eAAO,MAAM,MAAM,UAAW,KAAK,gBAoBlC,CAAA"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { JSX } from 'solid-js/jsx-runtime';
|
|
2
|
-
type
|
|
2
|
+
type SubmitButtonProps = {
|
|
3
3
|
isDisabled?: boolean;
|
|
4
4
|
isLoading?: boolean;
|
|
5
|
-
disableIcon?: boolean;
|
|
6
5
|
class?: string;
|
|
7
6
|
} & JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
8
|
-
export declare const
|
|
7
|
+
export declare const ButtonSubmit: (props: SubmitButtonProps) => JSX.Element;
|
|
9
8
|
export {};
|
|
10
|
-
//# sourceMappingURL=
|
|
9
|
+
//# sourceMappingURL=ButtonSubmit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonSubmit.d.ts","sourceRoot":"","sources":["../../src/components/ButtonSubmit.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAM1C,KAAK,iBAAiB,GAAG;IACvB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,GAAG,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAA;AAE/C,eAAO,MAAM,YAAY,UAAW,iBAAiB,gBAoBpD,CAAA"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type { ContinueChatResponse,
|
|
1
|
+
import type { ContinueChatResponse, ThemeChatProps } from '@quickbot.io/schemas';
|
|
2
2
|
import { BotContext, InputSubmitContent } from '@/types';
|
|
3
3
|
type Props = {
|
|
4
|
-
ref: HTMLDivElement | undefined;
|
|
5
4
|
block: NonNullable<ContinueChatResponse['input']>;
|
|
6
5
|
hasHostAvatar: boolean;
|
|
7
|
-
guestAvatar?: NonNullable<
|
|
6
|
+
guestAvatar?: NonNullable<ThemeChatProps>['guestAvatar'];
|
|
8
7
|
chunkIndex: number;
|
|
9
8
|
context: BotContext;
|
|
10
9
|
isInputPrefillEnabled: boolean;
|
|
@@ -13,6 +12,6 @@ type Props = {
|
|
|
13
12
|
onSubmit: (content: InputSubmitContent) => void;
|
|
14
13
|
onSkip: () => void;
|
|
15
14
|
};
|
|
16
|
-
export declare const
|
|
15
|
+
export declare const ChatInputFooter: (props: Props) => import("solid-js").JSX.Element;
|
|
17
16
|
export {};
|
|
18
|
-
//# sourceMappingURL=
|
|
17
|
+
//# sourceMappingURL=ChatInputFooter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatInputFooter.d.ts","sourceRoot":"","sources":["../../src/components/ChatInputFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EAWpB,cAAc,EACf,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAsBxD,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,WAAW,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAA;IACjD,aAAa,EAAE,OAAO,CAAA;IACtB,WAAW,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC,aAAa,CAAC,CAAA;IACxD,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,UAAU,CAAA;IACnB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,QAAQ,EAAE,OAAO,CAAA;IACjB,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,QAAQ,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAC/C,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,eAAe,UAAW,KAAK,mCAwL3C,CAAA"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StartChatResponse } from '@quickbot.io/schemas';
|
|
2
2
|
import { BotContext, OutgoingLog } from '@/types';
|
|
3
3
|
type Props = {
|
|
4
|
+
botContainer: HTMLDivElement | undefined;
|
|
4
5
|
initialChatReply: StartChatResponse;
|
|
5
6
|
context: BotContext;
|
|
6
|
-
|
|
7
|
+
onNewBlock?: (block: {
|
|
8
|
+
id: string;
|
|
9
|
+
type: string;
|
|
10
|
+
}) => void;
|
|
7
11
|
onAnswer?: (answer: {
|
|
8
12
|
message: string;
|
|
9
13
|
blockId: string;
|
|
@@ -11,6 +15,7 @@ type Props = {
|
|
|
11
15
|
onEnd?: () => void;
|
|
12
16
|
onNewLogs?: (logs: OutgoingLog[]) => void;
|
|
13
17
|
onProgressUpdate?: (progress: number) => void;
|
|
18
|
+
onBubblesDisplayed?: () => void;
|
|
14
19
|
};
|
|
15
20
|
export declare const ConversationContainer: (props: Props) => import("solid-js").JSX.Element;
|
|
16
21
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationContainer.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/ConversationContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ConversationContainer.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/ConversationContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAC,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAKjD,KAAK,KAAK,GAAG;IACX,YAAY,EAAE,cAAc,GAAG,SAAS,CAAA;IACxC,gBAAgB,EAAE,iBAAiB,CAAA;IACnC,OAAO,EAAE,UAAU,CAAA;IACnB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IAC1D,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IACjE,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;IAClB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,IAAI,CAAA;IACzC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,qBAAqB,UAAW,KAAK,mCASjD,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StartChatResponse } from '@quickbot.io/schemas';
|
|
2
|
+
import { BotContext } from '@/types';
|
|
3
|
+
type Props = {
|
|
4
|
+
initialChatReply: StartChatResponse;
|
|
5
|
+
context: BotContext;
|
|
6
|
+
onEnd?: () => void;
|
|
7
|
+
onNewBlock?: (block: {
|
|
8
|
+
id: string;
|
|
9
|
+
type: string;
|
|
10
|
+
}) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const ConversationContainerBody: (props: Props) => import("solid-js").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=ConversationContainerBody.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConversationContainerBody.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/ConversationContainerBody.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAGxD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AASpC,KAAK,KAAK,GAAG;IACX,gBAAgB,EAAE,iBAAiB,CAAA;IACnC,OAAO,EAAE,UAAU,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;IAClB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CAC3D,CAAA;AAED,eAAO,MAAM,yBAAyB,UAAW,KAAK,mCAkIrD,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StartChatResponse } from '@quickbot.io/schemas';
|
|
2
|
+
import { BotContext, OutgoingLog } from '@/types';
|
|
3
|
+
type Props = {
|
|
4
|
+
botContainer: HTMLDivElement | undefined;
|
|
5
|
+
initialChatReply: StartChatResponse;
|
|
6
|
+
context: BotContext;
|
|
7
|
+
onAnswer?: (answer: {
|
|
8
|
+
message: string;
|
|
9
|
+
blockId: string;
|
|
10
|
+
}) => void;
|
|
11
|
+
onEnd?: () => void;
|
|
12
|
+
onNewLogs?: (logs: OutgoingLog[]) => void;
|
|
13
|
+
onProgressUpdate?: (progress: number) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare const ConversationContainerFooter: (props: Props) => import("solid-js").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=ConversationContainerFooter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConversationContainerFooter.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/ConversationContainerFooter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAExD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAMjD,KAAK,KAAK,GAAG;IACX,YAAY,EAAE,cAAc,GAAG,SAAS,CAAA;IACxC,gBAAgB,EAAE,iBAAiB,CAAA;IACnC,OAAO,EAAE,UAAU,CAAA;IACnB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IACjE,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;IAClB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,IAAI,CAAA;IACzC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9C,CAAA;AAED,eAAO,MAAM,2BAA2B,UAAW,KAAK,mCA2DvD,CAAA"}
|
package/dist/components/ConversationContainer/{ChatChunk.d.ts → ConversationMessageChunk.d.ts}
RENAMED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { InputSubmitContent, BotContext, ChatChunk as ChatChunkType } from '@/types';
|
|
2
|
-
import { ContinueChatResponse, Settings,
|
|
2
|
+
import { ContinueChatResponse, Settings, ThemeProps } from '@quickbot.io/schemas';
|
|
3
3
|
type Props = Pick<ContinueChatResponse, 'messages' | 'input'> & {
|
|
4
|
-
|
|
4
|
+
blockRef: HTMLDivElement | undefined;
|
|
5
|
+
theme: ThemeProps;
|
|
5
6
|
settings: Settings;
|
|
6
7
|
index: number;
|
|
7
8
|
context: BotContext;
|
|
@@ -15,6 +16,6 @@ type Props = Pick<ContinueChatResponse, 'messages' | 'input'> & {
|
|
|
15
16
|
onSkip: () => void;
|
|
16
17
|
onAllBubblesDisplayed: () => void;
|
|
17
18
|
};
|
|
18
|
-
export declare const
|
|
19
|
+
export declare const ConversationMessageChunk: (props: Props) => import("solid-js").JSX.Element;
|
|
19
20
|
export {};
|
|
20
|
-
//# sourceMappingURL=
|
|
21
|
+
//# sourceMappingURL=ConversationMessageChunk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConversationMessageChunk.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/ConversationMessageChunk.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,SAAS,CAAA;AAEpF,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAcjF,KAAK,KAAK,GAAG,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG;IAC9D,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,KAAK,EAAE,UAAU,CAAA;IACjB,QAAQ,EAAE,QAAQ,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,UAAU,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,UAAU,EAAE,OAAO,CAAA;IACnB,kBAAkB,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAA;IACvD,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,oBAAoB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACxD,gBAAgB,EAAE,CAAC,GAAG,CAAC,EAAE,cAAc,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACjE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAC/C,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,qBAAqB,EAAE,MAAM,IAAI,CAAA;CAClC,CAAA;AAED,eAAO,MAAM,wBAAwB,UAAW,KAAK,mCAwIpD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConversationPopupBlockedToast.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/ConversationPopupBlockedToast.tsx"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG;IACX,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,IAAI,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,6BAA6B,UAAW,KAAK,mCAmDzD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConversationProgressBar.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/ConversationProgressBar.tsx"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,eAAO,MAAM,uBAAuB,UAAW,KAAK,mCASnD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HostAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/HostAvatar.tsx"],"names":[],"mappings":"AAIA,KAAK,KAAK,GAAG;IACX,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B,CAAA;AAED,eAAO,MAAM,UAAU,UAAW,KAAK,mCA6CtC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ContinueChatResponse, ThemeChatProps } from '@quickbot.io/schemas';
|
|
2
|
+
import { BotContext } from '@/types';
|
|
3
|
+
type Props = {
|
|
4
|
+
ref: HTMLDivElement | undefined;
|
|
5
|
+
block: NonNullable<ContinueChatResponse['input']>;
|
|
6
|
+
hasHostAvatar: boolean;
|
|
7
|
+
guestAvatar?: NonNullable<ThemeChatProps>['guestAvatar'];
|
|
8
|
+
chunkIndex: number;
|
|
9
|
+
context: BotContext;
|
|
10
|
+
isInputPrefillEnabled: boolean;
|
|
11
|
+
hasError: boolean;
|
|
12
|
+
onTransitionEnd: () => void;
|
|
13
|
+
onSubmit: (content: any) => void;
|
|
14
|
+
onSkip: () => void;
|
|
15
|
+
};
|
|
16
|
+
export declare const InputAnswer: (props: Props) => import("solid-js").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=InputAnswer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputAnswer.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/InputAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEhF,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAKpC,KAAK,KAAK,GAAG;IACX,GAAG,EAAE,cAAc,GAAG,SAAS,CAAA;IAC/B,KAAK,EAAE,WAAW,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAA;IACjD,aAAa,EAAE,OAAO,CAAA;IACtB,WAAW,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC,aAAa,CAAC,CAAA;IACxD,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,UAAU,CAAA;IACnB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,QAAQ,EAAE,OAAO,CAAA;IACjB,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,QAAQ,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAA;IAChC,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,WAAW,UAAW,KAAK,mCAiBvC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InputSubmitContent } from '@/types';
|
|
2
|
+
import { ContinueChatResponse, Message, ThemeProps } from '@quickbot.io/schemas';
|
|
3
|
+
export declare const convertSubmitContentToMessage: (answer: InputSubmitContent | undefined) => Message | undefined;
|
|
4
|
+
export declare const autoScrollToBottom: (containerElement: HTMLDivElement | undefined, lastElement?: HTMLDivElement, offset?: number, autoScrollBottomToleranceScreenPercent?: number, bottomSpacerHeight?: number) => void;
|
|
5
|
+
export declare const parseDynamicTheme: (initialTheme: ThemeProps, dynamicTheme: ContinueChatResponse['dynamicTheme']) => ThemeProps;
|
|
6
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEhF,eAAO,MAAM,6BAA6B,WAChC,kBAAkB,GAAG,SAAS,KACrC,OAAO,GAAG,SASZ,CAAA;AAED,eAAO,MAAM,kBAAkB,qBACX,cAAc,GAAG,SAAS,gBAC9B,cAAc,wGAsB7B,CAAA;AAED,eAAO,MAAM,iBAAiB,iBACd,UAAU,gBACV,oBAAoB,CAAC,cAAc,CAAC,KACjD,UAmBD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FooterEndConversation.d.ts","sourceRoot":"","sources":["../../src/components/FooterEndConversation.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,sCAQjC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FooterLiteBadge.d.ts","sourceRoot":"","sources":["../../src/components/FooterLiteBadge.tsx"],"names":[],"mappings":"AAGA,KAAK,KAAK,GAAG;IACX,YAAY,EAAE,cAAc,GAAG,SAAS,CAAA;CACzC,CAAA;AAED,eAAO,MAAM,eAAe,UAAW,KAAK,mCAyC3C,CAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Accessor, JSX } from 'solid-js';
|
|
2
|
+
import { ContinueChatResponse, ThemeProps, StartChatResponse } from '@quickbot.io/schemas';
|
|
3
|
+
import { BotContext, ChatChunk as ChatChunkType, InputSubmitContent, OutgoingLog } from '@/types';
|
|
4
|
+
type InputAnswerContextType = {
|
|
5
|
+
chatChunks: Accessor<ChatChunkType[]>;
|
|
6
|
+
theme: Accessor<ThemeProps>;
|
|
7
|
+
dynamicTheme: Accessor<ContinueChatResponse['dynamicTheme']>;
|
|
8
|
+
setTheme: (theme: ThemeProps) => void;
|
|
9
|
+
hasError: Accessor<boolean>;
|
|
10
|
+
setHasError: (hasError: boolean) => void;
|
|
11
|
+
isSending: Accessor<boolean>;
|
|
12
|
+
blockedPopupUrl: Accessor<string | undefined>;
|
|
13
|
+
setBlockedPopupUrl: (url: string | undefined) => void;
|
|
14
|
+
blockRef: HTMLDivElement | undefined;
|
|
15
|
+
currentBlock: () => ChatChunkType | undefined;
|
|
16
|
+
answers: Accessor<Record<number, InputSubmitContent | undefined>>;
|
|
17
|
+
setAnswer: (chunkIndex: number, content: InputSubmitContent | undefined) => void;
|
|
18
|
+
getAnswer: (chunkIndex: number) => InputSubmitContent | undefined;
|
|
19
|
+
displayedMessageIndexes: Accessor<Record<number, number>>;
|
|
20
|
+
setDisplayedMessageIndex: (chunkIndex: number, index: number) => void;
|
|
21
|
+
getDisplayedMessageIndex: (chunkIndex: number) => number;
|
|
22
|
+
sendMessage: (answer?: InputSubmitContent) => Promise<void>;
|
|
23
|
+
processClientSideActions: (actions: NonNullable<ContinueChatResponse['clientSideActions']>) => Promise<void>;
|
|
24
|
+
onBubblesDisplayed: () => void;
|
|
25
|
+
};
|
|
26
|
+
type Props = {
|
|
27
|
+
children: JSX.Element;
|
|
28
|
+
initialChatReply: StartChatResponse;
|
|
29
|
+
context: BotContext;
|
|
30
|
+
onNewBlock?: (block: {
|
|
31
|
+
id: string;
|
|
32
|
+
type: string;
|
|
33
|
+
}) => void;
|
|
34
|
+
onAnswer?: (answer: {
|
|
35
|
+
message: string;
|
|
36
|
+
blockId: string;
|
|
37
|
+
}) => void;
|
|
38
|
+
onEnd?: () => void;
|
|
39
|
+
onNewLogs?: (logs: OutgoingLog[]) => void;
|
|
40
|
+
onProgressUpdate?: (progress: number) => void;
|
|
41
|
+
onBubblesDisplayed?: () => void;
|
|
42
|
+
};
|
|
43
|
+
export declare const InputAnswerProvider: (props: Props) => JSX.Element;
|
|
44
|
+
export declare const useInputAnswer: () => InputAnswerContextType;
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=InputAnswerContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputAnswerContext.d.ts","sourceRoot":"","sources":["../../src/components/InputAnswerContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,QAAQ,EACR,GAAG,EAEJ,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,oBAAoB,EACpB,UAAU,EAEV,iBAAiB,EAElB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,SAAS,IAAI,aAAa,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAejG,KAAK,sBAAsB,GAAG;IAC5B,UAAU,EAAE,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAA;IACrC,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAA;IAC3B,YAAY,EAAE,QAAQ,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC,CAAA;IAC5D,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;IACrC,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC3B,WAAW,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAA;IACxC,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC5B,eAAe,EAAE,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC7C,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAA;IACrD,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,YAAY,EAAE,MAAM,aAAa,GAAG,SAAS,CAAA;IAC7C,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,SAAS,CAAC,CAAC,CAAA;IACjE,SAAS,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,SAAS,KAAK,IAAI,CAAA;IAChF,SAAS,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,kBAAkB,GAAG,SAAS,CAAA;IACjE,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACzD,wBAAwB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACrE,wBAAwB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAA;IACxD,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE,kBAAkB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3D,wBAAwB,EAAE,CACxB,OAAO,EAAE,WAAW,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,CAAC,KAC5D,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,CAAA;AAED,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAA;IACrB,gBAAgB,EAAE,iBAAiB,CAAA;IACnC,OAAO,EAAE,UAAU,CAAA;IACnB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IAC1D,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IACjE,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;IAClB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,IAAI,CAAA;IACzC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC,CAAA;AAID,eAAO,MAAM,mBAAmB,UAAW,KAAK,gBAgU/C,CAAA;AAED,eAAO,MAAM,cAAc,8BAM1B,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
interface InputFormLayoutProps {
|
|
3
|
+
children: JSX.Element;
|
|
4
|
+
onSubmit: () => void;
|
|
5
|
+
buttonLabel?: string;
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
class?: string;
|
|
8
|
+
customButton?: JSX.Element;
|
|
9
|
+
isInputDisabled?: () => boolean;
|
|
10
|
+
hasError?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Common layout component for input forms
|
|
14
|
+
* Provides consistent structure and styling for all input components
|
|
15
|
+
* Always uses a form element to normalize submit behavior
|
|
16
|
+
*/
|
|
17
|
+
export declare const InputFormLayout: (props: InputFormLayoutProps) => JSX.Element;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=InputFormLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputFormLayout.d.ts","sourceRoot":"","sources":["../../src/components/InputFormLayout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAQ,MAAM,UAAU,CAAA;AAGpC,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAA;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IAC1B,eAAe,CAAC,EAAE,MAAM,OAAO,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,UAAW,oBAAoB,gBA4C1D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../src/components/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../src/components/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAG9B,eAAO,MAAM,OAAO,UAAW,IAAI,gBAAgB,CAAC,aAAa,CAAC,gBAgBjE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvatarPlaceholder.d.ts","sourceRoot":"","sources":["../../../src/components/avatars/AvatarPlaceholder.tsx"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,eAAO,MAAM,iBAAiB,wBAAwB,KAAK,mCAsB1D,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InputSubmitContent } from '@/types';
|
|
2
|
-
import type { ChatMessage, Settings } from '@
|
|
2
|
+
import type { ChatMessage, Settings } from '@quickbot.io/schemas';
|
|
3
3
|
type Props = {
|
|
4
4
|
message: ChatMessage;
|
|
5
5
|
typingEmulation: Settings['typingEmulation'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HostBubble.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/HostBubble.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HostBubble.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/HostBubble.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,KAAK,EAEV,WAAW,EAGX,QAAQ,EAGT,MAAM,sBAAsB,CAAA;AAI7B,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,WAAW,CAAA;IACpB,eAAe,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAA;IAC5C,eAAe,EAAE,OAAO,CAAA;IACxB,eAAe,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,cAAc,KAAK,IAAI,CAAA;IAChD,WAAW,EAAE,CAAC,KAAK,CAAC,EAAE,kBAAkB,KAAK,IAAI,CAAA;CAClD,CAAA;AAED,eAAO,MAAM,UAAU,UAAW,KAAK,mCAoCtC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BotContext } from '@/types';
|
|
2
|
+
type Props = {
|
|
3
|
+
streamingMessageId: string;
|
|
4
|
+
context: BotContext;
|
|
5
|
+
};
|
|
6
|
+
export declare const HostBubbleStreaming: (props: Props) => import("solid-js").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=HostBubbleStreaming.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HostBubbleStreaming.d.ts","sourceRoot":"","sources":["../../../src/components/bubbles/HostBubbleStreaming.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGpC,KAAK,KAAK,GAAG;IACX,kBAAkB,EAAE,MAAM,CAAA;IAC1B,OAAO,EAAE,UAAU,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,mBAAmB,UAAW,KAAK,mCAsD/C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogoIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/LogoIcon.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,sCAoCpB,CAAA"}
|