@chat21/chat21-web-widget 5.0.53-rc.3 → 5.0.53-rc.5

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 (47) hide show
  1. package/CHANGELOG.md +23 -2
  2. package/package.json +1 -1
  3. package/src/app/app.component.html +1 -1
  4. package/src/app/app.component.ts +18 -8
  5. package/src/app/app.module.ts +10 -8
  6. package/src/app/component/conversation-detail/conversation/conversation.component.ts +15 -1
  7. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.spec.ts +2 -2
  8. package/src/app/component/form/inputs/form-text/form-text.component.scss +2 -0
  9. package/src/app/component/last-message/last-message.component.html +83 -72
  10. package/src/app/component/last-message/last-message.component.scss +119 -42
  11. package/src/app/component/last-message/last-message.component.spec.ts +2 -2
  12. package/src/app/component/last-message/last-message.component.ts +49 -25
  13. package/src/app/component/list-all-conversations/list-all-conversations.component.ts +1 -1
  14. package/src/app/component/message/bubble-message/bubble-message.component.html +0 -5
  15. package/src/app/component/message/html/html.component.spec.ts +1 -1
  16. package/src/app/component/message/info-message/info-message.component.spec.ts +1 -1
  17. package/src/app/component/message/text/text.component.scss +4 -0
  18. package/src/app/component/message/text/text.component.spec.ts +2 -2
  19. package/src/app/component/message-attachment/message-attachment.component.html +1 -1
  20. package/src/app/component/message-attachment/message-attachment.component.ts +2 -0
  21. package/src/app/{directives → pipe}/html-entites-encode.pipe.spec.ts +0 -0
  22. package/src/app/{directives → pipe}/html-entities-encode.pipe.ts +0 -0
  23. package/src/app/{directives → pipe}/marked.pipe.spec.ts +0 -0
  24. package/src/app/{directives → pipe}/marked.pipe.ts +0 -0
  25. package/src/app/{directives → pipe}/safe-html.pipe.spec.ts +0 -0
  26. package/src/app/{directives → pipe}/safe-html.pipe.ts +0 -0
  27. package/src/app/providers/events.service.spec.ts +16 -0
  28. package/src/app/providers/events.service.ts +76 -0
  29. package/src/app/providers/global-settings.service.ts +11 -12
  30. package/src/app/utils/globals.ts +4 -1
  31. package/src/app/utils/rules.ts +88 -5
  32. package/src/assets/js/chat21client.js +27 -4
  33. package/src/assets/twp/chatbot-panel.html +0 -5
  34. package/src/assets/twp/index-dev.html +1 -1
  35. package/src/assets/twp/index.html +6 -6
  36. package/src/chat21-core/models/conversation.ts +2 -2
  37. package/src/chat21-core/models/upload.ts +1 -0
  38. package/src/chat21-core/providers/abstract/presence.service.ts +1 -0
  39. package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +78 -106
  40. package/src/chat21-core/providers/firebase/firebase-presence.service.ts +4 -0
  41. package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +2 -29
  42. package/src/chat21-core/providers/mqtt/mqtt-presence.service.ts +13 -156
  43. package/src/chat21-core/providers/tiledesk/tiledesk-requests.service.ts +21 -4
  44. package/src/chat21-core/utils/utils-message.ts +36 -0
  45. package/src/iframe-style.css +2 -2
  46. package/src/models/project.ts +4 -1
  47. package/src/models/rule.ts +19 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # chat21-web-widget ver 5.0
2
2
 
3
+ ### 5.0.53-rc.5
4
+ - changed: minor improvements for last-message component UI
5
+ - changed: last-message UI for long text message and long attachment buttons
6
+ - removed: automatic open widget after 3s on index.html
7
+ - bug-fixed: on click over callout not opens widget correctly if singleConversation is active
8
+
9
+ ### 5.0.53-rc.4
10
+ - added: proactive rules from /widget/botsRules
11
+ - added: imHere method for presence service
12
+ - added: limit parameter to message-attachment component
13
+ - added: send message on attachment button clicked on last-message component
14
+ - added: events service
15
+ - added: /requests/messages tiledesk api
16
+ - added: convertConversationToMessage utils function in last-message component
17
+ - changed: last-message UI
18
+ - upgraded: chat21client.js to v0.1.12.4
19
+ - changed: pipe files moved from /directives folder to /pipe folder
20
+ - changed: moved isSender function from service to utils-message
21
+ - bug-fixed: location.href and document.title is wrong (about:srcdoc)
22
+ - bug-fixed: wait 2s before publish ImHere event to MQTT presence
23
+
24
+ ### 5.0.53 in PROD
25
+
3
26
  ### 5.0.53-rc.3
4
27
  - added: html descriptions to index.html and index-dev.html
5
28
  - changed: script tag for style.css to link tag with rel="stylesheet"
@@ -8,7 +31,6 @@
8
31
  - removed: jquery plugin
9
32
  - removed: relativeLinkResolution from forRoot in RooterModule
10
33
 
11
-
12
34
  ### 5.0.53-rc.2
13
35
  - added: angular 15 engine
14
36
  - added: custom tooltip directive
@@ -24,7 +46,6 @@
24
46
  - removed: document.write() injection
25
47
  - removed: unused html test file
26
48
 
27
-
28
49
  ### 5.0.52 in PROD
29
50
 
30
51
  ### 5.0.52-rc.4
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.0.53-rc.3",
4
+ "version": "5.0.53-rc.5",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -115,7 +115,7 @@
115
115
  *******************************************
116
116
  tabindex -> 20 -->
117
117
  <chat-eyeeye-catcher-card *ngIf="g.senderId"
118
- (onOpenChat)="onOpenChatEyeEyeCatcherCard()"
118
+ (onOpenChat)="onOpenCloseWidget($event)"
119
119
  (onCloseEyeCatcherCard)="onCloseEyeCatcherCard($event)">
120
120
  </chat-eyeeye-catcher-card>
121
121
 
@@ -148,7 +148,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
148
148
  that.disposeWidget();
149
149
  return;
150
150
  }
151
-
151
+
152
152
  if(conversation.is_new && conversation.sender !== this.g.senderId && !isInfo(conversation)){
153
153
  that.manageTabNotification();
154
154
  }
@@ -167,9 +167,12 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
167
167
  } else {
168
168
  // if(conversation.is_new && isJustRecived(this.g.startedAt.getTime(), conversation.timestamp)){
169
169
  //widget closed
170
- that.lastConversation = conversation;
171
- that.g.isOpenNewMessage = true;
172
- that.logger.debug('[APP-COMP] lastconversationnn', that.lastConversation)
170
+ if(conversation.is_new && conversation.sender !== this.g.senderId && !isInfo(conversation)){
171
+ that.lastConversation = conversation;
172
+ that.g.isOpenNewMessage = true;
173
+ that.logger.debug('[APP-COMP] lastconversationnn', that.lastConversation)
174
+ }
175
+
173
176
 
174
177
  let badgeNewConverstionNumber = that.conversationsHandlerService.countIsNew()
175
178
  that.g.setParameter('conversationsBadge', badgeNewConverstionNumber);
@@ -398,6 +401,12 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
398
401
  that.showWidget();
399
402
  }
400
403
 
404
+ if(this.g.botsRules){
405
+ const rules = new Rules(that.tiledeskRequestsService, that.appStorageService,that.g)
406
+ rules.initRules(that.g.windowContext, that.g.tiledeskToken, user, that.generateNewUidConversation(), that.g.botsRules)
407
+ }
408
+
409
+
401
410
  } else if (state && state === AUTH_STATE_OFFLINE) {
402
411
  /** non sono loggato */
403
412
  that.logger.info('[APP-COMP] OFFLINE - NO CURRENT USER AUTENTICATE: ');
@@ -783,11 +792,11 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
783
792
  if (CLIENT_BROWSER) {
784
793
  attributes['client'] = CLIENT_BROWSER;
785
794
  }
786
- if (location.href) {
787
- attributes['sourcePage'] = location.href;
795
+ if (this.g.windowContext.window.location) {
796
+ attributes['sourcePage'] = this.g.windowContext.window.location.href;
788
797
  }
789
- if(document.title){
790
- attributes['sourceTitle'] = document.title;
798
+ if(this.g.windowContext.window.document){
799
+ attributes['sourceTitle'] = this.g.windowContext.window.document.title;
791
800
  }
792
801
  if (projectid) {
793
802
  attributes['projectId'] = projectid;
@@ -1493,6 +1502,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
1493
1502
  // this.g.windowContext.window.document.title = this.tabTitle
1494
1503
  } else {
1495
1504
  // TAB IS ACTIVE --> restore title and DO NOT SOUND
1505
+ this.presenceService.imHere()
1496
1506
  clearInterval(this.setIntervalTime)
1497
1507
  this.setIntervalTime = null;
1498
1508
  this.isTabVisible = true;
@@ -1,3 +1,4 @@
1
+ import { EventsService } from './providers/events.service';
1
2
 
2
3
  // ************** COMPONENTS ************** //
3
4
  import { AppComponent } from './app.component';
@@ -61,9 +62,9 @@ import { PickerModule } from '@ctrl/ngx-emoji-mart';
61
62
  import { INGXLoggerMetadata, LoggerModule, NGXLogger, NgxLoggerLevel, NGXLoggerServerService, TOKEN_LOGGER_SERVER_SERVICE } from "ngx-logger";
62
63
 
63
64
  //DIRECTIVES
64
- import { HtmlEntitiesEncodePipe } from './directives/html-entities-encode.pipe';
65
- import { MarkedPipe } from './directives/marked.pipe';
66
- import { SafeHtmlPipe } from './directives/safe-html.pipe';
65
+ import { HtmlEntitiesEncodePipe } from './pipe/html-entities-encode.pipe';
66
+ import { MarkedPipe } from './pipe/marked.pipe';
67
+ import { SafeHtmlPipe } from './pipe/safe-html.pipe';
67
68
 
68
69
  //LOGGER SERVICES
69
70
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
@@ -193,7 +194,7 @@ export function conversationHandlerFactory(chat21Service: Chat21Service, appConf
193
194
  }
194
195
  }
195
196
 
196
- export function typingFactory(appConfig: AppConfigService) {
197
+ export function typingFactory(chat21Service: Chat21Service, appConfig: AppConfigService) {
197
198
  const config = appConfig.getConfig()
198
199
  if (config.chatEngine === CHAT_ENGINE_MQTT) {
199
200
  return new MQTTTypingService();
@@ -202,10 +203,10 @@ export function typingFactory(appConfig: AppConfigService) {
202
203
  }
203
204
  }
204
205
 
205
- export function presenceFactory(appConfig: AppConfigService) {
206
+ export function presenceFactory(chat21Service: Chat21Service, appConfig: AppConfigService) {
206
207
  const config = appConfig.getConfig()
207
208
  if (config.chatEngine === CHAT_ENGINE_MQTT) {
208
- return new MQTTPresenceService();
209
+ return new MQTTPresenceService(chat21Service);
209
210
  } else {
210
211
  return new FirebasePresenceService();
211
212
  }
@@ -319,6 +320,7 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
319
320
  Rules,
320
321
  GlobalSettingsService,
321
322
  SettingsSaverService,
323
+ EventsService,
322
324
  StarRatingWidgetService,
323
325
  {
324
326
  provide: APP_INITIALIZER,
@@ -363,12 +365,12 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
363
365
  {
364
366
  provide: PresenceService,
365
367
  useFactory: presenceFactory,
366
- deps: [AppConfigService]
368
+ deps: [Chat21Service, AppConfigService]
367
369
  },
368
370
  {
369
371
  provide: TypingService,
370
372
  useFactory: typingFactory,
371
- deps: [AppConfigService]
373
+ deps: [Chat21Service, AppConfigService]
372
374
  },
373
375
  {
374
376
  provide: UploadService,
@@ -1,3 +1,4 @@
1
+ import { EventsService } from './../../../providers/events.service';
1
2
  import { ChatManager } from 'src/chat21-core/providers/chat-manager';
2
3
 
3
4
  import { ConversationFooterComponent } from './../conversation-footer/conversation-footer.component';
@@ -182,7 +183,8 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
182
183
  public typingService: TypingService,
183
184
  private tiledeskRequestService: TiledeskRequestsService,
184
185
  private changeDetectorRef: ChangeDetectorRef,
185
- private elementRef: ElementRef
186
+ private elementRef: ElementRef,
187
+ private events: EventsService
186
188
  ) { }
187
189
 
188
190
  onResize(event){
@@ -828,6 +830,18 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
828
830
  this.subscriptions.push(subscribe);
829
831
  }
830
832
 
833
+ subscribtionKey = 'lastMessage:attachmentButtonClicked';
834
+ this.events.subscribe('lastMessage:attachmentButtonClicked', (event: any) => {
835
+ this.logger.debug('[CONV-COMP] ***** lastMessage:attachmentButtonClicked *****', event);
836
+ if (event) {
837
+ const conversationUid = event.message.conversation_with; //support-group-...
838
+ if(this.conversationId === conversationUid){
839
+ this.onAttachmentButtonClicked(event)
840
+ }
841
+ }
842
+ });
843
+
844
+
831
845
  }
832
846
 
833
847
  checkMessagesLegntForTranscriptDownloadMenuOption(){
@@ -2,8 +2,8 @@ import { MomentModule } from 'ngx-moment';
2
2
  import { async, ComponentFixture, TestBed, waitForAsync, inject } from '@angular/core/testing';
3
3
 
4
4
  import { ConversationContentComponent } from './conversation-content.component';
5
- import { MarkedPipe } from '../../../directives/marked.pipe';
6
- import { HtmlEntitiesEncodePipe } from '../../../directives/html-entities-encode.pipe';
5
+ import { MarkedPipe } from '../../../pipe/marked.pipe';
6
+ import { HtmlEntitiesEncodePipe } from '../../../pipe/html-entities-encode.pipe';
7
7
  import { UploadService } from '../../../../chat21-core/providers/abstract/upload.service';
8
8
  import { CustomLogger } from '../../../../chat21-core/providers/logger/customLogger';
9
9
  import { LoggerInstance } from '../../../../chat21-core/providers/logger/loggerInstance';
@@ -86,6 +86,8 @@ input[type='text'].errors{
86
86
  position: relative;
87
87
  padding-bottom: 0px; //7px;
88
88
  margin: 35px 0px 0px; //27px 0 0;
89
+ display: flex;
90
+ width: 100%;
89
91
  }
90
92
  .form-group label.control-label {
91
93
  font-size: 11px;
@@ -1,83 +1,94 @@
1
- <div *ngIf="conversation && g.isOpenNewMessage" id="messagePreview">
1
+ <div *ngIf="conversation && g.isOpenNewMessage" id="messagePreview" >
2
2
  <!-- message recipient:: -->
3
- <div role="messaggio" id="new_message">
4
3
 
5
- <div class="headerPreviewMessage">
4
+ <div class="headerPreviewMessage">
6
5
 
7
- <div class="boxButtons">
8
-
9
- <div role="button" tabindex="0" class="buttonMore" (click)="openConversationByID(conversation)">
10
- <span>View more</span>
11
- </div>
6
+ <div class="boxButtons">
7
+
8
+ <div role="button" tabindex="0" class="buttonMore" (click)="openConversationByID(conversation)">
9
+ <span>View more</span>
10
+ </div>
12
11
 
13
- <div aria-label="Dismiss" role="button" tabindex="0" class="buttonClose" (click)="closeMessagePreview()">
14
- <span>
15
- <svg aria-labelledby="altIconTitle" height="20px" role="img" viewBox="0 0 24 24" width="20px" xmlns="http://www.w3.org/2000/svg" style="fill: rgb(255, 255, 255);">
16
- <path d="M0 0h24v24H0V0z" fill="none"></path>
17
- <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path>
18
- </svg>
19
- </span>
20
- </div>
21
-
22
- </div>
12
+ <div aria-label="Dismiss" role="button" tabindex="0" class="buttonClose" (click)="closeMessagePreview()">
13
+ <span>
14
+ <svg aria-labelledby="altIconTitle" height="20px" role="img" viewBox="0 0 24 24" width="20px" xmlns="http://www.w3.org/2000/svg" style="fill: rgb(255, 255, 255);">
15
+ <path d="M0 0h24v24H0V0z" fill="none"></path>
16
+ <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path>
17
+ </svg>
18
+ </span>
19
+ </div>
23
20
 
24
21
  </div>
22
+
23
+ </div>
24
+
25
+
26
+ <div>
27
+ <!-- <div role="messaggio" class="c21-text message_sender_fullname">{{conversation.sender_fullname}}</div> -->
28
+ <!-- <img *ngIf="conversation.type == 'image' && conversation.metadata" class="message-content message-content-image"
29
+ [src]="conversation.metadata.src" [width]="getSizeImg(conversation).width"
30
+ [height]="getSizeImg(conversation).height" /> -->
31
+
25
32
 
26
- <div class="previewNewMessagge" (click)="openConversationByID(conversation)">
27
- <div role="messaggio" class="c21-text message_sender_fullname">{{conversation.sender_fullname}}</div>
28
- <!-- <img *ngIf="conversation.type == 'image' && conversation.metadata" class="message-content message-content-image"
29
- [src]="conversation.metadata.src" [width]="getSizeImg(conversation).width"
30
- [height]="getSizeImg(conversation).height" /> -->
31
-
32
- <!-- <div *ngIf="isImage(conversation)" class="c21-img">
33
- <chat-image *ngIf="isImage(conversation)"
34
- [metadata]="conversation?.metadata"
35
- [width]="getMetadataSize(conversation?.metadata).width"
36
- [height]="getMetadataSize(conversation?.metadata).height">
37
- </chat-image>
38
- </div> -->
39
-
40
-
41
- <div *ngIf="conversation.type == 'text'" class="c21-box-text">
42
- <div *ngIf="isPopupUrl(conversation.last_message_text); then contentPopup else contentNewTab">here
43
- is ignored</div>
44
- <ng-template #contentPopup>
45
- <p class="c21-link"
46
- (click)="popupUrl(g.windowContext, conversation.last_message_text,'windowName')">{{strip_tags(conversation.last_message_text)}}
47
- </p>
48
- </ng-template>
49
- <ng-template #contentNewTab>
50
- <p class="c21-text overflow4Lines" [innerHTML]="conversation.last_message_text | htmlEntitiesEncode | marked"></p>
51
- </ng-template>
52
-
53
- <!-- NOT AVAILABLE WITH FIREBASE DUE TO INCOMPATIBILITY WITH conversation OBJECT-->
54
- <!-- <div *ngIf="conversation.attributes && conversation.attributes.attachment " class="slide-in-left" >
55
- <chat-message-attachment
56
- style="height: 100%; display: block;"
57
- [message]="conversation"
58
- [isLastMessage] = "true"
59
- [stylesMap]="stylesMap"
60
- (onAttachmentButtonClicked)="onAttachmentButtonClicked($event)">
61
- </chat-message-attachment>
62
- </div> -->
63
- </div>
64
-
65
- <div class="c21-time c21-text">
66
- <time *ngIf="conversation.timestamp !== '{.sv: timestamp}'" >{{conversation.timestamp | amTimeAgo}} </time>
67
- </div>
68
-
69
- <div class="c21-icon-avatar">
70
- <div class="c21-avatar-image profile_image">
71
- <chat-avatar-image class="slide-in-left"
72
- [senderID]="conversation.sender"
73
- [senderFullname]="conversation.sender_fullname"
74
- [baseLocation]="baseLocation">
75
- </chat-avatar-image>
76
- <!-- <img src="{{conversation.image}}" onError="this.src = 'https://s3.eu-west-1.amazonaws.com/tiledesk-widget/dev/2.0.4-beta.7/assets/images/avatar_bot_tiledesk.svg'" /> -->
77
- </div>
78
- </div>
33
+ <div class="previewNewMessagge msg_container" (click)="openConversationByID(conversation)">
34
+
35
+ <!-- <div *ngIf="isImage(conversation)">
36
+ <chat-image
37
+ [metadata]="fileSelected"
38
+ [width]="fileSelected?.width"
39
+ [height]="fileSelected?.height">
40
+ </chat-image>
41
+ </div>
42
+
43
+ <div *ngIf="conversation.type == 'text'" class="c21-box-text">
44
+ <chat-text
45
+ [text]="conversation?.last_message_text"
46
+ [fontSize]="stylesMap?.get('fontSize')"
47
+ [fontFamily]="stylesMap?.get('fontFamily')">
48
+ </chat-text>
49
+ </div> -->
50
+
51
+ <chat-bubble-message class="messages no-background"
52
+ [class.emoticon]="isEmojii(message?.text)"
53
+ [ngClass]="{'button-in-msg' : message?.metadata && message?.metadata?.button}"
54
+ [message]="message"
55
+ [fontColor]="stylesMap.get('bubbleReceivedTextColor')"
56
+ [fontSize]="stylesMap.get('fontSize')"
57
+ [fontFamily]="stylesMap.get('fontFamily')"
58
+ [stylesMap]="stylesMap">
59
+ </chat-bubble-message>
60
+
61
+ <div class="c21-icon-avatar">
62
+ <div class="c21-avatar-image profile_image">
63
+ <chat-avatar-image class="slide-in-left"
64
+ [senderID]="message?.sender"
65
+ [senderFullname]="message?.sender_fullname"
66
+ [baseLocation]="baseLocation">
67
+ </chat-avatar-image>
68
+ </div>
69
+ </div>
70
+
71
+ </div>
72
+
73
+ <div *ngIf="message.attributes && message.attributes.attachment " class="conversations-buttons">
74
+ <chat-message-attachment
75
+ style="height: 100%; display: block;"
76
+ [message]="message"
77
+ [isLastMessage] = "true"
78
+ [limit]="3"
79
+ [stylesMap]="stylesMap"
80
+ (onAttachmentButtonClicked)="onAttachmentButtonClicked($event)">
81
+ </chat-message-attachment>
79
82
  </div>
80
83
 
81
- </div>
84
+
85
+
86
+
87
+ <!-- <div class="c21-time c21-text">
88
+ <time *ngIf="conversation.timestamp !== '{.sv: timestamp}'" >{{conversation.timestamp | amTimeAgo}} </time>
89
+ </div> -->
90
+
91
+
92
+ </div>
82
93
 
83
94
  </div>
@@ -1,3 +1,5 @@
1
+ @import 'src/app/sass/variables';
2
+
1
3
  :host .c21-avatar-image ::ng-deep > chat-avatar-image {
2
4
 
3
5
  .c21-icon-avatar {
@@ -17,32 +19,39 @@
17
19
  }
18
20
 
19
21
  #messagePreview {
20
- position: relative;
21
- width: 320px;
22
- /* bottom: 90; */
23
- max-height: 200px;
24
- height: 100%;
25
- padding: 0px 10px 10px;
26
- background-color: transparent;
27
-
28
- font-family: "Helvetica Neue", "Apple Color Emoji", Helvetica, Arial, sans-serif;
29
- font-size: 100%;
30
- font-style: normal;
31
- letter-spacing: normal;
32
- font-stretch: normal;
33
- font-weight: normal;
34
- text-align: left;
35
- text-align-last: initial;
36
- text-indent: 0px;
37
- text-shadow: none;
38
- text-transform: none;
39
- box-sizing: content-box;
40
- -webkit-font-smoothing: antialiased;
41
- line-height: 1;
42
- font-variant: normal;
43
- }
44
-
45
- #new_message:hover {
22
+ // position: relative;
23
+ // width: 320px;
24
+ // /* bottom: 90; */
25
+ // max-height: 200px;
26
+ // height: 200px; //100%;
27
+ // padding: 0px 10px 10px;
28
+ // background-color: transparent;
29
+
30
+ // font-family: "Helvetica Neue", "Apple Color Emoji", Helvetica, Arial, sans-serif;
31
+ // font-size: 100%;
32
+ // font-style: normal;
33
+ // letter-spacing: normal;
34
+ // font-stretch: normal;
35
+ // font-weight: normal;
36
+ // text-align: left;
37
+ // text-align-last: initial;
38
+ // text-indent: 0px;
39
+ // text-shadow: none;
40
+ // text-transform: none;
41
+ // box-sizing: content-box;
42
+ // -webkit-font-smoothing: antialiased;
43
+ // line-height: 1;
44
+ // font-variant: normal;
45
+
46
+ position: fixed;
47
+ // right: 5px;
48
+ bottom: 90px;
49
+ // max-height: calc(100% - 75px);
50
+ width: 375px;
51
+ max-width: 100%;
52
+ }
53
+
54
+ #messagePreview:hover {
46
55
  .boxButtons {
47
56
  display: block;
48
57
  -webkit-animation: fade-in-dw-up 0.3s ease-in 0.0s;
@@ -50,17 +59,63 @@
50
59
  }
51
60
  }
52
61
 
62
+
63
+ .messages {
64
+ border-radius: $border-radius-bubble-message;
65
+ padding: 0;
66
+ word-wrap: break-word;
67
+
68
+ max-height: 160px;
69
+ display: flex;
70
+ overflow-y: auto;
71
+ // padding: 14px;
72
+ // padding: 6px 6px 6px 6px;
73
+ // box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
74
+ // -webkit-animation: heartbeat 1.5s ease-in-out both;
75
+ // animation: heartbeat 1.5s ease-in-out both;
76
+ &::-webkit-scrollbar {
77
+ width: 6px;
78
+ background-color: #00000000!important;
79
+ }
80
+
81
+ &:hover {
82
+ &::-webkit-scrollbar-track {
83
+ background-color: #f9f9f9 !important;
84
+ }
85
+
86
+ &::-webkit-scrollbar-thumb {
87
+ background: #777777;
88
+ }
89
+
90
+ }
91
+ }
92
+
93
+ .no-background{
94
+ background: transparent!important;
95
+ }
96
+
97
+ .emoticon {
98
+ background-color: transparent!important;
99
+ font-size: 4em;
100
+ margin: -15px 20px -10px 10px;
101
+ .message_innerhtml {
102
+ padding: 0;
103
+ margin: 0;
104
+ }
105
+ }
106
+
107
+
53
108
  .previewNewMessagge {
54
109
  position: relative;
55
110
  box-sizing: border-box;
56
111
  background-color: rgb(255, 255, 255);
57
- box-shadow: rgba(35, 47, 53, 0.09) 0px 2px 8px 0px;
112
+ box-shadow: rgba(0, 18, 46, 0.16) 0px 8px 12px 0px;
58
113
  clear: both;
59
114
  margin-left: 45px;
115
+ margin-right: 16px;
60
116
  margin-bottom: 8px;
61
- border-radius: 5px 5px 5px 0px;
62
- padding: 4;
63
- font-size: 14px;
117
+ border-radius: 12px 12px 12px 0px;
118
+ padding: 5px;
64
119
  }
65
120
 
66
121
  .previewNewMessagge::after {
@@ -77,22 +132,43 @@
77
132
 
78
133
  .c21-text.message_sender_fullname {
79
134
  font-size: 13px;
80
- padding: 0 10;
81
- margin: 4 0;
135
+ padding: 0px 10px;
136
+ margin: 4px 0px;
82
137
  clear: both;
83
138
  color: rgb(104, 104, 104);
84
139
  }
85
140
 
86
141
  .c21-box-text {
87
- max-height: 110;
142
+ max-height: 110px;
143
+ height: 100%;
144
+ width: 100%;
88
145
  overflow-y: auto;
146
+ overflow-x: hidden;
147
+ border-radius: 12px 12px 12px 0px;
148
+
149
+ &::-webkit-scrollbar {
150
+ width: 6px;
151
+ background-color: #00000000!important;
152
+ }
153
+
89
154
  }
90
155
 
156
+ .c21-box-text:hover {
157
+ &::-webkit-scrollbar-track {
158
+ background-color: #f9f9f9 !important;
159
+ }
160
+
161
+ &::-webkit-scrollbar-thumb {
162
+ background: #d3d6dc;
163
+ }
164
+ }
165
+
166
+
91
167
  .c21-text {
92
168
  font-size: 14px;
93
169
  color: black;
94
- padding: 0 10;
95
- margin: 0 0;// margin: 4 0;
170
+ padding: 0px 10px;
171
+ margin: 0px 0px;// margin: 4 0;
96
172
  line-height: 1.4;
97
173
  word-break: break-word;
98
174
  }
@@ -113,7 +189,7 @@
113
189
 
114
190
  .c21-text.c21-time {
115
191
  font-size: 13px;
116
- padding: 0 10;
192
+ padding: 0px 10px;
117
193
  clear: both;
118
194
  color: rgb(115, 115, 118);
119
195
  }
@@ -149,9 +225,10 @@
149
225
  }
150
226
 
151
227
  .headerPreviewMessage {
228
+ margin-right: 16px;
152
229
  position: relative;
153
230
  height: 40;// height: 50;
154
- margin: 10 0 0 50;
231
+ margin: 10px 0px 0px 50px;
155
232
  }
156
233
 
157
234
  .boxButtons {
@@ -192,18 +269,18 @@
192
269
  .buttonClose span {
193
270
  width: 32px;
194
271
  height: 32px;
195
- padding: 0;
272
+ padding: 0px;
196
273
  }
197
274
 
198
275
  .buttonClose span svg {
199
- padding: 6;
276
+ padding: 6px;
200
277
  }
201
278
 
202
279
  #new_message {
203
280
  position: absolute;
204
- left: 0;
205
- right: 10;
206
- bottom: 0;
281
+ left: 0px;
282
+ right: 10px;
283
+ bottom: 0px;
207
284
  }
208
285
 
209
286
  /* ==================== MOBILE VERSION ==================== */
@@ -1,11 +1,11 @@
1
- import { MarkedPipe } from './../../directives/marked.pipe';
1
+ import { MarkedPipe } from './../../pipe/marked.pipe';
2
2
  import { NO_ERRORS_SCHEMA } from '@angular/core';
3
3
  import { async, ComponentFixture, TestBed } from '@angular/core/testing';
4
4
  import { ImageRepoService } from '../../../chat21-core/providers/abstract/image-repo.service';
5
5
  import { Globals } from '../../utils/globals';
6
6
 
7
7
  import { LastMessageComponent } from './last-message.component';
8
- import { HtmlEntitiesEncodePipe } from '../../directives/html-entities-encode.pipe';
8
+ import { HtmlEntitiesEncodePipe } from '../../pipe/html-entities-encode.pipe';
9
9
 
10
10
  describe('LastMessageComponent', () => {
11
11
  let component: LastMessageComponent;