@chat21/chat21-ionic 3.0.85 → 3.0.86-rc.2
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 +121 -4
- package/README.md +2 -2
- package/package.json +4 -3
- package/src/app/app-routing.module.ts +7 -2
- package/src/app/app.component.html +7 -1
- package/src/app/app.component.scss +20 -2
- package/src/app/app.component.ts +131 -20
- package/src/app/app.module.ts +8 -3
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +11 -4
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +86 -23
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +188 -88
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +42 -3
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +11 -24
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +6 -10
- 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 +16 -26
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +5 -1
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +22 -15
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +25 -5
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +2 -1
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +14 -15
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +24 -5
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +6 -1
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +12 -13
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +26 -5
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.html +8 -2
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.scss +36 -0
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/html/html.component.ts +0 -1
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +3 -2
- package/src/app/chatlib/conversation-detail/message/image/image.component.scss +17 -5
- 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 +3 -2
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +16 -6
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -3
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +2 -0
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +78 -52
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +63 -20
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -10
- package/src/app/components/canned-response/canned-response.component.html +9 -9
- package/src/app/components/canned-response/canned-response.component.scss +14 -7
- package/src/app/components/canned-response/canned-response.component.ts +5 -4
- package/src/app/components/contacts-directory/contacts-directory.component.html +22 -26
- package/src/app/components/contacts-directory/contacts-directory.component.scss +8 -6
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +64 -47
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +98 -61
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +24 -44
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +116 -0
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +39 -42
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +67 -4
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +82 -154
- package/src/app/components/conversation-info/info-content/info-content.component.html +23 -2
- package/src/app/components/conversation-info/info-content/info-content.component.ts +5 -6
- package/src/app/components/conversation-info/info-direct/info-direct.component.html +7 -14
- package/src/app/components/conversation-info/info-direct/info-direct.component.scss +23 -0
- package/src/app/components/conversation-info/info-direct/info-direct.component.ts +1 -6
- package/src/app/components/conversation-info/info-group/info-group.component.html +44 -108
- package/src/app/components/conversation-info/info-group/info-group.component.scss +101 -61
- package/src/app/components/conversation-info/info-group/info-group.component.ts +1 -0
- package/src/app/components/conversation-info/info-support-group/info-support-group.component.html +2 -1
- package/src/app/components/conversation-info/info-support-group/info-support-group.component.ts +0 -1
- package/src/app/components/{ddp-header/ddp-header.component.html → conversations-list/header-conversations-list/header-conversations-list.component.html} +3 -3
- package/src/app/components/{ddp-header/ddp-header.component.scss → conversations-list/header-conversations-list/header-conversations-list.component.scss} +16 -4
- package/src/app/components/{conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts → conversations-list/header-conversations-list/header-conversations-list.component.spec.ts} +6 -6
- package/src/app/components/{ddp-header/ddp-header.component.ts → conversations-list/header-conversations-list/header-conversations-list.component.ts} +7 -16
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +12 -0
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +14 -0
- package/src/app/components/{conversation-detail/option-header/option-header.component.spec.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.spec.ts} +5 -5
- package/src/app/components/{conversation-detail/option-header/option-header.component.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.ts} +5 -4
- package/src/app/components/navbar/navbar.component.html +103 -0
- package/src/app/components/navbar/navbar.component.scss +249 -0
- package/src/app/components/{ddp-header/ddp-header.component.spec.ts → navbar/navbar.component.spec.ts} +6 -6
- package/src/app/components/navbar/navbar.component.ts +195 -0
- package/src/app/components/project-item/project-item.component.html +98 -149
- package/src/app/components/project-item/project-item.component.scss +43 -35
- package/src/app/components/project-item/project-item.component.ts +16 -4
- 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 +24 -13
- package/src/app/components/utils/user-presence/user-presence.component.html +7 -2
- package/src/app/components/utils/user-presence/user-presence.component.scss +35 -18
- package/src/app/components/utils/user-presence/user-presence.component.ts +6 -10
- package/src/app/{pages → modals}/create-canned-response/create-canned-response-routing.module.ts +0 -0
- package/src/app/{pages → modals}/create-canned-response/create-canned-response.module.ts +0 -0
- package/src/app/{pages → modals}/create-canned-response/create-canned-response.page.html +0 -0
- package/src/app/{pages → modals}/create-canned-response/create-canned-response.page.scss +0 -0
- package/src/app/{pages → modals}/create-canned-response/create-canned-response.page.spec.ts +0 -0
- package/src/app/{pages → modals}/create-canned-response/create-canned-response.page.ts +13 -13
- package/src/app/{pages → modals}/loader-preview/loader-preview-routing.module.ts +0 -0
- package/src/app/{pages → modals}/loader-preview/loader-preview.module.ts +0 -0
- package/src/app/{pages → modals}/loader-preview/loader-preview.page.html +1 -1
- package/src/app/{pages → modals}/loader-preview/loader-preview.page.scss +4 -0
- package/src/app/{pages → modals}/loader-preview/loader-preview.page.spec.ts +0 -0
- package/src/app/{pages → modals}/loader-preview/loader-preview.page.ts +1 -2
- package/src/app/modals/send-email/send-email-routing.module.ts +17 -0
- package/src/app/modals/send-email/send-email.module.ts +31 -0
- package/src/app/modals/send-email/send-email.page.html +46 -0
- package/src/app/modals/send-email/send-email.page.scss +161 -0
- package/src/app/modals/send-email/send-email.page.spec.ts +24 -0
- package/src/app/modals/send-email/send-email.page.ts +89 -0
- package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
- package/src/app/pages/contacts-directory/contacts-directory.page.scss +47 -0
- package/src/app/pages/contacts-directory/contacts-directory.page.ts +2 -0
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +0 -8
- package/src/app/pages/conversation-detail/conversation-detail.page.html +48 -27
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +45 -254
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +330 -138
- package/src/app/pages/conversations-list/conversations-list.page.html +11 -8
- package/src/app/pages/conversations-list/conversations-list.page.scss +18 -2
- package/src/app/pages/conversations-list/conversations-list.page.ts +26 -24
- package/src/app/pages/profile-info/profile-info.page.html +2 -4
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +42 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +1 -0
- package/src/app/services/canned-responses/canned-responses.service.ts +26 -0
- package/src/app/services/projects/projects.service.spec.ts +12 -0
- package/src/app/services/projects/projects.service.ts +43 -0
- package/src/app/services/tiledesk/tiledesk.service.ts +33 -17
- package/src/app/shared/shared.module.ts +24 -33
- package/src/app/utils/toast.spec.ts +7 -0
- package/src/app/utils/toast.ts +48 -0
- package/src/assets/i18n/ar.json +288 -265
- package/src/assets/i18n/az.json +24 -1
- package/src/assets/i18n/de.json +25 -2
- package/src/assets/i18n/en.json +25 -2
- package/src/assets/i18n/es.json +26 -3
- package/src/assets/i18n/fr.json +24 -1
- package/src/assets/i18n/it.json +24 -1
- package/src/assets/i18n/kk.json +25 -2
- package/src/assets/i18n/pt.json +25 -2
- package/src/assets/i18n/ru.json +24 -1
- package/src/assets/i18n/sr.json +287 -264
- package/src/assets/i18n/sv.json +25 -2
- package/src/assets/i18n/tr.json +25 -2
- package/src/assets/i18n/uk.json +25 -2
- package/src/assets/i18n/uz.json +24 -1
- package/src/assets/js/chat21client.js +1 -1
- package/src/assets/sounds/interface-start.mp3 +0 -0
- package/src/assets/sounds/wheep-wheep.mp3 +0 -0
- package/src/chat-config-mqtt-localhost.json +2 -2
- package/src/chat-config-native-mqtt.json +3 -0
- package/src/chat21-core/models/conversation.ts +0 -1
- package/src/chat21-core/models/projects.ts +27 -0
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +7 -9
- package/src/chat21-core/providers/logger/customLogger.ts +1 -1
- package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +7 -8
- package/src/chat21-core/utils/constants.ts +7 -1
- package/src/chat21-core/utils/convertRequestToConversation.ts +41 -0
- package/src/chat21-core/utils/user-typing/user-typing.component.html +8 -5
- package/src/chat21-core/utils/user-typing/user-typing.component.scss +87 -17
- package/src/chat21-core/utils/user-typing/user-typing.component.ts +12 -94
- package/src/chat21-core/utils/utils.ts +41 -11
- package/src/global.scss +59 -255
- package/src/index.html +0 -9
- package/src/variables.scss +30 -10
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +0 -3
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +0 -21
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +0 -14
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +0 -54
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +0 -98
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +0 -84
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +0 -30
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +0 -83
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +0 -68
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +0 -3
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +0 -10
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +0 -14
- package/src/app/components/conversation-detail/option-header/option-header.component.html +0 -13
- package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TYPE_GROUP } from './../../../../chat21-core/utils/constants';
|
|
1
2
|
import {
|
|
2
3
|
Component,
|
|
3
4
|
OnInit,
|
|
@@ -12,17 +13,13 @@ import { ImageRepoService } from 'src/chat21-core/providers/abstract/image-repo.
|
|
|
12
13
|
// Logger
|
|
13
14
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service'
|
|
14
15
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance'
|
|
15
|
-
import {
|
|
16
|
-
setConversationAvatar,
|
|
17
|
-
setChannelType,
|
|
18
|
-
} from 'src/chat21-core/utils/utils'
|
|
19
16
|
import { Platform } from '@ionic/angular'
|
|
20
17
|
|
|
21
18
|
import { ModalController } from '@ionic/angular'
|
|
22
19
|
import { EventsService } from 'src/app/services/events-service'
|
|
23
20
|
import { CreateTicketPage } from 'src/app/pages/create-ticket/create-ticket.page'
|
|
24
21
|
import { TiledeskService } from 'src/app/services/tiledesk/tiledesk.service'
|
|
25
|
-
import { TYPE_DIRECT } from 'src/chat21-core/utils/constants'
|
|
22
|
+
import { TYPE_DIRECT, TYPE_SUPPORT_GROUP } from 'src/chat21-core/utils/constants'
|
|
26
23
|
|
|
27
24
|
@Component({
|
|
28
25
|
selector: 'app-header-conversation-detail',
|
|
@@ -34,24 +31,22 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
34
31
|
@Input() idLoggedUser: string
|
|
35
32
|
@Input() conversationUid: string
|
|
36
33
|
@Input() conv_type: string
|
|
37
|
-
@Input() isOpenInfoConversation: boolean = true
|
|
38
34
|
@Input() isMobile: boolean
|
|
39
|
-
@Input()
|
|
40
|
-
@Output() eventOpenCloseInfoConversation = new EventEmitter<boolean>()
|
|
35
|
+
@Input() translationsMap: Map<string, string>
|
|
41
36
|
conversationWithFullname: string
|
|
42
37
|
openInfoConversation = true
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
|
|
45
39
|
isDirect = false
|
|
46
|
-
isTyping = false
|
|
47
40
|
borderColor = '#ffffff'
|
|
48
41
|
fontColor = '#949494'
|
|
49
|
-
membersConversation = ['SYSTEM']
|
|
50
42
|
platformName: string
|
|
51
|
-
conv_closed: boolean = false;
|
|
43
|
+
// conv_closed: boolean = false;
|
|
52
44
|
IS_ON_IOS_MOBILE_DEVICE: boolean
|
|
53
45
|
private logger: LoggerService = LoggerInstance.getInstance()
|
|
54
46
|
|
|
47
|
+
TYPE_SUPPORT_GROUP = TYPE_SUPPORT_GROUP
|
|
48
|
+
TYPE_GROUP = TYPE_GROUP
|
|
49
|
+
|
|
55
50
|
constructor(
|
|
56
51
|
public imageRepoService: ImageRepoService,
|
|
57
52
|
private route: ActivatedRoute,
|
|
@@ -72,8 +67,7 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
72
67
|
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - idLoggedUser', this.idLoggedUser,)
|
|
73
68
|
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - conversationAvatar', this.conversationAvatar,)
|
|
74
69
|
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - conv_type', this.conv_type)
|
|
75
|
-
this.listenToConversationHasBeenClosed()
|
|
76
|
-
this.initialize();
|
|
70
|
+
// this.listenToConversationHasBeenClosed()
|
|
77
71
|
// this.isOniOSMobileDevice()
|
|
78
72
|
}
|
|
79
73
|
|
|
@@ -91,8 +85,8 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
91
85
|
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnChanges) - conversationAvatar', this.conversationAvatar)
|
|
92
86
|
if (this.conversationAvatar) {
|
|
93
87
|
this.conversationAvatar.imageurl = this.imageRepoService.getImagePhotoUrl(this.conversationAvatar.uid)
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
this.initialize()
|
|
89
|
+
}
|
|
96
90
|
}
|
|
97
91
|
|
|
98
92
|
// ----------------------------------------------------
|
|
@@ -102,8 +96,6 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
102
96
|
this.getPlatformName()
|
|
103
97
|
if ( this.conversationAvatar && this.conversationAvatar.channelType === TYPE_DIRECT ) {
|
|
104
98
|
this.isDirect = true
|
|
105
|
-
} else if (this.idLoggedUser) {
|
|
106
|
-
this.membersConversation.push(this.idLoggedUser)
|
|
107
99
|
}
|
|
108
100
|
}
|
|
109
101
|
|
|
@@ -118,32 +110,20 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
118
110
|
}
|
|
119
111
|
}
|
|
120
112
|
|
|
121
|
-
closeConversation() {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
listenToConversationHasBeenClosed() {
|
|
127
|
-
this.events.subscribe('conversationhasbeenclosed', (convId) => {
|
|
128
|
-
// console.log('[CONVS-DETAIL][HEADER] conversationhasbeenclosed convId', convId)
|
|
129
|
-
if (convId === this.conversationUid) {
|
|
130
|
-
this.logger.log('[CONVS-DETAIL][HEADER] the conversation was closed',)
|
|
131
|
-
this.conv_closed = true;
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
113
|
+
// closeConversation() {
|
|
114
|
+
// this.logger.log('[CONVS-DETAIL][HEADER] click on RESOLVE this.events', this.events)
|
|
115
|
+
// this.events.publish('conversation:closed', this.conversationUid)
|
|
116
|
+
// }
|
|
137
117
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
118
|
+
// listenToConversationHasBeenClosed() {
|
|
119
|
+
// this.events.subscribe('conversationhasbeenclosed', (convId) => {
|
|
120
|
+
// // console.log('[CONVS-DETAIL][HEADER] conversationhasbeenclosed convId', convId)
|
|
121
|
+
// if (convId === this.conversationUid) {
|
|
122
|
+
// this.logger.log('[CONVS-DETAIL][HEADER] the conversation was closed',)
|
|
123
|
+
// this.conv_closed = true;
|
|
124
|
+
// }
|
|
125
|
+
// });
|
|
126
|
+
// }
|
|
147
127
|
|
|
148
128
|
/** */
|
|
149
129
|
pushPage(event) { }
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<ion-header no-border class="ion-no-border">
|
|
2
|
+
<ion-toolbar style="height:60px">
|
|
3
|
+
<div class="flex-container">
|
|
4
|
+
<div class="back-flex-container">
|
|
5
|
+
<ion-buttons slot="start" style="height:60px">
|
|
6
|
+
<!-- (click)="pushPage('conversations-list')" defaultHref="/conversations-list" -->
|
|
7
|
+
<ion-back-button style="display: block;" text="" *ngIf="isMobile" (click)="goBackToConversationList()">
|
|
8
|
+
</ion-back-button>
|
|
9
|
+
</ion-buttons>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="user-info-flex-container">
|
|
12
|
+
<div style="display: flex;">
|
|
13
|
+
<div>1</div>
|
|
14
|
+
<div>2</div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div class="resolve-flex-container">
|
|
19
|
+
<ion-buttons slot="end">
|
|
20
|
+
|
|
21
|
+
<!-- <ion-button ion-button fill="clear" color="primary" size="small" (click)="presentCreateTicketModal()" [ngClass]="{'resolve-conv-margin-right': !isMobile}">
|
|
22
|
+
<ion-icon name="ticket-outline"></ion-icon>
|
|
23
|
+
<span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Crea ticket' | translate}} </span>
|
|
24
|
+
</ion-button> -->
|
|
25
|
+
|
|
26
|
+
<ion-button *ngIf="conversationUid?.startsWith('support-group') && conv_type !== 'archived'" ion-button fill="clear" color="primary" size="small"
|
|
27
|
+
(click)="closeConversation()" [ngClass]="{'resolve-conv-margin-right': !isMobile}" [disabled]="conv_closed === true">
|
|
28
|
+
<!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
|
|
29
|
+
<ion-icon name="archive-outline"></ion-icon>
|
|
30
|
+
<!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
|
|
31
|
+
<span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Resolve' | translate}} </span>
|
|
32
|
+
</ion-button>
|
|
33
|
+
|
|
34
|
+
<ion-button *ngIf="!openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
|
|
35
|
+
<!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
|
|
36
|
+
<ion-icon slot="icon-only" name="information-circle-outline"></ion-icon>
|
|
37
|
+
<!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
|
|
38
|
+
|
|
39
|
+
</ion-button>
|
|
40
|
+
<ion-button *ngIf="openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
|
|
41
|
+
<ion-icon slot="icon-only" name="close-circle-outline"></ion-icon>
|
|
42
|
+
</ion-button>
|
|
43
|
+
|
|
44
|
+
</ion-buttons>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
</div>
|
|
48
|
+
</ion-toolbar>
|
|
49
|
+
</ion-header>
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
<ion-title>
|
|
55
|
+
|
|
56
|
+
<div *ngIf="conversationAvatar" class="avatar-and-typing-wpr" >
|
|
57
|
+
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '55px' : '' }" -->
|
|
58
|
+
<div *ngIf="conversationAvatar" class="avatar-container" (click)="onOpenCloseInfoConversation()" style="cursor: pointer"
|
|
59
|
+
[ngClass]="{ 'avatar-container-ios': platformName === 'ios' }">
|
|
60
|
+
<app-avatar-profile [itemAvatar]=conversationAvatar></app-avatar-profile>
|
|
61
|
+
</div>
|
|
62
|
+
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '63px' : '' }" -->
|
|
63
|
+
<div *ngIf="isDirect" class="user-presence" [ngClass]="{ 'user-presence-ios': platformName === 'ios' }">
|
|
64
|
+
<app-user-presence [idUser]=conversationAvatar.conversation_with [translationMap]=translationMap
|
|
65
|
+
[borderColor]=borderColor [fontColor]=fontColor>
|
|
66
|
+
</app-user-presence>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div *ngIf="conversationAvatar" class="user-typing">
|
|
70
|
+
<app-user-typing [idConversation]=conversationAvatar.uid [idCurrentUser]=idLoggedUser [isDirect]=isDirect
|
|
71
|
+
[translationMap]=translationMap [color]=fontColor [membersConversation]=membersConversation>
|
|
72
|
+
</app-user-typing>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
</div>
|
|
76
|
+
<!-- [ngClass] = "{ 'tile-info-with-ios': platformName === 'ios' ? '82px' : ''82px'' }" -->
|
|
77
|
+
<!-- (click)="onOpenCloseInfoConversation()" -->
|
|
78
|
+
<div *ngIf="conversationAvatar" class="tile-info-with"
|
|
79
|
+
[ngClass]="{ 'tile-info-with-ios': platformName === 'ios' }">
|
|
80
|
+
<span class="tile-username">{{ conversationAvatar.conversation_with_fullname | truncate:50 }} </span>
|
|
81
|
+
<!-- <span class="tile-username">{{ conversation_with_fullname }} </span> -->
|
|
82
|
+
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<!-- <div *ngIf="conversationWithFullname" class="tile-info-with" (click)="onOpenCloseInfoConversation()">
|
|
86
|
+
<span class="tile-username">{{ conversationWithFullname }} </span>
|
|
87
|
+
</div> -->
|
|
88
|
+
|
|
89
|
+
</ion-title>
|
|
90
|
+
<!-- openInfoConversation {{openInfoConversation}} -->
|
|
91
|
+
<ion-buttons slot="end">
|
|
92
|
+
|
|
93
|
+
<!-- <ion-button ion-button fill="clear" color="primary" size="small" (click)="presentCreateTicketModal()" [ngClass]="{'resolve-conv-margin-right': !isMobile}">
|
|
94
|
+
<ion-icon name="ticket-outline"></ion-icon>
|
|
95
|
+
<span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Crea ticket' | translate}} </span>
|
|
96
|
+
</ion-button> -->
|
|
97
|
+
|
|
98
|
+
<ion-button *ngIf="conversationUid?.startsWith('support-group') && conv_type !== 'archived'" ion-button fill="clear" color="primary" size="small"
|
|
99
|
+
(click)="closeConversation()" [ngClass]="{'resolve-conv-margin-right': !isMobile}" [disabled]="conv_closed === true">
|
|
100
|
+
<!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
|
|
101
|
+
<ion-icon name="archive-outline"></ion-icon>
|
|
102
|
+
<!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
|
|
103
|
+
<span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Resolve' | translate}} </span>
|
|
104
|
+
</ion-button>
|
|
105
|
+
|
|
106
|
+
<ion-button *ngIf="!openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
|
|
107
|
+
<!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
|
|
108
|
+
<ion-icon slot="icon-only" name="information-circle-outline"></ion-icon>
|
|
109
|
+
<!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
|
|
110
|
+
|
|
111
|
+
</ion-button>
|
|
112
|
+
<ion-button *ngIf="openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
|
|
113
|
+
<ion-icon slot="icon-only" name="close-circle-outline"></ion-icon>
|
|
114
|
+
</ion-button>
|
|
115
|
+
|
|
116
|
+
</ion-buttons>
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html
CHANGED
|
@@ -1,66 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
<
|
|
1
|
+
<ion-grid>
|
|
2
|
+
<div class="footer-options-container">
|
|
3
|
+
<!-- CHAT-OPTION -->
|
|
4
|
+
<div class="section-option" id="chat" tooltip="{{translationMap?.get('LABEL_CHAT')}}" [options]="tooltipOptions" placement="top">
|
|
5
|
+
<ion-button fill="clear" (click)="onOpenSection('chat')" [class.active]="section==='chat'">
|
|
6
|
+
<ion-icon name="chatbubbles"></ion-icon>
|
|
7
|
+
{{translationMap.get('LABEL_CHAT')}}
|
|
8
|
+
</ion-button>
|
|
9
|
+
</div>
|
|
10
|
+
<!-- EMAIL-OPTION -->
|
|
11
|
+
<div class="section-option" id="email" tooltip="{{translationMap?.get('LABEL_EMAIL')}}" [options]="tooltipOptions" placement="top">
|
|
12
|
+
<ion-button fill="clear" [class.active]="section==='email'" (click)="onOpenSection('email')" [disabled]="channelType === 'direct'">
|
|
13
|
+
<ion-icon name="mail-open"></ion-icon>
|
|
14
|
+
{{translationMap.get('LABEL_EMAIL')}}
|
|
15
|
+
</ion-button>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<ion-row id="message-email" [style.display]="section==='email'? 'flex': 'none'">
|
|
3
20
|
<ion-col col-auto>
|
|
4
|
-
<div class="
|
|
5
|
-
|
|
6
|
-
<ion-button ion-button fill="clear" class="upload-image-btn">
|
|
7
|
-
<ion-icon slot="icon-only" lazy="true" name="attach-outline"
|
|
8
|
-
style="font-size: 30px;transform: rotate(42deg);"></ion-icon>
|
|
9
|
-
<input #fileInput type="file" (change)="onFileSelected($event)" capture="camera" id="file-input"
|
|
10
|
-
[accept]="fileUploadAccept">
|
|
11
|
-
</ion-button>
|
|
12
|
-
</div>
|
|
13
|
-
|
|
14
|
-
<div class="text-message">
|
|
15
|
-
<ion-textarea id="ion-textarea" #messageTextArea #message_text_area #textArea rows="1"
|
|
16
|
-
[placeholder]="TEXAREA_PLACEHOLDER" autosize="false" auto-grow="true" autofocus="true" [value]=""
|
|
17
|
-
[(ngModel)]="messageString" (ionChange)="ionChange($event);"
|
|
18
|
-
(keydown.enter)="onKeydown($event, messageString)" (paste)="onPaste($event)">
|
|
19
|
-
</ion-textarea>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<div class="buttons-right">
|
|
23
|
-
<ion-button [disabled]="conversationEnabled === false" class="send-button right active" ion-button fill="clear"
|
|
24
|
-
(click)="sendMessage(messageString)">
|
|
25
|
-
<ion-icon
|
|
26
|
-
[ngClass]="{'send-msg-disabled': conversationEnabled === false,'send-msg-activated': conversationEnabled === true }"
|
|
27
|
-
slot="icon-only" name="send"></ion-icon>
|
|
28
|
-
</ion-button>
|
|
29
|
-
</div>
|
|
21
|
+
<div *ngIf="leadInfo?.hasEmail" class="placeholder" (click)="onOpenEmailModal()">{{translationMap.get('EMAIL_PLACEHOLDER')}}</div>
|
|
22
|
+
<div *ngIf="!leadInfo?.hasEmail" class="placeholder noEmail">{{translationMap.get('EMAIL_NOT_FOUND_PLACEHOLDER')}}</div>
|
|
30
23
|
</ion-col>
|
|
31
24
|
</ion-row>
|
|
32
|
-
</ion-grid> -->
|
|
33
25
|
|
|
34
|
-
|
|
35
|
-
<!-- ----------new -->
|
|
36
|
-
<ion-grid>
|
|
37
|
-
<ion-row id="message-text-area">
|
|
26
|
+
<ion-row id="message-text-area" [style.display]="section==='chat'? 'flex': 'none'">
|
|
38
27
|
|
|
39
28
|
<ion-col col-auto>
|
|
40
29
|
|
|
41
30
|
<div class="start-buttons" style="position: absolute;display: flex; top: 2px;">
|
|
42
31
|
|
|
32
|
+
<!-- CANNED RESPONSES -->
|
|
43
33
|
<ng-container *ngIf="areVisibleCAR && supportMode">
|
|
44
34
|
<div class="canned-responses-btn-wpr" style="margin-left: -5px;"
|
|
45
35
|
tooltip="{{translationMap?.get('CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top">
|
|
46
36
|
<ion-button ion-button fill="clear" class="canned-responses-btn" (click)="openCannedResponses()"
|
|
47
|
-
[disabled]="!
|
|
37
|
+
[disabled]="!conversationWith?.startsWith(TYPE_SUPPORT_GROUP) || disableTextarea">
|
|
48
38
|
<ion-icon slot="icon-only" lazy="true" name="flash-outline" style="font-size: 24px;"></ion-icon>
|
|
49
39
|
</ion-button>
|
|
50
40
|
</div>
|
|
51
|
-
<div *ngIf="
|
|
41
|
+
<div *ngIf="conversationWith?.startsWith(TYPE_SUPPORT_GROUP) && tagsCannedCount === 0"
|
|
52
42
|
tooltip="{{translationMap?.get('NO_CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top"
|
|
53
43
|
class="no-canned-responses-btn-badge">
|
|
54
44
|
<ion-icon name="alert-sharp" style="vertical-align: middle;"></ion-icon>
|
|
55
45
|
</div>
|
|
56
|
-
<div *ngIf="
|
|
46
|
+
<div *ngIf="conversationWith?.startsWith(TYPE_SUPPORT_GROUP) && tagsCannedCount > 0"
|
|
57
47
|
tooltip="{{translationMap?.get('YES_CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top"
|
|
58
48
|
class="canned-responses-btn-badge">
|
|
59
49
|
<ion-icon name="information-sharp" style="vertical-align: middle;"></ion-icon>
|
|
60
50
|
</div>
|
|
61
51
|
</ng-container>
|
|
62
52
|
|
|
63
|
-
|
|
53
|
+
<!-- UPLOAD ATTACHMENT -->
|
|
64
54
|
<div class="upload-image-btn-wpr" tooltip="{{translationMap?.get('UPLOAD')}}" [options]="tooltipOptions"
|
|
65
55
|
placement="top">
|
|
66
56
|
<ion-button ion-button fill="clear" class="upload-image-btn" [disabled]="disableTextarea">
|
|
@@ -95,7 +85,8 @@
|
|
|
95
85
|
[perLine]="emojiPerLine"
|
|
96
86
|
[style.visibility]="showEmojiPicker?'visible':'hidden'"
|
|
97
87
|
[include]="emojiiCategories"
|
|
98
|
-
[color]="emojiColor"
|
|
88
|
+
[color]="emojiColor"
|
|
89
|
+
[custom]="customEmojis"
|
|
99
90
|
[ngClass]="{'emoji-mart-desktop': !IS_ON_MOBILE_DEVICE, 'emoji-mart-mobile': IS_ON_MOBILE_DEVICE }"
|
|
100
91
|
(emojiSelect)="addEmoji($event)">
|
|
101
92
|
</emoji-mart>
|
|
@@ -110,12 +101,18 @@
|
|
|
110
101
|
|
|
111
102
|
<div class="text-message" [ngClass]="{'text-message-no-cr': areVisibleCAR === false || supportMode === false}">
|
|
112
103
|
<ion-textarea id="ion-textarea" #messageTextArea #message_text_area #textArea rows="1"
|
|
113
|
-
[placeholder]="
|
|
114
|
-
|
|
115
|
-
|
|
104
|
+
[placeholder]="translationMap?.get('LABEL_ENTER_MSG_SHORT')"
|
|
105
|
+
autosize="false"
|
|
106
|
+
auto-grow="true"
|
|
107
|
+
autofocus="true"
|
|
108
|
+
[value]=""
|
|
109
|
+
[disabled]="disableTextarea"
|
|
110
|
+
[(ngModel)]="messageString"
|
|
111
|
+
(ionChange)="ionChange($event);"
|
|
112
|
+
(keydown.enter)="onKeydown($event, messageString)"
|
|
113
|
+
(paste)="onPaste($event)">
|
|
116
114
|
</ion-textarea>
|
|
117
115
|
</div>
|
|
118
|
-
|
|
119
116
|
<div class="buttons-right">
|
|
120
117
|
<ion-button [disabled]="conversationEnabled === false" class="send-button right active" ion-button fill="clear"
|
|
121
118
|
(click)="sendMessage(messageString)">
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss
CHANGED
|
@@ -1,9 +1,76 @@
|
|
|
1
|
+
.footer-options-container{
|
|
2
|
+
display: flex;
|
|
3
|
+
-webkit-box-align: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
padding: 0px 16px 0px;
|
|
6
|
+
border-bottom: 1px solid rgb(239, 242, 246);
|
|
7
|
+
border-top: 3px solid var(--basic-blue);
|
|
8
|
+
|
|
9
|
+
.section-option{
|
|
10
|
+
line-height: 16px;
|
|
11
|
+
letter-spacing: -0.01em;
|
|
12
|
+
color: rgb(100, 116, 145);
|
|
13
|
+
position: relative;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: flex-end;
|
|
16
|
+
border-radius: 4px;
|
|
17
|
+
|
|
18
|
+
ion-button{
|
|
19
|
+
color: rgb(135, 150, 175);
|
|
20
|
+
font-size: 11px;
|
|
21
|
+
margin: 2px;
|
|
22
|
+
padding-bottom: 0px;
|
|
23
|
+
--padding-start: 0px;
|
|
24
|
+
--ripple-color: transparent;
|
|
25
|
+
text-transform: unset;
|
|
26
|
+
height: 25px;
|
|
27
|
+
&.active{
|
|
28
|
+
color: var(--basic-blue);
|
|
29
|
+
}
|
|
30
|
+
ion-icon{
|
|
31
|
+
margin-right: 4px;
|
|
32
|
+
margin-left: 4px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
#message-email{
|
|
39
|
+
min-height: 40px;
|
|
40
|
+
max-height: 200px;
|
|
41
|
+
height: auto;
|
|
42
|
+
padding: 0;
|
|
43
|
+
margin: 0;
|
|
44
|
+
align-items: center;
|
|
45
|
+
|
|
46
|
+
div.placeholder{
|
|
47
|
+
padding: 0;
|
|
48
|
+
margin: 0;
|
|
49
|
+
height: auto;
|
|
50
|
+
overflow: auto;
|
|
51
|
+
// min-height: 30px;
|
|
52
|
+
min-height: 37px; // NK edited
|
|
53
|
+
max-height: 37px; //184px;
|
|
54
|
+
padding: 9px 20px 9px;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
|
|
57
|
+
&.noEmail{
|
|
58
|
+
color: red;
|
|
59
|
+
cursor: not-allowed;
|
|
60
|
+
font-size: 12px
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
1
64
|
#message-text-area {
|
|
2
65
|
min-height: 40px;
|
|
3
66
|
max-height: 200px;
|
|
4
67
|
height: auto;
|
|
5
68
|
padding: 0;
|
|
6
69
|
margin: 0;
|
|
70
|
+
|
|
71
|
+
ion-icon{
|
|
72
|
+
color: var(--basic-blue);
|
|
73
|
+
}
|
|
7
74
|
.buttons-left {
|
|
8
75
|
position: absolute;
|
|
9
76
|
left: 0;
|
|
@@ -165,10 +232,6 @@
|
|
|
165
232
|
border-radius: 50%;
|
|
166
233
|
}
|
|
167
234
|
|
|
168
|
-
.send-msg-activated {
|
|
169
|
-
color: #3880ff !important;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
235
|
.send-msg-disabled {
|
|
173
236
|
cursor: default;
|
|
174
237
|
opacity: 0.8;
|