Skip to content

Commit

Permalink
Merge branch 'master' into features/lib-upgrade-PROD
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Panico committed Oct 28, 2024
2 parents 68d25b7 + 37653f4 commit cc3cc5e
Show file tree
Hide file tree
Showing 18 changed files with 77 additions and 54 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
### **Copyrigth**:
*Tiledesk SRL*

# 5.0.86 in PROD

# 5.0.85 in PROD

# 5.0.83 in PROD

# 5.0.83-rc.4
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@chat21/chat21-web-widget",
"author": "Tiledesk SRL",
"version": "5.0.83",
"version": "5.0.86",
"license": "MIT",
"homepage": "https://www.tiledesk.com",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@
</span>
<div class="clear"></div>
</button>
<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')}">
<!-- <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')}">
<span class="v-align-center c21-label-button">
{{translationMap?.get('CONTINUE')}}
</span>
<div class="clear"></div>
</button>
</button> -->
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class ConversationFooterComponent implements OnInit, OnChanges {
@Input() userFullname: string;
@Input() userEmail: string;
@Input() showAttachmentButton: boolean;
@Input() showContinueConversationButton: boolean;
// @Input() showContinueConversationButton: boolean;
@Input() isConversationArchived: boolean;
@Input() hideTextAreaContent: boolean;
@Input() hideTextReply: boolean;
Expand Down Expand Up @@ -502,11 +502,11 @@ export class ConversationFooterComponent implements OnInit, OnChanges {
this.onNewConversationButtonClicked.emit();
}

onContinueConversation(){
this.hideTextAreaContent = false;
this.onBackButton.emit(false)
this.restoreTextArea()
}
// onContinueConversation(){
// this.hideTextAreaContent = false;
// this.onBackButton.emit(false)
// this.restoreTextArea()
// }

onBackButtonFN(){
this.onBackButton.emit(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
[hideHeaderCloseButton]="g?.hideHeaderCloseButton"
[hideHeaderBackButton]="g?.singleConversation"
[hideCloseConversationOptionMenu]="(isConversationArchived || g?.hideCloseConversationOptionMenu)"
[hideRestartConversationOptionsMenu]="((!g?.singleConversation && !hideTextAreaContent) || g?.hideRestartConversationOptionsMenu)"
[hideRestartConversationOptionsMenu]="(isConversationArchived || (!g?.singleConversation && !hideTextAreaContent) || g?.hideRestartConversationOptionsMenu)"
[hideHeaderConversationOptionsMenu]="g?.hideHeaderConversationOptionsMenu"
[hideSignOutOptionMenu]="(!g?.singleConversation || !g?.showLogoutOption)"
[hideChatDetailOptionMenu]="(!g?.isDevMode)"
Expand Down Expand Up @@ -116,7 +116,6 @@
[channelType]="g?.channelType"
[userFullname]="g?.userFullname"
[userEmail]="g?.userEmail"
[showContinueConversationButton]="g?.singleConversation && showContinueConversationButton"
[showAttachmentButton]="g?.showAttachmentButton"
[hideTextAreaContent]="(g?.singleConversation && hideTextAreaContent) || (isConversationArchived && !g?.allowReopen)"
[isConversationArchived]="isConversationArchived"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
footerMessagePlaceholder: string = '';
textInputTextArea: String;
isTrascriptDownloadEnabled = false;
showContinueConversationButton: boolean = false
// showContinueConversationButton: boolean = false
// ========= begin:: gestione scroll view messaggi ======= //
//startScroll = true; // indica lo stato dello scroll: true/false -> è in movimento/ è fermo
isScrolling = false;
Expand Down Expand Up @@ -401,8 +401,8 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
this.conversation = conv;
this.isConversationArchived = true;
/**calc time difference between now and last conversation timestamp to allow "Continue" button */
let duration = getDateDifference(this.conversation.timestamp, Date.now())
duration.hours < this.g.continueConversationBeforeTime? this.showContinueConversationButton = true: this.showContinueConversationButton = false
// let duration = getDateDifference(this.conversation.timestamp, Date.now())
// duration.hours < this.g.continueConversationBeforeTime? this.showContinueConversationButton = true: this.showContinueConversationButton = false
callback(this.isConversationArchived)
}else if(!conv) {
callback(null);
Expand Down
15 changes: 15 additions & 0 deletions src/app/modals/confirm-close/confirm-close.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@

<!-- BUTTON CLOSE-->
<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') }">
<span *ngIf="isLoadingActive" style="height: inherit; width: inherit;">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" with="25" height="25"
viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve">
<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">
<animateTransform
attributeName="transform"
attributeType="XML"
type="rotate"
dur="1s"
from="0 50 50"
to="360 50 50"
repeatCount="indefinite" />
</path>
</svg>
</span>
<span class="v-align-center c21-label-button">
{{translationMap?.get('CLOSE_CHAT')}}
</span>
Expand Down
2 changes: 2 additions & 0 deletions src/app/modals/confirm-close/confirm-close.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
button.c21-button-primary{
margin: 0 !important;
height: 30px !important;
display: flex;
align-items: center;

.c21-label-button{
margin: 0 !important;
Expand Down
3 changes: 3 additions & 0 deletions src/app/modals/confirm-close/confirm-close.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild }
})
export class ConfirmCloseComponent implements OnInit{

isLoadingActive: boolean = false;

@Input() translationMap: Map< string, string>;
@Input() stylesMap: Map<string, string>;
@Output() onDiaglogClosed = new EventEmitter<{type: string, data: any}>();
Expand All @@ -27,6 +29,7 @@ export class ConfirmCloseComponent implements OnInit{
}

onConfirm(){
this.isLoadingActive = true;
this.onDiaglogClosed.emit({type: 'confirm', data: null});
}

Expand Down
28 changes: 14 additions & 14 deletions src/app/providers/global-settings.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ export class GlobalSettingsService {
globals.singleConversation = (TEMP === true) ? true : false;
}
TEMP = tiledeskSettings['restartConversation'];
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > continueConversationBeforeTime:: ', TEMP]);
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > restartConversation:: ', TEMP]);
if (TEMP !== undefined) {
globals.restartConversation = (TEMP === true) ? true : false;
}
Expand All @@ -1001,11 +1001,11 @@ export class GlobalSettingsService {
globals.showInfoMessage.push('CHAT_CLOSED')
}
}
TEMP = tiledeskSettings['continueConversationBeforeTime'];
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > continueConversationBeforeTime:: ', TEMP]);
if (TEMP !== undefined) {
globals.continueConversationBeforeTime = +TEMP;
}
// TEMP = tiledeskSettings['continueConversationBeforeTime'];
// // this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > continueConversationBeforeTime:: ', TEMP]);
// if (TEMP !== undefined) {
// globals.continueConversationBeforeTime = +TEMP;
// }
TEMP = tiledeskSettings['participants'];
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > participants:: ', TEMP]);
if (TEMP !== undefined) {
Expand Down Expand Up @@ -1310,10 +1310,10 @@ export class GlobalSettingsService {
this.globals.showInfoMessage.push('CHAT_CLOSED')
}
}
TEMP = el.nativeElement.getAttribute('continueConversationBeforeTime');
if (TEMP !== null) {
this.globals.continueConversationBeforeTime = +TEMP;
}
// TEMP = el.nativeElement.getAttribute('continueConversationBeforeTime');
// if (TEMP !== null) {
// this.globals.continueConversationBeforeTime = +TEMP;
// }
TEMP = el.nativeElement.getAttribute('participants');
if (TEMP !== null) {
this.globals.participants = TEMP.split(',').map(key => { return key.trim()});
Expand Down Expand Up @@ -1755,10 +1755,10 @@ export class GlobalSettingsService {
}
}

TEMP = getParameterByName(windowContext, 'tiledesk_continueConversationBeforeTime');
if (TEMP) {
globals.continueConversationBeforeTime = +TEMP;
}
// TEMP = getParameterByName(windowContext, 'tiledesk_continueConversationBeforeTime');
// if (TEMP) {
// globals.continueConversationBeforeTime = +TEMP;
// }

TEMP = getParameterByName(windowContext, 'tiledesk_participants');
if (TEMP) {
Expand Down
12 changes: 6 additions & 6 deletions src/app/utils/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export class Globals {
showInfoMessage: Array<string>; // ******* new ********
typingLocation: string; // ******* new ********
allowReopen: boolean; // ******* new ********
continueConversationBeforeTime: number; // ******* new ********
// continueConversationBeforeTime: number; // ******* new ********
participants: Array<string>; // ******* new ********
whatsappNumber: string; // ******* new ********
messangerPageTitle: string; // ******* new ********
Expand Down Expand Up @@ -378,7 +378,7 @@ export class Globals {
/** set the location of typing indicator (header or content) */
this.allowReopen = false;
/** enable the user to reopen a closed conversation */
this.continueConversationBeforeTime = 48;
// this.continueConversationBeforeTime = 48;
/** enable user to continue archived confersation before the value time from last timeout message */
this.participants = [];
/** enable user to talk with specific chat-bots/humans */
Expand Down Expand Up @@ -567,10 +567,10 @@ export class Globals {
if(isOpen && isMobile){
//block body scroll
// window.parent.document.body.style.height = '100vh';
window.parent.document.body.style.height = '0';
window.parent.document.body.style.width = '100%';
window.parent.document.body.style.overflowY = 'hidden'
window.parent.document.body.style.position = 'fixed';
window.parent.document.body.style.setProperty('height', '0', 'important')
window.parent.document.body.style.setProperty('width', '100%', 'important')
window.parent.document.body.style.setProperty('overflow-y', 'hidden', 'important')
window.parent.document.body.style.setProperty('position', 'fixed', 'important')
}else if(!isOpen && isMobile){
//reset body style
window.parent.document.body.style.removeProperty('height')
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"CLOSE_CHAT": "Close chat",
"MINIMIZE":"Minimize",
"MAXIMIZE":"Maximize",
"CONFIRM_CLOSE_CHAT":"Are you sure you wanna close this chat?",
"CONFIRM_CLOSE_CHAT":"Are you sure you want to close this chat?",

"INFO_SUPPORT_USER_ADDED_SUBJECT":"you",
"INFO_SUPPORT_USER_ADDED_YOU_VERB":"have been added to ",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"CLOSE_CHAT": "Cerrar chat",
"MINIMIZE":"Minimizar",
"MAXIMIZE":"Maximizar",
"CONFIRM_CLOSE_CHAT":"¿Estás segura de que quieres cerrar este chat?",
"CONFIRM_CLOSE_CHAT":"¿Estás seguro de que quieres cerrar este chat?",

"INFO_SUPPORT_USER_ADDED_SUBJECT":"",
"INFO_SUPPORT_USER_ADDED_YOU_VERB":"han sido agregados a ",
Expand Down
12 changes: 6 additions & 6 deletions src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"ALERT_LEAVE_CHAT": "Voulez-vous quitter la conversation?",
"YES": "Oui",
"NO": "Non",
"BUTTON_CLOSE_TO_ICON": "Minimisez le chat",
"BUTTON_CLOSE_TO_ICON": "Minimisez la discussion",
"BUTTON_EDIT_PROFILE": "Modifier le profil",
"RATE_CHAT": "évaluer la conversation",
"WELCOME_TITLE": "Salut, bienvenue à Tiledesk 👋",
Expand All @@ -44,25 +44,25 @@
"CLOSE": "Fermer",
"RESTART":"Redémarrer",
"PREV_CONVERSATIONS": "Vos conversations",
"YOU": "Toi",
"YOU": "Tu",
"SHOW_ALL_CONV": "voir tout",
"START_A_CONVERSATION": "Démarrer une conversation",
"NO_CONVERSATION": "Aucune conversation active",
"SEE_PREVIOUS": "voir les conversations précédentes",
"WAITING_TIME_FOUND": "L'équipe répond généralement en $reply_time",
"WAITING_TIME_NOT_FOUND": "Nous vous répondrons dans les plus brefs délais",
"CLOSED": "Fermé",
"CLOSE_CHAT": "Fermer le chat",
"CLOSE_CHAT": "Fermer la discussion",
"MINIMIZE":"Minimiser",
"MAXIMIZE":"Maximiser",
"CONFIRM_CLOSE_CHAT":"Etes-vous sûr de vouloir fermer cette discussion?",

"INFO_SUPPORT_USER_ADDED_SUBJECT":"toi",
"INFO_SUPPORT_USER_ADDED_SUBJECT":"tu",
"INFO_SUPPORT_USER_ADDED_YOU_VERB":"ont été ajoutés à ",
"INFO_SUPPORT_USER_ADDED_COMPLEMENT":"rejointe",
"INFO_SUPPORT_USER_ADDED_VERB":"la discussion",
"INFO_SUPPORT_CHAT_REOPENED":"Chat rouvert",
"INFO_SUPPORT_CHAT_CLOSED":"Chat fermé",
"INFO_SUPPORT_CHAT_REOPENED":"Discussion rouvert",
"INFO_SUPPORT_CHAT_CLOSED":"Discussion fermé",
"INFO_SUPPORT_LEAD_UPDATED":"Prospect mis à jour",
"INFO_SUPPORT_MEMBER_LEFT_GROUP":"supprimé du groupe",
"INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"a quitté la conversation",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"CLOSE_CHAT": "Chiudi chat",
"MINIMIZE":"Minimizza",
"MAXIMIZE":"Massimizza",
"CONFIRM_CLOSE_CHAT":"Vuoi davvero chiudere questa chat?",
"CONFIRM_CLOSE_CHAT":"Sei sicuro di voler chiudere questa chat?",

"INFO_SUPPORT_USER_ADDED_SUBJECT":"tu",
"INFO_SUPPORT_USER_ADDED_YOU_VERB":"sei stato aggiunto ",
Expand Down
16 changes: 8 additions & 8 deletions src/assets/twp/index-dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -1284,12 +1284,12 @@
window.Tiledesk('restart')
}

function onClickContinueConversationBeforeTime(){
let text = document.getElementById('continueConversationBeforeTime').value
window.tiledeskSettings['continueConversationBeforeTime'] = text
console.log('onClickContinueConversationBeforeTime:',window.tiledeskSettings);
window.Tiledesk('restart')
}
// function onClickContinueConversationBeforeTime(){
// let text = document.getElementById('continueConversationBeforeTime').value
// window.tiledeskSettings['continueConversationBeforeTime'] = text
// console.log('onClickContinueConversationBeforeTime:',window.tiledeskSettings);
// window.Tiledesk('restart')
// }

function onClickRecipientId(){
let text = document.getElementById('recipientId').value
Expand Down Expand Up @@ -2294,7 +2294,7 @@ <h3 id="project_name" style="min-height: 39px;"></h3>
<button class="btn btn-light" onclick="onClickAllowReopen()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
</div>
</div>
<div class="row">
<!-- <div class="row">
<div class="col-md-5 formElement"><span><em><strong>continueConversationBeforeTime</strong></em></span></div>
<div class="col-md-5 formElement">
<div class="col-form-label" style="width: 90px">Time (h):</div>
Expand All @@ -2303,7 +2303,7 @@ <h3 id="project_name" style="min-height: 39px;"></h3>
<div class="col-md-2">
<button class="btn btn-light" onclick="onClickContinueConversationBeforeTime()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
</div>
</div>
</div> -->
<div class="row">
<div class="col-md-5 formElement"><span><em><strong>recipientId</strong></em></span></div>
<div class="col-md-5">
Expand Down
2 changes: 1 addition & 1 deletion src/iframe-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
width: auto;
height: auto;
display: none;
z-index: 2000000000; /*999999*/;
z-index: 3000000000; /*999999*/;
}
#tiledeskdiv {
/* width: 100%;
Expand Down

0 comments on commit cc3cc5e

Please sign in to comment.