@chat21/chat21-web-widget 5.0.53-rc.2 → 5.0.53-rc.4

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 (55) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/angular.json +3 -4
  3. package/karma.conf.js +1 -0
  4. package/package.json +5 -5
  5. package/src/app/app-routing.module.ts +1 -1
  6. package/src/app/app.component.ts +18 -8
  7. package/src/app/app.module.ts +10 -8
  8. package/src/app/component/conversation-detail/conversation/conversation.component.ts +15 -1
  9. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.spec.ts +2 -2
  10. package/src/app/component/last-message/last-message.component.html +83 -72
  11. package/src/app/component/last-message/last-message.component.scss +98 -42
  12. package/src/app/component/last-message/last-message.component.spec.ts +2 -2
  13. package/src/app/component/last-message/last-message.component.ts +49 -25
  14. package/src/app/component/list-all-conversations/list-all-conversations.component.ts +1 -1
  15. package/src/app/component/message/bubble-message/bubble-message.component.html +0 -5
  16. package/src/app/component/message/html/html.component.spec.ts +1 -1
  17. package/src/app/component/message/info-message/info-message.component.spec.ts +1 -1
  18. package/src/app/component/message/text/text.component.scss +4 -0
  19. package/src/app/component/message/text/text.component.spec.ts +2 -2
  20. package/src/app/component/message-attachment/message-attachment.component.html +1 -1
  21. package/src/app/component/message-attachment/message-attachment.component.ts +2 -0
  22. package/src/app/{directives → pipe}/html-entites-encode.pipe.spec.ts +0 -0
  23. package/src/app/{directives → pipe}/html-entities-encode.pipe.ts +0 -0
  24. package/src/app/{directives → pipe}/marked.pipe.spec.ts +0 -0
  25. package/src/app/{directives → pipe}/marked.pipe.ts +0 -0
  26. package/src/app/{directives → pipe}/safe-html.pipe.spec.ts +0 -0
  27. package/src/app/{directives → pipe}/safe-html.pipe.ts +0 -0
  28. package/src/app/providers/events.service.spec.ts +16 -0
  29. package/src/app/providers/events.service.ts +76 -0
  30. package/src/app/providers/global-settings.service.ts +11 -12
  31. package/src/app/utils/globals.ts +4 -1
  32. package/src/app/utils/rules.ts +88 -5
  33. package/src/assets/js/chat21client.js +27 -4
  34. package/src/assets/twp/chatbot-panel.html +0 -5
  35. package/src/assets/twp/index-dev.html +3 -3
  36. package/src/assets/twp/index.html +4 -4
  37. package/src/chat21-core/models/conversation.ts +2 -2
  38. package/src/chat21-core/models/upload.ts +1 -0
  39. package/src/chat21-core/providers/abstract/notifications.service.ts +1 -1
  40. package/src/chat21-core/providers/abstract/presence.service.ts +1 -0
  41. package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +78 -106
  42. package/src/chat21-core/providers/firebase/firebase-notifications.ts +1 -1
  43. package/src/chat21-core/providers/firebase/firebase-presence.service.ts +4 -0
  44. package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +2 -29
  45. package/src/chat21-core/providers/mqtt/mqtt-notifications.ts +1 -1
  46. package/src/chat21-core/providers/mqtt/mqtt-presence.service.ts +13 -156
  47. package/src/chat21-core/providers/tiledesk/tiledesk-requests.service.ts +21 -4
  48. package/src/chat21-core/utils/utils-message.ts +36 -0
  49. package/src/iframe-style.css +2 -2
  50. package/src/launch.js +10 -6
  51. package/src/launch_old.js +446 -0
  52. package/src/main.ts +1 -0
  53. package/src/models/project.ts +4 -1
  54. package/src/models/rule.ts +18 -0
  55. package/src/base_script.html +0 -57
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # chat21-web-widget ver 5.0
2
2
 
3
+ ### 5.0.53-rc.4
4
+ - added: proactive rules from /widget/botsRules
5
+ - added: imHere method for presence service
6
+ - added: limit parameter to message-attachment component
7
+ - added: send message on attachment button clicked on last-message component
8
+ - added: events service
9
+ - added: /requests/messages tiledesk api
10
+ - added: convertConversationToMessage utils function in last-message component
11
+ - changed: last-message UI
12
+ - upgraded: chat21client.js to v0.1.12.4
13
+ - changed: pipe files moved from /directives folder to /pipe folder
14
+ - changed: moved isSender function from service to utils-message
15
+ - bug-fixed: location.href and document.title is wrong (about:srcdoc)
16
+ - bug-fixed: wait 2s before publish ImHere event to MQTT presence
17
+
18
+ ### 5.0.53-rc.3
19
+ - added: html descriptions to index.html and index-dev.html
20
+ - changed: script tag for style.css to link tag with rel="stylesheet"
21
+ - changed: binding to tiledesk iframe from scr to srcdoc
22
+ - removed: base_script.html
23
+ - removed: jquery plugin
24
+ - removed: relativeLinkResolution from forRoot in RooterModule
25
+
3
26
  ### 5.0.53-rc.2
4
27
  - added: angular 15 engine
5
28
  - added: custom tooltip directive
@@ -15,7 +38,6 @@
15
38
  - removed: document.write() injection
16
39
  - removed: unused html test file
17
40
 
18
-
19
41
  ### 5.0.52 in PROD
20
42
 
21
43
  ### 5.0.52-rc.4
package/angular.json CHANGED
@@ -46,7 +46,6 @@
46
46
  ],
47
47
  "scripts": [
48
48
  "src/assets/js/mqtt/4.2.6/mqtt.min.js",
49
- "node_modules/jquery/dist/jquery.min.js",
50
49
  "node_modules/bootstrap/dist/js/bootstrap.min.js",
51
50
  "node_modules/popper.js/dist/umd/popper.min.js"
52
51
  ],
@@ -55,7 +54,8 @@
55
54
  "buildOptimizer": false,
56
55
  "allowedCommonJsDependencies": [
57
56
  "rxjs-compat",
58
- "moment"
57
+ "moment",
58
+ "idb"
59
59
  ],
60
60
  "sourceMap": true,
61
61
  "optimization": false,
@@ -142,8 +142,7 @@
142
142
  "test": {
143
143
  "builder": "@angular-devkit/build-angular:karma",
144
144
  "options": {
145
- "main": "src/test.ts",
146
- "polyfills": "src/polyfills.ts",
145
+ "polyfills": ["zone.js", "zone.js/testing"],
147
146
  "tsConfig": "tsconfig.spec.json",
148
147
  "karmaConfig": "karma.conf.js",
149
148
  "assets": [
package/karma.conf.js CHANGED
@@ -7,6 +7,7 @@ module.exports = function (config) {
7
7
  frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
8
  plugins: [
9
9
  require('karma-jasmine'),
10
+ require('karma-coverage'),
10
11
  require('karma-chrome-launcher'),
11
12
  require('karma-jasmine-html-reporter'),
12
13
  require('karma-coverage-istanbul-reporter'),
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@chat21/chat21-web-widget",
3
3
  "author": "Tiledesk SRL",
4
- "version": "5.0.53-rc.2",
5
- "license": "MIT License",
4
+ "version": "5.0.53-rc.4",
5
+ "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
8
8
  "type": "git",
@@ -28,7 +28,7 @@
28
28
  "@angular/platform-browser": "^15.0.4",
29
29
  "@angular/platform-browser-dynamic": "^15.0.4",
30
30
  "@angular/router": "^15.0.4",
31
- "@ctrl/ngx-emoji-mart": "^5.1.2",
31
+ "@ctrl/ngx-emoji-mart": "^7.1.0",
32
32
  "@ngx-translate/core": "^14.0.0",
33
33
  "@ngx-translate/http-loader": "^4.0.0",
34
34
  "@popperjs/core": "^2.11.5",
@@ -38,7 +38,6 @@
38
38
  "file-saver": "^2.0.5",
39
39
  "firebase": "^8.6.7",
40
40
  "humanize-duration-ts": "^2.1.1",
41
- "jquery": "^3.6.0",
42
41
  "marked": "^4.0.16",
43
42
  "moment": "^2.29.3",
44
43
  "ngx-logger": "^5.0.11",
@@ -62,12 +61,13 @@
62
61
  "jasmine-spec-reporter": "~5.0.0",
63
62
  "karma": "~6.3.20",
64
63
  "karma-chrome-launcher": "~3.1.0",
64
+ "karma-coverage": "^2.2.0",
65
65
  "karma-coverage-istanbul-reporter": "~3.0.2",
66
66
  "karma-jasmine": "~4.0.0",
67
67
  "karma-jasmine-html-reporter": "^1.5.0",
68
68
  "protractor": "~7.0.0",
69
69
  "ts-node": "~7.0.0",
70
70
  "tslint": "~6.1.0",
71
- "typescript": "4.8.4"
71
+ "typescript": "^4.8.4"
72
72
  }
73
73
  }
@@ -5,7 +5,7 @@ import { Routes, RouterModule } from '@angular/router';
5
5
  const routes: Routes = [];
6
6
 
7
7
  @NgModule({
8
- imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' })],
8
+ imports: [RouterModule.forRoot(routes)],
9
9
  exports: [RouterModule]
10
10
  })
11
11
  export class AppRoutingModule { }
@@ -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';
@@ -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>