@chat21/chat21-web-widget 5.0.51-rc.2 → 5.0.52-rc.1
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 +6 -0
- package/dist/assets/twp/chatbot-panel.html +1 -0
- package/dist/launch.js +60 -1
- package/dist/main.js +1 -1
- package/package.json +1 -1
- package/src/assets/twp/chatbot-panel.html +1 -0
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +15 -14
- package/src/launch.js +60 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# chat21-web-widget ver 5.0
|
|
2
2
|
|
|
3
|
+
### 5.0.52-rc.1
|
|
4
|
+
- changed: background opacity in chatbot-panel html page
|
|
5
|
+
- bug-fixed: splitted messages is shown twice
|
|
6
|
+
|
|
7
|
+
### 5.0.51 in PROD
|
|
8
|
+
|
|
3
9
|
### 5.0.51-rc.2
|
|
4
10
|
- added: label to social channels
|
|
5
11
|
- changed: footer position index / index-dev / chatbot-panel
|
package/dist/launch.js
CHANGED
|
@@ -161,14 +161,73 @@ function loadIframe(tiledeskScriptBaseLocation) {
|
|
|
161
161
|
});
|
|
162
162
|
/**** END EVENST ****/
|
|
163
163
|
|
|
164
|
-
// ifrm.srcdoc = srcTileDesk
|
|
165
164
|
iDiv.appendChild(ifrm);
|
|
165
|
+
|
|
166
|
+
// buildIframeDOM(ifrm)
|
|
167
|
+
// ifrm.contentWindow.document.open();
|
|
168
|
+
// ifrm.document.srcdoc = srcTileDesk;
|
|
169
|
+
// ifrm.srcdoc = srcTileDesk
|
|
166
170
|
ifrm.contentWindow.document.open();
|
|
167
171
|
ifrm.contentWindow.document.write(srcTileDesk);
|
|
168
172
|
ifrm.contentWindow.document.close();
|
|
169
173
|
|
|
170
174
|
}
|
|
171
175
|
|
|
176
|
+
function buildIframeDOM(iframe){
|
|
177
|
+
|
|
178
|
+
var meta = document.createElement('meta');
|
|
179
|
+
meta.setAttribute('charset', 'utf-8')
|
|
180
|
+
var meta_2 = document.createElement('meta')
|
|
181
|
+
meta_2.setAttribute('name', 'viewport')
|
|
182
|
+
meta_2.setAttribute('content', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0')
|
|
183
|
+
var title = document.createElement('title')
|
|
184
|
+
title.title = 'Tilechat Widget'
|
|
185
|
+
var base = document.createElement('base')
|
|
186
|
+
base.setAttribute('href', './')
|
|
187
|
+
var link_1 = document.createElement('link')
|
|
188
|
+
link_1.setAttribute('rel', 'icon')
|
|
189
|
+
link_1.setAttribute('type', 'image/x-icon')
|
|
190
|
+
link_1.setAttribute('href', 'favicon.ico')
|
|
191
|
+
var link_2 = document.createElement('link')
|
|
192
|
+
link_2.setAttribute('rel', 'stylesheet')
|
|
193
|
+
link_2.setAttribute('type', 'text/css')
|
|
194
|
+
link_2.setAttribute('href', tiledeskScriptBaseLocation + '/assets/styles/tiledesk_v1.scss')
|
|
195
|
+
link_2.setAttribute('media','all')
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
let head = iframe.contentWindow.document.getElementsByTagName('head')[0]
|
|
199
|
+
head.appendChild(meta)
|
|
200
|
+
head.appendChild(meta_2)
|
|
201
|
+
head.appendChild(title)
|
|
202
|
+
head.appendChild(base)
|
|
203
|
+
head.appendChild(link_1)
|
|
204
|
+
head.appendChild(link_2)
|
|
205
|
+
|
|
206
|
+
var script_1 = document.createElement('script')
|
|
207
|
+
script_1.setAttribute('type','text/javascript')
|
|
208
|
+
script_1.setAttribute('src',tiledeskScriptBaseLocation + '/runtime.js')
|
|
209
|
+
var script_2 = document.createElement('script')
|
|
210
|
+
script_2.setAttribute('type','text/javascript')
|
|
211
|
+
script_2.setAttribute('src',tiledeskScriptBaseLocation + '/polyfills.js')
|
|
212
|
+
var script_3 = document.createElement('script')
|
|
213
|
+
script_3.setAttribute('type','text/javascript')
|
|
214
|
+
script_3.setAttribute('src',tiledeskScriptBaseLocation + '/styles.css')
|
|
215
|
+
var script_4 = document.createElement('script')
|
|
216
|
+
script_4.setAttribute('type','text/javascript')
|
|
217
|
+
script_4.setAttribute('src',tiledeskScriptBaseLocation + '/vendor.js')
|
|
218
|
+
var script_5 = document.createElement('script')
|
|
219
|
+
script_5.setAttribute('type','text/javascript')
|
|
220
|
+
script_5.setAttribute('src',tiledeskScriptBaseLocation + '/main.js')
|
|
221
|
+
|
|
222
|
+
let body= iframe.contentWindow.document.getElementsByTagName('body')[0]
|
|
223
|
+
body.appendChild(document.createElement('chat-root'))
|
|
224
|
+
body.appendChild(script_1)
|
|
225
|
+
body.appendChild(script_2)
|
|
226
|
+
body.appendChild(script_3)
|
|
227
|
+
body.appendChild(script_4)
|
|
228
|
+
body.appendChild(script_5)
|
|
229
|
+
}
|
|
230
|
+
|
|
172
231
|
|
|
173
232
|
function initAysncEvents() {
|
|
174
233
|
console.log('INIT ASYNC EVENTS')
|