@chat21/chat21-web-widget 5.0.75-rc.1 → 5.0.76
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
CHANGED
|
@@ -5,6 +5,14 @@
|
|
|
5
5
|
*Dario De Pascalis*
|
|
6
6
|
### **Copyrigth**: *Tiledesk SRL*
|
|
7
7
|
|
|
8
|
+
### 5.0.76 in PROD
|
|
9
|
+
|
|
10
|
+
### 5.0.75 in PROD
|
|
11
|
+
- bug-fixed: WELCOME_TITLE and WELCOME_MSG translation labels not rendered
|
|
12
|
+
|
|
13
|
+
### 5.0.75-rc.1
|
|
14
|
+
- added: image preview iframe on image click
|
|
15
|
+
|
|
8
16
|
### 5.0.74 in PROD
|
|
9
17
|
|
|
10
18
|
### 5.0.74-rc.5
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!-- [ngStyle] = "{ 'max-width': width +'px', 'max-height': height +'px' }" style="position: relative; text-align: center; margin: auto"-->
|
|
2
|
-
<div class="c21-img-container"
|
|
2
|
+
<div class="c21-img-container">
|
|
3
3
|
<img
|
|
4
4
|
class="message-contentX message-content-imageX"
|
|
5
5
|
[alt]="metadata?.name"
|
|
6
6
|
[ngClass]="{'isLoadingImage': loading}"
|
|
7
|
-
[ngStyle] = "{ 'width': width, 'height': height }"
|
|
7
|
+
[ngStyle] = "{ 'width': width + 'px', 'height': height+'px' }"
|
|
8
8
|
[src]="metadata.src"
|
|
9
9
|
(load)="onLoaded($event)"
|
|
10
10
|
(click)="onClickImage()"/>
|
|
@@ -9,8 +9,8 @@ import { saveAs } from 'file-saver';
|
|
|
9
9
|
export class ImageComponent implements OnInit {
|
|
10
10
|
|
|
11
11
|
@Input() metadata: any;
|
|
12
|
-
@Input() width:
|
|
13
|
-
@Input() height:
|
|
12
|
+
@Input() width: any;
|
|
13
|
+
@Input() height: any;
|
|
14
14
|
@Output() onElementRendered = new EventEmitter<{element: string, status: boolean}>();
|
|
15
15
|
|
|
16
16
|
loading: boolean = true
|
|
@@ -28,8 +28,8 @@ export class ImageComponent implements OnInit {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
downloadImage(url: string, fileName: string) {
|
|
31
|
-
console.log('Image COMP - IMAGE URL ', url)
|
|
32
|
-
console.log('Image COMP - IMAGE FILENAME ', fileName)
|
|
31
|
+
// console.log('Image COMP - IMAGE URL ', url);
|
|
32
|
+
// console.log('Image COMP - IMAGE FILENAME ', fileName);
|
|
33
33
|
fileName? null: fileName = decodeURIComponent(decodeURIComponent(url).split('/').pop())
|
|
34
34
|
// const a: any = document.createElement('a');
|
|
35
35
|
// a.href = this.sanitizer.bypassSecurityTrustUrl(url);
|
|
@@ -55,7 +55,7 @@ export class ImageComponent implements OnInit {
|
|
|
55
55
|
iframeContent += '<style> .tiledesk-popup {position: absolute; inset: 1px; outline-offset: -5px; background-color: rgba(0, 0, 0, 0.35); border-radius:16px; will-change: opacity;}'
|
|
56
56
|
iframeContent += '.tiledesk-popup-content { position: fixed; inset: 0px; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; outline: 0px;}'
|
|
57
57
|
iframeContent += '.tiledesk-popup-button { display: flex; align-items: center; justify-content: center; width: 35px; height: 35px; position: absolute; top: 0px; right: 0px; background-color: transparent; border: none; cursor: pointer; margin: 9px; padding: 0px; }'
|
|
58
|
-
iframeContent += '.tiledesk-popup-image { max-height:
|
|
58
|
+
iframeContent += '.tiledesk-popup-image { max-height: 80vh; max-width: 80vw; }'
|
|
59
59
|
iframeContent += '</style>'
|
|
60
60
|
iframeContent += '</head>';
|
|
61
61
|
iframeContent += '<body>'
|
|
@@ -88,12 +88,12 @@ export class ImageComponent implements OnInit {
|
|
|
88
88
|
div.addEventListener("click", function(event){
|
|
89
89
|
window.document.body.removeChild(iframe)
|
|
90
90
|
});
|
|
91
|
-
var image = ifrm.contentWindow.document.getElementById('image-popup')
|
|
92
|
-
image.addEventListener("click", function(event){
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
});
|
|
91
|
+
// var image = ifrm.contentWindow.document.getElementById('image-popup')
|
|
92
|
+
// image.addEventListener("click", function(event){
|
|
93
|
+
// event.preventDefault();
|
|
94
|
+
// event.stopPropagation();
|
|
95
|
+
// that.downloadImage(that.metadata.src, that.metadata.name)
|
|
96
|
+
// });
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
}
|
|
@@ -316,11 +316,14 @@ export class TranslatorService {
|
|
|
316
316
|
globals.CLOSED = res['CLOSED'];
|
|
317
317
|
globals.LABEL_PREVIEW = res['LABEL_PREVIEW']
|
|
318
318
|
globals.LABEL_ERROR_FIELD_REQUIRED= res['LABEL_ERROR_FIELD_REQUIRED']
|
|
319
|
-
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
if(globals.WELCOME_TITLE === 'WELLCOME_TITLE') globals.WELCOME_TITLE = res['WELCOME_TITLE']
|
|
320
322
|
if (!globals.welcomeTitle) {
|
|
321
|
-
|
|
322
323
|
globals.welcomeTitle = globals.WELCOME_TITLE; /** Set the widget welcome message. Value type : string */
|
|
323
324
|
}
|
|
325
|
+
|
|
326
|
+
if(globals.WELCOME_MSG === 'WELLCOME_MSG') globals.WELCOME_MSG = res['WELCOME_MSG']
|
|
324
327
|
if (!globals.welcomeMsg) {
|
|
325
328
|
globals.welcomeMsg = globals.WELCOME_MSG; /** Set the widget welcome message. Value type : string */
|
|
326
329
|
}
|
package/src/app/utils/globals.ts
CHANGED
|
@@ -119,102 +119,102 @@ export class Globals {
|
|
|
119
119
|
LABEL_PREVIEW: string;
|
|
120
120
|
|
|
121
121
|
// ============ BEGIN: EXTERNAL PARAMETERS ==============//
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
122
|
+
autoStart: boolean;
|
|
123
|
+
startHidden: boolean;
|
|
124
|
+
isShown: boolean;
|
|
125
|
+
isOpen: boolean;
|
|
126
|
+
startFromHome: boolean;
|
|
127
|
+
projectid: string;
|
|
128
|
+
preChatForm: boolean;
|
|
129
|
+
align: string;
|
|
130
|
+
calloutTimer: number;
|
|
131
|
+
calloutTitle: string;
|
|
132
|
+
calloutMsg: string;
|
|
133
|
+
calloutStaus: boolean;
|
|
134
|
+
userFullname: string;
|
|
135
|
+
userEmail: string;
|
|
136
|
+
widgetTitle: string;
|
|
137
|
+
fullscreenMode: boolean;
|
|
138
|
+
hideHeaderCloseButton: boolean;
|
|
139
|
+
themeColor: string;
|
|
140
|
+
themeColorOpacity: number;
|
|
141
|
+
themeForegroundColor: string;
|
|
142
|
+
colorGradient: string;
|
|
143
|
+
colorGradient180: string;
|
|
144
|
+
allowTranscriptDownload: boolean;
|
|
145
|
+
poweredBy: string;
|
|
146
|
+
logoChat: string;
|
|
147
|
+
welcomeTitle: string;
|
|
148
|
+
welcomeMsg: string;
|
|
149
|
+
recipientId: string;
|
|
150
|
+
newConversationStart: boolean;
|
|
151
|
+
recipientFullname: string;
|
|
152
152
|
// userId: string;
|
|
153
153
|
// userToken: string;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
154
|
+
marginX: string;
|
|
155
|
+
marginY: string;
|
|
156
|
+
mobileMarginX: string;
|
|
157
|
+
mobileMarginY: string;
|
|
158
|
+
launcherWidth: string;
|
|
159
|
+
launcherHeight: string;
|
|
160
|
+
baloonImage: string;
|
|
161
|
+
baloonShape: string;
|
|
162
|
+
isLogEnabled: boolean;
|
|
163
|
+
openExternalLinkButton: boolean;
|
|
164
|
+
hideHeaderConversationOptionsMenu: boolean;
|
|
165
|
+
hideCloseConversationOptionMenu: boolean;
|
|
166
|
+
hideRestartConversationOptionsMenu: boolean;
|
|
167
|
+
hideSettings: boolean;
|
|
168
|
+
filterByRequester: boolean;
|
|
169
|
+
persistence;
|
|
170
|
+
windowContext;
|
|
171
|
+
|
|
172
|
+
showWaitTime: boolean;
|
|
173
|
+
showAvailableAgents: boolean;
|
|
174
|
+
showLogoutOption: boolean;
|
|
175
|
+
supportMode: boolean;
|
|
176
|
+
|
|
177
|
+
customAttributes: any;
|
|
178
|
+
showAttachmentButton: boolean;
|
|
179
|
+
showAllConversations: boolean;
|
|
180
180
|
// privacyField: string;
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
181
|
+
jwt: string;
|
|
182
|
+
|
|
183
|
+
isOpenNewMessage: boolean;
|
|
184
|
+
dynamicWaitTimeReply: boolean; // ******* new ********
|
|
185
|
+
logLevel: string; // ******* new ********
|
|
186
|
+
|
|
187
|
+
bubbleSentBackground: string; // ******* new ********
|
|
188
|
+
bubbleSentTextColor: string; // ******* new ********
|
|
189
|
+
bubbleReceivedBackground: string; // ******* new ********
|
|
190
|
+
bubbleReceivedTextColor: string; // ******* new ********
|
|
191
|
+
fontSize: string; // ******* new ********
|
|
192
|
+
fontFamily: string; // ******* new ********
|
|
193
|
+
buttonFontSize: string; // ******* new ********
|
|
194
|
+
buttonBackgroundColor: string // ******* new ********
|
|
195
|
+
buttonTextColor: string // ******* new ********
|
|
196
|
+
buttonHoverBackgroundColor: string // ******* new ********
|
|
197
|
+
buttonHoverTextColor: string // ******* new ********
|
|
198
|
+
singleConversation: boolean; // ******* new ********
|
|
199
|
+
restartConversation: boolean; // ******* new ********
|
|
200
|
+
nativeRating: boolean; // ******* new ********
|
|
201
|
+
showInfoMessage: Array<string>; // ******* new ********
|
|
202
|
+
typingLocation: string; // ******* new ********
|
|
203
|
+
allowReopen: boolean; // ******* new ********
|
|
204
|
+
continueConversationBeforeTime: number; // ******* new ********
|
|
205
|
+
participants: Array<string>; // ******* new ********
|
|
206
|
+
whatsappNumber: string; // ******* new ********
|
|
207
|
+
messangerPageTitle: string; // ******* new ********
|
|
208
|
+
telegramUsername: string; // ******* new ********
|
|
209
|
+
fileUploadAccept: string; // ******* new ********
|
|
210
|
+
disconnetTime: number; // ******* new ********
|
|
211
|
+
|
|
212
|
+
onPageChangeVisibilityMobile: 'open' | 'close' | 'last'; // ******* new ********
|
|
213
|
+
onPageChangeVisibilityDesktop: 'open' | 'close' | 'last'; // ******* new ********
|
|
214
|
+
displayOnMobile: boolean; // ******* new ********
|
|
215
|
+
displayOnDesktop: boolean; // ******* new ********
|
|
216
|
+
|
|
217
|
+
hiddenMessage: string; // ******* new ********
|
|
218
218
|
constructor(
|
|
219
219
|
) { }
|
|
220
220
|
|