@chat21/chat21-web-widget 5.0.53-rc.1 → 5.0.53-rc.2
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/docker-community-push-latest.yml +1 -0
- package/.github/workflows/docker-image-tag-community-tag-push.yml +1 -0
- package/CHANGELOG.md +8 -0
- package/Dockerfile +2 -2
- package/angular.json +3 -18
- package/deploy_amazon_beta.sh +1 -1
- package/deploy_amazon_prod.sh +1 -1
- package/package.json +17 -18
- package/src/app/app.component.scss +38 -10
- package/src/app/app.module.ts +3 -3
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +0 -10
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.spec.ts +0 -2
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.ts +0 -10
- package/src/app/component/form/form-builder/form-builder.component.ts +1 -1
- package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.ts +1 -1
- package/src/app/component/form/inputs/form-label/form-label.component.ts +1 -1
- package/src/app/component/form/inputs/form-text/form-text.component.ts +2 -2
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.ts +2 -2
- package/src/app/component/form/prechat-form/prechat-form.component.ts +1 -1
- package/src/app/component/message/bubble-message/bubble-message.component.html +1 -4
- package/src/app/component/message/bubble-message/bubble-message.component.ts +1 -37
- package/src/app/component/message/image/image.component.ts +1 -9
- package/src/app/component/message/info-message/info-message.component.html +3 -3
- package/src/app/component/message/info-message/info-message.component.ts +0 -10
- package/src/app/directives/tooltip.directive.spec.ts +8 -0
- package/src/app/directives/tooltip.directive.ts +46 -0
- package/src/chat21-core/providers/abstract/archivedconversations-handler.service.ts +5 -5
- package/src/chat21-core/providers/abstract/conversation-handler.service.ts +6 -6
- package/src/chat21-core/providers/abstract/conversations-handler.service.ts +6 -6
- package/src/chat21-core/providers/abstract/groups-handler.service.ts +5 -5
- package/src/chat21-core/providers/abstract/messagingAuth.service.ts +2 -2
- package/src/chat21-core/providers/abstract/presence.service.ts +2 -2
- package/src/chat21-core/providers/abstract/typing.service.ts +2 -2
- package/src/chat21-core/providers/abstract/upload.service.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-archivedconversations-handler.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-groups-handler.ts +1 -1
- package/src/chat21-core/providers/mqtt/mqtt-archivedconversations-handler.ts +1 -1
- package/src/chat21-core/providers/mqtt/mqtt-conversations-handler.ts +0 -1
- package/src/chat21-core/providers/mqtt/mqtt-groups-handler.ts +1 -1
- package/src/chat21-core/utils/constants.ts +3 -2
- package/src/chat21-core/utils/utils.ts +2 -0
- package/src/polyfills.ts +0 -10
- package/src/test.ts +3 -1
- package/tsconfig.json +5 -3
- package/dist/3rdpartylicenses.txt +0 -942
- package/dist/assets/i18n/en.json +0 -94
- package/dist/assets/i18n/es.json +0 -90
- package/dist/assets/i18n/fr.json +0 -90
- package/dist/assets/i18n/it.json +0 -90
- package/dist/assets/images/avatar_bot_tiledesk.svg +0 -1
- package/dist/assets/images/chat_human_avatar.svg +0 -12
- package/dist/assets/images/f21ico-done.svg +0 -1
- package/dist/assets/images/f21ico-done_all.svg +0 -1
- package/dist/assets/images/f21ico-schedule.svg +0 -1
- package/dist/assets/images/file-alt-solid.png +0 -0
- package/dist/assets/images/light_avatar_placeholder.svg +0 -1
- package/dist/assets/images/tommy_bot_tiledesk.svg +0 -48
- package/dist/assets/images/website_mockup.jpg +0 -0
- package/dist/assets/js/chat21client.js +0 -1066
- package/dist/assets/js/mqtt/4.1.0/mqtt.min.js +0 -1
- package/dist/assets/js/mqtt/4.2.6/mqtt.min.js +0 -1
- package/dist/assets/js/mqtt/4.2.8/mqtt.min.js +0 -1
- package/dist/assets/sounds/Carme.mp3 +0 -0
- package/dist/assets/sounds/justsaying.mp3 +0 -0
- package/dist/assets/sounds/pling.mp3 +0 -0
- package/dist/assets/styles/tiledesk_v1.scss +0 -22
- package/dist/assets/twp/chatbot-panel.html +0 -424
- package/dist/assets/twp/index-dev.html +0 -2430
- package/dist/assets/twp/index.html +0 -603
- package/dist/assets/twp/tiledesk_widget_files/bootstrap.min.css +0 -5
- package/dist/assets/twp/tiledesk_widget_files/bootstrap.min.js +0 -7
- package/dist/assets/twp/tiledesk_widget_files/facebook.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/font-awesome.min.css +0 -4
- package/dist/assets/twp/tiledesk_widget_files/icon +0 -23
- package/dist/assets/twp/tiledesk_widget_files/jquery.min.js +0 -2
- package/dist/assets/twp/tiledesk_widget_files/linkedin.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/logo-black.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/logo-mobile.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/logo-short.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/logo.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/logo@2x-black.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/telegram.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/twitter.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/website-poly.min.css +0 -5623
- package/dist/assets/twp/tiledesk_widget_files/whatsapp.png +0 -0
- package/dist/base_script.html +0 -57
- package/dist/environments/real_data/widget-config-docker.json +0 -28
- package/dist/environments/real_data/widget-config-firebase.json +0 -30
- package/dist/environments/real_data/widget-config-mqtt.json +0 -27
- package/dist/environments/real_data/widget-config-native-mqtt.json +0 -28
- package/dist/environments/real_data/widget-config-native-prod.json +0 -27
- package/dist/f21ico-done.svg +0 -1
- package/dist/f21ico-done_all.svg +0 -1
- package/dist/f21ico-schedule.svg +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/iframe-style.css +0 -189
- package/dist/index.html +0 -16
- package/dist/launch.js +0 -371
- package/dist/main.js +0 -1
- package/dist/polyfills-es5.js +0 -1
- package/dist/polyfills.js +0 -1
- package/dist/runtime.js +0 -1
- package/dist/scripts.js +0 -1
- package/dist/styles.css +0 -1
- package/dist/styles.js +0 -1
- package/dist/test-custom-auth.html +0 -50
- package/dist/test-new.html +0 -231
- package/dist/test.html +0 -142
- package/dist/tiledesk.js +0 -72
- package/dist/vendor.js +0 -1
- package/dist/widget-config-template.json +0 -29
- package/dist/widget-config.json +0 -29
- package/e2e/protractor.conf.js +0 -32
- package/src/environments/environment.pre.ts +0 -42
- package/src/environments/environment.prod.ts +0 -40
- package/src/environments/environment.ts +0 -41
- package/src/environments/real_data/widget-config-docker.json +0 -28
- package/src/environments/real_data/widget-config-firebase.json +0 -30
- package/src/environments/real_data/widget-config-mqtt.json +0 -27
- package/src/environments/real_data/widget-config-native-mqtt.json +0 -28
- package/src/environments/real_data/widget-config-native-prod.json +0 -27
package/dist/test.html
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<base href="./">
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<title>Widget Test Page</title>
|
|
8
|
-
<script type="application/javascript" async>
|
|
9
|
-
// Handler for .ready() called.
|
|
10
|
-
window.tiledeskSettings =
|
|
11
|
-
{
|
|
12
|
-
// PRE:
|
|
13
|
-
// projectid: "6066e60cc3dade4e7389d182", //mqtt
|
|
14
|
-
projectid:"615577276b34e900353c1a63", //"62445574a0353b0035a05f27", //"6013ec749b32000045be650e", // firebase
|
|
15
|
-
// projectid: "609b8efa8732eb00141763d9", //mqtt-docker
|
|
16
|
-
// projectid: "61ae2f221c081a001a045961",//" 61b7840c7b4c750013b69025", //native-mqtt
|
|
17
|
-
// preChatForm: true,
|
|
18
|
-
align:'left',
|
|
19
|
-
calloutTimer: 5,
|
|
20
|
-
// calloutTitle: 'TITOLO CALLOUT',
|
|
21
|
-
// calloutMsg: 'messaggio callout widget',
|
|
22
|
-
// welcomeTitle: 'CIAO CLIENT',
|
|
23
|
-
// welcomeMsg: 'Messaggio benvenuto widget',
|
|
24
|
-
widgetTitle: "widget Title Test",
|
|
25
|
-
//startFromHome: false,
|
|
26
|
-
// logoChat: 'https://miro.medium.com/proxy/1*8mpWApzQD5gZZlnYYUkbcA.png',
|
|
27
|
-
// lang: 'fr',
|
|
28
|
-
// hideHeaderCloseButton: true,1626341000398
|
|
29
|
-
// isOpen: true,
|
|
30
|
-
// fullscreenMode: true,
|
|
31
|
-
// themeColor: '#ffcb05',
|
|
32
|
-
// themeForegroundColor: '#000000',
|
|
33
|
-
// departmentID : "615579216b34e900353c1da0",
|
|
34
|
-
// isShown: true,
|
|
35
|
-
allowTranscriptDownload: true,
|
|
36
|
-
marginX: "100px",
|
|
37
|
-
// marginY: "200px",
|
|
38
|
-
// startHidden: true,
|
|
39
|
-
// persistence: 'session',
|
|
40
|
-
// showWaitTime: false,
|
|
41
|
-
showAvailableAgents: true,
|
|
42
|
-
// showLogoutOption: false,
|
|
43
|
-
isLogEnabled: true,
|
|
44
|
-
// logLevel: "DEBUG"
|
|
45
|
-
// userFullname: " ",
|
|
46
|
-
// userEmail: "",
|
|
47
|
-
// autoStart: false,
|
|
48
|
-
// persistence: 'session'
|
|
49
|
-
// tenant: "tenant test",
|
|
50
|
-
// showAttachmentButton: false,
|
|
51
|
-
// privacyField: 'Accetto i termini della privacy <a style="text-transform: none" target="_blank" href="http://www.tiledesk.com/privacy.html">Privacy Policy</a>'
|
|
52
|
-
// customAttributes: {"nome": "Andrea", "nazione": "italia", "userFullname":"carlo"},
|
|
53
|
-
// bubbleSentBackground: "#828282",
|
|
54
|
-
// bubbleSentTextColor: "#b61416",
|
|
55
|
-
// bubbleReceivedBackground: "rgb(182, 20, 22)",
|
|
56
|
-
// bubbleReceivedTextColor: "rgb(247, 247, 247)",
|
|
57
|
-
// buttonBackgroundColor: "#828282",
|
|
58
|
-
// buttonTextColor: "#b61416",
|
|
59
|
-
// buttonHoverTextColor: "#828282",
|
|
60
|
-
// buttonHoverBackgroundColor: "#b61416",
|
|
61
|
-
// preChatFormJson: [{"name": "userFullname", "type":"text", "mandatory":true, "label":"LABEL_FIELD_NAME"}]
|
|
62
|
-
hideSettings: false
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
(function(d, s, id) {
|
|
66
|
-
var js, fjs = d.getElementsByTagName(s)[0];
|
|
67
|
-
if (d.getElementById(id)) return;
|
|
68
|
-
js = d.createElement(s);
|
|
69
|
-
js.id = id; //js.async=!0;
|
|
70
|
-
// PRE
|
|
71
|
-
js.src = "./launch.js"; //
|
|
72
|
-
// js.src = "https://widget-pre.tiledesk.com/v2/launch.js";
|
|
73
|
-
// PROD
|
|
74
|
-
// js.src = "https://widget.tiledesk.com/v4/launch.js";
|
|
75
|
-
fjs.parentNode.insertBefore(js, fjs);
|
|
76
|
-
}(document, 'script', 'tiledesk-jssdk'));
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
window.tileDeskAsyncInit = function() {
|
|
80
|
-
|
|
81
|
-
// var dateLoadPage = Date.now();
|
|
82
|
-
// window.tiledesk.on('onConversationUpdated', function(event_data) {
|
|
83
|
-
// var dateConvUpdate = event_data.detail.conversation.timestamp
|
|
84
|
-
// console.log(" TRIGGER onConversationUpdated -> ", event_data.detail.conversation);
|
|
85
|
-
// console.log("dateLoadPage-> ", dateLoadPage);
|
|
86
|
-
// console.log("dateConvUpdate-> ", dateConvUpdate);
|
|
87
|
-
// if(dateLoadPage < dateConvUpdate){
|
|
88
|
-
// console.log(" NUOVO MESSAGGIO!!!");
|
|
89
|
-
// }
|
|
90
|
-
// });
|
|
91
|
-
|
|
92
|
-
// console.log("window.tileDeskAsyncInit()");
|
|
93
|
-
// window.tiledesk.on('onMessageCreated', function(event_data) {
|
|
94
|
-
// console.log(" TRIGGER onMessageCreated -> ", event_data.detail);
|
|
95
|
-
// });
|
|
96
|
-
|
|
97
|
-
window.tiledesk.on('onAuthStateChanged', function (event_data) {
|
|
98
|
-
/* passo event
|
|
99
|
-
-2: vengo da un reinit. NON SCATTA L'EVENTO;
|
|
100
|
-
-1: vengo da un logout. NON SCATTA L'EVENTO;
|
|
101
|
-
0: non sono loggato;
|
|
102
|
-
200: sono loggato;
|
|
103
|
-
400: errore. IN CASO DI ERRORE NON SCATTA L'EVENTO
|
|
104
|
-
*/
|
|
105
|
-
console.log("onAuthStateChanged----> ", event_data.detail.event, "<------");
|
|
106
|
-
if (!event_data.detail.isLogged) {
|
|
107
|
-
console.log("!NOT logged, fired also on startup!");
|
|
108
|
-
// window.tiledesk.setPreChatForm(true);
|
|
109
|
-
//window.tiledesk.signInAnonymous();
|
|
110
|
-
//window.tiledesk.signInWithCustomToken("JWT WRONG_TOKEN_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiIxMjMiLCJmaXJzdG5hbWUiOiJtYXJpbyIsImxhc3RuYW1lIjoicm9zc2kiLCJlbWFpbCI6Im1hcmlvcm9zc2lAZW1haWwuY29tIiwiY3VzdG9tQXR0ciI6ImMxIiwic3ViIjoidXNlcmV4dGVybmFsIiwiYXVkIjoiaHR0cHM6Ly90aWxlZGVzay5jb20vcHJvamVjdHMvNWVjMjQ5OGY1YmRhMTQwMDM0Y2NlMjY3In0.DrupfEEu0rBzOF7zPYsoU5Yg0YlN_9v6dvduG2sbE8c");
|
|
111
|
-
//window.tiledesk.signInWithCustomToken("JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiIxMjMiLCJmaXJzdG5hbWUiOiJtYXJpbyIsImxhc3RuYW1lIjoicm9zc2kiLCJlbWFpbCI6Im1hcmlvcm9zc2lAZW1haWwuY29tIiwiY3VzdG9tQXR0ciI6ImMxIiwic3ViIjoidXNlcmV4dGVybmFsIiwiYXVkIjoiaHR0cHM6Ly90aWxlZGVzay5jb20vcHJvamVjdHMvNWVjMjQ5OGY1YmRhMTQwMDM0Y2NlMjY3In0.J2QDzWxlou7dJzTIaOajJkN-yQ_EiJM6bLpJ7fm-EXM");
|
|
112
|
-
//window.tiledesk.hide();
|
|
113
|
-
} else {
|
|
114
|
-
console.log("logged in, fired also on startup!");
|
|
115
|
-
//window.tiledesk.show();
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
// window.tiledesk.on('loadParams', function(event_data) {
|
|
119
|
-
// });
|
|
120
|
-
window.tiledesk.on('onBeforeMessageSend', function (event_data) {
|
|
121
|
-
console.log('testpage event OnBeforeSendMessage', event_data)
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
window.tiledesk.on('onNewConversationComponentInit', function (event_data) {
|
|
125
|
-
console.log('event onNewConversationComponentInit', event_data)
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
};
|
|
129
|
-
function approved() {
|
|
130
|
-
window.tiledesk.setPrivacyPolicy();
|
|
131
|
-
};
|
|
132
|
-
</script>
|
|
133
|
-
</head>
|
|
134
|
-
<body>
|
|
135
|
-
<div style="height: 900px; background-color: rgba(118, 154, 151, 48%);">
|
|
136
|
-
ciao div
|
|
137
|
-
<button id="isApproved" onclick="approved()">
|
|
138
|
-
SET APPROVED TRUE
|
|
139
|
-
</button>
|
|
140
|
-
</div>
|
|
141
|
-
</body>
|
|
142
|
-
</html>
|
package/dist/tiledesk.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
function ready(callbackFunction){
|
|
2
|
-
if(document.readyState != 'loading')
|
|
3
|
-
callbackFunction()
|
|
4
|
-
else
|
|
5
|
-
document.addEventListener("DOMContentLoaded", callbackFunction)
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
ready(event => {
|
|
9
|
-
// console.log('DOM is ready, call initWidget');
|
|
10
|
-
initWidget();
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
function appendJs(url) {
|
|
14
|
-
var script1 = document.createElement('script');
|
|
15
|
-
script1.async=false;
|
|
16
|
-
script1.setAttribute('src', url);
|
|
17
|
-
document.body.appendChild(script1);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function initWidget() {
|
|
21
|
-
var tiledeskroot = document.createElement('chat-root');
|
|
22
|
-
|
|
23
|
-
var tiledeskScriptLocation = document.getElementById("tiledesk-jssdk").src;
|
|
24
|
-
// console.log("tiledeskScriptLocation", tiledeskScriptLocation);
|
|
25
|
-
var tiledeskScriptBaseLocation = tiledeskScriptLocation.replace("/tiledesk.js","");
|
|
26
|
-
// console.log("tiledeskScriptBaseLocation", tiledeskScriptBaseLocation);
|
|
27
|
-
|
|
28
|
-
window.tiledesk = new function() {
|
|
29
|
-
//this.type = "macintosh";
|
|
30
|
-
this.on = function (event_name, handler) {
|
|
31
|
-
//console.log("addEventListener for "+ event_name, handler);
|
|
32
|
-
tiledeskroot.addEventListener(event_name, handler);
|
|
33
|
-
};
|
|
34
|
-
this.getBaseLocation = function() {
|
|
35
|
-
return tiledeskScriptBaseLocation;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
// console.log("window.tiledesk created");
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
try {
|
|
42
|
-
window.tileDeskAsyncInit();
|
|
43
|
-
// console.log("tileDeskAsyncInit() called");
|
|
44
|
-
}catch(er) {
|
|
45
|
-
// console.log("tileDeskAsyncInit() doesn't exists",er);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
//aTag.setAttribute('href',"yourlink.htm");
|
|
49
|
-
//aTag.innerHTML = "link text";
|
|
50
|
-
document.body.appendChild(tiledeskroot);
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
appendJs(tiledeskScriptBaseLocation+'/inline.bundle.js');
|
|
56
|
-
appendJs(tiledeskScriptBaseLocation+'/polyfills.bundle.js');
|
|
57
|
-
|
|
58
|
-
//remove development check with --build-optimizer=false
|
|
59
|
-
// if (window.tiledeskSettings && window.tiledeskSettings.development) {
|
|
60
|
-
appendJs(tiledeskScriptBaseLocation+'/styles.bundle.js');
|
|
61
|
-
appendJs(tiledeskScriptBaseLocation+'/vendor.bundle.js');
|
|
62
|
-
// }
|
|
63
|
-
|
|
64
|
-
appendJs(tiledeskScriptBaseLocation+'/main.bundle.js');
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|