@chat21/chat21-ionic 3.0.64-rc1 → 3.0.64

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 (37) hide show
  1. package/CHANGELOG.md +2 -5
  2. package/deploy_amazon_beta.sh +29 -0
  3. package/deploy_amazon_prod.sh +25 -0
  4. package/deploy_pre.sh +6 -78
  5. package/deploy_prod.sh +6 -57
  6. package/package.json +1 -6
  7. package/src/app/app.component.ts +57 -45
  8. package/src/app/app.module.ts +0 -1
  9. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +2 -2
  10. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +1 -0
  11. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +39 -2
  12. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +6 -18
  13. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +2 -2
  14. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +1 -1
  15. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +2 -2
  16. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +2 -2
  17. package/src/app/directives/safe-html.pipe.ts +2 -2
  18. package/src/app/pages/conversation-detail/conversation-detail.page.html +2 -4
  19. package/src/app/pages/conversation-detail/conversation-detail.page.ts +23 -12
  20. package/src/app/pages/conversations-list/conversations-list.page.html +12 -21
  21. package/src/app/pages/conversations-list/conversations-list.page.ts +191 -58
  22. package/src/app/pages/loader-preview/loader-preview.module.ts +2 -1
  23. package/src/app/shared/shared.module.ts +0 -4
  24. package/src/assets/js/chat21client.js +1 -1
  25. package/src/{chat-config-mqtt-ver-uploaded.json → chat-config-mqtt-localhost.json} +10 -6
  26. package/src/chat-config-mqtt.json +18 -28
  27. package/src/chat-config-native-mqtt.json +30 -0
  28. package/src/chat-config-pre.json +9 -13
  29. package/src/chat21-core/models/conversation.ts +1 -1
  30. package/src/chat21-core/providers/abstract/conversations-handler.service.ts +1 -1
  31. package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +8 -47
  32. package/src/chat21-core/utils/utils-message.ts +3 -2
  33. package/src/app/chatlib/conversation-detail/message/html/html.component.html +0 -1
  34. package/src/app/chatlib/conversation-detail/message/html/html.component.scss +0 -79
  35. package/src/app/chatlib/conversation-detail/message/html/html.component.spec.ts +0 -25
  36. package/src/app/chatlib/conversation-detail/message/html/html.component.ts +0 -33
  37. package/src/chat-config-pre-test.json +0 -37
@@ -18,18 +18,13 @@
18
18
 
19
19
  <!-- [width]="getMetadataSize(message.metadata).width"
20
20
  [height]="getMetadataSize(message.metadata).height" -->
21
- <chat-image *ngIf="isImage(message)"
22
- [metadata]="message.metadata"
23
- [width]="message.metadata.width"
24
- [height]="message.metadata.height"
25
- (onImageRendered)="onImageRenderedFN($event)">
21
+ <chat-image *ngIf="isImage(message)" [metadata]="message.metadata" [width]="message.metadata.width"
22
+ [height]="message.metadata.height" (onImageRendered)="onImageRenderedFN($event)">
26
23
  </chat-image>
27
24
 
28
25
  <!-- [width]="getMetadataSize(message.metadata).width" -->
29
26
  <!-- [height]="getMetadataSize(message.metadata).height"> -->
30
- <chat-frame *ngIf="isFrame(message)"
31
- [metadata]="message.metadata"
32
- [width]="message.metadata.width"
27
+ <chat-frame *ngIf="isFrame(message)" [metadata]="message.metadata" [width]="message.metadata.width"
33
28
  [height]="message.metadata.height">
34
29
  </chat-frame>
35
30
 
@@ -47,20 +42,13 @@
47
42
  <span> {{message.timestamp | amCalendar }} </span>
48
43
  </ng-template> -->
49
44
 
50
- <chat-text *ngIf="message?.type !=='html'"
51
- [text]="message?.text"
52
- [color]="textColor"
53
- [message]="message"
54
- [class.chat-text-emoticon]="message?.emoticon"
45
+ <chat-text [text]="message?.text" [color]="textColor" [message]="message"
46
+ [class.chat-text-emoticon]="message?.emoticon"
55
47
  (onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
56
48
  (onAfterMessageRender)="returnOnAfterMessageRender($event)">
57
49
  </chat-text>
58
50
 
59
- <chat-html *ngIf="message?.type==='html'"
60
- [htmlText]="message?.text">
61
- </chat-html>
62
-
63
- <ng-container *ngIf="areVisibleCAR && supportMode">
51
+ <ng-container *ngIf="areVisibleCAR && support_mode === true">
64
52
  <ion-button shape="round" size="small" class="btn-add-msg-as-canned-response" ion-button fill="clear"
65
53
  (click)="presentCreateCannedResponseModal()" tooltip="{{addAsCannedResponseTooltipText}}"
66
54
  [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() supportMode: boolean;
23
+ @Input() support_mode: 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 supportMode', this.supportMode)
92
+ this.logger.log('BUBBLE-MSG ngOnChanges support_mode', this.support_mode)
93
93
  if (this.message && this.message.metadata && typeof this.message.metadata === 'object') {
94
94
  this.getMetadataSize(this.message.metadata)
95
95
  }
@@ -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
  <!-- -------------------------------------------------------------------------- -->
@@ -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 && supportMode">
43
+ <ng-container *ngIf="areVisibleCAR && support_mode === true">
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 || supportMode === false}">
113
+ <div class="text-message" [ngClass]="{'text-message-no-cr': areVisibleCAR === false || support_mode === 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() supportMode: boolean;
49
+ @Input() support_mode: 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 supportMode ', this.supportMode)
160
+ this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges support_mode ', this.support_mode)
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.bypassSecurityTrustResourceUrl(html);
12
- return this.sanitizer.bypassSecurityTrustHtml(html);
11
+ // return this.sanitizer.bypassSecurityTrustHtml(html);
12
+ return this.sanitizer.bypassSecurityTrustResourceUrl(html);
13
13
 
14
14
  }
15
15
 
@@ -122,9 +122,7 @@
122
122
  [channelType]="channelType"
123
123
  [messages]="messages"
124
124
  [senderId]="loggedUser.uid"
125
- [baseLocation]="window?.location?.origin"
126
- [areVisibleCAR]="areVisibleCAR"
127
- [supportMode]= "supportMode"
125
+ [baseLocation]="window?.location?.origin"
128
126
  [stylesMap]="styleMap"
129
127
  (onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
130
128
  (onAfterMessageRender)="returnOnAfterMessageRender($event)"
@@ -178,7 +176,7 @@
178
176
  <app-message-text-area *ngIf="(openInfoConversation === false && isMobile === true) || (openInfoConversation === true && isMobile === false) || (openInfoConversation === false && isMobile === false)"
179
177
  [tagsCannedCount]="tagsCannedCount"
180
178
  [areVisibleCAR]="areVisibleCAR"
181
- [supportMode]="supportMode"
179
+ [support_mode]="support_mode"
182
180
  [loggedUser]="loggedUser"
183
181
  [conversationWith]="conversationWith"
184
182
  [tagsCannedFilter]="tagsCannedFilter"
@@ -143,7 +143,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
143
143
  arrowkeyLocation = -1
144
144
  public_Key: any;
145
145
  areVisibleCAR: boolean;
146
- supportMode: boolean;
146
+ support_mode: boolean;
147
147
  //SOUND
148
148
  setTimeoutSound: any;
149
149
  audio: any;
@@ -313,6 +313,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
313
313
  const conversations = this.conversationsHandlerService.conversations
314
314
  // console.log('[CONVS-DETAIL] conversations', conversations);
315
315
  this.conversation_count = conversations.length
316
+ this.logger.log('[CONVS-DETAIL] conversation_count', this.conversation_count)
316
317
  })
317
318
 
318
319
  this.conversationsHandlerService.conversationChanged.subscribe((conv) => {
@@ -320,6 +321,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
320
321
  const conversations = this.conversationsHandlerService.conversations
321
322
  // console.log('[CONVS-DETAIL] conversations', conversations);
322
323
  this.conversation_count = conversations.length
324
+ this.logger.log('[CONVS-DETAIL] conversation_count', this.conversation_count)
323
325
  if (conv && conv.sender !== this.loggedUser.uid) {
324
326
  this.logger.log('[CONVS-DETAIL] subscribe to BSConversationsChange data sender ', conv.sender)
325
327
  this.logger.log('[CONVS-DETAIL] subscribe to BSConversationsChange this.loggedUser.uid ', this.loggedUser.uid)
@@ -331,8 +333,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
331
333
  // ARE AT THE END
332
334
  this.updateConversationBadge()
333
335
  }
334
- if(conv.uid && conv.uid === this.conversationWith){
335
- this.conversationAvatar = setConversationAvatar(conv.conversation_with,conv.conversation_with_fullname,conv.channel_type)
336
+ if (conv.uid === this.conversationWith) {
337
+ this.conversationAvatar = setConversationAvatar(conv.conversation_with, conv.conversation_with_fullname, conv.channel_type)
336
338
  }
337
339
 
338
340
  }
@@ -352,15 +354,15 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
352
354
  }
353
355
 
354
356
  getOSCODE() {
355
- this.supportMode = null
357
+ this.support_mode = null
356
358
  if (this.appConfigProvider.getConfig().supportMode === true || this.appConfigProvider.getConfig().supportMode === 'true') {
357
- this.supportMode = true
359
+ this.support_mode = true
358
360
  } else if (this.appConfigProvider.getConfig().supportMode === false || this.appConfigProvider.getConfig().supportMode === 'false') {
359
- this.supportMode = false
361
+ this.support_mode = false
360
362
  } else if (!this.appConfigProvider.getConfig().supportMode) {
361
- this.supportMode = false
363
+ this.support_mode = false
362
364
  }
363
- this.logger.log('[CONVS-DETAIL] AppConfigService getAppConfig supportMode', this.supportMode)
365
+ this.logger.log('[CONVS-DETAIL] AppConfigService getAppConfig support_mode', this.support_mode)
364
366
  this.public_Key = this.appConfigProvider.getConfig().t2y12PruGU9wUtEGzBJfolMIgK
365
367
  this.logger.log('[CONVS-DETAIL] AppConfigService getAppConfig public_Key', this.public_Key)
366
368
 
@@ -373,17 +375,26 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
373
375
  let car = key.split(':')
374
376
  if (car[1] === 'F') {
375
377
  this.areVisibleCAR = false
376
- this.logger.log('[CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR',this.areVisibleCAR)
378
+ this.logger.log(
379
+ '[CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR',
380
+ this.areVisibleCAR,
381
+ )
377
382
  } else {
378
383
  this.areVisibleCAR = true
379
- this.logger.log('[CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR',this.areVisibleCAR)
384
+ this.logger.log(
385
+ '[CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR',
386
+ this.areVisibleCAR,
387
+ )
380
388
  }
381
389
  }
382
390
  })
383
391
 
384
392
  if (!this.public_Key.includes('CAR')) {
385
393
  this.areVisibleCAR = false
386
- this.logger.log('[CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR',this.areVisibleCAR)
394
+ this.logger.log(
395
+ '[CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR',
396
+ this.areVisibleCAR,
397
+ )
387
398
  }
388
399
  } else {
389
400
  this.areVisibleCAR = false
@@ -1116,7 +1127,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
1116
1127
  // ----------------------------------------------------------
1117
1128
  // DISPLAY CANNED RESPONSES if message.lastIndexOf("/")
1118
1129
  // ----------------------------------------------------------
1119
- if (this.areVisibleCAR && this.supportMode === true) {
1130
+ if (this.areVisibleCAR && this.support_mode === true) {
1120
1131
  setTimeout(() => {
1121
1132
  if (this.conversationWith.startsWith('support-group')) {
1122
1133
  const pos = message.lastIndexOf('/')
@@ -43,17 +43,16 @@
43
43
  <ion-label part="message-text" class="waiting-for-network-msg"> Waiting for network</ion-label>
44
44
  </ion-item>
45
45
  <!-- supportMode && -->
46
- <ion-item *ngIf="displayNewConvsItem && conversationType !=='archived' && supportMode" class="ion-no-padding open-iframe-item">
46
+ <ion-item *ngIf="displayNewConvsItem && conversationType !=='archived'" class="ion-no-padding open-iframe-item">
47
47
  <div tabindex="0"></div>
48
48
  <!-- <ion-note class="pinned-project">
49
49
  {{ 'PINNED_PROJECT' | translate }}
50
50
  </ion-note> -->
51
51
 
52
- <app-project-item
53
- style="width: 100%;"
54
- (openUnsevedConvsEvent)="openUnsevedConversationIframe($event)"
55
- (projectIdEvent)="getLastProjectId($event)">
56
- </app-project-item>
52
+ <app-project-item style="width: 100%;"
53
+ (openUnsevedConvsEvent)="openUnsevedConversationIframe($event)"
54
+ (projectIdEvent)="getLastProjectId($event)">
55
+ </app-project-item>
57
56
  </ion-item>
58
57
 
59
58
  <span
@@ -67,15 +66,10 @@
67
66
  <!-- ---------------------------------- -->
68
67
  <!-- ACTIVE CONVERSATION LIST -->
69
68
  <!-- ---------------------------------- -->
70
- <ion-list-conversations *ngIf="conversationType ==='active'"
71
- [uidConvSelected]="uidConvSelected"
72
- [listConversations]="conversations"
73
- [stylesMap]="stylesMap"
74
- [translationMap]="translationMapConversation"
75
- (onConversationSelected)=onConversationSelected($event)
76
- (onImageLoaded)="onImageLoaded($event)"
77
- (onConversationLoaded)="onConversationLoaded($event)"
78
- (onCloseConversation)="onCloseConversation($event)"
69
+ <ion-list-conversations *ngIf="conversationType ==='active'" [uidConvSelected]="uidConvSelected"
70
+ [listConversations]="conversations" [stylesMap]="stylesMap" [translationMap]="translationMapConversation"
71
+ (onConversationSelected)=onConversationSelected($event) (onImageLoaded)="onImageLoaded($event)"
72
+ (onConversationLoaded)="onConversationLoaded($event)" (onCloseConversation)="onCloseConversation($event)"
79
73
  [archiveActionNotAllowed]="archiveActionNotAllowed"
80
74
  (onCloseAlert)="onCloseAlert($event)">
81
75
  </ion-list-conversations>
@@ -83,12 +77,9 @@
83
77
  <!-- ---------------------------------- -->
84
78
  <!-- ARCHIVED CONVERSATION LIST -->
85
79
  <!-- ---------------------------------- -->
86
- <ion-list-conversations *ngIf="conversationType ==='archived'"
87
- [listConversations]="archivedConversations"
88
- [stylesMap]="stylesMap"
89
- [translationMap]="translationMapConversation"
90
- (onConversationSelected)=onConversationSelected($event)
91
- (onImageLoaded)="onImageLoaded($event)"
80
+ <ion-list-conversations *ngIf="conversationType ==='archived'" [listConversations]="archivedConversations"
81
+ [stylesMap]="stylesMap" [translationMap]="translationMapConversation"
82
+ (onConversationSelected)=onConversationSelected($event) (onImageLoaded)="onImageLoaded($event)"
92
83
  (onConversationLoaded)="onConversationLoaded($event)">
93
84
  </ion-list-conversations>
94
85
  </ng-template>