@chat21/chat21-web-widget 5.1.0-rc23 → 5.1.0-rc24

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,9 @@
6
6
  ### **Copyrigth**:
7
7
  *Tiledesk SRL*
8
8
 
9
+ # 5.1.0-rc24
10
+ - **added**: size tiledeskSettings property
11
+
9
12
  # 5.1.0-rc23
10
13
  - **added**: hideHeaderConversation tiledeskSettings property
11
14
 
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.1.0-rc23",
4
+ "version": "5.1.0-rc24",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -20,6 +20,7 @@
20
20
  [hideSignOutOptionMenu]="(!g?.singleConversation || !g?.showLogoutOption)"
21
21
  [hideChatDetailOptionMenu]="(!g?.isDevMode)"
22
22
  [fullscreenMode]="g?.fullscreenMode"
23
+ [size]="g?.size"
23
24
  [stylesMap]="stylesMap"
24
25
  [translationMap]="translationMapHeader"
25
26
  [widgetTitle]="g?.project?.widgetTitle"
@@ -221,7 +221,7 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
221
221
  'CLOSE',
222
222
  'MAXIMIZE',
223
223
  'MINIMIZE',
224
- 'FULLSCREEN',
224
+ 'CENTER',
225
225
  'CLOSE_CHAT',
226
226
  'RESTART',
227
227
  'LOGOUT',
@@ -1020,9 +1020,9 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
1020
1020
  //this.g.setParameter('activeConversation', null, false);
1021
1021
  /** remove Min/Max/fullscreen css classes */
1022
1022
  var tiledeskDiv = this.g.windowContext.window.document.getElementById('tiledeskdiv')
1023
- tiledeskDiv.classList.remove('increaseSize')
1024
- tiledeskDiv.classList.remove('decreaseSize')
1025
- tiledeskDiv.classList.remove('top')
1023
+ tiledeskDiv.classList.remove('max-size')
1024
+ tiledeskDiv.classList.remove('min-size')
1025
+ tiledeskDiv.classList.remove('top-size')
1026
1026
 
1027
1027
  this.onCloseWidget.emit();
1028
1028
  }
@@ -1073,20 +1073,21 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
1073
1073
  // this.hideTextAreaContent = true
1074
1074
  }
1075
1075
  /** CALLED BY: conv-header component */
1076
- onWidgetSizeChange(mode){
1076
+ onWidgetSizeChange(mode: 'min' | 'max' | 'top'){
1077
1077
  var tiledeskDiv = this.g.windowContext.window.document.getElementById('tiledeskdiv')
1078
+ this.g.size = mode
1078
1079
  if(mode==='max'){
1079
- tiledeskDiv.classList.add('increaseSize')
1080
- tiledeskDiv.classList.remove('decreaseSize')
1081
- tiledeskDiv.classList.remove('top')
1080
+ tiledeskDiv.classList.add('max-size')
1081
+ tiledeskDiv.classList.remove('min-size')
1082
+ tiledeskDiv.classList.remove('top-size')
1082
1083
  }else if(mode==='min'){
1083
- tiledeskDiv.classList.add('decreaseSize')
1084
- tiledeskDiv.classList.remove('increaseSize')
1085
- tiledeskDiv.classList.remove('top')
1084
+ tiledeskDiv.classList.add('min-size')
1085
+ tiledeskDiv.classList.remove('max-size')
1086
+ tiledeskDiv.classList.remove('top-size')
1086
1087
  }else if(mode=== 'top'){
1087
- tiledeskDiv.classList.add('top')
1088
- tiledeskDiv.classList.remove('increaseSize')
1089
- tiledeskDiv.classList.remove('decreaseSize')
1088
+ tiledeskDiv.classList.add('top-size')
1089
+ tiledeskDiv.classList.remove('max-size')
1090
+ tiledeskDiv.classList.remove('min-size')
1090
1091
 
1091
1092
  }
1092
1093
  this.isMenuShow = false;
@@ -1307,7 +1308,7 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
1307
1308
  private onIncreaseWith(){
1308
1309
  try{
1309
1310
  const tiledeskDiv = this.g.windowContext.window.document.getElementById('tiledeskdiv')
1310
- tiledeskDiv.classList.add('increaseSize')
1311
+ tiledeskDiv.classList.add('max-size')
1311
1312
  const chat21conversations = document.getElementById('chat21-conversations')
1312
1313
  chat21conversations.style.borderRadius = '16px'
1313
1314
  // tiledeskDiv.style.width = '696px'
@@ -1320,8 +1321,8 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
1320
1321
  private restoreDefaultWidgetSize(){
1321
1322
  try{
1322
1323
  const tiledeskDiv = this.g.windowContext.window.document.getElementById('tiledeskdiv')
1323
- tiledeskDiv.classList.remove('increaseSize')
1324
- tiledeskDiv.classList.remove('decreaseSize')
1324
+ tiledeskDiv.classList.remove('max-size')
1325
+ tiledeskDiv.classList.remove('min-size')
1325
1326
  // tiledeskDiv.style.width = '376px'
1326
1327
  // tiledeskDiv.style.maxHeight = '620px'
1327
1328
  }catch(e){
@@ -123,7 +123,7 @@
123
123
  </div> -->
124
124
 
125
125
  <!-- ICON MAXIMIZE -->
126
- <div class="c21-header-button c21-right" *ngIf="heightStatus==='min' && !fullscreenMode" (click)="onChangeSize('max')">
126
+ <div class="c21-header-button c21-right" *ngIf="size === 'min' && !fullscreenMode" (click)="onChangeSize('max')">
127
127
  <svg role="img" aria-labelledby="altIconTitle" fill="none" xmlns="http://www.w3.org/2000/svg" transform="matrix(-1,0,0,1,0,0)"
128
128
  width="17" height="17" viewBox="0 0 17 17">
129
129
  <path d="M6.49001 8.30999L3.69 11.11V9.40999C3.69 8.93999 3.31 8.55999 2.84 8.55999C2.37 8.55999 1.99001 8.93999 1.99001 9.40999V14.01H6.59C7.06 14.01 7.44 13.63 7.44 13.16C7.44 12.69 7.06 12.31 6.59 12.31H4.89L7.69 9.50999L6.49001 8.30999ZM9.41 1.98999C8.94 1.98999 8.56001 2.36999 8.56001 2.83999C8.56001 3.30999 8.94 3.68999 9.41 3.68999H11.11L8.31001 6.48999L9.51 7.68999L12.31 4.88999V6.58999C12.31 7.05999 12.69 7.43999 13.16 7.43999C13.63 7.43999 14.01 7.05999 14.01 6.58999V1.98999H9.41Z" fill="currentColor"></path>
@@ -132,7 +132,7 @@
132
132
  <span class="label-menu-item">{{ translationMap?.get('MAXIMIZE') }}</span>
133
133
  </div>
134
134
  <!-- ICON MINIMIZE -->
135
- <div class="c21-header-button c21-right" *ngIf="heightStatus==='max' || heightStatus==='top' || fullscreenMode" (click)="onChangeSize('min')">
135
+ <div class="c21-header-button c21-right" *ngIf="(size==='max' || size==='top') && !fullscreenMode" (click)="onChangeSize('min')">
136
136
  <svg role="img" aria-labelledby="altIconTitle" class="icon-menu" fill="none" xmlns="http://www.w3.org/2000/svg" transform="matrix(-1,0,0,1,0,0)"
137
137
  width="17" height="17" viewBox="0 0 17 17">
138
138
  <path d="M13.59 5.31h-1.7l3.3-3.3-1.2-1.2-3.3 3.3v-1.7a.85.85 0 1 0-1.7 0v4.6h4.6a.85.85 0 1 0 0-1.7M1.57 9.84c0 .47.38.85.85.85h1.7l-3.3 3.3 1.2 1.2 3.3-3.3v1.7a.85.85 0 1 0 1.7 0v-4.6h-4.6a.85.85 0 0 0-.85.85" fill="currentColor"></path>
@@ -140,17 +140,17 @@
140
140
  </svg>
141
141
  <span class="label-menu-item">{{ translationMap?.get('MINIMIZE') }}</span>
142
142
  </div>
143
-
144
143
  <!-- ICON TOP -->
145
- <!-- <div class="c21-header-button c21-right" *ngIf="heightStatus!=='top' && !fullscreenMode" (click)="onChangeSize('top')">
144
+ <div class="c21-header-button c21-right" *ngIf="size!=='top' && !fullscreenMode" (click)="onChangeSize('top')">
146
145
  <svg role="img" aria-labelledby="altIconTitle" fill="none" xmlns="http://www.w3.org/2000/svg" transform="matrix(-1,0,0,1,0,0)"
147
146
  width="17" height="17" viewBox="0 0 17 17">
148
- <path fill="currentColor" d="M6.5,8.3l-2.8,2.8v-1.7c0-.5-.4-.9-.9-.9s-.8.4-.8.9v4.6h4.6c.5,0,.8-.4.8-.9s-.4-.8-.8-.8h-1.7l2.8-2.8-1.2-1.2ZM9.4,2c-.5,0-.8.4-.8.8s.4.9.8.9h1.7l-2.8,2.8,1.2,1.2,2.8-2.8v1.7c0,.5.4.8.8.8s.9-.4.9-.8V2h-4.6Z"/>
149
- <path fill="currentColor" d="M8.3,9.5l2.8,2.8h-1.7c-.5,0-.9.4-.9.9s.4.8.9.8h4.6v-4.6c0-.5-.4-.8-.9-.8s-.8.4-.8.8v1.7l-2.8-2.8-1.2,1.2ZM2,6.5c0,.5.4.8.8.8s.9-.4.9-.8v-1.7l2.8,2.8,1.2-1.2-2.8-2.8h1.7c.5,0,.8-.4.8-.8s-.4-.9-.8-.9H2v4.6Z"/>
150
- <title id="altIconTitle">{{ translationMap?.get('FULLSCREEN') }}</title>
147
+ <path fill="currentColor" d="M3.7,7.6L2.5,6.4C2.2,6,2.2,5.5,2.5,5.2s0.9-0.4,1.2-0.1L7,8.4l-3.3,3.3c-0.4,0.4-0.8,0.3-1.1,0s-0.4-0.9-0.1-1.2l1.2-1.2 H1.5l0-1.7H3.7z"/>
148
+ <path fill="currentColor" d="M13.3,7.6l1.2-1.2c0.4-0.4,0.3-0.8,0-1.1s-0.9-0.4-1.2-0.1L10,8.4l3.3,3.3c0.4,0.4,0.8,0.3,1.1,0s0.4-0.9,0.1-1.2l-1.2-1.2 h2.2l0-1.7H13.3z"/>
149
+ <path fill="currentColor" d="M8.5,14.5L8.5,14.5c-0.5,0-0.9-0.4-0.9-0.8V3.3c0-0.5,0.4-0.8,0.8-0.8h0c0.5,0,0.8,0.4,0.8,0.8v10.4 C9.4,14.2,9,14.5,8.5,14.5z"/>
150
+ <title id="altIconTitle">{{ translationMap?.get('CENTER') }}</title>
151
151
  </svg>
152
- <span class="label-menu-item">{{ translationMap?.get('FULLSCREEN') }}</span>
153
- </div> -->
152
+ <span class="label-menu-item">{{ translationMap?.get('CENTER') }}</span>
153
+ </div>
154
154
 
155
155
  <!-- ICON LOGOUT -->
156
156
  <div class="c21-header-button c21-right" *ngIf="!hideSignOutOptionMenu" (click)="signOut()">
@@ -23,6 +23,7 @@ export class ConversationHeaderComponent implements OnInit, OnChanges {
23
23
  @Input() typingLocation: string;
24
24
  @Input() isTrascriptDownloadEnabled: boolean;
25
25
  @Input() fullscreenMode: boolean;
26
+ @Input() size: 'min' | 'max' | 'top';
26
27
  @Input() hideCloseConversationOptionMenu: boolean;
27
28
  @Input() hideHeaderCloseButton: boolean;
28
29
  @Input() hideHeaderBackButton: boolean;
@@ -104,10 +105,9 @@ export class ConversationHeaderComponent implements OnInit, OnChanges {
104
105
  this.onMenuOptionClick.emit(HEADER_MENU_OPTION.LOGOUT)
105
106
  }
106
107
  /**
107
- * @param status : string 'max' || 'min'
108
+ * @param status : string 'max' || 'min' || 'top'
108
109
  */
109
110
  onChangeSize(status){
110
- this.heightStatus = status
111
111
  if(status === 'min') this.onMenuOptionClick.emit(HEADER_MENU_OPTION.MINIMIZE)
112
112
  if(status === 'max') this.onMenuOptionClick.emit(HEADER_MENU_OPTION.MAXIMIZE)
113
113
  if(status === 'top') this.onMenuOptionClick.emit(HEADER_MENU_OPTION.TOP)
@@ -915,7 +915,7 @@ export class GlobalSettingsService {
915
915
  globals.hideSettings = (TEMP === true) ? true : false;;
916
916
  }
917
917
  TEMP = tiledeskSettings['isLogEnabled'];
918
- // this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > logLevel:: ', TEMP]);
918
+ // this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > isLogEnabled:: ', TEMP]);
919
919
  if (TEMP !== undefined) {
920
920
  globals.isLogEnabled = TEMP;
921
921
  }
@@ -964,7 +964,7 @@ export class GlobalSettingsService {
964
964
  globals.fontFamily = TEMP + ',' + globals.fontFamily;
965
965
  }
966
966
  TEMP = tiledeskSettings['fontFamilySource'];
967
- // this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > fontFamily:: ', TEMP]);
967
+ // this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > fontFamilySource:: ', TEMP]);
968
968
  if (TEMP !== undefined) {
969
969
  globals.fontFamilySource = TEMP;
970
970
  }
@@ -1013,7 +1013,7 @@ export class GlobalSettingsService {
1013
1013
  globals.nativeRating = (TEMP === true) ? true : false;
1014
1014
  }
1015
1015
  TEMP = tiledeskSettings['showInfoMessage'];
1016
- // this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > showBubbleInfoMessage:: ', TEMP]);
1016
+ // this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > showInfoMessage:: ', TEMP]);
1017
1017
  if (TEMP !== undefined) {
1018
1018
  globals.showInfoMessage = TEMP.split(',').map(key => { return key.trim()});
1019
1019
  }
@@ -1056,7 +1056,7 @@ export class GlobalSettingsService {
1056
1056
  globals.telegramUsername = TEMP;
1057
1057
  }
1058
1058
  TEMP = tiledeskSettings['fileUploadAccept'];
1059
- // this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > telegramUsername:: ', TEMP]);
1059
+ // this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > fileUploadAccept:: ', TEMP]);
1060
1060
  if (TEMP !== undefined) {
1061
1061
  globals.fileUploadAccept = TEMP;
1062
1062
  }
@@ -1096,9 +1096,14 @@ export class GlobalSettingsService {
1096
1096
  globals.showEmojiFooterButton = (TEMP === true) ? true : false;
1097
1097
  }
1098
1098
  TEMP = tiledeskSettings['showAudioRecorderFooterButton'];
1099
- // this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > showEmojiFooterButton:: ', TEMP]);
1099
+ // this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > showAudioRecorderFooterButton:: ', TEMP]);
1100
1100
  if (TEMP !== undefined) {
1101
1101
  globals.showAudioRecorderFooterButton = (TEMP === true) ? true : false;
1102
+ }
1103
+ TEMP = tiledeskSettings['size'];
1104
+ // this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > size:: ', TEMP]);
1105
+ if (TEMP !== undefined) {
1106
+ globals.size = TEMP;
1102
1107
  }
1103
1108
  }
1104
1109
 
@@ -1841,6 +1846,11 @@ export class GlobalSettingsService {
1841
1846
  if (TEMP) {
1842
1847
  globals.showEmojiFooterButton = stringToBoolean(TEMP);
1843
1848
  }
1849
+
1850
+ TEMP = getParameterByName(windowContext, 'tiledesk_size');
1851
+ if (TEMP) {
1852
+ globals.size = TEMP;
1853
+ }
1844
1854
 
1845
1855
  }
1846
1856
 
@@ -224,6 +224,8 @@ export class Globals {
224
224
  allowedOnSpecificUrlList: Array<string> // ******* new ********
225
225
 
226
226
  fontFamilySource: string; // ******* new ********
227
+
228
+ size: 'min' | 'max' | 'top'; // ******* new ********
227
229
  constructor(
228
230
  ) { }
229
231
 
@@ -246,94 +248,94 @@ export class Globals {
246
248
  // ============ BEGIN: SET EXTERNAL PARAMETERS ==============//
247
249
  this.baseLocation = 'https://widget.tiledesk.com/v2';
248
250
  this.autoStart = true;
249
- this.startHidden = false;
250
251
  /** start Authentication and startUI */
251
- this.isShown = true;
252
+ this.startHidden = false;
252
253
  /** show/hide all widget -> js call: showAllWidget */
253
- this.isOpen = false;
254
+ this.isShown = true;
254
255
  /** show/hide window widget -> js call: hideAllWidget */
255
- this.startFromHome = true;
256
+ this.isOpen = false;
256
257
  /** start from Home or Conversation */
257
- this.isOpenPrechatForm = true;
258
+ this.startFromHome = true;
258
259
  /** check open/close modal prechatform if g.preChatForm is true */
259
- this.isOpenStartRating = false;
260
+ this.isOpenPrechatForm = true;
260
261
  /** show/hide all rating chat */
261
- this.projectid = '';
262
+ this.isOpenStartRating = false;
262
263
  /** The TileDesk project id. Find your TileDesk ProjectID in the
263
- TileDesk Dashboard under the Widget menu. */
264
- this.preChatForm = false;
264
+ TileDesk Dashboard under the Widget menu. */
265
+ this.projectid = '';
265
266
  /** You can require customers to enter information like name and email
266
267
  before sending a chat message by enabling the Pre-Chat form. Permitted
267
268
  values: true, false. The default value is false. */
268
- this.align = '';
269
+ this.preChatForm = false;
269
270
  /** if it is true, the chat window is automatically open when the
270
- widget is loaded. Permitted values: true, false. Default value : false */
271
- this.calloutTimer = -1;
271
+ widget is loaded. Permitted values: true, false. Default value : false */
272
+ this.align = '';
272
273
  /** Proactively open the chat windows to increase the customer engagement.
273
274
  Permitted values: -1 (Disabled), 0 (Immediatly) or a positive integer value.
274
275
  For exmaple: 5 (After 5 seconds), 10 (After 10 seconds). */
275
- this.calloutTitle = '';
276
+ this.calloutTimer = -1;
276
277
  /** title box callout */
277
- this.calloutMsg = '';
278
+ this.calloutTitle = '';
278
279
  /** stato callout (shown only first time) */
279
- this.calloutStaus = true;
280
+ this.calloutMsg = '';
280
281
  /** message box callout */
281
- this.userFullname = '';
282
+ this.calloutStaus = true;
282
283
  /** userFullname: Current user fullname. Set this parameter to specify
283
284
  the visitor fullname. */
284
- this.userEmail = '';
285
+ this.userFullname = '';
285
286
  /** Current user email address. Set this parameter to specify the visitor
286
287
  email address. */
287
- this.widgetTitle = '';
288
+ this.userEmail = '';
288
289
  /** Set the widget title label shown in the widget header. Value type : string.
289
290
  The default value is Tiledesk. */
290
- this.dynamicWaitTimeReply = true;
291
+ this.widgetTitle = '';
291
292
  /** The user can decide whether or not to share the
292
- * average response time of his team (if 'dynamicWaitTimeReply' is
293
- * false the WAITING_TIME_NOT_FOUND will always be displayed)
294
- * is set to true for backward compatibility with old projects */
295
- this.fullscreenMode = false;
293
+ * average response time of his team (if 'dynamicWaitTimeReply' is
294
+ * false the WAITING_TIME_NOT_FOUND will always be displayed)
295
+ * is set to true for backward compatibility with old projects */
296
+ this.dynamicWaitTimeReply = true;
297
+
296
298
  /** if it is true, the chat window is open in fullscreen mode. Permitted
297
299
  values: true, false. Default value : false */
298
- this.themeColor = convertColorToRGBA('#2a6ac1', 100);
300
+ this.fullscreenMode = false;
299
301
  /** allows you to change the main widget's color
300
302
  (color of the header, color of the launcher button,
301
303
  other minor elements). Permitted values: Hex color
302
304
  codes, e.g. #87BC65 and RGB color codes, e.g. rgb(135,188,101) */
303
- this.themeColorOpacity = 100
305
+ this.themeColor = convertColorToRGBA('#2a6ac1', 100);
304
306
  /**allows you to change opacity in background headers component
305
- * Permitted values: [0..1] */
306
- this.themeForegroundColor = convertColorToRGBA('#ffffff', 100);
307
+ * Permitted values: [0..1] */
308
+ this.themeColorOpacity = 100
307
309
  /** allows you to change text and icons' color.
308
310
  Permitted values: Hex color codes, e.g. #425635 and RGB color
309
311
  codes, e.g. rgb(66,86,53) */
310
- this.allowTranscriptDownload = false;
312
+ this.themeForegroundColor = convertColorToRGBA('#ffffff', 100);
311
313
  /** allows the user to download the chat transcript. The download button appears
312
314
  when the chat is closed by the operator. Permitter values: true, false.
313
315
  Default value: false */
314
- this.poweredBy = BRAND_BASE_INFO.POWERED_BY;
316
+ this.allowTranscriptDownload = false;
315
317
  /** link nel footer widget */
316
- this.logoChat = BRAND_BASE_INFO.LOGO_CHAT;
318
+ this.poweredBy = BRAND_BASE_INFO.POWERED_BY;
317
319
  /** url img logo */
318
- this.marginX = '20px';
320
+ this.logoChat = BRAND_BASE_INFO.LOGO_CHAT;
319
321
  /** set margin left or rigth widget */
320
- this.marginY = '20px';
322
+ this.marginX = '20px';
321
323
  /** set margin bottom widget */
322
- this.mobileMarginX = '0px';
324
+ this.marginY = '20px';
323
325
  /** set margin left or rigth widget for mobile */
324
- this.mobileMarginY = '0px';
326
+ this.mobileMarginX = '0px';
325
327
  /** set margin bottom widget for mobile*/
326
- this.launcherWidth = '60px'
328
+ this.mobileMarginY = '0px';
327
329
  /** set launcher width widget */
328
- this.launcherHeight = '60px'
330
+ this.launcherWidth = '60px'
329
331
  /** set launcher height widget */
330
- this.baloonImage='';
332
+ this.launcherHeight = '60px'
331
333
  /** set launcher baloon widget image: require SVG url */
332
- this.baloonShape = '50%';
334
+ this.baloonImage='';
333
335
  /** set launcher balon widget shape: can set corner by corner */
334
- this.isLogEnabled = false;
336
+ this.baloonShape = '50%';
335
337
  // this.parameters['isLogEnabled'] = false;
336
- this.openExternalLinkButton = true;
338
+ this.isLogEnabled = false;
337
339
  /** Hide the header conversation Permitted values: true,
338
340
  false. The default value is false. */
339
341
  this.hideHeaderConversation= false;
@@ -341,64 +343,65 @@ export class Globals {
341
343
  false. The default value is false. */
342
344
  this.hideHeaderCloseButton = false;
343
345
  /** enable to hide/show upper-right header conversation options menu */
344
- this.hideHeaderConversationOptionsMenu = false;
346
+ this.openExternalLinkButton = true;
345
347
  /** enable to close a conversation from upper-right header menu */
346
- this.hideCloseConversationOptionMenu = false;
348
+ this.hideHeaderConversationOptionsMenu = false;
347
349
  /** enable to hide/show options menu in conversation detail header */
348
- this.hideSettings = false;
350
+ this.hideCloseConversationOptionMenu = false;
349
351
  /** enable to hide/show options menu in home component */
350
- this.filterByRequester = false;
352
+ this.hideSettings = false;
351
353
  /** show conversations with conversation.attributes.requester_id == user.uid */
352
- this.persistence = 'local';
354
+ this.filterByRequester = false;
353
355
  /** set the auth persistence */
354
- this.preChatFormJson = [{name: "userFullname", type:"text", mandatory:true, label:"LABEL_FIELD_NAME"},{name:"userEmail", type:"text", mandatory:true, regex:"/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$/", label:"LABEL_FIELD_EMAIL", errorLabel:"LABEL_ERROR_FIELD_EMAIL"}]
356
+ this.persistence = 'local';
355
357
  /** set the preChatForm Json as default if preChatFormCustomFieldsEnabled is false or not exist */
356
- this.bubbleSentBackground = convertColorToRGBA('#2a6ac1', 100); //'#62a8ea'
358
+ this.preChatFormJson = [{name: "userFullname", type:"text", mandatory:true, label:"LABEL_FIELD_NAME"},{name:"userEmail", type:"text", mandatory:true, regex:"/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$/", label:"LABEL_FIELD_EMAIL", errorLabel:"LABEL_ERROR_FIELD_EMAIL"}]
357
359
  /** set the background of bubble sent message */
358
- this.bubbleSentTextColor = convertColorToRGBA('#ffffff', 100); //'#ffffff'
360
+ this.bubbleSentBackground = convertColorToRGBA('#2a6ac1', 100); //'#62a8ea'
359
361
  /** set the text color of bubble sent message */
360
- this.bubbleReceivedBackground= convertColorToRGBA('#f0f2f7', 100); //#f7f7f7;
362
+ this.bubbleSentTextColor = convertColorToRGBA('#ffffff', 100); //'#ffffff'
361
363
  /** set the background of bubble received message */
362
- this.bubbleReceivedTextColor = convertColorToRGBA('#06132b', 100); //#1a1a1a
364
+ this.bubbleReceivedBackground= convertColorToRGBA('#f0f2f7', 100); //#f7f7f7;
363
365
  /** set the text color of bubble received message */
364
- this.fontSize = '1.4em'
366
+ this.bubbleReceivedTextColor = convertColorToRGBA('#06132b', 100); //#1a1a1a
365
367
  /** set the text size of bubble messages */
366
- this.fontFamily = "'Roboto','Google Sans', Helvetica, Arial, sans-serif"
368
+ this.fontSize = '1.4em'
367
369
  /** set the text family of bubble messages */
368
- this.buttonFontSize = '15px'
370
+ this.fontFamily = "'Roboto','Google Sans', Helvetica, Arial, sans-serif"
369
371
  /** set the text size of attachment-buttons */
370
- this.buttonBackgroundColor = convertColorToRGBA('#ffffff', 100)
372
+ this.buttonFontSize = '15px'
371
373
  /** set the backgroundColor of attachment-buttons */
372
- this.buttonTextColor = convertColorToRGBA('#2a6ac1', 100)
374
+ this.buttonBackgroundColor = convertColorToRGBA('#ffffff', 100)
373
375
  /** set the text color of attachment-buttons */
376
+ this.buttonTextColor = convertColorToRGBA('#2a6ac1', 100)
377
+ /** set the text size of attachment-buttons */
374
378
  this.buttonHoverBackgroundColor = convertColorToRGBA('#2a6ac1', 100)
375
379
  /** set the text size of attachment-buttons */
376
380
  this.buttonHoverTextColor = convertColorToRGBA('#ffffff', 100);
377
- /** set the text size of attachment-buttons */
378
- this.singleConversation = false;
379
381
  /** set the single conversation mode for the widget */
380
- this.restartConversation = false;
382
+ this.singleConversation = false;
381
383
  /** allow you to always restart a new converazioe */
382
- this.nativeRating = true;
384
+ this.restartConversation = false;
383
385
  /** set if native rating componet has to be shown */
384
- this.showInfoMessage = 'MEMBER_JOINED_GROUP'.split(',').map(key => { return key.trim()});
386
+ this.nativeRating = true;
385
387
  /** disable or show bubble info message 'MEMBER_JOINED_CHAT' */
386
- this.typingLocation = 'content'
388
+ this.showInfoMessage = 'MEMBER_JOINED_GROUP'.split(',').map(key => { return key.trim()});
387
389
  /** set the location of typing indicator (header or content) */
388
- this.allowReopen = false;
390
+ this.typingLocation = 'content'
389
391
  /** enable the user to reopen a closed conversation */
390
392
  // this.continueConversationBeforeTime = 48;
391
393
  /** enable user to continue archived confersation before the value time from last timeout message */
392
- this.participants = [];
394
+ this.allowReopen = false;
393
395
  /** enable user to talk with specific chat-bots/humans */
394
- this.whatsappNumber = '';
396
+ this.participants = [];
395
397
  /**enable user to set a whatsapp business number to chat with */
396
- this.messangerPageTitle = ''
398
+ this.whatsappNumber = '';
397
399
  /**enable user to set a facebook messanger page to chat with */
398
- this.telegramUsername = ''
400
+ this.messangerPageTitle = ''
399
401
  /**enable user to set a telegram number to chat with */
400
- this.fileUploadAccept = "image/*,.pdf,.txt,.mp3"
402
+ this.telegramUsername = ''
401
403
  /**enable auto disconnect from messaging after a defined amount of time (s)*/
404
+ this.fileUploadAccept = "image/*,.pdf,.txt,.mp3"
402
405
  this.disconnetTime = 0
403
406
 
404
407
  this.showWaitTime = true;
@@ -430,57 +433,36 @@ export class Globals {
430
433
  this.allowedOnSpecificUrl = false
431
434
  /** set a list of pattern url able to load the widget */
432
435
  this.allowedOnSpecificUrlList = [];
436
+ /** set widget size from 3 different positions: min, max, top */
437
+ this.size = 'min';
433
438
 
434
439
  // ============ END: SET EXTERNAL PARAMETERS ==============//
435
440
 
436
441
 
437
442
  // ============ BEGIN: SET INTERNAL PARAMETERS ==============//
443
+ /** name tenant ex: tilechat */
438
444
  this.tenant = environment.firebaseConfig.tenant;
439
- // this.parameters['tenant'] = environment.tenant;
440
- // this.parameters.push({'tenant': environment.tenant});
441
-
442
- /** Set the widget title label shown in the widget header. Value type : string.
443
- The default value is Tiledesk. */
444
- /** name tenant ex: tilechat */
445
+ /** channelType: group/direct */
445
446
  this.channelType = CHANNEL_TYPE.GROUP;
446
- // this.parameters['channelType'] = CHANNEL_TYPE.GROUP;
447
- // this.parameters.push({'channelType': CHANNEL_TYPE.GROUP});
448
- /** channelType: group/direct */
447
+ /** settings for pass variables to js */
449
448
  this.default_settings = {};
450
- // this.parameters.push({'default_settings': '' });
451
- /** settings for pass variables to js */
449
+ /** detect is mobile : detectIfIsMobile() */
452
450
  this.isMobile = false;
453
- // this.parameters['isMobile'] = false;
454
- // this.parameters.push({'isMobile': false}); /** detect is mobile : detectIfIsMobile() */
455
-
451
+ /** detect is logged */
456
452
  this.isLogged = false;
457
- // this.parameters['isLogged'] = false;
458
- // this.parameters.push({'isLogged': false}); /** detect is logged */
459
-
453
+
460
454
  this.BUILD_VERSION = 'v.' + environment.version;
461
- // this.parameters['BUILD_VERSION'] = 'v.' + environment.version;
462
- // this.parameters.push({'BUILD_VERSION': 'v.' + environment.version});
463
455
 
464
456
  this.soundEnabled = true;
465
- // this.parameters['soundEnabled'] = true;
466
- // this.parameters.push({'soundEnabled': true});
467
457
 
468
458
  this.conversationsBadge = 0;
469
- // this.parameters['conversationsBadge'] = 0;
470
- // this.parameters.push({'conversationsBadge': 0});
471
459
 
472
460
  this.isOpenMenuOptions = false;
473
- // this.parameters['isOpenMenuOptions'] = false;
474
- // this.parameters.push({'isOpenMenuOptions': false});
475
461
 
476
462
  this.displayEyeCatcherCard = 'none';
477
- // this.parameters['displayEyeCatcherCard'] = 'none';
478
- // this.parameters.push({'displayEyeCatcherCard': 'none'});
479
463
  // ============ END: SET INTERNAL PARAMETERS ==============//
480
464
 
481
465
  this.supportMode = true;
482
- // this.parameters['supportMode'] = true;
483
- // this.parameters.push({'supportMode': true});
484
466
 
485
467
  this.newConversationStart = true;
486
468
 
@@ -632,6 +614,11 @@ export class Globals {
632
614
  this.align === 'left'? divTiledeskWidget.style.left = this.mobileMarginX : divTiledeskWidget.style.right = this.mobileMarginX;
633
615
  }
634
616
 
617
+ //customize position for 'tiledeskdiv' for desktop
618
+ if(isOpen && !this.isMobile && divTiledeskWidget && this.size){
619
+ divTiledeskWidget.classList.add(this.size + '-size')
620
+ }
621
+
635
622
 
636
623
  }
637
624
 
@@ -55,7 +55,7 @@
55
55
  "CLOSE_CHAT": "Close chat",
56
56
  "MINIMIZE":"Minimize window",
57
57
  "MAXIMIZE":"Expand window",
58
- "FULLSCREEN":"Fullscreen",
58
+ "CENTER":"Center",
59
59
  "CONFIRM_CLOSE_CHAT":"Are you sure you want to close this chat?",
60
60
 
61
61
  "INFO_SUPPORT_USER_ADDED_SUBJECT":"you",
@@ -55,7 +55,7 @@
55
55
  "CLOSE_CHAT": "Cerrar chat",
56
56
  "MINIMIZE":" Minimizar ventana",
57
57
  "MAXIMIZE":"Expandir ventana",
58
- "FULLSCREEN":"Pantalla completa",
58
+ "CENTER":"Centrar",
59
59
  "CONFIRM_CLOSE_CHAT":"¿Estás seguro de que quieres cerrar este chat?",
60
60
 
61
61
  "INFO_SUPPORT_USER_ADDED_SUBJECT":"tú",
@@ -55,7 +55,7 @@
55
55
  "CLOSE_CHAT": "Fermer la discussion",
56
56
  "MINIMIZE":"Réduire la fenêtre",
57
57
  "MAXIMIZE":"Agrandir la fenêtre",
58
- "FULLSCREEN":"Plein écran",
58
+ "CENTER":"Centrer",
59
59
  "CONFIRM_CLOSE_CHAT":"Etes-vous sûr de vouloir fermer cette discussion?",
60
60
 
61
61
  "INFO_SUPPORT_USER_ADDED_SUBJECT":"tu",
@@ -55,7 +55,7 @@
55
55
  "CLOSE_CHAT": "Chiudi chat",
56
56
  "MINIMIZE":"Comprimi finestra",
57
57
  "MAXIMIZE":"Espandi finestra",
58
- "FULLSCREEN":"Fullscreen",
58
+ "CENTER":"Centra",
59
59
  "CONFIRM_CLOSE_CHAT":"Sei sicuro di voler chiudere questa chat?",
60
60
 
61
61
  "INFO_SUPPORT_USER_ADDED_SUBJECT":"tu",
@@ -835,6 +835,63 @@
835
835
  return true;
836
836
  }
837
837
 
838
+
839
+ /** WIDGET POSITION SECTION : start*/
840
+ function onClickSize(){
841
+ let status = document.querySelector('input[name="size"]:checked').value
842
+ window.tiledeskSettings['size'] = status
843
+ console.log('onClickSize: status-->',window.tiledeskSettings);
844
+ window.Tiledesk('restart')
845
+ }
846
+
847
+ function onClickFullScreenMode(){
848
+ let status = document.querySelector('input[name="fullscreenMode"]:checked').value
849
+ window.tiledeskSettings['fullscreenMode'] = stringToBoolean(status)
850
+ console.log('onClickFullScreenMode: status-->',window.tiledeskSettings);
851
+ window.Tiledesk('restart')
852
+ }
853
+
854
+ function onClickAlign(){
855
+ let status = document.querySelector('input[name="align"]:checked').value
856
+ window.tiledeskSettings['align'] = status
857
+ console.log('onClickAlign: status-->',window.tiledeskSettings)
858
+ window.Tiledesk('restart')
859
+ }
860
+
861
+ function onClickMarginX(){
862
+ let text = document.getElementById('marginX').value
863
+ text === ""? text= '100px': text
864
+ window.tiledeskSettings['marginX'] = text
865
+ console.log('onClickMarginX:',window.tiledeskSettings);
866
+ window.Tiledesk('restart')
867
+ }
868
+
869
+ function onClickMarginY(){
870
+ let text = document.getElementById('marginY').value
871
+ text === ""? text= '50px' : text //set default value if user not write a value
872
+ window.tiledeskSettings['marginY'] = text
873
+ console.log('onClickMarginY:',window.tiledeskSettings);
874
+ window.Tiledesk('restart')
875
+ }
876
+
877
+ function onClickMobileMarginX(){
878
+ let text = document.getElementById('mobileMarginX').value
879
+ text === ""? text= '100px': text
880
+ window.tiledeskSettings['mobileMarginX'] = text
881
+ console.log('onClickMobileMarginX:',window.tiledeskSettings);
882
+ window.Tiledesk('restart')
883
+ }
884
+
885
+ function onClickMobileMarginY(){
886
+ let text = document.getElementById('mobileMarginY').value
887
+ text === ""? text= '50px' : text //set default value if user not write a value
888
+ window.tiledeskSettings['mobileMarginY'] = text
889
+ console.log('onClickMobileMarginY:',window.tiledeskSettings);
890
+ window.Tiledesk('restart')
891
+ }
892
+ /** WIDGET POSITION SECTION : end*/
893
+
894
+ /** WIDGET SETTINGS SECTION : start*/
838
895
  function onClickDisconnectTime(){
839
896
  let status = document.querySelector('input[name="disconnetTime"]:checked');
840
897
  let value;
@@ -869,13 +926,6 @@
869
926
  window.Tiledesk('restart')
870
927
  }
871
928
 
872
- function onClickAlign(){
873
- let status = document.querySelector('input[name="align"]:checked').value
874
- window.tiledeskSettings['align'] = status
875
- console.log('onClickAlign: status-->',window.tiledeskSettings)
876
- window.Tiledesk('restart')
877
- }
878
-
879
929
  function onClickCalloutTimer(){
880
930
  let status = document.querySelector('input[name="calloutTimer"]:checked');
881
931
  let value;
@@ -962,13 +1012,6 @@
962
1012
  window.Tiledesk('restart')
963
1013
  }
964
1014
 
965
- function onClickFullScreenMode(){
966
- let status = document.querySelector('input[name="fullscreenMode"]:checked').value
967
- window.tiledeskSettings['fullscreenMode'] = stringToBoolean(status)
968
- console.log('onClickFullScreenMode: status-->',window.tiledeskSettings);
969
- window.Tiledesk('restart')
970
- }
971
-
972
1015
  function onClickThemeColor(){
973
1016
  let color = document.getElementById('themeColor').value
974
1017
  document.getElementById('themeColorText').value = color
@@ -1043,38 +1086,6 @@
1043
1086
  window.Tiledesk('restart')
1044
1087
  }
1045
1088
 
1046
- function onClickMarginX(){
1047
- let text = document.getElementById('marginX').value
1048
- text === ""? text= '100px': text
1049
- window.tiledeskSettings['marginX'] = text
1050
- console.log('onClickMarginX:',window.tiledeskSettings);
1051
- window.Tiledesk('restart')
1052
- }
1053
-
1054
- function onClickMarginY(){
1055
- let text = document.getElementById('marginY').value
1056
- text === ""? text= '50px' : text //set default value if user not write a value
1057
- window.tiledeskSettings['marginY'] = text
1058
- console.log('onClickMarginY:',window.tiledeskSettings);
1059
- window.Tiledesk('restart')
1060
- }
1061
-
1062
- function onClickMobileMarginX(){
1063
- let text = document.getElementById('mobileMarginX').value
1064
- text === ""? text= '100px': text
1065
- window.tiledeskSettings['mobileMarginX'] = text
1066
- console.log('onClickMobileMarginX:',window.tiledeskSettings);
1067
- window.Tiledesk('restart')
1068
- }
1069
-
1070
- function onClickMobileMarginY(){
1071
- let text = document.getElementById('mobileMarginY').value
1072
- text === ""? text= '50px' : text //set default value if user not write a value
1073
- window.tiledeskSettings['mobileMarginY'] = text
1074
- console.log('onClickMobileMarginY:',window.tiledeskSettings);
1075
- window.Tiledesk('restart')
1076
- }
1077
-
1078
1089
  function onClickAutoStart(){
1079
1090
  let status = document.querySelector('input[name="autoStart"]:checked').value
1080
1091
  window.tiledeskSettings['autoStart'] = stringToBoolean(status)
@@ -1227,7 +1238,9 @@
1227
1238
  console.log('onClickNativeRating:', window.tiledeskSettings)
1228
1239
  window.Tiledesk('restart')
1229
1240
  }
1241
+ /** WIDGET SETTINGS SECTION : end*/
1230
1242
 
1243
+ /** WIDGET SOCIAL CHANNELS SECTION : start*/
1231
1244
  function onClickWhatsappNumber(){
1232
1245
  let status = document.getElementById('whatsappNumber').value
1233
1246
  window.tiledeskSettings['whatsappNumber'] = status
@@ -1248,14 +1261,16 @@
1248
1261
  console.log('onClickTelegramUsername:', window.tiledeskSettings)
1249
1262
  window.Tiledesk('restart')
1250
1263
  }
1251
-
1264
+ /** WIDGET SOCIAL CHANNELS SECTION : end*/
1265
+
1266
+ /** WIDGET CONVERSATION DETAIL SECTION : start*/
1252
1267
  function onClickHideHeaderConversation(){
1253
1268
  let status = document.querySelector('input[name="hideHeaderConversation"]:checked').value
1254
1269
  window.tiledeskSettings['hideHeaderConversation'] = stringToBoolean(status)
1255
1270
  console.log('onClickHideHeaderConversation: status-->',window.tiledeskSettings);
1256
1271
  window.Tiledesk('restart')
1257
1272
  }
1258
-
1273
+
1259
1274
  function onClickHideHeaderCloseButton(){
1260
1275
  let status = document.querySelector('input[name="hideHeaderCloseButton"]:checked').value
1261
1276
  window.tiledeskSettings['hideHeaderCloseButton'] = stringToBoolean(status)
@@ -1367,7 +1382,9 @@
1367
1382
  console.log('onClickshowAudioRecorderFooterButton:', window.tiledeskSettings)
1368
1383
  window.Tiledesk('restart')
1369
1384
  }
1385
+ /** WIDGET CONVERSATION DETAIL SECTION : end*/
1370
1386
 
1387
+ /** WIDGET BUBBLE MESSAGE SECTION : start*/
1371
1388
  function onClickFontSize(){
1372
1389
  let text = document.getElementById('fontSize').value
1373
1390
  text === ""? text= '1.4em': text
@@ -1388,6 +1405,9 @@
1388
1405
  window.Tiledesk('restart')
1389
1406
  }
1390
1407
 
1408
+ /** WIDGET BUBBLE MESSAGE SECTION : end*/
1409
+
1410
+ /**WIDGET BUTTON STYLE SECTION : start */
1391
1411
  function onClickButtonFontSize(){
1392
1412
  let text = document.getElementById('buttonFontSize').value
1393
1413
  text === ""? text= '15px': text
@@ -1395,9 +1415,7 @@
1395
1415
  console.log('onClickButtonFontSize:',window.tiledeskSettings);
1396
1416
  window.Tiledesk('restart')
1397
1417
  }
1398
-
1399
-
1400
-
1418
+ /**WIDGET BUTTON STYLE SECTION : end */
1401
1419
 
1402
1420
  function onClickTestAll(){
1403
1421
  inputs = document.getElementsByTagName('input');
@@ -1789,6 +1807,78 @@
1789
1807
  <button class="btn btn-light" onclick="onClickOpenConversationById()">Open conversation <i class="fa-regular fa-comment" aria-hidden="true"></i></button>
1790
1808
  </div>
1791
1809
  </div>
1810
+ <!-- WIDGET POSITION SECTION : start-->
1811
+ <div class="row section">
1812
+ <div><h3 style="line-height: 0.3;">Widget <em><strong>POSITION</strong></em></h3></div>
1813
+ <div class="row">
1814
+ <div class="col-md-5 formElement"><span><em><strong>size</strong></em></span></div>
1815
+ <div class="col-md-5">
1816
+ <input class="form-check-input" type="radio" name="size" value="min" checked><label class="form-check-label" for="size">min</label>
1817
+ <input class="form-check-input" type="radio" name="size" value="max"><label class="form-check-label" for="size">max</label>
1818
+ <input class="form-check-input" type="radio" name="size" value="top"><label class="form-check-label" for="size">top</label>
1819
+ </div>
1820
+ <div class="col-md-2">
1821
+ <button class="btn btn-light" onclick="onClickSize()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
1822
+ </div>
1823
+ </div>
1824
+ <div class="row">
1825
+ <div class="col-md-5 formElement"><span><em><strong>fullscreenMode</strong></em></span></div>
1826
+ <div class="col-md-5">
1827
+ <input class="form-check-input" type="radio" name="fullscreenMode" value="true"><label>True</label>
1828
+ <input class="form-check-input" type="radio" name="fullscreenMode" value="false" checked ><label>False</label>
1829
+ </div>
1830
+ <div class="col-md-2">
1831
+ <button class="btn btn-light" onclick="onClickFullScreenMode()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
1832
+ </div>
1833
+ </div>
1834
+ <div class="row">
1835
+ <div class="col-md-5 formElement"><span><em><strong>align</strong></em></span></div>
1836
+ <div class="col-md-5">
1837
+ <input class="form-check-input" type="radio" name="align" value="left"><label class="form-check-label" for="preChatForm">Left</label>
1838
+ <input class="form-check-input" type="radio" name="align" value="right" checked><label class="form-check-label" for="preChatForm">Right</label>
1839
+ </div>
1840
+ <div class="col-md-2">
1841
+ <button class="btn btn-light" onclick="onClickAlign()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
1842
+ </div>
1843
+ </div>
1844
+ <div class="row">
1845
+ <div class="col-md-5 formElement"><span><em><strong>marginX</strong></em></span></div>
1846
+ <div class="col-md-5 formElement">
1847
+ <input class="form-control col-sm-2" type="text" id="marginX" name="marginX" placeholder="Ex. 100px, 1em">
1848
+ </div>
1849
+ <div class="col-md-2">
1850
+ <button class="btn btn-light" onclick="onClickMarginX()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
1851
+ </div>
1852
+ </div>
1853
+ <div class="row">
1854
+ <div class="col-md-5 formElement"><span><em><strong>marginY</strong></em></span></div>
1855
+ <div class="col-md-5 formElement">
1856
+ <input class="form-control col-sm-2" type="text" id="marginY" name="marginY" placeholder="Ex. 100px, 1em">
1857
+ </div>
1858
+ <div class="col-md-2 ">
1859
+ <button class="btn btn-light" onclick="onClickMarginY()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
1860
+ </div>
1861
+ </div>
1862
+ <div class="row">
1863
+ <div class="col-md-5 formElement"><span><em><strong>mobileMarginX</strong></em></span></div>
1864
+ <div class="col-md-5 formElement">
1865
+ <input class="form-control col-sm-2" type="text" id="mobileMarginX" name="mobileMarginX" placeholder="Ex. 100px, 1em">
1866
+ </div>
1867
+ <div class="col-md-2">
1868
+ <button class="btn btn-light" onclick="onClickMobileMarginX()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
1869
+ </div>
1870
+ </div>
1871
+ <div class="row">
1872
+ <div class="col-md-5 formElement"><span><em><strong>mobileMarginY</strong></em></span></div>
1873
+ <div class="col-md-5 formElement">
1874
+ <input class="form-control col-sm-2" type="text" id="mobileMarginY" name="mobileMarginY" placeholder="Ex. 100px, 1em">
1875
+ </div>
1876
+ <div class="col-md-2 ">
1877
+ <button class="btn btn-light" onclick="onClickMobileMarginY()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
1878
+ </div>
1879
+ </div>
1880
+ </div>
1881
+ <!-- WIDGET POSITION SECTION : end-->
1792
1882
  <div class="row section c21-parameters">
1793
1883
  <div><h3 style="line-height: 0.3;">MANAGE <em><strong>widget settings</strong></em></h3></div>
1794
1884
  <div class="docs">Select an option for Tiledesk settings parameter</div>
@@ -1835,16 +1925,6 @@
1835
1925
  <button class="btn btn-light" onclick="onClickPreChatForm()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
1836
1926
  </div>
1837
1927
  </div>
1838
- <div class="row">
1839
- <div class="col-md-5 formElement"><span><em><strong>align</strong></em></span></div>
1840
- <div class="col-md-5">
1841
- <input class="form-check-input" type="radio" name="align" value="left"><label class="form-check-label" for="preChatForm">Left</label>
1842
- <input class="form-check-input" type="radio" name="align" value="right" checked><label class="form-check-label" for="preChatForm">Right</label>
1843
- </div>
1844
- <div class="col-md-2">
1845
- <button class="btn btn-light" onclick="onClickAlign()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
1846
- </div>
1847
- </div>
1848
1928
  <div class="row">
1849
1929
  <div class="col-md-5 formElement"><span><em><strong>calloutTimer</strong></em></span></div>
1850
1930
  <div class="col-md-5">
@@ -1942,8 +2022,6 @@
1942
2022
  <button class="btn btn-light" onclick="onClickRestartConversation()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
1943
2023
  </div>
1944
2024
  </div>
1945
-
1946
-
1947
2025
  <div class="row">
1948
2026
  <div class="col-md-5 formElement"><span><em><strong>hideSettings</strong></em></span></div>
1949
2027
  <div class="col-md-5">
@@ -1954,17 +2032,6 @@
1954
2032
  <button class="btn btn-light" onclick="onClickHideSettings()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
1955
2033
  </div>
1956
2034
  </div>
1957
-
1958
- <div class="row">
1959
- <div class="col-md-5 formElement"><span><em><strong>fullscreenMode</strong></em></span></div>
1960
- <div class="col-md-5">
1961
- <input class="form-check-input" type="radio" name="fullscreenMode" value="true"><label>True</label>
1962
- <input class="form-check-input" type="radio" name="fullscreenMode" value="false" checked ><label>False</label>
1963
- </div>
1964
- <div class="col-md-2">
1965
- <button class="btn btn-light" onclick="onClickFullScreenMode()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
1966
- </div>
1967
- </div>
1968
2035
  <div class="row">
1969
2036
  <div class="col-md-5 formElement"><span><em><strong>themeColor</strong></em></span></div>
1970
2037
  <div class="col-md-5 formElement">
@@ -2003,42 +2070,6 @@
2003
2070
  <button class="btn btn-light" onclick="onClickDepartmentId()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
2004
2071
  </div>
2005
2072
  </div>
2006
- <div class="row">
2007
- <div class="col-md-5 formElement"><span><em><strong>marginX</strong></em></span></div>
2008
- <div class="col-md-5 formElement">
2009
- <input class="form-control col-sm-2" type="text" id="marginX" name="marginX" placeholder="Ex. 100px, 1em">
2010
- </div>
2011
- <div class="col-md-2">
2012
- <button class="btn btn-light" onclick="onClickMarginX()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
2013
- </div>
2014
- </div>
2015
- <div class="row">
2016
- <div class="col-md-5 formElement"><span><em><strong>marginY</strong></em></span></div>
2017
- <div class="col-md-5 formElement">
2018
- <input class="form-control col-sm-2" type="text" id="marginY" name="marginY" placeholder="Ex. 100px, 1em">
2019
- </div>
2020
- <div class="col-md-2 ">
2021
- <button class="btn btn-light" onclick="onClickMarginY()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
2022
- </div>
2023
- </div>
2024
- <div class="row">
2025
- <div class="col-md-5 formElement"><span><em><strong>mobileMarginX</strong></em></span></div>
2026
- <div class="col-md-5 formElement">
2027
- <input class="form-control col-sm-2" type="text" id="mobileMarginX" name="mobileMarginX" placeholder="Ex. 100px, 1em">
2028
- </div>
2029
- <div class="col-md-2">
2030
- <button class="btn btn-light" onclick="onClickMobileMarginX()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
2031
- </div>
2032
- </div>
2033
- <div class="row">
2034
- <div class="col-md-5 formElement"><span><em><strong>mobileMarginY</strong></em></span></div>
2035
- <div class="col-md-5 formElement">
2036
- <input class="form-control col-sm-2" type="text" id="mobileMarginY" name="mobileMarginY" placeholder="Ex. 100px, 1em">
2037
- </div>
2038
- <div class="col-md-2 ">
2039
- <button class="btn btn-light" onclick="onClickMobileMarginY()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
2040
- </div>
2041
- </div>
2042
2073
  <div class="row">
2043
2074
  <div class="col-md-5 formElement"><span><em><strong>autoStart</strong></em></span></div>
2044
2075
  <div class="col-md-5">
@@ -43,15 +43,14 @@
43
43
  height: 100%;
44
44
  }
45
45
 
46
- #tiledeskdiv.top {
47
- /* transition: width 1s, height 1s; */
48
- /* transition: all 0.5s ease-in !important; */
46
+ #tiledeskdiv.top-size {
49
47
  position: fixed;
50
- top: 50%;
48
+ /* top: 50%; */
51
49
  left: 50%;
52
50
  width: var(--iframeMaxWidth);
53
51
  height: var(--iframeMaxHeight);
54
- transform: translate(-50%, -50%);
52
+ /* transform: translate(-50%, -50%); */
53
+ transform: translate(-50%, 0%);
55
54
  }
56
55
 
57
56
 
@@ -113,13 +112,13 @@
113
112
  box-shadow: none;
114
113
  }
115
114
 
116
- #tiledesk-container.open #tiledeskdiv.decreaseSize {
115
+ #tiledesk-container.open #tiledeskdiv.min-size {
117
116
  transition: width 200ms, height 200ms, max-height 200ms, transform 300ms cubic-bezier(0, 1.2, 1, 1), opacity 83ms ease-out;
118
117
  width: var(--iframeMinWidth);
119
118
  height: var(--iframeMinHeight);
120
119
  }
121
120
 
122
- #tiledesk-container.open #tiledeskdiv.increaseSize {
121
+ #tiledesk-container.open #tiledeskdiv.max-size {
123
122
  /* transition: width 1s, height 1s; */
124
123
  transition: width 200ms, height 200ms, max-height 200ms, transform 300ms cubic-bezier(0, 1.2, 1, 1), opacity 83ms ease-out;
125
124
  width: var(--iframeMaxWidth);