@chat21/chat21-ionic 3.0.78-rc.4 → 3.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -22
- package/package.json +1 -1
- package/src/app/app.component.scss +1 -2
- package/src/app/app.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +1 -8
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +10 -36
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +38 -106
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +2 -15
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +1 -1
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +1 -3
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +1 -5
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +15 -22
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +5 -25
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +1 -2
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +15 -14
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +5 -24
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +1 -6
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +13 -12
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +5 -26
- package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +2 -2
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +6 -16
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +0 -2
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +52 -78
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +20 -60
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +10 -14
- package/src/app/components/canned-response/canned-response.component.html +4 -4
- package/src/app/components/canned-response/canned-response.component.scss +1 -1
- package/src/app/components/canned-response/canned-response.component.ts +0 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +39 -54
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +30 -61
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +25 -9
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
- package/src/app/components/ddp-header/ddp-header.component.html +1 -1
- package/src/app/components/ddp-header/ddp-header.component.scss +0 -4
- package/src/app/components/project-item/project-item.component.html +149 -98
- package/src/app/components/project-item/project-item.component.scss +32 -39
- package/src/app/components/project-item/project-item.component.ts +3 -5
- package/src/app/components/utils/user-presence/user-presence.component.html +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.html +14 -24
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +3 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +43 -163
- package/src/app/pages/conversations-list/conversations-list.page.html +2 -2
- package/src/app/pages/conversations-list/conversations-list.page.scss +2 -2
- package/src/app/pages/conversations-list/conversations-list.page.ts +17 -8
- package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
- package/src/app/pages/loader-preview/loader-preview.page.scss +0 -4
- package/src/assets/i18n/ar.json +265 -268
- package/src/assets/i18n/az.json +0 -3
- package/src/assets/i18n/de.json +0 -3
- package/src/assets/i18n/en.json +0 -3
- package/src/assets/i18n/es.json +0 -3
- package/src/assets/i18n/fr.json +0 -3
- package/src/assets/i18n/it.json +0 -3
- package/src/assets/i18n/kk.json +0 -3
- package/src/assets/i18n/pt.json +0 -3
- package/src/assets/i18n/ru.json +0 -3
- package/src/assets/i18n/sr.json +0 -3
- package/src/assets/i18n/sv.json +0 -3
- package/src/assets/i18n/tr.json +0 -3
- package/src/assets/i18n/uk.json +0 -3
- package/src/assets/i18n/uz.json +0 -3
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +9 -7
- package/src/chat21-core/utils/constants.ts +0 -4
- package/src/chat21-core/utils/user-typing/user-typing.component.html +5 -8
- package/src/chat21-core/utils/user-typing/user-typing.component.scss +17 -87
- package/src/chat21-core/utils/user-typing/user-typing.component.ts +94 -12
- package/src/chat21-core/utils/utils.ts +1 -5
- package/src/global.scss +43 -47
- package/src/variables.scss +8 -19
|
@@ -113,14 +113,16 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
113
113
|
public lastConnectionDate: string
|
|
114
114
|
public showMessageWelcome: boolean
|
|
115
115
|
public openInfoConversation = false
|
|
116
|
+
public openInfoMessage: boolean // check is open info message
|
|
116
117
|
public isMobile = false
|
|
117
118
|
public isLessThan991px = false // nk added
|
|
119
|
+
public isTyping = false
|
|
120
|
+
public nameUserTypingNow: string
|
|
118
121
|
|
|
119
122
|
public heightMessageTextArea = ''
|
|
120
|
-
public
|
|
121
|
-
public translationsHeaderMap: Map<string, string> = new Map()
|
|
122
|
-
public translationsContentMap: Map<string, string> = new Map()
|
|
123
|
+
public translationMap: Map<string, string>
|
|
123
124
|
public conversationAvatar: any
|
|
125
|
+
public membersConversation: any
|
|
124
126
|
public member: UserModel
|
|
125
127
|
public urlConversationSupportGroup: any
|
|
126
128
|
public isFileSelected: boolean
|
|
@@ -146,6 +148,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
146
148
|
//SOUND
|
|
147
149
|
setTimeoutSound: any;
|
|
148
150
|
audio: any;
|
|
151
|
+
isOpenInfoConversation: boolean;
|
|
149
152
|
USER_HAS_OPENED_CLOSE_INFO_CONV: boolean = false;
|
|
150
153
|
isHovering: boolean = false;
|
|
151
154
|
conversation_count: number;
|
|
@@ -166,15 +169,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
166
169
|
public disableTextarea: boolean;
|
|
167
170
|
appsidebarIsWide: boolean;
|
|
168
171
|
|
|
169
|
-
// ========== begin:: typying =======
|
|
170
|
-
public isTypings = false;
|
|
171
|
-
public isDirect = false;
|
|
172
|
-
public idUserTypingNow: string;
|
|
173
|
-
public nameUserTypingNow: string;
|
|
174
|
-
private setTimeoutWritingMessages;
|
|
175
|
-
membersConversation = ['SYSTEM'];
|
|
176
|
-
// ========== end:: typying =======
|
|
177
|
-
|
|
178
172
|
/**
|
|
179
173
|
* Constructor
|
|
180
174
|
* @param route
|
|
@@ -243,7 +237,21 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
243
237
|
// -----------------------------------------------------------
|
|
244
238
|
ngOnInit() {
|
|
245
239
|
this.logger.log('[CONVS-DETAIL] > ngOnInit - window.location: ', window.location);
|
|
246
|
-
|
|
240
|
+
// this.logger.log('[CONVS-DETAIL] > ngOnInit - fileUploadAccept: ', this.appConfigProvider.getConfig().fileUploadAccept);
|
|
241
|
+
// const accept_files = this.appConfigProvider.getConfig().fileUploadAccept;
|
|
242
|
+
// this.logger.log('[CONVS-DETAIL] > ngOnInit - fileUploadAccept typeof accept_files ', typeof accept_files);
|
|
243
|
+
// const accept_files_array = accept_files.split(',')
|
|
244
|
+
// this.logger.log('[CONVS-DETAIL] > ngOnInit - fileUploadAccept accept_files_array ', accept_files_array);
|
|
245
|
+
// this.logger.log('[CONVS-DETAIL] > ngOnInit - fileUploadAccept accept_files_array typeof: ', typeof accept_files_array);
|
|
246
|
+
|
|
247
|
+
// accept_files_array.forEach(accept_file => {
|
|
248
|
+
// this.logger.log('[CONVS-DETAIL] > ngOnInit - fileUploadAccept accept_file ', accept_file);
|
|
249
|
+
// const accept_file_segment = accept_file.split('/')
|
|
250
|
+
// this.logger.log('[CONVS-DETAIL] > ngOnInit - fileUploadAccept accept_file_segment ', accept_file_segment);
|
|
251
|
+
// if (accept_file_segment[1] === '*') {
|
|
252
|
+
|
|
253
|
+
// }
|
|
254
|
+
// });
|
|
247
255
|
this.getConversations();
|
|
248
256
|
this.watchToConnectionStatus();
|
|
249
257
|
this.getOSCODE();
|
|
@@ -328,12 +336,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
328
336
|
// this.updateConversationBadge()
|
|
329
337
|
// }
|
|
330
338
|
if(conv.uid && conv.uid === this.conversationWith){
|
|
331
|
-
this.conversationAvatar = setConversationAvatar(
|
|
332
|
-
conv.conversation_with,
|
|
333
|
-
conv.conversation_with_fullname,
|
|
334
|
-
conv.channel_type,
|
|
335
|
-
conv.attributes['projectId'],
|
|
336
|
-
conv.attributes['project_name'])
|
|
339
|
+
this.conversationAvatar = setConversationAvatar(conv.conversation_with,conv.conversation_with_fullname,conv.channel_type)
|
|
337
340
|
}
|
|
338
341
|
|
|
339
342
|
}
|
|
@@ -471,7 +474,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
471
474
|
this.loggedUser = this.tiledeskAuthService.getCurrentUser()
|
|
472
475
|
this.logger.log('[CONVS-DETAIL] - initialize -> loggedUser: ', this.loggedUser)
|
|
473
476
|
this.translations()
|
|
474
|
-
this.setStyleMap()
|
|
475
477
|
// this.conversationSelected = localStorage.getItem('conversationSelected');
|
|
476
478
|
this.showButtonToBottom = false
|
|
477
479
|
this.showMessageWelcome = false
|
|
@@ -486,6 +488,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
486
488
|
|
|
487
489
|
this.messages = [] // list messages of conversation
|
|
488
490
|
this.isFileSelected = false // indicates if a file has been selected (image to upload)
|
|
491
|
+
this.openInfoMessage = false // indicates whether the info message panel is open
|
|
489
492
|
|
|
490
493
|
if (checkPlatformIsMobile()) {
|
|
491
494
|
this.isMobile = true
|
|
@@ -501,11 +504,13 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
501
504
|
if (checkWindowWidthIsLessThan991px()) {
|
|
502
505
|
this.logger.log('[CONVS-DETAIL] - initialize -> checkWindowWidthIsLessThan991px ', checkWindowWidthIsLessThan991px())
|
|
503
506
|
this.openInfoConversation = false // indica se è aperto il box info conversazione
|
|
504
|
-
this.
|
|
507
|
+
this.isOpenInfoConversation = false
|
|
508
|
+
this.logger.log('[CONVS-DETAIL] - initialize -> openInfoConversation ', this.openInfoConversation, ' -> isOpenInfoConversation ', this.isOpenInfoConversation)
|
|
505
509
|
} else {
|
|
506
510
|
this.logger.log('[CONVS-DETAIL] - initialize -> checkWindowWidthIsLessThan991px ', checkWindowWidthIsLessThan991px())
|
|
507
511
|
this.openInfoConversation = true
|
|
508
|
-
this.
|
|
512
|
+
this.isOpenInfoConversation = true
|
|
513
|
+
this.logger.log('[CONVS-DETAIL] - initialize -> openInfoConversation ', this.openInfoConversation, ' -> isOpenInfoConversation ', this.isOpenInfoConversation)
|
|
509
514
|
}
|
|
510
515
|
}
|
|
511
516
|
|
|
@@ -524,8 +529,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
524
529
|
this.addEventsKeyboard()
|
|
525
530
|
this.startConversation()
|
|
526
531
|
this.updateConversationBadge() // AGGIORNO STATO DELLA CONVERSAZIONE A 'LETTA' (is_new = false)
|
|
527
|
-
|
|
528
|
-
this.initializeTyping();
|
|
529
532
|
}
|
|
530
533
|
|
|
531
534
|
_getProjectIdByConversationWith(conversationWith: string) {
|
|
@@ -560,12 +563,22 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
560
563
|
})
|
|
561
564
|
}
|
|
562
565
|
|
|
566
|
+
returnOpenCloseInfoConversation(openInfoConversation: boolean) {
|
|
567
|
+
this.logger.log('[CONVS-DETAIL] returnOpenCloseInfoConversation - openInfoConversation ', openInfoConversation)
|
|
568
|
+
this.resizeTextArea()
|
|
569
|
+
this.openInfoMessage = false
|
|
570
|
+
this.openInfoConversation = openInfoConversation
|
|
571
|
+
this.isOpenInfoConversation = openInfoConversation
|
|
572
|
+
this.USER_HAS_OPENED_CLOSE_INFO_CONV = true
|
|
573
|
+
}
|
|
574
|
+
|
|
563
575
|
@HostListener('window:resize', ['$event'])
|
|
564
576
|
onResize(event: any) {
|
|
565
577
|
const newInnerWidth = event.target.innerWidth
|
|
566
578
|
if (newInnerWidth < 991) {
|
|
567
579
|
if (this.USER_HAS_OPENED_CLOSE_INFO_CONV === false) {
|
|
568
580
|
this.openInfoConversation = false
|
|
581
|
+
this.isOpenInfoConversation = false
|
|
569
582
|
}
|
|
570
583
|
}
|
|
571
584
|
}
|
|
@@ -584,7 +597,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
584
597
|
'LABEL_TO',
|
|
585
598
|
'LABEL_LAST_ACCESS',
|
|
586
599
|
'ARRAY_DAYS',
|
|
587
|
-
|
|
600
|
+
'LABEL_IS_WRITING',
|
|
588
601
|
'LABEL_INFO_ADVANCED',
|
|
589
602
|
'ID_CONVERSATION',
|
|
590
603
|
'UPLOAD_FILE_ERROR',
|
|
@@ -603,36 +616,11 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
603
616
|
'THERE_ARE_NO_CANNED_RESPONSES_AVAILABLE',
|
|
604
617
|
'TO_CREATE_THEM_GO_TO_THE_PROJECT',
|
|
605
618
|
"AddNewCannedResponse",
|
|
606
|
-
"LABEL_LOADING"
|
|
607
|
-
"DIRECT_CHAT",
|
|
608
|
-
"GROUP_CHAT",
|
|
609
|
-
]
|
|
610
|
-
|
|
611
|
-
const keysHeader = [
|
|
612
|
-
'DIRECT_CHAT',
|
|
613
|
-
'GROUP_CHAT',
|
|
614
|
-
'LABEL_IS_WRITING',
|
|
615
|
-
'LABEL_AVAILABLE',
|
|
616
|
-
'LABEL_NOT_AVAILABLE',
|
|
617
|
-
'LABEL_INACTIVE',
|
|
618
|
-
'LABEL_TODAY',
|
|
619
|
-
'LABEL_TOMORROW',
|
|
620
|
-
'LABEL_TO',
|
|
621
|
-
'LABEL_LAST_ACCESS',
|
|
622
|
-
'ARRAY_DAYS',
|
|
623
|
-
'Resolve',
|
|
624
|
-
]
|
|
625
|
-
|
|
626
|
-
const keysContentDetail = [
|
|
627
|
-
'LABEL_OPEN_INFO_CONVERSATION',
|
|
628
|
-
'LABEL_CLOSE_GROUP',
|
|
629
|
-
'LABEL_IS_WRITING',
|
|
619
|
+
"LABEL_LOADING"
|
|
630
620
|
]
|
|
631
621
|
|
|
632
|
-
this.
|
|
633
|
-
this.
|
|
634
|
-
this.translationsContentMap = this.customTranslateService.translateLanguage(keysContentDetail)
|
|
635
|
-
this.logger.log('[CONVS-DETAIL] x this.translationMap ',this.translationsMap)
|
|
622
|
+
this.translationMap = this.customTranslateService.translateLanguage(keys)
|
|
623
|
+
this.logger.log('[CONVS-DETAIL] x this.translationMap ',this.translationMap)
|
|
636
624
|
}
|
|
637
625
|
|
|
638
626
|
// --------------------------------------------------------
|
|
@@ -659,19 +647,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
659
647
|
return this.customTranslateService.translateLanguage(keys)
|
|
660
648
|
}
|
|
661
649
|
|
|
662
|
-
private setStyleMap(){
|
|
663
|
-
this.styleMap.set('themeColor', 'var(--basic-blue)')
|
|
664
|
-
.set('bubbleReceivedBackground','var(--bck-msg-received)')
|
|
665
|
-
.set('bubbleReceivedTextColor', 'var(--col-msg-received)')
|
|
666
|
-
.set('bubbleSentBackground', 'var(--bck-msg-sent)')
|
|
667
|
-
.set('bubbleSentTextColor', 'var(--col-msg-sent)')
|
|
668
|
-
.set('buttonFontSize','var(--button-in-msg-font-size)')
|
|
669
|
-
.set('buttonBackgroundColor', 'var(--buttonBackgroundColor)')
|
|
670
|
-
.set('buttonTextColor', 'var(--buttonTextColor)')
|
|
671
|
-
.set('buttonHoverBackgroundColor', 'var(--buttonHoverBackgroundColor)')
|
|
672
|
-
.set('buttonHoverTextColor', 'var(--buttonHoverTextColor)')
|
|
673
|
-
|
|
674
|
-
}
|
|
675
650
|
// -------------------------------------------------------------------------------------
|
|
676
651
|
// * retrieving the handler from chatManager
|
|
677
652
|
// * if it DOESN'T EXIST I create a handler and connect and store it in the chatmanager
|
|
@@ -774,8 +749,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
774
749
|
conv.conversation_with,
|
|
775
750
|
conv.conversation_with_fullname,
|
|
776
751
|
conv.channel_type,
|
|
777
|
-
conv.attributes['projectId'],
|
|
778
|
-
conv.attributes['project_name']
|
|
779
752
|
)
|
|
780
753
|
}
|
|
781
754
|
if(!conv){
|
|
@@ -788,8 +761,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
788
761
|
conv.conversation_with,
|
|
789
762
|
conv.conversation_with_fullname,
|
|
790
763
|
conv.channel_type,
|
|
791
|
-
conv.attributes['projectId'],
|
|
792
|
-
conv.attributes['project_name']
|
|
793
764
|
)
|
|
794
765
|
let duration = getDateDifference(conv.timestamp, Date.now())
|
|
795
766
|
duration.days > 10? this.disableTextarea = true: this.disableTextarea = false
|
|
@@ -808,8 +779,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
808
779
|
conv.conversation_with,
|
|
809
780
|
conv.conversation_with_fullname,
|
|
810
781
|
conv.channel_type,
|
|
811
|
-
conv.attributes['projectId'],
|
|
812
|
-
conv.attributes['project_name']
|
|
813
782
|
)
|
|
814
783
|
let duration = getDateDifference(conv.timestamp, Date.now())
|
|
815
784
|
duration.days > 10? this.disableTextarea = true: this.disableTextarea = false
|
|
@@ -821,8 +790,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
821
790
|
conv.conversation_with,
|
|
822
791
|
conv.conversation_with_fullname,
|
|
823
792
|
conv.channel_type,
|
|
824
|
-
conv.attributes['projectId'],
|
|
825
|
-
conv.attributes['project_name']
|
|
826
793
|
)
|
|
827
794
|
}
|
|
828
795
|
this.logger.log('[CONVS-DETAIL] - setHeaderContent > conversationAvatar: ', this.conversationAvatar)
|
|
@@ -1010,22 +977,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1010
977
|
this.subscriptions.push(subscribe)
|
|
1011
978
|
}
|
|
1012
979
|
|
|
1013
|
-
subscriptionKey = 'conversationTyping';
|
|
1014
|
-
subscription = this.subscriptions.find(item => item.key === subscriptionKey);
|
|
1015
|
-
if (!subscription) {
|
|
1016
|
-
subscription = this.typingService.BSIsTyping.pipe(takeUntil(this.unsubscribe$)).subscribe((data: any) => {
|
|
1017
|
-
this.logger.debug('[CONVS-DETAIL] ***** BSIsTyping *****', data);
|
|
1018
|
-
if (data) {
|
|
1019
|
-
const isTypingUid = data.uid; //support-group-...
|
|
1020
|
-
if (this.conversationWith === isTypingUid) {
|
|
1021
|
-
that.subscribeTypings(data);
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
});
|
|
1025
|
-
const subscribe = {key: subscriptionKey, value: subscription };
|
|
1026
|
-
this.subscriptions.push(subscribe);
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
980
|
// subscriptionKey = 'onGroupChange';
|
|
1030
981
|
// subscription = this.subscriptions.find(item => item.key === subscriptionKey);
|
|
1031
982
|
// if (!subscription) {
|
|
@@ -1073,9 +1024,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1073
1024
|
this.conversationAvatar = setConversationAvatar(
|
|
1074
1025
|
this.conversationWith,
|
|
1075
1026
|
this.conversationWithFullname,
|
|
1076
|
-
this.channelType
|
|
1077
|
-
this.conversation.attributes['projectId'],
|
|
1078
|
-
this.conversation.attributes['project_name']
|
|
1027
|
+
this.channelType
|
|
1079
1028
|
)
|
|
1080
1029
|
|
|
1081
1030
|
}
|
|
@@ -1252,17 +1201,13 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1252
1201
|
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea --> beforeSlash', beforeSlash)
|
|
1253
1202
|
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea --> afterSlash', afterSlash)
|
|
1254
1203
|
|
|
1255
|
-
console.log('bbbbbbb', beforeSlash[beforeSlash.length-1].indexOf(' '), afterSlash === '', this.HIDE_CANNED_RESPONSES)
|
|
1256
1204
|
|
|
1257
1205
|
if(beforeSlash[beforeSlash.length-1].indexOf(' ') >= 0 && afterSlash === ''){
|
|
1258
1206
|
this.HIDE_CANNED_RESPONSES = false
|
|
1259
|
-
console.log('bbbbbbb 1111', beforeSlash[beforeSlash.length-1])
|
|
1260
1207
|
} else if(beforeSlash[beforeSlash.length-1].indexOf(' ') < 0 && afterSlash === '' ){
|
|
1261
1208
|
this.HIDE_CANNED_RESPONSES = true
|
|
1262
|
-
console.log('bbbbbbb 22222', beforeSlash[beforeSlash.length-1])
|
|
1263
1209
|
} else if(beforeSlash[beforeSlash.length-1].indexOf(' ') >= 0 && afterSlash === ' '){
|
|
1264
1210
|
this.HIDE_CANNED_RESPONSES = true
|
|
1265
|
-
console.log('bbbbbbb 33333', beforeSlash[beforeSlash.length-1])
|
|
1266
1211
|
// this.tagsCannedFilter = []
|
|
1267
1212
|
}
|
|
1268
1213
|
}
|
|
@@ -1552,13 +1497,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1552
1497
|
}
|
|
1553
1498
|
}
|
|
1554
1499
|
|
|
1555
|
-
onOpenCloseInfoConversation(event){
|
|
1556
|
-
this.logger.log('[CONVS-DETAIL] onOpenCloseInfoConversation - openInfoConversation ', event)
|
|
1557
|
-
this.resizeTextArea()
|
|
1558
|
-
this.openInfoConversation = event
|
|
1559
|
-
this.USER_HAS_OPENED_CLOSE_INFO_CONV = true
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
1500
|
// -------------- START SCROLL/RESIZE -------------- //
|
|
1563
1501
|
/** */
|
|
1564
1502
|
resizeTextArea() {
|
|
@@ -1660,7 +1598,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1660
1598
|
this.heightMessageTextArea = '57' // NK edited
|
|
1661
1599
|
}
|
|
1662
1600
|
}
|
|
1663
|
-
|
|
1664
1601
|
checkAcceptedFile(draggedFileMimeType) {
|
|
1665
1602
|
let isAcceptFile = false
|
|
1666
1603
|
this.logger.log('[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept: ',this.appConfigProvider.getConfig().fileUploadAccept)
|
|
@@ -1710,63 +1647,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1710
1647
|
return isAcceptFile
|
|
1711
1648
|
}
|
|
1712
1649
|
}
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
initializeTyping() {
|
|
1716
|
-
this.logger.debug('[CONVS-DETAIL] membersconversation', this.membersConversation)
|
|
1717
|
-
this.membersConversation.push(this.loggedUser.uid)
|
|
1718
|
-
//this.setSubscriptions();
|
|
1719
|
-
this.typingService.isTyping(this.conversationWith, this.loggedUser.uid, this.isDirect);
|
|
1720
|
-
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
|
-
/** */
|
|
1724
|
-
subscribeTypings(data: any) {
|
|
1725
|
-
const that = this;
|
|
1726
|
-
try {
|
|
1727
|
-
const key = data.uidUserTypingNow;
|
|
1728
|
-
const waitTime = data.waitTime
|
|
1729
|
-
this.nameUserTypingNow = null;
|
|
1730
|
-
this.idUserTypingNow = null;
|
|
1731
|
-
|
|
1732
|
-
if (data.nameUserTypingNow) {
|
|
1733
|
-
this.nameUserTypingNow = data.nameUserTypingNow;
|
|
1734
|
-
}
|
|
1735
|
-
if (data.uidUserTypingNow){
|
|
1736
|
-
this.idUserTypingNow = data.uidUserTypingNow
|
|
1737
|
-
}
|
|
1738
|
-
this.logger.debug('[CONV-COMP] subscribeTypings data:', data);
|
|
1739
|
-
const userTyping = this.membersConversation.includes(key);
|
|
1740
|
-
if ( !userTyping && key) {
|
|
1741
|
-
this.isTypings = true;
|
|
1742
|
-
setTimeout(function () {
|
|
1743
|
-
that.scrollBottom(0)
|
|
1744
|
-
}, 0);
|
|
1745
|
-
// clearTimeout(this.setTimeoutWritingMessages);
|
|
1746
|
-
this.setTimeoutWritingMessages = setTimeout(() => {
|
|
1747
|
-
that.isTypings = false;
|
|
1748
|
-
}, waitTime);
|
|
1749
|
-
// this.initiTimeout(waitTime)
|
|
1750
|
-
}
|
|
1751
|
-
} catch (error) {
|
|
1752
|
-
this.logger.error('[CONV-COMP] error: ', error);
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
}
|
|
1756
|
-
|
|
1757
|
-
initiTimeout(waitTime){
|
|
1758
|
-
const that = this;
|
|
1759
|
-
this.setTimeoutWritingMessages = setTimeout(() => {
|
|
1760
|
-
that.isTypings = false;
|
|
1761
|
-
}, waitTime);
|
|
1762
|
-
}
|
|
1763
|
-
|
|
1764
|
-
resetTimeout(){
|
|
1765
|
-
this.isTypings = false
|
|
1766
|
-
this.setTimeoutWritingMessages = null;
|
|
1767
|
-
clearTimeout(this.setTimeoutWritingMessages)
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
1650
|
// -------------------------------------------------------------
|
|
1771
1651
|
// DRAG FILE
|
|
1772
1652
|
// -------------------------------------------------------------
|
|
@@ -1826,7 +1706,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1826
1706
|
|
|
1827
1707
|
async presentToastOnlyImageFilesAreAllowedToDrag() {
|
|
1828
1708
|
const toast = await this.toastController.create({
|
|
1829
|
-
message: this.
|
|
1709
|
+
message: this.translationMap.get('FAILED_TO_UPLOAD_THE_FORMAT_IS_NOT_SUPPORTED'),
|
|
1830
1710
|
duration: 5000,
|
|
1831
1711
|
color: 'danger',
|
|
1832
1712
|
cssClass: 'toast-custom-class',
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
<ion-list>
|
|
23
23
|
|
|
24
24
|
<!-- supportMode && -->
|
|
25
|
-
<ion-item *ngIf="displayNewConvsItem && conversationType !=='archived' && supportMode" class="ion-no-padding open-iframe-item"
|
|
25
|
+
<ion-item *ngIf="displayNewConvsItem && conversationType !=='archived' && supportMode" class="ion-no-padding open-iframe-item">
|
|
26
26
|
<div tabindex="0"></div>
|
|
27
27
|
<!-- <ion-note class="pinned-project">
|
|
28
28
|
{{ 'PINNED_PROJECT' | translate }}
|
|
29
29
|
</ion-note> -->
|
|
30
30
|
|
|
31
31
|
<app-project-item
|
|
32
|
-
style="width: 100%;
|
|
32
|
+
style="width: 100%;"
|
|
33
33
|
(openUnsevedConvsEvent)="openUnsevedConversationIframe($event)"
|
|
34
34
|
(projectIdEvent)="getLastProjectId($event)">
|
|
35
35
|
</app-project-item>
|
|
@@ -43,7 +43,7 @@ ion-list {
|
|
|
43
43
|
|
|
44
44
|
ion-item {
|
|
45
45
|
cursor: pointer;
|
|
46
|
-
|
|
46
|
+
height: 64px;
|
|
47
47
|
position: relative;
|
|
48
48
|
display: flex;
|
|
49
49
|
text-decoration: none;
|
|
@@ -324,7 +324,7 @@ ion-list {
|
|
|
324
324
|
padding-left: 0px !important ;
|
|
325
325
|
padding-right: 0px !important;
|
|
326
326
|
// height: 55px !important;
|
|
327
|
-
|
|
327
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
|
328
328
|
--background-hover: #ffffff;
|
|
329
329
|
cursor:default !important;
|
|
330
330
|
}
|
|
@@ -502,6 +502,22 @@ export class ConversationListPage implements OnInit {
|
|
|
502
502
|
this.logger.log('[CONVS-LIST-PAGE] - subscribeLoggedUserLogout uidConvSelected ',this.uidConvSelected)
|
|
503
503
|
}
|
|
504
504
|
|
|
505
|
+
// ------------------------------------------------------------------------------------
|
|
506
|
+
// @ SUBSCRIBE TO CONVERSATION CHANGED ??????????? SEEMS NOT USED ?????????????????
|
|
507
|
+
// ------------------------------------------------------------------------------------
|
|
508
|
+
conversationsChanged = (conversations: ConversationModel[]) => {
|
|
509
|
+
this.numberOpenConv = this.conversationsHandlerService.countIsNew()
|
|
510
|
+
this.logger.log('[CONVS-LIST-PAGE] - conversationsChanged - NUMB OF CONVERSATIONS: ',this.numberOpenConv)
|
|
511
|
+
// console.log('conversationsChanged »»»»»»»»» uidConvSelected', that.conversations[0], that.uidConvSelected);
|
|
512
|
+
if (this.uidConvSelected && !this.conversationSelected) {
|
|
513
|
+
const conversationSelected = this.conversations.find((item) => item.uid === this.uidConvSelected)
|
|
514
|
+
if (conversationSelected) {
|
|
515
|
+
this.conversationSelected = conversationSelected
|
|
516
|
+
this.setUidConvSelected(this.uidConvSelected)
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
|
|
505
521
|
/**
|
|
506
522
|
* ::: subscribeChangedConversationSelected :::
|
|
507
523
|
* evento richiamato quando si seleziona un utente nell'elenco degli user
|
|
@@ -638,7 +654,7 @@ export class ConversationListPage implements OnInit {
|
|
|
638
654
|
* ::: setUidConvSelected :::
|
|
639
655
|
*/
|
|
640
656
|
setUidConvSelected(uidConvSelected: string, conversationType?: string) {
|
|
641
|
-
this.logger.log('[CONVS-LIST-PAGE] setuidCOnvSelected', uidConvSelected
|
|
657
|
+
this.logger.log('[CONVS-LIST-PAGE] setuidCOnvSelected', uidConvSelected)
|
|
642
658
|
this.uidConvSelected = uidConvSelected
|
|
643
659
|
// this.conversationsHandlerService.uidConvSelected = uidConvSelected;
|
|
644
660
|
if (uidConvSelected) {
|
|
@@ -737,13 +753,6 @@ export class ConversationListPage implements OnInit {
|
|
|
737
753
|
}
|
|
738
754
|
}
|
|
739
755
|
|
|
740
|
-
if(conversation.attributes && conversation.attributes['projectId']){
|
|
741
|
-
let project = localStorage.getItem(conversation.attributes['projectId'])
|
|
742
|
-
if(project){
|
|
743
|
-
project = JSON.parse(project)
|
|
744
|
-
conversation.attributes.project_name = project['name']
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
756
|
// if(conversation.conversation_with_fullname === 'Guest '){
|
|
748
757
|
// conversation.conversation_with_fullname = 'guest' + '#' + this.getUUidConversation(conversation.uid)
|
|
749
758
|
// }
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
<!-- fab placed to the (vertical) center and end -->
|
|
57
57
|
<ion-fab vertical="end" horizontal="end" slot="fixed" class="sendButton">
|
|
58
|
-
<ion-fab-button (click)="onSendMessage()">
|
|
58
|
+
<ion-fab-button color="primary" (click)="onSendMessage()">
|
|
59
59
|
<ion-icon name="send"></ion-icon>
|
|
60
60
|
</ion-fab-button>
|
|
61
61
|
</ion-fab>
|