open-chat-studio-widget 0.4.7 → 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 (78) hide show
  1. package/README.md +23 -20
  2. package/dist/cjs/app-globals-V2Kpy_OQ.js +8 -0
  3. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -0
  4. package/dist/cjs/{index-c9203be6.js → index-CC3Krx2K.js} +331 -238
  5. package/dist/cjs/index-CC3Krx2K.js.map +1 -0
  6. package/dist/cjs/index.cjs.js +1 -0
  7. package/dist/cjs/index.cjs.js.map +1 -1
  8. package/dist/cjs/loader.cjs.js +4 -5
  9. package/dist/cjs/loader.cjs.js.map +1 -1
  10. package/dist/cjs/open-chat-studio-widget.cjs.entry.js +5124 -4272
  11. package/dist/cjs/open-chat-studio-widget.cjs.entry.js.map +1 -1
  12. package/dist/cjs/open-chat-studio-widget.cjs.js +8 -7
  13. package/dist/cjs/open-chat-studio-widget.cjs.js.map +1 -1
  14. package/dist/cjs/open-chat-studio-widget.entry.cjs.js.map +1 -0
  15. package/dist/collection/collection-manifest.json +1 -1
  16. package/dist/collection/components/ocs-chat/{heroicons.js → icons.js} +23 -1
  17. package/dist/collection/components/ocs-chat/icons.js.map +1 -0
  18. package/dist/collection/components/ocs-chat/ocs-chat.css +596 -1947
  19. package/dist/collection/components/ocs-chat/ocs-chat.js +521 -293
  20. package/dist/collection/components/ocs-chat/ocs-chat.js.map +1 -1
  21. package/dist/collection/services/chat-session-service.js +145 -0
  22. package/dist/collection/services/chat-session-service.js.map +1 -0
  23. package/dist/collection/services/file-attachment-manager.js +125 -0
  24. package/dist/collection/services/file-attachment-manager.js.map +1 -0
  25. package/dist/collection/utils/cookies.js +5 -12
  26. package/dist/collection/utils/cookies.js.map +1 -1
  27. package/dist/collection/utils/markdown.js +1 -1
  28. package/dist/collection/utils/markdown.js.map +1 -1
  29. package/dist/collection/utils/translations.js +99 -0
  30. package/dist/collection/utils/translations.js.map +1 -0
  31. package/dist/components/index.js +2 -1
  32. package/dist/components/open-chat-studio-widget.js +5125 -4266
  33. package/dist/components/open-chat-studio-widget.js.map +1 -1
  34. package/dist/esm/app-globals-DQuL1Twl.js +6 -0
  35. package/dist/esm/app-globals-DQuL1Twl.js.map +1 -0
  36. package/dist/esm/{index-0349ca51.js → index-BF7CYZiN.js} +329 -217
  37. package/dist/esm/index-BF7CYZiN.js.map +1 -0
  38. package/dist/esm/index.js +1 -0
  39. package/dist/esm/index.js.map +1 -1
  40. package/dist/esm/loader.js +5 -4
  41. package/dist/esm/loader.js.map +1 -1
  42. package/dist/esm/open-chat-studio-widget.entry.js +5125 -4271
  43. package/dist/esm/open-chat-studio-widget.entry.js.map +1 -1
  44. package/dist/esm/open-chat-studio-widget.js +7 -5
  45. package/dist/esm/open-chat-studio-widget.js.map +1 -1
  46. package/dist/open-chat-studio-widget/index.esm.js.map +1 -1
  47. package/dist/open-chat-studio-widget/loader.esm.js.map +1 -0
  48. package/dist/open-chat-studio-widget/open-chat-studio-widget.entry.esm.js.map +1 -0
  49. package/dist/open-chat-studio-widget/open-chat-studio-widget.esm.js +1 -1
  50. package/dist/open-chat-studio-widget/open-chat-studio-widget.esm.js.map +1 -1
  51. package/dist/open-chat-studio-widget/p-400b1f47.entry.js +4 -0
  52. package/dist/open-chat-studio-widget/p-400b1f47.entry.js.map +1 -0
  53. package/dist/open-chat-studio-widget/p-BF7CYZiN.js +3 -0
  54. package/dist/open-chat-studio-widget/p-BF7CYZiN.js.map +1 -0
  55. package/dist/open-chat-studio-widget/p-DQuL1Twl.js +2 -0
  56. package/dist/open-chat-studio-widget/p-DQuL1Twl.js.map +1 -0
  57. package/dist/types/components/ocs-chat/{heroicons.d.ts → icons.d.ts} +19 -0
  58. package/dist/types/components/ocs-chat/ocs-chat.d.ts +57 -36
  59. package/dist/types/components.d.ts +36 -2
  60. package/dist/types/services/chat-session-service.d.ts +78 -0
  61. package/dist/types/services/file-attachment-manager.d.ts +40 -0
  62. package/dist/types/stencil-public-runtime.d.ts +35 -6
  63. package/dist/types/utils/translations.d.ts +23 -0
  64. package/package.json +9 -4
  65. package/dist/cjs/app-globals-3a1e7e63.js +0 -7
  66. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  67. package/dist/cjs/index-c9203be6.js.map +0 -1
  68. package/dist/collection/components/ocs-chat/heroicons.js.map +0 -1
  69. package/dist/esm/app-globals-0f993ce5.js +0 -5
  70. package/dist/esm/app-globals-0f993ce5.js.map +0 -1
  71. package/dist/esm/index-0349ca51.js.map +0 -1
  72. package/dist/open-chat-studio-widget/p-3dc66a9a.js +0 -3
  73. package/dist/open-chat-studio-widget/p-3dc66a9a.js.map +0 -1
  74. package/dist/open-chat-studio-widget/p-6b9a332c.entry.js +0 -4
  75. package/dist/open-chat-studio-widget/p-6b9a332c.entry.js.map +0 -1
  76. package/dist/open-chat-studio-widget/p-e1255160.js +0 -2
  77. package/dist/open-chat-studio-widget/p-e1255160.js.map +0 -1
  78. package/loader/package.json +0 -11
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
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ const globalScripts = () => {};
4
+
5
+ exports.globalScripts = globalScripts;
6
+ //# sourceMappingURL=app-globals-V2Kpy_OQ.js.map
7
+
8
+ //# sourceMappingURL=app-globals-V2Kpy_OQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-globals-V2Kpy_OQ.js","sources":["@stencil/core/internal/app-globals"],"sourcesContent":["export const globalScripts = () => {};\nexport const globalStyles = \"\";\n"],"names":[],"mappings":";;AAAY,MAAC,aAAa,GAAG,MAAM;;;;"}