@urbiport/js 0.0.1 → 0.0.12
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 +45 -38
- package/dist/components/Bot.d.ts +3 -3
- 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/ConversationContainer/ChatChunk.d.ts +2 -1
- package/dist/components/ConversationContainer/ChatChunk.d.ts.map +1 -1
- package/dist/components/ConversationContainer/ChatChunkFooter.d.ts +20 -0
- package/dist/components/ConversationContainer/ChatChunkFooter.d.ts.map +1 -0
- package/dist/components/ConversationContainer/ConversationContainer.d.ts +3 -2
- package/dist/components/ConversationContainer/ConversationContainer.d.ts.map +1 -1
- package/dist/components/ConversationContainer/ConversationContainerBody.d.ts +10 -0
- package/dist/components/ConversationContainer/ConversationContainerBody.d.ts.map +1 -0
- package/dist/components/ConversationContainer/ConversationContainerFooter.d.ts +18 -0
- package/dist/components/ConversationContainer/ConversationContainerFooter.d.ts.map +1 -0
- package/dist/components/ConversationContainer/InputAnswerContext.d.ts +13 -0
- package/dist/components/ConversationContainer/InputAnswerContext.d.ts.map +1 -0
- package/dist/components/ConversationContainer/LoadingChunk.d.ts +1 -1
- package/dist/components/ConversationContainer/LoadingChunk.d.ts.map +1 -1
- package/dist/components/ConversationContainer/PopupBlockedToast.d.ts.map +1 -1
- 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 +41 -0
- package/dist/components/InputAnswerContext.d.ts.map +1 -0
- package/dist/components/InputChatBlock.d.ts +1 -1
- package/dist/components/InputChatBlock.d.ts.map +1 -1
- package/dist/components/InputChatBlockFooter copy.d.ts +17 -0
- package/dist/components/InputChatBlockFooter copy.d.ts.map +1 -0
- package/dist/components/InputChatBlockFooter.d.ts +17 -0
- package/dist/components/InputChatBlockFooter.d.ts.map +1 -0
- package/dist/components/InputChatBlockFooterShow.d.ts +13 -0
- package/dist/components/InputChatBlockFooterShow.d.ts.map +1 -0
- package/dist/components/InputFormLayout.d.ts +17 -0
- package/dist/components/InputFormLayout.d.ts.map +1 -0
- package/dist/components/SendButton.d.ts +0 -1
- package/dist/components/SendButton.d.ts.map +1 -1
- package/dist/components/Submit.d.ts +9 -0
- package/dist/components/Submit.d.ts.map +1 -0
- package/dist/components/SubmitButton.d.ts +9 -0
- package/dist/components/SubmitButton.d.ts.map +1 -0
- 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/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/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/inputs/Textarea.d.ts +2 -1
- package/dist/components/inputs/Textarea.d.ts.map +1 -1
- package/dist/constants/conversation.d.ts +4 -0
- package/dist/constants/conversation.d.ts.map +1 -0
- 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/CustomEmbedBubble.d.ts +1 -2
- package/dist/features/blocks/bubbles/embed/components/CustomEmbedBubble.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 +2 -1
- package/dist/features/blocks/inputs/buttons/components/Buttons.d.ts.map +1 -1
- package/dist/features/blocks/inputs/buttons/components/MultipleChoicesForm.d.ts +2 -1
- package/dist/features/blocks/inputs/buttons/components/MultipleChoicesForm.d.ts.map +1 -1
- 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 +1 -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/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/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/paymentInProgressStorage.d.ts +2 -2
- package/dist/features/blocks/inputs/payment/helpers/paymentInProgressStorage.d.ts.map +1 -1
- package/dist/features/blocks/inputs/phone/components/PhoneInput.d.ts +1 -1
- package/dist/features/blocks/inputs/phone/components/PhoneInput.d.ts.map +1 -1
- package/dist/features/blocks/inputs/pictureChoice/MultiplePictureChoice.d.ts +1 -1
- package/dist/features/blocks/inputs/pictureChoice/MultiplePictureChoice.d.ts.map +1 -1
- package/dist/features/blocks/inputs/pictureChoice/SinglePictureChoice.d.ts +1 -1
- package/dist/features/blocks/inputs/pictureChoice/SinglePictureChoice.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/components/TextInput copy.d.ts +11 -0
- package/dist/features/blocks/inputs/textInput/components/TextInput copy.d.ts.map +1 -0
- package/dist/features/blocks/inputs/textInput/components/TextInput.d.ts +2 -2
- package/dist/features/blocks/inputs/textInput/components/TextInput.d.ts.map +1 -1
- package/dist/features/blocks/inputs/textInput/components/VoiceRecorder.d.ts +1 -1
- package/dist/features/blocks/inputs/textInput/components/VoiceRecorder.d.ts.map +1 -1
- package/dist/features/blocks/inputs/textInput/index.d.ts +1 -1
- package/dist/features/blocks/inputs/textInput/index.d.ts.map +1 -1
- package/dist/features/blocks/inputs/url/components/UrlInput.d.ts +1 -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/googleAnalytics/utils/executeGoogleAnalytics.d.ts +1 -1
- package/dist/features/blocks/integrations/googleAnalytics/utils/executeGoogleAnalytics.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/setVariable/executeSetVariable.d.ts +1 -1
- package/dist/features/blocks/logic/setVariable/executeSetVariable.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/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 +17 -0
- 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.js +2 -2
- package/dist/lib/gtag.d.ts +1 -1
- package/dist/lib/gtag.d.ts.map +1 -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 +39 -128
- 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 +54 -142
- 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 +1 -1
- 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 +1 -1
- package/dist/utils/setCssVariablesValue.d.ts.map +1 -1
- package/dist/utils/storage.d.ts +58 -147
- 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 +8 -7
- package/dist/window.d.ts +6 -6
- package/dist/window.d.ts.map +1 -1
- package/package.json +10 -10
- package/tsconfig.build.json +23 -0
- 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/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/index.d.ts +0 -2
- package/dist/features/blocks/integrations/googleAnalytics/utils/index.d.ts.map +0 -1
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
|
|
|
@@ -9,55 +9,57 @@ Frontend library to embed typebots from [Typebot](https://quick.bot/).
|
|
|
9
9
|
To install, simply run:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npm install @
|
|
12
|
+
npm install @urbiport/js
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
### Directly in your HTML
|
|
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 "
|
|
31
|
+
You can get the standard HTML and Javascript code by clicking on the "Javascript" button in the
|
|
32
|
+
"Deploy" tab of your bot.
|
|
32
33
|
|
|
33
34
|
There, you can change the container dimensions. Here is a code example:
|
|
34
35
|
|
|
35
36
|
```html
|
|
36
37
|
<script type="module">
|
|
37
|
-
import
|
|
38
|
+
import QuickBot from 'https://cdn.jsdelivr.net/npm/@urbiport/js@0.3/dist/web.js'
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
QuickBot.initStandard({
|
|
41
|
+
bot: 'my-bot',
|
|
41
42
|
})
|
|
42
43
|
</script>
|
|
43
44
|
|
|
44
|
-
<
|
|
45
|
+
<quickbot-standard style="width: 100%; height: 600px; "></quickbot-standard>
|
|
45
46
|
```
|
|
46
47
|
|
|
47
48
|
This code is creating a container with a 100% width (will match parent width) and 600px height.
|
|
48
49
|
|
|
49
50
|
## Popup
|
|
50
51
|
|
|
51
|
-
You can get the popup HTML and Javascript code by clicking on the "
|
|
52
|
+
You can get the popup HTML and Javascript code by clicking on the "Javascript" button in the
|
|
53
|
+
"Deploy" tab of your bot.
|
|
52
54
|
|
|
53
55
|
Here is an example:
|
|
54
56
|
|
|
55
57
|
```html
|
|
56
58
|
<script type="module">
|
|
57
|
-
import
|
|
59
|
+
import QuickBot from 'https://cdn.jsdelivr.net/npm/@urbiport/js@0.3/dist/web.js'
|
|
58
60
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
QuickBot.initPopup({
|
|
62
|
+
bot: 'my-bot',
|
|
61
63
|
apiHost: 'http://localhost:3001',
|
|
62
64
|
autoShowDelay: 3000,
|
|
63
65
|
})
|
|
@@ -71,42 +73,43 @@ This code will automatically trigger the popup window after 3 seconds.
|
|
|
71
73
|
You can use these commands:
|
|
72
74
|
|
|
73
75
|
```js
|
|
74
|
-
|
|
76
|
+
QuickBot.open()
|
|
75
77
|
```
|
|
76
78
|
|
|
77
79
|
```js
|
|
78
|
-
|
|
80
|
+
QuickBot.close()
|
|
79
81
|
```
|
|
80
82
|
|
|
81
83
|
```js
|
|
82
|
-
|
|
84
|
+
QuickBot.toggle()
|
|
83
85
|
```
|
|
84
86
|
|
|
85
87
|
You can bind these commands on a button element, for example:
|
|
86
88
|
|
|
87
89
|
```html
|
|
88
|
-
<button onclick="
|
|
90
|
+
<button onclick="QuickBot.open()">Contact us</button>
|
|
89
91
|
```
|
|
90
92
|
|
|
91
93
|
## Bubble
|
|
92
94
|
|
|
93
|
-
You can get the bubble HTML and Javascript code by clicking on the "
|
|
95
|
+
You can get the bubble HTML and Javascript code by clicking on the "Javascript" button in the
|
|
96
|
+
"Deploy" tab of your bot.
|
|
94
97
|
|
|
95
98
|
Here is an example:
|
|
96
99
|
|
|
97
100
|
```html
|
|
98
101
|
<script type="module">
|
|
99
|
-
import
|
|
102
|
+
import QuickBot from 'https://cdn.jsdelivr.net/npm/@urbiport/js@0.3/dist/web.js'
|
|
100
103
|
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
QuickBot.initBubble({
|
|
105
|
+
bot: 'my-bot',
|
|
103
106
|
previewMessage: {
|
|
104
107
|
message: 'I have a question for you!',
|
|
105
108
|
autoShowDelay: 5000,
|
|
106
109
|
avatarUrl: 'https://avatars.githubusercontent.com/u/6652831?v=4',
|
|
107
110
|
},
|
|
108
111
|
theme: {
|
|
109
|
-
button: { backgroundColor: '#
|
|
112
|
+
button: { backgroundColor: '#01a952', iconColor: '#FFFFFF' },
|
|
110
113
|
previewMessage: { backgroundColor: '#ffffff', textColor: 'black' },
|
|
111
114
|
chatWindow: { backgroundColor: '#ffffff' },
|
|
112
115
|
},
|
|
@@ -121,49 +124,53 @@ This code will show the bubble and let a preview message appear after 5 seconds.
|
|
|
121
124
|
You can use these commands:
|
|
122
125
|
|
|
123
126
|
```js
|
|
124
|
-
|
|
127
|
+
QuickBot.showPreviewMessage()
|
|
125
128
|
```
|
|
126
129
|
|
|
127
130
|
```js
|
|
128
|
-
|
|
131
|
+
QuickBot.hidePreviewMessage()
|
|
129
132
|
```
|
|
130
133
|
|
|
131
|
-
### Open or close the
|
|
134
|
+
### Open or close the bot
|
|
132
135
|
|
|
133
136
|
You can use these commands:
|
|
134
137
|
|
|
135
138
|
```js
|
|
136
|
-
|
|
139
|
+
QuickBot.open()
|
|
137
140
|
```
|
|
138
141
|
|
|
139
142
|
```js
|
|
140
|
-
|
|
143
|
+
QuickBot.close()
|
|
141
144
|
```
|
|
142
145
|
|
|
143
146
|
```js
|
|
144
|
-
|
|
147
|
+
QuickBot.toggle()
|
|
145
148
|
```
|
|
146
149
|
|
|
147
150
|
You can bind these commands on a button element, for example:
|
|
148
151
|
|
|
149
152
|
```html
|
|
150
|
-
<button onclick="
|
|
153
|
+
<button onclick="QuickBot.open()">Contact us</button>
|
|
151
154
|
```
|
|
152
155
|
|
|
153
156
|
## Additional configuration
|
|
154
157
|
|
|
155
|
-
You can prefill the bot variable values in your embed code by adding the `prefilledVariables`
|
|
158
|
+
You can prefill the bot variable values in your embed code by adding the `prefilledVariables`
|
|
159
|
+
option. Here is an example:
|
|
156
160
|
|
|
157
161
|
```js
|
|
158
|
-
|
|
159
|
-
|
|
162
|
+
QuickBot.initStandard({
|
|
163
|
+
bot: 'my-bot',
|
|
160
164
|
prefilledVariables: {
|
|
161
|
-
'Current URL': 'https://my-site/account',
|
|
165
|
+
'Current URL': 'https://my-site.com/account',
|
|
162
166
|
'User name': 'Francisco',
|
|
163
167
|
},
|
|
164
168
|
})
|
|
165
169
|
```
|
|
166
170
|
|
|
167
|
-
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
|
+
variable with "Francisco". More info about variables: [here](/editor/variables).
|
|
168
173
|
|
|
169
|
-
Note that if your site URL contains query params (i.e. https://quick.bot?User%20name=John%20Doe),
|
|
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 bot. So you don't need to manually transfer
|
|
176
|
+
query params to the bot embed configuration.
|
package/dist/components/Bot.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OutgoingLog } from '@/types';
|
|
2
|
-
import { Font,
|
|
2
|
+
import { Font, StartFrom, ChatInputBlock } 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>;
|
|
@@ -10,7 +10,7 @@ export type BotProps = {
|
|
|
10
10
|
progressBarRef?: HTMLDivElement;
|
|
11
11
|
startFrom?: StartFrom;
|
|
12
12
|
sessionId?: string;
|
|
13
|
-
onNewInputBlock?: (inputBlock:
|
|
13
|
+
onNewInputBlock?: (inputBlock: ChatInputBlock) => void;
|
|
14
14
|
onAnswer?: (answer: {
|
|
15
15
|
message: string;
|
|
16
16
|
blockId: 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":[],"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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,6 +1,7 @@
|
|
|
1
1
|
import { InputSubmitContent, BotContext, ChatChunk as ChatChunkType } from '@/types';
|
|
2
|
-
import { ContinueChatResponse, Settings, Theme } from '@
|
|
2
|
+
import { ContinueChatResponse, Settings, Theme } from '@quickbot.io/schemas';
|
|
3
3
|
type Props = Pick<ContinueChatResponse, 'messages' | 'input'> & {
|
|
4
|
+
blockRef: HTMLDivElement | undefined;
|
|
4
5
|
theme: Theme;
|
|
5
6
|
settings: Settings;
|
|
6
7
|
index: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatChunk.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/ChatChunk.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,SAAS,CAAA;AAEpF,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ChatChunk.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/ChatChunk.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,SAAS,CAAA;AAEpF,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAa5E,KAAK,KAAK,GAAG,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG;IAC9D,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,KAAK,EAAE,KAAK,CAAA;IACZ,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,SAAS,UAAW,KAAK,mCA2IrC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { InputSubmitContent, BotContext, ChatChunk as ChatChunkType } from '@/types';
|
|
2
|
+
import { ContinueChatResponse, Settings, Theme } from '@quickbot.io/schemas';
|
|
3
|
+
type Props = Pick<ContinueChatResponse, 'messages' | 'input'> & {
|
|
4
|
+
theme: Theme;
|
|
5
|
+
settings: Settings;
|
|
6
|
+
index: number;
|
|
7
|
+
context: BotContext;
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
hideAvatar: boolean;
|
|
10
|
+
streamingMessageId: ChatChunkType['streamingMessageId'];
|
|
11
|
+
isTransitionDisabled?: boolean;
|
|
12
|
+
onNewBubbleDisplayed: (blockId: string) => Promise<void>;
|
|
13
|
+
onScrollToBottom: (ref?: HTMLDivElement, offset?: number) => void;
|
|
14
|
+
onSubmit: (answer?: InputSubmitContent) => void;
|
|
15
|
+
onSkip: () => void;
|
|
16
|
+
onAllBubblesDisplayed: () => void;
|
|
17
|
+
};
|
|
18
|
+
export declare const ChatChunkFooter: (props: Props) => import("solid-js").JSX.Element;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=ChatChunkFooter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatChunkFooter.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/ChatChunkFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,SAAS,CAAA;AAEpF,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAa5E,KAAK,KAAK,GAAG,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG;IAC9D,KAAK,EAAE,KAAK,CAAA;IACZ,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,eAAe,UAAW,KAAK,mCA4I3C,CAAA"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StartChatResponse, ChatInputBlock } 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
|
-
onNewInputBlock?: (inputBlock:
|
|
7
|
+
onNewInputBlock?: (inputBlock: ChatInputBlock) => void;
|
|
7
8
|
onAnswer?: (answer: {
|
|
8
9
|
message: string;
|
|
9
10
|
blockId: string;
|
|
@@ -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,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACxE,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,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,CAAA;IACtD,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,qBAAqB,UAAW,KAAK,mCAOjD,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
};
|
|
8
|
+
export declare const ConversationContainerBody: (props: Props) => import("solid-js").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# 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;AAMpC,KAAK,KAAK,GAAG;IACX,gBAAgB,EAAE,iBAAiB,CAAA;IACnC,OAAO,EAAE,UAAU,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,yBAAyB,UAAW,KAAK,mCA6FrD,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InputBlock, 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
|
+
onNewInputBlock?: (inputBlock: InputBlock) => void;
|
|
8
|
+
onAnswer?: (answer: {
|
|
9
|
+
message: string;
|
|
10
|
+
blockId: string;
|
|
11
|
+
}) => void;
|
|
12
|
+
onEnd?: () => void;
|
|
13
|
+
onNewLogs?: (logs: OutgoingLog[]) => void;
|
|
14
|
+
onProgressUpdate?: (progress: number) => void;
|
|
15
|
+
};
|
|
16
|
+
export declare const ConversationContainerFooter: (props: Props) => import("solid-js").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# 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,EAAwB,UAAU,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE1F,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAOjD,KAAK,KAAK,GAAG;IACX,YAAY,EAAE,cAAc,GAAG,SAAS,CAAA;IACxC,gBAAgB,EAAE,iBAAiB,CAAA;IACnC,OAAO,EAAE,UAAU,CAAA;IACnB,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAA;IAClD,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,mCAsDvD,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Accessor, JSX } from 'solid-js';
|
|
2
|
+
import { InputSubmitContent } from '@/types';
|
|
3
|
+
type ConversationContextType = {
|
|
4
|
+
answers: Accessor<Record<number, InputSubmitContent | undefined>>;
|
|
5
|
+
setAnswer: (chunkIndex: number, content: InputSubmitContent | undefined) => void;
|
|
6
|
+
getAnswer: (chunkIndex: number) => InputSubmitContent | undefined;
|
|
7
|
+
};
|
|
8
|
+
export declare const InputAnswerProvider: (props: {
|
|
9
|
+
children: JSX.Element;
|
|
10
|
+
}) => JSX.Element;
|
|
11
|
+
export declare const useInputAnswer: () => ConversationContextType;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=InputAnswerContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputAnswerContext.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/InputAnswerContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2C,QAAQ,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAE5C,KAAK,uBAAuB,GAAG;IAC7B,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;CAClE,CAAA;AAID,eAAO,MAAM,mBAAmB,UAAW;IAAE,QAAQ,EAAE,WAAW,CAAA;CAAE,gBAmBnE,CAAA;AAED,eAAO,MAAM,cAAc,+BAM1B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingChunk.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/LoadingChunk.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"LoadingChunk.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/LoadingChunk.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAM5C,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED,eAAO,MAAM,YAAY,UAAW,KAAK,mCAWxC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopupBlockedToast.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/PopupBlockedToast.tsx"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG;IACX,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,IAAI,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,iBAAiB,UAAW,KAAK,
|
|
1
|
+
{"version":3,"file":"PopupBlockedToast.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationContainer/PopupBlockedToast.tsx"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG;IACX,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,IAAI,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,iBAAiB,UAAW,KAAK,mCAmD7C,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InputSubmitContent } from '@/types';
|
|
2
|
+
import { ContinueChatResponse, Message, Theme } 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: Theme, dynamicTheme: ContinueChatResponse['dynamicTheme']) => Theme;
|
|
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,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE3E,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,KAAK,gBACL,oBAAoB,CAAC,cAAc,CAAC,KACjD,KAmBD,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,41 @@
|
|
|
1
|
+
import { Accessor, JSX } from 'solid-js';
|
|
2
|
+
import { ContinueChatResponse, Theme, StartChatResponse, ChatInputBlock } from '@quickbot.io/schemas';
|
|
3
|
+
import { BotContext, ChatChunk as ChatChunkType, InputSubmitContent, OutgoingLog } from '@/types';
|
|
4
|
+
type InputAnswerContextType = {
|
|
5
|
+
chatChunks: Accessor<ChatChunkType[]>;
|
|
6
|
+
theme: Accessor<Theme>;
|
|
7
|
+
dynamicTheme: Accessor<ContinueChatResponse['dynamicTheme']>;
|
|
8
|
+
setTheme: (theme: Theme) => 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
|
+
};
|
|
25
|
+
type Props = {
|
|
26
|
+
children: JSX.Element;
|
|
27
|
+
initialChatReply: StartChatResponse;
|
|
28
|
+
context: BotContext;
|
|
29
|
+
onNewInputBlock?: (inputBlock: ChatInputBlock) => void;
|
|
30
|
+
onAnswer?: (answer: {
|
|
31
|
+
message: string;
|
|
32
|
+
blockId: string;
|
|
33
|
+
}) => void;
|
|
34
|
+
onEnd?: () => void;
|
|
35
|
+
onNewLogs?: (logs: OutgoingLog[]) => void;
|
|
36
|
+
onProgressUpdate?: (progress: number) => void;
|
|
37
|
+
};
|
|
38
|
+
export declare const InputAnswerProvider: (props: Props) => JSX.Element;
|
|
39
|
+
export declare const useInputAnswer: () => InputAnswerContextType;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=InputAnswerContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
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AAK,EACV,oBAAoB,
|
|
1
|
+
{"version":3,"file":"InputChatBlock.d.ts","sourceRoot":"","sources":["../../src/components/InputChatBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EAEpB,KAAK,EACN,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAYxD,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,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAA;IACvD,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,cAAc,UAAW,KAAK,mCA2F1C,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ContinueChatResponse, Theme } from '@quickbot.io/schemas';
|
|
2
|
+
import { BotContext, InputSubmitContent } from '@/types';
|
|
3
|
+
type Props = {
|
|
4
|
+
block: NonNullable<ContinueChatResponse['input']>;
|
|
5
|
+
hasHostAvatar: boolean;
|
|
6
|
+
guestAvatar?: NonNullable<Theme['chat']>['guestAvatar'];
|
|
7
|
+
chunkIndex: number;
|
|
8
|
+
context: BotContext;
|
|
9
|
+
isInputPrefillEnabled: boolean;
|
|
10
|
+
hasError: boolean;
|
|
11
|
+
onTransitionEnd: () => void;
|
|
12
|
+
onSubmit: (content: InputSubmitContent) => void;
|
|
13
|
+
onSkip: () => void;
|
|
14
|
+
};
|
|
15
|
+
export declare const InputChatBlockFooter: (props: Props) => import("solid-js").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=InputChatBlockFooter%20copy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputChatBlockFooter copy.d.ts","sourceRoot":"","sources":["../../src/components/InputChatBlockFooter copy.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EASpB,KAAK,EAIN,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAmBxD,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,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAA;IACvD,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,oBAAoB,UAAW,KAAK,mCAiEhD,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ContinueChatResponse, Theme } from '@quickbot.io/schemas';
|
|
2
|
+
import { BotContext, InputSubmitContent } from '@/types';
|
|
3
|
+
type Props = {
|
|
4
|
+
block: NonNullable<ContinueChatResponse['input']>;
|
|
5
|
+
hasHostAvatar: boolean;
|
|
6
|
+
guestAvatar?: NonNullable<Theme['chat']>['guestAvatar'];
|
|
7
|
+
chunkIndex: number;
|
|
8
|
+
context: BotContext;
|
|
9
|
+
isInputPrefillEnabled: boolean;
|
|
10
|
+
hasError: boolean;
|
|
11
|
+
onTransitionEnd: () => void;
|
|
12
|
+
onSubmit: (content: InputSubmitContent) => void;
|
|
13
|
+
onSkip: () => void;
|
|
14
|
+
};
|
|
15
|
+
export declare const InputChatBlockFooter: (props: Props) => import("solid-js").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=InputChatBlockFooter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputChatBlockFooter.d.ts","sourceRoot":"","sources":["../../src/components/InputChatBlockFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EAQpB,KAAK,EAIN,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAqBxD,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,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAA;IACvD,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,oBAAoB,UAAW,KAAK,mCAkFhD,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ContinueChatResponse } from '@quickbot.io/schemas';
|
|
2
|
+
import { BotContext, InputSubmitContent } from '@/types';
|
|
3
|
+
export declare const InputChatBlockFooterShow: (props: {
|
|
4
|
+
context: BotContext;
|
|
5
|
+
block: NonNullable<ContinueChatResponse['input']>;
|
|
6
|
+
chunkIndex: number;
|
|
7
|
+
isInputPrefillEnabled: boolean;
|
|
8
|
+
existingAnswer?: string;
|
|
9
|
+
onTransitionEnd: () => void;
|
|
10
|
+
onSubmit: (answer: InputSubmitContent) => void;
|
|
11
|
+
onSkip: (label: string) => void;
|
|
12
|
+
}) => import("solid-js").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=InputChatBlockFooterShow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputChatBlockFooterShow.d.ts","sourceRoot":"","sources":["../../src/components/InputChatBlockFooterShow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EAarB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAiCxD,eAAO,MAAM,wBAAwB,UAAW;IAC9C,OAAO,EAAE,UAAU,CAAA;IACnB,KAAK,EAAE,YAAY,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAA;IACjD,UAAU,EAAE,MAAM,CAAA;IAClB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAC9C,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAChC,mCAuBA,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Common layout component for input forms
|
|
12
|
+
* Provides consistent structure and styling for all input components
|
|
13
|
+
* Always uses a form element to normalize submit behavior
|
|
14
|
+
*/
|
|
15
|
+
export declare const InputFormLayout: (props: InputFormLayoutProps) => JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# 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;CAC3B;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,UAAW,oBAAoB,gBAuC1D,CAAA"}
|
|
@@ -2,7 +2,6 @@ import { JSX } from 'solid-js/jsx-runtime';
|
|
|
2
2
|
type SendButtonProps = {
|
|
3
3
|
isDisabled?: boolean;
|
|
4
4
|
isLoading?: boolean;
|
|
5
|
-
disableIcon?: boolean;
|
|
6
5
|
class?: string;
|
|
7
6
|
} & JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
8
7
|
export declare const SendButton: (props: SendButtonProps) => JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SendButton.d.ts","sourceRoot":"","sources":["../../src/components/SendButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SendButton.d.ts","sourceRoot":"","sources":["../../src/components/SendButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAI1C,KAAK,eAAe,GAAG;IACrB,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,UAAU,UAAW,eAAe,gBAgBhD,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { JSX } from 'solid-js/jsx-runtime';
|
|
2
|
+
type SendButtonProps = {
|
|
3
|
+
isDisabled?: boolean;
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
class?: string;
|
|
6
|
+
} & JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
7
|
+
export declare const Submit: (props: SendButtonProps) => JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=Submit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Submit.d.ts","sourceRoot":"","sources":["../../src/components/Submit.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAI1C,KAAK,eAAe,GAAG;IACrB,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,MAAM,UAAW,eAAe,gBAgB5C,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { JSX } from 'solid-js/jsx-runtime';
|
|
2
|
+
type SubmitButtonProps = {
|
|
3
|
+
isDisabled?: boolean;
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
class?: string;
|
|
6
|
+
} & JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
7
|
+
export declare const SubmitButton: (props: SubmitButtonProps) => JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=SubmitButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubmitButton.d.ts","sourceRoot":"","sources":["../../src/components/SubmitButton.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"}
|