@chat21/chat21-ionic 3.0.82-rc.7 → 3.0.82
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 +5 -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 +1 -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 +84 -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
|
@@ -92,7 +92,6 @@ export class ConversationListPage implements OnInit {
|
|
|
92
92
|
public displayNewConvsItem: boolean = true
|
|
93
93
|
public archiveActionNotAllowed: boolean = false
|
|
94
94
|
|
|
95
|
-
public isMobile: boolean = false;
|
|
96
95
|
public isInitialized: boolean = false;
|
|
97
96
|
|
|
98
97
|
tooltipOptions = {
|
|
@@ -125,7 +124,6 @@ export class ConversationListPage implements OnInit {
|
|
|
125
124
|
private networkService: NetworkService,
|
|
126
125
|
private appStorageService: AppStorageService
|
|
127
126
|
) {
|
|
128
|
-
this.checkPlatform();
|
|
129
127
|
this.listenToAppCompConvsLengthOnInitConvs()
|
|
130
128
|
this.listenToAppIsInitialized()
|
|
131
129
|
this.listenToLogoutEvent()
|
|
@@ -138,16 +136,6 @@ export class ConversationListPage implements OnInit {
|
|
|
138
136
|
this.listenToCloseConvFromHeaderConversation()
|
|
139
137
|
}
|
|
140
138
|
|
|
141
|
-
private checkPlatform(){
|
|
142
|
-
if (checkPlatformIsMobile()) {
|
|
143
|
-
this.isMobile = true
|
|
144
|
-
this.logger.log('[CONVS-LIST-PAGE] - initialize -> checkPlatformIsMobile isMobile? ', this.isMobile)
|
|
145
|
-
} else {
|
|
146
|
-
this.isMobile = false
|
|
147
|
-
this.logger.log('[CONVS-LIST-PAGE] - initialize -> checkPlatformIsMobile isMobile? ', this.isMobile)
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
139
|
listenSupportConvIdHasChanged() {
|
|
152
140
|
this.events.subscribe('supportconvid:haschanged', (IDConv) => {
|
|
153
141
|
// console.log('[CONVS-LIST-PAGE] - listen To convid:haschanged - convId', IDConv);
|
|
@@ -413,6 +401,7 @@ export class ConversationListPage implements OnInit {
|
|
|
413
401
|
})
|
|
414
402
|
}
|
|
415
403
|
|
|
404
|
+
|
|
416
405
|
listenGoOnline() {
|
|
417
406
|
this.events.subscribe('go:online', (goonline) => {
|
|
418
407
|
this.logger.info('[CONVS-LIST-PAGE] - listen To go:online - goonline',goonline)
|
|
@@ -503,11 +492,11 @@ export class ConversationListPage implements OnInit {
|
|
|
503
492
|
})
|
|
504
493
|
|
|
505
494
|
this.conversationsHandlerService.conversationRemoved.subscribe((conversation: ConversationModel) => {
|
|
506
|
-
this.logger.log('[CONVS-LIST-PAGE] ***** conversationsRemoved *****',conversation)
|
|
495
|
+
// this.logger.log('[CONVS-LIST-PAGE] ***** conversationsRemoved *****',conversation)
|
|
507
496
|
})
|
|
508
497
|
|
|
509
498
|
this.archivedConversationsHandlerService.archivedConversationAdded.subscribe((conversation: ConversationModel) => {
|
|
510
|
-
this.logger.log('[CONVS-LIST-PAGE] ***** archivedConversationAdded *****',conversation)
|
|
499
|
+
// this.logger.log('[CONVS-LIST-PAGE] ***** archivedConversationAdded *****',conversation)
|
|
511
500
|
// that.conversationsChanged(conversations);
|
|
512
501
|
if (conversation) {
|
|
513
502
|
this.onImageLoaded(conversation)
|
|
@@ -526,6 +515,22 @@ export class ConversationListPage implements OnInit {
|
|
|
526
515
|
this.logger.log('[CONVS-LIST-PAGE] - subscribeLoggedUserLogout uidConvSelected ',this.uidConvSelected)
|
|
527
516
|
}
|
|
528
517
|
|
|
518
|
+
// ------------------------------------------------------------------------------------
|
|
519
|
+
// @ SUBSCRIBE TO CONVERSATION CHANGED ??????????? SEEMS NOT USED ?????????????????
|
|
520
|
+
// ------------------------------------------------------------------------------------
|
|
521
|
+
conversationsChanged = (conversations: ConversationModel[]) => {
|
|
522
|
+
this.numberOpenConv = this.conversationsHandlerService.countIsNew()
|
|
523
|
+
this.logger.log('[CONVS-LIST-PAGE] - conversationsChanged - NUMB OF CONVERSATIONS: ',this.numberOpenConv)
|
|
524
|
+
// console.log('conversationsChanged »»»»»»»»» uidConvSelected', that.conversations[0], that.uidConvSelected);
|
|
525
|
+
if (this.uidConvSelected && !this.conversationSelected) {
|
|
526
|
+
const conversationSelected = this.conversations.find((item) => item.uid === this.uidConvSelected)
|
|
527
|
+
if (conversationSelected) {
|
|
528
|
+
this.conversationSelected = conversationSelected
|
|
529
|
+
this.setUidConvSelected(this.uidConvSelected)
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
529
534
|
/**
|
|
530
535
|
* ::: subscribeProfileInfoButtonClicked :::
|
|
531
536
|
* evento richiamato quando si seleziona bottone profile-info-modal
|
|
@@ -641,7 +646,7 @@ export class ConversationListPage implements OnInit {
|
|
|
641
646
|
* ::: setUidConvSelected :::
|
|
642
647
|
*/
|
|
643
648
|
setUidConvSelected(uidConvSelected: string, conversationType?: string) {
|
|
644
|
-
this.logger.log('[CONVS-LIST-PAGE] setuidCOnvSelected', uidConvSelected
|
|
649
|
+
this.logger.log('[CONVS-LIST-PAGE] setuidCOnvSelected', uidConvSelected)
|
|
645
650
|
this.uidConvSelected = uidConvSelected
|
|
646
651
|
// this.conversationsHandlerService.uidConvSelected = uidConvSelected;
|
|
647
652
|
if (uidConvSelected) {
|
|
@@ -672,7 +677,6 @@ export class ConversationListPage implements OnInit {
|
|
|
672
677
|
this.navigateByUrl('active', conversation.uid)
|
|
673
678
|
this.conversationsHandlerService.uidConvSelected = conversation.uid
|
|
674
679
|
this.logger.log('[CONVS-LIST-PAGE] onConversationSelected active conversation.uid ', conversation.uid)
|
|
675
|
-
this.events.publish('convList:onConversationSelected', conversation)
|
|
676
680
|
}
|
|
677
681
|
}
|
|
678
682
|
|
|
@@ -740,14 +744,7 @@ export class ConversationListPage implements OnInit {
|
|
|
740
744
|
}
|
|
741
745
|
}
|
|
742
746
|
}
|
|
743
|
-
|
|
744
|
-
if(conversation.attributes && conversation.attributes['projectId']){
|
|
745
|
-
let project = localStorage.getItem(conversation.attributes['projectId'])
|
|
746
|
-
if(project){
|
|
747
|
-
project = JSON.parse(project)
|
|
748
|
-
conversation.attributes.project_name = project['name']
|
|
749
|
-
}
|
|
750
|
-
}
|
|
747
|
+
|
|
751
748
|
// if(conversation.conversation_with_fullname === 'Guest '){
|
|
752
749
|
// conversation.conversation_with_fullname = 'guest' + '#' + this.getUUidConversation(conversation.uid)
|
|
753
750
|
// }
|
|
@@ -824,7 +821,6 @@ export class ConversationListPage implements OnInit {
|
|
|
824
821
|
if (checkPlatformIsMobile()) {
|
|
825
822
|
presentModal(this.modalController, ContactsDirectoryPage, {
|
|
826
823
|
token: TOKEN,
|
|
827
|
-
isMobile: this.isMobile
|
|
828
824
|
})
|
|
829
825
|
} else {
|
|
830
826
|
this.navService.push(ContactsDirectoryPage, { token: TOKEN })
|
|
@@ -1027,6 +1023,7 @@ export class ConversationListPage implements OnInit {
|
|
|
1027
1023
|
} catch (err) {
|
|
1028
1024
|
this.logger.error('Event:Agent added to conversation [group] error', err);
|
|
1029
1025
|
}
|
|
1026
|
+
|
|
1030
1027
|
}
|
|
1031
1028
|
}
|
|
1032
1029
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CannedResponsesService } from 'src/app/services/canned-responses/canned-responses.service';
|
|
2
1
|
import { Component, Input, OnInit } from '@angular/core';
|
|
3
2
|
import { ModalController } from '@ionic/angular';
|
|
4
3
|
import { Validators, FormBuilder, FormGroup, FormControl } from '@angular/forms';
|
|
@@ -39,7 +38,6 @@ export class CreateCannedResponsePage implements OnInit {
|
|
|
39
38
|
private translate: TranslateService,
|
|
40
39
|
public tiledeskAuthService: TiledeskAuthService,
|
|
41
40
|
public tiledeskService: TiledeskService,
|
|
42
|
-
public cannedResponsesService: CannedResponsesService,
|
|
43
41
|
private menu: MenuController,
|
|
44
42
|
public events: EventsService,
|
|
45
43
|
private route: ActivatedRoute,
|
|
@@ -183,17 +181,19 @@ export class CreateCannedResponsePage implements OnInit {
|
|
|
183
181
|
this.logger.log('[CREATE-CANNED-RES] - CREATE CANNED RESP - MSG ', canned_response_message);
|
|
184
182
|
this.logger.log('[CREATE-CANNED-RES] - CREATE CANNED RESP - TITLE ', canned_response_title);
|
|
185
183
|
|
|
186
|
-
this.
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
184
|
+
this.tiledeskService.createCannedResponse(canned_response_message.trim(), canned_response_title.trim(), this.prjctID, this.tiledeskToken)
|
|
185
|
+
.subscribe((responses: any) => {
|
|
186
|
+
this.logger.log('[CREATE-CANNED-RES] - CREATE CANNED RESP - RES ', responses);
|
|
187
|
+
|
|
188
|
+
}, (error) => {
|
|
189
|
+
this.logger.error('[CREATE-CANNED-RES]- CREATE CANNED RESP - ERROR ', error);
|
|
190
|
+
this.showSpinnerCreateCannedResponse = false;
|
|
191
|
+
}, () => {
|
|
192
|
+
this.logger.log('[CREATE-CANNED-RES] - CREATE CANNED RESP * COMPLETE *');
|
|
193
|
+
this.showSpinnerCreateCannedResponse = false;
|
|
194
|
+
this.closeModalCreateCannedResponseModal()
|
|
195
|
+
this.events.publish('newcannedresponse:created', true);
|
|
196
|
+
});
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
openAddPersonalisationMenu() {
|
|
@@ -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>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Component, OnInit, Input, ViewChild, ElementRef, HostListener, AfterViewInit} from '@angular/core'
|
|
2
3
|
import { TYPE_MSG_IMAGE } from 'src/chat21-core/utils/constants'
|
|
3
4
|
import { ModalController } from '@ionic/angular'
|
|
4
5
|
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'
|
|
@@ -30,8 +30,10 @@
|
|
|
30
30
|
|
|
31
31
|
<div class="user-presence">
|
|
32
32
|
<app-user-presence
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
[idUser]=loggedUser.uid
|
|
34
|
+
[translationMap]=translationMap
|
|
35
|
+
[borderColor]=borderColor
|
|
36
|
+
[fontColor]=fontColor>
|
|
35
37
|
</app-user-presence>
|
|
36
38
|
</div>
|
|
37
39
|
|
|
@@ -1,45 +1,3 @@
|
|
|
1
|
-
ion-toolbar {
|
|
2
|
-
height: var(--header-height);
|
|
3
|
-
&:not(.mobile){
|
|
4
|
-
--background: var(--list-bkg-color);
|
|
5
|
-
border: none;
|
|
6
|
-
}
|
|
7
|
-
&.mobile{
|
|
8
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
ion-button{
|
|
12
|
-
--color: var(--basic-blue);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
ion-content {
|
|
17
|
-
// overwrite inline styles
|
|
18
|
-
--overflow: hidden;
|
|
19
|
-
overflow: scroll;
|
|
20
|
-
&:not(.mobile){
|
|
21
|
-
background: var(--list-bkg-color);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&::-webkit-scrollbar {
|
|
25
|
-
width: 6px;
|
|
26
|
-
height: 8px;
|
|
27
|
-
display: none;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&::-webkit-scrollbar-track {
|
|
31
|
-
background: #f9f9f9;
|
|
32
|
-
}
|
|
33
|
-
&::-webkit-scrollbar-thumb {
|
|
34
|
-
background-color: #b9b9b9;
|
|
35
|
-
border-radius: 0px;
|
|
36
|
-
}
|
|
37
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
38
|
-
background-color: #727272;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
1
|
.ion-content-black-background {
|
|
44
2
|
--background: #2d323e;
|
|
45
3
|
}
|
|
@@ -43,32 +43,6 @@ export class CannedResponsesService {
|
|
|
43
43
|
}))
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
// -------------------------------------------------------------------------------------
|
|
47
|
-
// @ Create - Save (POST) new canned response
|
|
48
|
-
// -------------------------------------------------------------------------------------
|
|
49
|
-
public add(token: string, projectid: string, title: string, message: string) {
|
|
50
|
-
const url = this.apiUrl + projectid + '/canned/'
|
|
51
|
-
this.logger.log('[TILEDESK-SERVICE] - CREATE CANNED-RES - URL', url);
|
|
52
|
-
|
|
53
|
-
const httpOptions = {
|
|
54
|
-
headers: new HttpHeaders({
|
|
55
|
-
'Content-Type': 'application/json',
|
|
56
|
-
Authorization: token
|
|
57
|
-
})
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const body = {
|
|
61
|
-
title: title,
|
|
62
|
-
text: message
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return this.http.post(url, JSON.stringify(body), httpOptions).pipe(map((res: any) => {
|
|
66
|
-
this.logger.log('[TILEDESK-SERVICE] - CREATE CANNED-RES - RES ', res);
|
|
67
|
-
return res
|
|
68
|
-
}))
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
46
|
public edit(token: string, projectid: string, canned: any){
|
|
73
47
|
const cannedResponsesURL = this.apiUrl + projectid + "/canned/"+ canned._id;
|
|
74
48
|
this.logger.log('[CANNED-RESPONSES-SERVICE] editCannedResponses - URL ', cannedResponsesURL);
|
|
@@ -254,7 +254,31 @@ export class TiledeskService {
|
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
|
|
257
|
-
|
|
257
|
+
// -------------------------------------------------------------------------------------
|
|
258
|
+
// @ Create - Save (POST) new canned response
|
|
259
|
+
// -------------------------------------------------------------------------------------
|
|
260
|
+
public createCannedResponse(message: string, title: string, project_id: string, token: string) {
|
|
261
|
+
this.logger.log('[TILEDESK-SERVICE] - CREATE CANNED-RES - token', token);
|
|
262
|
+
const url = this.apiUrl + project_id + '/canned/'
|
|
263
|
+
this.logger.log('[TILEDESK-SERVICE] - CREATE CANNED-RES - URL', url);
|
|
264
|
+
|
|
265
|
+
const httpOptions = {
|
|
266
|
+
headers: new HttpHeaders({
|
|
267
|
+
'Content-Type': 'application/json',
|
|
268
|
+
Authorization: token
|
|
269
|
+
})
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
const body = { 'text': message, 'title': title };
|
|
273
|
+
|
|
274
|
+
this.logger.log('[TILEDESK-SERVICE] CREATE CANNED-RES - BODY ', body);
|
|
275
|
+
|
|
276
|
+
return this.http.post(url, JSON.stringify(body), httpOptions).pipe(map((res: any) => {
|
|
277
|
+
this.logger.log('[TILEDESK-SERVICE] - CREATE CANNED-RES - RES ', res);
|
|
278
|
+
return res
|
|
279
|
+
}))
|
|
280
|
+
|
|
281
|
+
}
|
|
258
282
|
|
|
259
283
|
// .post(url, JSON.stringify(body), options)
|
|
260
284
|
// .map((res) => res.json());
|
|
@@ -41,7 +41,7 @@ export class WebsocketService {
|
|
|
41
41
|
|
|
42
42
|
self.webSocketJs.ref(path, 'subscriptionToWsCurrentUser_allProject',
|
|
43
43
|
function (data, notification) {
|
|
44
|
-
console.log("[WS-SERV] SUBSCR TO WS CURRENT PROJECT-USER AVAILABILITY - CREATE - data ", data);
|
|
44
|
+
// console.log("[WS-SERV] SUBSCR TO WS CURRENT PROJECT-USER AVAILABILITY - CREATE - data ", data);
|
|
45
45
|
resolve(data)
|
|
46
46
|
// self.currentUserWsAvailability$.next(data.user_available);
|
|
47
47
|
self.currentProjectUserAvailability$.next(data)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { NavbarComponent } from './../components/navbar/navbar.component';
|
|
2
1
|
import { FormsModule } from '@angular/forms';
|
|
3
2
|
import { NgSelectModule } from '@ng-select/ng-select';
|
|
4
3
|
import { NetworkOfflineComponent } from './../components/network-offline/network-offline.component';
|
|
5
4
|
import { ContactsDirectoryComponent } from './../components/contacts-directory/contacts-directory.component';
|
|
6
5
|
import { HtmlComponent } from './../chatlib/conversation-detail/message/html/html.component';
|
|
6
|
+
import { BubbleOthersMessageComponent } from './../components/conversation-detail/bubble-others-message/bubble-others-message.component';
|
|
7
7
|
|
|
8
8
|
import { TextComponent } from '../chatlib/conversation-detail/message/text/text.component';
|
|
9
9
|
import { ReturnReceiptComponent } from '../chatlib/conversation-detail/message/return-receipt/return-receipt.component';
|
|
@@ -21,29 +21,32 @@ import { CommonModule } from '@angular/common';
|
|
|
21
21
|
import { IonicModule } from '@ionic/angular';
|
|
22
22
|
|
|
23
23
|
import { AvatarProfileComponent } from 'src/app/components/utils/avatar-profile/avatar-profile.component';
|
|
24
|
-
import {
|
|
25
|
-
import { HeaderConversationsListArchived } from 'src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component';
|
|
24
|
+
import { DdpHeaderComponent } from 'src/app/components/ddp-header/ddp-header.component';
|
|
26
25
|
|
|
27
26
|
import { UserPresenceComponent } from 'src/app/components/utils/user-presence/user-presence.component';
|
|
28
27
|
import { UserTypingComponent } from 'src/chat21-core/utils/user-typing/user-typing.component';
|
|
29
28
|
import { ListConversationsComponent } from '../chatlib/list-conversations-component/list-conversations/list-conversations.component';
|
|
30
29
|
import { MomentModule } from 'angular2-moment';
|
|
31
|
-
import { AvatarComponent } from '
|
|
32
|
-
import { MarkedPipe } from '
|
|
33
|
-
import { AutofocusDirective } from '
|
|
34
|
-
import { HtmlEntitiesEncodePipe } from '
|
|
35
|
-
import { IonConversationDetailComponent } from '
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
30
|
+
import { AvatarComponent } from '../chatlib/conversation-detail/message/avatar/avatar.component';
|
|
31
|
+
import { MarkedPipe } from '../directives/marked.pipe';
|
|
32
|
+
import { AutofocusDirective } from '../directives/autofocus.directive';
|
|
33
|
+
import { HtmlEntitiesEncodePipe } from '../directives/html-entities-encode.pipe';
|
|
34
|
+
import { IonConversationDetailComponent } from '../chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component';
|
|
35
|
+
import { BubbleMyMessageComponent } from '../components/conversation-detail/bubble-my-message/bubble-my-message.component';
|
|
36
|
+
import { BubbleDayMessageComponent } from '../components/conversation-detail/bubble-day-message/bubble-day-message.component';
|
|
37
|
+
import { BubbleSystemMessageComponent } from '../components/conversation-detail/bubble-system-message/bubble-system-message.component';
|
|
38
|
+
import { InfoContentComponent } from '../components/conversation-info/info-content/info-content.component';
|
|
39
|
+
import { InfoSupportGroupComponent } from '../components/conversation-info/info-support-group/info-support-group.component';
|
|
40
|
+
import { InfoDirectComponent } from '../components/conversation-info/info-direct/info-direct.component';
|
|
41
|
+
import { AdvancedInfoAccordionComponent } from '../components/conversation-info/advanced-info-accordion/advanced-info-accordion.component';
|
|
42
|
+
import { InfoGroupComponent } from '../components/conversation-info/info-group/info-group.component';
|
|
41
43
|
import { TooltipModule, TooltipOptions } from 'ng2-tooltip-directive';
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
44
|
+
import { OptionHeaderComponent } from '../components/conversation-detail/option-header/option-header.component';
|
|
45
|
+
import { MessageAttachmentComponent } from '../chatlib/conversation-detail/message/message-attachment/message-attachment.component';
|
|
46
|
+
import { ImageViewerComponent } from '../components/image-viewer/image-viewer.component';
|
|
47
|
+
import { SidebarComponent } from '../components/sidebar/sidebar.component';
|
|
48
|
+
import { SidebarUserDetailsComponent } from '../components/sidebar-user-details/sidebar-user-details.component';
|
|
49
|
+
import { ProjectItemComponent } from '../components/project-item/project-item.component';
|
|
47
50
|
import { DefaultTooltipOptions } from 'src/chat21-core/utils/utils';
|
|
48
51
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
49
52
|
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
@@ -56,13 +59,12 @@ import { SafeHtmlPipe } from '../directives/safe-html.pipe';
|
|
|
56
59
|
declarations: [
|
|
57
60
|
// MessageTextAreaComponent,
|
|
58
61
|
AvatarProfileComponent,
|
|
59
|
-
|
|
62
|
+
DdpHeaderComponent,
|
|
60
63
|
UserPresenceComponent,
|
|
61
64
|
UserTypingComponent,
|
|
62
65
|
ListConversationsComponent,
|
|
63
66
|
IonListConversationsComponent,
|
|
64
67
|
ImageViewerComponent,
|
|
65
|
-
NavbarComponent,
|
|
66
68
|
SidebarComponent,
|
|
67
69
|
SidebarUserDetailsComponent,
|
|
68
70
|
ProjectItemComponent,
|
|
@@ -80,6 +82,10 @@ import { SafeHtmlPipe } from '../directives/safe-html.pipe';
|
|
|
80
82
|
ReturnReceiptComponent,
|
|
81
83
|
TextComponent,
|
|
82
84
|
HtmlComponent,
|
|
85
|
+
BubbleDayMessageComponent,
|
|
86
|
+
BubbleSystemMessageComponent,
|
|
87
|
+
BubbleMyMessageComponent,
|
|
88
|
+
BubbleOthersMessageComponent,
|
|
83
89
|
InfoContentComponent,
|
|
84
90
|
InfoSupportGroupComponent,
|
|
85
91
|
InfoDirectComponent,
|
|
@@ -89,16 +95,15 @@ import { SafeHtmlPipe } from '../directives/safe-html.pipe';
|
|
|
89
95
|
AutofocusDirective,
|
|
90
96
|
HtmlEntitiesEncodePipe,
|
|
91
97
|
SafeHtmlPipe,
|
|
92
|
-
|
|
98
|
+
OptionHeaderComponent,
|
|
93
99
|
NetworkOfflineComponent
|
|
94
100
|
],
|
|
95
101
|
exports: [
|
|
96
102
|
// MessageTextAreaComponent,
|
|
97
103
|
AutofocusDirective,
|
|
98
104
|
AvatarProfileComponent,
|
|
99
|
-
|
|
105
|
+
DdpHeaderComponent,
|
|
100
106
|
ImageViewerComponent,
|
|
101
|
-
NavbarComponent,
|
|
102
107
|
SidebarComponent,
|
|
103
108
|
SidebarUserDetailsComponent,
|
|
104
109
|
ProjectItemComponent,
|
|
@@ -118,11 +123,15 @@ import { SafeHtmlPipe } from '../directives/safe-html.pipe';
|
|
|
118
123
|
InfoMessageComponent,
|
|
119
124
|
ReturnReceiptComponent,
|
|
120
125
|
TextComponent,
|
|
126
|
+
BubbleDayMessageComponent,
|
|
127
|
+
BubbleSystemMessageComponent,
|
|
128
|
+
BubbleMyMessageComponent,
|
|
129
|
+
BubbleOthersMessageComponent,
|
|
121
130
|
InfoContentComponent,
|
|
122
131
|
InfoSupportGroupComponent,
|
|
123
132
|
InfoDirectComponent,
|
|
124
133
|
InfoGroupComponent,
|
|
125
|
-
|
|
134
|
+
OptionHeaderComponent,
|
|
126
135
|
NetworkOfflineComponent
|
|
127
136
|
|
|
128
137
|
],
|