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

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-rc23
10
+ - **added**: hideHeaderConversation tiledeskSettings property
11
+
9
12
  # 5.1.0-rc22
10
13
  - **changed**: footer UI if fullscreenMode is enabled
11
14
  - **changed**: buttons alignment if fullscreenMode is enabled
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-rc22",
4
+ "version": "5.1.0-rc23",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -515,16 +515,6 @@ chat-root {
515
515
  border-radius: 16px;
516
516
  }
517
517
 
518
- .chat21-fullscreen {
519
- width: 100%;
520
- height: 100%;
521
- right: 0px;
522
- left: 0px;
523
- bottom: 0px;
524
- border-radius: 0px;
525
- max-height: none;
526
- }
527
-
528
518
 
529
519
  /***************************
530
520
  ******** PAGE MODAL ********
@@ -596,7 +586,7 @@ chat-root {
596
586
  .c21-header {
597
587
  overflow: hidden;
598
588
  width: 100%;
599
- height: 52px;
589
+ height: var(--chat-header-height);
600
590
  position: relative;
601
591
  margin: 0;
602
592
  padding: 0;
@@ -617,7 +607,7 @@ chat-root {
617
607
 
618
608
  .c21-header-container{
619
609
  position: relative;
620
- height: 52px;
610
+ height: 100%;
621
611
  width: 100%;
622
612
  margin: 0 auto;
623
613
 
@@ -688,7 +678,7 @@ chat-root {
688
678
  }
689
679
  .c21-body {
690
680
  position: absolute;
691
- top: 52px;
681
+ top: var(--chat-header-height);
692
682
  bottom: 0;
693
683
  left: 0;
694
684
  right: 0;
@@ -2122,7 +2122,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
2122
2122
  this.el.nativeElement.style.setProperty('--font-family-bubble-message', this.g.fontFamily)
2123
2123
  this.el.nativeElement.style.setProperty('--button-in-msg-font-family', this.g.fontFamily)
2124
2124
 
2125
-
2125
+ this.el.nativeElement.style.setProperty('--chat-header-height', this.g.hideHeaderConversation? '0px': null)
2126
2126
  }
2127
2127
 
2128
2128
 
@@ -8,6 +8,7 @@
8
8
 
9
9
  <!-- HEADER -->
10
10
  <chat-conversation-header
11
+ *ngIf="!g?.hideHeaderConversation"
11
12
  [idConversation]= "conversationWith"
12
13
  [senderId]="senderId"
13
14
  [soundEnabled]="g?.soundEnabled"
@@ -13,34 +13,36 @@
13
13
  bottom: var(--chat-footer-height) !important
14
14
  }
15
15
 
16
- :host-context(#chat21-conversations.full-screen-mode){
17
- --button-in-msg-padding: 10px 16px;
18
- #chat21-footer{
19
- left: 20%;
20
- right: 20%;
21
- }
22
-
23
- chat-conversation-content ::ng-deep{
24
- .attachment_container,
25
- .buttons-wrapper {
26
- justify-content: flex-start;
27
- }
28
-
29
- .button-in-message{
30
- padding: 14px 22px !important
16
+ @media(min-width:688px){
17
+ :host-context(#chat21-conversations.full-screen-mode){
18
+ --button-in-msg-padding: 10px 16px;
19
+ #chat21-footer{
20
+ left: 20%;
21
+ right: 20%;
31
22
  }
32
-
33
- }
34
-
35
- chat-conversation-footer ::ng-deep {
36
- .textarea-container {
37
- padding: 8px 24px;
38
- background-color: var(--chat-footer-background-color);
39
- border-radius: 28px;
23
+
24
+ chat-conversation-content ::ng-deep{
25
+ .attachment_container,
26
+ .buttons-wrapper {
27
+ justify-content: flex-start;
28
+ }
29
+
30
+ .button-in-message{
31
+ padding: 14px 22px !important
32
+ }
33
+
40
34
  }
41
- #hiddenFooter,
42
- #emoji-mart-container {
43
- bottom: calc(100% + 10px)
35
+
36
+ chat-conversation-footer ::ng-deep {
37
+ .textarea-container {
38
+ padding: 8px 24px;
39
+ background-color: var(--chat-footer-background-color);
40
+ border-radius: 28px;
41
+ }
42
+ #hiddenFooter,
43
+ #emoji-mart-container {
44
+ bottom: calc(100% + 10px)
45
+ }
44
46
  }
45
47
  }
46
48
  }
@@ -6,7 +6,7 @@
6
6
  .c21-header {
7
7
  overflow: hidden;
8
8
  width: 100%;
9
- height: 52px;
9
+ height: var(--chat-header-height);
10
10
  .c21-header-button {
11
11
  .c21-close-button.c21-small {
12
12
  width: 31px;
@@ -15,7 +15,7 @@
15
15
  .c21-header {
16
16
  overflow: hidden;
17
17
  width: 100%;
18
- height: 52px;
18
+ height: var(--chat-header-height);
19
19
  position: relative;
20
20
  margin: 0;
21
21
  padding: 0;
@@ -64,7 +64,7 @@
64
64
 
65
65
  .c21-header-container{
66
66
  position: relative;
67
- height: 52px;
67
+ height: 100%;
68
68
  width: 100%;
69
69
  margin: 0 auto;
70
70
 
@@ -12,7 +12,7 @@
12
12
  .c21-header {
13
13
  overflow: hidden;
14
14
  width: 100%;
15
- height: 52px;
15
+ height: var(--chat-header-height);
16
16
  .c21-header-button {
17
17
  .c21-close-button.c21-small {
18
18
  width: 31px;
@@ -760,13 +760,19 @@ export class GlobalSettingsService {
760
760
  TEMP = tiledeskSettings['fullscreenMode'];
761
761
  // this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > fullscreenMode:: ', TEMP);
762
762
  if (TEMP !== undefined) {
763
- globals.fullscreenMode = TEMP;
763
+ globals.fullscreenMode = (TEMP === true) ? true : false;
764
764
  // globals.setParameter('fullscreenMode', TEMP);
765
765
  }
766
766
  TEMP = tiledeskSettings['hideHeaderCloseButton'];
767
767
  // this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > hideHeaderCloseButton:: ', TEMP);
768
768
  if (TEMP !== undefined) {
769
- globals.hideHeaderCloseButton = TEMP;
769
+ globals.hideHeaderCloseButton = (TEMP === true) ? true : false;
770
+ // globals.setParameter('hideHeaderCloseButton', TEMP);
771
+ }
772
+ TEMP = tiledeskSettings['hideHeaderConversation'];
773
+ // this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > hideHeaderCloseButton:: ', TEMP);
774
+ if (TEMP !== undefined) {
775
+ globals.hideHeaderConversation = (TEMP === true) ? true : false;
770
776
  // globals.setParameter('hideHeaderCloseButton', TEMP);
771
777
  }
772
778
  TEMP = tiledeskSettings['themeColor'];
@@ -1510,6 +1516,11 @@ export class GlobalSettingsService {
1510
1516
  globals.hideHeaderCloseButton = stringToBoolean(TEMP);
1511
1517
  }
1512
1518
 
1519
+ TEMP = getParameterByName(windowContext, 'tiledesk_hideHeaderConversation');
1520
+ if (TEMP) {
1521
+ globals.hideHeaderConversation = stringToBoolean(TEMP);
1522
+ }
1523
+
1513
1524
  TEMP = getParameterByName(windowContext, 'tiledesk_themeColor');
1514
1525
  if (TEMP) {
1515
1526
  const themecolor = stringToBoolean(TEMP);
@@ -28,6 +28,8 @@
28
28
 
29
29
  --bkg-color-info-message: rgba(24, 119, 242, 0.1);
30
30
 
31
+ --chat-header-height: 52px;
32
+
31
33
  --chat-footer-height: 64px;
32
34
  --chat-footer-logo-height: 30px;
33
35
  --chat-footer-border-radius: 16px;
@@ -135,7 +135,6 @@ export class Globals {
135
135
  userEmail: string;
136
136
  widgetTitle: string;
137
137
  fullscreenMode: boolean;
138
- hideHeaderCloseButton: boolean;
139
138
  themeColor: string;
140
139
  themeColorOpacity: number;
141
140
  themeForegroundColor: string;
@@ -161,6 +160,8 @@ export class Globals {
161
160
  baloonShape: string;
162
161
  isLogEnabled: boolean;
163
162
  openExternalLinkButton: boolean;
163
+ hideHeaderConversation: boolean
164
+ hideHeaderCloseButton: boolean;
164
165
  hideHeaderConversationOptionsMenu: boolean;
165
166
  hideCloseConversationOptionMenu: boolean;
166
167
  hideSettings: boolean;
@@ -291,9 +292,6 @@ export class Globals {
291
292
  * average response time of his team (if 'dynamicWaitTimeReply' is
292
293
  * false the WAITING_TIME_NOT_FOUND will always be displayed)
293
294
  * is set to true for backward compatibility with old projects */
294
- this.hideHeaderCloseButton = false;
295
- /** Hide the close button in the widget header. Permitted values: true,
296
- false. The default value is false. */
297
295
  this.fullscreenMode = false;
298
296
  /** if it is true, the chat window is open in fullscreen mode. Permitted
299
297
  values: true, false. Default value : false */
@@ -336,6 +334,12 @@ export class Globals {
336
334
  this.isLogEnabled = false;
337
335
  // this.parameters['isLogEnabled'] = false;
338
336
  this.openExternalLinkButton = true;
337
+ /** Hide the header conversation Permitted values: true,
338
+ false. The default value is false. */
339
+ this.hideHeaderConversation= false;
340
+ /** Hide the close button in the widget header. Permitted values: true,
341
+ false. The default value is false. */
342
+ this.hideHeaderCloseButton = false;
339
343
  /** enable to hide/show upper-right header conversation options menu */
340
344
  this.hideHeaderConversationOptionsMenu = false;
341
345
  /** enable to close a conversation from upper-right header menu */
@@ -534,7 +538,7 @@ export class Globals {
534
538
  'fullscreenMode': this.fullscreenMode,
535
539
  'filterByRequester': this.filterByRequester,
536
540
  'hideHeaderConversationOptionsMenu': this.hideHeaderConversationOptionsMenu, 'hideHeaderCloseButton': this.hideHeaderCloseButton,
537
- 'hideCloseConversationOptionMenu': this.hideCloseConversationOptionMenu,
541
+ 'hideCloseConversationOptionMenu': this.hideCloseConversationOptionMenu, 'hideHeaderConversation': this.hideHeaderConversation,
538
542
  'hideSettings': this.hideSettings,
539
543
  'isLogEnabled': this.isLogEnabled,
540
544
  'isOpen': this.isOpen, 'isShown': this.isShown,
@@ -1249,6 +1249,13 @@
1249
1249
  window.Tiledesk('restart')
1250
1250
  }
1251
1251
 
1252
+ function onClickHideHeaderConversation(){
1253
+ let status = document.querySelector('input[name="hideHeaderConversation"]:checked').value
1254
+ window.tiledeskSettings['hideHeaderConversation'] = stringToBoolean(status)
1255
+ console.log('onClickHideHeaderConversation: status-->',window.tiledeskSettings);
1256
+ window.Tiledesk('restart')
1257
+ }
1258
+
1252
1259
  function onClickHideHeaderCloseButton(){
1253
1260
  let status = document.querySelector('input[name="hideHeaderCloseButton"]:checked').value
1254
1261
  window.tiledeskSettings['hideHeaderCloseButton'] = stringToBoolean(status)
@@ -2245,6 +2252,16 @@
2245
2252
 
2246
2253
 
2247
2254
  <div><h3 style="line-height: 0.3;">MANAGE <em><strong>CONVERSATION DETAIL</strong></em></h3></div>
2255
+ <div class="row">
2256
+ <div class="col-md-5 formElement"><span><em><strong>hideHeaderConversation</strong></em></span></div>
2257
+ <div class="col-md-5">
2258
+ <input class="form-check-input" type="radio" name="hideHeaderConversation" value="true"><label>True</label>
2259
+ <input class="form-check-input" type="radio" name="hideHeaderConversation" value="false" checked><label>False</label>
2260
+ </div>
2261
+ <div class="col-md-2">
2262
+ <button class="btn btn-light" onclick="onClickHideHeaderConversation()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
2263
+ </div>
2264
+ </div>
2248
2265
  <div class="row">
2249
2266
  <div class="col-md-5 formElement"><span><em><strong>hideHeaderCloseButton</strong></em></span></div>
2250
2267
  <div class="col-md-5">