@chat21/chat21-ionic 3.0.79-rc.3 → 3.0.79
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 +3 -51
- package/README.md +2 -2
- package/package.json +1 -1
- package/src/app/app.component.html +1 -7
- package/src/app/app.component.scss +2 -18
- package/src/app/app.component.ts +30 -78
- 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 +22 -73
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +85 -162
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +2 -39
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +19 -1
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +10 -1
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +23 -4
- 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.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 -62
- 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/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 +5 -6
- 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 +82 -3
- 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 +1 -2
- package/src/app/components/conversation-info/info-content/info-content.component.ts +2 -3
- package/src/app/components/conversation-info/info-direct/info-direct.component.html +9 -1
- package/src/app/components/conversation-info/info-direct/info-direct.component.ts +2 -0
- 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/{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 +32 -39
- package/src/app/components/project-item/project-item.component.ts +4 -16
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +3 -3
- 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 -41
- 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 -40
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +250 -40
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +66 -186
- package/src/app/pages/conversations-list/conversations-list.page.html +8 -11
- package/src/app/pages/conversations-list/conversations-list.page.scss +2 -11
- package/src/app/pages/conversations-list/conversations-list.page.ts +51 -43
- 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/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/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/chat21-core/models/conversation.ts +1 -0
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +9 -7
- package/src/chat21-core/utils/constants.ts +1 -5
- 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 -9
- package/src/global.scss +56 -48
- package/src/index.html +2 -2
- package/src/variables.scss +10 -30
- 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 -189
- 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/wheep-wheep.mp3 +0 -0
- package/src/chat21-core/models/projects.ts +0 -27
- package/src/chat21-core/utils/convertRequestToConversation.ts +0 -41
|
@@ -92,15 +92,15 @@ export class ConversationListPage implements OnInit {
|
|
|
92
92
|
public displayNewConvsItem: boolean = true
|
|
93
93
|
public archiveActionNotAllowed: boolean = false
|
|
94
94
|
|
|
95
|
-
public
|
|
95
|
+
public isInitialized: boolean = false;
|
|
96
96
|
|
|
97
97
|
tooltipOptions = {
|
|
98
98
|
'show-delay': 1500,
|
|
99
99
|
'tooltip-class': 'chat-tooltip',
|
|
100
|
-
theme: 'light',
|
|
101
|
-
shadow: false,
|
|
100
|
+
'theme': 'light',
|
|
101
|
+
'shadow': false,
|
|
102
102
|
'hide-delay-mobile': 0,
|
|
103
|
-
hideDelayAfterClick: 3000,
|
|
103
|
+
'hideDelayAfterClick': 3000,
|
|
104
104
|
'hide-delay': 200,
|
|
105
105
|
}
|
|
106
106
|
|
|
@@ -124,8 +124,8 @@ export class ConversationListPage implements OnInit {
|
|
|
124
124
|
private networkService: NetworkService,
|
|
125
125
|
private appStorageService: AppStorageService
|
|
126
126
|
) {
|
|
127
|
-
this.checkPlatform();
|
|
128
127
|
this.listenToAppCompConvsLengthOnInitConvs()
|
|
128
|
+
this.listenToAppIsInitialized()
|
|
129
129
|
this.listenToLogoutEvent()
|
|
130
130
|
this.listenGoOnline()
|
|
131
131
|
this.listenGoOffline()
|
|
@@ -136,16 +136,6 @@ export class ConversationListPage implements OnInit {
|
|
|
136
136
|
this.listenToCloseConvFromHeaderConversation()
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
private checkPlatform(){
|
|
140
|
-
if (checkPlatformIsMobile()) {
|
|
141
|
-
this.isMobile = true
|
|
142
|
-
this.logger.log('[CONVS-LIST-PAGE] - initialize -> checkPlatformIsMobile isMobile? ', this.isMobile)
|
|
143
|
-
} else {
|
|
144
|
-
this.isMobile = false
|
|
145
|
-
this.logger.log('[CONVS-LIST-PAGE] - initialize -> checkPlatformIsMobile isMobile? ', this.isMobile)
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
139
|
listenSupportConvIdHasChanged() {
|
|
150
140
|
this.events.subscribe('supportconvid:haschanged', (IDConv) => {
|
|
151
141
|
// console.log('[CONVS-LIST-PAGE] - listen To convid:haschanged - convId', IDConv);
|
|
@@ -404,6 +394,14 @@ export class ConversationListPage implements OnInit {
|
|
|
404
394
|
})
|
|
405
395
|
}
|
|
406
396
|
|
|
397
|
+
listenToAppIsInitialized(){
|
|
398
|
+
this.events.subscribe( 'appComp:appIsInitialized', (isInitialized) => {
|
|
399
|
+
this.logger.log( '[CONVS-LIST-PAGE]-CONVS isInitialized', isInitialized)
|
|
400
|
+
this.isInitialized = isInitialized
|
|
401
|
+
})
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
|
|
407
405
|
listenGoOnline() {
|
|
408
406
|
this.events.subscribe('go:online', (goonline) => {
|
|
409
407
|
this.logger.info('[CONVS-LIST-PAGE] - listen To go:online - goonline',goonline)
|
|
@@ -480,7 +478,7 @@ export class ConversationListPage implements OnInit {
|
|
|
480
478
|
if (conversation) {
|
|
481
479
|
this.onImageLoaded(conversation)
|
|
482
480
|
this.onConversationLoaded(conversation)
|
|
483
|
-
!isDevMode() && conversation.is_new? this.segmentNewConversationAdded(conversation) : null;
|
|
481
|
+
!isDevMode() && conversation.is_new && this.isInitialized? this.segmentNewConversationAdded(conversation) : null;
|
|
484
482
|
}
|
|
485
483
|
})
|
|
486
484
|
|
|
@@ -494,11 +492,11 @@ export class ConversationListPage implements OnInit {
|
|
|
494
492
|
})
|
|
495
493
|
|
|
496
494
|
this.conversationsHandlerService.conversationRemoved.subscribe((conversation: ConversationModel) => {
|
|
497
|
-
this.logger.log('[CONVS-LIST-PAGE] ***** conversationsRemoved *****',conversation)
|
|
495
|
+
// this.logger.log('[CONVS-LIST-PAGE] ***** conversationsRemoved *****',conversation)
|
|
498
496
|
})
|
|
499
497
|
|
|
500
498
|
this.archivedConversationsHandlerService.archivedConversationAdded.subscribe((conversation: ConversationModel) => {
|
|
501
|
-
this.logger.log('[CONVS-LIST-PAGE] ***** archivedConversationAdded *****',conversation)
|
|
499
|
+
// this.logger.log('[CONVS-LIST-PAGE] ***** archivedConversationAdded *****',conversation)
|
|
502
500
|
// that.conversationsChanged(conversations);
|
|
503
501
|
if (conversation) {
|
|
504
502
|
this.onImageLoaded(conversation)
|
|
@@ -517,6 +515,22 @@ export class ConversationListPage implements OnInit {
|
|
|
517
515
|
this.logger.log('[CONVS-LIST-PAGE] - subscribeLoggedUserLogout uidConvSelected ',this.uidConvSelected)
|
|
518
516
|
}
|
|
519
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
|
+
|
|
520
534
|
/**
|
|
521
535
|
* ::: subscribeProfileInfoButtonClicked :::
|
|
522
536
|
* evento richiamato quando si seleziona bottone profile-info-modal
|
|
@@ -632,7 +646,7 @@ export class ConversationListPage implements OnInit {
|
|
|
632
646
|
* ::: setUidConvSelected :::
|
|
633
647
|
*/
|
|
634
648
|
setUidConvSelected(uidConvSelected: string, conversationType?: string) {
|
|
635
|
-
this.logger.log('[CONVS-LIST-PAGE] setuidCOnvSelected', uidConvSelected
|
|
649
|
+
this.logger.log('[CONVS-LIST-PAGE] setuidCOnvSelected', uidConvSelected)
|
|
636
650
|
this.uidConvSelected = uidConvSelected
|
|
637
651
|
// this.conversationsHandlerService.uidConvSelected = uidConvSelected;
|
|
638
652
|
if (uidConvSelected) {
|
|
@@ -731,13 +745,6 @@ export class ConversationListPage implements OnInit {
|
|
|
731
745
|
}
|
|
732
746
|
}
|
|
733
747
|
|
|
734
|
-
if(conversation.attributes && conversation.attributes['projectId']){
|
|
735
|
-
let project = localStorage.getItem(conversation.attributes['projectId'])
|
|
736
|
-
if(project){
|
|
737
|
-
project = JSON.parse(project)
|
|
738
|
-
conversation.attributes.project_name = project['name']
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
748
|
// if(conversation.conversation_with_fullname === 'Guest '){
|
|
742
749
|
// conversation.conversation_with_fullname = 'guest' + '#' + this.getUUidConversation(conversation.uid)
|
|
743
750
|
// }
|
|
@@ -814,7 +821,6 @@ export class ConversationListPage implements OnInit {
|
|
|
814
821
|
if (checkPlatformIsMobile()) {
|
|
815
822
|
presentModal(this.modalController, ContactsDirectoryPage, {
|
|
816
823
|
token: TOKEN,
|
|
817
|
-
isMobile: this.isMobile
|
|
818
824
|
})
|
|
819
825
|
} else {
|
|
820
826
|
this.navService.push(ContactsDirectoryPage, { token: TOKEN })
|
|
@@ -974,9 +980,9 @@ export class ConversationListPage implements OnInit {
|
|
|
974
980
|
private segmentNewConversationAdded(conversation: ConversationModel){
|
|
975
981
|
let user = this.tiledeskAuthService.getCurrentUser()
|
|
976
982
|
try {
|
|
977
|
-
window['analytics'].page("Chat List Conversations Page,
|
|
983
|
+
window['analytics'].page("Chat List Conversations Page, Agent added to conversation", {});
|
|
978
984
|
} catch (err) {
|
|
979
|
-
this.logger.error('Event:
|
|
985
|
+
this.logger.error('Event:Agent added to conversation [page] error', err);
|
|
980
986
|
}
|
|
981
987
|
|
|
982
988
|
try {
|
|
@@ -986,36 +992,38 @@ export class ConversationListPage implements OnInit {
|
|
|
986
992
|
logins: 5,
|
|
987
993
|
});
|
|
988
994
|
} catch (err) {
|
|
989
|
-
this.logger.error('Event:
|
|
995
|
+
this.logger.error('Event:Agent added to conversation [identify] error', err);
|
|
990
996
|
}
|
|
991
997
|
|
|
992
998
|
try {
|
|
993
|
-
window['analytics'].track('
|
|
999
|
+
window['analytics'].track('Agent added to conversation', {
|
|
994
1000
|
"username": user.firstname + ' ' + user.lastname,
|
|
995
1001
|
"userId": user.uid,
|
|
996
1002
|
"conversation_id": conversation.uid,
|
|
997
1003
|
"channel_type": conversation.channel_type,
|
|
998
1004
|
"conversation_with": conversation.conversation_with,
|
|
999
|
-
"
|
|
1000
|
-
"
|
|
1001
|
-
"department_id":(conversation.channel_type !== TYPE_DIRECT)? conversation.attributes.departmentId: null,
|
|
1005
|
+
"project_id":(conversation.channel_type !== TYPE_DIRECT)? conversation.uid.split('-')[2]: null,
|
|
1006
|
+
"project_name":(conversation.channel_type !== TYPE_DIRECT && conversation.attributes && conversation.attributes.departmentId)? conversation.attributes.departmentId: null,
|
|
1002
1007
|
},
|
|
1003
1008
|
{
|
|
1004
1009
|
"context": {
|
|
1005
|
-
"groupId": (conversation.channel_type !== TYPE_DIRECT)? conversation.
|
|
1010
|
+
"groupId": (conversation.channel_type !== TYPE_DIRECT)? conversation.uid.split('-')[2]: null
|
|
1006
1011
|
}
|
|
1007
1012
|
});
|
|
1008
1013
|
} catch (err) {
|
|
1009
|
-
this.logger.error('Event:
|
|
1014
|
+
this.logger.error('Event:Agent added to conversation [track] error', err);
|
|
1010
1015
|
}
|
|
1011
1016
|
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1017
|
+
if(conversation.channel_type !== TYPE_DIRECT){
|
|
1018
|
+
try {
|
|
1019
|
+
window['analytics'].group(conversation.uid.split('-')[2], {
|
|
1020
|
+
name: (conversation.attributes && conversation.attributes.project_name)? conversation.attributes.project_name : null,
|
|
1021
|
+
// plan: projectProfileName,
|
|
1022
|
+
});
|
|
1023
|
+
} catch (err) {
|
|
1024
|
+
this.logger.error('Event:Agent added to conversation [group] error', err);
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1019
1027
|
}
|
|
1020
1028
|
}
|
|
1021
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>
|
|
@@ -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);
|
|
@@ -252,7 +252,31 @@ export class TiledeskService {
|
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
|
|
255
|
-
|
|
255
|
+
// -------------------------------------------------------------------------------------
|
|
256
|
+
// @ Create - Save (POST) new canned response
|
|
257
|
+
// -------------------------------------------------------------------------------------
|
|
258
|
+
public createCannedResponse(message: string, title: string, project_id: string, token: string) {
|
|
259
|
+
this.logger.log('[TILEDESK-SERVICE] - CREATE CANNED-RES - token', token);
|
|
260
|
+
const url = this.apiUrl + project_id + '/canned/'
|
|
261
|
+
this.logger.log('[TILEDESK-SERVICE] - CREATE CANNED-RES - URL', url);
|
|
262
|
+
|
|
263
|
+
const httpOptions = {
|
|
264
|
+
headers: new HttpHeaders({
|
|
265
|
+
'Content-Type': 'application/json',
|
|
266
|
+
Authorization: token
|
|
267
|
+
})
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
const body = { 'text': message, 'title': title };
|
|
271
|
+
|
|
272
|
+
this.logger.log('[TILEDESK-SERVICE] CREATE CANNED-RES - BODY ', body);
|
|
273
|
+
|
|
274
|
+
return this.http.post(url, JSON.stringify(body), httpOptions).pipe(map((res: any) => {
|
|
275
|
+
this.logger.log('[TILEDESK-SERVICE] - CREATE CANNED-RES - RES ', res);
|
|
276
|
+
return res
|
|
277
|
+
}))
|
|
278
|
+
|
|
279
|
+
}
|
|
256
280
|
|
|
257
281
|
// .post(url, JSON.stringify(body), options)
|
|
258
282
|
// .map((res) => res.json());
|
|
@@ -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
|
],
|