@chat21/chat21-ionic 3.0.63 → 3.0.65-rc1

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 (45) hide show
  1. package/CHANGELOG.md +18 -1
  2. package/deploy_amazon_beta.sh +29 -0
  3. package/deploy_amazon_prod.sh +26 -0
  4. package/deploy_pre.sh +5 -44
  5. package/deploy_prod.sh +6 -54
  6. package/package.json +6 -1
  7. package/publiccode.yml +110 -0
  8. package/src/app/app.component.ts +50 -59
  9. package/src/app/app.module.ts +1 -0
  10. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +2 -2
  11. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +0 -1
  12. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +2 -39
  13. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +18 -6
  14. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +2 -2
  15. package/src/app/chatlib/conversation-detail/message/html/html.component.html +1 -0
  16. package/src/app/chatlib/conversation-detail/message/html/html.component.scss +79 -0
  17. package/src/app/chatlib/conversation-detail/message/html/html.component.spec.ts +25 -0
  18. package/src/app/chatlib/conversation-detail/message/html/html.component.ts +33 -0
  19. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +1 -1
  20. package/src/app/chatlib/list-conversations-component/list-conversations/list-conversations.component.ts +0 -1
  21. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +1 -1
  22. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +19 -0
  23. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +116 -0
  24. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +2 -2
  25. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +2 -2
  26. package/src/app/directives/safe-html.pipe.ts +2 -2
  27. package/src/app/directives/truncate.pipe.spec.ts +8 -0
  28. package/src/app/directives/truncate.pipe.ts +16 -0
  29. package/src/app/pages/conversation-detail/conversation-detail.module.ts +3 -2
  30. package/src/app/pages/conversation-detail/conversation-detail.page.html +4 -2
  31. package/src/app/pages/conversation-detail/conversation-detail.page.ts +12 -23
  32. package/src/app/pages/conversations-list/conversations-list.page.html +21 -12
  33. package/src/app/pages/conversations-list/conversations-list.page.ts +104 -366
  34. package/src/app/pages/loader-preview/loader-preview.module.ts +1 -2
  35. package/src/app/shared/shared.module.ts +4 -0
  36. package/src/assets/js/chat21client.js +1 -1
  37. package/src/{chat-config-mqtt-ver-uploaded.json → chat-config-mqtt-localhost.json} +10 -6
  38. package/src/chat-config-mqtt.json +18 -28
  39. package/src/chat-config-native-mqtt.json +30 -0
  40. package/src/chat-config-pre.json +9 -13
  41. package/src/chat21-core/models/conversation.ts +1 -1
  42. package/src/chat21-core/providers/abstract/conversations-handler.service.ts +1 -1
  43. package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +65 -9
  44. package/src/chat21-core/utils/utils-message.ts +5 -6
  45. package/src/chat-config-pre-test.json +0 -37
@@ -22,12 +22,12 @@ export class IonConversationDetailComponent extends ConversationContentComponent
22
22
 
23
23
  @Input() senderId: string;
24
24
  @Input() channelType: string;
25
+ @Input() areVisibleCAR: boolean;
26
+ @Input() supportMode: boolean;
25
27
  @Output() onImageRendered = new EventEmitter<boolean>()
26
28
  @Output() onAddUploadingBubble = new EventEmitter<boolean>();
27
29
 
28
30
  public public_Key: any
29
- public areVisibleCAR: boolean
30
- public support_mode: boolean
31
31
  public uploadProgress: number = 100
32
32
  public fileType: any
33
33
  public browserLang: string;
@@ -64,48 +64,11 @@ export class IonConversationDetailComponent extends ConversationContentComponent
64
64
  }
65
65
 
66
66
  ngOnInit() {
67
- this.getOSCODE()
68
67
  this.listenToUploadFileProgress();
69
68
  this.setMomentLocaleAndGetTranslation();
70
69
  }
71
70
 
72
- getOSCODE() {
73
- this.support_mode = null
74
- if( this.appConfigProvider.getConfig().supportMode === true || this.appConfigProvider.getConfig().supportMode === 'true') {
75
- this.support_mode = true
76
- } else if ( this.appConfigProvider.getConfig().supportMode === false || this.appConfigProvider.getConfig().supportMode === 'false') {
77
- this.support_mode = false
78
- } else if ( !this.appConfigProvider.getConfig().supportMode ) {
79
- this.support_mode = false
80
- }
81
- this.public_Key = this.appConfigProvider.getConfig().t2y12PruGU9wUtEGzBJfolMIgK
82
- this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] AppConfigService getAppConfig public_Key', this.public_Key)
83
-
84
- if (this.public_Key) {
85
- let keys = this.public_Key.split('-')
86
- this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] PUBLIC-KEY - public_Key keys', keys)
87
-
88
- keys.forEach((key) => {
89
- if (key.includes('CAR')) {
90
- let car = key.split(':')
91
- if (car[1] === 'F') {
92
- this.areVisibleCAR = false
93
- this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR', this.areVisibleCAR)
94
- } else {
95
- this.areVisibleCAR = true
96
- this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR', this.areVisibleCAR)
97
- }
98
- }
99
- })
100
71
 
101
- if (!this.public_Key.includes('CAR')) {
102
- this.areVisibleCAR = false
103
- // console.log('[CONVS-DETAIL][ION-CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR', this.areVisibleCAR)
104
- }
105
- } else {
106
- this.areVisibleCAR = false
107
- }
108
- }
109
72
 
110
73
  setMomentLocaleAndGetTranslation() {
111
74
  this.browserLang = this.translate.getBrowserLang();
@@ -18,13 +18,18 @@
18
18
 
19
19
  <!-- [width]="getMetadataSize(message.metadata).width"
20
20
  [height]="getMetadataSize(message.metadata).height" -->
21
- <chat-image *ngIf="isImage(message)" [metadata]="message.metadata" [width]="message.metadata.width"
22
- [height]="message.metadata.height" (onImageRendered)="onImageRenderedFN($event)">
21
+ <chat-image *ngIf="isImage(message)"
22
+ [metadata]="message.metadata"
23
+ [width]="message.metadata.width"
24
+ [height]="message.metadata.height"
25
+ (onImageRendered)="onImageRenderedFN($event)">
23
26
  </chat-image>
24
27
 
25
28
  <!-- [width]="getMetadataSize(message.metadata).width" -->
26
29
  <!-- [height]="getMetadataSize(message.metadata).height"> -->
27
- <chat-frame *ngIf="isFrame(message)" [metadata]="message.metadata" [width]="message.metadata.width"
30
+ <chat-frame *ngIf="isFrame(message)"
31
+ [metadata]="message.metadata"
32
+ [width]="message.metadata.width"
28
33
  [height]="message.metadata.height">
29
34
  </chat-frame>
30
35
 
@@ -42,13 +47,20 @@
42
47
  <span> {{message.timestamp | amCalendar }} </span>
43
48
  </ng-template> -->
44
49
 
45
- <chat-text [text]="message?.text" [color]="textColor" [message]="message"
46
- [class.chat-text-emoticon]="message?.emoticon"
50
+ <chat-text *ngIf="message?.type !=='html'"
51
+ [text]="message?.text"
52
+ [color]="textColor"
53
+ [message]="message"
54
+ [class.chat-text-emoticon]="message?.emoticon"
47
55
  (onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
48
56
  (onAfterMessageRender)="returnOnAfterMessageRender($event)">
49
57
  </chat-text>
50
58
 
51
- <ng-container *ngIf="areVisibleCAR && support_mode === true">
59
+ <chat-html *ngIf="message?.type==='html'"
60
+ [htmlText]="message?.text">
61
+ </chat-html>
62
+
63
+ <ng-container *ngIf="areVisibleCAR && supportMode">
52
64
  <ion-button shape="round" size="small" class="btn-add-msg-as-canned-response" ion-button fill="clear"
53
65
  (click)="presentCreateCannedResponseModal()" tooltip="{{addAsCannedResponseTooltipText}}"
54
66
  [options]="tooltipOptions" placement="bottom">
@@ -20,7 +20,7 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
20
20
  @Input() message: MessageModel;
21
21
  @Input() textColor: string;
22
22
  @Input() areVisibleCAR: boolean;
23
- @Input() support_mode: boolean;
23
+ @Input() supportMode: boolean;
24
24
  @Output() onBeforeMessageRender = new EventEmitter();
25
25
  @Output() onAfterMessageRender = new EventEmitter();
26
26
  @Output() onImageRendered = new EventEmitter<boolean>()
@@ -89,7 +89,7 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
89
89
  ngOnChanges() {
90
90
  this.logger.log('BUBBLE-MSG Hello !!!! this.message ', this.message)
91
91
  this.logger.log('BUBBLE-MSG ngOnChanges areVisibleCAR', this.areVisibleCAR)
92
- this.logger.log('BUBBLE-MSG ngOnChanges support_mode', this.support_mode)
92
+ this.logger.log('BUBBLE-MSG ngOnChanges supportMode', this.supportMode)
93
93
  if (this.message && this.message.metadata && typeof this.message.metadata === 'object') {
94
94
  this.getMetadataSize(this.message.metadata)
95
95
  }
@@ -0,0 +1 @@
1
+ <div id="htmlCode" #htmlCode [innerHTML]="htmlText | safeHtml"></div>
@@ -0,0 +1,79 @@
1
+ // @import '../../../../sass/variables';
2
+
3
+ :root {
4
+ --themeColor: #62a8ea;
5
+ --foregroundColor: #ffffff;
6
+ --buttonFontSize: 12px;
7
+ }
8
+
9
+
10
+ ::ng-deep {
11
+
12
+ .button-html {
13
+ padding: 8px 16px!important;
14
+ position: relative;
15
+ max-width: 300px;
16
+ min-width: inherit;
17
+ cursor: pointer !important;
18
+ border: 1px solid #62a8ea;
19
+ border-radius: 20px;
20
+ margin: 3px;
21
+ background: transparent;
22
+ overflow: hidden;
23
+ font-family: 'Muli', sans-serif !important;
24
+ font-size: 12px !important;
25
+ -o-text-overflow: ellipsis;
26
+ text-overflow: ellipsis;
27
+ white-space: nowrap;
28
+ letter-spacing: -0.24px;
29
+ -webkit-font-smoothing: antialiased;
30
+ color: #62a8ea;
31
+ line-height: 16px;
32
+
33
+ }
34
+
35
+ .url {
36
+ transition: background-color .6s ease;
37
+ .icon-button-action {
38
+ position: absolute;
39
+ top: -1px;
40
+ right: 1px;
41
+ svg {
42
+ fill: #62a8ea;
43
+ }
44
+ }
45
+ .icon-button-action-self{
46
+ position: absolute;
47
+ right: 1px;
48
+ svg {
49
+ fill: #62a8ea;
50
+ }
51
+ }
52
+ &:focus,
53
+ &:hover {
54
+ color: white;
55
+ background: #62a8ea;
56
+ .icon-button-action, .icon-button-action-self {
57
+ svg {
58
+ fill: white;
59
+ }
60
+ }
61
+ }
62
+ &:active{
63
+ font-size: 20px;
64
+ }
65
+ }
66
+
67
+ .text-html{
68
+ font-size: 1.4em;
69
+ margin: 0;
70
+ padding: 8px;
71
+ font-style: normal;
72
+ letter-spacing: normal;
73
+ font-stretch: normal;
74
+ font-variant: normal;
75
+ font-weight: 300;
76
+ overflow: hidden;
77
+ }
78
+
79
+ }
@@ -0,0 +1,25 @@
1
+ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { HtmlComponent } from './html.component';
4
+
5
+ describe('HtmlComponent', () => {
6
+ let component: HtmlComponent;
7
+ let fixture: ComponentFixture<HtmlComponent>;
8
+
9
+ beforeEach(async(() => {
10
+ TestBed.configureTestingModule({
11
+ declarations: [ HtmlComponent ]
12
+ })
13
+ .compileComponents();
14
+ }));
15
+
16
+ beforeEach(() => {
17
+ fixture = TestBed.createComponent(HtmlComponent);
18
+ component = fixture.componentInstance;
19
+ fixture.detectChanges();
20
+ });
21
+
22
+ it('should create', () => {
23
+ expect(component).toBeTruthy();
24
+ });
25
+ });
@@ -0,0 +1,33 @@
1
+ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
2
+ import { Component, ElementRef, Input, OnInit, SimpleChange, SimpleChanges, ViewChild, ViewEncapsulation } from '@angular/core';
3
+
4
+ @Component({
5
+ selector: 'chat-html',
6
+ templateUrl: './html.component.html',
7
+ styleUrls: ['./html.component.scss']
8
+ })
9
+ export class HtmlComponent implements OnInit {
10
+
11
+ @Input() htmlText: string;
12
+ @Input() fontSize: string;
13
+ @Input() themeColor: string;
14
+ @Input() foregroundColor: string;
15
+
16
+ @ViewChild('htmlCode', {static: true}) container;
17
+
18
+ constructor(private elementRef: ElementRef) { }
19
+
20
+ ngOnInit(){
21
+
22
+ }
23
+
24
+ ngOnChanges(changes: SimpleChanges){
25
+ //decomment if element should have same color of themeColor and fregroundColor
26
+ if(this.fontSize) this.elementRef.nativeElement.style.setProperty('--buttonFontSize', this.fontSize);
27
+ if(this.themeColor) this.elementRef.nativeElement.style.setProperty('--themeColor', this.themeColor);
28
+ if(this.foregroundColor) this.elementRef.nativeElement.style.setProperty('--foregroundColor', this.foregroundColor);
29
+ }
30
+
31
+
32
+
33
+ }
@@ -90,7 +90,7 @@
90
90
  <!-- <div *ngIf="getImageAvatar(conversation.sender)" #avatarImage class="avatar-profile" [style.background-image]="'url(' + getImageAvatar(conversation.sender) + ')'"></div> -->
91
91
  </ion-avatar>
92
92
  <ion-label>
93
- <div class="conversation_with truncate" [innerHTML]="conversation.conversation_with_fullname"></div>
93
+ <div class="conversation_with truncate">{{conversation.conversation_with_fullname}}</div>
94
94
  <div class="conversation_message truncate-conv-msg" [ngClass]="{'truncate-on-desktop': !isApp}">
95
95
 
96
96
  <!-- -------------------------------------------------------------------------- -->
@@ -59,7 +59,6 @@ export class ListConversationsComponent implements OnInit {
59
59
  public openConversationByID(conversation) {
60
60
  this.logger.log('[LISTCONVERSATIONS-W] openConversationByID: ', conversation);
61
61
  if (conversation) {
62
- this.logger.log(conversation.recipient_fullname)
63
62
  // this.conversationsService.updateIsNew(conversation);
64
63
  // this.conversationsService.updateConversationBadge();
65
64
  this.uidConvSelected = conversation.uid
@@ -32,7 +32,7 @@
32
32
  <!-- (click)="onOpenCloseInfoConversation()" -->
33
33
  <div *ngIf="conversationAvatar" class="tile-info-with"
34
34
  [ngClass]="{ 'tile-info-with-ios': platformName === 'ios' }">
35
- <span class="tile-username">{{ conversationAvatar.conversation_with_fullname }} </span>
35
+ <span class="tile-username">{{ conversationAvatar.conversation_with_fullname | truncate:50 }} </span>
36
36
  <!-- <span class="tile-username">{{ conversation_with_fullname }} </span> -->
37
37
 
38
38
  </div>
@@ -4,6 +4,25 @@ ion-header {
4
4
  border-bottom-style: solid;
5
5
  border-color: var(--light-gray);
6
6
  border-bottom-width: thin;
7
+ ion-toolbar{
8
+ height: 60px;
9
+ .flex-container{
10
+ display: flex;
11
+ }
12
+
13
+ .back-flex-container{
14
+ flex: 0 1 auto;
15
+ order: 0;
16
+ }
17
+ .user-info-flex-container{
18
+ flex: 0 1 auto;
19
+ order: 1;
20
+ }
21
+ .resolve-flex-container{
22
+ flex: 0 1 auto;
23
+ order: 2;
24
+ }
25
+ }
7
26
  ion-title {
8
27
  text-align: left;
9
28
  height: 40px;
@@ -0,0 +1,116 @@
1
+ <ion-header no-border class="ion-no-border">
2
+ <ion-toolbar style="height:60px">
3
+ <div class="flex-container">
4
+ <div class="back-flex-container">
5
+ <ion-buttons slot="start" style="height:60px">
6
+ <!-- (click)="pushPage('conversations-list')" defaultHref="/conversations-list" -->
7
+ <ion-back-button style="display: block;" text="" *ngIf="isMobile" (click)="goBackToConversationList()">
8
+ </ion-back-button>
9
+ </ion-buttons>
10
+ </div>
11
+ <div class="user-info-flex-container">
12
+ <div style="display: flex;">
13
+ <div>1</div>
14
+ <div>2</div>
15
+ </div>
16
+ </div>
17
+
18
+ <div class="resolve-flex-container">
19
+ <ion-buttons slot="end">
20
+
21
+ <!-- <ion-button ion-button fill="clear" color="primary" size="small" (click)="presentCreateTicketModal()" [ngClass]="{'resolve-conv-margin-right': !isMobile}">
22
+ <ion-icon name="ticket-outline"></ion-icon>
23
+ <span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Crea ticket' | translate}} </span>
24
+ </ion-button> -->
25
+
26
+ <ion-button *ngIf="conversationUid?.startsWith('support-group') && conv_type !== 'archived'" ion-button fill="clear" color="primary" size="small"
27
+ (click)="closeConversation()" [ngClass]="{'resolve-conv-margin-right': !isMobile}" [disabled]="conv_closed === true">
28
+ <!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
29
+ <ion-icon name="archive-outline"></ion-icon>
30
+ <!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
31
+ <span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Resolve' | translate}} </span>
32
+ </ion-button>
33
+
34
+ <ion-button *ngIf="!openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
35
+ <!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
36
+ <ion-icon slot="icon-only" name="information-circle-outline"></ion-icon>
37
+ <!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
38
+
39
+ </ion-button>
40
+ <ion-button *ngIf="openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
41
+ <ion-icon slot="icon-only" name="close-circle-outline"></ion-icon>
42
+ </ion-button>
43
+
44
+ </ion-buttons>
45
+ </div>
46
+
47
+ </div>
48
+ </ion-toolbar>
49
+ </ion-header>
50
+
51
+
52
+
53
+
54
+ <ion-title [class.info-open]="openInfoConversation || openInfoMessage">
55
+
56
+ <div *ngIf="conversationAvatar" class="avatar-and-typing-wpr" >
57
+ <!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '55px' : '' }" -->
58
+ <div *ngIf="conversationAvatar" class="avatar-container" (click)="onOpenCloseInfoConversation()" style="cursor: pointer"
59
+ [ngClass]="{ 'avatar-container-ios': platformName === 'ios' }">
60
+ <app-avatar-profile [itemAvatar]=conversationAvatar></app-avatar-profile>
61
+ </div>
62
+ <!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '63px' : '' }" -->
63
+ <div *ngIf="isDirect" class="user-presence" [ngClass]="{ 'user-presence-ios': platformName === 'ios' }">
64
+ <app-user-presence [idUser]=conversationAvatar.conversation_with [translationMap]=translationMap
65
+ [borderColor]=borderColor [fontColor]=fontColor>
66
+ </app-user-presence>
67
+ </div>
68
+
69
+ <div *ngIf="conversationAvatar" class="user-typing">
70
+ <app-user-typing [idConversation]=conversationAvatar.uid [idCurrentUser]=idLoggedUser [isDirect]=isDirect
71
+ [translationMap]=translationMap [color]=fontColor [membersConversation]=membersConversation>
72
+ </app-user-typing>
73
+ </div>
74
+
75
+ </div>
76
+ <!-- [ngClass] = "{ 'tile-info-with-ios': platformName === 'ios' ? '82px' : ''82px'' }" -->
77
+ <!-- (click)="onOpenCloseInfoConversation()" -->
78
+ <div *ngIf="conversationAvatar" class="tile-info-with"
79
+ [ngClass]="{ 'tile-info-with-ios': platformName === 'ios' }">
80
+ <span class="tile-username">{{ conversationAvatar.conversation_with_fullname | truncate:50 }} </span>
81
+ <!-- <span class="tile-username">{{ conversation_with_fullname }} </span> -->
82
+
83
+ </div>
84
+
85
+ <!-- <div *ngIf="conversationWithFullname" class="tile-info-with" (click)="onOpenCloseInfoConversation()">
86
+ <span class="tile-username">{{ conversationWithFullname }} </span>
87
+ </div> -->
88
+
89
+ </ion-title>
90
+ <!-- openInfoConversation {{openInfoConversation}} -->
91
+ <ion-buttons slot="end">
92
+
93
+ <!-- <ion-button ion-button fill="clear" color="primary" size="small" (click)="presentCreateTicketModal()" [ngClass]="{'resolve-conv-margin-right': !isMobile}">
94
+ <ion-icon name="ticket-outline"></ion-icon>
95
+ <span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Crea ticket' | translate}} </span>
96
+ </ion-button> -->
97
+
98
+ <ion-button *ngIf="conversationUid?.startsWith('support-group') && conv_type !== 'archived'" ion-button fill="clear" color="primary" size="small"
99
+ (click)="closeConversation()" [ngClass]="{'resolve-conv-margin-right': !isMobile}" [disabled]="conv_closed === true">
100
+ <!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
101
+ <ion-icon name="archive-outline"></ion-icon>
102
+ <!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
103
+ <span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Resolve' | translate}} </span>
104
+ </ion-button>
105
+
106
+ <ion-button *ngIf="!openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
107
+ <!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
108
+ <ion-icon slot="icon-only" name="information-circle-outline"></ion-icon>
109
+ <!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
110
+
111
+ </ion-button>
112
+ <ion-button *ngIf="openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
113
+ <ion-icon slot="icon-only" name="close-circle-outline"></ion-icon>
114
+ </ion-button>
115
+
116
+ </ion-buttons>
@@ -40,7 +40,7 @@
40
40
 
41
41
  <div class="start-buttons" style="position: absolute;display: flex; top: 2px;">
42
42
 
43
- <ng-container *ngIf="areVisibleCAR && support_mode === true">
43
+ <ng-container *ngIf="areVisibleCAR && supportMode">
44
44
  <div class="canned-responses-btn-wpr" style="margin-left: -5px;"
45
45
  tooltip="{{translationMap?.get('CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top">
46
46
  <ion-button ion-button fill="clear" class="canned-responses-btn" (click)="openCannedResponses()"
@@ -110,7 +110,7 @@
110
110
 
111
111
 
112
112
 
113
- <div class="text-message" [ngClass]="{'text-message-no-cr': areVisibleCAR === false || support_mode === false}">
113
+ <div class="text-message" [ngClass]="{'text-message-no-cr': areVisibleCAR === false || supportMode === false}">
114
114
  <ion-textarea id="ion-textarea" #messageTextArea #message_text_area #textArea rows="1"
115
115
  [placeholder]="TEXAREA_PLACEHOLDER" autosize="false" auto-grow="true" autofocus="true" [value]=""
116
116
  [(ngModel)]="messageString" (ionChange)="ionChange($event);" [disabled]="disableTextarea"
@@ -46,7 +46,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
46
46
  @Input() tagsCannedFilter: any = [];
47
47
  @Input() tagsCannedCount: number;
48
48
  @Input() areVisibleCAR: boolean;
49
- @Input() support_mode: boolean;
49
+ @Input() supportMode: boolean;
50
50
  @Input() events: Observable<void>;
51
51
  @Input() fileUploadAccept: string
52
52
  @Input() isOpenInfoConversation: boolean;
@@ -157,7 +157,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
157
157
  } else {
158
158
  this.IS_SUPPORT_GROUP_CONVERSATION = false
159
159
  }
160
- this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges support_mode ', this.support_mode)
160
+ this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges supportMode ', this.supportMode)
161
161
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges disableTextarea ', this.disableTextarea)
162
162
  this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges DROP EVENT ", this.dropEvent);
163
163
  this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges tagsCannedFilter ", this.tagsCannedFilter);
@@ -8,8 +8,8 @@ export class SafeHtmlPipe implements PipeTransform {
8
8
 
9
9
  transform(html) {
10
10
  // console.log('SafeHtmlPipe html ', html)
11
- // return this.sanitizer.bypassSecurityTrustHtml(html);
12
- return this.sanitizer.bypassSecurityTrustResourceUrl(html);
11
+ // return this.sanitizer.bypassSecurityTrustResourceUrl(html);
12
+ return this.sanitizer.bypassSecurityTrustHtml(html);
13
13
 
14
14
  }
15
15
 
@@ -0,0 +1,8 @@
1
+ import { TruncatePipe } from './truncate.pipe';
2
+
3
+ describe('TruncatePipe', () => {
4
+ it('create an instance', () => {
5
+ const pipe = new TruncatePipe();
6
+ expect(pipe).toBeTruthy();
7
+ });
8
+ });
@@ -0,0 +1,16 @@
1
+ import { Pipe, PipeTransform } from '@angular/core';
2
+
3
+ @Pipe({
4
+ name: 'truncate'
5
+ })
6
+ export class TruncatePipe implements PipeTransform {
7
+
8
+ transform(value: string, character: number): any {
9
+ console.log('stringggg', value, character)
10
+ if(value && value.length > character)
11
+ return value.substring(0, character) + ' ...'
12
+ else
13
+ return value;
14
+ }
15
+
16
+ }
@@ -1,3 +1,4 @@
1
+ import { TruncatePipe } from './../../directives/truncate.pipe';
1
2
  import { IonConversationDetailComponent } from '../../chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component';
2
3
  import { TooltipModule } from 'ng2-tooltip-directive';
3
4
  import { NgModule } from '@angular/core';
@@ -32,7 +33,6 @@ import { InfoGroupComponent } from 'src/app/components/conversation-info/info-gr
32
33
 
33
34
 
34
35
  import { SharedModule } from 'src/app/shared/shared.module';
35
- // import { SharedConversationInfoModule } from 'src/app/shared/shared-conversation-info.module';
36
36
  import { NgxLinkifyjsModule } from 'ngx-linkifyjs';
37
37
  import { ScrollbarThemeModule } from '../../utils/scrollbar-theme.directive';
38
38
  import { PickerModule } from '@ctrl/ngx-emoji-mart';
@@ -62,7 +62,7 @@ import { PickerModule } from '@ctrl/ngx-emoji-mart';
62
62
  declarations: [
63
63
  ConversationDetailPage,
64
64
  HeaderConversationDetailComponent,
65
- MessageTextAreaComponent
65
+ MessageTextAreaComponent,
66
66
  // BubbleDayMessageComponent,
67
67
  // BubbleSystemMessageComponent,
68
68
  // BubbleMyMessageComponent,
@@ -71,6 +71,7 @@ import { PickerModule } from '@ctrl/ngx-emoji-mart';
71
71
  // InfoSupportGroupComponent,
72
72
  // InfoDirectComponent,
73
73
  // InfoGroupComponent,
74
+ TruncatePipe
74
75
  ]
75
76
  })
76
77
  export class ConversationDetailPageModule {}
@@ -122,7 +122,9 @@
122
122
  [channelType]="channelType"
123
123
  [messages]="messages"
124
124
  [senderId]="loggedUser.uid"
125
- [baseLocation]="window?.location?.origin"
125
+ [baseLocation]="window?.location?.origin"
126
+ [areVisibleCAR]="areVisibleCAR"
127
+ [supportMode]= "supportMode"
126
128
  [stylesMap]="styleMap"
127
129
  (onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
128
130
  (onAfterMessageRender)="returnOnAfterMessageRender($event)"
@@ -176,7 +178,7 @@
176
178
  <app-message-text-area *ngIf="(openInfoConversation === false && isMobile === true) || (openInfoConversation === true && isMobile === false) || (openInfoConversation === false && isMobile === false)"
177
179
  [tagsCannedCount]="tagsCannedCount"
178
180
  [areVisibleCAR]="areVisibleCAR"
179
- [support_mode]="support_mode"
181
+ [supportMode]="supportMode"
180
182
  [loggedUser]="loggedUser"
181
183
  [conversationWith]="conversationWith"
182
184
  [tagsCannedFilter]="tagsCannedFilter"