@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
|
@@ -6,6 +6,7 @@ import { BehaviorSubject, Observable } from 'rxjs';
|
|
|
6
6
|
import { Globals } from '../utils/globals';
|
|
7
7
|
import { convertColorToRGBA, detectIfIsMobile, getImageUrlThumb, getParameterByName, stringToBoolean, stringToNumber } from '../utils/utils';
|
|
8
8
|
|
|
9
|
+
import { TemplateBindingParseResult } from '@angular/compiler';
|
|
9
10
|
import { AppStorageService } from '../../chat21-core/providers/abstract/app-storage.service';
|
|
10
11
|
import { LoggerService } from '../../chat21-core/providers/abstract/logger.service';
|
|
11
12
|
import { LoggerInstance } from '../../chat21-core/providers/logger/loggerInstance';
|
|
@@ -66,8 +67,6 @@ export class GlobalSettingsService {
|
|
|
66
67
|
this.globals.logLevel = this.appConfigService.getConfig().logLevel
|
|
67
68
|
/**SET PERSISTENCE parameter */
|
|
68
69
|
this.globals.persistence = this.appConfigService.getConfig().authPersistence
|
|
69
|
-
/**SET CLOSE CHAT IN CONVERSATION parameter */
|
|
70
|
-
this.globals.closeChatInConversation = this.appConfigService.getConfig().closeChatInConversation;
|
|
71
70
|
|
|
72
71
|
// ------------------------------- //
|
|
73
72
|
/** LOAD PARAMETERS FROM SERVER
|
|
@@ -340,8 +339,6 @@ export class GlobalSettingsService {
|
|
|
340
339
|
this.setCssIframe();
|
|
341
340
|
/** set main style */
|
|
342
341
|
this.setStyle();
|
|
343
|
-
/** external CSS override: last stylesheet in document head (max cascade priority vs bundle) */
|
|
344
|
-
this.applyCustomCssOverrideFromGlobals();
|
|
345
342
|
this.obsSettingsService.next(true);
|
|
346
343
|
}
|
|
347
344
|
|
|
@@ -422,28 +419,6 @@ export class GlobalSettingsService {
|
|
|
422
419
|
|
|
423
420
|
document.documentElement.style.setProperty('--font-family', family);
|
|
424
421
|
}
|
|
425
|
-
|
|
426
|
-
/**
|
|
427
|
-
* Loads `globals.cssSource` (set only from tiledeskSettings) as the last stylesheet in head
|
|
428
|
-
* so rules with the same specificity override local / bundled CSS.
|
|
429
|
-
*/
|
|
430
|
-
private applyCustomCssOverrideFromGlobals(): void {
|
|
431
|
-
const id = 'tiledesk-widget-css-override';
|
|
432
|
-
document.getElementById(id)?.remove();
|
|
433
|
-
|
|
434
|
-
const href = (this.globals.cssSource || '').trim();
|
|
435
|
-
console.log('href', href);
|
|
436
|
-
if (!href) {
|
|
437
|
-
return;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
const link = document.createElement('link');
|
|
441
|
-
link.id = id;
|
|
442
|
-
link.rel = 'stylesheet';
|
|
443
|
-
link.href = href;
|
|
444
|
-
link.setAttribute('data-tiledesk-css-override', 'true');
|
|
445
|
-
document.head.appendChild(link);
|
|
446
|
-
}
|
|
447
422
|
/**
|
|
448
423
|
* A: setVariablesFromService
|
|
449
424
|
*/
|
|
@@ -598,9 +573,6 @@ export class GlobalSettingsService {
|
|
|
598
573
|
if (variables.hasOwnProperty('allowedUploadExtentions')) {
|
|
599
574
|
globals['fileUploadAccept'] = variables['allowedUploadExtentions'];
|
|
600
575
|
}
|
|
601
|
-
if(variables.hasOwnProperty('showAudioStreamFooterButton')) {
|
|
602
|
-
globals['showAudioStreamFooterButton'] = variables['showAudioStreamFooterButton'];
|
|
603
|
-
}
|
|
604
576
|
|
|
605
577
|
}
|
|
606
578
|
}
|
|
@@ -667,11 +639,6 @@ export class GlobalSettingsService {
|
|
|
667
639
|
let TEMP: any;
|
|
668
640
|
const tiledeskSettings = windowContext['tiledeskSettings'];
|
|
669
641
|
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > tiledeskSettings: ', tiledeskSettings);
|
|
670
|
-
/** css override URL: solo tiledeskSettings, mai da URL / query params */
|
|
671
|
-
TEMP = tiledeskSettings['cssSource'];
|
|
672
|
-
if (TEMP !== undefined) {
|
|
673
|
-
globals.cssSource = TEMP;
|
|
674
|
-
}
|
|
675
642
|
TEMP = tiledeskSettings['tenant'];
|
|
676
643
|
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > tenant:: ', TEMP);
|
|
677
644
|
if (TEMP !== undefined) {
|
|
@@ -735,7 +702,7 @@ export class GlobalSettingsService {
|
|
|
735
702
|
}
|
|
736
703
|
TEMP = tiledeskSettings['lang'];
|
|
737
704
|
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > lang:: ', TEMP);
|
|
738
|
-
if (
|
|
705
|
+
if (TemplateBindingParseResult) {
|
|
739
706
|
globals.lang = TEMP;
|
|
740
707
|
// globals.setParameter('lang', TEMP);
|
|
741
708
|
}
|
|
@@ -952,14 +919,6 @@ export class GlobalSettingsService {
|
|
|
952
919
|
if (TEMP !== undefined) {
|
|
953
920
|
globals.soundEnabled = TEMP;
|
|
954
921
|
}
|
|
955
|
-
TEMP = tiledeskSettings['keyboardSoundVolume'];
|
|
956
|
-
if (TEMP !== undefined) {
|
|
957
|
-
globals.keyboardSoundVolume = +TEMP;
|
|
958
|
-
}
|
|
959
|
-
TEMP = tiledeskSettings['keyboardSoundFile'];
|
|
960
|
-
if (TEMP !== undefined) {
|
|
961
|
-
globals.keyboardSoundFile = TEMP;
|
|
962
|
-
}
|
|
963
922
|
TEMP = tiledeskSettings['openExternalLinkButton'];
|
|
964
923
|
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > openExternalLinkButton:: ', TEMP]);
|
|
965
924
|
if (TEMP !== undefined) {
|
|
@@ -1166,22 +1125,11 @@ export class GlobalSettingsService {
|
|
|
1166
1125
|
if (TEMP !== undefined) {
|
|
1167
1126
|
globals.showAudioRecorderFooterButton = (TEMP === true) ? true : false;
|
|
1168
1127
|
}
|
|
1169
|
-
TEMP = tiledeskSettings['showAudioStreamFooterButton'];
|
|
1170
|
-
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > showAudioStreamFooterButton:: ', TEMP]);
|
|
1171
|
-
if (TEMP !== undefined) {
|
|
1172
|
-
globals.showAudioStreamFooterButton = (TEMP === true) ? true : false;
|
|
1173
|
-
}
|
|
1174
1128
|
TEMP = tiledeskSettings['size'];
|
|
1175
1129
|
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > size:: ', TEMP]);
|
|
1176
1130
|
if (TEMP !== undefined) {
|
|
1177
1131
|
globals.size = TEMP;
|
|
1178
1132
|
}
|
|
1179
|
-
|
|
1180
|
-
TEMP = tiledeskSettings['closeChatInConversation'];
|
|
1181
|
-
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > closeChatInConversation:: ', TEMP]);
|
|
1182
|
-
if (TEMP !== undefined) {
|
|
1183
|
-
globals.closeChatInConversation = (TEMP === true) ? true : false;
|
|
1184
|
-
}
|
|
1185
1133
|
}
|
|
1186
1134
|
|
|
1187
1135
|
/**
|
|
@@ -1349,14 +1297,6 @@ export class GlobalSettingsService {
|
|
|
1349
1297
|
if (TEMP !== null) {
|
|
1350
1298
|
this.globals.soundEnabled = TEMP;
|
|
1351
1299
|
}
|
|
1352
|
-
TEMP = el.nativeElement.getAttribute('keyboardSoundVolume');
|
|
1353
|
-
if (TEMP !== null) {
|
|
1354
|
-
this.globals.keyboardSoundVolume = +TEMP;
|
|
1355
|
-
}
|
|
1356
|
-
TEMP = el.nativeElement.getAttribute('keyboardSoundFile');
|
|
1357
|
-
if (TEMP !== null) {
|
|
1358
|
-
this.globals.keyboardSoundFile = TEMP;
|
|
1359
|
-
}
|
|
1360
1300
|
TEMP = el.nativeElement.getAttribute('openExternalLinkButton');
|
|
1361
1301
|
if (TEMP !== null) {
|
|
1362
1302
|
this.globals.openExternalLinkButton = TEMP;
|
|
@@ -1756,16 +1696,6 @@ export class GlobalSettingsService {
|
|
|
1756
1696
|
globals.soundEnabled = stringToBoolean(TEMP);
|
|
1757
1697
|
}
|
|
1758
1698
|
|
|
1759
|
-
TEMP = getParameterByName(windowContext, 'tiledesk_keyboardSoundVolume');
|
|
1760
|
-
if (TEMP) {
|
|
1761
|
-
globals.keyboardSoundVolume = +TEMP;
|
|
1762
|
-
}
|
|
1763
|
-
|
|
1764
|
-
TEMP = getParameterByName(windowContext, 'tiledesk_keyboardSoundFile');
|
|
1765
|
-
if (TEMP) {
|
|
1766
|
-
globals.keyboardSoundFile = TEMP;
|
|
1767
|
-
}
|
|
1768
|
-
|
|
1769
1699
|
TEMP = getParameterByName(windowContext, 'tiledesk_openExternalLinkButton');
|
|
1770
1700
|
if (TEMP) {
|
|
1771
1701
|
globals.openExternalLinkButton = stringToBoolean(TEMP);
|
|
@@ -1937,11 +1867,6 @@ export class GlobalSettingsService {
|
|
|
1937
1867
|
globals.showAttachmentFooterButton = stringToBoolean(TEMP);
|
|
1938
1868
|
}
|
|
1939
1869
|
|
|
1940
|
-
TEMP = getParameterByName(windowContext, 'tiledesk_showAudioStreamFooterButton');
|
|
1941
|
-
if (TEMP) {
|
|
1942
|
-
globals.showAudioStreamFooterButton = stringToBoolean(TEMP);
|
|
1943
|
-
}
|
|
1944
|
-
|
|
1945
1870
|
TEMP = getParameterByName(windowContext, 'tiledesk_showEmojiFooterButton');
|
|
1946
1871
|
if (TEMP) {
|
|
1947
1872
|
globals.showEmojiFooterButton = stringToBoolean(TEMP);
|
|
@@ -1951,11 +1876,6 @@ export class GlobalSettingsService {
|
|
|
1951
1876
|
if (TEMP) {
|
|
1952
1877
|
globals.size = TEMP;
|
|
1953
1878
|
}
|
|
1954
|
-
|
|
1955
|
-
TEMP = getParameterByName(windowContext, 'tiledesk_closeChatInConversation');
|
|
1956
|
-
if (TEMP) {
|
|
1957
|
-
globals.closeChatInConversation = stringToBoolean(TEMP);
|
|
1958
|
-
}
|
|
1959
1879
|
|
|
1960
1880
|
}
|
|
1961
1881
|
|
|
@@ -234,27 +234,12 @@ export class TranslatorService {
|
|
|
234
234
|
this._translate.use(lang);
|
|
235
235
|
this.logger.debug(`[TRANSLATOR-SERV] »»»» initI18n - »»» loadRemoteTranslations ?`, environment.loadRemoteTranslations);
|
|
236
236
|
this._translate.setTranslation(lang, data, true);
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
*
|
|
244
|
-
* The widget runs inside its own iframe, so we update the document of that iframe.
|
|
245
|
-
* If the widget is also embedded in a parent page (Tiledesk launcher), the parent
|
|
246
|
-
* page already declares its own `lang`, which we intentionally leave untouched.
|
|
247
|
-
*/
|
|
248
|
-
private syncDocumentLang(lang: string) {
|
|
249
|
-
if (!lang) { return; }
|
|
250
|
-
const normalized = lang.toLowerCase().substring(0, 2);
|
|
251
|
-
try {
|
|
252
|
-
if (typeof document !== 'undefined' && document.documentElement) {
|
|
253
|
-
document.documentElement.setAttribute('lang', normalized);
|
|
254
|
-
}
|
|
255
|
-
} catch (e) {
|
|
256
|
-
this.logger.warn('[TRANSLATOR-SERV] syncDocumentLang error', e);
|
|
257
|
-
}
|
|
237
|
+
// if (environment.loadRemoteTranslations) {
|
|
238
|
+
// // console.log(`»»»» initI18n - »»» remote translation `, data);
|
|
239
|
+
// this._translate.setTranslation(lang, data, true);
|
|
240
|
+
// } else {
|
|
241
|
+
// this._translate.setTranslation(lang, data, true);
|
|
242
|
+
// }
|
|
258
243
|
}
|
|
259
244
|
|
|
260
245
|
/** */
|
|
@@ -317,9 +302,6 @@ export class TranslatorService {
|
|
|
317
302
|
'CLOSED',
|
|
318
303
|
'LABEL_PREVIEW',
|
|
319
304
|
'MAX_ATTACHMENT',
|
|
320
|
-
'EMOJI',
|
|
321
|
-
'BUTTON_OPEN_CHAT',
|
|
322
|
-
'MAX_ATTACHMENT_ERROR',
|
|
323
305
|
'EMOJI'
|
|
324
306
|
];
|
|
325
307
|
|
|
@@ -376,9 +358,7 @@ export class TranslatorService {
|
|
|
376
358
|
globals.LABEL_PREVIEW = res['LABEL_PREVIEW']
|
|
377
359
|
globals.LABEL_ERROR_FIELD_REQUIRED= res['LABEL_ERROR_FIELD_REQUIRED']
|
|
378
360
|
globals.MAX_ATTACHMENT = res['MAX_ATTACHMENT']
|
|
379
|
-
globals.MAX_ATTACHMENT_ERROR = res['MAX_ATTACHMENT_ERROR']
|
|
380
361
|
globals.EMOJI = res['EMOJI']
|
|
381
|
-
globals.BUTTON_OPEN_CHAT = res['BUTTON_OPEN_CHAT']
|
|
382
362
|
|
|
383
363
|
|
|
384
364
|
if(globals.WELCOME_TITLE === 'WELLCOME_TITLE') globals.WELCOME_TITLE = res['WELCOME_TITLE']
|
|
@@ -36,10 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
--chat-footer-height: 64px;
|
|
38
38
|
--chat-footer-logo-height: 30px;
|
|
39
|
-
--chat-footer-close-button-height: 30px;
|
|
40
39
|
--chat-footer-border-radius: 16px;
|
|
41
|
-
--chat-footer-stream-button-height: 72px;
|
|
42
|
-
--chat-footer-stream-button-padding: 10px 0;
|
|
43
40
|
--chat-footer-background-color: #f6f7fb;
|
|
44
41
|
--chat-footer-color: #1a1a1a;
|
|
45
42
|
--chat-footer-border-color-error: #aa0404;
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Respect the user's reduced-motion preference (WCAG 2.3.3 Animation from Interactions).
|
|
5
|
-
* When `prefers-reduced-motion: reduce` is active, neutralize all CSS animations and transitions
|
|
6
|
-
* inside the widget so users do not experience non-essential motion.
|
|
7
|
-
*/
|
|
8
|
-
@media (prefers-reduced-motion: reduce) {
|
|
9
|
-
chat-root *,
|
|
10
|
-
chat-root *::before,
|
|
11
|
-
chat-root *::after {
|
|
12
|
-
animation-duration: 0.001ms !important;
|
|
13
|
-
animation-iteration-count: 1 !important;
|
|
14
|
-
animation-delay: 0ms !important;
|
|
15
|
-
transition-duration: 0.001ms !important;
|
|
16
|
-
transition-delay: 0ms !important;
|
|
17
|
-
scroll-behavior: auto !important;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
1
|
+
@import 'variables';
|
|
20
2
|
|
|
21
3
|
/**
|
|
22
4
|
* ----------------------------------------
|
package/src/app/utils/globals.ts
CHANGED
|
@@ -36,14 +36,6 @@ export class Globals {
|
|
|
36
36
|
isMobile: boolean;
|
|
37
37
|
isLogged: boolean;
|
|
38
38
|
soundEnabled: boolean;
|
|
39
|
-
/** Volume for the keyboard typing-indicator sound during voice sessions. Range 0.0–1.0. */
|
|
40
|
-
keyboardSoundVolume: number;
|
|
41
|
-
/**
|
|
42
|
-
* Filename (local) or absolute URL (remote) for the keyboard typing-indicator sound.
|
|
43
|
-
* Local: bare filename resolved against `baseLocation + '/assets/sounds/'` (e.g. `'keyboard.mp3'`).
|
|
44
|
-
* Remote: full URL starting with `http://` or `https://`.
|
|
45
|
-
*/
|
|
46
|
-
keyboardSoundFile: string;
|
|
47
39
|
BUILD_VERSION: String;
|
|
48
40
|
baseLocation: string;
|
|
49
41
|
availableAgents: Array<UserAgent> = [];
|
|
@@ -125,7 +117,6 @@ export class Globals {
|
|
|
125
117
|
WAITING_TIME_NOT_FOUND: string;
|
|
126
118
|
CLOSED: string;
|
|
127
119
|
LABEL_PREVIEW: string;
|
|
128
|
-
BUTTON_OPEN_CHAT: string;
|
|
129
120
|
|
|
130
121
|
// ============ BEGIN: EXTERNAL PARAMETERS ==============//
|
|
131
122
|
autoStart: boolean;
|
|
@@ -228,18 +219,14 @@ export class Globals {
|
|
|
228
219
|
showEmojiFooterButton: boolean // ******* new ********
|
|
229
220
|
showAttachmentFooterButton: boolean // ******* new ********
|
|
230
221
|
showAudioRecorderFooterButton: boolean // ******* new ********
|
|
231
|
-
showAudioStreamFooterButton: boolean // ******* new ********
|
|
232
222
|
|
|
233
223
|
allowedOnSpecificUrl: boolean // ******* new ********
|
|
234
224
|
allowedOnSpecificUrlList: Array<string> // ******* new ********
|
|
235
225
|
hasCalloutInWidgetConfig: boolean; // ******* new ********
|
|
236
226
|
|
|
237
227
|
fontFamilySource: string; // ******* new ********
|
|
238
|
-
cssSource: string; // ******* new ********
|
|
239
228
|
|
|
240
229
|
size: 'min' | 'max' | 'top'; // ******* new ********
|
|
241
|
-
|
|
242
|
-
closeChatInConversation: boolean; // ******* new ********
|
|
243
230
|
constructor(
|
|
244
231
|
) { }
|
|
245
232
|
|
|
@@ -448,8 +435,6 @@ export class Globals {
|
|
|
448
435
|
this.showAttachmentFooterButton = true;
|
|
449
436
|
/** show/hide rec audio option in footer chat-detail page */
|
|
450
437
|
this.showAudioRecorderFooterButton = true;
|
|
451
|
-
/** show/hide stream audio option in footer chat-detail page */
|
|
452
|
-
this.showAudioStreamFooterButton = true;
|
|
453
438
|
/** enabled to set a list of pattern url able to load the widget **/
|
|
454
439
|
this.allowedOnSpecificUrl = false
|
|
455
440
|
/** set a list of pattern url able to load the widget */
|
|
@@ -458,10 +443,7 @@ export class Globals {
|
|
|
458
443
|
this.hasCalloutInWidgetConfig = false;
|
|
459
444
|
/** set widget size from 3 different positions: min, max, top */
|
|
460
445
|
this.size = 'min';
|
|
461
|
-
|
|
462
|
-
this.cssSource = '';
|
|
463
|
-
/** enable to close the chat in conversation */
|
|
464
|
-
this.closeChatInConversation = false;
|
|
446
|
+
|
|
465
447
|
// ============ END: SET EXTERNAL PARAMETERS ==============//
|
|
466
448
|
|
|
467
449
|
|
|
@@ -480,8 +462,6 @@ export class Globals {
|
|
|
480
462
|
this.BUILD_VERSION = 'v.' + environment.version;
|
|
481
463
|
|
|
482
464
|
this.soundEnabled = true;
|
|
483
|
-
this.keyboardSoundVolume = 0.3;
|
|
484
|
-
this.keyboardSoundFile = 'keyboard.mp3';
|
|
485
465
|
|
|
486
466
|
this.conversationsBadge = 0;
|
|
487
467
|
|
|
@@ -7,7 +7,7 @@ export const BRAND_BASE_INFO: { [key: string] : string} ={
|
|
|
7
7
|
FAVICON: "https://tiledesk.com/wp-content/uploads/2022/07/tiledesk_v13-300x300.png",
|
|
8
8
|
META_TITLE:"Design Studio",
|
|
9
9
|
LOGO_CHAT:"https://widget.tiledesk.com/v2/assets/images/tiledesk_logo_white_small.svg",
|
|
10
|
-
POWERED_BY:"<a
|
|
10
|
+
POWERED_BY:"<a tabindex='-1' target='_blank' ref='https://www.tiledesk.com/?utm_source=widget'><img src='https://support-pre.tiledesk.com/dashboard/assets/img/logos/tiledesk-solo_logo_new_gray.svg'/><span>Powered by Tiledesk</span></a>",
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export const LOGOS_ITEMS: { [key: string] : { label: string, icon: string }} ={
|
package/src/assets/i18n/en.json
CHANGED
|
@@ -1,108 +1,101 @@
|
|
|
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
|
-
"Thursday",
|
|
90
|
-
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"MAX_ATTACHMENT": "Max allowed size {{FILE_SIZE_LIMIT}}Mb",
|
|
102
|
-
"MAX_ATTACHMENT_ERROR": "The file exceeds the maximum allowed size",
|
|
103
|
-
"EMOJI": "Emoji",
|
|
104
|
-
"STREAM_AUDIO": "Use voice mode",
|
|
105
|
-
"VOICE_CONNECTING": "Connecting...",
|
|
106
|
-
"VOICE_LISTENING": "Listening...",
|
|
107
|
-
"VOICE_PROCESSING": "Processing..."
|
|
2
|
+
"LABEL_PLACEHOLDER": "Type your message..",
|
|
3
|
+
"LABEL_START_NW_CONV": "New conversation",
|
|
4
|
+
"LABEL_WHATSAPP": "Message us",
|
|
5
|
+
"LABEL_SELECT_TOPIC": "Select a topic",
|
|
6
|
+
"LABEL_COMPLETE_FORM": "Complete the form to start a conversation with the next available agent.",
|
|
7
|
+
"LABEL_FIELD_NAME": "Name",
|
|
8
|
+
"LABEL_ERROR_FIELD_NAME": "Required field (minimum 5 characters).",
|
|
9
|
+
"LABEL_FIELD_EMAIL": "Email",
|
|
10
|
+
"LABEL_ERROR_FIELD_EMAIL": "Enter a valid email address.",
|
|
11
|
+
"LABEL_ERROR_FIELD_REQUIRED":"Required field",
|
|
12
|
+
"LABEL_WRITING": "is writing...",
|
|
13
|
+
"LABEL_SEND_NEW_MESSAGE": "Send a new message",
|
|
14
|
+
"AGENT_NOT_AVAILABLE": " Offline",
|
|
15
|
+
"AGENT_AVAILABLE": " Online",
|
|
16
|
+
"GUEST_LABEL": "Guest",
|
|
17
|
+
"ALL_AGENTS_OFFLINE_LABEL": "All operators are offline at the moment",
|
|
18
|
+
"LABEL_LOADING": "Loading...",
|
|
19
|
+
"LABEL_THINKING": "thinking",
|
|
20
|
+
"CALLOUT_TITLE_PLACEHOLDER": "🖐 Need Help?",
|
|
21
|
+
"CALLOUT_MSG_PLACEHOLDER": "Click here and start chatting with us!",
|
|
22
|
+
"CUSTOMER_SATISFACTION": "Customer satisfaction",
|
|
23
|
+
"YOUR_OPINION_ON_OUR_CUSTOMER_SERVICE": "your opinion on our customer service",
|
|
24
|
+
"DOWNLOAD_TRANSCRIPT": "Download transcript",
|
|
25
|
+
"BACK": "Back",
|
|
26
|
+
"CONTINUE": "Continue",
|
|
27
|
+
"YOUR_RATING": "your rating",
|
|
28
|
+
"WRITE_YOUR_OPINION": "Write your opinion ... (optional)",
|
|
29
|
+
"SUBMIT": "Submit",
|
|
30
|
+
"THANK_YOU_FOR_YOUR_EVALUATION": "Thank you for your evaluation",
|
|
31
|
+
"YOUR_RATING_HAS_BEEN_RECEIVED": "your rating has been received",
|
|
32
|
+
"ALERT_LEAVE_CHAT": "Do you want to leave the chat?",
|
|
33
|
+
"YES": "Yes",
|
|
34
|
+
"NO": "No",
|
|
35
|
+
"BUTTON_CLOSE_TO_ICON": "Minimize chat",
|
|
36
|
+
"BUTTON_EDIT_PROFILE": "Update profile",
|
|
37
|
+
"RATE_CHAT": "Rate chat",
|
|
38
|
+
"WELCOME_TITLE": "Hi, welcome to Tiledesk 👋",
|
|
39
|
+
"WELCOME_MSG": "How can we help?",
|
|
40
|
+
"WELCOME": "Welcome",
|
|
41
|
+
"OPTIONS": "options",
|
|
42
|
+
"SOUND_OFF": "Sound off",
|
|
43
|
+
"SOUND_ON": "Sound on",
|
|
44
|
+
"LOGOUT": "Logout",
|
|
45
|
+
"CLOSE": "Close",
|
|
46
|
+
"RESTART":"Restart",
|
|
47
|
+
"PREV_CONVERSATIONS": "Your conversations",
|
|
48
|
+
"YOU": "You",
|
|
49
|
+
"SHOW_ALL_CONV": "show all",
|
|
50
|
+
"START_A_CONVERSATION": "Start a conversation",
|
|
51
|
+
"NO_CONVERSATION": "No conversation",
|
|
52
|
+
"SEE_PREVIOUS": "see previous",
|
|
53
|
+
"WAITING_TIME_FOUND": "The team typically replies in $reply_time",
|
|
54
|
+
"WAITING_TIME_NOT_FOUND": "The team will reply as soon as possible",
|
|
55
|
+
"CLOSED": "CLOSED",
|
|
56
|
+
"CLOSE_CHAT": "Close chat",
|
|
57
|
+
"MINIMIZE":"Minimize window",
|
|
58
|
+
"MAXIMIZE":"Expand window",
|
|
59
|
+
"CENTER":"Center",
|
|
60
|
+
"CONFIRM_CLOSE_CHAT":"Are you sure you want to close this chat?",
|
|
61
|
+
|
|
62
|
+
"INFO_SUPPORT_USER_ADDED_SUBJECT":"you",
|
|
63
|
+
"INFO_SUPPORT_USER_ADDED_YOU_VERB":"have been added to ",
|
|
64
|
+
"INFO_SUPPORT_USER_ADDED_COMPLEMENT":"joined",
|
|
65
|
+
"INFO_SUPPORT_USER_ADDED_VERB":"the chat",
|
|
66
|
+
"INFO_SUPPORT_CHAT_REOPENED":"Chat reopened",
|
|
67
|
+
"INFO_SUPPORT_CHAT_CLOSED":"Chat closed",
|
|
68
|
+
"INFO_SUPPORT_LEAD_UPDATED":"Lead updated",
|
|
69
|
+
"INFO_SUPPORT_MEMBER_LEFT_GROUP":"removed from group",
|
|
70
|
+
"INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"has left the conversation",
|
|
71
|
+
"INFO_A_NEW_SUPPORT_REQUEST_HAS_BEEN_ASSIGNED_TO_YOU": "A new support request has been assigned to you",
|
|
72
|
+
|
|
73
|
+
"LABEL_PRECHAT_USER_FULLNAME": "Full name",
|
|
74
|
+
"LABEL_PRECHAT_USER_EMAIL": "Email",
|
|
75
|
+
"LABEL_PRECHAT_USER_EMAIL_ERROR": "Invalid email address",
|
|
76
|
+
"LABEL_PRECHAT_USER_PHONE": "Phone",
|
|
77
|
+
"LABEL_PRECHAT_USER_PHONE_ERROR": "Phone is required",
|
|
78
|
+
"LABEL_PRECHAT_FIRST_MESSAGE": "Your message for the support team",
|
|
79
|
+
"LABEL_PRECHAT_STATIC_TERMS_PRIVACY": "Before proceeding in the conversation please agree to our <a href='https://tiledesk.com/termsofservice/' target='_blank'>Terms</a> and <a href='https://tiledesk.com/privacy.html' target='_blank'>Privacy Policy</a>",
|
|
80
|
+
"LABEL_PRECHAT_ACCEPT_TERMS_PRIVACY": "I agree",
|
|
81
|
+
"PRECHAT_REQUIRED_ERROR": "This field is required",
|
|
82
|
+
|
|
83
|
+
"TICKET_TAKING":"The request has been received and the assistance staff is dealing with it.\nTo add more comments, reply to this email.",
|
|
84
|
+
|
|
85
|
+
"LABEL_TODAY": "today",
|
|
86
|
+
"LABEL_TOMORROW": "yesterday",
|
|
87
|
+
"LABEL_LAST_ACCESS": "last access",
|
|
88
|
+
"LABEL_TO": "at",
|
|
89
|
+
"ARRAY_DAYS": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
|
|
90
|
+
|
|
91
|
+
"SENT_AN_ATTACHMENT": "sent an attachment",
|
|
92
|
+
"SENT_AN_IMAGE":"sent an image",
|
|
93
|
+
|
|
94
|
+
"LABEL_PREVIEW": "Preview",
|
|
95
|
+
"SWITCH_TO": "Or switch to:",
|
|
96
|
+
"CONNECTION_NETWORK_ERROR": "Our apologies. There was some trouble connecting to network",
|
|
97
|
+
"EMOJI_NOT_ELLOWED":"Emoji not allowed",
|
|
98
|
+
"DOMAIN_NOT_ALLOWED":"URL contains a non-allowed domain",
|
|
99
|
+
"MAX_ATTACHMENT": "Max allowed size {{FILE_SIZE_LIMIT}}Mb",
|
|
100
|
+
"EMOJI": "Emoji"
|
|
108
101
|
}
|