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

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.
Files changed (20) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/src/app/app.component.ts +2 -0
  4. package/src/app/component/conversation-detail/conversation/conversation.component.scss +34 -1
  5. package/src/app/component/conversation-detail/conversation/conversation.component.ts +12 -9
  6. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.html +3 -1
  7. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.scss +6 -15
  8. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html +13 -8
  9. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +15 -15
  10. package/src/app/component/conversation-detail/conversation-header/conversation-header.component.html +4 -4
  11. package/src/app/component/conversation-detail/conversation-header/conversation-header.component.ts +3 -3
  12. package/src/app/component/home/home.component.scss +1 -1
  13. package/src/app/component/message/buttons/action-button/action-button.component.scss +4 -3
  14. package/src/app/component/message/buttons/link-button/link-button.component.scss +3 -2
  15. package/src/app/component/message/buttons/text-button/text-button.component.scss +3 -2
  16. package/src/app/providers/global-settings.service.ts +9 -9
  17. package/src/app/sass/_variables.scss +5 -2
  18. package/src/app/utils/constants.ts +1 -1
  19. package/src/assets/twp/index-dev.html +21 -13
  20. package/src/iframe-style.css +24 -33
package/CHANGELOG.md CHANGED
@@ -6,6 +6,14 @@
6
6
  ### **Copyrigth**:
7
7
  *Tiledesk SRL*
8
8
 
9
+ # 5.1.0-rc22
10
+ - **changed**: footer UI if fullscreenMode is enabled
11
+ - **changed**: buttons alignment if fullscreenMode is enabled
12
+ - **changed**: animation while increase/descrease widget size
13
+
14
+ # 5.1.0-rc21
15
+ - **bug-fixed**: shadow is visible while decrease widget size
16
+
9
17
  # 5.1.0-rc20
10
18
  - **added**: fontFamilySource settings variable
11
19
  - **added**: --font-family-bubble-message as variable to manage custom font
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-rc20",
4
+ "version": "5.1.0-rc22",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -2120,6 +2120,8 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
2120
2120
  this.el.nativeElement.style.setProperty('--button-in-msg-font-size', this.g.buttonFontSize)
2121
2121
  this.el.nativeElement.style.setProperty('--font-size-bubble-message', this.g.fontSize)
2122
2122
  this.el.nativeElement.style.setProperty('--font-family-bubble-message', this.g.fontFamily)
2123
+ this.el.nativeElement.style.setProperty('--button-in-msg-font-family', this.g.fontFamily)
2124
+
2123
2125
 
2124
2126
  }
2125
2127
 
@@ -13,6 +13,38 @@
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
31
+ }
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;
40
+ }
41
+ #hiddenFooter,
42
+ #emoji-mart-container {
43
+ bottom: calc(100% + 10px)
44
+ }
45
+ }
46
+ }
47
+
16
48
  // ============= CSS #chat21-conversation-component ================= //
17
49
  #chat21-conversation-component {
18
50
  // background-color: #ffffff;
@@ -58,7 +90,7 @@
58
90
  font-weight: 500;
59
91
  line-height: 22px;
60
92
 
61
- font-family: var(--font-family);
93
+ font-family: var(--font-family-powered-by);
62
94
  letter-spacing: -0.24px;
63
95
  -webkit-font-smoothing: antialiased;
64
96
 
@@ -89,6 +121,7 @@
89
121
  left: 0px;
90
122
  right: 0px;
91
123
  margin: 0px;
124
+ margin: 12px 8px;
92
125
  // padding: 0;
93
126
 
94
127
  // box-shadow: 0 -1px 0px 0px $trasp-light-gray;
@@ -1018,6 +1018,12 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
1018
1018
  /** CALLED BY: conv-header component */
1019
1019
  onCloseWidgetFN() {
1020
1020
  //this.g.setParameter('activeConversation', null, false);
1021
+ /** remove Min/Max/fullscreen css classes */
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')
1026
+
1021
1027
  this.onCloseWidget.emit();
1022
1028
  }
1023
1029
  /** CALLED BY: conv-header component */
@@ -1072,18 +1078,15 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
1072
1078
  if(mode==='max'){
1073
1079
  tiledeskDiv.classList.add('increaseSize')
1074
1080
  tiledeskDiv.classList.remove('decreaseSize')
1075
- tiledeskDiv.classList.remove('fullscreen')
1076
- this.g.fullscreenMode = false
1081
+ tiledeskDiv.classList.remove('top')
1077
1082
  }else if(mode==='min'){
1078
1083
  tiledeskDiv.classList.add('decreaseSize')
1079
1084
  tiledeskDiv.classList.remove('increaseSize')
1080
- tiledeskDiv.classList.remove('fullscreen')
1081
- this.g.fullscreenMode = false
1082
- }else if(mode=== 'fullscreen'){
1083
- tiledeskDiv.classList.add('fullscreen')
1085
+ tiledeskDiv.classList.remove('top')
1086
+ }else if(mode=== 'top'){
1087
+ tiledeskDiv.classList.add('top')
1084
1088
  tiledeskDiv.classList.remove('increaseSize')
1085
1089
  tiledeskDiv.classList.remove('decreaseSize')
1086
- this.g.fullscreenMode = true
1087
1090
 
1088
1091
  }
1089
1092
  this.isMenuShow = false;
@@ -1126,8 +1129,8 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
1126
1129
  case HEADER_MENU_OPTION.MINIMIZE:
1127
1130
  this.onWidgetSizeChange('min')
1128
1131
  break;
1129
- case HEADER_MENU_OPTION.FULLSCREEN:
1130
- this.onWidgetSizeChange('fullscreen')
1132
+ case HEADER_MENU_OPTION.TOP:
1133
+ this.onWidgetSizeChange('top')
1131
1134
  break;
1132
1135
  }
1133
1136
  }
@@ -1,7 +1,9 @@
1
1
  <div class="audio-recorder">
2
2
  <button *ngIf="audioUrl" (click)="deleteRecording()">
3
3
  <span class="v-align-center">
4
- <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px"><path d="M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm80-160h80v-360h-80v360Zm160 0h80v-360h-80v360Z"/></svg>
4
+ <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px">
5
+ <path d="M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm80-160h80v-360h-80v360Zm160 0h80v-360h-80v360Z"/>
6
+ </svg>
5
7
  <!-- <i class="material-icons">delete_outline</i> -->
6
8
  </span>
7
9
  </button>
@@ -1,19 +1,10 @@
1
-
2
- @font-face {
3
- font-family: 'Material Icons';
4
- src: url('https://fonts.googleapis.com/icon?family=Material+Icons');
5
- }
6
-
7
- .material-icons.mic_none::before {
8
- content: 'mic_none';
9
- }
10
-
11
1
  .audio-recorder {
12
2
  text-align: center;
13
3
  margin: 0px;
14
4
  display: inline-flex;
15
5
  align-items: center;
16
- justify-content: center;
6
+ // justify-content: center;
7
+ justify-content: space-between;
17
8
  height: 100%;
18
9
  width: 100%;
19
10
  float: left;
@@ -22,8 +13,8 @@
22
13
 
23
14
  ::ng-deep chat-audio.test {
24
15
  display: flex;
25
- width: 80%;
26
- margin: 8px 0;
16
+ width: 90%;
17
+ // margin: 8px 0;
27
18
  pointer-events: auto;
28
19
  border-radius: var(--chat-footer-border-radius);
29
20
  background-color: var(--chat-footer-background-color);
@@ -52,10 +43,9 @@ button {
52
43
  background-color: transparent;
53
44
  color: var(--icon-fill-color);
54
45
  fill: var(--icon-fill-color);
55
- height: var(--chat-footer-height);
46
+ // height: var(--chat-footer-height);
56
47
 
57
48
  display: flex;
58
- align-self: flex-end;
59
49
  // margin: 0 8px;
60
50
  width: 34px;
61
51
  text-align: center;
@@ -75,6 +65,7 @@ button {
75
65
  justify-content: center;
76
66
  align-items: center;
77
67
  padding: 0px;
68
+ z-index: 0;
78
69
  }
79
70
 
80
71
  .mic-button svg {
@@ -27,8 +27,8 @@
27
27
  <!-- ICON ATTACHMENT -->
28
28
  <label *ngIf="showAttachmentFooterButton" tabindex="1502" aria-label="allegati" for="chat21-file" class="chat21-textarea-button" [class.active]="!isFilePendingToUpload && !hideTextReply" id="chat21-start-upload-doc">
29
29
  <span class="v-align-center">
30
- <svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24" viewBox="0 0 24 24" >
31
- <path d="M18.4,13.2l-2.6,4.5c-1.5,2.6-4.9,3.6-7.6,2c-2.6-1.5-3.6-4.9-2-7.6l3.9-6.7c1.1-1.9,3.6-2.6,5.5-1.5 c1.9,1.1,2.6,3.6,1.5,5.5l-3.3,5.7c-0.7,1.3-2.3,1.7-3.6,1c-1.3-0.7-1.7-2.3-1-3.6l2-3.4c0.2-0.3,0.6-0.5,1-0.3s0.5,0.6,0.3,1 l-2,3.4c-0.3,0.5-0.2,1.1,0.3,1.5c0.4,0.4,1.1,0.4,1.5,0c0.1-0.1,0.2-0.2,0.2-0.3l3.3-5.7c0.7-1.2,0.3-2.8-1-3.5 c-1.2-0.7-2.8-0.3-3.5,1l-3.9,6.7C6.4,14.9,7,17.4,9,18.5c1.9,1.1,4.4,0.5,5.6-1.5l2.6-4.5c0.2-0.3,0.6-0.5,1-0.3 C18.5,12.5,18.6,12.9,18.4,13.2L18.4,13.2z"/>
30
+ <svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24" viewBox="0 0 24 24" fill="currentColor">
31
+ <path d="M9.9,22.7c0,0-.1,0-.2,0-1.9.3-3.7-.2-5.2-1.4-3-2.3-3.6-6.4-1.4-9.5L9.5,2.5c.4-.5,1.1-.6,1.6-.3.5.4.6,1.1.3,1.6l-6.5,9.4c-1.4,2-1,4.8.9,6.3,1,.8,2.2,1.1,3.5.9,1.3-.2,2.4-.9,3.1-1.9l6-8.7c.9-1.2.6-3-.6-3.9-.6-.5-1.4-.6-2.1-.5-.8.1-1.4.5-1.9,1.1l-5.8,8.2c-.3.5-.2,1.1.2,1.5.2.2.5.3.8.2.3,0,.6-.2.7-.4l4.7-6.2c.4-.5,1.1-.6,1.6-.2.5.4.6,1.1.2,1.6l-4.7,6.2c-.5.7-1.4,1.2-2.3,1.3-.9.1-1.8-.2-2.5-.7-1.4-1.1-1.6-3.1-.6-4.6l5.8-8.2c.8-1.1,2-1.9,3.4-2.1,1.4-.2,2.7.1,3.8,1,2.2,1.7,2.7,4.8,1.1,7.1l-6,8.7c-1.1,1.5-2.6,2.5-4.4,2.8h0Z"/>
32
32
  </svg>
33
33
  </span>
34
34
  <input
@@ -47,11 +47,16 @@
47
47
  <!-- ICON EMOJII -->
48
48
  <label *ngIf="showEmojiFooterButton" tabindex="1504" aria-label="emojii" for="chat21-emojii" class="chat21-textarea-button" [class.active]="!isFilePendingToUpload && !hideTextReply" id="chat21-emoticon-picker" (click)="onEmojiiPickerClicked()">
49
49
  <span class="v-align-center">
50
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
51
- <path d="M0,0H20.57V20.57H0V0Z" fill="none"/>
50
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="currentColor">
51
+ <path stroke-width=".4px" stroke="currentColor" d="M12,20.8c-5.1,0-9.3-4.2-9.3-9.3S6.9,2.2,12,2.2s9.3,4.2,9.3,9.3-4.2,9.3-9.3,9.3ZM12,3.6c-4.4,0-7.9,3.6-7.9,7.9s3.6,7.9,7.9,7.9,7.9-3.6,7.9-7.9-3.6-7.9-7.9-7.9Z"/>
52
+ <path stroke-width=".4px" stroke="currentColor" d="M12,17.2c-2.7,0-4.3-1.9-4.6-2.3-.2-.3-.2-.7.1-1s.7-.2,1,.1c.1.2,1.4,1.8,3.5,1.8s2.2,0,3.5-1.8c.2-.3.7-.4,1-.1s.4.7.1,1c-1.7,2.2-4.1,2.3-4.6,2.3Z"/>
53
+ <path d="M8.7,10.9c-.9,0-1.6-.7-1.6-1.6s.7-1.6,1.6-1.6,1.6.7,1.6,1.6-.7,1.6-1.6,1.6Z"/>
54
+ <path d="M15.5,10.9c-.9,0-1.6-.7-1.6-1.6s.7-1.6,1.6-1.6,1.6.7,1.6,1.6-.7,1.6-1.6,1.6Z"/>
55
+
56
+ <!-- <path d="M0,0H20.57V20.57H0V0Z" fill="none"/>
52
57
  <circle cx="15.02" cy="9.86" r="1.29"/>
53
58
  <circle cx="9.02" cy="9.86" r="1.29"/>
54
- <path d="M12.02,15.43c-1.27,0-2.36-.69-2.96-1.71h-1.43c.69,1.76,2.39,3,4.39,3s3.7-1.24,4.39-3h-1.43c-.6,1.02-1.69,1.71-2.96,1.71Zm0-12C7.28,3.43,3.45,7.27,3.45,12s3.83,8.57,8.56,8.57,8.58-3.84,8.58-8.57S16.75,3.43,12.01,3.43Zm0,15.43c-3.79,0-6.86-3.07-6.86-6.86s3.07-6.86,6.86-6.86,6.86,3.07,6.86,6.86-3.07,6.86-6.86,6.86Z"/>
59
+ <path d="M12.02,15.43c-1.27,0-2.36-.69-2.96-1.71h-1.43c.69,1.76,2.39,3,4.39,3s3.7-1.24,4.39-3h-1.43c-.6,1.02-1.69,1.71-2.96,1.71Zm0-12C7.28,3.43,3.45,7.27,3.45,12s3.83,8.57,8.56,8.57,8.58-3.84,8.58-8.57S16.75,3.43,12.01,3.43Zm0,15.43c-3.79,0-6.86-3.07-6.86-6.86s3.07-6.86,6.86-6.86,6.86,3.07,6.86,6.86-3.07,6.86-6.86,6.86Z"/> -->
55
60
  </svg>
56
61
  </span>
57
62
  </label>
@@ -85,8 +90,8 @@
85
90
  <!-- ICON SEND -->
86
91
  <div *ngIf="(textInputTextArea !== '' && !isStopRec) || !showAudioRecorderFooterButton" tabindex="-1" class="chat21-textarea-button" [class.disabled]="showAlertEmoji || showAlertUrl" [class.active]="textInputTextArea && !hideTextReply" id="chat21-button-send" (click)="onSendPressed($event)">
87
92
  <span class="v-align-center">
88
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="24" width="24" viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
89
- <path d="M1.8,18.9V1.7L22,10.3L1.8,18.9z M3.9,15.6l12.6-5.4L3.9,4.9v3.7l6.4,1.6l-6.4,1.6V15.6z M3.9,15.6V4.9v7V15.6z"/>
93
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="24" width="24" viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve" fill="currentColor">
94
+ <path class="cls-1" d="M1.8,20.6V3.4l20.2,8.6L1.8,20.6ZM3.9,17.3l12.6-5.4L3.9,6.6v3.7l6.4,1.6-6.4,1.6v3.8ZM3.9,17.3V6.6v10.7Z"/>
90
95
  </svg>
91
96
  </span>
92
97
  </div>
@@ -107,7 +112,7 @@
107
112
  <!-- EMOJII PICKER-->
108
113
  <div [style.visibility]="isEmojiiPickerShow?'visible':'hidden'" class="emoji-container" id="emoji-mart-container" #emoji_mart_container>
109
114
  <!-- <ng-container #emojii_container></ng-container> -->
110
- <emoji-mart id="emoji-mart"
115
+ <emoji-mart id="emoji-mart"
111
116
  *ngIf="showEmojiPicker"
112
117
  class="emoji-mart"
113
118
  [showPreview]="emojiiOptions?.showPreview"
@@ -6,9 +6,8 @@
6
6
  display: flex;
7
7
  // width: 100%;
8
8
  align-items: center;
9
- gap: 8px;
10
9
  justify-content: space-between;
11
- margin: 0px 8px;
10
+ gap: 8px;
12
11
 
13
12
  //if attachment icon OR emoji icon is not in DOM -> increment textarea width
14
13
  &:has(:not(#chat21-start-upload-doc), :not(#chat21-emoticon-picker)) .visible-text-area {
@@ -23,15 +22,15 @@
23
22
 
24
23
  .icons-container{
25
24
  display: flex;
26
- align-self: flex-end;
25
+ // align-self: flex-end;
27
26
  // margin-left: 8px;
28
27
  // margin-right: 8px;
29
- gap: 8px;
28
+ gap: 4px;
30
29
  }
31
30
 
32
31
  .visible-text-area {
33
32
  width: 70%;
34
- margin: 8px 0px;
33
+ // margin: 12px 0px;
35
34
  pointer-events: auto;
36
35
  border-radius: var(--chat-footer-border-radius);
37
36
  background-color: var(--chat-footer-background-color);
@@ -44,9 +43,10 @@
44
43
  }
45
44
 
46
45
  .chat21-textarea-button {
47
- fill: var(--icon-fill-color);
46
+ // fill: var(--icon-fill-color);
47
+ color: var(--icon-fill-color);
48
48
  pointer-events: auto;
49
- height: var(--chat-footer-height);
49
+ // height: var(--chat-footer-height);
50
50
  bottom: 22px;
51
51
  opacity: 0.3;
52
52
  cursor: initial;
@@ -206,7 +206,7 @@ textarea:active{
206
206
 
207
207
  #chat21-button-send {
208
208
  display: flex;
209
- align-self: flex-end;
209
+ // align-self: flex-end;
210
210
  // margin: 0 8px;
211
211
  width: 34px;
212
212
  text-align: center;
@@ -218,7 +218,7 @@ textarea:active{
218
218
  width: 34px;
219
219
  text-align: center;
220
220
  justify-content: center;
221
- height: var(--chat-footer-height);
221
+ // height: var(--chat-footer-height);
222
222
  &.active{
223
223
  width: 100%;
224
224
  }
@@ -322,7 +322,7 @@ textarea:active{
322
322
  font-weight: 500;
323
323
  line-height: 22px;
324
324
 
325
- font-family: var(--font-family);
325
+ font-family: var(--font-family-powered-by);
326
326
  letter-spacing: 0.24px;
327
327
  -webkit-font-smoothing: antialiased;
328
328
  padding: 4px 12px;
@@ -392,20 +392,20 @@ textarea:active{
392
392
 
393
393
 
394
394
  .emoji-container {
395
- height: 312px;
395
+ height: 319px;
396
396
  position: absolute;
397
397
  overflow: hidden;
398
- width: 89%;
398
+ width: 338px;
399
399
  bottom: 100%;
400
400
  z-index: 10;
401
401
  left: 10px;
402
- box-shadow: 0px -15px 20px -13px rgba(0, 0, 0 , 0.38);
403
- -webkit-box-shadow: 0px -15px 20px -13px rgba(0, 0, 0 , 0.38);
402
+ box-shadow: 0 -4px 14px -13px rgba(0, 0, 0 , 0.38);
403
+ -webkit-box-shadow: 0 -4px 14px -13px rgba(0, 0, 0 , 0.38);
404
404
  }
405
405
  .emoji-mart {
406
406
  position: absolute;
407
407
  // bottom: 40px;
408
408
  // left: 10px;
409
409
  border: none;
410
- margin: -2px -2px 0px;
410
+ // margin: -2px -2px 0px;
411
411
  }
@@ -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==='full' || fullscreenMode" (click)="onChangeSize('min')">
135
+ <div class="c21-header-button c21-right" *ngIf="heightStatus==='max' || heightStatus==='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>
@@ -141,8 +141,8 @@
141
141
  <span class="label-menu-item">{{ translationMap?.get('MINIMIZE') }}</span>
142
142
  </div>
143
143
 
144
- <!-- FULLSCREEN -->
145
- <div class="c21-header-button c21-right" *ngIf="heightStatus!=='full' && !fullscreenMode" (click)="onChangeSize('full')">
144
+ <!-- ICON TOP -->
145
+ <!-- <div class="c21-header-button c21-right" *ngIf="heightStatus!=='top' && !fullscreenMode" (click)="onChangeSize('top')">
146
146
  <svg role="img" aria-labelledby="altIconTitle" fill="none" xmlns="http://www.w3.org/2000/svg" transform="matrix(-1,0,0,1,0,0)"
147
147
  width="17" height="17" viewBox="0 0 17 17">
148
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"/>
@@ -150,7 +150,7 @@
150
150
  <title id="altIconTitle">{{ translationMap?.get('FULLSCREEN') }}</title>
151
151
  </svg>
152
152
  <span class="label-menu-item">{{ translationMap?.get('FULLSCREEN') }}</span>
153
- </div>
153
+ </div> -->
154
154
 
155
155
  <!-- ICON LOGOUT -->
156
156
  <div class="c21-header-button c21-right" *ngIf="!hideSignOutOptionMenu" (click)="signOut()">
@@ -58,8 +58,8 @@ export class ConversationHeaderComponent implements OnInit, OnChanges {
58
58
  private API_URL: string;
59
59
  private logger: LoggerService = LoggerInstance.getInstance()
60
60
  constructor(
61
- public g: Globals,
62
- public appConfigService: AppConfigService,) {
61
+ public appConfigService: AppConfigService
62
+ ) {
63
63
  this.API_URL = this.appConfigService.getConfig().apiUrl;
64
64
  }
65
65
 
@@ -110,7 +110,7 @@ export class ConversationHeaderComponent implements OnInit, OnChanges {
110
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
- if(status === 'full') this.onMenuOptionClick.emit(HEADER_MENU_OPTION.FULLSCREEN)
113
+ if(status === 'top') this.onMenuOptionClick.emit(HEADER_MENU_OPTION.TOP)
114
114
  this.onMenuOptionShow.emit(false)
115
115
  }
116
116
  toggleSound() {
@@ -301,7 +301,7 @@
301
301
  font-weight: 500;
302
302
  line-height: 22px;
303
303
 
304
- font-family: var(--font-family);
304
+ font-family: var(--font-family-powered-by);
305
305
  letter-spacing: 0.24px;
306
306
  -webkit-font-smoothing: antialiased;
307
307
 
@@ -5,12 +5,13 @@
5
5
  --hoverTextColor: #{var(--blue)};
6
6
  --buttonFontSize: #{var(--button-in-msg-font-size)};
7
7
  --max-width: #{var(--button-in-msg-max-width)};
8
- --fontFamily: #{var(--font-family)};
8
+ --padding: #{var(--button-in-msg-padding)};
9
+ --fontFamily: #{var(--button-in-msg-font-family)};
9
10
  }
10
11
 
11
12
  .button-in-msg {
12
- padding: 8px 16px!important;
13
- position: relative;
13
+ padding: var(--padding);
14
+ // position: relative;
14
15
  max-width: var(--max-width);
15
16
  min-width: inherit;
16
17
  cursor: pointer;
@@ -5,11 +5,12 @@
5
5
  --hoverTextColor: #{var(--blue)};
6
6
  --buttonFontSize: #{var(--button-in-msg-font-size)};
7
7
  --max-width: #{var(--button-in-msg-max-width)};
8
- --font-family: #{var(--font-family)};
8
+ --padding: #{var(--button-in-msg-padding)};
9
+ --font-family: #{var(--button-in-msg-font-family)};
9
10
  }
10
11
 
11
12
  .button-in-msg {
12
- padding: 8px 16px!important;
13
+ padding: var(--padding);
13
14
  position: relative;
14
15
  max-width: var(--max-width);
15
16
  min-width: inherit;
@@ -5,13 +5,14 @@
5
5
  --hoverTextColor: #{var(--blue)};
6
6
  --buttonFontSize: #{var(--button-in-msg-font-size)};
7
7
  --max-width: #{var(--button-in-msg-max-width)};
8
- --font-family: #{var(--font-family)};
8
+ --padding: #{var(--button-in-msg-padding)};
9
+ --font-family: #{var(--button-in-msg-font-family)};
9
10
  }
10
11
 
11
12
 
12
13
  .button-in-msg {
13
14
 
14
- padding: 8px 16px!important;
15
+ padding: var(--padding);
15
16
  position: relative;
16
17
  max-width: var(--max-width);
17
18
  min-width: inherit;
@@ -387,20 +387,20 @@ export class GlobalSettingsService {
387
387
  }
388
388
  }
389
389
  loadFont(family: string, href: string,) {
390
- // controlla se già esiste
391
- if (document.querySelector(`link[data-font='${family}']`)) {
392
- return;
390
+ const mainFont = family.split(",")[0].replace(/['"]/g, "").trim(); // es. "Montserrat"
391
+
392
+ if (document.querySelector(`link[data-font='${mainFont}']`)) {
393
+ return;
393
394
  }
394
-
395
+
395
396
  const link = document.createElement('link');
396
397
  link.rel = 'stylesheet';
397
398
  link.href = href;
398
- link.setAttribute('data-font', family); // marker per non duplicare
399
+ link.setAttribute('data-font', mainFont); // marker pulito
399
400
  document.head.appendChild(link);
400
-
401
- // aggiorna la variabile CSS
402
- document.documentElement.style.setProperty('--font-family', `'${family}', sans-serif`);
403
- }
401
+
402
+ document.documentElement.style.setProperty('--font-family', family);
403
+ }
404
404
  /**
405
405
  * A: setVariablesFromService
406
406
  */
@@ -20,13 +20,15 @@
20
20
 
21
21
  --border-radius-bubble-message: 20px;
22
22
  --button-in-msg-font-size: 15px;
23
+ --button-in-msg-font-family: 'Roboto','Google Sans', Helvetica, Arial, sans-serif;
23
24
  --button-in-msg-max-width: 280px;
25
+ --button-in-msg-padding: 8px 16px;
24
26
 
25
27
  --max-width-images: 230px; //change also MAX_WIDTH_IMAGES in constants.ts
26
28
 
27
29
  --bkg-color-info-message: rgba(24, 119, 242, 0.1);
28
30
 
29
- --chat-footer-height: 56px;
31
+ --chat-footer-height: 64px;
30
32
  --chat-footer-logo-height: 30px;
31
33
  --chat-footer-border-radius: 16px;
32
34
  --chat-footer-background-color: #f6f7fb;
@@ -41,9 +43,10 @@
41
43
 
42
44
 
43
45
 
44
- --font-family: Mulish, sans-serif;
46
+ --font-family: 'Roboto','Google Sans', Helvetica, Arial, sans-serif; //Mulish, sans-serif;
45
47
  --font-family-bubble-message: 'Roboto','Google Sans', Helvetica, Arial, sans-serif;
46
48
  --font-family-callout: 'Helvetica Neue', 'Apple Color Emoji', Helvetica, Arial, sans-serif;
49
+ --font-family-powered-by: Mulish, sans-serif;
47
50
 
48
51
  --font-size-bubble-message: 1.4em
49
52
 
@@ -74,6 +74,6 @@ export const HEADER_MENU_OPTION = {
74
74
  RESTART : 'restart',
75
75
  MAXIMIZE : 'maximize',
76
76
  MINIMIZE : 'minimize',
77
- FULLSCREEN : 'fullscreen'
77
+ TOP : 'top'
78
78
  }
79
79
 
@@ -1361,9 +1361,6 @@
1361
1361
  window.Tiledesk('restart')
1362
1362
  }
1363
1363
 
1364
-
1365
-
1366
-
1367
1364
  function onClickFontSize(){
1368
1365
  let text = document.getElementById('fontSize').value
1369
1366
  text === ""? text= '1.4em': text
@@ -1372,6 +1369,17 @@
1372
1369
  window.Tiledesk('restart')
1373
1370
  }
1374
1371
 
1372
+ function onClickFontFamily(){
1373
+ let text = document.getElementById('fontFamily').value
1374
+ window.tiledeskSettings['fontFamily'] = text
1375
+
1376
+ let source = document.getElementById('fontFamilySource').value
1377
+ // text === ""? text= '1.4em': text
1378
+ window.tiledeskSettings['fontFamilySource'] = source
1379
+
1380
+ console.log('onClickFontFamily:',window.tiledeskSettings);
1381
+ window.Tiledesk('restart')
1382
+ }
1375
1383
 
1376
1384
  function onClickButtonFontSize(){
1377
1385
  let text = document.getElementById('buttonFontSize').value
@@ -1383,16 +1391,6 @@
1383
1391
 
1384
1392
 
1385
1393
 
1386
-
1387
-
1388
-
1389
-
1390
-
1391
-
1392
-
1393
-
1394
-
1395
-
1396
1394
 
1397
1395
  function onClickTestAll(){
1398
1396
  inputs = document.getElementsByTagName('input');
@@ -2455,6 +2453,16 @@
2455
2453
  <button class="btn btn-light" onclick="onClickFontSize()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
2456
2454
  </div>
2457
2455
  </div>
2456
+ <div class="row">
2457
+ <div class="col-md-5 formElement"><span><em><strong>fontFamily</strong></em></span></div>
2458
+ <div class="col-md-5 formElement">
2459
+ <input class="form-control col-sm-2" type="text" id="fontFamily" name="fontFamily" placeholder="Family">
2460
+ <input class="form-control col-sm-2" type="text" id="fontFamilySource" name="fontFamilySource" placeholder="Source">
2461
+ </div>
2462
+ <div class="col-md-2">
2463
+ <button class="btn btn-light" onclick="onClickFontFamily()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
2464
+ </div>
2465
+ </div>
2458
2466
 
2459
2467
 
2460
2468
  <div><h3 style="line-height: 0.3;">MANAGE <em><strong>BUTTON STYLES</strong></em></h3></div>
@@ -34,27 +34,7 @@
34
34
 
35
35
  }
36
36
 
37
- #tiledeskdiv.decreaseSize {
38
- /* transition: width 1s, height 1s; */
39
- transition: all 1s ease-out;
40
- width: var(--iframeMinWidth);
41
- height: var(--iframeMinHeight);
42
- /* animation: right-animate 1s ease infinite alternate; */
43
-
44
- }
45
-
46
- #tiledeskdiv.increaseSize {
47
- /* transition: width 1s, height 1s; */
48
- transition: all 3s ease-in;
49
- width: var(--iframeMaxWidth);
50
- height: var(--iframeMaxHeight);
51
- /* animation: right-animate 1s ease infinite alternate; */
52
-
53
- }
54
-
55
37
  #tiledeskdiv.fullscreen {
56
- /* transition: width 1s, height 1s; */
57
- transition: all 3s ease-in;
58
38
  right: 0px;
59
39
  left: 0px;
60
40
  top: 0px;
@@ -62,6 +42,17 @@
62
42
  width: 100%;
63
43
  height: 100%;
64
44
  }
45
+
46
+ #tiledeskdiv.top {
47
+ /* transition: width 1s, height 1s; */
48
+ /* transition: all 0.5s ease-in !important; */
49
+ position: fixed;
50
+ top: 50%;
51
+ left: 50%;
52
+ width: var(--iframeMaxWidth);
53
+ height: var(--iframeMaxHeight);
54
+ transform: translate(-50%, -50%);
55
+ }
65
56
 
66
57
 
67
58
  @keyframes right-animate {
@@ -110,30 +101,30 @@
110
101
  #tiledesk-container.open #tiledeskiframe {
111
102
  display: block;
112
103
  /*width: 376px;*/
113
- /* -webkit-animation: fade-in-shadow 0.4s ease-in 0.0s both;
114
- animation: fade-in-shadow 0.4s ease-in 0.0s both; */
115
- /* border-radius: 16px; */
116
- /* box-shadow: rgba(0, 18, 46, 0.16) 0px 8px 36px 0px; */
117
- /* margin: 10px; */
118
104
  }
119
105
  #tiledesk-container.open #tiledeskdiv.shadow {
120
106
  transition: box-shadow 0.8s ease-in;
121
107
  box-shadow: rgba(0, 0, 0, 0.16) 0px 8px 36px 0px; /*NEW GAB*/
122
108
  }
123
- /* @-webkit-keyframes fade-in-shadow {
124
- 0% { box-shadow: rgba(0, 0, 0, 0.0) 0 0 0px; }
125
- 100% { box-shadow: rgba(0, 0, 0, 0.1) 0 0 6px; }
126
- }
127
- @keyframes sk-bouncedelay {
128
- 0% { box-shadow: rgba(0, 0, 0, 0.0) 0 0 0px; }
129
- 100% { box-shadow: rgba(0, 0, 0, 0.1) 0 0 6px; }
130
- } */
109
+
131
110
 
132
111
  #tiledesk-container.closed #tiledeskiframe {
133
112
  display: block;
134
113
  box-shadow: none;
135
114
  }
136
115
 
116
+ #tiledesk-container.open #tiledeskdiv.decreaseSize {
117
+ transition: width 200ms, height 200ms, max-height 200ms, transform 300ms cubic-bezier(0, 1.2, 1, 1), opacity 83ms ease-out;
118
+ width: var(--iframeMinWidth);
119
+ height: var(--iframeMinHeight);
120
+ }
121
+
122
+ #tiledesk-container.open #tiledeskdiv.increaseSize {
123
+ /* transition: width 1s, height 1s; */
124
+ transition: width 200ms, height 200ms, max-height 200ms, transform 300ms cubic-bezier(0, 1.2, 1, 1), opacity 83ms ease-out;
125
+ width: var(--iframeMaxWidth);
126
+ height: var(--iframeMaxHeight);
127
+ }
137
128
 
138
129
  #tiledeskiframe .full-screen-mode {
139
130
  width: 100%;