@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/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.
|
|
4
|
+
"version": "5.1.33-rc11",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://www.tiledesk.com",
|
|
7
7
|
"repository": {
|
|
@@ -14,9 +14,11 @@
|
|
|
14
14
|
"start": "ng serve",
|
|
15
15
|
"build": "ng build",
|
|
16
16
|
"test": "ng test",
|
|
17
|
+
"test:e2e": "playwright test",
|
|
17
18
|
"lint": "ng lint",
|
|
18
19
|
"e2e": "ng e2e",
|
|
19
|
-
"source-map-explorer": "source-map-explorer dist/*.js"
|
|
20
|
+
"source-map-explorer": "source-map-explorer dist/*.js",
|
|
21
|
+
"voice-mock": "node mocks/voice-websocket-mock/server.cjs"
|
|
20
22
|
},
|
|
21
23
|
"private": false,
|
|
22
24
|
"dependencies": {
|
|
@@ -55,6 +57,7 @@
|
|
|
55
57
|
"@angular/cli": "^18.2.19",
|
|
56
58
|
"@angular/compiler-cli": "^18.2.13",
|
|
57
59
|
"@angular/language-service": "^18.2.13",
|
|
60
|
+
"@playwright/test": "^1.59.1",
|
|
58
61
|
"@types/jasmine": "^3.6.11",
|
|
59
62
|
"@types/jasminewd2": "~2.0.3",
|
|
60
63
|
"@types/marked": "^6.0.0",
|
|
@@ -71,6 +74,7 @@
|
|
|
71
74
|
"protractor": "~7.0.0",
|
|
72
75
|
"ts-node": "~7.0.0",
|
|
73
76
|
"tslint": "~6.1.0",
|
|
74
|
-
"typescript": "~5.4"
|
|
77
|
+
"typescript": "~5.4",
|
|
78
|
+
"ws": "^8.18.0"
|
|
75
79
|
}
|
|
76
80
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineConfig, devices } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* See https://playwright.dev/docs/test-configuration.
|
|
5
|
+
*/
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
testDir: './tests',
|
|
8
|
+
timeout: 120_000,
|
|
9
|
+
expect: { timeout: 30_000 },
|
|
10
|
+
fullyParallel: true,
|
|
11
|
+
forbidOnly: !!process.env.CI,
|
|
12
|
+
retries: process.env.CI ? 2 : 0,
|
|
13
|
+
workers: process.env.CI ? 1 : undefined,
|
|
14
|
+
reporter: 'html',
|
|
15
|
+
use: {
|
|
16
|
+
baseURL: 'http://127.0.0.1:4203',
|
|
17
|
+
trace: 'on-first-retry',
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Solo Chromium: i test TWP chiamano API Tiledesk reali; più browser in parallelo
|
|
22
|
+
* aumentano flakiness. Per Firefox/WebKit decommentare i progetti sotto.
|
|
23
|
+
*/
|
|
24
|
+
projects: [
|
|
25
|
+
{
|
|
26
|
+
name: 'chromium',
|
|
27
|
+
use: { ...devices['Desktop Chrome'] },
|
|
28
|
+
},
|
|
29
|
+
// { name: 'firefox', use: { ...devices['Desktop Firefox'] } },
|
|
30
|
+
// { name: 'webkit', use: { ...devices['Desktop Safari'] } },
|
|
31
|
+
],
|
|
32
|
+
|
|
33
|
+
webServer: {
|
|
34
|
+
command: 'npx ng serve widget --port 4203 --host 127.0.0.1',
|
|
35
|
+
url: 'http://127.0.0.1:4203/',
|
|
36
|
+
reuseExistingServer: !process.env.CI,
|
|
37
|
+
timeout: 300_000,
|
|
38
|
+
stdout: 'pipe',
|
|
39
|
+
stderr: 'pipe',
|
|
40
|
+
},
|
|
41
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
<div id="tiledesk-container" [class.active]="g.isShown"
|
|
1
|
+
<!-- tabindex="9999" -->
|
|
2
|
+
<div id="tiledesk-container" [class.active]="g.isShown">
|
|
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,8 +50,18 @@ body {
|
|
|
50
50
|
margin:0px;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
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
|
+
}
|
|
55
65
|
|
|
56
66
|
|
|
57
67
|
|
|
@@ -242,10 +252,7 @@ chat-root {
|
|
|
242
252
|
height: 100%;
|
|
243
253
|
|
|
244
254
|
// ========= BEGIN: RESET CSS TAG ========= //
|
|
245
|
-
|
|
246
|
-
outline: none;
|
|
247
|
-
}
|
|
248
|
-
button{
|
|
255
|
+
button {
|
|
249
256
|
cursor: pointer;
|
|
250
257
|
}
|
|
251
258
|
|
|
@@ -255,16 +262,21 @@ chat-root {
|
|
|
255
262
|
|
|
256
263
|
textarea,
|
|
257
264
|
textarea:visited,
|
|
258
|
-
textarea:focus,
|
|
259
265
|
textarea:hover,
|
|
260
|
-
textarea:active{
|
|
261
|
-
// all: unset;
|
|
266
|
+
textarea:active {
|
|
262
267
|
line-height: 20px!important;
|
|
263
|
-
|
|
264
|
-
box-shadow:none!important;
|
|
268
|
+
box-shadow: none!important;
|
|
265
269
|
border: 0px solid var(--trasp-light-black)!important;
|
|
266
270
|
}
|
|
267
271
|
|
|
272
|
+
textarea:focus:not(:focus-visible) {
|
|
273
|
+
outline: none!important;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
textarea:focus-visible {
|
|
277
|
+
outline: 0px !important;
|
|
278
|
+
}
|
|
279
|
+
|
|
268
280
|
// ========= BEGIN: CSS APP.COMPONENT ========= //
|
|
269
281
|
.c21-button-clean {
|
|
270
282
|
-webkit-appearance: initial;
|
|
@@ -403,7 +415,7 @@ chat-root {
|
|
|
403
415
|
}
|
|
404
416
|
}
|
|
405
417
|
button.c21-button-primary:hover,
|
|
406
|
-
button.c21-button-primary:focus,
|
|
418
|
+
button.c21-button-primary:focus:not(:focus-visible),
|
|
407
419
|
button.c21-button-primary:active {
|
|
408
420
|
//outline-width: 0px;
|
|
409
421
|
opacity: 0.8;
|
|
@@ -419,10 +431,9 @@ chat-root {
|
|
|
419
431
|
cursor: pointer;
|
|
420
432
|
}
|
|
421
433
|
button.c21-button-link:hover,
|
|
422
|
-
button.c21-button-link:focus,
|
|
434
|
+
button.c21-button-link:focus:not(:focus-visible),
|
|
423
435
|
button.c21-button-link:active {
|
|
424
436
|
text-decoration: underline;
|
|
425
|
-
outline: none;
|
|
426
437
|
}
|
|
427
438
|
|
|
428
439
|
.c21-divBudge {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
|
1
2
|
import { Triggerhandler } from './../chat21-core/utils/triggerHandler';
|
|
2
3
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|
3
4
|
import { RouterTestingModule } from '@angular/router/testing';
|
|
@@ -20,25 +21,32 @@ import { PresenceService } from 'src/chat21-core/providers/abstract/presence.ser
|
|
|
20
21
|
import { UploadService } from 'src/chat21-core/providers/abstract/upload.service';
|
|
21
22
|
import { AppConfigService } from './providers/app-config.service';
|
|
22
23
|
import { ChatManager } from 'src/chat21-core/providers/chat-manager';
|
|
23
|
-
import {
|
|
24
|
+
import { Globals } from './utils/globals';
|
|
25
|
+
|
|
26
|
+
|
|
24
27
|
import { CustomLogger } from 'src/chat21-core/providers/logger/customLogger';
|
|
25
28
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
26
29
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
30
|
+
import { of } from 'rxjs';
|
|
27
31
|
|
|
28
32
|
describe('AppComponent', () => {
|
|
29
33
|
let component: AppComponent;
|
|
30
34
|
let fixture: ComponentFixture<AppComponent>;
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
const ngxlogger = jasmine.createSpyObj('NGXLogger', ['log', 'trace', 'debug', 'warn', 'error', 'info']);
|
|
36
|
+
const customLogger = new CustomLogger(ngxlogger);
|
|
33
37
|
|
|
34
38
|
beforeEach(waitForAsync(() => {
|
|
39
|
+
LoggerInstance.setInstance(customLogger);
|
|
40
|
+
spyOn(AppComponent.prototype, 'ngAfterViewInit').and.stub();
|
|
35
41
|
TestBed.configureTestingModule({
|
|
36
42
|
declarations: [
|
|
37
43
|
AppComponent
|
|
38
44
|
],
|
|
39
45
|
imports: [RouterTestingModule,
|
|
40
46
|
TranslateModule.forRoot()],
|
|
47
|
+
schemas: [NO_ERRORS_SCHEMA],
|
|
41
48
|
providers: [
|
|
49
|
+
Globals,
|
|
42
50
|
Triggerhandler,
|
|
43
51
|
GlobalSettingsService,
|
|
44
52
|
AppStorageService,
|
|
@@ -63,11 +71,18 @@ describe('AppComponent', () => {
|
|
|
63
71
|
}));
|
|
64
72
|
|
|
65
73
|
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
|
+
|
|
66
84
|
fixture = TestBed.createComponent(AppComponent);
|
|
67
85
|
component = fixture.componentInstance;
|
|
68
|
-
LoggerInstance.setInstance(customLogger)
|
|
69
|
-
let logger = LoggerInstance.getInstance()
|
|
70
|
-
component['logger']= logger
|
|
71
86
|
fixture.detectChanges();
|
|
72
87
|
});
|
|
73
88
|
|
package/src/app/app.module.ts
CHANGED
|
@@ -58,6 +58,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
|
58
58
|
import { APP_INITIALIZER, NgModule } from '@angular/core';
|
|
59
59
|
import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
60
60
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
61
|
+
import { A11yModule } from '@angular/cdk/a11y';
|
|
61
62
|
import { environment } from 'src/environments/environment';
|
|
62
63
|
|
|
63
64
|
//THIRD-PART MODULES
|
|
@@ -145,6 +146,7 @@ import {
|
|
|
145
146
|
} from './providers/voice/STT&TTS/speech-provider.abstract';
|
|
146
147
|
import { ErrorAlertComponent } from './component/error-alert/error-alert.component';
|
|
147
148
|
import { ConfirmCloseComponent } from './modals/confirm-close/confirm-close.component';
|
|
149
|
+
import { JsonSourcesComponent } from './component/message/json-sources/json-sources.component';
|
|
148
150
|
|
|
149
151
|
|
|
150
152
|
|
|
@@ -318,6 +320,7 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
|
|
|
318
320
|
LikeUnlikeComponent,
|
|
319
321
|
TooltipDirective,
|
|
320
322
|
CarouselComponent,
|
|
323
|
+
JsonSourcesComponent,
|
|
321
324
|
ErrorAlertComponent,
|
|
322
325
|
ConfirmCloseComponent
|
|
323
326
|
],
|
|
@@ -325,6 +328,7 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
|
|
|
325
328
|
BrowserAnimationsModule,
|
|
326
329
|
FormsModule,
|
|
327
330
|
ReactiveFormsModule,
|
|
331
|
+
A11yModule,
|
|
328
332
|
PickerModule,
|
|
329
333
|
TranslateModule.forRoot({
|
|
330
334
|
// defaultLanguage: 'en',
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
|
-
<!-- onFocus="document.querySelector('[start-focus-chat21-conversation-component]').focus()" -->
|
|
4
|
-
<div id="chat21-conversation-component"
|
|
2
|
+
<div id="chat21-conversation-component"
|
|
5
3
|
#afConversationComponent
|
|
6
|
-
|
|
7
|
-
aria-
|
|
8
|
-
|
|
4
|
+
role="region"
|
|
5
|
+
[attr.aria-label]="g?.project?.widgetTitle">
|
|
6
|
+
|
|
7
|
+
<!-- Skip-link: revealed only on focus, jumps straight to the message composer (WCAG 2.4.1 Bypass Blocks). -->
|
|
8
|
+
<a class="c21-skip-link" href="#chat21-main-message-context"
|
|
9
|
+
(click)="$event.preventDefault(); skipToCompose()">
|
|
10
|
+
{{ translationMapFooter?.get('SKIP_TO_COMPOSER') || 'Skip to message composer' }}
|
|
11
|
+
</a>
|
|
9
12
|
|
|
10
13
|
<!-- HEADER -->
|
|
11
14
|
<chat-conversation-header
|
|
@@ -115,12 +118,16 @@
|
|
|
115
118
|
</dialog>
|
|
116
119
|
|
|
117
120
|
<!-- FOOTER -->
|
|
118
|
-
<!-- [class.maximize-width]="(g?.singleConversation && hideTextAreaContent) || (isConversationArchived && !g?.allowReopen)" -->
|
|
119
121
|
<div id="chat21-footer">
|
|
120
|
-
<
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
<button *ngIf="showBadgeScroollToBottom"
|
|
123
|
+
type="button"
|
|
124
|
+
id="chat21-buttonToBottom"
|
|
125
|
+
class="c21-button-clean"
|
|
126
|
+
[attr.aria-label]="translationMapContent?.get('BUTTON_SCROLL_TO_BOTTOM') || 'Scroll to last message'"
|
|
127
|
+
(click)="scrollToBottom()">
|
|
128
|
+
<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path opacity=".87" fill="none" d="M24 24H0V0h24v24z"/><path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"/></svg>
|
|
129
|
+
<span *ngIf="messagesBadgeCount!=0" id="chat21-divBudge" class="c21-divBudge" aria-hidden="true">{{messagesBadgeCount}}</span>
|
|
130
|
+
</button>
|
|
124
131
|
|
|
125
132
|
<chat-conversation-footer
|
|
126
133
|
[conversationWith]="conversationWith"
|
|
@@ -154,6 +161,7 @@
|
|
|
154
161
|
(onAttachmentFileButtonClicked)="onAttachmentFileButtonClicked($event)"
|
|
155
162
|
(onNewConversationButtonClicked)="onNewConversationButtonClickedFN($event)"
|
|
156
163
|
(onStreamAudioActiveChange)="onStreamAudioActiveChange($event)"
|
|
164
|
+
(onStreamAudioConnectingChange)="onStreamAudioConnectingChange($event)"
|
|
157
165
|
(onCloseChatButtonClicked)="onCloseChatButtonClickedFN($event)">
|
|
158
166
|
</chat-conversation-footer>
|
|
159
167
|
|
|
@@ -13,6 +13,34 @@
|
|
|
13
13
|
bottom: var(--chat-footer-height) !important
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
/* Skip-link visible only when focused via keyboard (WCAG 2.4.1) */
|
|
17
|
+
.c21-skip-link {
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: -40px;
|
|
20
|
+
left: 8px;
|
|
21
|
+
z-index: 100;
|
|
22
|
+
padding: 6px 12px;
|
|
23
|
+
background-color: #1a73e8;
|
|
24
|
+
color: #ffffff !important;
|
|
25
|
+
border-radius: 4px;
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
text-decoration: none;
|
|
28
|
+
transition: top 0.15s ease-in-out;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.c21-skip-link:focus,
|
|
32
|
+
.c21-skip-link:focus-visible {
|
|
33
|
+
top: 8px;
|
|
34
|
+
outline: 2px solid #ffffff;
|
|
35
|
+
outline-offset: 2px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media (prefers-reduced-motion: reduce) {
|
|
39
|
+
.c21-skip-link {
|
|
40
|
+
transition: none;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
16
44
|
// ============= CSS #chat21-conversation-component ================= //
|
|
17
45
|
#chat21-conversation-component {
|
|
18
46
|
// background-color: #ffffff;
|