@chat21/chat21-web-widget 5.0.96 → 5.0.98
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/CHANGELOG.md +5 -0
- package/package.json +1 -1
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.scss +1 -0
- package/src/assets/twp/chatbot-panel.html +8 -1
- package/src/assets/twp/index-dev.html +8 -1
- package/src/assets/twp/index.html +13 -3
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -613,7 +613,7 @@
|
|
|
613
613
|
var brandJson = JSON.parse(xhr.response)
|
|
614
614
|
if(brandJson){
|
|
615
615
|
/** TITLE AND FAVICON **/
|
|
616
|
-
brandJson['WIDGET'].META_TITLE? document.
|
|
616
|
+
brandJson['WIDGET'].META_TITLE? document.title = brandJson['WIDGET'].META_TITLE : null;
|
|
617
617
|
brandJson['WIDGET'].FAVICON_URL? document.querySelector("link[rel~='icon']").setAttribute('href', brandJson['WIDGET'].FAVICON_URL) : null;
|
|
618
618
|
/** FOOTER-LOGO **/
|
|
619
619
|
brandJson['COMMON'].COMPANY_LOGO? document.getElementById('footer-logo').src = brandJson['COMMON'].COMPANY_LOGO : null;
|
|
@@ -624,6 +624,13 @@
|
|
|
624
624
|
brandJson['COMMON'].BRAND_PRIMARY_COLOR? document.body.style.setProperty('--base-company-logo', brandJson['COMMON'].BRAND_PRIMARY_COLOR): null;
|
|
625
625
|
/** IFRAME TITLE**/
|
|
626
626
|
brandJson['COMMON'].COMPANY_NAME? document.getElementById('tiledeskiframe').title = brandJson['COMMON'].COMPANY_NAME + ' Widget' : null;
|
|
627
|
+
/** META sharing ELEMENTS */
|
|
628
|
+
if(brandJson['WIDGET'].META_SHARE_INFO && Object.keys(brandJson['WIDGET'].META_SHARE_INFO).length > 0){
|
|
629
|
+
Object.keys(brandJson['WIDGET'].META_SHARE_INFO).forEach(key => {
|
|
630
|
+
var meta = document.querySelector("meta[property^='og:"+key.toLowerCase()+"']");
|
|
631
|
+
meta.setAttribute('content', brandJson['WIDGET'].META_SHARE_INFO[key])
|
|
632
|
+
})
|
|
633
|
+
}
|
|
627
634
|
}
|
|
628
635
|
}
|
|
629
636
|
|
|
@@ -719,7 +719,7 @@
|
|
|
719
719
|
var brandJson = JSON.parse(xhr.response)
|
|
720
720
|
if(brandJson){
|
|
721
721
|
/** TITLE AND FAVICON **/
|
|
722
|
-
brandJson['WIDGET'].META_TITLE? document.
|
|
722
|
+
brandJson['WIDGET'].META_TITLE? document.title = brandJson['WIDGET'].META_TITLE : null;
|
|
723
723
|
brandJson['WIDGET'].FAVICON_URL? document.querySelector("link[rel~='icon']").setAttribute('href', brandJson['WIDGET'].FAVICON_URL) : null;
|
|
724
724
|
/** FOOTER-LOGO **/
|
|
725
725
|
brandJson['COMMON'].COMPANY_LOGO? document.getElementById('footer-logo').src = brandJson['COMMON'].COMPANY_LOGO : null;
|
|
@@ -737,6 +737,13 @@
|
|
|
737
737
|
}
|
|
738
738
|
/** IFRAME TITLE**/
|
|
739
739
|
brandJson['COMMON'].COMPANY_LOGO? document.getElementById('tiledeskiframe').title = brandJson['COMMON'].COMPANY_NAME + ' Widget' : null;
|
|
740
|
+
/** META sharing ELEMENTS */
|
|
741
|
+
if(brandJson['WIDGET'].META_SHARE_INFO && Object.keys(brandJson['WIDGET'].META_SHARE_INFO).length > 0){
|
|
742
|
+
Object.keys(brandJson['WIDGET'].META_SHARE_INFO).forEach(key => {
|
|
743
|
+
var meta = document.querySelector("meta[property^='og:"+key.toLowerCase()+"']");
|
|
744
|
+
meta.setAttribute('content', brandJson['WIDGET'].META_SHARE_INFO[key])
|
|
745
|
+
})
|
|
746
|
+
}
|
|
740
747
|
}
|
|
741
748
|
}
|
|
742
749
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<meta charset="utf-8">
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
8
8
|
|
|
9
|
-
<title>Widget test page
|
|
9
|
+
<title>Widget test page</title>
|
|
10
10
|
<style>
|
|
11
11
|
|
|
12
12
|
@-moz-keyframes blink {0%{opacity:1;} 50%{opacity:0;} 100%{opacity:1;}} /* Firefox */
|
|
@@ -295,7 +295,10 @@
|
|
|
295
295
|
window.Tiledesk('onBeforeInit', function(event_data) {
|
|
296
296
|
console.log("onBeforeInit Tiledesk FN", event_data);
|
|
297
297
|
|
|
298
|
-
|
|
298
|
+
if(event_data.detail.appConfigs.brandSrc){
|
|
299
|
+
getBrandResources(event_data.detail.appConfigs.brandSrc)
|
|
300
|
+
}
|
|
301
|
+
// var brandSrc = event_data.detail.appConfigs.brandSrc? : null;
|
|
299
302
|
|
|
300
303
|
setTimeout(() => {
|
|
301
304
|
if(event_data && event_data.detail && event_data.detail.appConfigs){
|
|
@@ -408,7 +411,7 @@
|
|
|
408
411
|
var brandJson = JSON.parse(xhr.response)
|
|
409
412
|
if(brandJson){
|
|
410
413
|
/** TITLE AND FAVICON **/
|
|
411
|
-
brandJson['WIDGET'].META_TITLE? document.
|
|
414
|
+
brandJson['WIDGET'].META_TITLE? document.title = brandJson['WIDGET'].META_TITLE : null;
|
|
412
415
|
brandJson['WIDGET'].FAVICON_URL? document.querySelector("link[rel~='icon']").setAttribute('href', brandJson['WIDGET'].FAVICON_URL) : null;
|
|
413
416
|
/** FOOTER-LOGO **/
|
|
414
417
|
brandJson['COMMON'].COMPANY_LOGO? document.getElementById('footer-logo').src = brandJson['COMMON'].COMPANY_LOGO : null;
|
|
@@ -421,6 +424,13 @@
|
|
|
421
424
|
brandJson['COMMON'].DOCS? null: document.getElementById('share').style.display = 'none'
|
|
422
425
|
/** IFRAME TITLE**/
|
|
423
426
|
brandJson['COMMON'].COMPANY_LOGO? document.getElementById('tiledeskiframe').title = brandJson['COMMON'].COMPANY_NAME + ' Widget' : null;
|
|
427
|
+
/** META sharing ELEMENTS */
|
|
428
|
+
if(brandJson['WIDGET'].META_SHARE_INFO && Object.keys(brandJson['WIDGET'].META_SHARE_INFO).length > 0){
|
|
429
|
+
Object.keys(brandJson['WIDGET'].META_SHARE_INFO).forEach(key => {
|
|
430
|
+
var meta = document.querySelector("meta[property^='og:"+key.toLowerCase()+"']");
|
|
431
|
+
meta.setAttribute('content', brandJson['WIDGET'].META_SHARE_INFO[key])
|
|
432
|
+
})
|
|
433
|
+
}
|
|
424
434
|
}
|
|
425
435
|
|
|
426
436
|
}
|