open-chat-studio-widget 0.4.8 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +23 -20
  2. package/dist/cjs/{index-AhSI5tER.js → index-CC3Krx2K.js} +4 -2
  3. package/dist/cjs/index-CC3Krx2K.js.map +1 -0
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/open-chat-studio-widget.cjs.entry.js +1116 -301
  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/{heroicons.js → icons.js} +23 -1
  10. package/dist/collection/components/ocs-chat/icons.js.map +1 -0
  11. package/dist/collection/components/ocs-chat/ocs-chat.css +596 -1983
  12. package/dist/collection/components/ocs-chat/ocs-chat.js +480 -273
  13. package/dist/collection/components/ocs-chat/ocs-chat.js.map +1 -1
  14. package/dist/collection/services/chat-session-service.js +145 -0
  15. package/dist/collection/services/chat-session-service.js.map +1 -0
  16. package/dist/collection/services/file-attachment-manager.js +125 -0
  17. package/dist/collection/services/file-attachment-manager.js.map +1 -0
  18. package/dist/collection/utils/cookies.js +5 -12
  19. package/dist/collection/utils/cookies.js.map +1 -1
  20. package/dist/collection/utils/markdown.js +1 -1
  21. package/dist/collection/utils/markdown.js.map +1 -1
  22. package/dist/collection/utils/translations.js +99 -0
  23. package/dist/collection/utils/translations.js.map +1 -0
  24. package/dist/components/open-chat-studio-widget.js +1122 -302
  25. package/dist/components/open-chat-studio-widget.js.map +1 -1
  26. package/dist/esm/{index-DkJ7OJTS.js → index-BF7CYZiN.js} +4 -3
  27. package/dist/esm/index-BF7CYZiN.js.map +1 -0
  28. package/dist/esm/loader.js +3 -3
  29. package/dist/esm/open-chat-studio-widget.entry.js +1116 -301
  30. package/dist/esm/open-chat-studio-widget.entry.js.map +1 -1
  31. package/dist/esm/open-chat-studio-widget.js +3 -3
  32. package/dist/open-chat-studio-widget/open-chat-studio-widget.entry.esm.js.map +1 -1
  33. package/dist/open-chat-studio-widget/open-chat-studio-widget.esm.js +1 -1
  34. package/dist/open-chat-studio-widget/p-400b1f47.entry.js +4 -0
  35. package/dist/open-chat-studio-widget/p-400b1f47.entry.js.map +1 -0
  36. package/dist/open-chat-studio-widget/p-BF7CYZiN.js +3 -0
  37. package/dist/open-chat-studio-widget/p-BF7CYZiN.js.map +1 -0
  38. package/dist/types/components/ocs-chat/{heroicons.d.ts → icons.d.ts} +19 -0
  39. package/dist/types/components/ocs-chat/ocs-chat.d.ts +52 -36
  40. package/dist/types/components.d.ts +22 -8
  41. package/dist/types/services/chat-session-service.d.ts +78 -0
  42. package/dist/types/services/file-attachment-manager.d.ts +40 -0
  43. package/dist/types/utils/translations.d.ts +23 -0
  44. package/package.json +8 -3
  45. package/dist/cjs/index-AhSI5tER.js.map +0 -1
  46. package/dist/collection/components/ocs-chat/heroicons.js.map +0 -1
  47. package/dist/esm/index-DkJ7OJTS.js.map +0 -1
  48. package/dist/open-chat-studio-widget/p-DkJ7OJTS.js +0 -3
  49. package/dist/open-chat-studio-widget/p-DkJ7OJTS.js.map +0 -1
  50. package/dist/open-chat-studio-widget/p-bde68fbd.entry.js +0 -4
  51. package/dist/open-chat-studio-widget/p-bde68fbd.entry.js.map +0 -1
package/README.md CHANGED
@@ -9,26 +9,29 @@ 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 (defaults to current origin). | `string` | `"https://chatbots.dimagi.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
- | `headerText` | `header-text` | The text to place in the header. | `""` | `undefined` |
21
- | `iconUrl` | `icon-url` | URL of the icon to display on the button. If not provided, uses the default OCS logo. | `string` | `undefined` |
22
- | `newChatConfirmationMessage` | `new-chat-confirmation-message` | The message to display in the new chat confirmation dialog. | `string` | `"Starting a new chat will clear your current conversation. Continue?"` |
23
- | `persistentSession` | `persistent-session` | Whether to persist session data to local storage to allow resuming previous conversations after page reload. | `boolean` | `true` |
24
- | `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` |
25
- | `position` | `position` | The initial position of the chat widget on the screen. | `"center" \| "left" \| "right"` | `'right'` |
26
- | `starterQuestions` | `starter-questions` | Array of starter questions that users can click to send (JSON array of strings) | `string` | `undefined` |
27
- | `typingIndicatorText` | `typing-indicator-text` | The text to display while the assistant is typing/preparing a response. | `string` | `"Preparing response"` |
28
- | `userId` | `user-id` | Used to associate chat sessions with a specific user across multiple visits/sessions | `string` | `undefined` |
29
- | `userName` | `user-name` | Display name for the user. | `string` | `undefined` |
30
- | `visible` | `visible` | Whether the chat widget is visible on load. | `boolean` | `false` |
31
- | `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
+ | `newChatConfirmationMessage` | `new-chat-confirmation-message` | The message to display in the new chat confirmation dialog. | `string` | `undefined` |
25
+ | `persistentSession` | `persistent-session` | Whether to persist session data to local storage to allow resuming previous conversations after page reload. | `boolean` | `true` |
26
+ | `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` |
27
+ | `position` | `position` | The initial position of the chat widget on the screen. | `"center" \| "left" \| "right"` | `'right'` |
28
+ | `starterQuestions` | `starter-questions` | Array of starter questions that users can click to send (JSON array of strings) | `string` | `undefined` |
29
+ | `translationsUrl` | `translations-url` | | `string` | `undefined` |
30
+ | `typingIndicatorText` | `typing-indicator-text` | The text to display while the assistant is typing/preparing a response. | `string` | `undefined` |
31
+ | `userId` | `user-id` | Used to associate chat sessions with a specific user across multiple visits/sessions | `string` | `undefined` |
32
+ | `userName` | `user-name` | Display name for the user. | `string` | `undefined` |
33
+ | `visible` | `visible` | Whether the chat widget is visible on load. | `boolean` | `false` |
34
+ | `welcomeMessages` | `welcome-messages` | Welcome messages to display above starter questions (JSON array of strings) | `string` | `undefined` |
32
35
 
33
36
 
34
37
  ## CSS Custom Properties
@@ -2,6 +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.0"};
5
6
 
6
7
  /*
7
8
  Stencil Client Platform v4.36.3 | MIT Licensed | https://stenciljs.com
@@ -1479,6 +1480,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1479
1480
  // src/runtime/nonce.ts
1480
1481
  var setNonce = (nonce) => plt.$nonce$ = nonce;
1481
1482
 
1483
+ exports.Env = Env;
1482
1484
  exports.Host = Host;
1483
1485
  exports.bootstrapLazy = bootstrapLazy;
1484
1486
  exports.getElement = getElement;
@@ -1486,6 +1488,6 @@ exports.h = h;
1486
1488
  exports.promiseResolve = promiseResolve;
1487
1489
  exports.registerInstance = registerInstance;
1488
1490
  exports.setNonce = setNonce;
1489
- //# sourceMappingURL=index-AhSI5tER.js.map
1491
+ //# sourceMappingURL=index-CC3Krx2K.js.map
1490
1492
 
1491
- //# sourceMappingURL=index-AhSI5tER.js.map
1493
+ //# sourceMappingURL=index-CC3Krx2K.js.map