@chat21/chat21-web-widget 5.1.32-rc9 → 5.1.33-rc11
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/.angular-mcp-cache/package.json +1 -0
- package/.cursor/angular18-accessibility-auditor-skill.md +442 -0
- package/.cursor/mcp.json +15 -0
- package/.github/workflows/playwright.yml +27 -0
- package/.playwright-mcp/console-2026-05-08T15-31-09-000Z.log +17 -0
- package/.playwright-mcp/console-2026-05-08T15-32-19-412Z.log +89 -0
- package/.playwright-mcp/console-2026-05-08T16-18-48-424Z.log +133 -0
- package/.playwright-mcp/console-2026-05-11T12-54-06-869Z.log +13 -0
- package/.playwright-mcp/console-2026-05-11T12-54-56-229Z.log +147 -0
- package/.playwright-mcp/console-2026-05-11T12-55-47-174Z.log +183 -0
- package/.playwright-mcp/console-2026-05-11T15-34-03-590Z.log +210 -0
- package/.playwright-mcp/console-2026-05-12T15-07-31-880Z.log +118 -0
- package/.playwright-mcp/page-2026-05-08T15-32-19-900Z.yml +851 -0
- package/.playwright-mcp/page-2026-05-08T15-32-47-264Z.yml +857 -0
- package/.playwright-mcp/page-2026-05-08T15-33-17-089Z.yml +1110 -0
- package/.playwright-mcp/page-2026-05-08T15-33-23-486Z.yml +1069 -0
- package/.playwright-mcp/page-2026-05-08T15-33-45-390Z.yml +1076 -0
- package/.playwright-mcp/page-2026-05-08T15-33-52-666Z.yml +1072 -0
- package/.playwright-mcp/page-2026-05-08T15-34-01-338Z.yml +1085 -0
- package/.playwright-mcp/page-2026-05-08T15-34-07-227Z.yml +1072 -0
- package/.playwright-mcp/page-2026-05-08T15-34-13-875Z.yml +1072 -0
- package/.playwright-mcp/page-2026-05-08T15-34-21-885Z.yml +1109 -0
- package/.playwright-mcp/page-2026-05-08T15-34-32-755Z.yml +1109 -0
- package/.playwright-mcp/page-2026-05-08T15-35-09-607Z.yml +1119 -0
- package/.playwright-mcp/page-2026-05-08T15-35-14-242Z.yml +1109 -0
- package/.playwright-mcp/page-2026-05-08T16-18-48-671Z.yml +44 -0
- package/.playwright-mcp/page-2026-05-08T16-18-52-753Z.png +0 -0
- package/.playwright-mcp/page-2026-05-08T16-19-13-919Z.yml +68 -0
- package/.playwright-mcp/page-2026-05-08T16-19-17-977Z.png +0 -0
- package/.playwright-mcp/page-2026-05-08T16-19-25-733Z.yml +120 -0
- package/.playwright-mcp/page-2026-05-08T16-19-29-252Z.png +0 -0
- package/.playwright-mcp/page-2026-05-08T16-19-39-269Z.yml +80 -0
- package/.playwright-mcp/page-2026-05-08T16-19-43-915Z.png +0 -0
- package/.playwright-mcp/page-2026-05-08T16-20-04-407Z.yml +81 -0
- package/.playwright-mcp/page-2026-05-08T16-20-08-984Z.png +0 -0
- package/.playwright-mcp/page-2026-05-08T16-20-32-397Z.png +0 -0
- package/.playwright-mcp/page-2026-05-08T16-20-58-658Z.png +0 -0
- package/.playwright-mcp/page-2026-05-08T16-21-12-320Z.yml +86 -0
- package/.playwright-mcp/page-2026-05-08T16-21-39-154Z.yml +91 -0
- package/.playwright-mcp/page-2026-05-08T16-21-45-420Z.png +0 -0
- package/.playwright-mcp/page-2026-05-08T16-22-21-062Z.yml +0 -0
- package/.playwright-mcp/page-2026-05-08T16-22-58-232Z.yml +91 -0
- package/.playwright-mcp/page-2026-05-08T16-23-36-520Z.yml +0 -0
- package/.playwright-mcp/page-2026-05-08T16-23-46-805Z.yml +100 -0
- package/.playwright-mcp/page-2026-05-08T16-23-55-169Z.png +0 -0
- package/.playwright-mcp/page-2026-05-08T16-24-26-574Z.yml +91 -0
- package/.playwright-mcp/page-2026-05-08T16-25-34-414Z.png +0 -0
- package/.playwright-mcp/page-2026-05-08T16-25-59-831Z.png +0 -0
- package/.playwright-mcp/page-2026-05-08T16-26-21-809Z.yml +91 -0
- package/.playwright-mcp/page-2026-05-08T16-26-47-443Z.yml +105 -0
- package/.playwright-mcp/page-2026-05-08T16-26-56-136Z.png +0 -0
- package/.playwright-mcp/page-2026-05-08T16-27-59-610Z.yml +48 -0
- package/.playwright-mcp/page-2026-05-11T12-54-07-180Z.yml +44 -0
- package/.playwright-mcp/page-2026-05-11T12-54-56-946Z.yml +4 -0
- package/.playwright-mcp/page-2026-05-11T12-55-47-503Z.yml +24 -0
- package/.playwright-mcp/page-2026-05-11T12-56-00-766Z.yml +28 -0
- package/.playwright-mcp/page-2026-05-11T12-56-06-438Z.yml +90 -0
- package/.playwright-mcp/page-2026-05-11T12-57-56-838Z.yml +106 -0
- package/.playwright-mcp/page-2026-05-11T12-58-00-124Z.yml +106 -0
- package/.playwright-mcp/page-2026-05-11T12-59-08-836Z.yml +61 -0
- package/.playwright-mcp/page-2026-05-11T12-59-12-088Z.yml +61 -0
- package/.playwright-mcp/page-2026-05-11T12-59-26-215Z.yml +69 -0
- package/.playwright-mcp/page-2026-05-11T12-59-29-519Z.yml +69 -0
- package/.playwright-mcp/page-2026-05-11T12-59-37-309Z.yml +0 -0
- package/.playwright-mcp/page-2026-05-11T12-59-39-968Z.yml +79 -0
- package/.playwright-mcp/page-2026-05-11T12-59-45-983Z.yml +78 -0
- package/.playwright-mcp/page-2026-05-11T12-59-49-951Z.yml +78 -0
- package/.playwright-mcp/page-2026-05-11T15-34-04-515Z.yml +0 -0
- package/.playwright-mcp/page-2026-05-12T15-07-32-171Z.yml +44 -0
- package/.playwright-mcp/page-2026-05-12T15-08-09-820Z.yml +119 -0
- package/CHANGELOG.md +61 -4
- package/angular.json +20 -3
- package/deploy_amazon_beta.sh +7 -17
- package/deploy_amazon_prod.sh +41 -0
- package/docs/TILEDESK_WIDGET_ACCESSIBILITY_STATEMENT_COMPLETE.md +379 -0
- package/env.sample +3 -2
- package/mocks/voice-websocket-mock/server.cjs +245 -0
- package/package.json +7 -3
- package/playwright.config.ts +41 -0
- package/src/app/app.component.html +2 -2
- package/src/app/app.component.scss +25 -14
- package/src/app/app.component.spec.ts +21 -6
- package/src/app/app.module.ts +4 -0
- package/src/app/component/conversation-detail/conversation/conversation.component.html +19 -11
- package/src/app/component/conversation-detail/conversation/conversation.component.scss +28 -0
- package/src/app/component/conversation-detail/conversation/conversation.component.spec.ts +644 -75
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +63 -17
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.html +25 -13
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.spec.ts +123 -5
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.ts +1 -0
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.html +17 -7
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.scss +15 -3
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.spec.ts +242 -149
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.ts +7 -6
- package/src/app/component/conversation-detail/conversation-emojii/conversation-emojii.component.spec.ts +53 -3
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component copy.html +172 -0
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html +112 -61
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +133 -16
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.spec.ts +452 -78
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +198 -84
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.html +113 -53
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.scss +12 -4
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.spec.ts +274 -29
- package/src/app/component/conversation-detail/conversation-internal-frame/conversation-internal-frame.component.html +23 -9
- package/src/app/component/conversation-detail/conversation-internal-frame/conversation-internal-frame.component.spec.ts +80 -8
- package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.html +29 -23
- package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.spec.ts +185 -16
- package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.ts +34 -14
- package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.html +46 -18
- package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.scss +60 -2
- package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.ts +135 -5
- package/src/app/component/error-alert/error-alert.component.spec.ts +65 -5
- package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.html +16 -7
- package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.scss +21 -0
- package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.spec.ts +89 -7
- package/src/app/component/form/form-builder/form-builder.component.html +1 -1
- package/src/app/component/form/form-builder/form-builder.component.spec.ts +163 -21
- package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.html +8 -4
- package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.scss +10 -5
- package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.spec.ts +90 -16
- package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.ts +26 -0
- package/src/app/component/form/inputs/form-label/form-label.component.spec.ts +45 -11
- package/src/app/component/form/inputs/form-radio-button/form-radio-button.component.spec.ts +24 -6
- package/src/app/component/form/inputs/form-select/form-select.component.spec.ts +14 -5
- package/src/app/component/form/inputs/form-text/form-text.component.html +14 -12
- package/src/app/component/form/inputs/form-text/form-text.component.scss +11 -1
- package/src/app/component/form/inputs/form-text/form-text.component.spec.ts +113 -17
- package/src/app/component/form/inputs/form-text/form-text.component.ts +35 -3
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.html +13 -11
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.scss +6 -5
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.spec.ts +149 -13
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.ts +26 -0
- package/src/app/component/form/prechat-form/prechat-form.component.html +14 -11
- package/src/app/component/form/prechat-form/prechat-form.component.spec.ts +102 -10
- package/src/app/component/form/prechat-form/prechat-form.component.ts +8 -1
- package/src/app/component/form/prechat-form-test-mock.ts +35 -0
- package/src/app/component/home/home.component.html +38 -31
- package/src/app/component/home/home.component.scss +4 -2
- package/src/app/component/home/home.component.spec.ts +226 -11
- package/src/app/component/home-conversations/home-conversations.component.html +30 -26
- package/src/app/component/home-conversations/home-conversations.component.scss +3 -0
- package/src/app/component/home-conversations/home-conversations.component.spec.ts +212 -36
- package/src/app/component/last-message/last-message.component.html +15 -9
- package/src/app/component/last-message/last-message.component.scss +16 -2
- package/src/app/component/last-message/last-message.component.spec.ts +204 -23
- package/src/app/component/launcher-button/launcher-button.component.html +8 -13
- package/src/app/component/launcher-button/launcher-button.component.spec.ts +104 -8
- package/src/app/component/list-all-conversations/list-all-conversations.component.html +12 -17
- package/src/app/component/list-all-conversations/list-all-conversations.component.scss +2 -0
- package/src/app/component/list-conversations/list-conversations.component.html +22 -22
- package/src/app/component/menu-options/menu-options.component.html +30 -20
- package/src/app/component/menu-options/menu-options.component.spec.ts +125 -9
- package/src/app/component/message/audio/audio.component.html +13 -15
- package/src/app/component/message/audio/audio.component.spec.ts +140 -5
- package/src/app/component/message/audio/audio.component.ts +1 -0
- package/src/app/component/message/audio-sync/audio-sync.component.scss +1 -0
- package/src/app/component/message/audio-sync/audio-sync.component.spec.ts +81 -1
- package/src/app/component/message/audio-sync/audio-sync.component.ts +133 -86
- package/src/app/component/message/avatar/avatar.component.html +2 -2
- package/src/app/component/message/avatar/avatar.component.spec.ts +99 -7
- package/src/app/component/message/bubble-message/bubble-message.component.html +39 -52
- package/src/app/component/message/bubble-message/bubble-message.component.scss +59 -1
- package/src/app/component/message/bubble-message/bubble-message.component.spec.ts +154 -57
- package/src/app/component/message/bubble-message/bubble-message.component.ts +152 -110
- package/src/app/component/message/buttons/action-button/action-button.component.html +3 -4
- package/src/app/component/message/buttons/action-button/action-button.component.spec.ts +49 -5
- package/src/app/component/message/buttons/link-button/link-button.component.scss +5 -8
- package/src/app/component/message/buttons/link-button/link-button.component.spec.ts +50 -5
- package/src/app/component/message/buttons/text-button/text-button.component.spec.ts +44 -5
- package/src/app/component/message/carousel/carousel.component.html +29 -16
- package/src/app/component/message/carousel/carousel.component.scss +20 -8
- package/src/app/component/message/carousel/carousel.component.spec.ts +80 -3
- package/src/app/component/message/carousel/carousel.component.ts +16 -0
- package/src/app/component/message/frame/frame.component.html +9 -4
- package/src/app/component/message/frame/frame.component.spec.ts +34 -15
- package/src/app/component/message/frame/frame.component.ts +7 -2
- package/src/app/component/message/html/html.component.html +1 -1
- package/src/app/component/message/html/html.component.scss +1 -1
- package/src/app/component/message/html/html.component.spec.ts +24 -7
- package/src/app/component/message/image/image.component.html +12 -10
- package/src/app/component/message/image/image.component.scss +16 -0
- package/src/app/component/message/image/image.component.spec.ts +101 -15
- package/src/app/component/message/image/image.component.ts +90 -51
- package/src/app/component/message/info-message/info-message.component.spec.ts +26 -14
- package/src/app/component/message/json-sources/json-sources.component.html +38 -0
- package/src/app/component/message/json-sources/json-sources.component.scss +201 -0
- package/src/app/component/message/json-sources/json-sources.component.ts +89 -0
- package/src/app/component/message/like-unlike/like-unlike.component.html +7 -9
- package/src/app/component/message/like-unlike/like-unlike.component.spec.ts +31 -3
- package/src/app/component/message/return-receipt/return-receipt.component.spec.ts +38 -17
- package/src/app/component/message/text/text.component.html +3 -3
- package/src/app/component/message/text/text.component.scss +80 -86
- package/src/app/component/message/text/text.component.spec.ts +106 -13
- package/src/app/component/message-attachment/message-attachment.component.spec.ts +134 -13
- package/src/app/component/selection-department/selection-department.component.html +21 -23
- package/src/app/component/selection-department/selection-department.component.spec.ts +159 -14
- package/src/app/component/selection-department/selection-department.component.ts +8 -1
- package/src/app/component/send-button/send-button.component.html +5 -13
- package/src/app/component/send-button/send-button.component.spec.ts +2 -2
- package/src/app/component/star-rating-widget/star-rating-widget.component.html +51 -81
- package/src/app/directives/tooltip.directive.spec.ts +8 -4
- package/src/app/modals/confirm-close/confirm-close.component.html +20 -8
- package/src/app/modals/confirm-close/confirm-close.component.scss +3 -0
- package/src/app/modals/confirm-close/confirm-close.component.spec.ts +13 -4
- package/src/app/modals/confirm-close/confirm-close.component.ts +8 -1
- package/src/app/pipe/html-entites-encode.pipe.spec.ts +35 -2
- package/src/app/pipe/marked.pipe.spec.ts +38 -2
- package/src/app/pipe/marked.pipe.ts +51 -41
- package/src/app/providers/app-config.service.ts +4 -2
- package/src/app/providers/brand.service.spec.ts +23 -2
- package/src/app/providers/brand.service.ts +1 -1
- package/src/app/providers/global-settings.service.spec.ts +1009 -14
- package/src/app/providers/global-settings.service.ts +59 -2
- package/src/app/providers/json-sources-parser.service.ts +175 -0
- package/src/app/providers/translator.service.ts +24 -6
- package/src/app/providers/tts-audio-playback-coordinator.service.spec.ts +117 -0
- package/src/app/providers/tts-audio-playback-coordinator.service.ts +39 -16
- package/src/app/providers/url-preview.service.ts +82 -0
- package/src/app/providers/voice/audio.types.ts +6 -0
- package/src/app/providers/voice/voice-streaming.service.spec.ts +23 -0
- package/src/app/providers/voice/voice-streaming.service.ts +702 -0
- package/src/app/providers/voice/voice-streaming.types.ts +112 -0
- package/src/app/providers/voice/voice.service.spec.ts +170 -3
- package/src/app/providers/voice/voice.service.ts +691 -17
- package/src/app/sass/_variables.scss +1 -1
- package/src/app/sass/animations.scss +19 -1
- package/src/app/utils/globals.ts +14 -0
- package/src/app/utils/json-sources-utils.ts +27 -0
- package/src/app/utils/url-utils.ts +98 -0
- package/src/app/utils/utils-resources.ts +1 -1
- package/src/assets/i18n/en.json +106 -100
- package/src/assets/i18n/es.json +107 -101
- package/src/assets/i18n/fr.json +107 -101
- package/src/assets/i18n/it.json +107 -99
- package/src/assets/sounds/keyboard.mp3 +0 -0
- package/src/assets/twp/index-dev.html +18 -0
- package/src/assets/twp/tiledesk_widget_files/widget-css-override-example.css +14 -0
- package/src/chat21-core/providers/chat-manager.spec.ts +72 -0
- package/src/chat21-core/providers/scripts/script.service.spec.ts +12 -2
- package/src/chat21-core/utils/constants.ts +4 -0
- package/src/chat21-core/utils/utils-message.ts +23 -1
- package/src/widget-config-template.json +3 -1
- package/src/widget-config.json +28 -27
- package/tests/widget-form-rich.spec.ts +67 -0
- package/tests/widget-index-dev-settings.spec.ts +52 -0
- package/tests/widget-twp-iframe.spec.ts +39 -0
package/src/assets/i18n/it.json
CHANGED
|
@@ -1,100 +1,108 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
2
|
+
"LABEL_PLACEHOLDER": "Scrivi la tua domanda...",
|
|
3
|
+
"LABEL_START_NW_CONV": "Nuova conversazione",
|
|
4
|
+
"LABEL_WHATSAPP": "Contattaci",
|
|
5
|
+
"LABEL_SELECT_TOPIC": "Seleziona un argomento",
|
|
6
|
+
"LABEL_COMPLETE_FORM": "Completa il form per iniziare una conversazione con il prossimo agente disponibile.",
|
|
7
|
+
"LABEL_FIELD_NAME": "Nome",
|
|
8
|
+
"LABEL_ERROR_FIELD_NAME": "Nome richiesto (minimo 2 caratteri).",
|
|
9
|
+
"LABEL_FIELD_EMAIL": "Email",
|
|
10
|
+
"LABEL_ERROR_FIELD_EMAIL": "Inserisci un indirizzo email valido.",
|
|
11
|
+
"LABEL_ERROR_FIELD_REQUIRED": "Campo richiesto",
|
|
12
|
+
"LABEL_WRITING": "sta scrivendo...",
|
|
13
|
+
"LABEL_SEND_NEW_MESSAGE": "Invia un nuovo messaggio",
|
|
14
|
+
"AGENT_NOT_AVAILABLE": " Offline",
|
|
15
|
+
"AGENT_AVAILABLE": " Online",
|
|
16
|
+
"GUEST_LABEL": "Ospite",
|
|
17
|
+
"ALL_AGENTS_OFFLINE_LABEL": "Tutti gli operatori sono offline al momento",
|
|
18
|
+
"LABEL_LOADING": "Caricamento...",
|
|
19
|
+
"LABEL_THINKING": "sto pensando",
|
|
20
|
+
"CALLOUT_TITLE_PLACEHOLDER": "🖐 Bisogno di aiuto?",
|
|
21
|
+
"CALLOUT_MSG_PLACEHOLDER": "Clicca qui e inizia a chattare con noi!",
|
|
22
|
+
"CUSTOMER_SATISFACTION": "Valutazione servizio",
|
|
23
|
+
"YOUR_OPINION_ON_OUR_CUSTOMER_SERVICE": "il tuo giudizio sul nostro servizio clienti",
|
|
24
|
+
"DOWNLOAD_TRANSCRIPT": "Scarica transcript",
|
|
25
|
+
"BACK": "Indietro",
|
|
26
|
+
"CONTINUE": "Continua",
|
|
27
|
+
"YOUR_RATING": "il tuo voto",
|
|
28
|
+
"WRITE_YOUR_OPINION": "Scrivi la tua opinione...(opzionale)",
|
|
29
|
+
"SUBMIT": "Invia",
|
|
30
|
+
"THANK_YOU_FOR_YOUR_EVALUATION": "Grazie per la tua valutazione",
|
|
31
|
+
"YOUR_RATING_HAS_BEEN_RECEIVED": "il tuo voto è stato ricevuto",
|
|
32
|
+
"ALERT_LEAVE_CHAT": "Vuoi abbandonare la conversazione?",
|
|
33
|
+
"YES": "Si",
|
|
34
|
+
"NO": "No",
|
|
35
|
+
"BUTTON_CLOSE_TO_ICON": "Riduci a icona la chat",
|
|
36
|
+
"BUTTON_EDIT_PROFILE": "Modifica profilo",
|
|
37
|
+
"RATE_CHAT": "Valuta chat",
|
|
38
|
+
"WELCOME_TITLE": "Ciao, benvenuto su Tiledesk 👋",
|
|
39
|
+
"WELCOME_MSG": "Come possiamo aiutarti?",
|
|
40
|
+
"WELCOME": "Benvenuto",
|
|
41
|
+
"OPTIONS": "opzioni",
|
|
42
|
+
"SOUND_OFF": "Suono spento",
|
|
43
|
+
"SOUND_ON": "Suono acceso",
|
|
44
|
+
"LOGOUT": "Disconnetti",
|
|
45
|
+
"CLOSE": "Chiudi",
|
|
46
|
+
"RESTART": "Ricomincia",
|
|
47
|
+
"PREV_CONVERSATIONS": "Le tue conversazioni",
|
|
48
|
+
"YOU": "Tu",
|
|
49
|
+
"SHOW_ALL_CONV": "vedi tutte",
|
|
50
|
+
"START_A_CONVERSATION": "Inizia una conversazione",
|
|
51
|
+
"NO_CONVERSATION": "Nessuna conversazione attiva",
|
|
52
|
+
"SEE_PREVIOUS": "vedi precedenti",
|
|
53
|
+
"WAITING_TIME_FOUND": "Il team tipicamente risponde in $reply_time",
|
|
54
|
+
"WAITING_TIME_NOT_FOUND": "Vi risponderemo appena possibile",
|
|
55
|
+
"CLOSED": "Chiusa",
|
|
56
|
+
"CLOSE_CHAT": "Chiudi chat",
|
|
57
|
+
"MINIMIZE": "Comprimi finestra",
|
|
58
|
+
"MAXIMIZE": "Espandi finestra",
|
|
59
|
+
"CENTER": "Centra",
|
|
60
|
+
"CONFIRM_CLOSE_CHAT": "Sei sicuro di voler chiudere questa chat?",
|
|
61
|
+
"INFO_SUPPORT_USER_ADDED_SUBJECT": "tu",
|
|
62
|
+
"INFO_SUPPORT_USER_ADDED_YOU_VERB": "sei stato aggiunto ",
|
|
63
|
+
"INFO_SUPPORT_USER_ADDED_COMPLEMENT": "si è unito",
|
|
64
|
+
"INFO_SUPPORT_USER_ADDED_VERB": "alla chat",
|
|
65
|
+
"INFO_SUPPORT_CHAT_REOPENED": "Chat riaperta",
|
|
66
|
+
"INFO_SUPPORT_CHAT_CLOSED": "Chat chiusa",
|
|
67
|
+
"INFO_SUPPORT_LEAD_UPDATED": "Contatto aggiornato",
|
|
68
|
+
"INFO_SUPPORT_MEMBER_LEFT_GROUP": "ha lasciato il gruppo",
|
|
69
|
+
"INFO_SUPPORT_MEMBER_ABANDONED_GROUP": "ha abbandonato la conversazione",
|
|
70
|
+
"INFO_A_NEW_SUPPORT_REQUEST_HAS_BEEN_ASSIGNED_TO_YOU": "Una nuova richiesta di supporto è stata assegnata a te",
|
|
71
|
+
"LABEL_PRECHAT_USER_FULLNAME": "Nome completo",
|
|
72
|
+
"LABEL_PRECHAT_USER_EMAIL": "E-mail",
|
|
73
|
+
"LABEL_PRECHAT_USER_EMAIL_ERROR": "Indirizzo email non valido",
|
|
74
|
+
"LABEL_PRECHAT_USER_PHONE": "Telefono",
|
|
75
|
+
"LABEL_PRECHAT_USER_PHONE_ERROR": "Telefono richiesto",
|
|
76
|
+
"LABEL_PRECHAT_FIRST_MESSAGE": "Il tuo messaggio per il team di supporto",
|
|
77
|
+
"LABEL_PRECHAT_STATIC_TERMS_PRIVACY": "Prima di procedere nella conversazione, accetta i nostri <a href='https://tiledesk.com/termsofservice/' target='_blank'>Termini</a> e <a href='https://tiledesk.com/privacy.html' target='_blank'>Norme sulla privacy</a>",
|
|
78
|
+
"LABEL_PRECHAT_ACCEPT_TERMS_PRIVACY": "Sono d'accordo",
|
|
79
|
+
"PRECHAT_REQUIRED_ERROR": "Questo campo è obbligatorio",
|
|
80
|
+
"TICKET_TAKING": "La richiesta è stata ricevuta e il personale di assistenza se ne sta occupando.\nPer aggiungere ulteriori commenti, rispondi a questa email.",
|
|
81
|
+
"LABEL_TODAY": "oggi",
|
|
82
|
+
"LABEL_TOMORROW": "ieri",
|
|
83
|
+
"LABEL_LAST_ACCESS": "ultimo accesso",
|
|
84
|
+
"LABEL_TO": "a",
|
|
85
|
+
"ARRAY_DAYS": [
|
|
86
|
+
"Lunedì",
|
|
87
|
+
"Martedì",
|
|
88
|
+
"Mercoledì",
|
|
89
|
+
"Giovedì",
|
|
90
|
+
"Venerdì",
|
|
91
|
+
"Sabato",
|
|
92
|
+
"Domenica"
|
|
93
|
+
],
|
|
94
|
+
"SENT_AN_ATTACHMENT": "ha inviato un allegato",
|
|
95
|
+
"SENT_AN_IMAGE": "ha inviato un'immagine",
|
|
96
|
+
"LABEL_PREVIEW": "Anteprima",
|
|
97
|
+
"SWITCH_TO": "Oppure passa a:",
|
|
98
|
+
"CONNECTION_NETWORK_ERROR": "Ci scusiamo. Si sono verificati problemi di connessione di rete",
|
|
99
|
+
"EMOJI_NOT_ELLOWED": "Emoji non consentiti",
|
|
100
|
+
"DOMAIN_NOT_ALLOWED": "L'URL contiene un dominio non consentito",
|
|
101
|
+
"MAX_ATTACHMENT": "Dimensione massima consentita {{FILE_SIZE_LIMIT}}Mb",
|
|
102
|
+
"MAX_ATTACHMENT_ERROR": "Il file supera la dimensione massima consentita",
|
|
103
|
+
"EMOJI": "Emoji",
|
|
104
|
+
"STREAM_AUDIO": "Usa la modalità vocale",
|
|
105
|
+
"VOICE_CONNECTING": "Connessione...",
|
|
106
|
+
"VOICE_LISTENING": "In ascolto...",
|
|
107
|
+
"VOICE_PROCESSING": "Elaborazione..."
|
|
108
|
+
}
|
|
Binary file
|
|
@@ -801,6 +801,13 @@
|
|
|
801
801
|
window.Tiledesk('openConversationById', request_id)
|
|
802
802
|
}
|
|
803
803
|
|
|
804
|
+
function onClickCssSource(){
|
|
805
|
+
let cssSource = document.getElementById('cssSource').value
|
|
806
|
+
window.tiledeskSettings['cssSource'] = cssSource
|
|
807
|
+
console.log('onClickCssSource: cssSource-->',window.tiledeskSettings);
|
|
808
|
+
window.Tiledesk('restart')
|
|
809
|
+
}
|
|
810
|
+
|
|
804
811
|
// function onClickParameter(elementName){
|
|
805
812
|
// console.log('onClickParameter: ',elementName)
|
|
806
813
|
// const radios = document.getElementsByName(elementName)
|
|
@@ -1807,6 +1814,17 @@
|
|
|
1807
1814
|
<button class="btn btn-light" onclick="onClickOpenConversationById()">Open conversation <i class="fa-regular fa-comment" aria-hidden="true"></i></button>
|
|
1808
1815
|
</div>
|
|
1809
1816
|
</div>
|
|
1817
|
+
<div class="row section">
|
|
1818
|
+
<div><h3 style="line-height: 0.3;">MANAGE <em><strong> global CSS</strong></em></h3></div>
|
|
1819
|
+
|
|
1820
|
+
<div>Insert an <em><strong>URL</strong></em> of a CSS file to override the global CSS </div>
|
|
1821
|
+
<div class="row" style="margin: 0">
|
|
1822
|
+
<textarea class="form-control" id="cssSource" placeholder="https://example.com/custom-style.css" rows="1" cols="60"></textarea>
|
|
1823
|
+
</div>
|
|
1824
|
+
<div class="row" style="text-align: right; margin:5px 0px">
|
|
1825
|
+
<button class="btn btn-light" onclick="onClickCssSource()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
|
|
1826
|
+
</div>
|
|
1827
|
+
</div>
|
|
1810
1828
|
<!-- WIDGET POSITION SECTION : start-->
|
|
1811
1829
|
<div class="row section">
|
|
1812
1830
|
<div><h3 style="line-height: 0.3;">Widget <em><strong>POSITION</strong></em></h3></div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Esempio di override remoto (tiledeskSettings.cssSource).
|
|
3
|
+
* Con ng serve: usa un path assoluto dalla root dell'app, es. /assets/widget-css-override-example.css
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* Attenzione: il primo id deve essere l'intera stringa #tiledesk-container (errori tipo #tilede non matchano nulla nel DOM). */
|
|
7
|
+
#tiledesk-container #chat21-home-component .c21-header {
|
|
8
|
+
background-image: linear-gradient(135deg, #c0392b 0%, #8e44ad 100%) !important;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* Bottone launcher: contorno molto visibile (non richiede di battere background-color inline) */
|
|
12
|
+
#tiledesk-container #c21-launcher-button {
|
|
13
|
+
box-shadow: 0 0 0 3px #f39c12, 0 8px 24px rgba(0, 0, 0, 0.25) !important;
|
|
14
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { CustomLogger } from './logger/customLogger';
|
|
4
|
+
import { LoggerInstance } from './logger/loggerInstance';
|
|
5
|
+
import { ChatManager } from './chat-manager';
|
|
6
|
+
import { ArchivedConversationsHandlerService } from './abstract/archivedconversations-handler.service';
|
|
7
|
+
import { ConversationsHandlerService } from './abstract/conversations-handler.service';
|
|
8
|
+
import { ConversationHandlerService } from './abstract/conversation-handler.service';
|
|
9
|
+
|
|
10
|
+
describe('ChatManager', () => {
|
|
11
|
+
let convHandler: jasmine.SpyObj<ConversationsHandlerService>;
|
|
12
|
+
let archivedHandler: jasmine.SpyObj<ArchivedConversationsHandlerService>;
|
|
13
|
+
|
|
14
|
+
beforeEach(() => {
|
|
15
|
+
const ngxlogger = jasmine.createSpyObj('NGXLogger', ['log', 'trace', 'debug', 'warn', 'error', 'info']);
|
|
16
|
+
LoggerInstance.setInstance(new CustomLogger(ngxlogger));
|
|
17
|
+
convHandler = jasmine.createSpyObj('ConversationsHandlerService', ['dispose']);
|
|
18
|
+
archivedHandler = jasmine.createSpyObj('ArchivedConversationsHandlerService', ['dispose']);
|
|
19
|
+
|
|
20
|
+
TestBed.configureTestingModule({
|
|
21
|
+
providers: [
|
|
22
|
+
ChatManager,
|
|
23
|
+
{ provide: ConversationsHandlerService, useValue: convHandler },
|
|
24
|
+
{ provide: ArchivedConversationsHandlerService, useValue: archivedHandler },
|
|
25
|
+
],
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('should initialize and track token and user', () => {
|
|
30
|
+
const mgr = TestBed.inject(ChatManager);
|
|
31
|
+
|
|
32
|
+
mgr.initialize();
|
|
33
|
+
expect(mgr.getOpenInfoConversation()).toBeTrue();
|
|
34
|
+
|
|
35
|
+
mgr.setTiledeskToken('tok');
|
|
36
|
+
expect(mgr.getTiledeskToken()).toBe('tok');
|
|
37
|
+
|
|
38
|
+
const user = { uid: 'u1' } as any;
|
|
39
|
+
mgr.setCurrentUser(user);
|
|
40
|
+
expect(mgr.getCurrentUser()).toBe(user);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('startApp should emit on BSStart', () => {
|
|
44
|
+
const mgr = TestBed.inject(ChatManager);
|
|
45
|
+
const user = { uid: 'u1' } as any;
|
|
46
|
+
mgr.setCurrentUser(user);
|
|
47
|
+
mgr.startApp();
|
|
48
|
+
expect(mgr.BSStart.getValue()).toBe(user);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it('should add and find conversation handler', () => {
|
|
52
|
+
const mgr = TestBed.inject(ChatManager);
|
|
53
|
+
mgr.initialize();
|
|
54
|
+
|
|
55
|
+
const h = { conversationWith: 'cid-1' } as ConversationHandlerService;
|
|
56
|
+
mgr.addConversationHandler(h);
|
|
57
|
+
|
|
58
|
+
expect(mgr.getConversationHandlerByConversationId('cid-1')).toBe(h);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it('goOffLine should clear user and dispose handlers', () => {
|
|
62
|
+
const mgr = TestBed.inject(ChatManager);
|
|
63
|
+
mgr.initialize();
|
|
64
|
+
mgr.setArchivedConversationsHandler(archivedHandler);
|
|
65
|
+
mgr.setConversationsHandler(convHandler);
|
|
66
|
+
mgr.goOffLine();
|
|
67
|
+
|
|
68
|
+
expect(mgr.getCurrentUser()).toBeNull();
|
|
69
|
+
expect(convHandler.dispose).toHaveBeenCalled();
|
|
70
|
+
expect(archivedHandler.dispose).toHaveBeenCalled();
|
|
71
|
+
});
|
|
72
|
+
});
|
|
@@ -1,12 +1,22 @@
|
|
|
1
|
+
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
2
|
+
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
|
1
3
|
import { TestBed } from '@angular/core/testing';
|
|
2
4
|
|
|
3
5
|
import { ScriptService } from './script.service';
|
|
4
6
|
|
|
5
7
|
describe('ScriptService', () => {
|
|
6
|
-
beforeEach(() =>
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
TestBed.configureTestingModule({
|
|
10
|
+
providers: [
|
|
11
|
+
ScriptService,
|
|
12
|
+
provideHttpClient(withInterceptorsFromDi()),
|
|
13
|
+
provideHttpClientTesting(),
|
|
14
|
+
],
|
|
15
|
+
});
|
|
16
|
+
});
|
|
7
17
|
|
|
8
18
|
it('should be created', () => {
|
|
9
|
-
const service
|
|
19
|
+
const service = TestBed.inject(ScriptService);
|
|
10
20
|
expect(service).toBeTruthy();
|
|
11
21
|
});
|
|
12
22
|
});
|
|
@@ -56,6 +56,10 @@ export const TYPE_MSG_FILE = 'file';
|
|
|
56
56
|
export const TYPE_MSG_BUTTON = 'button';
|
|
57
57
|
export const TYPE_MSG_EMAIL = 'email';
|
|
58
58
|
export const TYPE_MSG_FORM = 'form';
|
|
59
|
+
export const TYPE_MSG_URL_PREVIEW = 'url_preview';
|
|
60
|
+
|
|
61
|
+
export const JSON_SOURCE_FIELD_URL = 'source_name';
|
|
62
|
+
export const JSON_SOURCE_FIELD_TITLE = 'source_file_name';
|
|
59
63
|
|
|
60
64
|
export const MAX_WIDTH_IMAGES = 230;
|
|
61
65
|
export const MIN_WIDTH_IMAGES = 130;
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
MESSAGE_TYPE_MINE,
|
|
7
7
|
MESSAGE_TYPE_OTHERS,
|
|
8
8
|
MAX_WIDTH_IMAGES,
|
|
9
|
+
MIN_WIDTH_IMAGES,
|
|
9
10
|
INFO_MESSAGE_TYPE,
|
|
10
11
|
CHANNEL_TYPE,
|
|
11
12
|
MESSAGE_TYPE_PRIVATE
|
|
@@ -48,6 +49,13 @@ export function isAudio(message: any) {
|
|
|
48
49
|
return false;
|
|
49
50
|
}
|
|
50
51
|
|
|
52
|
+
export function isJsonSources(message: any) {
|
|
53
|
+
if (message && message.type && message.type === 'url_preview') {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
|
|
51
59
|
export function isAudioTTS(message: any) {
|
|
52
60
|
if (message && message.type && message.type === 'tts' && message.metadata && message.metadata.src && message.metadata.type.includes('audio') ) {
|
|
53
61
|
return true;
|
|
@@ -321,7 +329,21 @@ export function commandToMessage(msg: MessageModel, conversation: ConversationMo
|
|
|
321
329
|
message.type = msg['type']
|
|
322
330
|
message.isSender = isSender(message.sender, currentUserId)
|
|
323
331
|
message.attributes = { ...conversation.attributes, ...msg['attributes']}
|
|
324
|
-
|
|
325
332
|
|
|
326
333
|
return message as MessageModel
|
|
327
334
|
}
|
|
335
|
+
|
|
336
|
+
export function calcImageSize(metadata: any): { width: number; height: number } {
|
|
337
|
+
const size = { width: metadata.width, height: metadata.height };
|
|
338
|
+
if (!metadata.width) return size;
|
|
339
|
+
if (metadata.width <= 55) {
|
|
340
|
+
const ratio = metadata.width / metadata.height;
|
|
341
|
+
size.width = MIN_WIDTH_IMAGES;
|
|
342
|
+
size.height = MIN_WIDTH_IMAGES / ratio;
|
|
343
|
+
} else if (metadata.width > MAX_WIDTH_IMAGES) {
|
|
344
|
+
const ratio = metadata.width / metadata.height;
|
|
345
|
+
size.width = MAX_WIDTH_IMAGES;
|
|
346
|
+
size.height = MAX_WIDTH_IMAGES / ratio;
|
|
347
|
+
}
|
|
348
|
+
return size;
|
|
349
|
+
}
|
|
@@ -24,5 +24,7 @@
|
|
|
24
24
|
"dashboardUrl": "${DASHBOARD_URL}",
|
|
25
25
|
"authPersistence": "${AUTH_PERSISTENCE}",
|
|
26
26
|
"enbedJs": "${ENBED_JS}",
|
|
27
|
-
"brandSrc": "${BRAND_SRC}"
|
|
27
|
+
"brandSrc": "${BRAND_SRC}",
|
|
28
|
+
"voiceProxyWsUrl": "${VOICE_PROXY_WS_URL}",
|
|
29
|
+
"voiceProxyApiBaseUrl": "${VOICE_PROXY_API_BASE_URL}"
|
|
28
30
|
}
|
package/src/widget-config.json
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
2
|
+
"chatEngine": "mqtt",
|
|
3
|
+
"uploadEngine": "native",
|
|
4
|
+
"pushEngine": "none",
|
|
5
|
+
"logLevel": "info" ,
|
|
6
|
+
"remoteTranslationsUrl": "https://localhost:3000/api/",
|
|
7
|
+
"firebaseConfig": {
|
|
8
|
+
"apiKey": "CHANGEIT",
|
|
9
|
+
"authDomain": "CHANGEIT.firebaseapp.com",
|
|
10
|
+
"databaseURL": "https://CHANGEIT.firebaseio.com",
|
|
11
|
+
"projectId": "CHANGEIT",
|
|
12
|
+
"storageBucket": "CHANGEIT.appspot.com",
|
|
13
|
+
"messagingSenderId": "CHANGEIT",
|
|
14
|
+
"appId": "",
|
|
15
|
+
"tenant": "tilechat"
|
|
16
|
+
},
|
|
17
|
+
"chat21Config": {
|
|
18
|
+
"appId": "tilechat",
|
|
19
|
+
"MQTTendpoint": "wss://localhost:3000/mqws/ws",
|
|
20
|
+
"APIendpoint": "https://localhost:3000/chatapi/api"
|
|
21
|
+
},
|
|
22
|
+
"apiUrl": "https://localhost:3000/api/",
|
|
23
|
+
"baseImageUrl": "https://localhost:3000/api/",
|
|
24
|
+
"dashboardUrl": "/dashboard/",
|
|
25
|
+
"authPersistence": "LOCAL",
|
|
26
|
+
"enbedJs": "true",
|
|
27
|
+
"brandSrc": "",
|
|
28
|
+
"voiceProxyWsUrl": "wss://localhost:3000/speech/ws/voice",
|
|
29
|
+
"voiceProxyApiBaseUrl": "https://localhost:3000/speech/"
|
|
29
30
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { test, expect, type Page } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
const BASE_QUERY =
|
|
4
|
+
'tiledesk_projectid=65c5f17ab4e95a0013a0181a&tiledesk_isLogEnabled=true&tiledesk_open=true';
|
|
5
|
+
|
|
6
|
+
function widgetFrame(page: Page) {
|
|
7
|
+
return page.frameLocator('#tiledeskiframe');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
test.describe('Widget TWP — form / testi / allegati / reparti', () => {
|
|
11
|
+
test.beforeEach(({ page }) => {
|
|
12
|
+
page.setDefaultNavigationTimeout(120_000);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
test('dopo nuova conversazione compare conversazione, prechat o selezione reparto', async ({ page }) => {
|
|
16
|
+
await page.goto(`/assets/twp/index.html?${BASE_QUERY}`);
|
|
17
|
+
await expect(page.locator('#tiledeskiframe')).toBeAttached({ timeout: 120_000 });
|
|
18
|
+
const w = widgetFrame(page);
|
|
19
|
+
await w.locator('#c21-app-list-conversations .c21-button-primary').first().click({ timeout: 120_000 });
|
|
20
|
+
await expect(
|
|
21
|
+
w.locator('chat-conversation, chat-selection-department, chat-prechat-form').first(),
|
|
22
|
+
).toBeVisible({ timeout: 120_000 });
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test('se compare la modale reparti, elenco pulsanti e click impostano flusso', async ({ page }) => {
|
|
26
|
+
await page.goto(`/assets/twp/index.html?${BASE_QUERY}`);
|
|
27
|
+
const w = widgetFrame(page);
|
|
28
|
+
await w.locator('#c21-app-list-conversations .c21-button-primary').first().click({ timeout: 120_000 });
|
|
29
|
+
const panel = w.locator('#chat21-selection-department');
|
|
30
|
+
try {
|
|
31
|
+
await panel.waitFor({ state: 'visible', timeout: 25_000 });
|
|
32
|
+
} catch {
|
|
33
|
+
test.skip();
|
|
34
|
+
}
|
|
35
|
+
await expect(panel).toHaveAttribute('role', 'dialog');
|
|
36
|
+
const deptButtons = panel.locator('.c21-button-department');
|
|
37
|
+
await expect(deptButtons.first()).toBeVisible();
|
|
38
|
+
const count = await deptButtons.count();
|
|
39
|
+
expect(count).toBeGreaterThan(0);
|
|
40
|
+
await deptButtons.first().click();
|
|
41
|
+
await expect(w.locator('chat-conversation').first()).toBeAttached({ timeout: 120_000 });
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
test('con prechat attivato da URL può comparire textarea o form (best-effort)', async ({ page }) => {
|
|
45
|
+
await page.goto(`/assets/twp/index.html?${BASE_QUERY}&tiledesk_preChatForm=true`);
|
|
46
|
+
const w = widgetFrame(page);
|
|
47
|
+
await w.locator('#c21-app-list-conversations .c21-button-primary').first().click({ timeout: 120_000 });
|
|
48
|
+
const prechat = w.locator('chat-prechat-form');
|
|
49
|
+
const textarea = w.locator('textarea#c21-prechat-notes, textarea.form-control, chat-form-textarea textarea');
|
|
50
|
+
await expect(prechat.or(textarea.first())).toBeVisible({ timeout: 120_000 });
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
test('messaggio in conversazione: area testo o bubble visibile nel frame', async ({ page }) => {
|
|
54
|
+
await page.goto(`/assets/twp/index.html?${BASE_QUERY}`);
|
|
55
|
+
const w = widgetFrame(page);
|
|
56
|
+
await w.locator('#c21-app-list-conversations .c21-button-primary').first().click({ timeout: 120_000 });
|
|
57
|
+
await expect(
|
|
58
|
+
w.locator('chat-conversation, chat-prechat-form, chat-selection-department').first(),
|
|
59
|
+
).toBeVisible({ timeout: 120_000 });
|
|
60
|
+
const conv = w.locator('chat-conversation');
|
|
61
|
+
if (await conv.isVisible().catch(() => false)) {
|
|
62
|
+
await expect(
|
|
63
|
+
conv.locator('.message_innerhtml, chat-text, textarea, [contenteditable]').first(),
|
|
64
|
+
).toBeVisible({ timeout: 60_000 });
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Pagina dev: campi testo + pulsante "Test this setting" chiamano onClick* e scrivono su window.tiledeskSettings.
|
|
5
|
+
* Verifica che i valori fake restino coerenti con quanto impostato nel codice inline della pagina.
|
|
6
|
+
*/
|
|
7
|
+
test.describe('index-dev.html tiledeskSettings da input', () => {
|
|
8
|
+
test.beforeEach(({ page }) => {
|
|
9
|
+
page.setDefaultNavigationTimeout(120_000);
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
test('marginX / marginY / welcomeTitle aggiornano window.tiledeskSettings', async ({ page }) => {
|
|
13
|
+
await page.goto(
|
|
14
|
+
'http://127.0.0.1:4203/assets/twp/index-dev.html?tiledesk_projectid=65c5f17ab4e95a0013a0181a&tiledesk_isLogEnabled=true',
|
|
15
|
+
);
|
|
16
|
+
const out = await page.evaluate(() => {
|
|
17
|
+
const mx = document.querySelector('#marginX') as HTMLInputElement;
|
|
18
|
+
const my = document.querySelector('#marginY') as HTMLInputElement;
|
|
19
|
+
const wt = document.querySelector('#welcomeTitle') as HTMLInputElement;
|
|
20
|
+
mx.value = '11px';
|
|
21
|
+
my.value = '22px';
|
|
22
|
+
wt.value = 'Titolo fake';
|
|
23
|
+
(window as any).onClickMarginX();
|
|
24
|
+
(window as any).onClickMarginY();
|
|
25
|
+
(window as any).onClickWelcomeTitle();
|
|
26
|
+
const s = (window as any).tiledeskSettings;
|
|
27
|
+
return { marginX: s.marginX, marginY: s.marginY, welcomeTitle: s.welcomeTitle };
|
|
28
|
+
});
|
|
29
|
+
expect(out.marginX).toBe('11px');
|
|
30
|
+
expect(out.marginY).toBe('22px');
|
|
31
|
+
expect(out.welcomeTitle).toBe('Titolo fake');
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
test('calloutTitle / widgetTitle / departmentID aggiornano tiledeskSettings', async ({ page }) => {
|
|
35
|
+
await page.goto(
|
|
36
|
+
'http://127.0.0.1:4203/assets/twp/index-dev.html?tiledesk_projectid=65c5f17ab4e95a0013a0181a&tiledesk_isLogEnabled=true',
|
|
37
|
+
);
|
|
38
|
+
const out = await page.evaluate(() => {
|
|
39
|
+
(document.querySelector('#calloutTitle') as HTMLInputElement).value = 'Callout FAKE';
|
|
40
|
+
(document.querySelector('#widgetTitle') as HTMLInputElement).value = 'Widget FAKE';
|
|
41
|
+
(document.querySelector('#departmentID') as HTMLInputElement).value = 'dep-xyz';
|
|
42
|
+
(window as any).onClickCalloutTitle();
|
|
43
|
+
(window as any).onClickWidgetTitle();
|
|
44
|
+
(window as any).onClickDepartmentId();
|
|
45
|
+
const s = (window as any).tiledeskSettings;
|
|
46
|
+
return { calloutTitle: s.calloutTitle, widgetTitle: s.widgetTitle, departmentID: s.departmentID };
|
|
47
|
+
});
|
|
48
|
+
expect(out.calloutTitle).toBe('Callout FAKE');
|
|
49
|
+
expect(out.widgetTitle).toBe('Widget FAKE');
|
|
50
|
+
expect(out.departmentID).toBe('dep-xyz');
|
|
51
|
+
});
|
|
52
|
+
});
|