open-chat-studio-widget 0.7.0 → 0.9.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.
Files changed (35) hide show
  1. package/README.md +28 -26
  2. package/dist/cjs/{index-CvB341El.js → index-DDod9Zyw.js} +3 -3
  3. package/dist/cjs/{index-CvB341El.js.map → index-DDod9Zyw.js.map} +1 -1
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/open-chat-studio-widget.cjs.entry.js +282 -49
  6. package/dist/cjs/open-chat-studio-widget.cjs.entry.js.map +1 -1
  7. package/dist/cjs/open-chat-studio-widget.cjs.js +2 -2
  8. package/dist/cjs/open-chat-studio-widget.entry.cjs.js.map +1 -1
  9. package/dist/collection/components/ocs-chat/ocs-chat.js +176 -29
  10. package/dist/collection/components/ocs-chat/ocs-chat.js.map +1 -1
  11. package/dist/collection/services/chat-session-service.js +112 -8
  12. package/dist/collection/services/chat-session-service.js.map +1 -1
  13. package/dist/collection/services/file-attachment-manager.js +6 -0
  14. package/dist/collection/services/file-attachment-manager.js.map +1 -1
  15. package/dist/components/open-chat-studio-widget.js +284 -49
  16. package/dist/components/open-chat-studio-widget.js.map +1 -1
  17. package/dist/esm/{index-C2QZK0Ui.js → index-iUBQH9om.js} +3 -3
  18. package/dist/esm/{index-C2QZK0Ui.js.map → index-iUBQH9om.js.map} +1 -1
  19. package/dist/esm/loader.js +3 -3
  20. package/dist/esm/open-chat-studio-widget.entry.js +282 -49
  21. package/dist/esm/open-chat-studio-widget.entry.js.map +1 -1
  22. package/dist/esm/open-chat-studio-widget.js +3 -3
  23. package/dist/open-chat-studio-widget/open-chat-studio-widget.entry.esm.js.map +1 -1
  24. package/dist/open-chat-studio-widget/open-chat-studio-widget.esm.js +1 -1
  25. package/dist/open-chat-studio-widget/p-9c925476.entry.js +4 -0
  26. package/dist/open-chat-studio-widget/p-9c925476.entry.js.map +1 -0
  27. package/dist/open-chat-studio-widget/{p-C2QZK0Ui.js → p-iUBQH9om.js} +2 -2
  28. package/dist/open-chat-studio-widget/{p-C2QZK0Ui.js.map → p-iUBQH9om.js.map} +1 -1
  29. package/dist/types/components/ocs-chat/ocs-chat.d.ts +29 -1
  30. package/dist/types/components.d.ts +18 -2
  31. package/dist/types/services/chat-session-service.d.ts +27 -0
  32. package/dist/types/services/file-attachment-manager.d.ts +2 -0
  33. package/package.json +1 -1
  34. package/dist/open-chat-studio-widget/p-e87d4e31.entry.js +0 -4
  35. package/dist/open-chat-studio-widget/p-e87d4e31.entry.js.map +0 -1
package/README.md CHANGED
@@ -9,32 +9,34 @@ For more information, see the [Open Chat Studio documentation](https://docs.open
9
9
 
10
10
  ## Properties
11
11
 
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. | `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
- | `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` |
31
- | `starterQuestions` | `starter-questions` | Array of starter questions that users can click to send (JSON array of strings) | `string` | `undefined` |
32
- | `translationsUrl` | `translations-url` | | `string` | `undefined` |
33
- | `typingIndicatorText` | `typing-indicator-text` | The text to display while the assistant is typing/preparing a response. | `string` | `undefined` |
34
- | `userId` | `user-id` | Used to associate chat sessions with a specific user across multiple visits/sessions | `string` | `undefined` |
35
- | `userName` | `user-name` | Display name for the user. | `string` | `undefined` |
36
- | `visible` | `visible` | Whether the chat widget is visible on load. | `boolean` | `false` |
37
- | `welcomeMessages` | `welcome-messages` | Welcome messages to display above starter questions (JSON array of strings) | `string` | `undefined` |
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
+ | `sessionToken` | `session-token` | A session token proving access to the session named by `session-id`. Host pages that create the session server-side pass a server-minted token here so the widget can authenticate its requests. Only meaningful with `session-id`. | `string` | `undefined` |
32
+ | `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` |
33
+ | `starterQuestions` | `starter-questions` | Array of starter questions that users can click to send (JSON array of strings) | `string` | `undefined` |
34
+ | `translationsUrl` | `translations-url` | | `string` | `undefined` |
35
+ | `typingIndicatorText` | `typing-indicator-text` | The text to display while the assistant is typing/preparing a response. | `string` | `undefined` |
36
+ | `userId` | `user-id` | Used to associate chat sessions with a specific user across multiple visits/sessions | `string` | `undefined` |
37
+ | `userName` | `user-name` | Display name for the user. | `string` | `undefined` |
38
+ | `visible` | `visible` | Whether the chat widget is visible on load. | `boolean` | `false` |
39
+ | `welcomeMessages` | `welcome-messages` | Welcome messages to display above starter questions (JSON array of strings) | `string` | `undefined` |
38
40
 
39
41
 
40
42
  ## CSS Custom Properties
@@ -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.7.0"};
5
+ const Env = /* open-chat-studio-widget */ {"version":"0.9.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-CvB341El.js.map
1491
+ //# sourceMappingURL=index-DDod9Zyw.js.map
1492
1492
 
1493
- //# sourceMappingURL=index-CvB341El.js.map
1493
+ //# sourceMappingURL=index-DDod9Zyw.js.map