@chat21/chat21-ionic 3.0.82-rc.7 → 3.0.83
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 +9 -99
- package/README.md +2 -2
- package/package.json +3 -4
- package/src/app/app.component.html +1 -7
- package/src/app/app.component.scss +2 -20
- package/src/app/app.component.ts +18 -129
- package/src/app/app.module.ts +1 -3
- 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 +23 -77
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +88 -171
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +2 -40
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +24 -11
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +10 -6
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.spec.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +25 -16
- 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/frame/frame.component.html +2 -8
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.scss +0 -36
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/html/html.component.ts +1 -0
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +2 -3
- package/src/app/chatlib/conversation-detail/message/image/image.component.scss +5 -17
- package/src/app/chatlib/conversation-detail/message/image/image.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +2 -3
- 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.scss +3 -1
- 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 -63
- 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 +9 -9
- package/src/app/components/canned-response/canned-response.component.scss +7 -14
- package/src/app/components/canned-response/canned-response.component.ts +6 -1
- package/src/app/components/contacts-directory/contacts-directory.component.html +26 -22
- package/src/app/components/contacts-directory/contacts-directory.component.scss +6 -8
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +3 -0
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +21 -0
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +24 -0
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +14 -0
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +54 -0
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +98 -0
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.spec.ts → conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts} +6 -6
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +84 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +30 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +83 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +24 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +68 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +3 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +10 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +24 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +14 -0
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +42 -61
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +61 -98
- 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.html +8 -17
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +90 -24
- package/src/app/components/conversation-detail/option-header/option-header.component.html +13 -0
- package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
- package/src/app/components/{conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.spec.ts → conversation-detail/option-header/option-header.component.spec.ts} +5 -5
- package/src/app/components/{conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.ts → conversation-detail/option-header/option-header.component.ts} +4 -5
- package/src/app/components/conversation-info/info-content/info-content.component.html +4 -8
- package/src/app/components/conversation-info/info-content/info-content.component.ts +6 -3
- package/src/app/components/conversation-info/info-direct/info-direct.component.html +13 -7
- package/src/app/components/conversation-info/info-direct/info-direct.component.scss +0 -23
- package/src/app/components/conversation-info/info-direct/info-direct.component.ts +6 -1
- package/src/app/components/conversation-info/info-group/info-group.component.html +108 -44
- package/src/app/components/conversation-info/info-group/info-group.component.scss +61 -101
- package/src/app/components/conversation-info/info-group/info-group.component.ts +0 -1
- package/src/app/components/conversation-info/info-support-group/info-support-group.component.html +1 -2
- package/src/app/components/conversation-info/info-support-group/info-support-group.component.ts +1 -0
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.html → ddp-header/ddp-header.component.html} +3 -3
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.scss → ddp-header/ddp-header.component.scss} +4 -16
- package/src/app/components/{navbar/navbar.component.spec.ts → ddp-header/ddp-header.component.spec.ts} +6 -6
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.ts → ddp-header/ddp-header.component.ts} +16 -7
- package/src/app/components/project-item/project-item.component.html +149 -98
- package/src/app/components/project-item/project-item.component.scss +35 -43
- package/src/app/components/project-item/project-item.component.ts +4 -16
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +5 -5
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +10 -23
- package/src/app/components/utils/user-presence/user-presence.component.html +2 -7
- package/src/app/components/utils/user-presence/user-presence.component.scss +18 -35
- package/src/app/components/utils/user-presence/user-presence.component.ts +10 -6
- package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
- package/src/app/pages/contacts-directory/contacts-directory.page.scss +0 -47
- package/src/app/pages/contacts-directory/contacts-directory.page.ts +0 -2
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +8 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.html +23 -41
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +250 -40
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +112 -186
- package/src/app/pages/conversations-list/conversations-list.page.html +8 -11
- package/src/app/pages/conversations-list/conversations-list.page.scss +2 -18
- package/src/app/pages/conversations-list/conversations-list.page.ts +22 -25
- package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
- 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/app/pages/loader-preview/loader-preview.page.ts +2 -1
- package/src/app/pages/profile-info/profile-info.page.html +4 -2
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +0 -42
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +0 -1
- package/src/app/services/canned-responses/canned-responses.service.ts +0 -26
- package/src/app/services/tiledesk/tiledesk.service.ts +25 -1
- package/src/app/services/websocket/websocket.service.ts +1 -1
- package/src/app/shared/shared.module.ts +33 -24
- package/src/assets/i18n/ar.json +265 -278
- package/src/assets/i18n/az.json +1 -14
- package/src/assets/i18n/de.json +2 -15
- package/src/assets/i18n/en.json +2 -15
- package/src/assets/i18n/es.json +2 -15
- package/src/assets/i18n/fr.json +1 -14
- package/src/assets/i18n/it.json +1 -14
- package/src/assets/i18n/kk.json +2 -15
- package/src/assets/i18n/pt.json +2 -15
- package/src/assets/i18n/ru.json +1 -14
- package/src/assets/i18n/sr.json +264 -277
- package/src/assets/i18n/sv.json +2 -15
- package/src/assets/i18n/tr.json +2 -15
- package/src/assets/i18n/uk.json +2 -15
- package/src/assets/i18n/uz.json +1 -14
- package/src/assets/js/chat21client.js +148 -175
- package/src/chat-config-mqtt-localhost.json +2 -2
- package/src/chat-config-native-mqtt.json +0 -3
- package/src/chat21-core/models/conversation.ts +1 -0
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +9 -7
- package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +8 -7
- package/src/chat21-core/utils/constants.ts +1 -6
- 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 +10 -38
- package/src/global.scss +255 -52
- package/src/index.html +9 -0
- package/src/variables.scss +10 -30
- package/deploy_amazon_beta.sh +0 -29
- package/deploy_amazon_prod.sh +0 -30
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +0 -116
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +0 -12
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +0 -14
- package/src/app/components/navbar/navbar.component.html +0 -103
- package/src/app/components/navbar/navbar.component.scss +0 -249
- package/src/app/components/navbar/navbar.component.ts +0 -190
- package/src/app/services/projects/projects.service.spec.ts +0 -12
- package/src/app/services/projects/projects.service.ts +0 -43
- package/src/assets/sounds/interface-start.mp3 +0 -0
- package/src/assets/sounds/wheep-wheep.mp3 +0 -0
- package/src/chat21-core/models/projects.ts +0 -27
- package/src/chat21-core/utils/convertRequestToConversation.ts +0 -41
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TYPE_DIRECT } from 'src/chat21-core/utils/constants';
|
|
2
|
-
import { URL_SOUND_LIST_CONVERSATION } from './../../../chat21-core/utils/constants'
|
|
2
|
+
import { TYPE_SUPPORT_GROUP, URL_SOUND_LIST_CONVERSATION } from './../../../chat21-core/utils/constants'
|
|
3
3
|
import {
|
|
4
4
|
Component,
|
|
5
5
|
OnInit,
|
|
@@ -115,14 +115,16 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
115
115
|
public lastConnectionDate: string
|
|
116
116
|
public showMessageWelcome: boolean
|
|
117
117
|
public openInfoConversation = false
|
|
118
|
+
public openInfoMessage: boolean // check is open info message
|
|
118
119
|
public isMobile = false
|
|
119
120
|
public isLessThan991px = false // nk added
|
|
121
|
+
public isTyping = false
|
|
122
|
+
public nameUserTypingNow: string
|
|
120
123
|
|
|
121
124
|
public heightMessageTextArea = ''
|
|
122
|
-
public
|
|
123
|
-
public translationsHeaderMap: Map<string, string> = new Map()
|
|
124
|
-
public translationsContentMap: Map<string, string> = new Map()
|
|
125
|
+
public translationMap: Map<string, string>
|
|
125
126
|
public conversationAvatar: any
|
|
127
|
+
public membersConversation: any
|
|
126
128
|
public member: UserModel
|
|
127
129
|
public urlConversationSupportGroup: any
|
|
128
130
|
public isFileSelected: boolean
|
|
@@ -148,6 +150,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
148
150
|
//SOUND
|
|
149
151
|
setTimeoutSound: any;
|
|
150
152
|
audio: any;
|
|
153
|
+
isOpenInfoConversation: boolean;
|
|
151
154
|
USER_HAS_OPENED_CLOSE_INFO_CONV: boolean = false;
|
|
152
155
|
isHovering: boolean = false;
|
|
153
156
|
conversation_count: number;
|
|
@@ -169,15 +172,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
169
172
|
public disableTextarea: boolean;
|
|
170
173
|
appsidebarIsWide: boolean;
|
|
171
174
|
|
|
172
|
-
// ========== begin:: typying =======
|
|
173
|
-
public isTypings = false;
|
|
174
|
-
public isDirect = false;
|
|
175
|
-
public idUserTypingNow: string;
|
|
176
|
-
public nameUserTypingNow: string;
|
|
177
|
-
private setTimeoutWritingMessages;
|
|
178
|
-
membersConversation = ['SYSTEM'];
|
|
179
|
-
// ========== end:: typying =======
|
|
180
|
-
|
|
181
175
|
/**
|
|
182
176
|
* Constructor
|
|
183
177
|
* @param route
|
|
@@ -246,7 +240,21 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
246
240
|
// -----------------------------------------------------------
|
|
247
241
|
ngOnInit() {
|
|
248
242
|
this.logger.log('[CONVS-DETAIL] > ngOnInit - window.location: ', window.location);
|
|
249
|
-
|
|
243
|
+
// this.logger.log('[CONVS-DETAIL] > ngOnInit - fileUploadAccept: ', this.appConfigProvider.getConfig().fileUploadAccept);
|
|
244
|
+
// const accept_files = this.appConfigProvider.getConfig().fileUploadAccept;
|
|
245
|
+
// this.logger.log('[CONVS-DETAIL] > ngOnInit - fileUploadAccept typeof accept_files ', typeof accept_files);
|
|
246
|
+
// const accept_files_array = accept_files.split(',')
|
|
247
|
+
// this.logger.log('[CONVS-DETAIL] > ngOnInit - fileUploadAccept accept_files_array ', accept_files_array);
|
|
248
|
+
// this.logger.log('[CONVS-DETAIL] > ngOnInit - fileUploadAccept accept_files_array typeof: ', typeof accept_files_array);
|
|
249
|
+
|
|
250
|
+
// accept_files_array.forEach(accept_file => {
|
|
251
|
+
// this.logger.log('[CONVS-DETAIL] > ngOnInit - fileUploadAccept accept_file ', accept_file);
|
|
252
|
+
// const accept_file_segment = accept_file.split('/')
|
|
253
|
+
// this.logger.log('[CONVS-DETAIL] > ngOnInit - fileUploadAccept accept_file_segment ', accept_file_segment);
|
|
254
|
+
// if (accept_file_segment[1] === '*') {
|
|
255
|
+
|
|
256
|
+
// }
|
|
257
|
+
// });
|
|
250
258
|
this.getConversations();
|
|
251
259
|
this.watchToConnectionStatus();
|
|
252
260
|
this.getOSCODE();
|
|
@@ -267,21 +275,21 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
267
275
|
// console.log('[CONVS-DETAIL] HAS CLICKED ENLARGE SIDEBAR WIDE chatAreaEle ', chatAreaEle)
|
|
268
276
|
|
|
269
277
|
if (event && event.data && event.data.action && event.data.action === 'openAppsSidebarWideMode' && event.data.parameter === true) {
|
|
270
|
-
this.logger.log('[CONVS-DETAIL]
|
|
278
|
+
this.logger.log('[CONVS-DETAIL] HERE YES 1')
|
|
271
279
|
this.appsidebarIsWide = true
|
|
272
280
|
// chat21InfoConversationEle.classList.add("info-convs-apps-sidebar-wide");
|
|
273
281
|
// chatAreaEle.classList.add("chat-area-apps-sidebar-wide");
|
|
274
282
|
}
|
|
275
283
|
|
|
276
284
|
if (event && event.data && event.data.action && event.data.action === 'openAppsSidebarWideMode' && event.data.parameter === false) {
|
|
277
|
-
this.logger.log('[CONVS-DETAIL]
|
|
285
|
+
this.logger.log('[CONVS-DETAIL] HERE YES 2')
|
|
278
286
|
this.appsidebarIsWide = false
|
|
279
287
|
// chat21InfoConversationEle.classList.remove("info-convs-apps-sidebar-wide");
|
|
280
288
|
// chatAreaEle.classList.remove("chat-area-apps-sidebar-wide");
|
|
281
289
|
}
|
|
282
290
|
|
|
283
291
|
if (event && event.data && event.data.action && event.data.action === 'closeAppsSidebarWideMode' && event.data.parameter === true) {
|
|
284
|
-
this.logger.log('[CONVS-DETAIL]
|
|
292
|
+
this.logger.log('[CONVS-DETAIL] HERE YES 3')
|
|
285
293
|
this.appsidebarIsWide = false
|
|
286
294
|
// chat21InfoConversationEle.classList.remove("info-convs-apps-sidebar-wide");
|
|
287
295
|
// chatAreaEle.classList.remove("chat-area-apps-sidebar-wide");
|
|
@@ -331,12 +339,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
331
339
|
// this.updateConversationBadge()
|
|
332
340
|
// }
|
|
333
341
|
if(conv.uid && conv.uid === this.conversationWith){
|
|
334
|
-
this.conversationAvatar = setConversationAvatar(
|
|
335
|
-
conv.conversation_with,
|
|
336
|
-
conv.conversation_with_fullname,
|
|
337
|
-
conv.channel_type,
|
|
338
|
-
conv.attributes['projectId'],
|
|
339
|
-
conv.attributes['project_name'])
|
|
342
|
+
this.conversationAvatar = setConversationAvatar(conv.conversation_with,conv.conversation_with_fullname,conv.channel_type)
|
|
340
343
|
}
|
|
341
344
|
|
|
342
345
|
}
|
|
@@ -474,7 +477,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
474
477
|
this.loggedUser = this.tiledeskAuthService.getCurrentUser()
|
|
475
478
|
this.logger.log('[CONVS-DETAIL] - initialize -> loggedUser: ', this.loggedUser)
|
|
476
479
|
this.translations()
|
|
477
|
-
this.setStyleMap()
|
|
478
480
|
// this.conversationSelected = localStorage.getItem('conversationSelected');
|
|
479
481
|
this.showButtonToBottom = false
|
|
480
482
|
this.showMessageWelcome = false
|
|
@@ -489,6 +491,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
489
491
|
|
|
490
492
|
this.messages = [] // list messages of conversation
|
|
491
493
|
this.isFileSelected = false // indicates if a file has been selected (image to upload)
|
|
494
|
+
this.openInfoMessage = false // indicates whether the info message panel is open
|
|
492
495
|
|
|
493
496
|
if (checkPlatformIsMobile()) {
|
|
494
497
|
this.isMobile = true
|
|
@@ -504,11 +507,13 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
504
507
|
if (checkWindowWidthIsLessThan991px()) {
|
|
505
508
|
this.logger.log('[CONVS-DETAIL] - initialize -> checkWindowWidthIsLessThan991px ', checkWindowWidthIsLessThan991px())
|
|
506
509
|
this.openInfoConversation = false // indica se è aperto il box info conversazione
|
|
507
|
-
this.
|
|
510
|
+
this.isOpenInfoConversation = false
|
|
511
|
+
this.logger.log('[CONVS-DETAIL] - initialize -> openInfoConversation ', this.openInfoConversation, ' -> isOpenInfoConversation ', this.isOpenInfoConversation)
|
|
508
512
|
} else {
|
|
509
513
|
this.logger.log('[CONVS-DETAIL] - initialize -> checkWindowWidthIsLessThan991px ', checkWindowWidthIsLessThan991px())
|
|
510
514
|
this.openInfoConversation = true
|
|
511
|
-
this.
|
|
515
|
+
this.isOpenInfoConversation = true
|
|
516
|
+
this.logger.log('[CONVS-DETAIL] - initialize -> openInfoConversation ', this.openInfoConversation, ' -> isOpenInfoConversation ', this.isOpenInfoConversation)
|
|
512
517
|
}
|
|
513
518
|
}
|
|
514
519
|
|
|
@@ -527,8 +532,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
527
532
|
this.addEventsKeyboard()
|
|
528
533
|
this.startConversation()
|
|
529
534
|
this.updateConversationBadge() // AGGIORNO STATO DELLA CONVERSAZIONE A 'LETTA' (is_new = false)
|
|
530
|
-
|
|
531
|
-
this.initializeTyping();
|
|
532
535
|
}
|
|
533
536
|
|
|
534
537
|
_getProjectIdByConversationWith(conversationWith: string) {
|
|
@@ -563,12 +566,22 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
563
566
|
})
|
|
564
567
|
}
|
|
565
568
|
|
|
569
|
+
returnOpenCloseInfoConversation(openInfoConversation: boolean) {
|
|
570
|
+
this.logger.log('[CONVS-DETAIL] returnOpenCloseInfoConversation - openInfoConversation ', openInfoConversation)
|
|
571
|
+
this.resizeTextArea()
|
|
572
|
+
this.openInfoMessage = false
|
|
573
|
+
this.openInfoConversation = openInfoConversation
|
|
574
|
+
this.isOpenInfoConversation = openInfoConversation
|
|
575
|
+
this.USER_HAS_OPENED_CLOSE_INFO_CONV = true
|
|
576
|
+
}
|
|
577
|
+
|
|
566
578
|
@HostListener('window:resize', ['$event'])
|
|
567
579
|
onResize(event: any) {
|
|
568
580
|
const newInnerWidth = event.target.innerWidth
|
|
569
581
|
if (newInnerWidth < 991) {
|
|
570
582
|
if (this.USER_HAS_OPENED_CLOSE_INFO_CONV === false) {
|
|
571
583
|
this.openInfoConversation = false
|
|
584
|
+
this.isOpenInfoConversation = false
|
|
572
585
|
}
|
|
573
586
|
}
|
|
574
587
|
}
|
|
@@ -587,7 +600,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
587
600
|
'LABEL_TO',
|
|
588
601
|
'LABEL_LAST_ACCESS',
|
|
589
602
|
'ARRAY_DAYS',
|
|
590
|
-
|
|
603
|
+
'LABEL_IS_WRITING',
|
|
591
604
|
'LABEL_INFO_ADVANCED',
|
|
592
605
|
'ID_CONVERSATION',
|
|
593
606
|
'UPLOAD_FILE_ERROR',
|
|
@@ -606,35 +619,11 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
606
619
|
'THERE_ARE_NO_CANNED_RESPONSES_AVAILABLE',
|
|
607
620
|
'TO_CREATE_THEM_GO_TO_THE_PROJECT',
|
|
608
621
|
"AddNewCannedResponse",
|
|
609
|
-
"LABEL_LOADING"
|
|
610
|
-
"DIRECT_CHAT",
|
|
611
|
-
"GROUP_CHAT",
|
|
622
|
+
"LABEL_LOADING"
|
|
612
623
|
]
|
|
613
624
|
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
'GROUP_CHAT',
|
|
617
|
-
'LABEL_IS_WRITING',
|
|
618
|
-
'LABEL_ONLINE',
|
|
619
|
-
'LABEL_OFFLINE',
|
|
620
|
-
'LABEL_TODAY',
|
|
621
|
-
'LABEL_TOMORROW',
|
|
622
|
-
'LABEL_TO',
|
|
623
|
-
'LABEL_LAST_ACCESS',
|
|
624
|
-
'ARRAY_DAYS',
|
|
625
|
-
'Resolve',
|
|
626
|
-
]
|
|
627
|
-
|
|
628
|
-
const keysContentDetail = [
|
|
629
|
-
'LABEL_OPEN_INFO_CONVERSATION',
|
|
630
|
-
'LABEL_CLOSE_GROUP',
|
|
631
|
-
'LABEL_IS_WRITING',
|
|
632
|
-
]
|
|
633
|
-
|
|
634
|
-
this.translationsMap = this.customTranslateService.translateLanguage(keys)
|
|
635
|
-
this.translationsHeaderMap = this.customTranslateService.translateLanguage(keysHeader)
|
|
636
|
-
this.translationsContentMap = this.customTranslateService.translateLanguage(keysContentDetail)
|
|
637
|
-
this.logger.log('[CONVS-DETAIL] x this.translationMap ',this.translationsMap)
|
|
625
|
+
this.translationMap = this.customTranslateService.translateLanguage(keys)
|
|
626
|
+
this.logger.log('[CONVS-DETAIL] x this.translationMap ',this.translationMap)
|
|
638
627
|
}
|
|
639
628
|
|
|
640
629
|
// --------------------------------------------------------
|
|
@@ -661,19 +650,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
661
650
|
return this.customTranslateService.translateLanguage(keys)
|
|
662
651
|
}
|
|
663
652
|
|
|
664
|
-
private setStyleMap(){
|
|
665
|
-
this.styleMap.set('themeColor', 'var(--basic-blue)')
|
|
666
|
-
.set('bubbleReceivedBackground','var(--bck-msg-received)')
|
|
667
|
-
.set('bubbleReceivedTextColor', 'var(--col-msg-received)')
|
|
668
|
-
.set('bubbleSentBackground', 'var(--bck-msg-sent)')
|
|
669
|
-
.set('bubbleSentTextColor', 'var(--col-msg-sent)')
|
|
670
|
-
.set('buttonFontSize','var(--button-in-msg-font-size)')
|
|
671
|
-
.set('buttonBackgroundColor', 'var(--buttonBackgroundColor)')
|
|
672
|
-
.set('buttonTextColor', 'var(--buttonTextColor)')
|
|
673
|
-
.set('buttonHoverBackgroundColor', 'var(--buttonHoverBackgroundColor)')
|
|
674
|
-
.set('buttonHoverTextColor', 'var(--buttonHoverTextColor)')
|
|
675
|
-
|
|
676
|
-
}
|
|
677
653
|
// -------------------------------------------------------------------------------------
|
|
678
654
|
// * retrieving the handler from chatManager
|
|
679
655
|
// * if it DOESN'T EXIST I create a handler and connect and store it in the chatmanager
|
|
@@ -759,18 +735,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
759
735
|
}
|
|
760
736
|
}
|
|
761
737
|
|
|
762
|
-
onConversationLoaded(conversation): ConversationModel{
|
|
763
|
-
if(conversation.attributes && conversation.attributes['projectId']){
|
|
764
|
-
let project = localStorage.getItem(conversation.attributes['projectId'])
|
|
765
|
-
if(project){
|
|
766
|
-
project = JSON.parse(project)
|
|
767
|
-
conversation.attributes.project_name = project['name']
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
}
|
|
771
|
-
return conversation
|
|
772
|
-
}
|
|
773
|
-
|
|
774
738
|
setHeaderContent() {
|
|
775
739
|
// this.logger.log('[CONVS-DETAIL] - setHeaderContent conversationWith', this.conversationWith)
|
|
776
740
|
// this.logger.log('[CONVS-DETAIL] - setHeaderContent conversationsHandlerService', this.conversationsHandlerService)
|
|
@@ -785,8 +749,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
785
749
|
conv.conversation_with,
|
|
786
750
|
conv.conversation_with_fullname,
|
|
787
751
|
conv.channel_type,
|
|
788
|
-
conv.attributes['projectId'],
|
|
789
|
-
conv.attributes['project_name']
|
|
790
752
|
)
|
|
791
753
|
}
|
|
792
754
|
if(!conv){
|
|
@@ -800,12 +762,9 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
800
762
|
conv.conversation_with,
|
|
801
763
|
conv.conversation_with_fullname,
|
|
802
764
|
conv.channel_type,
|
|
803
|
-
conv.attributes['projectId'],
|
|
804
|
-
conv.attributes['project_name']
|
|
805
765
|
)
|
|
806
766
|
let duration = getDateDifference(conv.timestamp, Date.now())
|
|
807
|
-
duration.days > 10 && conv.channel_type !== TYPE_DIRECT? this.disableTextarea = true: this.disableTextarea = false
|
|
808
|
-
}
|
|
767
|
+
duration.days > 10 && conv.channel_type !== TYPE_DIRECT? this.disableTextarea = true: this.disableTextarea = false }
|
|
809
768
|
})
|
|
810
769
|
}
|
|
811
770
|
this.logger.log('[CONVS-DETAIL] - setHeaderContent > conversationAvatar: ', this.conversationAvatar)
|
|
@@ -820,12 +779,9 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
820
779
|
conv.conversation_with,
|
|
821
780
|
conv.conversation_with_fullname,
|
|
822
781
|
conv.channel_type,
|
|
823
|
-
conv.attributes['projectId'],
|
|
824
|
-
conv.attributes['project_name']
|
|
825
782
|
)
|
|
826
783
|
let duration = getDateDifference(conv.timestamp, Date.now())
|
|
827
|
-
duration.days > 10 && conv.channel_type !== TYPE_DIRECT? this.disableTextarea = true: this.disableTextarea = false
|
|
828
|
-
}
|
|
784
|
+
duration.days > 10 && conv.channel_type !== TYPE_DIRECT? this.disableTextarea = true: this.disableTextarea = false }
|
|
829
785
|
if(!conv){
|
|
830
786
|
this.conversationsHandlerService.getConversationDetail(this.conversationWith, (conv) => {
|
|
831
787
|
if (conv) {
|
|
@@ -834,8 +790,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
834
790
|
conv.conversation_with,
|
|
835
791
|
conv.conversation_with_fullname,
|
|
836
792
|
conv.channel_type,
|
|
837
|
-
conv.attributes['projectId'],
|
|
838
|
-
conv.attributes['project_name']
|
|
839
793
|
)
|
|
840
794
|
}
|
|
841
795
|
this.logger.log('[CONVS-DETAIL] - setHeaderContent > conversationAvatar: ', this.conversationAvatar)
|
|
@@ -945,6 +899,37 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
945
899
|
let subscription: any
|
|
946
900
|
let subscriptionKey: string
|
|
947
901
|
|
|
902
|
+
// subscriptionKey = 'BSConversationsChanged'
|
|
903
|
+
// subscription = this.subscriptions.find((item) => item.key === subscriptionKey)
|
|
904
|
+
// if (!subscription) {
|
|
905
|
+
// subscription = this.conversationsHandlerService.conversationChanged.subscribe((data: ConversationModel) => {
|
|
906
|
+
// this.logger.log('[CONVS-DETAIL] subscribe BSConversationsChanged data ', data, ' this.loggedUser.uid:', this.loggedUser.uid)
|
|
907
|
+
|
|
908
|
+
// if (data && data.sender !== this.loggedUser.uid) {
|
|
909
|
+
// this.logger.log('[CONVS-DETAIL] subscribe to BSConversationsChange data sender ', data.sender)
|
|
910
|
+
// this.logger.log('[CONVS-DETAIL] subscribe to BSConversationsChange this.loggedUser.uid ', this.loggedUser.uid)
|
|
911
|
+
// this.logger.log('[CONVS-DETAIL] subscribe to BSConversationsChange is_new ', data.is_new)
|
|
912
|
+
// this.logger.log('[CONVS-DETAIL] subscribe to BSConversationsChange showButtonToBottom ', this.showButtonToBottom)
|
|
913
|
+
// // UPDATE THE CONVERSATION TO 'READ' IF IT IS ME WHO WRITES THE LAST MESSAGE OF THE CONVERSATION
|
|
914
|
+
// // AND IF THE POSITION OF THE SCROLL IS AT THE END
|
|
915
|
+
// if (!this.showButtonToBottom && data.is_new) {
|
|
916
|
+
// // ARE AT THE END
|
|
917
|
+
// this.updateConversationBadge()
|
|
918
|
+
// }
|
|
919
|
+
// if(data.uid === this.conversationWith){
|
|
920
|
+
// this.conversationAvatar = setConversationAvatar(
|
|
921
|
+
// data.conversation_with,
|
|
922
|
+
// data.conversation_with_fullname,
|
|
923
|
+
// data.channel_type,
|
|
924
|
+
// )
|
|
925
|
+
// }
|
|
926
|
+
|
|
927
|
+
// }
|
|
928
|
+
// })
|
|
929
|
+
// const subscribe = { key: subscriptionKey, value: subscription }
|
|
930
|
+
// this.subscriptions.push(subscribe)
|
|
931
|
+
// }
|
|
932
|
+
|
|
948
933
|
subscriptionKey = 'messageAdded'
|
|
949
934
|
subscription = this.subscriptions.find((item) => item.key === subscriptionKey)
|
|
950
935
|
if (!subscription) {
|
|
@@ -994,22 +979,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
994
979
|
this.subscriptions.push(subscribe)
|
|
995
980
|
}
|
|
996
981
|
|
|
997
|
-
subscriptionKey = 'conversationTyping';
|
|
998
|
-
subscription = this.subscriptions.find(item => item.key === subscriptionKey);
|
|
999
|
-
if (!subscription) {
|
|
1000
|
-
subscription = this.typingService.BSIsTyping.pipe(takeUntil(this.unsubscribe$)).subscribe((data: any) => {
|
|
1001
|
-
this.logger.debug('[CONVS-DETAIL] ***** BSIsTyping *****', data);
|
|
1002
|
-
if (data) {
|
|
1003
|
-
const isTypingUid = data.uid; //support-group-...
|
|
1004
|
-
if (this.conversationWith === isTypingUid) {
|
|
1005
|
-
that.subscribeTypings(data);
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
});
|
|
1009
|
-
const subscribe = {key: subscriptionKey, value: subscription };
|
|
1010
|
-
this.subscriptions.push(subscribe);
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
982
|
// subscriptionKey = 'onGroupChange';
|
|
1014
983
|
// subscription = this.subscriptions.find(item => item.key === subscriptionKey);
|
|
1015
984
|
// if (!subscription) {
|
|
@@ -1030,6 +999,18 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1030
999
|
// }
|
|
1031
1000
|
}
|
|
1032
1001
|
|
|
1002
|
+
onConversationLoaded(conversation): ConversationModel{
|
|
1003
|
+
if(conversation.attributes && conversation.attributes['projectId']){
|
|
1004
|
+
let project = localStorage.getItem(conversation.attributes['projectId'])
|
|
1005
|
+
if(project){
|
|
1006
|
+
project = JSON.parse(project)
|
|
1007
|
+
conversation.attributes.project_name = project['name']
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
return conversation
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
|
|
1033
1014
|
// -------------------------------------------------
|
|
1034
1015
|
// addEventsKeyboard
|
|
1035
1016
|
// -------------------------------------------------
|
|
@@ -1057,9 +1038,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1057
1038
|
this.conversationAvatar = setConversationAvatar(
|
|
1058
1039
|
this.conversationWith,
|
|
1059
1040
|
this.conversationWithFullname,
|
|
1060
|
-
this.channelType
|
|
1061
|
-
this.conversation.attributes['projectId'],
|
|
1062
|
-
this.conversation.attributes['project_name']
|
|
1041
|
+
this.channelType
|
|
1063
1042
|
)
|
|
1064
1043
|
|
|
1065
1044
|
}
|
|
@@ -1236,6 +1215,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1236
1215
|
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea --> beforeSlash', beforeSlash)
|
|
1237
1216
|
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea --> afterSlash', afterSlash)
|
|
1238
1217
|
|
|
1218
|
+
|
|
1239
1219
|
if(beforeSlash[beforeSlash.length-1].indexOf(' ') >= 0 && afterSlash === ''){
|
|
1240
1220
|
this.HIDE_CANNED_RESPONSES = false
|
|
1241
1221
|
} else if(beforeSlash[beforeSlash.length-1].indexOf(' ') < 0 && afterSlash === '' ){
|
|
@@ -1283,7 +1263,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1283
1263
|
|
|
1284
1264
|
replaceTagInMessage(canned, event?) {
|
|
1285
1265
|
const elTextArea = this.rowTextArea['el']
|
|
1286
|
-
const textArea = elTextArea.getElementsByTagName('ion-textarea')[0]
|
|
1266
|
+
const textArea = elTextArea.getElementsByTagName('ion-textarea')[0]
|
|
1287
1267
|
// console.log('[CONVS-DETAIL] replaceTagInMessage textArea ', textArea)
|
|
1288
1268
|
// console.log('[CONVS-DETAIL] replaceTagInMessage textArea value', textArea.value,)
|
|
1289
1269
|
|
|
@@ -1298,17 +1278,20 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1298
1278
|
// replace text
|
|
1299
1279
|
var strTEMP = textArea.value.replace(/\/.*/ig, canned.text)
|
|
1300
1280
|
strTEMP = this.replacePlaceholderInCanned(strTEMP)
|
|
1301
|
-
this.logger.log('[CONVS-DETAIL] replaceTagInMessage strSearch ', strTEMP)
|
|
1281
|
+
this.logger.log('[CONVS-DETAIL] replaceTagInMessage strSearch before', strTEMP, textArea)
|
|
1302
1282
|
// strTEMP = this.replacePlaceholderInCanned(strTEMP);
|
|
1303
1283
|
// textArea.value = '';
|
|
1304
1284
|
// that.messageString = strTEMP;
|
|
1305
1285
|
textArea.value = strTEMP
|
|
1286
|
+
this.logger.log('[CONVS-DETAIL] replaceTagInMessage strSearch after', strTEMP, textArea)
|
|
1306
1287
|
this.insertAtCursor(textArea, '')
|
|
1307
1288
|
this.setCaretPosition(textArea)
|
|
1308
1289
|
// setTimeout(() => {
|
|
1309
1290
|
// // textArea.focus();
|
|
1291
|
+
// textArea.selectionEnd = textArea.value.length;
|
|
1310
1292
|
// textArea.setFocus()
|
|
1311
1293
|
// // this.resizeTextArea()
|
|
1294
|
+
// // this.setCaretPosition(textArea)
|
|
1312
1295
|
// }, 200)
|
|
1313
1296
|
|
|
1314
1297
|
}
|
|
@@ -1352,7 +1335,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1352
1335
|
if(elTextArea){
|
|
1353
1336
|
// console.log("[CONVS-DETAIL] onClickOpenCannedResponses textArea value", textArea.value)
|
|
1354
1337
|
var lastChar = textArea.value[textArea.value.length - 1]
|
|
1355
|
-
this.logger.log('[CONVS-DETAIL] onClickOpenCannedResponses lastChar
|
|
1338
|
+
this.logger.log('[CONVS-DETAIL] onClickOpenCannedResponses lastChar --- textArea ', lastChar, textArea)
|
|
1356
1339
|
if (lastChar !== '/') {
|
|
1357
1340
|
this.insertAtCursor(textArea, '/')
|
|
1358
1341
|
}
|
|
@@ -1532,13 +1515,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1532
1515
|
}
|
|
1533
1516
|
}
|
|
1534
1517
|
|
|
1535
|
-
onOpenCloseInfoConversation(event){
|
|
1536
|
-
this.logger.log('[CONVS-DETAIL] onOpenCloseInfoConversation - openInfoConversation ', event)
|
|
1537
|
-
this.resizeTextArea()
|
|
1538
|
-
this.openInfoConversation = event
|
|
1539
|
-
this.USER_HAS_OPENED_CLOSE_INFO_CONV = true
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
1518
|
// -------------- START SCROLL/RESIZE -------------- //
|
|
1543
1519
|
/** */
|
|
1544
1520
|
resizeTextArea() {
|
|
@@ -1640,7 +1616,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1640
1616
|
this.heightMessageTextArea = '57' // NK edited
|
|
1641
1617
|
}
|
|
1642
1618
|
}
|
|
1643
|
-
|
|
1644
1619
|
checkAcceptedFile(draggedFileMimeType) {
|
|
1645
1620
|
let isAcceptFile = false
|
|
1646
1621
|
this.logger.log('[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept: ',this.appConfigProvider.getConfig().fileUploadAccept)
|
|
@@ -1662,17 +1637,26 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1662
1637
|
if (accept_file_segment[1] === '*') {
|
|
1663
1638
|
if (draggedFileMimeType.startsWith(accept_file_segment[0])) {
|
|
1664
1639
|
isAcceptFile = true
|
|
1665
|
-
this.logger.log(
|
|
1640
|
+
this.logger.log(
|
|
1641
|
+
'[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept isAcceptFile',
|
|
1642
|
+
isAcceptFile,
|
|
1643
|
+
)
|
|
1666
1644
|
return isAcceptFile
|
|
1667
1645
|
} else {
|
|
1668
1646
|
isAcceptFile = false
|
|
1669
|
-
this.logger.log(
|
|
1647
|
+
this.logger.log(
|
|
1648
|
+
'[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept isAcceptFile',
|
|
1649
|
+
isAcceptFile,
|
|
1650
|
+
)
|
|
1670
1651
|
return isAcceptFile
|
|
1671
1652
|
}
|
|
1672
1653
|
} else if (accept_file_segment[1] !== '*') {
|
|
1673
1654
|
if (draggedFileMimeType === accept_file) {
|
|
1674
1655
|
isAcceptFile = true
|
|
1675
|
-
this.logger.log(
|
|
1656
|
+
this.logger.log(
|
|
1657
|
+
'[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept isAcceptFile',
|
|
1658
|
+
isAcceptFile,
|
|
1659
|
+
)
|
|
1676
1660
|
return isAcceptFile
|
|
1677
1661
|
}
|
|
1678
1662
|
}
|
|
@@ -1682,64 +1666,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1682
1666
|
}
|
|
1683
1667
|
}
|
|
1684
1668
|
|
|
1685
|
-
|
|
1686
|
-
initializeTyping() {
|
|
1687
|
-
this.logger.debug('[CONVS-DETAIL] membersconversation', this.membersConversation)
|
|
1688
|
-
if(this.loggedUser){
|
|
1689
|
-
this.membersConversation.push(this.loggedUser.uid)
|
|
1690
|
-
//this.setSubscriptions();
|
|
1691
|
-
this.typingService.isTyping(this.conversationWith, this.loggedUser.uid, this.isDirect);
|
|
1692
|
-
}
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
|
-
/** */
|
|
1696
|
-
subscribeTypings(data: any) {
|
|
1697
|
-
const that = this;
|
|
1698
|
-
try {
|
|
1699
|
-
const key = data.uidUserTypingNow;
|
|
1700
|
-
const waitTime = data.waitTime
|
|
1701
|
-
this.nameUserTypingNow = null;
|
|
1702
|
-
this.idUserTypingNow = null;
|
|
1703
|
-
|
|
1704
|
-
if (data.nameUserTypingNow) {
|
|
1705
|
-
this.nameUserTypingNow = data.nameUserTypingNow;
|
|
1706
|
-
}
|
|
1707
|
-
if (data.uidUserTypingNow){
|
|
1708
|
-
this.idUserTypingNow = data.uidUserTypingNow
|
|
1709
|
-
}
|
|
1710
|
-
this.logger.debug('[CONV-COMP] subscribeTypings data:', data);
|
|
1711
|
-
const userTyping = this.membersConversation.includes(key);
|
|
1712
|
-
if ( !userTyping && key) {
|
|
1713
|
-
this.isTypings = true;
|
|
1714
|
-
setTimeout(function () {
|
|
1715
|
-
that.scrollBottom(0)
|
|
1716
|
-
}, 0);
|
|
1717
|
-
// clearTimeout(this.setTimeoutWritingMessages);
|
|
1718
|
-
this.setTimeoutWritingMessages = setTimeout(() => {
|
|
1719
|
-
that.isTypings = false;
|
|
1720
|
-
}, waitTime);
|
|
1721
|
-
// this.initiTimeout(waitTime)
|
|
1722
|
-
}
|
|
1723
|
-
} catch (error) {
|
|
1724
|
-
this.logger.error('[CONV-COMP] error: ', error);
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
}
|
|
1728
|
-
|
|
1729
|
-
initiTimeout(waitTime){
|
|
1730
|
-
const that = this;
|
|
1731
|
-
this.setTimeoutWritingMessages = setTimeout(() => {
|
|
1732
|
-
that.isTypings = false;
|
|
1733
|
-
}, waitTime);
|
|
1734
|
-
}
|
|
1735
|
-
|
|
1736
|
-
resetTimeout(){
|
|
1737
|
-
this.isTypings = false
|
|
1738
|
-
this.setTimeoutWritingMessages = null;
|
|
1739
|
-
clearTimeout(this.setTimeoutWritingMessages)
|
|
1740
|
-
}
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
1669
|
segmentNewAgentMessage(conversation: ConversationModel){
|
|
1744
1670
|
let user = this.loggedUser
|
|
1745
1671
|
try {
|
|
@@ -1786,7 +1712,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1786
1712
|
this.logger.error('Event:Message Sent [group] error', err);
|
|
1787
1713
|
}
|
|
1788
1714
|
}
|
|
1789
|
-
|
|
1715
|
+
|
|
1790
1716
|
// -------------------------------------------------------------
|
|
1791
1717
|
// DRAG FILE
|
|
1792
1718
|
// -------------------------------------------------------------
|
|
@@ -1846,7 +1772,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1846
1772
|
|
|
1847
1773
|
async presentToastOnlyImageFilesAreAllowedToDrag() {
|
|
1848
1774
|
const toast = await this.toastController.create({
|
|
1849
|
-
message: this.
|
|
1775
|
+
message: this.translationMap.get('FAILED_TO_UPLOAD_THE_FORMAT_IS_NOT_SUPPORTED'),
|
|
1850
1776
|
duration: 5000,
|
|
1851
1777
|
color: 'danger',
|
|
1852
1778
|
cssClass: 'toast-custom-class',
|
|
@@ -1,38 +1,35 @@
|
|
|
1
|
-
<ion-header no-border class="ion-no-border"
|
|
2
|
-
<
|
|
1
|
+
<ion-header no-border class="ion-no-border">
|
|
2
|
+
<app-ddp-header *ngIf="conversationType ==='active'"
|
|
3
3
|
[numberOpenConv]="numberOpenConv"
|
|
4
4
|
[supportMode]="supportMode"
|
|
5
5
|
[archived_btn]="archived_btn"
|
|
6
6
|
[writeto_btn]="writeto_btn"
|
|
7
7
|
[sound_btn]="sound_btn"
|
|
8
|
-
[isMobile]="isMobile"
|
|
9
8
|
(onSoundChange)="onSoundChange($event)"
|
|
10
9
|
(openContactsDirectory)=openContactsDirectory($event)
|
|
11
10
|
(openProfileInfo)=openProfileInfo($event)>
|
|
12
|
-
</
|
|
11
|
+
</app-ddp-header>
|
|
13
12
|
|
|
14
|
-
<
|
|
13
|
+
<app-option-header *ngIf="conversationType !=='active'"
|
|
15
14
|
[headerTitle]=headerTitle
|
|
16
|
-
[isMobile]="isMobile"
|
|
17
15
|
(onBackButton)=onBackButtonFN($event)>
|
|
18
|
-
</
|
|
16
|
+
</app-option-header>
|
|
19
17
|
</ion-header>
|
|
20
|
-
|
|
21
18
|
<!-- appScrollbarTheme -->
|
|
22
|
-
<ion-content id="convs-list" #ioncontentconvlist class="list-avatar-page"
|
|
19
|
+
<ion-content id="convs-list" #ioncontentconvlist class="list-avatar-page" >
|
|
23
20
|
<!-- class="ps" style="position: relative; max-width: 600px; max-height: 100%;" [perfectScrollbar]="config" -->
|
|
24
21
|
<div id="scrollbar2">
|
|
25
22
|
<ion-list>
|
|
26
23
|
|
|
27
24
|
<!-- supportMode && -->
|
|
28
|
-
<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">
|
|
29
26
|
<div tabindex="0"></div>
|
|
30
27
|
<!-- <ion-note class="pinned-project">
|
|
31
28
|
{{ 'PINNED_PROJECT' | translate }}
|
|
32
29
|
</ion-note> -->
|
|
33
30
|
|
|
34
31
|
<app-project-item
|
|
35
|
-
style="width: 100%;
|
|
32
|
+
style="width: 100%;"
|
|
36
33
|
(openUnsevedConvsEvent)="openUnsevedConversationIframe($event)"
|
|
37
34
|
(projectIdEvent)="getLastProjectId($event)">
|
|
38
35
|
</app-project-item>
|
|
@@ -4,10 +4,6 @@ ion-header {
|
|
|
4
4
|
border-bottom-style: solid;
|
|
5
5
|
border-color: var(--light-gray);
|
|
6
6
|
border-bottom-width: thin;
|
|
7
|
-
&:not(.mobile){
|
|
8
|
-
border: none;
|
|
9
|
-
background: var(--list-bkg-color);
|
|
10
|
-
}
|
|
11
7
|
}
|
|
12
8
|
|
|
13
9
|
ion-content {
|
|
@@ -16,16 +12,6 @@ ion-content {
|
|
|
16
12
|
--overflow: hidden;
|
|
17
13
|
overflow: scroll;
|
|
18
14
|
|
|
19
|
-
/* For Firefox */
|
|
20
|
-
@-moz-document url-prefix() {
|
|
21
|
-
scrollbar-width: none;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
&:not(.mobile){
|
|
26
|
-
background: var(--list-bkg-color);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
15
|
&::-webkit-scrollbar {
|
|
30
16
|
width: 6px;
|
|
31
17
|
height: 8px;
|
|
@@ -54,11 +40,10 @@ ion-list {
|
|
|
54
40
|
list-style-type: none;
|
|
55
41
|
margin: 0;
|
|
56
42
|
padding: 0;
|
|
57
|
-
background: transparent;
|
|
58
43
|
|
|
59
44
|
ion-item {
|
|
60
45
|
cursor: pointer;
|
|
61
|
-
|
|
46
|
+
height: 64px;
|
|
62
47
|
position: relative;
|
|
63
48
|
display: flex;
|
|
64
49
|
text-decoration: none;
|
|
@@ -66,7 +51,6 @@ ion-list {
|
|
|
66
51
|
padding-right: 8px;
|
|
67
52
|
--padding-start: 0;
|
|
68
53
|
--inner-padding-end: 0;
|
|
69
|
-
--background: transparent;
|
|
70
54
|
.selected {
|
|
71
55
|
border-radius: 10px;
|
|
72
56
|
padding-left: 8px;
|
|
@@ -340,7 +324,7 @@ ion-list {
|
|
|
340
324
|
padding-left: 0px !important ;
|
|
341
325
|
padding-right: 0px !important;
|
|
342
326
|
// height: 55px !important;
|
|
343
|
-
|
|
327
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
|
344
328
|
--background-hover: #ffffff;
|
|
345
329
|
cursor:default !important;
|
|
346
330
|
}
|