@chat21/chat21-web-widget 5.1.1-rc1 → 5.1.2-rc6

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 (24) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/package.json +2 -2
  3. package/src/app/app.component.scss +10 -9
  4. package/src/app/app.component.ts +38 -10
  5. package/src/app/component/conversation-detail/conversation/conversation.component.scss +18 -18
  6. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.scss +1 -0
  7. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +12 -3
  8. package/src/app/component/home/home.component.scss +5 -3
  9. package/src/app/component/last-message/last-message.component.ts +61 -9
  10. package/src/app/component/launcher-button/launcher-button.component.html +1 -1
  11. package/src/app/component/message/avatar/avatar.component.scss +1 -1
  12. package/src/app/component/message/bubble-message/bubble-message.component.scss +1 -1
  13. package/src/app/component/message/buttons/action-button/action-button.component.scss +19 -14
  14. package/src/app/component/message/buttons/link-button/link-button.component.scss +18 -11
  15. package/src/app/component/message/buttons/text-button/text-button.component.scss +20 -11
  16. package/src/app/component/message/carousel/carousel.component.scss +25 -17
  17. package/src/app/component/message/text/text.component.html +1 -2
  18. package/src/app/component/message-attachment/message-attachment.component.html +7 -3
  19. package/src/app/component/message-attachment/message-attachment.component.scss +3 -2
  20. package/src/app/component/send-button/send-button.component.html +2 -2
  21. package/src/app/sass/_variables.scss +9 -4
  22. package/src/app/utils/globals.ts +7 -2
  23. package/src/app/utils/utils.ts +2 -0
  24. package/src/iframe-style.css +33 -7
package/CHANGELOG.md CHANGED
@@ -6,6 +6,37 @@
6
6
  ### **Copyrigth**:
7
7
  *Tiledesk SRL*
8
8
 
9
+
10
+ # 5.1.2-rc6
11
+ - **bug-fixed**: cannot upload xlsx files
12
+
13
+ # 5.1.2-rc5
14
+ - **bug-fixed**: css buttons and bubble sender
15
+
16
+ # 5.1.2-rc4
17
+ - **changed**: css sender fullname
18
+
19
+ # 5.1.2-rc3
20
+ - **changed**: disabled badge on launcher-button
21
+ - **bug-fixed**: fullscreen widget position
22
+ - **bug-fixed**: handleIframeHeight disappears when the widget is closed and a new message arrives
23
+ - **changed**: changed avatar size
24
+
25
+ # 5.1.2-rc2
26
+ - **bug-fixed**: set css carousel
27
+ - **changed**: set css top-size
28
+
29
+ # 5.1.2-rc1
30
+ - **bug-fixed**: set left alignment, border-round as uipath, removed animation on over
31
+ - **changed**: Leave the same text area in the intermediate size
32
+ - **bug-fixed**: shadow that appears suddenly
33
+ - **bug-fixed**: missing animation from intermediate to large
34
+ - **changed**: reduce and update padding and resolution of text area icons
35
+ - **bug-fixed**: check button padding in the header
36
+
37
+ # 5.1.1-rc2
38
+ - **bug-fixed**: marked update @types/marked
39
+
9
40
  # 5.1.1-rc1
10
41
  - **bug-fixed**: marked pipe not renders urls
11
42
 
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.1-rc1",
4
+ "version": "5.1.2-rc6",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -32,7 +32,6 @@
32
32
  "@ctrl/ngx-emoji-mart": "^9.2.0",
33
33
  "@ngx-translate/core": "^16.0.4",
34
34
  "@ngx-translate/http-loader": "^16.0.1",
35
- "@types/marked": "^4.0.3",
36
35
  "accept-language-parser": "^1.5.0",
37
36
  "bootstrap": "^5.1.3",
38
37
  "dayjs": "^1.11.7",
@@ -55,6 +54,7 @@
55
54
  "@angular/language-service": "^18.2.13",
56
55
  "@types/jasmine": "^3.6.11",
57
56
  "@types/jasminewd2": "~2.0.3",
57
+ "@types/marked": "^6.0.0",
58
58
  "@types/node": "^12.11.1",
59
59
  "codelyzer": "^6.0.0",
60
60
  "jasmine-core": "^3.8.0",
@@ -484,11 +484,11 @@ chat-root {
484
484
  /* CSS BOX CONTAINER */
485
485
  #chat21-conversations {
486
486
  position: absolute;
487
- left: 1px;
488
- right: 1px;
489
- top: 1px;
490
- bottom: 1px;
491
- border-radius: 16px;
487
+ left: 0px;
488
+ right: 0px;
489
+ top: 0px;
490
+ bottom: 0px;
491
+ // border-radius: 16px;
492
492
  overflow: hidden;
493
493
  background-color: transparent;
494
494
  // border: 1px solid #cccccc; //NEW GAB
@@ -510,9 +510,10 @@ chat-root {
510
510
  border-radius: 0px;
511
511
  }
512
512
  &.shadow{
513
- transition: box-shadow 0.8s ease-in;
514
- box-shadow: rgba(0, 0, 0, 0.16) 0px 8px 36px 0px; /*NEW GAB*/
513
+ // transition: box-shadow 0.8s ease-in;
514
+ // box-shadow: rgba(0, 0, 0, 0.16) 0px 8px 36px 0px; /*NEW GAB*/
515
515
  }
516
+
516
517
  }
517
518
 
518
519
 
@@ -620,8 +621,9 @@ chat-root {
620
621
  position: absolute;
621
622
  top: 0;
622
623
  left: 0;
623
- width: 100%;
624
+ width: calc(100% - 18px);
624
625
  height: 100%;
626
+ padding: 0 9px;
625
627
 
626
628
  .c21-header-button{
627
629
  display: block;
@@ -690,7 +692,6 @@ chat-root {
690
692
  padding: 0px;
691
693
  margin: 0px auto;
692
694
  overflow: auto;
693
-
694
695
  .c21-body-container {
695
696
  position: absolute;
696
697
  top: 0;
@@ -134,6 +134,9 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
134
134
  public uploadService: UploadService
135
135
  ){}
136
136
 
137
+
138
+
139
+
137
140
  ngOnInit(): void {
138
141
  this.logger.info('[APP-CONF]---------------- ngOnInit: APP.COMPONENT ---------------- ')
139
142
  this.initWidgetParamiters();
@@ -168,9 +171,9 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
168
171
  }
169
172
  } else {
170
173
  //widget closed
171
-
172
- let badgeNewConverstionNumber = that.conversationsHandlerService.countIsNew()
174
+ let badgeNewConverstionNumber = that.conversationsHandlerService.countIsNew()
173
175
  that.g.setParameter('conversationsBadge', badgeNewConverstionNumber);
176
+ // that.setBadgeNewConverstionNumber();
174
177
  }
175
178
  // that.manageTabNotification()
176
179
  // });
@@ -213,14 +216,13 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
213
216
  that.g.isOpenNewMessage = true;
214
217
  that.logger.debug('[APP-COMP] lastconversationnn', that.lastConversation)
215
218
  }
216
-
217
-
218
219
  let badgeNewConverstionNumber = that.conversationsHandlerService.countIsNew()
219
220
  that.g.setParameter('conversationsBadge', badgeNewConverstionNumber);
221
+ // that.setBadgeNewConverstionNumber();
220
222
  // }
221
223
  }
222
-
223
224
  that.triggerOnConversationUpdated(conversation);
225
+
224
226
  } else {
225
227
  this.logger.debug('[APP-COMP] oBSconversationChanged null: errorrr')
226
228
  return;
@@ -260,6 +262,22 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
260
262
  this.uploadService.initialize();
261
263
  }
262
264
 
265
+
266
+ saveBadgeNewConverstionNumber(){
267
+ let badgeNewConverstionNumber = this.conversationsHandlerService.countIsNew()
268
+ this.appStorageService.setItem('hiddenConversationsBadge', badgeNewConverstionNumber)
269
+ }
270
+
271
+ setBadgeNewConverstionNumber(){
272
+ let badgeNewConverstionNumber = this.conversationsHandlerService.countIsNew();
273
+ let hiddenConversationsBadge = this.appStorageService.getItem('hiddenConversationsBadge')
274
+ let newNumberBadge = badgeNewConverstionNumber - hiddenConversationsBadge;
275
+ this.logger.debug('[APP-COMP] setBadgeNewConverstionNumber: ', newNumberBadge, badgeNewConverstionNumber, hiddenConversationsBadge)
276
+ this.g.conversationsBadge = newNumberBadge;
277
+ this.g.setParameter('conversationsBadge', newNumberBadge);
278
+ }
279
+
280
+
263
281
  private initWidgetParamiters(){
264
282
  const that = this;
265
283
  const obsSettingsService = this.globalSettingsService.obsSettingsService.subscribe((resp) => {
@@ -1578,6 +1596,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
1578
1596
  this.logger.debug('[APP-COMP] widgetclosed:::', this.g.conversationsBadge, this.conversationsHandlerService.countIsNew())
1579
1597
  // this.g.isOpen = false;
1580
1598
  // this.g.setIsOpen(false);
1599
+ // this.setBadgeNewConverstionNumber();
1581
1600
  this.f21_close();
1582
1601
  }
1583
1602
 
@@ -1629,12 +1648,15 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
1629
1648
  // }
1630
1649
  // this.g.startFromHome = true;
1631
1650
  this.triggerOnOpenEvent();
1651
+
1632
1652
  } else {
1633
1653
  this.triggerOnCloseEvent();
1634
1654
  }
1635
1655
  //change status to the widget
1636
1656
  this.g.setIsOpen(!this.g.isOpen);
1637
1657
  this.appStorageService.setItem('isOpen', this.g.isOpen);
1658
+
1659
+ // this.saveBadgeNewConverstionNumber();
1638
1660
  }
1639
1661
 
1640
1662
  /**
@@ -2013,8 +2035,9 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
2013
2035
 
2014
2036
  onWidgetSizeChange(mode: 'min' | 'max' | 'top') {
2015
2037
  var tiledeskDiv = this.g.windowContext.window.document.getElementById('tiledeskdiv');
2016
- this.g.size = mode
2017
- const parent = tiledeskDiv.parentElement as HTMLElement | null;
2038
+ this.g.size = mode;
2039
+ let parent = tiledeskDiv.parentElement as HTMLElement | null;
2040
+
2018
2041
  if(mode==='max'){
2019
2042
  tiledeskDiv.classList.add('max-size')
2020
2043
  tiledeskDiv.classList.remove('min-size')
@@ -2158,16 +2181,21 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
2158
2181
  this.styleMapConversation.set('buttonTextColor', this.g.buttonTextColor)
2159
2182
  this.styleMapConversation.set('buttonHoverBackgroundColor',this.g.buttonHoverBackgroundColor)
2160
2183
  this.styleMapConversation.set('buttonHoverTextColor', this.g.buttonHoverTextColor)
2161
-
2162
2184
  this.styleMapConversation.set('iconColor', '#5f6368')
2163
2185
 
2164
2186
  this.el.nativeElement.style.setProperty('--button-in-msg-background-color', this.g.bubbleSentBackground)
2165
2187
  this.el.nativeElement.style.setProperty('--button-in-msg-font-size', this.g.buttonFontSize)
2188
+ this.el.nativeElement.style.setProperty('--button-in-msg-font-family', this.g.fontFamily)
2189
+ this.el.nativeElement.style.setProperty('--chat-header-height', this.g.hideHeaderConversation? '0px': null)
2166
2190
  this.el.nativeElement.style.setProperty('--font-size-bubble-message', this.g.fontSize)
2167
2191
  this.el.nativeElement.style.setProperty('--font-family-bubble-message', this.g.fontFamily)
2168
- this.el.nativeElement.style.setProperty('--button-in-msg-font-family', this.g.fontFamily)
2169
2192
 
2170
- this.el.nativeElement.style.setProperty('--chat-header-height', this.g.hideHeaderConversation? '0px': null)
2193
+
2194
+ this.styleMapConversation.set('buttonBackgroundColor', this.g.bubbleReceivedBackground)
2195
+ this.styleMapConversation.set('buttonTextColor', this.g.bubbleReceivedTextColor)
2196
+ this.styleMapConversation.set('buttonHoverBackgroundColor',this.g.bubbleSentBackground)
2197
+ this.styleMapConversation.set('buttonHoverTextColor', this.g.bubbleSentTextColor)
2198
+
2171
2199
  }
2172
2200
 
2173
2201
 
@@ -89,9 +89,7 @@
89
89
  left: 0px;
90
90
  right: 0px;
91
91
  margin: 0px;
92
- margin: 12px 8px;
93
- // padding: 0;
94
-
92
+ padding: 12px;
95
93
  // box-shadow: 0 -1px 0px 0px $trasp-light-gray;
96
94
  background: white;
97
95
  min-height: 40px;
@@ -185,11 +183,7 @@ dialog:-internal-dialog-in-top-layer{
185
183
 
186
184
  @media(min-width:688px){
187
185
 
188
- #chat21-footer{
189
- left: 20%;
190
- right: 20%;
191
- margin: 12px 0px 30px;
192
- }
186
+
193
187
 
194
188
  :host-context(#chat21-conversations.full-screen-mode){
195
189
  --button-in-msg-padding: 10px 16px;
@@ -214,6 +208,21 @@ dialog:-internal-dialog-in-top-layer{
214
208
 
215
209
  }
216
210
 
211
+
212
+
213
+
214
+ ::ng-deep .chat21-sheet-content{
215
+ bottom: calc(var(--chat-footer-logo-height) + var(--chat-footer-height) + 34px)!important;
216
+ }
217
+
218
+ }
219
+
220
+ @media(min-width:689px){
221
+ #chat21-footer{
222
+ left: 20%;
223
+ right: 20%;
224
+ margin: 12px 0px 30px;
225
+ }
217
226
  chat-conversation-footer ::ng-deep {
218
227
  .textarea-container {
219
228
  padding: 8px 24px;
@@ -229,9 +238,7 @@ dialog:-internal-dialog-in-top-layer{
229
238
  border-radius: 2rem;
230
239
  background-color: #ffffff;
231
240
  box-shadow: 0px 4px 4px 0px var(--tw-shadow-color, var(--shadow-color-1, #0000000a)), 0px 0px 1px 0px var(--tw-shadow-color, var(--shadow-color-2, #0000009e));
232
- transition: border-color 0.2s
233
- ease, box-shadow 0.2s
234
- ease;
241
+ transition: border-color 0.2s ease, box-shadow 0.2s ease;
235
242
 
236
243
  .visible-text-area {
237
244
  background-color: #ffffff;
@@ -242,11 +249,4 @@ dialog:-internal-dialog-in-top-layer{
242
249
  bottom: calc(100% + 6px);
243
250
  }
244
251
  }
245
-
246
-
247
-
248
- ::ng-deep .chat21-sheet-content{
249
- bottom: calc(var(--chat-footer-logo-height) + var(--chat-footer-height) + 34px)!important;
250
- }
251
-
252
252
  }
@@ -157,6 +157,7 @@
157
157
  margin-left: 4px;
158
158
  max-width: calc(100% - 30px);
159
159
  min-width: 14px;
160
+ border: 0.1px solid #0000000f;
160
161
  }
161
162
  .message_innerhtml {
162
163
  padding: 8px;
@@ -43,13 +43,19 @@
43
43
  }
44
44
 
45
45
  .chat21-textarea-button {
46
- // fill: var(--icon-fill-color);
47
46
  color: var(--icon-fill-color);
48
47
  pointer-events: auto;
49
- // height: var(--chat-footer-height);
50
48
  bottom: 22px;
51
49
  opacity: 0.3;
52
50
  cursor: initial;
51
+ display: flex;
52
+ justify-content: center;
53
+ align-content: center;
54
+ align-items: center;
55
+ // background-color: aquamarine;
56
+ width: 25px;
57
+ height: 25px;
58
+
53
59
  &.active {
54
60
  opacity: 1;
55
61
  cursor: pointer;
@@ -58,7 +64,10 @@
58
64
  opacity: 0.3 !important;
59
65
  pointer-events: none !important;
60
66
  cursor: not-allowed !important;
61
-
67
+ }
68
+ span svg {
69
+ width: 20px;
70
+ height: 20px;
62
71
  }
63
72
  }
64
73
 
@@ -2,7 +2,7 @@
2
2
  position: absolute;
3
3
  width: 100%;
4
4
  height: 100%;
5
-
5
+ background-color: #ffffff;
6
6
  /********* Animations **********/
7
7
  &.start-animation .fade-in-top {
8
8
  -webkit-animation: fade-in-top 0.5s cubic-bezier(0.390, 0.575, 0.565, 1.000) 0.3s both;
@@ -242,8 +242,10 @@
242
242
  line-height: 1.4;
243
243
  color: var(--black);
244
244
  overflow: hidden;
245
- -webkit-box-shadow: 0 4px 15px 0 var(--trasp-light-black), 0 1px 2px 0 var(--trasp-light-black);
246
- box-shadow: 0 4px 15px 0 var(--trasp-light-black), 0 1px 2px 0 var(--trasp-light-black);
245
+ // -webkit-box-shadow: 0 4px 15px 0 var(--trasp-light-black), 0 1px 2px 0 var(--trasp-light-black);
246
+ // box-shadow: 0 4px 15px 0 var(--trasp-light-black), 0 1px 2px 0 var(--trasp-light-black);
247
+
248
+ box-shadow:rgba(0, 0, 0, 0.16) 0px 8px 36px 0px;
247
249
  z-index: 20;
248
250
  text-align: left;
249
251
 
@@ -142,16 +142,65 @@ export class LastMessageComponent implements OnInit, AfterViewInit, OnDestroy {
142
142
  }
143
143
  }
144
144
  execute(commands[0])
145
+ }
146
+
147
+
148
+
149
+
145
150
 
151
+ private manageIframeHeight(retryCount = 0) {
152
+ const maxRetries = 5;
153
+ requestAnimationFrame(() => {
154
+ setTimeout(() => {
155
+ const element = this.messageListWRP.last?.nativeElement;
156
+ if (!element) {
157
+ this.retryIfNeeded(retryCount, maxRetries);
158
+ return;
159
+ }
160
+ const height = this.getElementHeight(element);
161
+ if (height === 0 && retryCount < maxRetries) {
162
+ this.retryIfNeeded(retryCount, maxRetries);
163
+ } else {
164
+ this.g.setWidgetPreviewContainerSize(0, height);
165
+ }
166
+ }, 100);
167
+ });
146
168
  }
147
169
 
148
- private manageIframeHeight(){
149
- setTimeout(() => {
150
- if(this.messageListWRP.get(this.messages.length-1)){
151
- let height = getComputedStyle(this.messageListWRP.get(this.messages.length-1).nativeElement).height
152
- this.g.setWidgetPreviewContainerSize(0, +height.substring(0, height.length-2))
153
- }
154
- }, 50);
170
+ private getElementHeight(element: HTMLElement): number {
171
+ // Forza il calcolo dell'altezza
172
+ const originalHeight = element.style.height;
173
+ element.style.height = 'auto';
174
+ let height = element.getBoundingClientRect().height;
175
+ // Prova diverse proprietà di altezza
176
+ if (height === 0) height = element.offsetHeight;
177
+ if (height === 0) height = element.scrollHeight;
178
+ if (height === 0) height = element.clientHeight;
179
+ // Se ancora 0, calcola l'altezza dai figli
180
+ if (height === 0) {
181
+ height = this.calculateHeightFromChildren(element);
182
+ }
183
+ // Ripristina l'altezza originale
184
+ element.style.height = originalHeight;
185
+ return height;
186
+ }
187
+
188
+ private calculateHeightFromChildren(element: HTMLElement): number {
189
+ let totalHeight = 0;
190
+ for (let i = 0; i < element.children.length; i++) {
191
+ totalHeight += element.children[i].getBoundingClientRect().height;
192
+ }
193
+ return totalHeight;
194
+ }
195
+
196
+ private retryIfNeeded(retryCount: number, maxRetries: number) {
197
+ if (retryCount < maxRetries) {
198
+ setTimeout(() => {
199
+ this.manageIframeHeight(retryCount + 1);
200
+ }, 100 * (retryCount + 1));
201
+ } else {
202
+ console.warn('Element not found after maximum retries');
203
+ }
155
204
  }
156
205
 
157
206
  isSameSender(senderId: string, index: number){
@@ -191,10 +240,13 @@ export class LastMessageComponent implements OnInit, AfterViewInit, OnDestroy {
191
240
 
192
241
  onElementRenderedFN(event){
193
242
  this.messageListWRP.forEach((item, index)=> {
243
+ console.log('messageListWRP ---------------------> ', item);
194
244
  setTimeout(() => {
195
245
  if(this.messageListWRP.get(index)){
196
- let height = getComputedStyle(this.messageListWRP.get(index).nativeElement).height
197
- this.g.setWidgetPreviewContainerSize(0, +height.substring(0, height.length-2))
246
+ // let height = getComputedStyle(this.messageListWRP.get(index).nativeElement).height
247
+ // this.g.setWidgetPreviewContainerSize(0, +height.substring(0, height.length-2))
248
+ let height = this.messageListWRP.get(this.messages.length-1).nativeElement.offsetHeight
249
+ this.g.setWidgetPreviewContainerSize(0, height)
198
250
  }
199
251
  }, 50);
200
252
  })
@@ -9,7 +9,7 @@
9
9
  aria-label=" apri chat"
10
10
  >
11
11
 
12
- <div *ngIf="g.conversationsBadge>0 " class="c21-divBudge">{{g.conversationsBadge}}</div>
12
+ <!-- <div *ngIf="g.conversationsBadge>0" class="c21-divBudge">{{g.conversationsBadge}}</div> -->
13
13
 
14
14
  <!-- OPEN ICON -->
15
15
  <div *ngIf="!g.isOpen" class="launcher-button rotate-center" [@enterBubbleAnimation]>
@@ -2,7 +2,7 @@
2
2
  .c21-icon-avatar {
3
3
  position: relative;
4
4
  padding: 0;
5
- margin: 0;
5
+ margin: 10px 0 0 0;
6
6
  height: var(--avatar-height);
7
7
  width: var(--avatar-width);
8
8
  min-height: var(--avatar-height);
@@ -16,7 +16,7 @@
16
16
 
17
17
  .message_sender_fullname{
18
18
  font-size: 12px;
19
- font-weight: 600;
19
+ font-weight: 400;
20
20
  }
21
21
 
22
22
  img {
@@ -3,33 +3,38 @@
3
3
  --textColor: #{var(--bck-msg-sent)};
4
4
  --hoverBackgroundColor: #{var(--bck-msg-sent)};
5
5
  --hoverTextColor: #{var(--blue)};
6
- --buttonFontSize: #{var(--button-in-msg-font-size)};
6
+ --buttonFontSize2: #{var(--button-font-size)};
7
7
  --max-width: #{var(--button-in-msg-max-width)};
8
8
  --padding: #{var(--button-in-msg-padding)};
9
- --fontFamily: #{var(--button-in-msg-font-family)};
9
+ --font-family: #{var(--button-in-msg-font-family)};
10
+ --buttonBorderColor: #{var(--button-border-color)};
11
+ --buttonColor: #{var(--button-color)};
12
+ --buttonBackgroundColor: #{var(--button-background-color)};
10
13
  }
11
14
 
12
15
  .button-in-msg {
13
16
  padding: var(--padding);
14
- // position: relative;
15
- // max-width: var(--max-width);
17
+ position: relative;
16
18
  min-width: inherit;
17
19
  cursor: pointer;
18
- border: 1px solid var(--textColor);
19
- border-radius: 20px;
20
- margin: 3px;
21
- background: var(--backgroundColor);
20
+ border: 1px solid var(--buttonBorderColor);
21
+ background: var(--buttonBackgroundColor);
22
+ font-family: var(--font-family);
23
+ font-size: var(--buttonFontSize2);
24
+ color: var(--textColor);
22
25
  overflow: hidden;
23
- font-family: var(--fontFamily);
24
- font-size: var(--buttonFontSize);
25
26
  -o-text-overflow: ellipsis;
26
27
  text-overflow: ellipsis;
27
- // // white-space: nowrap;
28
+ white-space: nowrap;
28
29
  word-wrap: break-word;
29
- letter-spacing: -0.24px;
30
30
  -webkit-font-smoothing: antialiased;
31
- color: var(--textColor);
32
31
  line-height: 16px;
32
+ font-weight: 500;
33
+ border-radius: 12px;
34
+ box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
35
+ padding: 10px 16px;
36
+ margin: 3px;
37
+ transition: background-color .2s ease;
33
38
  }
34
39
 
35
40
  .action {
@@ -39,7 +44,7 @@
39
44
  &:hover {
40
45
  color: var(--hoverTextColor);
41
46
  background: var(--hoverBackgroundColor);
42
- transform: scale(1.05);
47
+ // transform: scale(1.05);
43
48
  .icon-button-action {
44
49
  svg {
45
50
  fill: var(--hoverTextColor);
@@ -3,32 +3,39 @@
3
3
  --textColor: #{var(--bck-msg-sent)};
4
4
  --hoverBackgroundColor: #{var(--bck-msg-sent)};
5
5
  --hoverTextColor: #{var(--blue)};
6
- --buttonFontSize: #{var(--button-in-msg-font-size)};
6
+ --buttonFontSize2: #{var(--button-font-size)};
7
7
  --max-width: #{var(--button-in-msg-max-width)};
8
8
  --padding: #{var(--button-in-msg-padding)};
9
9
  --font-family: #{var(--button-in-msg-font-family)};
10
+ --buttonBorderColor: #{var(--button-border-color)};
11
+ --buttonColor: #{var(--button-color)};
12
+ --buttonBackgroundColor: #{var(--button-background-color)};
10
13
  }
11
14
 
15
+
12
16
  .button-in-msg {
13
17
  padding: var(--padding);
14
18
  position: relative;
15
- // max-width: var(--max-width);
16
19
  min-width: inherit;
17
20
  cursor: pointer;
18
- border: 1px solid var(--textColor);
19
- border-radius: 20px;
20
- margin: 3px;
21
- background: var(--backgroundColor);
22
- overflow: hidden;
21
+ border: 1px solid var(--buttonBorderColor);
22
+ background: var(--buttonBackgroundColor);
23
23
  font-family: var(--font-family);
24
- font-size: var(--buttonFontSize);
24
+ font-size: var(--buttonFontSize2);
25
+ color: var(--textColor);
26
+ overflow: hidden;
25
27
  -o-text-overflow: ellipsis;
26
28
  text-overflow: ellipsis;
27
29
  white-space: nowrap;
28
- letter-spacing: -0.24px;
30
+ word-wrap: break-word;
29
31
  -webkit-font-smoothing: antialiased;
30
- color: var(--textColor);
31
32
  line-height: 16px;
33
+ font-weight: 500;
34
+ border-radius: 12px;
35
+ box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
36
+ padding: 10px 16px;
37
+ margin: 3px;
38
+ transition: background-color .2s ease;
32
39
  }
33
40
 
34
41
  .url {
@@ -52,7 +59,7 @@
52
59
  &:hover {
53
60
  color: var(--hoverTextColor);
54
61
  background: var(--hoverBackgroundColor);
55
- transform: scale(1.05);
62
+ // transform: scale(1.05);
56
63
  .icon-button-action, .icon-button-action-self {
57
64
  svg {
58
65
  fill: var(--hoverTextColor);
@@ -3,34 +3,43 @@
3
3
  --textColor: #{var(--bck-msg-sent)};
4
4
  --hoverBackgroundColor: #{var(--bck-msg-sent)};
5
5
  --hoverTextColor: #{var(--blue)};
6
- --buttonFontSize: #{var(--button-in-msg-font-size)};
6
+ --buttonFontSize2: #{var(--button-font-size)};
7
7
  --max-width: #{var(--button-in-msg-max-width)};
8
8
  --padding: #{var(--button-in-msg-padding)};
9
9
  --font-family: #{var(--button-in-msg-font-family)};
10
+ --buttonBorderColor: #{var(--button-border-color)};
11
+ // --buttonColor: #{var(--buttonColor)};
12
+ --buttonBackgroundColor: #{var(--button-background-color)};
13
+ --buttonColor: #{var(--button-color)};
10
14
  }
11
15
 
12
16
 
13
17
  .button-in-msg {
14
18
  padding: var(--padding);
15
19
  position: relative;
16
- // max-width: var(--max-width);
17
20
  min-width: inherit;
18
21
  cursor: pointer;
19
- border: 1px solid var(--textColor); //$blue
20
- border-radius: 20px;
21
- margin: 3px;
22
- background: var(--backgroundColor);
23
- overflow: hidden;
22
+ border: 1px solid var(--buttonBorderColor);
23
+ background: var(--buttonBackgroundColor);
24
+ // background: var(--backgroundColor);
24
25
  font-family: var(--font-family);
25
- font-size: var(--buttonFontSize);
26
+ font-size: var(--buttonFontSize2);
27
+ // color: var(--buttonColor);
28
+ color: var(--textColor);
29
+ overflow: hidden;
26
30
  -o-text-overflow: ellipsis;
27
31
  text-overflow: ellipsis;
28
32
  // white-space: nowrap;
29
33
  word-wrap: break-word;
30
- letter-spacing: -0.24px;
34
+ // letter-spacing: -0.24px;
31
35
  -webkit-font-smoothing: antialiased;
32
- color: var(--textColor); //$blue
33
36
  line-height: 16px;
37
+ font-weight: 500;
38
+ border-radius: 12px;
39
+ box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
40
+ padding: 10px 16px;
41
+ margin: 3px;
42
+ transition: background-color .2s ease;
34
43
  }
35
44
 
36
45
  .text {
@@ -40,7 +49,7 @@
40
49
  &:hover {
41
50
  color: var(--hoverTextColor);
42
51
  background: var(--hoverBackgroundColor);
43
- transform: scale(1.05);
52
+ // transform: scale(1.05);
44
53
  .icon-button-action {
45
54
  svg {
46
55
  fill: var(--black);
@@ -3,7 +3,7 @@
3
3
  --textColor: #{var(--bck-msg-sent)};
4
4
  --hoverBackgroundColor: #{var(--bck-msg-sent)};
5
5
  --hoverTextColor: #{var(--blue)};
6
- --buttonFontSize: #{var(--button-in-msg-font-size)};
6
+ --buttonFontSize: #{var(--button-font-size)};
7
7
  --max-width: #{var(--button-in-msg-max-width)};
8
8
  --fontFamily: #{var(--font-family)};
9
9
 
@@ -85,16 +85,15 @@
85
85
  align-items: center;
86
86
  }
87
87
  .carousel .card {
88
- // padding: 0px 5px;
89
88
  scroll-snap-align: start;
90
89
  width: var(--cardWidth);
91
90
  background: rgb(255, 255, 255);
92
91
  list-style: none;
93
92
  cursor: pointer;
94
- // padding-bottom: 15px;
95
93
  flex-direction: column;
96
94
  border-radius: 8px;
97
- box-shadow: 0 3px 6px rgba(0,0,0,0.23);
95
+ border: 1px solid rgba(0, 0, 0, 0.05);
96
+ box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.04);
98
97
  }
99
98
  .carousel .card .card-image {
100
99
  height: 150px;
@@ -143,24 +142,33 @@
143
142
  display: flex;
144
143
  -ms-flex-direction: column;
145
144
  flex-direction: column;
146
- padding: 0 20px 30px;
147
-
145
+ padding: 20px 20px;
148
146
  .card-title{
147
+ // word-wrap: break-word;
148
+ // font-size: 13px;
149
+ // font-weight: 600;
150
+ // line-height: 20px;
151
+ // // margin-top: 12px;
152
+ // white-space: pre-wrap;
153
+ // width: 100%;
149
154
  word-wrap: break-word;
150
- font-size: 16px;
151
- font-weight: 600;
152
- line-height: 20px;
153
- margin-top: 12px;
154
- white-space: pre-wrap;
155
- width: 100%;
155
+ font-size: 1.1em;
156
+ font-weight: 500;
157
+ font-family: var(--font-family);
158
+ color: #333;
156
159
  }
157
160
 
158
161
  .card-description{
162
+ // word-wrap: break-word;
163
+ // font-size: 16px;
164
+ // line-height: 20px;
165
+ // margin-top: 12px;
166
+ // white-space: pre-wrap;
159
167
  word-wrap: break-word;
160
- font-size: 16px;
161
- line-height: 20px;
162
- margin-top: 12px;
168
+ font-size: 1.0em;
169
+ margin-top: 6px;
163
170
  white-space: pre-wrap;
171
+ font-weight: 300;
164
172
  }
165
173
 
166
174
  }
@@ -190,7 +198,7 @@
190
198
  -ms-flex-align: center;
191
199
  align-items: center;
192
200
  justify-content: center;
193
- border-top: 1px solid var(--textColor);
201
+ border-top: 1px dashed rgba(0, 0, 0, 0.08);
194
202
  cursor: pointer;
195
203
  display: -webkit-box;
196
204
  display: -ms-flexbox;
@@ -218,7 +226,7 @@
218
226
  &:hover {
219
227
  color: var(--hoverTextColor);
220
228
  background: var(--hoverBackgroundColor);
221
- // transform: scale(1.05);
229
+ transform: scale(1.05);
222
230
  .icon-button-action {
223
231
  svg {
224
232
  fill: var(--hoverTextColor);
@@ -1,4 +1,3 @@
1
- <p #messageEl class="message_innerhtml marked"
1
+ <p #messageEl class="message_innerhtml marked"
2
2
  [innerHTML]="printMessage(text, messageEl, this) | marked"
3
3
  [style.color]="color"></p>
4
- <!-- [innerHTML]="printMessage(text, messageEl, this) | htmlEntitiesEncode | marked" -->
@@ -3,11 +3,15 @@
3
3
 
4
4
  <span *ngFor="let button of buttons | slice:0:limit" class="div-button">
5
5
 
6
+ <!--
7
+ // bubbleReceivedBackground
8
+ // buttonBackgroundColor
9
+ -->
6
10
  <chat-text-button-attachment *ngIf="button.type === 'text' && isLastMessage === true" class="div-button"
7
11
  [button]="button"
8
12
  [isConversationArchived]="isConversationArchived"
9
13
  [fontSize]="stylesMap.get('buttonFontSize')"
10
- [backgroundColor]="stylesMap.get('buttonBackgroundColor')"
14
+ [backgroundColor]="stylesMap.get('bubbleReceivedBackground')"
11
15
  [textColor]="stylesMap.get('buttonTextColor')"
12
16
  [hoverBackgroundColor]="stylesMap.get('buttonHoverBackgroundColor')"
13
17
  [hoverTextColor]="stylesMap.get('buttonHoverTextColor')"
@@ -17,7 +21,7 @@
17
21
  <chat-link-button-attachment *ngIf="button.type === 'url'" class="div-button"
18
22
  [button]="button"
19
23
  [fontSize]="stylesMap.get('buttonFontSize')"
20
- [backgroundColor]="stylesMap.get('buttonBackgroundColor')"
24
+ [backgroundColor]="stylesMap.get('bubbleReceivedBackground')"
21
25
  [textColor]="stylesMap.get('buttonTextColor')"
22
26
  [hoverBackgroundColor]="stylesMap.get('buttonHoverBackgroundColor')"
23
27
  [hoverTextColor]="stylesMap.get('buttonHoverTextColor')"
@@ -28,7 +32,7 @@
28
32
  [button]="button"
29
33
  [isConversationArchived]="isConversationArchived"
30
34
  [fontSize]="stylesMap.get('buttonFontSize')"
31
- [backgroundColor]="stylesMap.get('buttonBackgroundColor')"
35
+ [backgroundColor]="stylesMap.get('bubbleReceivedBackground')"
32
36
  [textColor]="stylesMap.get('buttonTextColor')"
33
37
  [hoverBackgroundColor]="stylesMap.get('buttonHoverBackgroundColor')"
34
38
  [hoverTextColor]="stylesMap.get('buttonHoverTextColor')"
@@ -1,11 +1,12 @@
1
1
  #buttons-in-message {
2
2
  text-align: right;
3
3
  display: block;
4
- margin-right: 16px; //align attachment-buttons to bubble sent message
4
+ // margin-right: 16px; //align attachment-buttons to bubble sent message
5
5
  height: auto;
6
6
  // width: 85%;
7
7
  max-width: 95%;
8
- float: right;
8
+ float: left;
9
+ padding-left: calc(var(--avatar-width) + 10px);
9
10
 
10
11
  .buttons-wrapper {
11
12
  margin-top: 0px;
@@ -2,7 +2,7 @@
2
2
 
3
3
  <button aflauncherbutton #aflauncherbutton id="c21-launcher-button" class="c21-button-clean scale-in-center c21-align-right"
4
4
  *ngIf="g.isLogged == true"
5
- [ngStyle]="{ 'background-color': g.themeColor, 'bottom': g.marginY+'px!important', 'left':(g.align==='left')?g.marginX+'px!important':'', 'right':(g.align==='right')?g.marginX+'px!important':'', 'width': g.launcherWidth, 'height': g.launcherHeight, 'border-radius': g.baloonShape}"
5
+ [style]="{ 'background-color': g.themeColor, 'bottom': g.marginY+'px!important', 'left':(g.align==='left')?g.marginX+'px!important':'', 'right':(g.align==='right')?g.marginX+'px!important':'', 'width': g.launcherWidth, 'height': g.launcherHeight, 'border-radius': g.baloonShape}"
6
6
  (click)="onSendPressed($event)"
7
7
  tabindex="1000"
8
8
  aria-label=" apri chat"
@@ -12,7 +12,7 @@
12
12
  <!-- [@enterBubbleAnimation] -->
13
13
  <div class="launcher-button rotate-center" >
14
14
  <!-- <img *ngIf="g.baloonImage !== '' " [src]="g.baloonImage" [ngStyle]="{'width': '100%', 'height': '100%', 'margin': 'auto'}"> -->
15
- <svg role="img" [ngStyle]="{'fill': g.themeForegroundColor, 'display': (g.baloonImage==='')?'':'none' }" xmlns="http://www.w3.org/2000/svg" width="100%"
15
+ <svg role="img" [style]="{'fill': g.themeForegroundColor, 'display': (g.baloonImage==='')?'':'none' }" xmlns="http://www.w3.org/2000/svg" width="100%"
16
16
  height="100%" viewBox="0 0 90 90">
17
17
  <!-- <path fill="none" d="M0 0h24v24H0V0z" />
18
18
  <path d="M33.57,31A4.58,4.58,0,0,0,29,35.57V58.3a1.94,1.94,0,0,0,3.32,1.38l3-3a.29.29,0,0,1,.21-.09H56.43A4.58,4.58,0,0,0,61,52V35.57A4.58,4.58,0,0,0,56.43,31Z" /> -->
@@ -19,10 +19,14 @@
19
19
  --col-msg-sent: #ffffff;
20
20
 
21
21
  --border-radius-bubble-message: 20px;
22
- --button-in-msg-font-size: 15px;
22
+ --button-in-msg-font-size: 13px;
23
23
  --button-in-msg-font-family: 'Roboto','Google Sans', Helvetica, Arial, sans-serif;
24
24
  --button-in-msg-max-width: 280px;
25
25
  --button-in-msg-padding: 8px 16px;
26
+ --button-color: #5c6c73;
27
+ --button-background-color: #f5f5f5; // #f9fcff;
28
+ --button-border-color: #0000000f; //#e4ebf2;
29
+ --button-font-size: 13px;
26
30
 
27
31
  --max-width-images: 230px; //change also MAX_WIDTH_IMAGES in constants.ts
28
32
 
@@ -42,15 +46,16 @@
42
46
  --content-background-color: #fff;
43
47
  --content-text-color: var(--black);
44
48
 
49
+ --avatar-height: 20px;
50
+ --avatar-width: 20px;
51
+
52
+
45
53
  --font-family: 'Roboto','Google Sans', Helvetica, Arial, sans-serif; //Mulish, sans-serif;
46
54
  --font-family-bubble-message: 'Roboto','Google Sans', Helvetica, Arial, sans-serif;
47
55
  --font-family-callout: 'Helvetica Neue', 'Apple Color Emoji', Helvetica, Arial, sans-serif;
48
56
  --font-family-powered-by: Mulish, sans-serif;
49
57
 
50
58
  --font-size-bubble-message: 1.4em;
51
-
52
- --avatar-height: 40px;
53
- --avatar-width: 40px;
54
59
  }
55
60
 
56
61
  $trasp-black:rgba(0,0,0,0.8);
@@ -294,6 +294,9 @@ export class Globals {
294
294
  * false the WAITING_TIME_NOT_FOUND will always be displayed)
295
295
  * is set to true for backward compatibility with old projects */
296
296
  this.dynamicWaitTimeReply = true;
297
+ /** Hide the close button in the widget header. Permitted values: true,
298
+ false. The default value is false. */
299
+ this.hideHeaderCloseButton = false;
297
300
 
298
301
  /** if it is true, the chat window is open in fullscreen mode. Permitted
299
302
  values: true, false. Default value : false */
@@ -335,13 +338,15 @@ export class Globals {
335
338
  /** set launcher balon widget shape: can set corner by corner */
336
339
  this.baloonShape = '50%';
337
340
  // this.parameters['isLogEnabled'] = false;
338
- this.isLogEnabled = false;
341
+ this.openExternalLinkButton = true;
339
342
  /** Hide the header conversation Permitted values: true,
340
343
  false. The default value is false. */
341
344
  this.hideHeaderConversation= false;
342
345
  /** Hide the close button in the widget header. Permitted values: true,
343
346
  false. The default value is false. */
344
347
  this.hideHeaderCloseButton = false;
348
+ /** set global log. Permitted values: true, false. The default value is false. */
349
+ this.isLogEnabled = false;
345
350
  /** enable to hide/show upper-right header conversation options menu */
346
351
  this.openExternalLinkButton = true;
347
352
  /** enable to close a conversation from upper-right header menu */
@@ -361,7 +366,7 @@ export class Globals {
361
366
  /** set the text color of bubble sent message */
362
367
  this.bubbleSentTextColor = convertColorToRGBA('#ffffff', 100); //'#ffffff'
363
368
  /** set the background of bubble received message */
364
- this.bubbleReceivedBackground= convertColorToRGBA('#f0f2f7', 100); //#f7f7f7;
369
+ this.bubbleReceivedBackground= convertColorToRGBA('#f5f5f5', 100); //#f7f7f7; //#f0f2f7 //#f5f5f5
365
370
  /** set the text color of bubble received message */
366
371
  this.bubbleReceivedTextColor = convertColorToRGBA('#06132b', 100); //#1a1a1a
367
372
  /** set the text size of bubble messages */
@@ -418,6 +418,8 @@ function getMimeTypeFromExtension(extension: string): string {
418
418
  '.txt': 'text/plain',
419
419
  '.doc': 'application/msword',
420
420
  '.docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
421
+ '.xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
422
+ '.xls': 'application/vnd.ms-excel',
421
423
  '.wav' : 'audio/wav'
422
424
  // Aggiungi altri tipi MIME se necessario
423
425
  };
@@ -16,6 +16,7 @@
16
16
  display: none;
17
17
  z-index: 3000000000; /*999999*/;
18
18
  }
19
+
19
20
  #tiledesk-container.open.overlay--popup {
20
21
  background-color: rgba(0, 0, 0, 0.4);
21
22
  position: absolute;
@@ -38,6 +39,7 @@
38
39
  display: block;
39
40
  position: fixed;
40
41
  max-height: calc(100% - 50px);
42
+ border-radius: 16px;
41
43
  }
42
44
 
43
45
  #tiledeskdiv.fullscreen {
@@ -50,19 +52,33 @@
50
52
  }
51
53
 
52
54
  #tiledeskdiv.top-size {
53
- position: fixed;
55
+ /* transition: width 50ms, height 200ms, max-height 200ms, transform 300ms cubic-bezier(0, 1.2, 1, 1), opacity 83ms ease-out; */
56
+ position: relative;
57
+ margin: auto;
54
58
  top: 0;
55
59
  bottom: 0;
56
- left: 50%;
57
- /* width: calc( var(--iframeMaxWidth) + 180px); */
60
+ left: 0!important;
61
+ right: 0!important;
58
62
  height: 100%; /*var(--iframeMaxHeight);*/
59
63
  /* transform: translate(-50%, -50%); */
60
- transform: translate(-50%, 0%);
64
+ /* transform: translate(-50%, 0%); */
61
65
  width: 100%;
62
66
  max-width: 1024px;
63
67
  max-height: 100%;
68
+
69
+ transition:
70
+ width 300ms,
71
+ height 300ms,
72
+ max-height 300ms,
73
+ transform 300ms cubic-bezier(0, 1.2, 1, 1),
74
+ opacity 300ms ease-out;
75
+ /* per migliorare le prestazioni quando si usa transform */
76
+ will-change: transform, opacity, width, height;
64
77
  }
65
-
78
+
79
+ /* #tiledesk-container.open #tiledeskdiv.top-size #tiledeskiframe {
80
+ border-radius: unset;
81
+ } */
66
82
 
67
83
  @keyframes right-animate {
68
84
  0% {
@@ -82,6 +98,7 @@
82
98
  left: auto; /* NEW DEPA */
83
99
  top:auto;
84
100
  transform: none;
101
+ transition: none;
85
102
  }
86
103
  #tiledesk-container.closed #tiledeskdiv.callout {
87
104
  /* width: 400px;
@@ -112,12 +129,21 @@
112
129
  #tiledesk-container.open #tiledeskiframe {
113
130
  display: block;
114
131
  /*width: 376px;*/
115
- }
116
- #tiledesk-container.open #tiledeskdiv.shadow {
132
+ border-radius: 16px;
117
133
  transition: box-shadow 0.8s ease-in;
118
134
  box-shadow: rgba(0, 0, 0, 0.16) 0px 8px 36px 0px; /*NEW GAB*/
119
135
  }
136
+ /*
137
+ #tiledesk-container.open #tiledeskdiv.shadow {
138
+ transition: box-shadow 0.8s ease-in;
139
+ box-shadow: rgba(0, 0, 0, 0.16) 0px 8px 36px 0px;
140
+ }
141
+ */
120
142
 
143
+ #tiledesk-container.open #tiledeskdiv {
144
+ /* transition: box-shadow 0.8s ease-in;
145
+ box-shadow: rgba(0, 0, 0, 0.16) 0px 8px 36px 0px; */
146
+ }
121
147
 
122
148
  #tiledesk-container.closed #tiledeskiframe {
123
149
  display: block;