@chat21/chat21-web-widget 5.0.70 → 5.0.71-rc.10

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 (46) hide show
  1. package/.github/workflows/build.yml +2 -2
  2. package/CHANGELOG.md +37 -0
  3. package/Dockerfile +1 -1
  4. package/package.json +1 -1
  5. package/src/app/app.component.ts +49 -49
  6. package/src/app/component/conversation-detail/conversation/conversation.component.html +3 -2
  7. package/src/app/component/conversation-detail/conversation/conversation.component.scss +3 -2
  8. package/src/app/component/conversation-detail/conversation/conversation.component.ts +3 -8
  9. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.html +2 -3
  10. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.ts +2 -4
  11. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +1 -1
  12. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +8 -4
  13. package/src/app/component/last-message/last-message.component.scss +1 -1
  14. package/src/app/component/message/carousel/carousel.component.html +6 -2
  15. package/src/app/component/message/carousel/carousel.component.scss +22 -0
  16. package/src/app/component/message/carousel/carousel.component.ts +6 -5
  17. package/src/app/component/message/image/image.component.ts +0 -3
  18. package/src/app/providers/global-settings.service.ts +5 -0
  19. package/src/app/sass/_variables.scss +1 -1
  20. package/src/app/utils/constants.ts +0 -2
  21. package/src/app/utils/globals.ts +4 -3
  22. package/src/app/utils/rules.ts +1 -1
  23. package/src/assets/images/icons/no-image.svg +6 -0
  24. package/src/assets/js/chat21client.js +7 -3
  25. package/src/assets/twp/chatbot-panel.html +223 -19
  26. package/src/assets/twp/index-dev.html +56 -17
  27. package/src/assets/twp/index.html +110 -37
  28. package/src/chat21-core/models/conversation.ts +2 -1
  29. package/src/chat21-core/models/upload.ts +0 -1
  30. package/src/chat21-core/providers/abstract/upload.service.ts +3 -0
  31. package/src/chat21-core/providers/firebase/firebase-auth-service.ts +3 -3
  32. package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +1 -1
  33. package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +2 -1
  34. package/src/chat21-core/providers/firebase/firebase-upload.service.ts +128 -6
  35. package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +1 -1
  36. package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +1 -1
  37. package/src/chat21-core/providers/mqtt/mqtt-conversations-handler.ts +10 -1
  38. package/src/chat21-core/providers/mqtt/mqtt-presence.service.ts +1 -1
  39. package/src/chat21-core/providers/native/native-upload-service.ts +68 -0
  40. package/src/chat21-core/utils/constants.ts +15 -1
  41. package/src/chat21-core/utils/triggerHandler.ts +0 -1
  42. package/src/chat21-core/utils/utils-message.ts +8 -0
  43. package/src/chat21-core/utils/utils.ts +0 -39
  44. package/src/launch.js +0 -1
  45. package/src/widget-config-template.json +2 -2
  46. package/src/widget-config.json +2 -1
@@ -284,41 +284,6 @@ function convertUrlToTag(url) {
284
284
  //// <a href="#" onclick="openPopup(' + url + ')">' + url + '</a>';
285
285
  }
286
286
 
287
-
288
- export function isPopupUrl(url) {
289
- try {
290
- const TEMP = url.split('popup=')[1];
291
- // può essere seguito da & oppure "
292
- if (TEMP) {
293
- if (TEMP.startsWith('true')) {
294
- return true;
295
- } else {
296
- return false;
297
- }
298
- } else {
299
- return false;
300
- }
301
- } catch (e) {
302
- return false;
303
- }
304
- }
305
-
306
- export function popupUrl(windowContext, html, title) {
307
- const url = stripTags(html);
308
- const w = 600;
309
- const h = 600; // screen.height - 40;
310
- const left = (screen.width / 2) - (w / 2);
311
- const top = (screen.height / 2) - (h / 2);
312
-
313
- // tslint:disable-next-line:whitespace
314
- // tslint:disable-next-line:max-line-length
315
- const newWindow = windowContext.open(url, '_blank', 'fullscreen=1, titlebar=0, toolbar=no, location=0, status=0, menubar=0, scrollbars=0, resizable=0, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
316
- if (windowContext.focus) {
317
- newWindow.focus();
318
- }
319
- }
320
-
321
-
322
287
  export function encodeHTML(str) {
323
288
  return convert(str);
324
289
  // return str.replace(/[\u00A0-\u9999<>&](?!#)/gim, function(i) {
@@ -343,10 +308,6 @@ function convert(str) {
343
308
  return str;
344
309
  }
345
310
 
346
- export function stripTags(html) {
347
- return (html.replace(/<.*?>/g, '')).trim();
348
- }
349
-
350
311
  export function htmlEntities(str) {
351
312
  return String(str)
352
313
  .replace(/&/g, '&amp;')
package/src/launch.js CHANGED
@@ -35,7 +35,6 @@ function ready(callbackFunction){
35
35
  document.removeEventListener('mousedown', start);
36
36
  document.removeEventListener('mousemove', start);
37
37
  document.removeEventListener('touchstart', start);
38
- document.removeEventListener('scroll', start);
39
38
  document.removeEventListener('keydown', start);
40
39
  }
41
40
 
@@ -23,6 +23,6 @@
23
23
  "baseImageUrl": "${API_BASEIMAGE_URL}",
24
24
  "dashboardUrl": "${DASHBOARD_URL}",
25
25
  "authPersistence": "${AUTH_PERSISTENCE}",
26
- "enbedJs": "${ENBED_JS}"
27
-
26
+ "enbedJs": "${ENBED_JS}",
27
+ "brandSrc": "${BRAND_SRC}"
28
28
  }
@@ -23,6 +23,7 @@
23
23
  "baseImageUrl": "http://localhost:3000/",
24
24
  "dashboardUrl": "http://localhost:4500/",
25
25
  "authPersistence": "LOCAL",
26
- "enbedJs": true
26
+ "enbedJs": true,
27
+ "brandSrc": "${BRAND_SRC}"
27
28
 
28
29
  }