@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.
- package/.github/workflows/docker-community-push-latest.yml +13 -23
- package/.github/workflows/docker-image-tag-community-tag-push.yml +12 -22
- package/CHANGELOG.md +8 -129
- package/Dockerfile +5 -4
- package/angular.json +3 -21
- package/docs/changelog/this-branch.md +0 -36
- package/env.sample +2 -3
- package/nginx.conf +2 -22
- package/package.json +3 -10
- package/src/app/app.component.html +2 -2
- package/src/app/app.component.scss +14 -25
- package/src/app/app.component.spec.ts +6 -21
- package/src/app/app.component.ts +9 -10
- package/src/app/app.module.ts +0 -13
- package/src/app/component/conversation-detail/conversation/conversation.component.html +11 -25
- package/src/app/component/conversation-detail/conversation/conversation.component.scss +2 -40
- package/src/app/component/conversation-detail/conversation/conversation.component.spec.ts +75 -644
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +14 -100
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.html +13 -25
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.spec.ts +5 -123
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.ts +0 -1
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.html +10 -23
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.scss +1 -19
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.spec.ts +149 -242
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.ts +5 -8
- package/src/app/component/conversation-detail/conversation-emojii/conversation-emojii.component.spec.ts +3 -53
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html +96 -200
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +6 -211
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.spec.ts +78 -452
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +76 -291
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.html +53 -113
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.scss +4 -12
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.spec.ts +29 -274
- package/src/app/component/conversation-detail/conversation-internal-frame/conversation-internal-frame.component.html +9 -23
- package/src/app/component/conversation-detail/conversation-internal-frame/conversation-internal-frame.component.spec.ts +8 -80
- package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.html +23 -29
- package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.spec.ts +16 -185
- package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.ts +14 -34
- package/src/app/component/error-alert/error-alert.component.spec.ts +5 -65
- package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.html +7 -16
- package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.scss +0 -21
- package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.spec.ts +7 -89
- 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 +21 -163
- package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.html +4 -8
- package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.scss +5 -10
- package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.spec.ts +16 -90
- package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.ts +0 -26
- package/src/app/component/form/inputs/form-label/form-label.component.spec.ts +11 -45
- package/src/app/component/form/inputs/form-radio-button/form-radio-button.component.spec.ts +6 -24
- package/src/app/component/form/inputs/form-select/form-select.component.spec.ts +5 -14
- package/src/app/component/form/inputs/form-text/form-text.component.html +12 -14
- package/src/app/component/form/inputs/form-text/form-text.component.scss +1 -11
- package/src/app/component/form/inputs/form-text/form-text.component.spec.ts +17 -113
- package/src/app/component/form/inputs/form-text/form-text.component.ts +3 -35
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.html +11 -13
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.scss +5 -6
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.spec.ts +13 -149
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.ts +0 -26
- package/src/app/component/form/prechat-form/prechat-form.component.html +11 -14
- package/src/app/component/form/prechat-form/prechat-form.component.spec.ts +10 -102
- package/src/app/component/form/prechat-form/prechat-form.component.ts +1 -8
- package/src/app/component/home/home.component.html +31 -38
- package/src/app/component/home/home.component.scss +2 -4
- package/src/app/component/home/home.component.spec.ts +11 -226
- package/src/app/component/home-conversations/home-conversations.component.html +26 -30
- package/src/app/component/home-conversations/home-conversations.component.scss +0 -3
- package/src/app/component/home-conversations/home-conversations.component.spec.ts +36 -212
- package/src/app/component/last-message/last-message.component.html +9 -15
- package/src/app/component/last-message/last-message.component.scss +2 -16
- package/src/app/component/last-message/last-message.component.spec.ts +23 -204
- package/src/app/component/last-message/last-message.component.ts +1 -4
- package/src/app/component/launcher-button/launcher-button.component.html +13 -8
- package/src/app/component/launcher-button/launcher-button.component.spec.ts +8 -104
- package/src/app/component/list-all-conversations/list-all-conversations.component.html +17 -12
- package/src/app/component/list-all-conversations/list-all-conversations.component.scss +0 -2
- package/src/app/component/list-conversations/list-conversations.component.html +22 -22
- package/src/app/component/menu-options/menu-options.component.html +20 -30
- package/src/app/component/menu-options/menu-options.component.spec.ts +9 -125
- package/src/app/component/message/audio/audio.component.html +15 -13
- package/src/app/component/message/audio/audio.component.spec.ts +5 -140
- package/src/app/component/message/audio/audio.component.ts +5 -1
- package/src/app/component/message/avatar/avatar.component.html +2 -2
- package/src/app/component/message/avatar/avatar.component.spec.ts +7 -99
- package/src/app/component/message/bubble-message/bubble-message.component.html +51 -38
- package/src/app/component/message/bubble-message/bubble-message.component.scss +1 -54
- package/src/app/component/message/bubble-message/bubble-message.component.spec.ts +57 -154
- package/src/app/component/message/bubble-message/bubble-message.component.ts +11 -89
- package/src/app/component/message/buttons/action-button/action-button.component.html +4 -3
- package/src/app/component/message/buttons/action-button/action-button.component.spec.ts +5 -49
- package/src/app/component/message/buttons/link-button/link-button.component.scss +8 -5
- package/src/app/component/message/buttons/link-button/link-button.component.spec.ts +5 -50
- package/src/app/component/message/buttons/text-button/text-button.component.spec.ts +5 -44
- package/src/app/component/message/carousel/carousel.component.html +16 -29
- package/src/app/component/message/carousel/carousel.component.scss +8 -20
- package/src/app/component/message/carousel/carousel.component.spec.ts +3 -80
- package/src/app/component/message/carousel/carousel.component.ts +0 -16
- package/src/app/component/message/frame/frame.component.html +4 -9
- package/src/app/component/message/frame/frame.component.spec.ts +15 -34
- package/src/app/component/message/frame/frame.component.ts +2 -7
- 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 +7 -24
- package/src/app/component/message/image/image.component.html +10 -12
- package/src/app/component/message/image/image.component.scss +0 -16
- package/src/app/component/message/image/image.component.spec.ts +15 -101
- package/src/app/component/message/image/image.component.ts +51 -90
- package/src/app/component/message/info-message/info-message.component.spec.ts +14 -26
- package/src/app/component/message/like-unlike/like-unlike.component.html +9 -7
- package/src/app/component/message/like-unlike/like-unlike.component.spec.ts +3 -31
- package/src/app/component/message/return-receipt/return-receipt.component.spec.ts +17 -38
- package/src/app/component/message/text/text.component.html +3 -3
- package/src/app/component/message/text/text.component.scss +86 -80
- package/src/app/component/message/text/text.component.spec.ts +13 -106
- package/src/app/component/message-attachment/message-attachment.component.spec.ts +13 -134
- package/src/app/component/selection-department/selection-department.component.html +23 -21
- package/src/app/component/selection-department/selection-department.component.spec.ts +14 -159
- package/src/app/component/selection-department/selection-department.component.ts +1 -8
- package/src/app/component/send-button/send-button.component.html +13 -5
- 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 +81 -51
- package/src/app/directives/tooltip.directive.spec.ts +4 -8
- package/src/app/modals/confirm-close/confirm-close.component.html +8 -20
- package/src/app/modals/confirm-close/confirm-close.component.scss +0 -3
- package/src/app/modals/confirm-close/confirm-close.component.spec.ts +4 -13
- package/src/app/modals/confirm-close/confirm-close.component.ts +1 -8
- package/src/app/pipe/html-entites-encode.pipe.spec.ts +2 -35
- package/src/app/pipe/marked.pipe.spec.ts +2 -38
- package/src/app/pipe/marked.pipe.ts +41 -51
- package/src/app/providers/app-config.service.ts +2 -4
- package/src/app/providers/brand.service.spec.ts +2 -23
- package/src/app/providers/brand.service.ts +1 -1
- package/src/app/providers/global-settings.service.spec.ts +14 -1009
- package/src/app/providers/global-settings.service.ts +2 -82
- package/src/app/providers/translator.service.ts +6 -26
- package/src/app/sass/_variables.scss +0 -3
- package/src/app/sass/animations.scss +1 -19
- package/src/app/utils/globals.ts +1 -21
- package/src/app/utils/utils-resources.ts +1 -1
- package/src/assets/i18n/en.json +99 -106
- package/src/assets/i18n/es.json +100 -107
- package/src/assets/i18n/fr.json +100 -107
- package/src/assets/i18n/it.json +98 -107
- package/src/assets/twp/index-dev.html +0 -18
- package/src/chat21-core/models/message.ts +1 -2
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +2 -3
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +0 -12
- package/src/chat21-core/providers/scripts/script.service.spec.ts +2 -12
- package/src/chat21-core/providers/tiledesk/tiledesk-requests.service.ts +1 -1
- package/src/chat21-core/utils/utils-message.ts +0 -7
- package/src/chat21-core/utils/utils.ts +2 -5
- package/src/widget-config-template.json +1 -4
- package/src/widget-config.json +1 -4
- package/tsconfig.json +0 -5
- package/.angular-mcp-cache/package.json +0 -1
- package/.cursor/angular18-accessibility-auditor-skill.md +0 -442
- package/.cursor/mcp.json +0 -15
- package/.github/workflows/build.yml +0 -22
- package/.github/workflows/playwright.yml +0 -27
- package/mocks/voice-websocket-mock/server.cjs +0 -245
- package/playwright.config.ts +0 -41
- package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.html +0 -46
- package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.scss +0 -83
- package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.ts +0 -192
- package/src/app/component/form/prechat-form-test-mock.ts +0 -35
- package/src/app/component/message/audio-sync/audio-sync.component.html +0 -18
- package/src/app/component/message/audio-sync/audio-sync.component.scss +0 -65
- package/src/app/component/message/audio-sync/audio-sync.component.spec.ts +0 -103
- package/src/app/component/message/audio-sync/audio-sync.component.ts +0 -643
- package/src/app/providers/tts-audio-playback-coordinator.service.spec.ts +0 -117
- package/src/app/providers/tts-audio-playback-coordinator.service.ts +0 -109
- package/src/app/providers/voice/STT&TTS/openai-voice.config.ts +0 -12
- package/src/app/providers/voice/STT&TTS/openai-voice.provider.ts +0 -171
- package/src/app/providers/voice/STT&TTS/speech-provider.abstract.ts +0 -39
- package/src/app/providers/voice/audio.types.ts +0 -40
- package/src/app/providers/voice/vad.service.spec.ts +0 -28
- package/src/app/providers/voice/vad.service.ts +0 -70
- package/src/app/providers/voice/voice-streaming.service.spec.ts +0 -23
- package/src/app/providers/voice/voice-streaming.service.ts +0 -702
- package/src/app/providers/voice/voice-streaming.types.ts +0 -112
- package/src/app/providers/voice/voice.service.spec.ts +0 -227
- package/src/app/providers/voice/voice.service.ts +0 -973
- package/src/app/shims/onnxruntime-web-wasm.ts +0 -4
- package/src/assets/onnx/ort-wasm-simd-threaded.mjs +0 -59
- package/src/assets/onnx/ort-wasm-simd-threaded.wasm +0 -0
- package/src/assets/sounds/keyboard.mp3 +0 -0
- package/src/assets/twp/tiledesk_widget_files/widget-css-override-example.css +0 -14
- package/src/assets/vad/silero_vad_legacy.onnx +0 -0
- package/src/assets/vad/vad.worklet.bundle.min.js +0 -1
- package/src/chat21-core/providers/chat-manager.spec.ts +0 -72
- package/tests/widget-form-rich.spec.ts +0 -67
- package/tests/widget-index-dev-settings.spec.ts +0 -52
- package/tests/widget-twp-iframe.spec.ts +0 -39
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
font-size: var(--font-size-bubble-message, 14px);
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
/* Allineato a text.component.scss (.message_innerhtml, p) */
|
|
7
|
-
.message_innerhtml {
|
|
8
|
-
margin: 0;
|
|
9
|
-
|
|
10
|
-
&.marked {
|
|
11
|
-
padding: 12px 16px;
|
|
12
|
-
margin-block-start: 0em !important;
|
|
13
|
-
margin-block-end: 0em !important;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.lyrics {
|
|
18
|
-
font-size: inherit;
|
|
19
|
-
margin: 0;
|
|
20
|
-
// line-height: 1.4em;
|
|
21
|
-
font-style: normal;
|
|
22
|
-
letter-spacing: normal;
|
|
23
|
-
font-stretch: normal;
|
|
24
|
-
font-variant: normal;
|
|
25
|
-
font-weight: 300;
|
|
26
|
-
overflow: hidden;
|
|
27
|
-
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-wrap: wrap;
|
|
30
|
-
gap: 6px;
|
|
31
|
-
/* Colore bubble: da [style.color] / @Input() color — ereditato dalle .word */
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/* base word */
|
|
35
|
-
.word {
|
|
36
|
-
transition:
|
|
37
|
-
transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
|
|
38
|
-
color 0.3s ease,
|
|
39
|
-
opacity 0.3s ease,
|
|
40
|
-
filter 0.3s ease;
|
|
41
|
-
|
|
42
|
-
will-change: transform;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* FUTURE */
|
|
46
|
-
.word.future {
|
|
47
|
-
opacity: 0;
|
|
48
|
-
transform: scale(0.98);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/* PAST: stesso colore del testo bubble (@Input color sul <p>) */
|
|
52
|
-
.word.past {
|
|
53
|
-
opacity: 1;
|
|
54
|
-
color: inherit;
|
|
55
|
-
transform: scale(1);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/* ACTIVE (solo momentaneo, tipo “karaoke flash”) */
|
|
59
|
-
.word.active {
|
|
60
|
-
opacity: 1;
|
|
61
|
-
color: #00c3ff;
|
|
62
|
-
font-weight: 700;
|
|
63
|
-
transform: scale(1.18);
|
|
64
|
-
text-shadow: 0 0 10px rgba(0, 195, 255, 0.35);
|
|
65
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
|
|
4
|
-
import { AudioSyncComponent } from './audio-sync.component';
|
|
5
|
-
import { TtsAudioPlaybackCoordinator } from 'src/app/providers/tts-audio-playback-coordinator.service';
|
|
6
|
-
import { VoiceService } from 'src/app/providers/voice/voice.service';
|
|
7
|
-
import { Globals } from 'src/app/utils/globals';
|
|
8
|
-
|
|
9
|
-
describe('AudioSyncComponent', () => {
|
|
10
|
-
let component: AudioSyncComponent;
|
|
11
|
-
let fixture: ComponentFixture<AudioSyncComponent>;
|
|
12
|
-
let voiceService: { proxyTtsStreamUrl: string | null; proxyTtsUrl: string | null };
|
|
13
|
-
|
|
14
|
-
beforeEach(async () => {
|
|
15
|
-
voiceService = {
|
|
16
|
-
proxyTtsStreamUrl: 'https://speech.example.com/api/tts/stream',
|
|
17
|
-
proxyTtsUrl: 'https://speech.example.com/api/tts',
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
await TestBed.configureTestingModule({
|
|
21
|
-
declarations: [AudioSyncComponent],
|
|
22
|
-
imports: [CommonModule],
|
|
23
|
-
providers: [
|
|
24
|
-
{
|
|
25
|
-
provide: TtsAudioPlaybackCoordinator,
|
|
26
|
-
useValue: {
|
|
27
|
-
requestStart: (_ownerId: string, start: () => void) => start(),
|
|
28
|
-
releaseIfCurrent: jasmine.createSpy('releaseIfCurrent'),
|
|
29
|
-
release: jasmine.createSpy('release'),
|
|
30
|
-
stopAllPlayback$: { subscribe: () => ({ unsubscribe: () => undefined }) },
|
|
31
|
-
preemptPlayback$: { subscribe: () => ({ unsubscribe: () => undefined }) },
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
{ provide: Globals, useValue: { tiledeskToken: 'JWT test-token', jwt: '' } },
|
|
35
|
-
{ provide: VoiceService, useValue: voiceService },
|
|
36
|
-
],
|
|
37
|
-
})
|
|
38
|
-
.compileComponents();
|
|
39
|
-
|
|
40
|
-
fixture = TestBed.createComponent(AudioSyncComponent);
|
|
41
|
-
component = fixture.componentInstance;
|
|
42
|
-
fixture.detectChanges();
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
it('should create', () => {
|
|
46
|
-
expect(component).toBeTruthy();
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it('starts TTS playback from the proxy streaming endpoint first', () => {
|
|
50
|
-
component.message = {
|
|
51
|
-
uid: 'm1',
|
|
52
|
-
type: 'tts',
|
|
53
|
-
text: 'hello',
|
|
54
|
-
metadata: {},
|
|
55
|
-
isJustRecived: true,
|
|
56
|
-
} as any;
|
|
57
|
-
const audio = document.createElement('audio');
|
|
58
|
-
const startStreaming = spyOn(component as any, 'startStreamingFromEndpoint').and.stub();
|
|
59
|
-
|
|
60
|
-
(component as any).startPlayback(audio);
|
|
61
|
-
|
|
62
|
-
expect(startStreaming).toHaveBeenCalledWith(
|
|
63
|
-
audio,
|
|
64
|
-
'https://speech.example.com/api/tts/stream',
|
|
65
|
-
'https://speech.example.com/api/tts',
|
|
66
|
-
undefined,
|
|
67
|
-
);
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
it('requests browser-compatible MP3 for proxy REST TTS by default', () => {
|
|
71
|
-
component.message = {
|
|
72
|
-
uid: 'm1',
|
|
73
|
-
type: 'tts',
|
|
74
|
-
text: 'hello',
|
|
75
|
-
metadata: {},
|
|
76
|
-
} as any;
|
|
77
|
-
|
|
78
|
-
const body = (component as any).buildTtsRequestBody({});
|
|
79
|
-
|
|
80
|
-
expect(body).toEqual({
|
|
81
|
-
text: 'hello',
|
|
82
|
-
streaming: true,
|
|
83
|
-
outputFormat: 'mp3_44100_128',
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
it('does not override an explicit TTS outputFormat from message voice settings', () => {
|
|
88
|
-
component.message = {
|
|
89
|
-
uid: 'm1',
|
|
90
|
-
type: 'tts',
|
|
91
|
-
text: 'hello',
|
|
92
|
-
metadata: {},
|
|
93
|
-
} as any;
|
|
94
|
-
|
|
95
|
-
const body = (component as any).buildTtsRequestBody({ outputFormat: 'pcm_16000' });
|
|
96
|
-
|
|
97
|
-
expect(body).toEqual({
|
|
98
|
-
text: 'hello',
|
|
99
|
-
streaming: true,
|
|
100
|
-
outputFormat: 'pcm_16000',
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
});
|