@chat21/chat21-web-widget 5.0.52 → 5.0.53-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 +8 -0
- package/angular.json +1 -3
- package/dist/base_script.html +57 -0
- package/dist/launch.js +4 -61
- package/dist/main.js +1 -1
- package/package.json +1 -1
- package/src/app/app.component.ts +2 -0
- package/src/app/app.module.ts +2 -0
- package/src/app/component/conversation-detail/conversation/conversation.component.html +13 -1
- package/src/app/component/conversation-detail/conversation/conversation.component.scss +19 -0
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +51 -0
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +22 -0
- package/src/app/component/home/home.component.html +7 -15
- package/src/app/providers/global-settings.service.ts +2 -2
- package/src/app/utils/rules.ts +13 -0
- package/src/base_script.html +57 -0
- package/src/chat21-core/providers/abstract/logger.service.ts +1 -0
- package/src/chat21-core/providers/logger/customLogger.ts +4 -0
- package/src/launch.js +4 -61
- package/dist/test-auth-remote.html +0 -95
- package/dist/test-auth.html +0 -49
- package/dist/test-buttons.html +0 -147
- package/src/test-auth-remote.html +0 -95
- package/src/test-auth.html +0 -49
- package/src/test-buttons.html +0 -147
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# chat21-web-widget ver 5.0
|
|
2
2
|
|
|
3
|
+
### 5.0.53-rc.1
|
|
4
|
+
- added: Rules class (work in progress)
|
|
5
|
+
- added: base_script.html to load element inside tiledesk-iframe
|
|
6
|
+
- added: getLoggerConfig to logger service
|
|
7
|
+
- removed: document.write() injection
|
|
8
|
+
- removed: unused html test file
|
|
9
|
+
|
|
10
|
+
|
|
3
11
|
### 5.0.52 in PROD
|
|
4
12
|
|
|
5
13
|
### 5.0.52-rc.4
|
package/angular.json
CHANGED
|
@@ -27,13 +27,11 @@
|
|
|
27
27
|
"src/favicon.ico",
|
|
28
28
|
"src/assets",
|
|
29
29
|
"src/test.html",
|
|
30
|
-
"src/test-buttons.html",
|
|
31
|
-
"src/test-auth.html",
|
|
32
|
-
"src/test-auth-remote.html",
|
|
33
30
|
"src/test-new.html",
|
|
34
31
|
"src/test-custom-auth.html",
|
|
35
32
|
"src/tiledesk.js",
|
|
36
33
|
"src/launch.js",
|
|
34
|
+
"src/base_script.html",
|
|
37
35
|
"src/iframe-style.css",
|
|
38
36
|
"src/widget-config-template.json",
|
|
39
37
|
"src/widget-config.json",
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<html lang="en">
|
|
2
|
+
<head>
|
|
3
|
+
<meta charset="utf-8">
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
|
|
5
|
+
<title>Tilechat Widget</title>
|
|
6
|
+
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
|
7
|
+
<script>
|
|
8
|
+
var tiledeskScriptBaseLocation = window.location.href.replace("/base_script.html","");
|
|
9
|
+
|
|
10
|
+
var link_2 = document.createElement('link')
|
|
11
|
+
link_2.setAttribute('rel', 'stylesheet')
|
|
12
|
+
link_2.setAttribute('type', 'text/css')
|
|
13
|
+
link_2.setAttribute('href', tiledeskScriptBaseLocation + '/assets/styles/tiledesk_v1.scss')
|
|
14
|
+
link_2.setAttribute('media','all')
|
|
15
|
+
|
|
16
|
+
var script_1 = document.createElement('script')
|
|
17
|
+
script_1.setAttribute('type','text/javascript')
|
|
18
|
+
script_1.setAttribute('src',tiledeskScriptBaseLocation + '/runtime.js')
|
|
19
|
+
var script_2 = document.createElement('script')
|
|
20
|
+
script_2.setAttribute('type','text/javascript')
|
|
21
|
+
script_2.setAttribute('src',tiledeskScriptBaseLocation + '/polyfills.js')
|
|
22
|
+
var link = document.createElement('link')
|
|
23
|
+
link.setAttribute('type','text/css')
|
|
24
|
+
link.setAttribute('rel','stylesheet')
|
|
25
|
+
link.setAttribute('href',tiledeskScriptBaseLocation + '/styles.css')
|
|
26
|
+
link.setAttribute('media','all')
|
|
27
|
+
var script_4 = document.createElement('script')
|
|
28
|
+
script_4.setAttribute('type','text/javascript')
|
|
29
|
+
script_4.setAttribute('src',tiledeskScriptBaseLocation + '/vendor.js')
|
|
30
|
+
var script_5 = document.createElement('script')
|
|
31
|
+
script_5.setAttribute('type','text/javascript')
|
|
32
|
+
script_5.setAttribute('src',tiledeskScriptBaseLocation + '/main.js')
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
window.addEventListener("load", (event) => {
|
|
36
|
+
|
|
37
|
+
let head = document.getElementsByTagName('head')[0]
|
|
38
|
+
head.appendChild(link_2)
|
|
39
|
+
|
|
40
|
+
let body = document.getElementsByTagName('body')[0]
|
|
41
|
+
body.appendChild(script_1)
|
|
42
|
+
body.appendChild(script_2)
|
|
43
|
+
body.appendChild(link)
|
|
44
|
+
body.appendChild(script_4)
|
|
45
|
+
body.appendChild(script_5)
|
|
46
|
+
});
|
|
47
|
+
</script>
|
|
48
|
+
</head>
|
|
49
|
+
<body>
|
|
50
|
+
<chat-root></chat-root>
|
|
51
|
+
<!-- <script type="text/javascript" src="http://localhost:4202/runtime.js"></script>
|
|
52
|
+
<script type="text/javascript" src="http://localhost:4202/polyfills.js"></script>
|
|
53
|
+
<script type="text/css" src="http://localhost:4202/styles.css"></script>
|
|
54
|
+
<script type="text/javascript" src="http://localhost:4202/vendor.js"></script>
|
|
55
|
+
<script type="text/javascript" src="http://localhost:4202/main.js"></script> -->
|
|
56
|
+
</body>
|
|
57
|
+
</html>
|
package/dist/launch.js
CHANGED
|
@@ -163,69 +163,12 @@ function loadIframe(tiledeskScriptBaseLocation) {
|
|
|
163
163
|
|
|
164
164
|
iDiv.appendChild(ifrm);
|
|
165
165
|
|
|
166
|
-
// buildIframeDOM(ifrm)
|
|
167
166
|
// ifrm.contentWindow.document.open();
|
|
168
|
-
|
|
169
|
-
// ifrm.
|
|
170
|
-
ifrm.contentWindow.document.
|
|
171
|
-
ifrm.contentWindow.document.
|
|
172
|
-
ifrm.contentWindow.document.close();
|
|
173
|
-
|
|
174
|
-
}
|
|
167
|
+
ifrm.src = tiledeskScriptBaseLocation + '/base_script.html'
|
|
168
|
+
// ifrm.contentWindow.document.open();
|
|
169
|
+
// ifrm.contentWindow.document.write(srcTileDesk);
|
|
170
|
+
// ifrm.contentWindow.document.close();
|
|
175
171
|
|
|
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
172
|
}
|
|
230
173
|
|
|
231
174
|
|