@chat21/chat21-web-widget 5.0.84-rc.4 → 5.0.85-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 CHANGED
@@ -6,6 +6,12 @@
6
6
  ### **Copyrigth**:
7
7
  *Tiledesk SRL*
8
8
 
9
+ # 5.0.85-rc.1
10
+ - **added**: hide header restart menu option if conversation is closed
11
+ - **removed**: continueConversationBeforeTime settings property
12
+
13
+ # 5.0.85 in PROD
14
+
9
15
  # 5.0.84-rc.4
10
16
  - **added**: checkAcceptedFile fn on dragleave event conversation-content component
11
17
  - **added**: checkAcceptedFile fn in conversation-footer component
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-web-widget",
3
3
  "author": "Tiledesk SRL",
4
- "version": "5.0.84-rc.4",
4
+ "version": "5.0.85-rc.1",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -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"
@@ -91,7 +91,7 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
91
91
  footerMessagePlaceholder: string = '';
92
92
  textInputTextArea: String;
93
93
  isTrascriptDownloadEnabled = false;
94
- showContinueConversationButton: boolean = false
94
+ // showContinueConversationButton: boolean = false
95
95
  // ========= begin:: gestione scroll view messaggi ======= //
96
96
  //startScroll = true; // indica lo stato dello scroll: true/false -> è in movimento/ è fermo
97
97
  isScrolling = false;
@@ -402,8 +402,8 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
402
402
  this.conversation = conv;
403
403
  this.isConversationArchived = true;
404
404
  /**calc time difference between now and last conversation timestamp to allow "Continue" button */
405
- let duration = getDateDifference(this.conversation.timestamp, Date.now())
406
- duration.hours < this.g.continueConversationBeforeTime? this.showContinueConversationButton = true: this.showContinueConversationButton = false
405
+ // let duration = getDateDifference(this.conversation.timestamp, Date.now())
406
+ // duration.hours < this.g.continueConversationBeforeTime? this.showContinueConversationButton = true: this.showContinueConversationButton = false
407
407
  callback(this.isConversationArchived)
408
408
  }else if(!conv) {
409
409
  callback(null);
@@ -118,10 +118,10 @@
118
118
  </span>
119
119
  <div class="clear"></div>
120
120
  </button>
121
- <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')}">
121
+ <!-- <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')}">
122
122
  <span class="v-align-center c21-label-button">
123
123
  {{translationMap?.get('CONTINUE')}}
124
124
  </span>
125
125
  <div class="clear"></div>
126
- </button>
126
+ </button> -->
127
127
  </div>
@@ -28,7 +28,7 @@ export class ConversationFooterComponent implements OnInit, OnChanges {
28
28
  @Input() userFullname: string;
29
29
  @Input() userEmail: string;
30
30
  @Input() showAttachmentButton: boolean;
31
- @Input() showContinueConversationButton: boolean;
31
+ // @Input() showContinueConversationButton: boolean;
32
32
  @Input() isConversationArchived: boolean;
33
33
  @Input() hideTextAreaContent: boolean;
34
34
  @Input() hideTextReply: boolean;
@@ -593,11 +593,11 @@ export class ConversationFooterComponent implements OnInit, OnChanges {
593
593
  this.onNewConversationButtonClicked.emit();
594
594
  }
595
595
 
596
- onContinueConversation(){
597
- this.hideTextAreaContent = false;
598
- this.onBackButton.emit(false)
599
- this.restoreTextArea()
600
- }
596
+ // onContinueConversation(){
597
+ // this.hideTextAreaContent = false;
598
+ // this.onBackButton.emit(false)
599
+ // this.restoreTextArea()
600
+ // }
601
601
 
602
602
  onBackButtonFN(){
603
603
  this.onBackButton.emit(false)
@@ -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 > continueConversationBeforeTime:: ', TEMP]);
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
- globals.continueConversationBeforeTime = +TEMP;
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
- this.globals.continueConversationBeforeTime = +TEMP;
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
- globals.continueConversationBeforeTime = +TEMP;
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) {
@@ -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 */
@@ -567,10 +567,10 @@ export class Globals {
567
567
  if(isOpen && isMobile){
568
568
  //block body scroll
569
569
  // window.parent.document.body.style.height = '100vh';
570
- window.parent.document.body.style.height = '0';
571
- window.parent.document.body.style.width = '100%';
572
- window.parent.document.body.style.overflowY = 'hidden'
573
- window.parent.document.body.style.position = 'fixed';
570
+ window.parent.document.body.style.setProperty('height', '0', 'important')
571
+ window.parent.document.body.style.setProperty('width', '100%', 'important')
572
+ window.parent.document.body.style.setProperty('overflow-y', 'hidden', 'important')
573
+ window.parent.document.body.style.setProperty('position', 'fixed', 'important')
574
574
  }else if(!isOpen && isMobile){
575
575
  //reset body style
576
576
  window.parent.document.body.style.removeProperty('height')
@@ -427,6 +427,7 @@ function getMimeTypeFromExtension(extension: string): string {
427
427
  '.txt': 'text/plain',
428
428
  '.doc': 'application/msword',
429
429
  '.docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
430
+ '.wav' : 'audio/wav'
430
431
  // Aggiungi altri tipi MIME se necessario
431
432
  };
432
433
  return mimeTypes[extension] || '';
@@ -55,7 +55,7 @@
55
55
  "CLOSE_CHAT": "Close chat",
56
56
  "MINIMIZE":"Minimize",
57
57
  "MAXIMIZE":"Maximize",
58
- "CONFIRM_CLOSE_CHAT":"Are you sure you wanna close this chat?",
58
+ "CONFIRM_CLOSE_CHAT":"Are you sure you want to close this chat?",
59
59
 
60
60
  "INFO_SUPPORT_USER_ADDED_SUBJECT":"you",
61
61
  "INFO_SUPPORT_USER_ADDED_YOU_VERB":"have been added to ",
@@ -55,7 +55,7 @@
55
55
  "CLOSE_CHAT": "Cerrar chat",
56
56
  "MINIMIZE":"Minimizar",
57
57
  "MAXIMIZE":"Maximizar",
58
- "CONFIRM_CLOSE_CHAT":"¿Estás segura de que quieres cerrar este chat?",
58
+ "CONFIRM_CLOSE_CHAT":"¿Estás seguro de que quieres cerrar este chat?",
59
59
 
60
60
  "INFO_SUPPORT_USER_ADDED_SUBJECT":"tú",
61
61
  "INFO_SUPPORT_USER_ADDED_YOU_VERB":"han sido agregados a ",
@@ -31,7 +31,7 @@
31
31
  "ALERT_LEAVE_CHAT": "Voulez-vous quitter la conversation?",
32
32
  "YES": "Oui",
33
33
  "NO": "Non",
34
- "BUTTON_CLOSE_TO_ICON": "Minimisez le chat",
34
+ "BUTTON_CLOSE_TO_ICON": "Minimisez la discussion",
35
35
  "BUTTON_EDIT_PROFILE": "Modifier le profil",
36
36
  "RATE_CHAT": "évaluer la conversation",
37
37
  "WELCOME_TITLE": "Salut, bienvenue à Tiledesk 👋",
@@ -44,7 +44,7 @@
44
44
  "CLOSE": "Fermer",
45
45
  "RESTART":"Redémarrer",
46
46
  "PREV_CONVERSATIONS": "Vos conversations",
47
- "YOU": "Toi",
47
+ "YOU": "Tu",
48
48
  "SHOW_ALL_CONV": "voir tout",
49
49
  "START_A_CONVERSATION": "Démarrer une conversation",
50
50
  "NO_CONVERSATION": "Aucune conversation active",
@@ -52,17 +52,17 @@
52
52
  "WAITING_TIME_FOUND": "L'équipe répond généralement en $reply_time",
53
53
  "WAITING_TIME_NOT_FOUND": "Nous vous répondrons dans les plus brefs délais",
54
54
  "CLOSED": "Fermé",
55
- "CLOSE_CHAT": "Fermer le chat",
55
+ "CLOSE_CHAT": "Fermer la discussion",
56
56
  "MINIMIZE":"Minimiser",
57
57
  "MAXIMIZE":"Maximiser",
58
58
  "CONFIRM_CLOSE_CHAT":"Etes-vous sûr de vouloir fermer cette discussion?",
59
59
 
60
- "INFO_SUPPORT_USER_ADDED_SUBJECT":"toi",
60
+ "INFO_SUPPORT_USER_ADDED_SUBJECT":"tu",
61
61
  "INFO_SUPPORT_USER_ADDED_YOU_VERB":"ont été ajoutés à ",
62
62
  "INFO_SUPPORT_USER_ADDED_COMPLEMENT":"rejointe",
63
63
  "INFO_SUPPORT_USER_ADDED_VERB":"la discussion",
64
- "INFO_SUPPORT_CHAT_REOPENED":"Chat rouvert",
65
- "INFO_SUPPORT_CHAT_CLOSED":"Chat fermé",
64
+ "INFO_SUPPORT_CHAT_REOPENED":"Discussion rouvert",
65
+ "INFO_SUPPORT_CHAT_CLOSED":"Discussion fermé",
66
66
  "INFO_SUPPORT_LEAD_UPDATED":"Prospect mis à jour",
67
67
  "INFO_SUPPORT_MEMBER_LEFT_GROUP":"supprimé du groupe",
68
68
  "INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"a quitté la conversation",
@@ -55,7 +55,7 @@
55
55
  "CLOSE_CHAT": "Chiudi chat",
56
56
  "MINIMIZE":"Minimizza",
57
57
  "MAXIMIZE":"Massimizza",
58
- "CONFIRM_CLOSE_CHAT":"Vuoi davvero chiudere questa chat?",
58
+ "CONFIRM_CLOSE_CHAT":"Sei sicuro di voler chiudere questa chat?",
59
59
 
60
60
  "INFO_SUPPORT_USER_ADDED_SUBJECT":"tu",
61
61
  "INFO_SUPPORT_USER_ADDED_YOU_VERB":"sei stato aggiunto ",
@@ -131,6 +131,7 @@
131
131
  display: -webkit-box;
132
132
  max-height: 258px; /* Fallback for non-webkit */
133
133
  line-height: 2.3;
134
+ line-clamp: 8;
134
135
  -webkit-line-clamp: 8;
135
136
  -webkit-box-orient: vertical;
136
137
  overflow: hidden;
@@ -1284,12 +1285,12 @@
1284
1285
  window.Tiledesk('restart')
1285
1286
  }
1286
1287
 
1287
- function onClickContinueConversationBeforeTime(){
1288
- let text = document.getElementById('continueConversationBeforeTime').value
1289
- window.tiledeskSettings['continueConversationBeforeTime'] = text
1290
- console.log('onClickContinueConversationBeforeTime:',window.tiledeskSettings);
1291
- window.Tiledesk('restart')
1292
- }
1288
+ // function onClickContinueConversationBeforeTime(){
1289
+ // let text = document.getElementById('continueConversationBeforeTime').value
1290
+ // window.tiledeskSettings['continueConversationBeforeTime'] = text
1291
+ // console.log('onClickContinueConversationBeforeTime:',window.tiledeskSettings);
1292
+ // window.Tiledesk('restart')
1293
+ // }
1293
1294
 
1294
1295
  function onClickRecipientId(){
1295
1296
  let text = document.getElementById('recipientId').value
@@ -2294,7 +2295,7 @@
2294
2295
  <button class="btn btn-light" onclick="onClickAllowReopen()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
2295
2296
  </div>
2296
2297
  </div>
2297
- <div class="row">
2298
+ <!-- <div class="row">
2298
2299
  <div class="col-md-5 formElement"><span><em><strong>continueConversationBeforeTime</strong></em></span></div>
2299
2300
  <div class="col-md-5 formElement">
2300
2301
  <div class="col-form-label" style="width: 90px">Time (h):</div>
@@ -2303,7 +2304,7 @@
2303
2304
  <div class="col-md-2">
2304
2305
  <button class="btn btn-light" onclick="onClickContinueConversationBeforeTime()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
2305
2306
  </div>
2306
- </div>
2307
+ </div> -->
2307
2308
  <div class="row">
2308
2309
  <div class="col-md-5 formElement"><span><em><strong>recipientId</strong></em></span></div>
2309
2310
  <div class="col-md-5">
@@ -9,7 +9,7 @@
9
9
  width: auto;
10
10
  height: auto;
11
11
  display: none;
12
- z-index: 2000000000; /*999999*/;
12
+ z-index: 3000000000; /*999999*/;
13
13
  }
14
14
  #tiledeskdiv {
15
15
  /* width: 100%;