@chat21/chat21-web-widget 5.0.85 → 5.0.86
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 +2 -0
- package/package.json +1 -1
- package/src/app/component/conversation-detail/conversation/conversation.component.html +1 -2
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +3 -3
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html +2 -2
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +6 -6
- package/src/app/modals/confirm-close/confirm-close.component.html +15 -0
- package/src/app/modals/confirm-close/confirm-close.component.scss +2 -0
- package/src/app/modals/confirm-close/confirm-close.component.ts +3 -0
- package/src/app/providers/global-settings.service.ts +14 -14
- package/src/app/utils/globals.ts +2 -2
- package/src/assets/twp/index-dev.html +8 -8
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
[hideHeaderCloseButton]="g?.hideHeaderCloseButton"
|
|
16
16
|
[hideHeaderBackButton]="g?.singleConversation"
|
|
17
17
|
[hideCloseConversationOptionMenu]="(isConversationArchived || g?.hideCloseConversationOptionMenu)"
|
|
18
|
-
[hideRestartConversationOptionsMenu]="((!g?.singleConversation && !hideTextAreaContent) || g?.hideRestartConversationOptionsMenu)"
|
|
18
|
+
[hideRestartConversationOptionsMenu]="(isConversationArchived || (!g?.singleConversation && !hideTextAreaContent) || g?.hideRestartConversationOptionsMenu)"
|
|
19
19
|
[hideHeaderConversationOptionsMenu]="g?.hideHeaderConversationOptionsMenu"
|
|
20
20
|
[hideSignOutOptionMenu]="(!g?.singleConversation || !g?.showLogoutOption)"
|
|
21
21
|
[hideChatDetailOptionMenu]="(!g?.isDevMode)"
|
|
@@ -116,7 +116,6 @@
|
|
|
116
116
|
[channelType]="g?.channelType"
|
|
117
117
|
[userFullname]="g?.userFullname"
|
|
118
118
|
[userEmail]="g?.userEmail"
|
|
119
|
-
[showContinueConversationButton]="g?.singleConversation && showContinueConversationButton"
|
|
120
119
|
[showAttachmentButton]="g?.showAttachmentButton"
|
|
121
120
|
[hideTextAreaContent]="(g?.singleConversation && hideTextAreaContent) || (isConversationArchived && !g?.allowReopen)"
|
|
122
121
|
[isConversationArchived]="isConversationArchived"
|
|
@@ -90,7 +90,7 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
90
90
|
footerMessagePlaceholder: string = '';
|
|
91
91
|
textInputTextArea: String;
|
|
92
92
|
isTrascriptDownloadEnabled = false;
|
|
93
|
-
showContinueConversationButton: boolean = false
|
|
93
|
+
// showContinueConversationButton: boolean = false
|
|
94
94
|
// ========= begin:: gestione scroll view messaggi ======= //
|
|
95
95
|
//startScroll = true; // indica lo stato dello scroll: true/false -> è in movimento/ è fermo
|
|
96
96
|
isScrolling = false;
|
|
@@ -401,8 +401,8 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
401
401
|
this.conversation = conv;
|
|
402
402
|
this.isConversationArchived = true;
|
|
403
403
|
/**calc time difference between now and last conversation timestamp to allow "Continue" button */
|
|
404
|
-
let duration = getDateDifference(this.conversation.timestamp, Date.now())
|
|
405
|
-
duration.hours < this.g.continueConversationBeforeTime? this.showContinueConversationButton = true: this.showContinueConversationButton = false
|
|
404
|
+
// let duration = getDateDifference(this.conversation.timestamp, Date.now())
|
|
405
|
+
// duration.hours < this.g.continueConversationBeforeTime? this.showContinueConversationButton = true: this.showContinueConversationButton = false
|
|
406
406
|
callback(this.isConversationArchived)
|
|
407
407
|
}else if(!conv) {
|
|
408
408
|
callback(null);
|
package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html
CHANGED
|
@@ -107,10 +107,10 @@
|
|
|
107
107
|
</span>
|
|
108
108
|
<div class="clear"></div>
|
|
109
109
|
</button>
|
|
110
|
-
<button *ngIf="showContinueConversationButton" tabindex="1040" class="c21-button-primary" (click)="onContinueConversation()" [ngStyle]="{'background-color': stylesMap.get('themeColor'), 'border-color': stylesMap.get('themeColor'), 'color': stylesMap?.get('foregroundColor')}">
|
|
110
|
+
<!-- <button *ngIf="showContinueConversationButton" tabindex="1040" class="c21-button-primary" (click)="onContinueConversation()" [ngStyle]="{'background-color': stylesMap.get('themeColor'), 'border-color': stylesMap.get('themeColor'), 'color': stylesMap?.get('foregroundColor')}">
|
|
111
111
|
<span class="v-align-center c21-label-button">
|
|
112
112
|
{{translationMap?.get('CONTINUE')}}
|
|
113
113
|
</span>
|
|
114
114
|
<div class="clear"></div>
|
|
115
|
-
</button>
|
|
115
|
+
</button> -->
|
|
116
116
|
</div>
|
package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts
CHANGED
|
@@ -27,7 +27,7 @@ export class ConversationFooterComponent implements OnInit, OnChanges {
|
|
|
27
27
|
@Input() userFullname: string;
|
|
28
28
|
@Input() userEmail: string;
|
|
29
29
|
@Input() showAttachmentButton: boolean;
|
|
30
|
-
@Input() showContinueConversationButton: boolean;
|
|
30
|
+
// @Input() showContinueConversationButton: boolean;
|
|
31
31
|
@Input() isConversationArchived: boolean;
|
|
32
32
|
@Input() hideTextAreaContent: boolean;
|
|
33
33
|
@Input() hideTextReply: boolean;
|
|
@@ -502,11 +502,11 @@ export class ConversationFooterComponent implements OnInit, OnChanges {
|
|
|
502
502
|
this.onNewConversationButtonClicked.emit();
|
|
503
503
|
}
|
|
504
504
|
|
|
505
|
-
onContinueConversation(){
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}
|
|
505
|
+
// onContinueConversation(){
|
|
506
|
+
// this.hideTextAreaContent = false;
|
|
507
|
+
// this.onBackButton.emit(false)
|
|
508
|
+
// this.restoreTextArea()
|
|
509
|
+
// }
|
|
510
510
|
|
|
511
511
|
onBackButtonFN(){
|
|
512
512
|
this.onBackButton.emit(false)
|
|
@@ -20,6 +20,21 @@
|
|
|
20
20
|
|
|
21
21
|
<!-- BUTTON CLOSE-->
|
|
22
22
|
<button tabindex="1040" aflistconv #aflistconv class="c21-button-primary" (click)="onConfirm()" [ngStyle]="{'background-color': stylesMap?.get('themeColor'), 'border-color': stylesMap?.get('themeColor'), 'color': stylesMap?.get('themeForegroundColor') }">
|
|
23
|
+
<span *ngIf="isLoadingActive" style="height: inherit; width: inherit;">
|
|
24
|
+
<svg xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" with="25" height="25"
|
|
25
|
+
viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve">
|
|
26
|
+
<path fill="#fff" d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50">
|
|
27
|
+
<animateTransform
|
|
28
|
+
attributeName="transform"
|
|
29
|
+
attributeType="XML"
|
|
30
|
+
type="rotate"
|
|
31
|
+
dur="1s"
|
|
32
|
+
from="0 50 50"
|
|
33
|
+
to="360 50 50"
|
|
34
|
+
repeatCount="indefinite" />
|
|
35
|
+
</path>
|
|
36
|
+
</svg>
|
|
37
|
+
</span>
|
|
23
38
|
<span class="v-align-center c21-label-button">
|
|
24
39
|
{{translationMap?.get('CLOSE_CHAT')}}
|
|
25
40
|
</span>
|
|
@@ -8,6 +8,8 @@ import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild }
|
|
|
8
8
|
})
|
|
9
9
|
export class ConfirmCloseComponent implements OnInit{
|
|
10
10
|
|
|
11
|
+
isLoadingActive: boolean = false;
|
|
12
|
+
|
|
11
13
|
@Input() translationMap: Map< string, string>;
|
|
12
14
|
@Input() stylesMap: Map<string, string>;
|
|
13
15
|
@Output() onDiaglogClosed = new EventEmitter<{type: string, data: any}>();
|
|
@@ -27,6 +29,7 @@ export class ConfirmCloseComponent implements OnInit{
|
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
onConfirm(){
|
|
32
|
+
this.isLoadingActive = true;
|
|
30
33
|
this.onDiaglogClosed.emit({type: 'confirm', data: null});
|
|
31
34
|
}
|
|
32
35
|
|
|
@@ -974,7 +974,7 @@ export class GlobalSettingsService {
|
|
|
974
974
|
globals.singleConversation = (TEMP === true) ? true : false;
|
|
975
975
|
}
|
|
976
976
|
TEMP = tiledeskSettings['restartConversation'];
|
|
977
|
-
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings >
|
|
977
|
+
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > restartConversation:: ', TEMP]);
|
|
978
978
|
if (TEMP !== undefined) {
|
|
979
979
|
globals.restartConversation = (TEMP === true) ? true : false;
|
|
980
980
|
}
|
|
@@ -1001,11 +1001,11 @@ export class GlobalSettingsService {
|
|
|
1001
1001
|
globals.showInfoMessage.push('CHAT_CLOSED')
|
|
1002
1002
|
}
|
|
1003
1003
|
}
|
|
1004
|
-
TEMP = tiledeskSettings['continueConversationBeforeTime'];
|
|
1005
|
-
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > continueConversationBeforeTime:: ', TEMP]);
|
|
1006
|
-
if (TEMP !== undefined) {
|
|
1007
|
-
|
|
1008
|
-
}
|
|
1004
|
+
// TEMP = tiledeskSettings['continueConversationBeforeTime'];
|
|
1005
|
+
// // this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > continueConversationBeforeTime:: ', TEMP]);
|
|
1006
|
+
// if (TEMP !== undefined) {
|
|
1007
|
+
// globals.continueConversationBeforeTime = +TEMP;
|
|
1008
|
+
// }
|
|
1009
1009
|
TEMP = tiledeskSettings['participants'];
|
|
1010
1010
|
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > participants:: ', TEMP]);
|
|
1011
1011
|
if (TEMP !== undefined) {
|
|
@@ -1310,10 +1310,10 @@ export class GlobalSettingsService {
|
|
|
1310
1310
|
this.globals.showInfoMessage.push('CHAT_CLOSED')
|
|
1311
1311
|
}
|
|
1312
1312
|
}
|
|
1313
|
-
TEMP = el.nativeElement.getAttribute('continueConversationBeforeTime');
|
|
1314
|
-
if (TEMP !== null) {
|
|
1315
|
-
|
|
1316
|
-
}
|
|
1313
|
+
// TEMP = el.nativeElement.getAttribute('continueConversationBeforeTime');
|
|
1314
|
+
// if (TEMP !== null) {
|
|
1315
|
+
// this.globals.continueConversationBeforeTime = +TEMP;
|
|
1316
|
+
// }
|
|
1317
1317
|
TEMP = el.nativeElement.getAttribute('participants');
|
|
1318
1318
|
if (TEMP !== null) {
|
|
1319
1319
|
this.globals.participants = TEMP.split(',').map(key => { return key.trim()});
|
|
@@ -1755,10 +1755,10 @@ export class GlobalSettingsService {
|
|
|
1755
1755
|
}
|
|
1756
1756
|
}
|
|
1757
1757
|
|
|
1758
|
-
TEMP = getParameterByName(windowContext, 'tiledesk_continueConversationBeforeTime');
|
|
1759
|
-
if (TEMP) {
|
|
1760
|
-
|
|
1761
|
-
}
|
|
1758
|
+
// TEMP = getParameterByName(windowContext, 'tiledesk_continueConversationBeforeTime');
|
|
1759
|
+
// if (TEMP) {
|
|
1760
|
+
// globals.continueConversationBeforeTime = +TEMP;
|
|
1761
|
+
// }
|
|
1762
1762
|
|
|
1763
1763
|
TEMP = getParameterByName(windowContext, 'tiledesk_participants');
|
|
1764
1764
|
if (TEMP) {
|
package/src/app/utils/globals.ts
CHANGED
|
@@ -201,7 +201,7 @@ export class Globals {
|
|
|
201
201
|
showInfoMessage: Array<string>; // ******* new ********
|
|
202
202
|
typingLocation: string; // ******* new ********
|
|
203
203
|
allowReopen: boolean; // ******* new ********
|
|
204
|
-
continueConversationBeforeTime: number; // ******* new ********
|
|
204
|
+
// continueConversationBeforeTime: number; // ******* new ********
|
|
205
205
|
participants: Array<string>; // ******* new ********
|
|
206
206
|
whatsappNumber: string; // ******* new ********
|
|
207
207
|
messangerPageTitle: string; // ******* new ********
|
|
@@ -378,7 +378,7 @@ export class Globals {
|
|
|
378
378
|
/** set the location of typing indicator (header or content) */
|
|
379
379
|
this.allowReopen = false;
|
|
380
380
|
/** enable the user to reopen a closed conversation */
|
|
381
|
-
this.continueConversationBeforeTime = 48;
|
|
381
|
+
// this.continueConversationBeforeTime = 48;
|
|
382
382
|
/** enable user to continue archived confersation before the value time from last timeout message */
|
|
383
383
|
this.participants = [];
|
|
384
384
|
/** enable user to talk with specific chat-bots/humans */
|
|
@@ -1282,12 +1282,12 @@
|
|
|
1282
1282
|
window.Tiledesk('restart')
|
|
1283
1283
|
}
|
|
1284
1284
|
|
|
1285
|
-
function onClickContinueConversationBeforeTime(){
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
}
|
|
1285
|
+
// function onClickContinueConversationBeforeTime(){
|
|
1286
|
+
// let text = document.getElementById('continueConversationBeforeTime').value
|
|
1287
|
+
// window.tiledeskSettings['continueConversationBeforeTime'] = text
|
|
1288
|
+
// console.log('onClickContinueConversationBeforeTime:',window.tiledeskSettings);
|
|
1289
|
+
// window.Tiledesk('restart')
|
|
1290
|
+
// }
|
|
1291
1291
|
|
|
1292
1292
|
function onClickRecipientId(){
|
|
1293
1293
|
let text = document.getElementById('recipientId').value
|
|
@@ -2292,7 +2292,7 @@
|
|
|
2292
2292
|
<button class="btn btn-light" onclick="onClickAllowReopen()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
|
|
2293
2293
|
</div>
|
|
2294
2294
|
</div>
|
|
2295
|
-
<div class="row">
|
|
2295
|
+
<!-- <div class="row">
|
|
2296
2296
|
<div class="col-md-5 formElement"><span><em><strong>continueConversationBeforeTime</strong></em></span></div>
|
|
2297
2297
|
<div class="col-md-5 formElement">
|
|
2298
2298
|
<div class="col-form-label" style="width: 90px">Time (h):</div>
|
|
@@ -2301,7 +2301,7 @@
|
|
|
2301
2301
|
<div class="col-md-2">
|
|
2302
2302
|
<button class="btn btn-light" onclick="onClickContinueConversationBeforeTime()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
|
|
2303
2303
|
</div>
|
|
2304
|
-
</div>
|
|
2304
|
+
</div> -->
|
|
2305
2305
|
<div class="row">
|
|
2306
2306
|
<div class="col-md-5 formElement"><span><em><strong>recipientId</strong></em></span></div>
|
|
2307
2307
|
<div class="col-md-5">
|