@chat21/chat21-web-widget 5.1.0-rc25 → 5.1.0-rc26

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,11 @@
6
6
  ### **Copyrigth**:
7
7
  *Tiledesk SRL*
8
8
 
9
+ # 5.1.0-rc26
10
+ - **added**: buttons attachments aligned to bubble message
11
+ - **changed**: enable new textarea style if width is grather than 688px
12
+ - **bug-fixed**: fullscreenMode is not enabled (css class override fullscreen style)
13
+
9
14
  # 5.1.0-rc25
10
15
  - **added**: allowedUploadExtentions property from api call
11
16
 
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-rc25",
4
+ "version": "5.1.0-rc26",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -30,21 +30,30 @@
30
30
  .button-in-message{
31
31
  padding: 14px 22px !important
32
32
  }
33
+
34
+ chat-message-attachment {
35
+ margin: auto 20px auto 10px; //0 20px 4px 10px;
36
+ margin-left: calc( var(--avatar-width) + 10px )
37
+
38
+ }
33
39
 
34
40
  }
35
41
 
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
- }
42
+
43
+ }
44
+
45
+ chat-conversation-footer ::ng-deep {
46
+ .textarea-container {
47
+ padding: 8px 24px;
48
+ background-color: var(--chat-footer-background-color);
49
+ border-radius: 28px;
50
+ }
51
+ #hiddenFooter,
52
+ #emoji-mart-container {
53
+ bottom: calc(100% + 10px)
46
54
  }
47
55
  }
56
+
48
57
  }
49
58
 
50
59
  // ============= CSS #chat21-conversation-component ================= //
@@ -1409,9 +1409,9 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
1409
1409
  this.logger.log('[CONV-COMP] ----> FILE - (dragleave) drag ev ', event)
1410
1410
  if (event.dataTransfer && event.dataTransfer.files) {
1411
1411
  const files = event.dataTransfer.files;
1412
- const canUploadFile = checkAcceptedFile(files[0].type, this.appConfigService.getConfig().fileUploadAccept)
1412
+ const canUploadFile = checkAcceptedFile(files[0].type, this.g.fileUploadAccept)
1413
1413
  if(!canUploadFile){
1414
- this.logger.error('[IMAGE-UPLOAD] detectFiles: can not upload current file type--> NOT ALLOWED', this.appConfigService.getConfig().fileUploadAccept)
1414
+ this.logger.error('[IMAGE-UPLOAD] detectFiles: can not upload current file type--> NOT ALLOWED', this.g.fileUploadAccept)
1415
1415
  return;
1416
1416
  }
1417
1417
  }
@@ -63,7 +63,7 @@
63
63
  [ngClass]="{'slide-in-left': false}"
64
64
  [class.no-background]="(isImage(message) || isFrame(message) || isCarousel(message)) && ((message?.text && message?.text.trim() === '') || !message?.text)"
65
65
  [class.emoticon]="isEmojii(message?.text)"
66
- [style.margin-left]="isSameSender(message?.sender, i)? '50px': null"
66
+ [style.margin-left]="isSameSender(message?.sender, i)? 'calc(var(--avatar-width) + 10px)': null"
67
67
  [ngStyle]="{'background': stylesMap.get('bubbleReceivedBackground'), 'color': stylesMap.get('bubbleReceivedTextColor')}"
68
68
  [isSameSender]="isSameSender(message?.sender, i)"
69
69
  [message]="message"
@@ -3,10 +3,10 @@
3
3
  position: relative;
4
4
  padding: 0;
5
5
  margin: 0;
6
- height: 40px;
7
- width: 40px;
8
- min-height: 40px;
9
- min-width: 40px;
6
+ height: var(--avatar-height);
7
+ width: var(--avatar-width);
8
+ min-height: var(--avatar-height);
9
+ min-width: var(--avatar-width);
10
10
  line-height: 40px;
11
11
  border-radius: 50%;
12
12
  overflow: hidden;
@@ -367,15 +367,19 @@ export class GlobalSettingsService {
367
367
  }
368
368
  // console.log('this.globals.fullscreenMode' + this.globals.fullscreenMode);
369
369
  if (this.globals.fullscreenMode === true) {
370
- // divTiledeskiframe.style.left = 0;
371
- // divTiledeskiframe.style.right = 0;
372
- // divTiledeskiframe.style.top = 0;
373
- // divTiledeskiframe.style.bottom = 0;
374
- // divTiledeskiframe.style.width = '100%';
375
- // divTiledeskiframe.style.height = '100%';
376
- // divTiledeskiframe.style.maxHeight = 'none';
377
- // divTiledeskiframe.style.maxWidth = 'none';
378
- divTiledeskiframe.classList.add('fullscreen')
370
+ divTiledeskiframe.style.left = 0;
371
+ divTiledeskiframe.style.right = 0;
372
+ divTiledeskiframe.style.top = 0;
373
+ divTiledeskiframe.style.bottom = 0;
374
+ divTiledeskiframe.style.width = '100%';
375
+ divTiledeskiframe.style.height = '100%';
376
+ divTiledeskiframe.style.maxHeight = 'none';
377
+ divTiledeskiframe.style.maxWidth = 'none';
378
+ // divTiledeskiframe.classList.add('fullscreen')
379
+ divTiledeskiframe.classList.remove('min-size')
380
+ divTiledeskiframe.classList.remove('max-size')
381
+ divTiledeskiframe.classList.remove('top-size')
382
+
379
383
  }
380
384
  }
381
385
 
@@ -39,12 +39,9 @@
39
39
 
40
40
  --icon-fill-color: #5f6368;
41
41
 
42
-
43
42
  --content-background-color: #fff;
44
43
  --content-text-color: var(--black);
45
44
 
46
-
47
-
48
45
  --font-family: 'Roboto','Google Sans', Helvetica, Arial, sans-serif; //Mulish, sans-serif;
49
46
  --font-family-bubble-message: 'Roboto','Google Sans', Helvetica, Arial, sans-serif;
50
47
  --font-family-callout: 'Helvetica Neue', 'Apple Color Emoji', Helvetica, Arial, sans-serif;
@@ -52,6 +49,8 @@
52
49
 
53
50
  --font-size-bubble-message: 1.4em
54
51
 
52
+ --avatar-height: 40px;
53
+ --avatar-width: 40px;
55
54
  }
56
55
 
57
56
  $trasp-black:rgba(0,0,0,0.8);
@@ -614,8 +614,8 @@ export class Globals {
614
614
  this.align === 'left'? divTiledeskWidget.style.left = this.mobileMarginX : divTiledeskWidget.style.right = this.mobileMarginX;
615
615
  }
616
616
 
617
- //customize position for 'tiledeskdiv' for desktop
618
- if(isOpen && !this.isMobile && divTiledeskWidget && this.size){
617
+ //customize position for 'tiledeskdiv' for desktop if fullscreenMode is not active
618
+ if(isOpen && !this.isMobile && !this.fullscreenMode && divTiledeskWidget && this.size){
619
619
  divTiledeskWidget.classList.add(this.size + '-size')
620
620
  }
621
621
 
@@ -45,10 +45,11 @@
45
45
 
46
46
  #tiledeskdiv.top-size {
47
47
  position: fixed;
48
- /* top: 50%; */
48
+ top: 0;
49
+ bottom: 0;
49
50
  left: 50%;
50
- width: var(--iframeMaxWidth);
51
- height: var(--iframeMaxHeight);
51
+ width: calc( var(--iframeMaxWidth) + 180px);
52
+ height: 100%; /*var(--iframeMaxHeight);*/
52
53
  /* transform: translate(-50%, -50%); */
53
54
  transform: translate(-50%, 0%);
54
55
  }