open-chat-studio-widget 0.6.0 → 0.8.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/README.md +28 -25
- package/dist/cjs/{index-CcvroTR_.js → index-Cf6K60f1.js} +3 -3
- package/dist/cjs/{index-CcvroTR_.js.map → index-Cf6K60f1.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/open-chat-studio-widget.cjs.entry.js +480 -178
- package/dist/cjs/open-chat-studio-widget.cjs.entry.js.map +1 -1
- package/dist/cjs/open-chat-studio-widget.cjs.js +2 -2
- package/dist/cjs/open-chat-studio-widget.entry.cjs.js.map +1 -1
- package/dist/collection/components/ocs-chat/icons.js +2 -2
- package/dist/collection/components/ocs-chat/icons.js.map +1 -1
- package/dist/collection/components/ocs-chat/ocs-chat.css +29 -34
- package/dist/collection/components/ocs-chat/ocs-chat.js +374 -102
- package/dist/collection/components/ocs-chat/ocs-chat.js.map +1 -1
- package/dist/collection/services/chat-session-service.js +39 -1
- package/dist/collection/services/chat-session-service.js.map +1 -1
- package/dist/collection/services/file-attachment-manager.js +4 -7
- package/dist/collection/services/file-attachment-manager.js.map +1 -1
- package/dist/collection/utils/cookies.js.map +1 -1
- package/dist/collection/utils/markdown.js +43 -17
- package/dist/collection/utils/markdown.js.map +1 -1
- package/dist/collection/utils/translations.js +1 -3
- package/dist/collection/utils/translations.js.map +1 -1
- package/dist/collection/utils/utils.js +2 -2
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/open-chat-studio-widget.js +487 -178
- package/dist/components/open-chat-studio-widget.js.map +1 -1
- package/dist/esm/{index-BKVXO_5E.js → index-DXf2dIht.js} +3 -3
- package/dist/esm/{index-BKVXO_5E.js.map → index-DXf2dIht.js.map} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/open-chat-studio-widget.entry.js +480 -178
- package/dist/esm/open-chat-studio-widget.entry.js.map +1 -1
- package/dist/esm/open-chat-studio-widget.js +3 -3
- package/dist/open-chat-studio-widget/open-chat-studio-widget.entry.esm.js.map +1 -1
- package/dist/open-chat-studio-widget/open-chat-studio-widget.esm.js +1 -1
- package/dist/open-chat-studio-widget/{p-BKVXO_5E.js → p-DXf2dIht.js} +2 -2
- package/dist/open-chat-studio-widget/{p-BKVXO_5E.js.map → p-DXf2dIht.js.map} +1 -1
- package/dist/open-chat-studio-widget/p-ff47dabf.entry.js +4 -0
- package/dist/open-chat-studio-widget/p-ff47dabf.entry.js.map +1 -0
- package/dist/types/components/ocs-chat/ocs-chat.d.ts +44 -2
- package/dist/types/components.d.ts +33 -4
- package/dist/types/services/chat-session-service.d.ts +7 -0
- package/dist/types/utils/markdown.d.ts +8 -0
- package/package.json +7 -2
- package/dist/open-chat-studio-widget/p-a0d04423.entry.js +0 -4
- package/dist/open-chat-studio-widget/p-a0d04423.entry.js.map +0 -1
package/README.md
CHANGED
|
@@ -9,30 +9,33 @@ For more information, see the [Open Chat Studio documentation](https://docs.open
|
|
|
9
9
|
|
|
10
10
|
## Properties
|
|
11
11
|
|
|
12
|
-
| Property | Attribute | Description
|
|
13
|
-
| ---------------------------- | ------------------------------- |
|
|
14
|
-
| `allowAttachments` | `allow-attachments` | Allow the user to attach files to their messages.
|
|
15
|
-
| `allowFullScreen` | `allow-full-screen` | Allow the user to make the chat window full screen.
|
|
16
|
-
| `apiBaseUrl` | `api-base-url` | The base URL for the API.
|
|
17
|
-
| `buttonShape` | `button-shape` | The shape of the chat button. 'round' makes it circular, 'square' keeps it rectangular.
|
|
18
|
-
| `buttonText` | `button-text` | The text to display on the button.
|
|
19
|
-
| `chatbotId` _(required)_ | `chatbot-id` | The ID of the chatbot to connect to.
|
|
20
|
-
| `embedKey` | `embed-key` | Authentication key for embedded channels
|
|
21
|
-
| `headerText` | `header-text` | The text to place in the header.
|
|
22
|
-
| `iconUrl` | `icon-url` | URL of the icon to display on the button. If not provided, uses the default OCS logo.
|
|
23
|
-
| `language` | `language` | The language code for the widget UI (e.g., 'en', 'es', 'fr'). Defaults to en
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
12
|
+
| Property | Attribute | Description | Type | Default |
|
|
13
|
+
| ---------------------------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ---------------------------------- |
|
|
14
|
+
| `allowAttachments` | `allow-attachments` | Allow the user to attach files to their messages. | `boolean` | `false` |
|
|
15
|
+
| `allowFullScreen` | `allow-full-screen` | Allow the user to make the chat window full screen. | `boolean` | `true` |
|
|
16
|
+
| `apiBaseUrl` | `api-base-url` | The base URL for the API. | `string` | `'https://www.openchatstudio.com'` |
|
|
17
|
+
| `buttonShape` | `button-shape` | The shape of the chat button. 'round' makes it circular, 'square' keeps it rectangular. | `"round" \| "square"` | `'square'` |
|
|
18
|
+
| `buttonText` | `button-text` | The text to display on the button. | `string` | `undefined` |
|
|
19
|
+
| `chatbotId` _(required)_ | `chatbot-id` | The ID of the chatbot to connect to. | `string` | `undefined` |
|
|
20
|
+
| `embedKey` | `embed-key` | Authentication key for embedded channels | `string` | `undefined` |
|
|
21
|
+
| `headerText` | `header-text` | The text to place in the header. | `""` | `undefined` |
|
|
22
|
+
| `iconUrl` | `icon-url` | URL of the icon to display on the button. If not provided, uses the default OCS logo. | `string` | `undefined` |
|
|
23
|
+
| `language` | `language` | The language code for the widget UI (e.g., 'en', 'es', 'fr'). Defaults to en | `string` | `undefined` |
|
|
24
|
+
| `mode` | `mode` | The operating mode of the widget. - 'standard': Default floating window with launcher button. - 'kiosk': Fills parent container, always visible, no header or launcher button. The parent element must establish a containing block (e.g. `position: relative`). | `"kiosk" \| "standard"` | `'standard'` |
|
|
25
|
+
| `newChatConfirmationMessage` | `new-chat-confirmation-message` | The message to display in the new chat confirmation dialog. | `string` | `undefined` |
|
|
26
|
+
| `pageContext` | `page-context` | Optional context object to send with each message. This provides page-specific context to the bot. | `{ [x: string]: any; }` | `undefined` |
|
|
27
|
+
| `persistentSession` | `persistent-session` | Whether to persist session data to local storage to allow resuming previous conversations after page reload. Ignored when `sessionId` is provided. | `boolean` | `true` |
|
|
28
|
+
| `persistentSessionExpire` | `persistent-session-expire` | Minutes since the most recent message after which the session data in local storage will expire. Set this to `0` to never expire. | `number` | `60 * 24` |
|
|
29
|
+
| `position` | `position` | The initial position of the chat widget on the screen. | `"center" \| "left" \| "right"` | `'right'` |
|
|
30
|
+
| `sessionId` | `session-id` | The ID of an existing chat session to connect to. When provided, the widget is bound to that session: local session persistence is disabled and the message history is loaded from the server. Intended for host pages that create the session server-side (e.g. the OCS web chat page). | `string` | `undefined` |
|
|
31
|
+
| `showButton` | `show-button` | Whether to show the launcher button. Set to false to hide the button and open the chat window programmatically via the `visible` property. | `boolean` | `true` |
|
|
32
|
+
| `starterQuestions` | `starter-questions` | Array of starter questions that users can click to send (JSON array of strings) | `string` | `undefined` |
|
|
33
|
+
| `translationsUrl` | `translations-url` | | `string` | `undefined` |
|
|
34
|
+
| `typingIndicatorText` | `typing-indicator-text` | The text to display while the assistant is typing/preparing a response. | `string` | `undefined` |
|
|
35
|
+
| `userId` | `user-id` | Used to associate chat sessions with a specific user across multiple visits/sessions | `string` | `undefined` |
|
|
36
|
+
| `userName` | `user-name` | Display name for the user. | `string` | `undefined` |
|
|
37
|
+
| `visible` | `visible` | Whether the chat widget is visible on load. | `boolean` | `false` |
|
|
38
|
+
| `welcomeMessages` | `welcome-messages` | Welcome messages to display above starter questions (JSON array of strings) | `string` | `undefined` |
|
|
36
39
|
|
|
37
40
|
|
|
38
41
|
## CSS Custom Properties
|
|
@@ -114,7 +117,7 @@ For more information, see the [Open Chat Studio documentation](https://docs.open
|
|
|
114
117
|
| `--scrollbar-thumb-color` | Scrollbar thumb color (#d1d5db) |
|
|
115
118
|
| `--scrollbar-thumb-hover-color` | Scrollbar thumb hover color (#9ca3af) |
|
|
116
119
|
| `--scrollbar-track-color` | Scrollbar track color (#f3f4f6) |
|
|
117
|
-
| `--selected-file-bg-color` | Selected file item background color (--
|
|
120
|
+
| `--selected-file-bg-color` | Selected file item background color (--button-background-color-hover) |
|
|
118
121
|
| `--selected-file-font-size` | Selected file item font size (--chat-window-font-size-sm) |
|
|
119
122
|
| `--selected-file-icon-size` | Selected file item icon size (1.25em) |
|
|
120
123
|
| `--selected-file-name-color` | Selected file name color (--message-assistant-text-color) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const NAMESPACE = 'open-chat-studio-widget';
|
|
4
4
|
const BUILD = /* open-chat-studio-widget */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true};
|
|
5
|
-
const Env = /* open-chat-studio-widget */ {"version":"0.
|
|
5
|
+
const Env = /* open-chat-studio-widget */ {"version":"0.8.0"};
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Platform v4.36.3 | MIT Licensed | https://stenciljs.com
|
|
@@ -1488,6 +1488,6 @@ exports.h = h;
|
|
|
1488
1488
|
exports.promiseResolve = promiseResolve;
|
|
1489
1489
|
exports.registerInstance = registerInstance;
|
|
1490
1490
|
exports.setNonce = setNonce;
|
|
1491
|
-
//# sourceMappingURL=index-
|
|
1491
|
+
//# sourceMappingURL=index-Cf6K60f1.js.map
|
|
1492
1492
|
|
|
1493
|
-
//# sourceMappingURL=index-
|
|
1493
|
+
//# sourceMappingURL=index-Cf6K60f1.js.map
|