@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.
- package/.github/workflows/build.yml +2 -2
- package/CHANGELOG.md +37 -0
- package/Dockerfile +1 -1
- package/package.json +1 -1
- package/src/app/app.component.ts +49 -49
- package/src/app/component/conversation-detail/conversation/conversation.component.html +3 -2
- package/src/app/component/conversation-detail/conversation/conversation.component.scss +3 -2
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +3 -8
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.html +2 -3
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.ts +2 -4
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +1 -1
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +8 -4
- package/src/app/component/last-message/last-message.component.scss +1 -1
- package/src/app/component/message/carousel/carousel.component.html +6 -2
- package/src/app/component/message/carousel/carousel.component.scss +22 -0
- package/src/app/component/message/carousel/carousel.component.ts +6 -5
- package/src/app/component/message/image/image.component.ts +0 -3
- package/src/app/providers/global-settings.service.ts +5 -0
- package/src/app/sass/_variables.scss +1 -1
- package/src/app/utils/constants.ts +0 -2
- package/src/app/utils/globals.ts +4 -3
- package/src/app/utils/rules.ts +1 -1
- package/src/assets/images/icons/no-image.svg +6 -0
- package/src/assets/js/chat21client.js +7 -3
- package/src/assets/twp/chatbot-panel.html +223 -19
- package/src/assets/twp/index-dev.html +56 -17
- package/src/assets/twp/index.html +110 -37
- package/src/chat21-core/models/conversation.ts +2 -1
- package/src/chat21-core/models/upload.ts +0 -1
- package/src/chat21-core/providers/abstract/upload.service.ts +3 -0
- package/src/chat21-core/providers/firebase/firebase-auth-service.ts +3 -3
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +2 -1
- package/src/chat21-core/providers/firebase/firebase-upload.service.ts +128 -6
- package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +1 -1
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +1 -1
- package/src/chat21-core/providers/mqtt/mqtt-conversations-handler.ts +10 -1
- package/src/chat21-core/providers/mqtt/mqtt-presence.service.ts +1 -1
- package/src/chat21-core/providers/native/native-upload-service.ts +68 -0
- package/src/chat21-core/utils/constants.ts +15 -1
- package/src/chat21-core/utils/triggerHandler.ts +0 -1
- package/src/chat21-core/utils/utils-message.ts +8 -0
- package/src/chat21-core/utils/utils.ts +0 -39
- package/src/launch.js +0 -1
- package/src/widget-config-template.json +2 -2
- 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, '&')
|
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
|
|