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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/.github/workflows/docker-community-push-latest.yml +13 -23
  2. package/.github/workflows/docker-image-tag-community-tag-push.yml +12 -22
  3. package/CHANGELOG.md +8 -129
  4. package/Dockerfile +5 -4
  5. package/angular.json +3 -21
  6. package/docs/changelog/this-branch.md +0 -36
  7. package/env.sample +2 -3
  8. package/nginx.conf +2 -22
  9. package/package.json +3 -10
  10. package/src/app/app.component.html +2 -2
  11. package/src/app/app.component.scss +14 -25
  12. package/src/app/app.component.spec.ts +6 -21
  13. package/src/app/app.component.ts +9 -10
  14. package/src/app/app.module.ts +0 -13
  15. package/src/app/component/conversation-detail/conversation/conversation.component.html +11 -25
  16. package/src/app/component/conversation-detail/conversation/conversation.component.scss +2 -40
  17. package/src/app/component/conversation-detail/conversation/conversation.component.spec.ts +75 -644
  18. package/src/app/component/conversation-detail/conversation/conversation.component.ts +14 -100
  19. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.html +13 -25
  20. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.spec.ts +5 -123
  21. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.ts +0 -1
  22. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.html +10 -23
  23. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.scss +1 -19
  24. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.spec.ts +149 -242
  25. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.ts +5 -8
  26. package/src/app/component/conversation-detail/conversation-emojii/conversation-emojii.component.spec.ts +3 -53
  27. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html +96 -200
  28. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +6 -211
  29. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.spec.ts +78 -452
  30. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +76 -291
  31. package/src/app/component/conversation-detail/conversation-header/conversation-header.component.html +53 -113
  32. package/src/app/component/conversation-detail/conversation-header/conversation-header.component.scss +4 -12
  33. package/src/app/component/conversation-detail/conversation-header/conversation-header.component.spec.ts +29 -274
  34. package/src/app/component/conversation-detail/conversation-internal-frame/conversation-internal-frame.component.html +9 -23
  35. package/src/app/component/conversation-detail/conversation-internal-frame/conversation-internal-frame.component.spec.ts +8 -80
  36. package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.html +23 -29
  37. package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.spec.ts +16 -185
  38. package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.ts +14 -34
  39. package/src/app/component/error-alert/error-alert.component.spec.ts +5 -65
  40. package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.html +7 -16
  41. package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.scss +0 -21
  42. package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.spec.ts +7 -89
  43. package/src/app/component/form/form-builder/form-builder.component.html +1 -1
  44. package/src/app/component/form/form-builder/form-builder.component.spec.ts +21 -163
  45. package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.html +4 -8
  46. package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.scss +5 -10
  47. package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.spec.ts +16 -90
  48. package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.ts +0 -26
  49. package/src/app/component/form/inputs/form-label/form-label.component.spec.ts +11 -45
  50. package/src/app/component/form/inputs/form-radio-button/form-radio-button.component.spec.ts +6 -24
  51. package/src/app/component/form/inputs/form-select/form-select.component.spec.ts +5 -14
  52. package/src/app/component/form/inputs/form-text/form-text.component.html +12 -14
  53. package/src/app/component/form/inputs/form-text/form-text.component.scss +1 -11
  54. package/src/app/component/form/inputs/form-text/form-text.component.spec.ts +17 -113
  55. package/src/app/component/form/inputs/form-text/form-text.component.ts +3 -35
  56. package/src/app/component/form/inputs/form-textarea/form-textarea.component.html +11 -13
  57. package/src/app/component/form/inputs/form-textarea/form-textarea.component.scss +5 -6
  58. package/src/app/component/form/inputs/form-textarea/form-textarea.component.spec.ts +13 -149
  59. package/src/app/component/form/inputs/form-textarea/form-textarea.component.ts +0 -26
  60. package/src/app/component/form/prechat-form/prechat-form.component.html +11 -14
  61. package/src/app/component/form/prechat-form/prechat-form.component.spec.ts +10 -102
  62. package/src/app/component/form/prechat-form/prechat-form.component.ts +1 -8
  63. package/src/app/component/home/home.component.html +31 -38
  64. package/src/app/component/home/home.component.scss +2 -4
  65. package/src/app/component/home/home.component.spec.ts +11 -226
  66. package/src/app/component/home-conversations/home-conversations.component.html +26 -30
  67. package/src/app/component/home-conversations/home-conversations.component.scss +0 -3
  68. package/src/app/component/home-conversations/home-conversations.component.spec.ts +36 -212
  69. package/src/app/component/last-message/last-message.component.html +9 -15
  70. package/src/app/component/last-message/last-message.component.scss +2 -16
  71. package/src/app/component/last-message/last-message.component.spec.ts +23 -204
  72. package/src/app/component/last-message/last-message.component.ts +1 -4
  73. package/src/app/component/launcher-button/launcher-button.component.html +13 -8
  74. package/src/app/component/launcher-button/launcher-button.component.spec.ts +8 -104
  75. package/src/app/component/list-all-conversations/list-all-conversations.component.html +17 -12
  76. package/src/app/component/list-all-conversations/list-all-conversations.component.scss +0 -2
  77. package/src/app/component/list-conversations/list-conversations.component.html +22 -22
  78. package/src/app/component/menu-options/menu-options.component.html +20 -30
  79. package/src/app/component/menu-options/menu-options.component.spec.ts +9 -125
  80. package/src/app/component/message/audio/audio.component.html +15 -13
  81. package/src/app/component/message/audio/audio.component.spec.ts +5 -140
  82. package/src/app/component/message/audio/audio.component.ts +5 -1
  83. package/src/app/component/message/avatar/avatar.component.html +2 -2
  84. package/src/app/component/message/avatar/avatar.component.spec.ts +7 -99
  85. package/src/app/component/message/bubble-message/bubble-message.component.html +51 -38
  86. package/src/app/component/message/bubble-message/bubble-message.component.scss +1 -54
  87. package/src/app/component/message/bubble-message/bubble-message.component.spec.ts +57 -154
  88. package/src/app/component/message/bubble-message/bubble-message.component.ts +11 -89
  89. package/src/app/component/message/buttons/action-button/action-button.component.html +4 -3
  90. package/src/app/component/message/buttons/action-button/action-button.component.spec.ts +5 -49
  91. package/src/app/component/message/buttons/link-button/link-button.component.scss +8 -5
  92. package/src/app/component/message/buttons/link-button/link-button.component.spec.ts +5 -50
  93. package/src/app/component/message/buttons/text-button/text-button.component.spec.ts +5 -44
  94. package/src/app/component/message/carousel/carousel.component.html +16 -29
  95. package/src/app/component/message/carousel/carousel.component.scss +8 -20
  96. package/src/app/component/message/carousel/carousel.component.spec.ts +3 -80
  97. package/src/app/component/message/carousel/carousel.component.ts +0 -16
  98. package/src/app/component/message/frame/frame.component.html +4 -9
  99. package/src/app/component/message/frame/frame.component.spec.ts +15 -34
  100. package/src/app/component/message/frame/frame.component.ts +2 -7
  101. package/src/app/component/message/html/html.component.html +1 -1
  102. package/src/app/component/message/html/html.component.scss +1 -1
  103. package/src/app/component/message/html/html.component.spec.ts +7 -24
  104. package/src/app/component/message/image/image.component.html +10 -12
  105. package/src/app/component/message/image/image.component.scss +0 -16
  106. package/src/app/component/message/image/image.component.spec.ts +15 -101
  107. package/src/app/component/message/image/image.component.ts +51 -90
  108. package/src/app/component/message/info-message/info-message.component.spec.ts +14 -26
  109. package/src/app/component/message/like-unlike/like-unlike.component.html +9 -7
  110. package/src/app/component/message/like-unlike/like-unlike.component.spec.ts +3 -31
  111. package/src/app/component/message/return-receipt/return-receipt.component.spec.ts +17 -38
  112. package/src/app/component/message/text/text.component.html +3 -3
  113. package/src/app/component/message/text/text.component.scss +86 -80
  114. package/src/app/component/message/text/text.component.spec.ts +13 -106
  115. package/src/app/component/message-attachment/message-attachment.component.spec.ts +13 -134
  116. package/src/app/component/selection-department/selection-department.component.html +23 -21
  117. package/src/app/component/selection-department/selection-department.component.spec.ts +14 -159
  118. package/src/app/component/selection-department/selection-department.component.ts +1 -8
  119. package/src/app/component/send-button/send-button.component.html +13 -5
  120. package/src/app/component/send-button/send-button.component.spec.ts +2 -2
  121. package/src/app/component/star-rating-widget/star-rating-widget.component.html +81 -51
  122. package/src/app/directives/tooltip.directive.spec.ts +4 -8
  123. package/src/app/modals/confirm-close/confirm-close.component.html +8 -20
  124. package/src/app/modals/confirm-close/confirm-close.component.scss +0 -3
  125. package/src/app/modals/confirm-close/confirm-close.component.spec.ts +4 -13
  126. package/src/app/modals/confirm-close/confirm-close.component.ts +1 -8
  127. package/src/app/pipe/html-entites-encode.pipe.spec.ts +2 -35
  128. package/src/app/pipe/marked.pipe.spec.ts +2 -38
  129. package/src/app/pipe/marked.pipe.ts +41 -51
  130. package/src/app/providers/app-config.service.ts +2 -4
  131. package/src/app/providers/brand.service.spec.ts +2 -23
  132. package/src/app/providers/brand.service.ts +1 -1
  133. package/src/app/providers/global-settings.service.spec.ts +14 -1009
  134. package/src/app/providers/global-settings.service.ts +2 -82
  135. package/src/app/providers/translator.service.ts +6 -26
  136. package/src/app/sass/_variables.scss +0 -3
  137. package/src/app/sass/animations.scss +1 -19
  138. package/src/app/utils/globals.ts +1 -21
  139. package/src/app/utils/utils-resources.ts +1 -1
  140. package/src/assets/i18n/en.json +99 -106
  141. package/src/assets/i18n/es.json +100 -107
  142. package/src/assets/i18n/fr.json +100 -107
  143. package/src/assets/i18n/it.json +98 -107
  144. package/src/assets/twp/index-dev.html +0 -18
  145. package/src/chat21-core/models/message.ts +1 -2
  146. package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +2 -3
  147. package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +0 -12
  148. package/src/chat21-core/providers/scripts/script.service.spec.ts +2 -12
  149. package/src/chat21-core/providers/tiledesk/tiledesk-requests.service.ts +1 -1
  150. package/src/chat21-core/utils/utils-message.ts +0 -7
  151. package/src/chat21-core/utils/utils.ts +2 -5
  152. package/src/widget-config-template.json +1 -4
  153. package/src/widget-config.json +1 -4
  154. package/tsconfig.json +0 -5
  155. package/.angular-mcp-cache/package.json +0 -1
  156. package/.cursor/angular18-accessibility-auditor-skill.md +0 -442
  157. package/.cursor/mcp.json +0 -15
  158. package/.github/workflows/build.yml +0 -22
  159. package/.github/workflows/playwright.yml +0 -27
  160. package/mocks/voice-websocket-mock/server.cjs +0 -245
  161. package/playwright.config.ts +0 -41
  162. package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.html +0 -46
  163. package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.scss +0 -83
  164. package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.ts +0 -192
  165. package/src/app/component/form/prechat-form-test-mock.ts +0 -35
  166. package/src/app/component/message/audio-sync/audio-sync.component.html +0 -18
  167. package/src/app/component/message/audio-sync/audio-sync.component.scss +0 -65
  168. package/src/app/component/message/audio-sync/audio-sync.component.spec.ts +0 -103
  169. package/src/app/component/message/audio-sync/audio-sync.component.ts +0 -643
  170. package/src/app/providers/tts-audio-playback-coordinator.service.spec.ts +0 -117
  171. package/src/app/providers/tts-audio-playback-coordinator.service.ts +0 -109
  172. package/src/app/providers/voice/STT&TTS/openai-voice.config.ts +0 -12
  173. package/src/app/providers/voice/STT&TTS/openai-voice.provider.ts +0 -171
  174. package/src/app/providers/voice/STT&TTS/speech-provider.abstract.ts +0 -39
  175. package/src/app/providers/voice/audio.types.ts +0 -40
  176. package/src/app/providers/voice/vad.service.spec.ts +0 -28
  177. package/src/app/providers/voice/vad.service.ts +0 -70
  178. package/src/app/providers/voice/voice-streaming.service.spec.ts +0 -23
  179. package/src/app/providers/voice/voice-streaming.service.ts +0 -702
  180. package/src/app/providers/voice/voice-streaming.types.ts +0 -112
  181. package/src/app/providers/voice/voice.service.spec.ts +0 -227
  182. package/src/app/providers/voice/voice.service.ts +0 -973
  183. package/src/app/shims/onnxruntime-web-wasm.ts +0 -4
  184. package/src/assets/onnx/ort-wasm-simd-threaded.mjs +0 -59
  185. package/src/assets/onnx/ort-wasm-simd-threaded.wasm +0 -0
  186. package/src/assets/sounds/keyboard.mp3 +0 -0
  187. package/src/assets/twp/tiledesk_widget_files/widget-css-override-example.css +0 -14
  188. package/src/assets/vad/silero_vad_legacy.onnx +0 -0
  189. package/src/assets/vad/vad.worklet.bundle.min.js +0 -1
  190. package/src/chat21-core/providers/chat-manager.spec.ts +0 -72
  191. package/tests/widget-form-rich.spec.ts +0 -67
  192. package/tests/widget-index-dev-settings.spec.ts +0 -52
  193. package/tests/widget-twp-iframe.spec.ts +0 -39
@@ -1,4 +1,4 @@
1
- import { Component, ElementRef, EventEmitter, HostListener, Input, OnInit, Output, SimpleChange, SimpleChanges, ViewChild, OnDestroy } from '@angular/core';
1
+ import { Component, ElementRef, EventEmitter, Input, OnInit, Output, SimpleChange, SimpleChanges, ViewChild, OnDestroy } from '@angular/core';
2
2
  import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
3
3
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
4
4
 
@@ -25,13 +25,6 @@ export class ConfirmCloseComponent implements OnInit{
25
25
  // this.dialog.showModal();
26
26
  }
27
27
 
28
- @HostListener('keydown.escape', ['$event'])
29
- onEscape(event: KeyboardEvent){
30
- event.preventDefault();
31
- event.stopPropagation();
32
- this.onBack();
33
- }
34
-
35
28
  ngOnChanges(changes: SimpleChanges){
36
29
  if(changes &&
37
30
  changes['conversationId'] &&
@@ -1,41 +1,8 @@
1
1
  import { HtmlEntitiesEncodePipe } from './html-entities-encode.pipe';
2
2
 
3
3
  describe('HtmlEntitiesEncodePipe', () => {
4
- let pipe: HtmlEntitiesEncodePipe;
5
-
6
- beforeEach(() => {
7
- pipe = new HtmlEntitiesEncodePipe();
8
- });
9
-
10
- it('should create', () => {
4
+ it('create an instance', () => {
5
+ const pipe = new HtmlEntitiesEncodePipe();
11
6
  expect(pipe).toBeTruthy();
12
7
  });
13
-
14
- it('should encode angle brackets so raw HTML tags are not preserved (XSS mitigation)', () => {
15
- const malicious = '<script>alert(1)</script><img src=x onerror=alert(1)>';
16
- const out = pipe.transform(malicious);
17
- expect(out).not.toContain('<script');
18
- expect(out).not.toContain('<img');
19
- expect(out).toContain('&lt;');
20
- expect(out).toContain('&gt;');
21
- });
22
-
23
- it('should encode double quotes for attribute injection contexts', () => {
24
- expect(pipe.transform('say "hello"')).toContain('&quot;');
25
- });
26
-
27
- it('should replace newlines with <br> via replaceEndOfLine', () => {
28
- const out = pipe.transform('line1\nline2');
29
- expect(out).toContain('<br>');
30
- expect(out).toContain('line1');
31
- expect(out).toContain('line2');
32
- });
33
-
34
- it('should trim leading and trailing whitespace', () => {
35
- expect(pipe.transform(' abc ')).toBe('abc');
36
- });
37
-
38
- it('should coerce non-string input to string before encoding', () => {
39
- expect(pipe.transform(123 as any)).toBe('123');
40
- });
41
8
  });
@@ -1,44 +1,8 @@
1
1
  import { MarkedPipe } from './marked.pipe';
2
2
 
3
3
  describe('MarkedPipe', () => {
4
- let pipe: MarkedPipe;
5
-
6
- beforeEach(() => {
7
- pipe = new MarkedPipe();
8
- });
9
-
10
- it('should create', () => {
4
+ it('create an instance', () => {
5
+ const pipe = new MarkedPipe();
11
6
  expect(pipe).toBeTruthy();
12
7
  });
13
-
14
- it('should render markdown bold as HTML strong', () => {
15
- const html = pipe.transform('Hello **world**') as string;
16
- expect(html).toMatch(/<strong>world<\/strong>|<b>world<\/b>/);
17
- });
18
-
19
- it('should not leave raw script tags in output (HTML tokens escaped)', () => {
20
- const html = pipe.transform('<script>alert(1)</script>') as string;
21
- expect(html.toLowerCase()).not.toContain('<script>');
22
- expect(html).toContain('&lt;');
23
- });
24
-
25
- it('should not emit javascript: links as clickable href', () => {
26
- const html = pipe.transform('[clickme](javascript:alert(1))') as string;
27
- expect(html).not.toMatch(/href=["']javascript:/i);
28
- });
29
-
30
- it('should add rel noopener on http links', () => {
31
- const html = pipe.transform('[x](https://example.com)') as string;
32
- expect(html).toContain('rel="noopener noreferrer"');
33
- expect(html).toContain('target="_blank"');
34
- });
35
-
36
- it('should treat escaped newlines as real newlines (GFM breaks)', () => {
37
- const html = pipe.transform('a\\nb') as string;
38
- expect(html).toMatch(/<br\s*\/?>/i);
39
- });
40
-
41
- it('should coerce null to empty string', () => {
42
- expect(pipe.transform(null)).toBe('');
43
- });
44
8
  });
@@ -5,71 +5,61 @@ import { marked, Tokens } from 'marked';
5
5
  name: 'marked'
6
6
  })
7
7
  export class MarkedPipe implements PipeTransform {
8
- private static renderer: any = null;
9
8
 
10
- private static getRenderer(): any {
11
- if (!MarkedPipe.renderer) {
12
- const renderer = new marked.Renderer();
13
-
14
- /* --------------------------------------------------
15
- 🔐 1. NON renderizzare HTML raw
16
- -------------------------------------------------- */
17
- renderer.html = function(token: Tokens.HTML | Tokens.Tag): string {
18
- const html = 'text' in token ? token.text : '';
19
-
20
- return html
21
- .replace(/&/g, '&amp;')
22
- .replace(/</g, '&lt;')
23
- .replace(/>/g, '&gt;');
24
- };
9
+ transform(value: any): string {
25
10
 
26
- /* --------------------------------------------------
27
- 🔐 2. Link sicuri
28
- -------------------------------------------------- */
29
- const originalLinkRenderer = renderer.link.bind(renderer);
11
+ const input =
12
+ typeof value === 'string'
13
+ ? value
14
+ : (value === null || value === undefined) ? '' : String(value);
30
15
 
31
- const dangerousProtocols = [
32
- /^javascript:/i,
33
- /^data:/i,
34
- /^vbscript:/i
35
- ];
16
+ const inputWithNewlines = input.replace(/\\n/g, '\n');
36
17
 
37
- renderer.link = function({ href, title, tokens }: any) {
18
+ const renderer = new marked.Renderer();
38
19
 
39
- const normalized = (href || '').trim();
20
+ /* --------------------------------------------------
21
+ 🔐 1. NON renderizzare HTML raw
22
+ -------------------------------------------------- */
23
+ renderer.html = function(token: Tokens.HTML | Tokens.Tag): string {
24
+ const html = 'text' in token ? token.text : '';
40
25
 
41
- const isDangerous = dangerousProtocols.some(pattern =>
42
- pattern.test(normalized)
43
- );
26
+ return html
27
+ .replace(/&/g, '&amp;')
28
+ .replace(/</g, '&lt;')
29
+ .replace(/>/g, '&gt;');
30
+ };
44
31
 
45
- if (isDangerous) {
46
- return tokens ? tokens.map((t: any) => t.raw).join('') : href || '';
47
- }
32
+ /* --------------------------------------------------
33
+ 🔐 2. Link sicuri
34
+ -------------------------------------------------- */
35
+ const originalLinkRenderer = renderer.link.bind(renderer);
48
36
 
49
- const html = originalLinkRenderer({ href, title, tokens });
37
+ const dangerousProtocols = [
38
+ /^javascript:/i,
39
+ /^data:/i,
40
+ /^vbscript:/i
41
+ ];
50
42
 
51
- // aggiunge sicurezza ai link
52
- return html.replace(
53
- '<a ',
54
- '<a target="_blank" rel="noopener noreferrer" '
55
- );
56
- };
43
+ renderer.link = function({ href, title, tokens }) {
57
44
 
58
- MarkedPipe.renderer = renderer;
59
- }
60
- return MarkedPipe.renderer;
61
- }
45
+ const normalized = (href || '').trim();
62
46
 
63
- transform(value: any): string {
47
+ const isDangerous = dangerousProtocols.some(pattern =>
48
+ pattern.test(normalized)
49
+ );
64
50
 
65
- const input =
66
- typeof value === 'string'
67
- ? value
68
- : (value === null || value === undefined) ? '' : String(value);
51
+ if (isDangerous) {
52
+ return tokens ? tokens.map(t => t.raw).join('') : href || '';
53
+ }
69
54
 
70
- const inputWithNewlines = input.replace(/\\n/g, '\n');
55
+ const html = originalLinkRenderer({ href, title, tokens });
71
56
 
72
- const renderer = MarkedPipe.getRenderer();
57
+ // aggiunge sicurezza ai link
58
+ return html.replace(
59
+ '<a ',
60
+ '<a target="_blank" rel="noopener noreferrer" '
61
+ );
62
+ };
73
63
 
74
64
  marked.setOptions({
75
65
  renderer,
@@ -40,10 +40,8 @@ export class AppConfigService {
40
40
  }
41
41
  // END GET BASE URL and create absolute url of remoteConfigUrl //
42
42
  const that = this;
43
- return this.http.get(urlConfigFile).toPromise().then((data: any) => {
44
- if (data) {
45
- that.appConfig = data;
46
- }
43
+ return this.http.get(urlConfigFile).toPromise().then(data => {
44
+ that.appConfig = data;
47
45
  }).catch(err => {
48
46
  console.error('error loadAppConfig', err);
49
47
  });
@@ -1,33 +1,12 @@
1
- import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
2
- import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
3
1
  import { TestBed } from '@angular/core/testing';
4
- import { TranslateModule } from '@ngx-translate/core';
5
2
 
6
3
  import { BrandService } from './brand.service';
7
- import { AppConfigService } from './app-config.service';
8
- import { Globals } from '../utils/globals';
9
4
 
10
5
  describe('BrandService', () => {
11
- let httpMock: HttpTestingController;
12
-
13
- beforeEach(() => {
14
- TestBed.configureTestingModule({
15
- imports: [TranslateModule.forRoot()],
16
- providers: [
17
- BrandService,
18
- Globals,
19
- AppConfigService,
20
- provideHttpClient(withInterceptorsFromDi()),
21
- provideHttpClientTesting(),
22
- ],
23
- });
24
- httpMock = TestBed.inject(HttpTestingController);
25
- });
26
-
27
- afterEach(() => httpMock.verify());
6
+ beforeEach(() => TestBed.configureTestingModule({}));
28
7
 
29
8
  it('should be created', () => {
30
- const service = TestBed.inject(BrandService);
9
+ const service: BrandService = TestBed.get(BrandService);
31
10
  expect(service).toBeTruthy();
32
11
  });
33
12
  });
@@ -60,7 +60,7 @@ export class BrandService {
60
60
  },
61
61
  WIDGET: {
62
62
  LOGO_CHAT: "https://smartflows-eu-public.s3.eu-central-1.amazonaws.com/imagicle-resources/SmartflowsLogo-NoText.svg",
63
- POWERED_BY: "<a target='_blank' rel='noopener noreferrer' href='https://www.imagicle.com/en/products/conversational-ai/'><img src='https://smartflows-eu-public.s3.eu-central-1.amazonaws.com/imagicle-resources/SmartflowsLogo-NoText.svg' alt=''/><span> Powered by Conversational AI</span></a>",
63
+ POWERED_BY: "<a tabindex='-1' target='_blank href='https://www.imagicle.com/en/products/conversational-ai/'><img src='https://smartflows-eu-public.s3.eu-central-1.amazonaws.com/imagicle-resources/SmartflowsLogo-NoText.svg'/><span> Powered by Conversational AI</span></a>",
64
64
  },
65
65
  CDS: {
66
66
  META_TITLE:"Design Studio",