@chat21/chat21-web-widget 5.1.34-rc1 → 5.1.34

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 (193) hide show
  1. package/.github/workflows/docker-community-push-latest.yml +13 -23
  2. package/.github/workflows/docker-image-tag-community-tag-push.yml +12 -22
  3. package/CHANGELOG.md +8 -129
  4. package/Dockerfile +5 -4
  5. package/angular.json +3 -21
  6. package/docs/changelog/this-branch.md +0 -36
  7. package/env.sample +2 -3
  8. package/nginx.conf +2 -22
  9. package/package.json +3 -10
  10. package/src/app/app.component.html +2 -2
  11. package/src/app/app.component.scss +14 -25
  12. package/src/app/app.component.spec.ts +6 -21
  13. package/src/app/app.component.ts +9 -10
  14. package/src/app/app.module.ts +0 -13
  15. package/src/app/component/conversation-detail/conversation/conversation.component.html +11 -25
  16. package/src/app/component/conversation-detail/conversation/conversation.component.scss +2 -40
  17. package/src/app/component/conversation-detail/conversation/conversation.component.spec.ts +75 -644
  18. package/src/app/component/conversation-detail/conversation/conversation.component.ts +14 -100
  19. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.html +13 -25
  20. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.spec.ts +5 -123
  21. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.ts +0 -1
  22. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.html +10 -23
  23. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.scss +1 -19
  24. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.spec.ts +149 -242
  25. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.ts +5 -8
  26. package/src/app/component/conversation-detail/conversation-emojii/conversation-emojii.component.spec.ts +3 -53
  27. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html +96 -200
  28. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +6 -211
  29. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.spec.ts +78 -452
  30. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +76 -291
  31. package/src/app/component/conversation-detail/conversation-header/conversation-header.component.html +53 -113
  32. package/src/app/component/conversation-detail/conversation-header/conversation-header.component.scss +4 -12
  33. package/src/app/component/conversation-detail/conversation-header/conversation-header.component.spec.ts +29 -274
  34. package/src/app/component/conversation-detail/conversation-internal-frame/conversation-internal-frame.component.html +9 -23
  35. package/src/app/component/conversation-detail/conversation-internal-frame/conversation-internal-frame.component.spec.ts +8 -80
  36. package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.html +23 -29
  37. package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.spec.ts +16 -185
  38. package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.ts +14 -34
  39. package/src/app/component/error-alert/error-alert.component.spec.ts +5 -65
  40. package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.html +7 -16
  41. package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.scss +0 -21
  42. package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.spec.ts +7 -89
  43. package/src/app/component/form/form-builder/form-builder.component.html +1 -1
  44. package/src/app/component/form/form-builder/form-builder.component.spec.ts +21 -163
  45. package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.html +4 -8
  46. package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.scss +5 -10
  47. package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.spec.ts +16 -90
  48. package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.ts +0 -26
  49. package/src/app/component/form/inputs/form-label/form-label.component.spec.ts +11 -45
  50. package/src/app/component/form/inputs/form-radio-button/form-radio-button.component.spec.ts +6 -24
  51. package/src/app/component/form/inputs/form-select/form-select.component.spec.ts +5 -14
  52. package/src/app/component/form/inputs/form-text/form-text.component.html +12 -14
  53. package/src/app/component/form/inputs/form-text/form-text.component.scss +1 -11
  54. package/src/app/component/form/inputs/form-text/form-text.component.spec.ts +17 -113
  55. package/src/app/component/form/inputs/form-text/form-text.component.ts +3 -35
  56. package/src/app/component/form/inputs/form-textarea/form-textarea.component.html +11 -13
  57. package/src/app/component/form/inputs/form-textarea/form-textarea.component.scss +5 -6
  58. package/src/app/component/form/inputs/form-textarea/form-textarea.component.spec.ts +13 -149
  59. package/src/app/component/form/inputs/form-textarea/form-textarea.component.ts +0 -26
  60. package/src/app/component/form/prechat-form/prechat-form.component.html +11 -14
  61. package/src/app/component/form/prechat-form/prechat-form.component.spec.ts +10 -102
  62. package/src/app/component/form/prechat-form/prechat-form.component.ts +1 -8
  63. package/src/app/component/home/home.component.html +31 -38
  64. package/src/app/component/home/home.component.scss +2 -4
  65. package/src/app/component/home/home.component.spec.ts +11 -226
  66. package/src/app/component/home-conversations/home-conversations.component.html +26 -30
  67. package/src/app/component/home-conversations/home-conversations.component.scss +0 -3
  68. package/src/app/component/home-conversations/home-conversations.component.spec.ts +36 -212
  69. package/src/app/component/last-message/last-message.component.html +9 -15
  70. package/src/app/component/last-message/last-message.component.scss +2 -16
  71. package/src/app/component/last-message/last-message.component.spec.ts +23 -204
  72. package/src/app/component/last-message/last-message.component.ts +1 -4
  73. package/src/app/component/launcher-button/launcher-button.component.html +13 -8
  74. package/src/app/component/launcher-button/launcher-button.component.spec.ts +8 -104
  75. package/src/app/component/list-all-conversations/list-all-conversations.component.html +17 -12
  76. package/src/app/component/list-all-conversations/list-all-conversations.component.scss +0 -2
  77. package/src/app/component/list-conversations/list-conversations.component.html +22 -22
  78. package/src/app/component/menu-options/menu-options.component.html +20 -30
  79. package/src/app/component/menu-options/menu-options.component.spec.ts +9 -125
  80. package/src/app/component/message/audio/audio.component.html +15 -13
  81. package/src/app/component/message/audio/audio.component.spec.ts +5 -140
  82. package/src/app/component/message/audio/audio.component.ts +5 -1
  83. package/src/app/component/message/avatar/avatar.component.html +2 -2
  84. package/src/app/component/message/avatar/avatar.component.spec.ts +7 -99
  85. package/src/app/component/message/bubble-message/bubble-message.component.html +51 -38
  86. package/src/app/component/message/bubble-message/bubble-message.component.scss +1 -54
  87. package/src/app/component/message/bubble-message/bubble-message.component.spec.ts +57 -154
  88. package/src/app/component/message/bubble-message/bubble-message.component.ts +11 -89
  89. package/src/app/component/message/buttons/action-button/action-button.component.html +4 -3
  90. package/src/app/component/message/buttons/action-button/action-button.component.spec.ts +5 -49
  91. package/src/app/component/message/buttons/link-button/link-button.component.scss +8 -5
  92. package/src/app/component/message/buttons/link-button/link-button.component.spec.ts +5 -50
  93. package/src/app/component/message/buttons/text-button/text-button.component.spec.ts +5 -44
  94. package/src/app/component/message/carousel/carousel.component.html +16 -29
  95. package/src/app/component/message/carousel/carousel.component.scss +8 -20
  96. package/src/app/component/message/carousel/carousel.component.spec.ts +3 -80
  97. package/src/app/component/message/carousel/carousel.component.ts +0 -16
  98. package/src/app/component/message/frame/frame.component.html +4 -9
  99. package/src/app/component/message/frame/frame.component.spec.ts +15 -34
  100. package/src/app/component/message/frame/frame.component.ts +2 -7
  101. package/src/app/component/message/html/html.component.html +1 -1
  102. package/src/app/component/message/html/html.component.scss +1 -1
  103. package/src/app/component/message/html/html.component.spec.ts +7 -24
  104. package/src/app/component/message/image/image.component.html +10 -12
  105. package/src/app/component/message/image/image.component.scss +0 -16
  106. package/src/app/component/message/image/image.component.spec.ts +15 -101
  107. package/src/app/component/message/image/image.component.ts +51 -90
  108. package/src/app/component/message/info-message/info-message.component.spec.ts +14 -26
  109. package/src/app/component/message/like-unlike/like-unlike.component.html +9 -7
  110. package/src/app/component/message/like-unlike/like-unlike.component.spec.ts +3 -31
  111. package/src/app/component/message/return-receipt/return-receipt.component.spec.ts +17 -38
  112. package/src/app/component/message/text/text.component.html +3 -3
  113. package/src/app/component/message/text/text.component.scss +86 -80
  114. package/src/app/component/message/text/text.component.spec.ts +13 -106
  115. package/src/app/component/message-attachment/message-attachment.component.spec.ts +13 -134
  116. package/src/app/component/selection-department/selection-department.component.html +23 -21
  117. package/src/app/component/selection-department/selection-department.component.spec.ts +14 -159
  118. package/src/app/component/selection-department/selection-department.component.ts +1 -8
  119. package/src/app/component/send-button/send-button.component.html +13 -5
  120. package/src/app/component/send-button/send-button.component.spec.ts +2 -2
  121. package/src/app/component/star-rating-widget/star-rating-widget.component.html +81 -51
  122. package/src/app/directives/tooltip.directive.spec.ts +4 -8
  123. package/src/app/modals/confirm-close/confirm-close.component.html +8 -20
  124. package/src/app/modals/confirm-close/confirm-close.component.scss +0 -3
  125. package/src/app/modals/confirm-close/confirm-close.component.spec.ts +4 -13
  126. package/src/app/modals/confirm-close/confirm-close.component.ts +1 -8
  127. package/src/app/pipe/html-entites-encode.pipe.spec.ts +2 -35
  128. package/src/app/pipe/marked.pipe.spec.ts +2 -38
  129. package/src/app/pipe/marked.pipe.ts +41 -51
  130. package/src/app/providers/app-config.service.ts +2 -4
  131. package/src/app/providers/brand.service.spec.ts +2 -23
  132. package/src/app/providers/brand.service.ts +1 -1
  133. package/src/app/providers/global-settings.service.spec.ts +14 -1009
  134. package/src/app/providers/global-settings.service.ts +2 -82
  135. package/src/app/providers/translator.service.ts +6 -26
  136. package/src/app/sass/_variables.scss +0 -3
  137. package/src/app/sass/animations.scss +1 -19
  138. package/src/app/utils/globals.ts +1 -21
  139. package/src/app/utils/utils-resources.ts +1 -1
  140. package/src/assets/i18n/en.json +99 -106
  141. package/src/assets/i18n/es.json +100 -107
  142. package/src/assets/i18n/fr.json +100 -107
  143. package/src/assets/i18n/it.json +98 -107
  144. package/src/assets/twp/index-dev.html +0 -18
  145. package/src/chat21-core/models/message.ts +1 -2
  146. package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +2 -3
  147. package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +0 -12
  148. package/src/chat21-core/providers/scripts/script.service.spec.ts +2 -12
  149. package/src/chat21-core/providers/tiledesk/tiledesk-requests.service.ts +1 -1
  150. package/src/chat21-core/utils/utils-message.ts +0 -7
  151. package/src/chat21-core/utils/utils.ts +2 -5
  152. package/src/widget-config-template.json +1 -4
  153. package/src/widget-config.json +1 -4
  154. package/tsconfig.json +0 -5
  155. package/.angular-mcp-cache/package.json +0 -1
  156. package/.cursor/angular18-accessibility-auditor-skill.md +0 -442
  157. package/.cursor/mcp.json +0 -15
  158. package/.github/workflows/build.yml +0 -22
  159. package/.github/workflows/playwright.yml +0 -27
  160. package/mocks/voice-websocket-mock/server.cjs +0 -245
  161. package/playwright.config.ts +0 -41
  162. package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.html +0 -46
  163. package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.scss +0 -83
  164. package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.ts +0 -192
  165. package/src/app/component/form/prechat-form-test-mock.ts +0 -35
  166. package/src/app/component/message/audio-sync/audio-sync.component.html +0 -18
  167. package/src/app/component/message/audio-sync/audio-sync.component.scss +0 -65
  168. package/src/app/component/message/audio-sync/audio-sync.component.spec.ts +0 -103
  169. package/src/app/component/message/audio-sync/audio-sync.component.ts +0 -643
  170. package/src/app/providers/tts-audio-playback-coordinator.service.spec.ts +0 -117
  171. package/src/app/providers/tts-audio-playback-coordinator.service.ts +0 -109
  172. package/src/app/providers/voice/STT&TTS/openai-voice.config.ts +0 -12
  173. package/src/app/providers/voice/STT&TTS/openai-voice.provider.ts +0 -171
  174. package/src/app/providers/voice/STT&TTS/speech-provider.abstract.ts +0 -39
  175. package/src/app/providers/voice/audio.types.ts +0 -40
  176. package/src/app/providers/voice/vad.service.spec.ts +0 -28
  177. package/src/app/providers/voice/vad.service.ts +0 -70
  178. package/src/app/providers/voice/voice-streaming.service.spec.ts +0 -23
  179. package/src/app/providers/voice/voice-streaming.service.ts +0 -702
  180. package/src/app/providers/voice/voice-streaming.types.ts +0 -112
  181. package/src/app/providers/voice/voice.service.spec.ts +0 -227
  182. package/src/app/providers/voice/voice.service.ts +0 -973
  183. package/src/app/shims/onnxruntime-web-wasm.ts +0 -4
  184. package/src/assets/onnx/ort-wasm-simd-threaded.mjs +0 -59
  185. package/src/assets/onnx/ort-wasm-simd-threaded.wasm +0 -0
  186. package/src/assets/sounds/keyboard.mp3 +0 -0
  187. package/src/assets/twp/tiledesk_widget_files/widget-css-override-example.css +0 -14
  188. package/src/assets/vad/silero_vad_legacy.onnx +0 -0
  189. package/src/assets/vad/vad.worklet.bundle.min.js +0 -1
  190. package/src/chat21-core/providers/chat-manager.spec.ts +0 -72
  191. package/tests/widget-form-rich.spec.ts +0 -67
  192. package/tests/widget-index-dev-settings.spec.ts +0 -52
  193. package/tests/widget-twp-iframe.spec.ts +0 -39
@@ -1,10 +1,10 @@
1
1
  name: Docker Image Community latest CI
2
2
 
3
- on:
4
- push:
3
+ on:
4
+ push:
5
5
  branches: [ master ]
6
- pull_request:
7
- branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
8
 
9
9
  jobs:
10
10
  push_to_registry:
@@ -12,22 +12,12 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
 
14
14
  steps:
15
- - name: Check out the repo
16
- uses: actions/checkout@v2
17
-
18
- - name: Set up Docker Buildx
19
- uses: docker/setup-buildx-action@v2
20
-
21
- - name: Log in to Docker Hub
22
- uses: docker/login-action@v2
23
- with:
24
- username: ${{ secrets.DOCKERHUB_USERNAME }}
25
- password: ${{ secrets.DOCKERHUB_TOKEN }}
26
-
27
- - name: Build and push multiarch Docker image
28
- uses: docker/build-push-action@v3
29
- with:
30
- context: .
31
- push: true
32
- platforms: linux/amd64,linux/arm64
33
- tags: chat21/chat21-web-widget:latest
15
+ - uses: actions/checkout@v2
16
+ name: Check out the repo
17
+ - uses: docker/build-push-action@v1
18
+ with:
19
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
20
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
21
+ repository: chat21/chat21-web-widget
22
+ push: true
23
+ tags: latest
@@ -3,30 +3,20 @@ name: Publish Docker Community image tags
3
3
  on:
4
4
  push:
5
5
  tags:
6
- - '**' # Trigger su qualsiasi tag
7
-
6
+ - '**' # Push events to every tag including hierarchical tags like
8
7
  jobs:
8
+
9
9
  push_to_registry:
10
10
  name: Push Docker image to Docker Hub
11
11
  runs-on: ubuntu-latest
12
-
13
12
  steps:
14
- - name: Check out the repo
15
- uses: actions/checkout@v2
16
-
17
- - name: Set up Docker Buildx
18
- uses: docker/setup-buildx-action@v2
19
-
20
- - name: Log in to Docker Hub
21
- uses: docker/login-action@v2
22
- with:
23
- username: ${{ secrets.DOCKERHUB_USERNAME }}
24
- password: ${{ secrets.DOCKERHUB_TOKEN }}
25
-
26
- - name: Build and push multiarch Docker image
27
- uses: docker/build-push-action@v3
28
- with:
29
- context: .
30
- push: true
31
- platforms: linux/amd64,linux/arm64
32
- tags: chat21/chat21-web-widget:${{ github.ref_name }}
13
+ - name: Check out the repo
14
+ uses: actions/checkout@v2
15
+ - name: Push to Docker Hub
16
+ uses: docker/build-push-action@v1
17
+ with:
18
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
19
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
20
+ repository: chat21/chat21-web-widget
21
+ push: true
22
+ tag_with_ref: true
package/CHANGELOG.md CHANGED
@@ -6,122 +6,20 @@
6
6
  ### **Copyrigth**:
7
7
  *Tiledesk SRL*
8
8
 
9
+ # 5.1.34
10
+ - **bug fixed**: if last message is ulr_preview shows previous message buttons
9
11
 
10
- # 5.1.34-rc1
11
- - **added**: onPageChangeVisibilityDesktop:'open' and 'onPageChangeVisibilityMobile: 'open' in chatbot-panel.html file
12
+ # 5.1.33
13
+ - **bug fixed**: widget not loaded because blob block loading in lauch.js
12
14
 
13
- # 5.1.33-rc12
14
- - **bug-fixed**: if last message is ulr_preview shows previous message buttons
15
-
16
- # 5.1.33-rc11
17
- - **changed**: **Stream audio** — updated the streaming/voice-mode footer icon.
18
- - **added**: **Stream audio** — tooltip on the stream button (i18n key `STREAM_AUDIO`, e.g. “Use voice mode”) via SVG `<title>` and `aria-label`.
19
-
20
- # 5.1.33-rc10
21
- - **bug-fixed**: fixed bug with knowledge base json sources without URLs
22
-
23
- # 5.1.33-rc9
24
- - **changed**: **Conversation footer** — accessibility-focused markup (ARIA roles/labels, live regions, semantic send control), stream-audio layout (wrapper + voice mode: hide attach/emoji while streaming, inline status, stream button + spectrum), optional **Close chat** action when `closeChatInConversation` is enabled; emoji restriction alert uses assertive live region semantics.
25
- - **bug-fixed**: **`getConversationDetail` Tiledesk fallback** — when `getMyRequests()` rejects, the conversation is treated as archived (`isConversationArchived = true`) and the handler returns immediately instead of resetting state from an empty fallback payload.
26
- - **bug-fixed**: **`VoiceService`** — skip Web Audio `createMediaStreamSource` when the `MediaStream` has no audio tracks (avoids `InvalidStateError` under mocked `getUserMedia` in unit tests and edge browsers).
27
- - **bug-fixed**: **`TtsAudioPlaybackCoordinator`** — avoid emitting a duplicate `isTTSPlaying$` `true` when preempting an already-playing owner (keeps emission sequence stable for consumers).
28
- - **bug-fixed**: **Unit tests** — aligned `BubbleMessageComponent` specs with `calcImageSize` + DI mocks; `AudioSyncComponent` spec module setup (`declarations` + `CommonModule`) and TTS streaming call expectations; `VoiceService` specs with realistic mic streams and updated expectations for proxy `listening` / `barge_in` (no `setAudioMuted` on those paths); `TtsAudioPlaybackCoordinator` `stopAll` test asserts `_stopAll$` broadcast via spy; `ConversationComponent` spec for Tiledesk error path.
29
-
30
- # 5.1.33-rc7
31
- - **added**: added more URL source types in kb_json_sources
32
-
33
- # 5.1.33-rc5
34
- - **added**: cssSource tiledeskSettings property to manage and override widget style
35
-
36
- # 5.1.33-rc4
37
- - **bug fixed**: bug fixed extractUrlsFromText
38
-
39
- # 5.1.32-rc18
40
- - **bug fixed**: bug fix css kb_json_sources
41
-
42
- # 5.1.32-rc17
43
- - **bug fixed**: empty message in preview URLs
44
-
45
- # 5.1.32-rc16
46
- - **added**: added chat-json-sources to preview URLs
47
-
48
- # 5.1.32-rc15
49
- - **changed**: redemptionMs: 800
50
-
51
- # 5.1.32-rc14
52
- - **changed**: minor ui fixed
53
-
54
- # 5.1.32-rc13
55
- - **added**: VAD speech state events (`speechStart$`, `speechEnd$`) to improve UI/state transitions around user speech
56
- - **changed**: stream audio footer UI — stream button expands into a “Terminate” pill with animated level bars driven by mic intensity; recorder icon hidden while streaming; textarea width adjusted while streaming
57
- - **changed**: `StreamAudioSpectrum` — consolidated stream spectrum + stream button visuals into a single component with improved silence vs speaking handling and volume-driven bar heights
58
- - **changed**: conversation layout while streaming — adjusted received bubble sizing (`fullSizeMessage`) and loading spinner spacing (`fullSize`) for full-width stream mode
59
-
60
-
61
-
62
- # 5.1.32-rc12
63
- - **changed**: voice acquisition blocking during TTS response — pause VAD after user speech ends until the TTS response cycle completes; added safety timeout and `isAcquisitionBlocked$` to drive UI (e.g. greyed spectrum)
64
- - **chore**: version bump to `5.1.32-rc12`
65
-
66
- # 5.1.32-rc11
67
- - **added**: global TTS stop — `TtsAudioPlaybackCoordinator.stopAll()` + `stopAllPlayback$` to abort current and queued TTS playback and reveal full message text
68
- - **changed**: stop TTS playback when closing stream audio
69
- - **chore**: version bump to `5.1.32-rc11`
70
-
71
- # 5.1.32-rc10
72
- - **added**: TTS playback state (`isTTSPlaying$`) to coordinate voice UI and suppress mic segment emission while the bot is speaking
73
- - **changed**: stream spectrum theme color turns grey while TTS is playing
74
-
75
-
76
- # 5.1.32-rc9
77
- - **added**: mic-triggered TTS interruption — when VAD detects user speech, stop current TTS playback, clear the queue, and reveal the full message text
78
- - **added**: global TTS stop API (`TtsAudioPlaybackCoordinator.stopAll()` + `stopAllPlayback$`) to stop current + queued TTS playback from UI/events (e.g. close stream)
79
- - **changed**: `chat-audio-sync` TTS playback now streams audio via authenticated POST to `message.metadata.src`, sending `voiceSettings` + `text` and `streaming: true`
80
- - **changed**: stream UI spectrum — removed circular orb and stretched the spectrum line to fill the `#streamAudioAlert` width with 10px side padding
81
- - **changed**: conversation content layout while streaming — adjusted received bubble left margin and loading spinner margins for full-size mode
82
-
83
-
84
- # 5.1.32-rc8
85
- - **changed**: updated the dev environment defaults to align with the stage setup (remote config URL, API endpoints, logging level, storage prefix, and related settings)
86
-
87
- # 5.1.32-rc7
88
- - **added**: `StreamAudioSpectrum` component for audio visualization in the streaming footer UI
89
- - **added**: TTS playback coordinator queue — ensures TTS messages play sequentially without interrupting the previous one
90
- - **changed**: `chat-audio-sync` — updated TTS audio handling to support streaming playback and improved autoplay/animation timing
91
- - **changed**: iframe loader (`launch.js`, `launch_template.js`) — streamlined loading logic and improved error handling, with fixes for localhost environments
92
-
93
- # 5.1.32-rc4
94
- - **added**: “Close stream” control (`.close-stream-button`) — content and sheet bottom offset in fullscreen using `--chat-footer-stream-button-height` only while the stream is listening (`isStreamAudioActive`); variables in `_variables.scss`.
95
- - **added**: `VoiceService.discardCurrentRecordingSegment()` — when a message arrives from another sender during streaming, the current WebM segment is discarded (no upload) without stopping mic/VAD; `interruptStreamDueToPeerMessage()` in the footer no longer clears `isStreamAudioActive`.
96
- - **changed**: `#streamAudioAlert` — band above the footer with a frosted-glass look (`backdrop-filter`, semi-transparent `color-mix`).
97
-
98
- # 5.1.32-rc3
99
- - **changed**: `nginx.conf` (Docker image) — explicit MIME types for `.mjs`, `.wasm`, `.onnx` and `default_type` at `http` level (avoids `text/plain` on ONNX/VAD modules behind containerized deploys).
100
- - **chore**: removed deprecated Amazon beta/prod deploy scripts from the repository.
101
-
102
- # 5.1.32-rc2
103
- - **bug fixed**: minor streaming icon UI fixed
104
- - **changed**: Refactor stream audio button UI in the conversation footer (layout / classes).
105
-
106
- # 5.1.32-rc1
107
- - **added**: Voice pipeline — VAD (`@ricky0123/vad-web`) with ONNX Runtime WASM served from `/assets/onnx` (`copy-onnx-wasm`), `VoiceService` with `audioSegment$` (WebM segments) and optional STT/TTS via unified OpenAI provider using `HttpClient`, transcript / error fields on segment payloads.
108
- - **added**: Stream audio UI in conversation footer — toggle, real-time volume stream and animated waveform (`volume$`); mic session lifecycle wired to upload segments on speech end.
109
- - **added**: `MessageModel.isJustRecived` — set when ingesting messages (MQTT/Firebase `addCommandMessage` for `command.type === "message"`, and default for non-command messages in `addedMessage` / `addedNew`) to distinguish “new in session” vs history.
110
- - **added**: `chat-audio-sync` for TTS messages — karaoke-style word sync to audio, full `message` input, typography aligned with text bubbles; skips animation when `isJustRecived === false`; after playback ends sets `message.isJustRecived = false` so replays show full text without re-animating.
111
- - **bug fixed**: `AnalyserNode.getByteFrequencyData` TypeScript error — `Uint8Array` created from an explicit `ArrayBuffer` for correct DOM typings.
112
- - **bug fixed**: `isStreamAudioActive` no longer derived from per-frame mic level (`volume > 1`), which caused the stream button / active state to flash continuously while listening.
15
+ # 5.1.31
16
+ - **bug fixed**: bug fix disabled user-typing with human and user-typing with human is not available
113
17
 
114
18
  # 5.1.30
115
19
  - **bug fixed**: startHidden is not working properly
116
20
 
117
- # 5.1.30-rc3
118
- - **bug fixed**: bug fix user-typing with human is not available
119
-
120
- # 5.1.30-rc2
121
- - **bug fixed**: bug fix disabled user-typing with human
122
-
123
- # 5.1.30-rc1
124
- - **bug fixed**: startHidden is not working properly
21
+ # 5.1.28
22
+ - **bug fixed**: header option menu is deactivated on mobile
125
23
 
126
24
  # 5.1.28
127
25
  - **bug fixed**: fixed Bot/Human conversation detection by correctly classifying bot replies
@@ -133,22 +31,8 @@
133
31
  - **changed**: Set the default autoStart value to false
134
32
  - **added**: Added the open widget loading spinner
135
33
  - **changed**: Load the widget without authentication and display the speech bubble
136
-
137
- # 5.1.27-rc3
138
- - **bug fixed**: fixed Bot/Human conversation detection by correctly classifying bot replies
139
-
140
- # 5.1.27-rc2
141
- - **bug fixed**: centralized fullscreen management on mobile and handled the case of the closed widget that remained fullscreen
142
-
143
- # 5.1.27-rc1
144
- - **added**: closeChatInConversation parameters
145
- - **added**: close chat button under textarea footer component
146
-
147
- # 5.1.26-rc6
148
34
  - **changed**: mobile always opens fullscreen and ignores legacy stored size”.
149
35
  - **changed**: changed user-typing
150
-
151
- # 5.1.26-rc5
152
36
  - **changed**: Hide the resize-widget button when on mobile
153
37
  - **added**: added "I'm thinking" when the bot responds
154
38
 
@@ -210,11 +94,6 @@
210
94
  - **bug-fixed**: check showEmojiFooterButton to enable/disable emojii
211
95
  - **bug-fixed**: markdown is fired as an emojii and blocked by isEmojii check fn
212
96
 
213
- # 5.1.7-rc7
214
- - **bug-fixed**: button new_conversation always appear. added subscription to conversationAdded
215
-
216
- # 5.1.7-rc6
217
- - **added**: Added MAX_ATTACHMENT_ERROR error message when uploading a file larger than 10 MB
218
97
 
219
98
  # 5.1.7-rc5
220
99
  - **bug-fixed**: bug fixed BUTTON STYLES
package/Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
1
  ### STAGE 1: Build ###
2
2
 
3
3
  # We label our stage as ‘builder’
4
- FROM --platform=$BUILDPLATFORM node:20.12.2-alpine3.19 as builder
4
+ FROM node:20.12.2-alpine3.19 as builder
5
5
 
6
6
  COPY package.json package-lock.json ./
7
7
 
@@ -15,11 +15,12 @@ COPY . .
15
15
 
16
16
  ## Build the angular app in production mode and store the artifacts in dist folder
17
17
 
18
-
19
18
  RUN npx ng build --configuration="prod" --output-path=dist --base-href=./ --output-hashing=none
20
19
 
20
+
21
21
  ### STAGE 2: Setup ###
22
- FROM --platform=$BUILDPLATFORM nginx:1.14.1-alpine
22
+
23
+ FROM nginx:1.14.1-alpine
23
24
 
24
25
  ## Copy our default nginx config
25
26
  COPY nginx.conf /etc/nginx/nginx.conf
@@ -32,4 +33,4 @@ COPY --from=builder /ng-app/dist/browser /usr/share/nginx/html
32
33
 
33
34
  RUN echo "Chat21 Web Widget Started!!"
34
35
 
35
- CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/widget-config-template.json > /usr/share/nginx/html/widget-config.json && exec nginx -g 'daemon off;'"]
36
+ CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/widget-config-template.json > /usr/share/nginx/html/widget-config.json && exec nginx -g 'daemon off;'"]
package/angular.json CHANGED
@@ -61,9 +61,7 @@
61
61
  "idb",
62
62
  "accept-language-parser",
63
63
  "file-saver",
64
- "dayjs",
65
- "onnxruntime-web",
66
- "@ricky0123/vad-web"
64
+ "dayjs"
67
65
  ],
68
66
  "sourceMap": true,
69
67
  "optimization": false,
@@ -162,19 +160,7 @@
162
160
  "src/styles.scss"
163
161
  ],
164
162
  "scripts": [],
165
- "codeCoverage": true,
166
- "codeCoverageExclude": [
167
- "src/chat21-core/providers/firebase/**/*.ts",
168
- "src/chat21-core/providers/mqtt/**/*.ts",
169
- "src/main.ts",
170
- "src/polyfills.ts",
171
- "src/zone-flag.ts",
172
- "src/models/**/*.ts",
173
- "src/chat21-core/models/**/*.ts",
174
- "src/chat21-core/providers/native/**/*.ts",
175
- "src/chat21-core/providers/logger/customLogger.ts",
176
- "src/chat21-core/providers/logger/loggerInstance.ts"
177
- ]
163
+ "codeCoverage": true
178
164
  }
179
165
  },
180
166
  "e2e": {
@@ -196,9 +182,5 @@
196
182
  "defaultConfiguration": "development"
197
183
  }
198
184
  }
199
- }
200
- },
201
- "cli": {
202
- "analytics": false
203
- }
185
+ }}
204
186
  }
@@ -45,39 +45,3 @@ Questo branch migliora il feedback in conversazione e rende il comportamento del
45
45
  - Il callout non compare quando il widget e' aperto o quando la preview nuovo messaggio e' attiva.
46
46
  - La UI della conversazione indica chiaramente se l'ultimo responder e' bot o umano.
47
47
  - "Sto pensando..." compare solo nelle conversazioni bot e ha un comportamento prevedibile.
48
- # This branch: identificazione bot o umano
49
-
50
- ## Obiettivo
51
-
52
- In questo branch e' stata introdotta una logica esplicita per capire, all'apertura della conversazione, se l'ultimo responder lato server e' un **bot** oppure un **umano**.
53
-
54
- ## Come viene fatta l'identificazione
55
-
56
- - La valutazione parte dai messaggi gia' caricati in conversazione.
57
- - Viene cercato l'**ultimo messaggio ricevuto dal server** (non inviato dal client corrente).
58
- - Quel messaggio viene classificato con una funzione dedicata (`classifyMessageSenderKind`) che usa piu' segnali:
59
- - `attributes.flowAttributes.chatbot_id` (quando presente indica bot)
60
- - pattern del mittente (es. `senderId` con prefisso bot, quando applicabile)
61
- - informazioni del mittente (`sender_fullname` e metadati associati)
62
-
63
- ## Regola speciale per messaggi di sistema
64
-
65
- Se l'ultimo messaggio utile e' di tipo `system`, viene fatto un controllo aggiuntivo:
66
-
67
- - se in `attributes` e' presente un evento con `messagelabel.key = MEMBER_JOINED_GROUP`
68
- - e rappresenta il passaggio della conversazione a un operatore
69
-
70
- allora la conversazione viene forzata a **Umano** anche se altri indizi potrebbero suggerire bot.
71
-
72
- ## Risultato in UI
73
-
74
- - In apertura conversazione viene mostrato un badge con stato:
75
- - `Bot`
76
- - `Umano`
77
- - Questo stato viene ricalcolato al variare dei messaggi ricevuti.
78
-
79
- ## Effetto sui feedback utente
80
-
81
- - Il messaggio temporaneo `"sto pensando..."` viene mostrato solo quando la conversazione risulta di tipo **Bot**.
82
- - Alla ricezione della prima risposta dal server, `"sto pensando..."` viene nascosto **immediatamente**.
83
- - Non e' previsto alcun tempo minimo di visualizzazione del messaggio.
package/env.sample CHANGED
@@ -19,6 +19,5 @@ API_URL=CHANGEIT
19
19
  API_BASEIMAGE_URL=CHANGEIT
20
20
  ENBED_JS=true
21
21
 
22
- # Speech proxy WebSocket base URL (ws:// or wss://).
23
- # Used by the voice streaming feature; maps to voiceProxyWsBaseUrl in widget-config.json.
24
- VOICE_PROXY_WS_BASE_URL=CHANGEIT
22
+
23
+
package/nginx.conf CHANGED
@@ -5,38 +5,18 @@ events {
5
5
  }
6
6
 
7
7
  http {
8
- include /etc/nginx/mime.types;
9
- default_type application/octet-stream;
10
-
11
8
  server {
12
9
  listen 80;
13
10
  server_name localhost;
14
11
 
15
12
  root /usr/share/nginx/html;
16
13
  index index.html index.htm;
14
+ include /etc/nginx/mime.types;
17
15
 
18
16
  gzip on;
19
17
  gzip_min_length 1000;
20
18
  gzip_proxied expired no-cache no-store private auth;
21
- gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript application/wasm;
22
-
23
- # ONNX Runtime (.mjs), WASM e modelli VAD: il browser rifiuta moduli ES con Content-Type: text/plain
24
- location ~* \.mjs$ {
25
- root /usr/share/nginx/html;
26
- default_type application/javascript;
27
- charset utf-8;
28
- add_header Cache-Control "public, max-age=31536000, immutable";
29
- }
30
- location ~* \.wasm$ {
31
- root /usr/share/nginx/html;
32
- default_type application/wasm;
33
- add_header Cache-Control "public, max-age=31536000, immutable";
34
- }
35
- location ~* \.onnx$ {
36
- root /usr/share/nginx/html;
37
- default_type application/octet-stream;
38
- add_header Cache-Control "public, max-age=31536000, immutable";
39
- }
19
+ gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
40
20
 
41
21
  location / {
42
22
  try_files $uri $uri/ /index.html;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-web-widget",
3
3
  "author": "Tiledesk SRL",
4
- "version": "5.1.34-rc1",
4
+ "version": "5.1.34",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -10,15 +10,12 @@
10
10
  },
11
11
  "scripts": {
12
12
  "ng": "ng",
13
- "copy-onnx-wasm": "mkdir -p src/assets/onnx && cp node_modules/onnxruntime-web/dist/ort-wasm-simd-threaded.mjs node_modules/onnxruntime-web/dist/ort-wasm-simd-threaded.wasm src/assets/onnx/",
14
13
  "start": "ng serve",
15
14
  "build": "ng build",
16
15
  "test": "ng test",
17
- "test:e2e": "playwright test",
18
16
  "lint": "ng lint",
19
17
  "e2e": "ng e2e",
20
- "source-map-explorer": "source-map-explorer dist/*.js",
21
- "voice-mock": "node mocks/voice-websocket-mock/server.cjs"
18
+ "source-map-explorer": "source-map-explorer dist/*.js"
22
19
  },
23
20
  "private": false,
24
21
  "dependencies": {
@@ -35,7 +32,6 @@
35
32
  "@ctrl/ngx-emoji-mart": "^9.2.0",
36
33
  "@ngx-translate/core": "^16.0.4",
37
34
  "@ngx-translate/http-loader": "^16.0.1",
38
- "@ricky0123/vad-web": "^0.0.30",
39
35
  "accept-language-parser": "^1.5.0",
40
36
  "bootstrap": "^5.1.3",
41
37
  "dayjs": "^1.11.7",
@@ -44,7 +40,6 @@
44
40
  "humanize-duration-ts": "^2.1.1",
45
41
  "marked": "^16.3.0",
46
42
  "ngx-logger": "^5.0.11",
47
- "onnxruntime-web": "^1.24.3",
48
43
  "replace": "^1.2.2",
49
44
  "rxjs": "^7.8.2",
50
45
  "source-map-explorer": "^2.5.3",
@@ -57,7 +52,6 @@
57
52
  "@angular/cli": "^18.2.19",
58
53
  "@angular/compiler-cli": "^18.2.13",
59
54
  "@angular/language-service": "^18.2.13",
60
- "@playwright/test": "^1.59.1",
61
55
  "@types/jasmine": "^3.6.11",
62
56
  "@types/jasminewd2": "~2.0.3",
63
57
  "@types/marked": "^6.0.0",
@@ -74,7 +68,6 @@
74
68
  "protractor": "~7.0.0",
75
69
  "ts-node": "~7.0.0",
76
70
  "tslint": "~6.1.0",
77
- "typescript": "~5.4",
78
- "ws": "^8.18.0"
71
+ "typescript": "~5.4"
79
72
  }
80
73
  }
@@ -1,5 +1,5 @@
1
- <!-- tabindex="9999" -->
2
- <div id="tiledesk-container" [class.active]="g.isShown">
1
+
2
+ <div id="tiledesk-container" [class.active]="g.isShown" tabindex="9999">
3
3
 
4
4
  <div id="chat21-conversations"
5
5
  [ngClass]="{ 'swing-in-bottom-fwd' : g.isOpen === true, 'full-screen-mode' : g.fullscreenMode === true, 'c21-align-left' : g.align === 'left', 'c21-align-right' : g.align !== 'left'}"
@@ -50,18 +50,8 @@ body {
50
50
  margin:0px;
51
51
  }
52
52
 
53
- /* Keyboard focus ring scoped to the widget host only (WCAG 2.4.7) */
54
- chat-root *:focus:not(:focus-visible) {
55
- outline: none;
56
- }
57
- chat-root *:focus-visible {
58
- outline: 2px solid var(--c21-focus-ring, #1a73e8);
59
- outline-offset: 2px;
60
- }
61
-
62
- ::-moz-focus-inner {
63
- border: 0;
64
- }
53
+ :focus {outline: none !important;}
54
+ ::-moz-focus-inner {border:0;}
65
55
 
66
56
 
67
57
 
@@ -252,7 +242,10 @@ chat-root {
252
242
  height: 100%;
253
243
 
254
244
  // ========= BEGIN: RESET CSS TAG ========= //
255
- button {
245
+ *:focus {
246
+ outline: none;
247
+ }
248
+ button{
256
249
  cursor: pointer;
257
250
  }
258
251
 
@@ -262,19 +255,14 @@ chat-root {
262
255
 
263
256
  textarea,
264
257
  textarea:visited,
258
+ textarea:focus,
265
259
  textarea:hover,
266
- textarea:active {
260
+ textarea:active{
261
+ // all: unset;
267
262
  line-height: 20px!important;
268
- box-shadow: none!important;
269
- border: 0px solid var(--trasp-light-black)!important;
270
- }
271
-
272
- textarea:focus:not(:focus-visible) {
273
263
  outline: none!important;
274
- }
275
-
276
- textarea:focus-visible {
277
- outline: 0px !important;
264
+ box-shadow:none!important;
265
+ border: 0px solid var(--trasp-light-black)!important;
278
266
  }
279
267
 
280
268
  // ========= BEGIN: CSS APP.COMPONENT ========= //
@@ -415,7 +403,7 @@ chat-root {
415
403
  }
416
404
  }
417
405
  button.c21-button-primary:hover,
418
- button.c21-button-primary:focus:not(:focus-visible),
406
+ button.c21-button-primary:focus,
419
407
  button.c21-button-primary:active {
420
408
  //outline-width: 0px;
421
409
  opacity: 0.8;
@@ -431,9 +419,10 @@ chat-root {
431
419
  cursor: pointer;
432
420
  }
433
421
  button.c21-button-link:hover,
434
- button.c21-button-link:focus:not(:focus-visible),
422
+ button.c21-button-link:focus,
435
423
  button.c21-button-link:active {
436
424
  text-decoration: underline;
425
+ outline: none;
437
426
  }
438
427
 
439
428
  .c21-divBudge {
@@ -1,4 +1,3 @@
1
- import { NO_ERRORS_SCHEMA } from '@angular/core';
2
1
  import { Triggerhandler } from './../chat21-core/utils/triggerHandler';
3
2
  import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
4
3
  import { RouterTestingModule } from '@angular/router/testing';
@@ -21,32 +20,25 @@ import { PresenceService } from 'src/chat21-core/providers/abstract/presence.ser
21
20
  import { UploadService } from 'src/chat21-core/providers/abstract/upload.service';
22
21
  import { AppConfigService } from './providers/app-config.service';
23
22
  import { ChatManager } from 'src/chat21-core/providers/chat-manager';
24
- import { Globals } from './utils/globals';
25
-
26
-
23
+ import { NGXLogger } from 'ngx-logger';
27
24
  import { CustomLogger } from 'src/chat21-core/providers/logger/customLogger';
28
25
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
29
26
  import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
30
- import { of } from 'rxjs';
31
27
 
32
28
  describe('AppComponent', () => {
33
29
  let component: AppComponent;
34
30
  let fixture: ComponentFixture<AppComponent>;
35
- const ngxlogger = jasmine.createSpyObj('NGXLogger', ['log', 'trace', 'debug', 'warn', 'error', 'info']);
36
- const customLogger = new CustomLogger(ngxlogger);
31
+ let ngxlogger: NGXLogger;
32
+ let customLogger = new CustomLogger(ngxlogger)
37
33
 
38
34
  beforeEach(waitForAsync(() => {
39
- LoggerInstance.setInstance(customLogger);
40
- spyOn(AppComponent.prototype, 'ngAfterViewInit').and.stub();
41
35
  TestBed.configureTestingModule({
42
36
  declarations: [
43
37
  AppComponent
44
38
  ],
45
39
  imports: [RouterTestingModule,
46
40
  TranslateModule.forRoot()],
47
- schemas: [NO_ERRORS_SCHEMA],
48
41
  providers: [
49
- Globals,
50
42
  Triggerhandler,
51
43
  GlobalSettingsService,
52
44
  AppStorageService,
@@ -71,18 +63,11 @@ describe('AppComponent', () => {
71
63
  }));
72
64
 
73
65
  beforeEach(() => {
74
- spyOn(TestBed.inject(GlobalSettingsService), 'getProjectParametersById').and.returnValue(
75
- of({ project: null }) as any,
76
- );
77
- spyOn(TestBed.inject(GlobalSettingsService), 'manageLoadingDomains').and.returnValue(true);
78
-
79
- const translator = TestBed.inject(TranslatorService);
80
- spyOn(translator, 'initI18n').and.returnValue(Promise.resolve(undefined));
81
- spyOn(translator, 'translate').and.stub();
82
- spyOn(translator, 'getLanguage').and.returnValue('en');
83
-
84
66
  fixture = TestBed.createComponent(AppComponent);
85
67
  component = fixture.componentInstance;
68
+ LoggerInstance.setInstance(customLogger)
69
+ let logger = LoggerInstance.getInstance()
70
+ component['logger']= logger
86
71
  fixture.detectChanges();
87
72
  });
88
73