@chat21/chat21-ionic 3.0.79 → 3.0.80-rc.1
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 +62 -2
- package/README.md +2 -2
- package/package.json +1 -1
- package/src/app/app.component.html +7 -1
- package/src/app/app.component.scss +18 -2
- package/src/app/app.component.ts +73 -15
- package/src/app/app.module.ts +3 -1
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +8 -1
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +75 -23
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +162 -85
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +39 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +7 -19
- 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 -25
- 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/html/html.component.ts +0 -1
- 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 +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 +62 -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 +4 -4
- package/src/app/components/canned-response/canned-response.component.scss +1 -1
- package/src/app/components/canned-response/canned-response.component.ts +1 -0
- 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 +61 -42
- 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 +9 -25
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +6 -5
- 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 +4 -83
- package/src/app/components/conversation-info/info-content/info-content.component.html +2 -1
- package/src/app/components/conversation-info/info-content/info-content.component.ts +3 -2
- package/src/app/components/conversation-info/info-direct/info-direct.component.html +1 -9
- package/src/app/components/conversation-info/info-direct/info-direct.component.ts +0 -2
- 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/{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 +189 -0
- package/src/app/components/project-item/project-item.component.html +98 -149
- package/src/app/components/project-item/project-item.component.scss +42 -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 +3 -3
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +2 -7
- 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/contacts-directory/contacts-directory.page.html +1 -1
- package/src/app/pages/contacts-directory/contacts-directory.page.scss +41 -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 +40 -23
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +40 -250
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +183 -72
- package/src/app/pages/conversations-list/conversations-list.page.html +11 -8
- package/src/app/pages/conversations-list/conversations-list.page.scss +11 -2
- package/src/app/pages/conversations-list/conversations-list.page.ts +25 -22
- 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 +4 -0
- package/src/app/pages/loader-preview/loader-preview.page.ts +1 -2
- 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 +1 -25
- package/src/app/shared/shared.module.ts +24 -33
- package/src/assets/i18n/ar.json +278 -265
- package/src/assets/i18n/az.json +14 -1
- package/src/assets/i18n/de.json +15 -2
- package/src/assets/i18n/en.json +15 -2
- package/src/assets/i18n/es.json +15 -2
- package/src/assets/i18n/fr.json +14 -1
- package/src/assets/i18n/it.json +14 -1
- package/src/assets/i18n/kk.json +15 -2
- package/src/assets/i18n/pt.json +15 -2
- package/src/assets/i18n/ru.json +14 -1
- package/src/assets/i18n/sr.json +277 -264
- package/src/assets/i18n/sv.json +15 -2
- package/src/assets/i18n/tr.json +15 -2
- package/src/assets/i18n/uk.json +15 -2
- package/src/assets/i18n/uz.json +14 -1
- package/src/assets/sounds/wheep-wheep.mp3 +0 -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/utils/constants.ts +5 -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 +38 -10
- package/src/global.scss +48 -56
- package/src/index.html +2 -2
- 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,11 +1,18 @@
|
|
|
1
1
|
|
|
2
2
|
ion-header {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
border: none;
|
|
4
|
+
&.mobile{
|
|
5
|
+
--ion-background-color: #fff;
|
|
6
|
+
border-bottom-style: solid;
|
|
7
|
+
border-color: var(--light-gray);
|
|
8
|
+
border-bottom-width: thin;
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
ion-toolbar{
|
|
8
|
-
height:
|
|
12
|
+
height: var(--header-height);
|
|
13
|
+
&:not(.mobile){
|
|
14
|
+
--background: var(--list-bkg-color);
|
|
15
|
+
}
|
|
9
16
|
.flex-container{
|
|
10
17
|
display: flex;
|
|
11
18
|
}
|
|
@@ -27,7 +34,7 @@ ion-header {
|
|
|
27
34
|
text-align: left;
|
|
28
35
|
padding-inline: unset;
|
|
29
36
|
margin: 0px 10px;
|
|
30
|
-
height: 40px;
|
|
37
|
+
// height: 40px;
|
|
31
38
|
width: 100%;
|
|
32
39
|
}
|
|
33
40
|
ion-avatar {
|
|
@@ -69,17 +76,27 @@ ion-header {
|
|
|
69
76
|
}
|
|
70
77
|
}
|
|
71
78
|
.tile-info-with {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
display: flex;
|
|
80
|
+
|
|
81
|
+
.tile-username {
|
|
82
|
+
display: inline-block;
|
|
83
|
+
font-size: 18px;
|
|
84
|
+
margin: 0;
|
|
85
|
+
padding: 0;
|
|
86
|
+
|
|
87
|
+
color: #1f2d3d;
|
|
88
|
+
font-weight: 400; //600;
|
|
89
|
+
-webkit-font-smoothing: antialiased;
|
|
90
|
+
text-rendering: optimizeLegibility;
|
|
91
|
+
-webkit-text-size-adjust: none;
|
|
92
|
+
-moz-text-size-adjust: none;
|
|
93
|
+
-ms-text-size-adjust: none;
|
|
94
|
+
text-size-adjust: none;
|
|
95
|
+
-webkit-user-select: text;
|
|
96
|
+
-moz-user-select: text;
|
|
97
|
+
-ms-user-select: text;
|
|
98
|
+
user-select: text;
|
|
99
|
+
}
|
|
83
100
|
}
|
|
84
101
|
.tile-point {
|
|
85
102
|
width: 10px;
|
|
@@ -90,27 +107,7 @@ ion-header {
|
|
|
90
107
|
margin-right: 5px;
|
|
91
108
|
vertical-align: middle;
|
|
92
109
|
}
|
|
93
|
-
|
|
94
|
-
display: inline-block;
|
|
95
|
-
font-size: 15px;
|
|
96
|
-
color: var(--black);
|
|
97
|
-
margin: 0;
|
|
98
|
-
padding: 0;
|
|
99
|
-
|
|
100
|
-
color: #3c4858;
|
|
101
|
-
font-family: "Google Sans",sans-serif!important;
|
|
102
|
-
font-weight: 600;
|
|
103
|
-
-webkit-font-smoothing: antialiased;
|
|
104
|
-
text-rendering: optimizeLegibility;
|
|
105
|
-
-webkit-text-size-adjust: none;
|
|
106
|
-
-moz-text-size-adjust: none;
|
|
107
|
-
-ms-text-size-adjust: none;
|
|
108
|
-
text-size-adjust: none;
|
|
109
|
-
-webkit-user-select: text;
|
|
110
|
-
-moz-user-select: text;
|
|
111
|
-
-ms-user-select: text;
|
|
112
|
-
user-select: text;
|
|
113
|
-
}
|
|
110
|
+
|
|
114
111
|
|
|
115
112
|
.tile-last-activity {
|
|
116
113
|
color: var(--light-gray);
|
|
@@ -125,6 +122,9 @@ ion-header {
|
|
|
125
122
|
}
|
|
126
123
|
|
|
127
124
|
ion-buttons {
|
|
125
|
+
ion-icon , span{
|
|
126
|
+
color: var(--basic-blue)
|
|
127
|
+
}
|
|
128
128
|
button {
|
|
129
129
|
max-width: 30px;
|
|
130
130
|
padding: 0;
|
|
@@ -133,42 +133,86 @@ ion-header {
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
.avatar-and-typing-wpr{
|
|
137
|
+
display: flex;
|
|
138
|
+
&.mobile{
|
|
139
|
+
margin-left: 25px;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
136
143
|
.avatar-container {
|
|
137
|
-
background-color: #fff;
|
|
144
|
+
// background-color: #fff;
|
|
138
145
|
color: #fff;
|
|
139
146
|
text-align: center;
|
|
140
|
-
width:
|
|
141
|
-
height:
|
|
142
|
-
position: absolute;
|
|
143
|
-
top: 0;
|
|
147
|
+
width: 44px;
|
|
148
|
+
height: 44px;
|
|
149
|
+
// position: absolute;
|
|
150
|
+
// top: 0;
|
|
151
|
+
// left: 20px;
|
|
144
152
|
border-radius: 50%;
|
|
145
153
|
padding: 0px;
|
|
146
|
-
transform: translateX(-50%);
|
|
147
|
-
left: 20px;
|
|
154
|
+
// transform: translateX(-50%);
|
|
148
155
|
|
|
149
156
|
border-color: #fff;
|
|
150
157
|
border-style: solid;
|
|
151
158
|
border-width: 0px;
|
|
152
159
|
line-height: 40px;
|
|
153
160
|
display: inline-block;
|
|
161
|
+
cursor: pointer;
|
|
154
162
|
}
|
|
163
|
+
|
|
164
|
+
.avatar-container-ios {
|
|
165
|
+
left: 55px;
|
|
166
|
+
top: 10px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.info-container{
|
|
170
|
+
display: flex;
|
|
171
|
+
flex-direction: column;
|
|
172
|
+
justify-content: center;
|
|
173
|
+
margin-left: 12px;
|
|
174
|
+
width: 80%;
|
|
175
|
+
}
|
|
176
|
+
|
|
155
177
|
.user-presence {
|
|
156
178
|
position: absolute;
|
|
157
|
-
bottom: 0;
|
|
179
|
+
bottom: 3px; //0;
|
|
158
180
|
height: 12px;
|
|
159
181
|
left: 30px;
|
|
160
182
|
width: 100px;
|
|
161
183
|
}
|
|
162
|
-
.
|
|
163
|
-
position: absolute;
|
|
164
|
-
left: 50px;
|
|
165
|
-
bottom: -3px;
|
|
166
|
-
padding: 0;
|
|
167
|
-
margin: 0;
|
|
168
|
-
|
|
169
|
-
|
|
184
|
+
.subtitle-info {
|
|
185
|
+
// position: absolute;
|
|
186
|
+
// left: 50px;
|
|
187
|
+
// bottom: -3px;
|
|
188
|
+
// padding: 0;
|
|
189
|
+
// margin: 0;
|
|
190
|
+
display: flex;
|
|
191
|
+
align-items: center;
|
|
192
|
+
// height: 16px;
|
|
193
|
+
// width: 140px;
|
|
194
|
+
font-size: 12px;
|
|
195
|
+
.conversation_project{
|
|
196
|
+
display: inline-flex;
|
|
197
|
+
align-items: center;
|
|
198
|
+
line-height: 1.2rem;
|
|
199
|
+
font-weight: 500;
|
|
200
|
+
color: #779bbb;
|
|
201
|
+
font-size: 10px;
|
|
202
|
+
max-width: 90%;
|
|
203
|
+
margin-right: 5px;
|
|
204
|
+
svg {
|
|
205
|
+
fill:#779bbb;
|
|
206
|
+
vertical-align: sub;
|
|
207
|
+
}
|
|
208
|
+
span{
|
|
209
|
+
padding-left: 5px
|
|
210
|
+
}
|
|
211
|
+
}
|
|
170
212
|
}
|
|
171
213
|
|
|
214
|
+
|
|
215
|
+
|
|
172
216
|
.tile-info-with-ios {
|
|
173
217
|
left: 82px !important;
|
|
174
218
|
top: 10px!important;
|
|
@@ -178,11 +222,4 @@ ion-header {
|
|
|
178
222
|
left: 63px;
|
|
179
223
|
}
|
|
180
224
|
|
|
181
|
-
.avatar-container-ios {
|
|
182
|
-
left: 55px;
|
|
183
|
-
top: 10px;
|
|
184
|
-
}
|
|
185
225
|
|
|
186
|
-
.resolve-conv-margin-right {
|
|
187
|
-
margin-right: 52px;
|
|
188
|
-
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TYPE_GROUP } from './../../../../chat21-core/utils/constants';
|
|
1
2
|
import {
|
|
2
3
|
Component,
|
|
3
4
|
OnInit,
|
|
@@ -22,7 +23,7 @@ import { ModalController } from '@ionic/angular'
|
|
|
22
23
|
import { EventsService } from 'src/app/services/events-service'
|
|
23
24
|
import { CreateTicketPage } from 'src/app/pages/create-ticket/create-ticket.page'
|
|
24
25
|
import { TiledeskService } from 'src/app/services/tiledesk/tiledesk.service'
|
|
25
|
-
import { TYPE_DIRECT } from 'src/chat21-core/utils/constants'
|
|
26
|
+
import { TYPE_DIRECT, TYPE_SUPPORT_GROUP } from 'src/chat21-core/utils/constants'
|
|
26
27
|
|
|
27
28
|
@Component({
|
|
28
29
|
selector: 'app-header-conversation-detail',
|
|
@@ -34,24 +35,22 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
34
35
|
@Input() idLoggedUser: string
|
|
35
36
|
@Input() conversationUid: string
|
|
36
37
|
@Input() conv_type: string
|
|
37
|
-
@Input() isOpenInfoConversation: boolean = true
|
|
38
38
|
@Input() isMobile: boolean
|
|
39
|
-
@Input()
|
|
40
|
-
@Output() eventOpenCloseInfoConversation = new EventEmitter<boolean>()
|
|
39
|
+
@Input() translationsMap: Map<string, string>
|
|
41
40
|
conversationWithFullname: string
|
|
42
41
|
openInfoConversation = true
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
|
|
45
43
|
isDirect = false
|
|
46
|
-
isTyping = false
|
|
47
44
|
borderColor = '#ffffff'
|
|
48
45
|
fontColor = '#949494'
|
|
49
|
-
membersConversation = ['SYSTEM']
|
|
50
46
|
platformName: string
|
|
51
47
|
conv_closed: boolean = false;
|
|
52
48
|
IS_ON_IOS_MOBILE_DEVICE: boolean
|
|
53
49
|
private logger: LoggerService = LoggerInstance.getInstance()
|
|
54
50
|
|
|
51
|
+
TYPE_SUPPORT_GROUP = TYPE_SUPPORT_GROUP
|
|
52
|
+
TYPE_GROUP = TYPE_GROUP
|
|
53
|
+
|
|
55
54
|
constructor(
|
|
56
55
|
public imageRepoService: ImageRepoService,
|
|
57
56
|
private route: ActivatedRoute,
|
|
@@ -73,7 +72,6 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
73
72
|
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - conversationAvatar', this.conversationAvatar,)
|
|
74
73
|
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - conv_type', this.conv_type)
|
|
75
74
|
this.listenToConversationHasBeenClosed()
|
|
76
|
-
this.initialize();
|
|
77
75
|
// this.isOniOSMobileDevice()
|
|
78
76
|
}
|
|
79
77
|
|
|
@@ -91,8 +89,8 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
91
89
|
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnChanges) - conversationAvatar', this.conversationAvatar)
|
|
92
90
|
if (this.conversationAvatar) {
|
|
93
91
|
this.conversationAvatar.imageurl = this.imageRepoService.getImagePhotoUrl(this.conversationAvatar.uid)
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
this.initialize()
|
|
93
|
+
}
|
|
96
94
|
}
|
|
97
95
|
|
|
98
96
|
// ----------------------------------------------------
|
|
@@ -102,8 +100,6 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
102
100
|
this.getPlatformName()
|
|
103
101
|
if ( this.conversationAvatar && this.conversationAvatar.channelType === TYPE_DIRECT ) {
|
|
104
102
|
this.isDirect = true
|
|
105
|
-
} else if (this.idLoggedUser) {
|
|
106
|
-
this.membersConversation.push(this.idLoggedUser)
|
|
107
103
|
}
|
|
108
104
|
}
|
|
109
105
|
|
|
@@ -133,18 +129,6 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
133
129
|
});
|
|
134
130
|
}
|
|
135
131
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
onOpenCloseInfoConversation() {
|
|
139
|
-
this.openInfoMessage = false
|
|
140
|
-
this.openInfoConversation = !this.openInfoConversation
|
|
141
|
-
this.logger.log(
|
|
142
|
-
'[CONVS-DETAIL][HEADER] - onOpenCloseInfoConversation - openInfoConversation ',
|
|
143
|
-
this.openInfoConversation,
|
|
144
|
-
)
|
|
145
|
-
this.eventOpenCloseInfoConversation.emit(this.openInfoConversation)
|
|
146
|
-
}
|
|
147
|
-
|
|
148
132
|
/** */
|
|
149
133
|
pushPage(event) { }
|
|
150
134
|
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html
CHANGED
|
@@ -40,27 +40,28 @@
|
|
|
40
40
|
|
|
41
41
|
<div class="start-buttons" style="position: absolute;display: flex; top: 2px;">
|
|
42
42
|
|
|
43
|
+
<!-- CANNED RESPONSES -->
|
|
43
44
|
<ng-container *ngIf="areVisibleCAR && supportMode">
|
|
44
45
|
<div class="canned-responses-btn-wpr" style="margin-left: -5px;"
|
|
45
46
|
tooltip="{{translationMap?.get('CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top">
|
|
46
47
|
<ion-button ion-button fill="clear" class="canned-responses-btn" (click)="openCannedResponses()"
|
|
47
|
-
[disabled]="!
|
|
48
|
+
[disabled]="!conversationWith?.startsWith(TYPE_SUPPORT_GROUP) || disableTextarea">
|
|
48
49
|
<ion-icon slot="icon-only" lazy="true" name="flash-outline" style="font-size: 24px;"></ion-icon>
|
|
49
50
|
</ion-button>
|
|
50
51
|
</div>
|
|
51
|
-
<div *ngIf="
|
|
52
|
+
<div *ngIf="conversationWith?.startsWith(TYPE_SUPPORT_GROUP) && tagsCannedCount === 0"
|
|
52
53
|
tooltip="{{translationMap?.get('NO_CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top"
|
|
53
54
|
class="no-canned-responses-btn-badge">
|
|
54
55
|
<ion-icon name="alert-sharp" style="vertical-align: middle;"></ion-icon>
|
|
55
56
|
</div>
|
|
56
|
-
<div *ngIf="
|
|
57
|
+
<div *ngIf="conversationWith?.startsWith(TYPE_SUPPORT_GROUP) && tagsCannedCount > 0"
|
|
57
58
|
tooltip="{{translationMap?.get('YES_CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top"
|
|
58
59
|
class="canned-responses-btn-badge">
|
|
59
60
|
<ion-icon name="information-sharp" style="vertical-align: middle;"></ion-icon>
|
|
60
61
|
</div>
|
|
61
62
|
</ng-container>
|
|
62
63
|
|
|
63
|
-
|
|
64
|
+
<!-- UPLOAD ATTACHMENT -->
|
|
64
65
|
<div class="upload-image-btn-wpr" tooltip="{{translationMap?.get('UPLOAD')}}" [options]="tooltipOptions"
|
|
65
66
|
placement="top">
|
|
66
67
|
<ion-button ion-button fill="clear" class="upload-image-btn" [disabled]="disableTextarea">
|
|
@@ -110,7 +111,7 @@
|
|
|
110
111
|
|
|
111
112
|
<div class="text-message" [ngClass]="{'text-message-no-cr': areVisibleCAR === false || supportMode === false}">
|
|
112
113
|
<ion-textarea id="ion-textarea" #messageTextArea #message_text_area #textArea rows="1"
|
|
113
|
-
[placeholder]="
|
|
114
|
+
[placeholder]="translationMap?.get('LABEL_ENTER_MSG_SHORT')" autosize="false" auto-grow="true" autofocus="true" [value]=""
|
|
114
115
|
[(ngModel)]="messageString" (ionChange)="ionChange($event);" [disabled]="disableTextarea"
|
|
115
116
|
(keydown.enter)="onKeydown($event, messageString)" (paste)="onPaste($event)">
|
|
116
117
|
</ion-textarea>
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
height: auto;
|
|
5
5
|
padding: 0;
|
|
6
6
|
margin: 0;
|
|
7
|
+
|
|
8
|
+
ion-icon{
|
|
9
|
+
color: var(--basic-blue);
|
|
10
|
+
}
|
|
7
11
|
.buttons-left {
|
|
8
12
|
position: absolute;
|
|
9
13
|
left: 0;
|
|
@@ -165,10 +169,6 @@
|
|
|
165
169
|
border-radius: 50%;
|
|
166
170
|
}
|
|
167
171
|
|
|
168
|
-
.send-msg-activated {
|
|
169
|
-
color: #3880ff !important;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
172
|
.send-msg-disabled {
|
|
173
173
|
cursor: default;
|
|
174
174
|
opacity: 0.8;
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { LoaderPreviewPage } from 'src/app/pages/loader-preview/loader-preview.p
|
|
|
9
9
|
// Services
|
|
10
10
|
import { UploadService } from 'src/chat21-core/providers/abstract/upload.service';
|
|
11
11
|
// utils
|
|
12
|
-
import { TYPE_MSG_TEXT } from 'src/chat21-core/utils/constants';
|
|
12
|
+
import { TYPE_MSG_TEXT, TYPE_SUPPORT_GROUP } from 'src/chat21-core/utils/constants';
|
|
13
13
|
// Models
|
|
14
14
|
import { UploadModel } from 'src/chat21-core/models/upload';
|
|
15
15
|
import { Observable } from 'rxjs';
|
|
@@ -62,16 +62,12 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
62
62
|
public messageString: string;
|
|
63
63
|
public HAS_PASTED: boolean = false;
|
|
64
64
|
public toastMsg: string;
|
|
65
|
-
public TEXAREA_PLACEHOLDER: string;
|
|
66
|
-
public LONG_TEXAREA_PLACEHOLDER: string;
|
|
67
|
-
public SHORT_TEXAREA_PLACEHOLDER: string;
|
|
68
|
-
public SHORTER_TEXAREA_PLACEHOLDER: string;
|
|
69
|
-
public currentWindowWidth: any;
|
|
70
65
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
71
66
|
public countClicks: number = 0;
|
|
72
67
|
public openCanned: boolean = false;
|
|
73
|
-
public IS_SUPPORT_GROUP_CONVERSATION: boolean;
|
|
74
68
|
public IS_ON_MOBILE_DEVICE: boolean;
|
|
69
|
+
|
|
70
|
+
TYPE_SUPPORT_GROUP = TYPE_SUPPORT_GROUP;
|
|
75
71
|
TYPE_MSG_TEXT = TYPE_MSG_TEXT;
|
|
76
72
|
msg: string
|
|
77
73
|
|
|
@@ -118,15 +114,8 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
118
114
|
if (this.areVisibleCAR === false) {
|
|
119
115
|
this.emojiPerLine = 7
|
|
120
116
|
}
|
|
121
|
-
// this.events.subscribe((cannedmessage) => {
|
|
122
|
-
// this.logger.log("[CONVS-DETAIL] [MSG-TEXT-AREA] events.subscribe cannedmessage ", cannedmessage);
|
|
123
|
-
// })
|
|
124
117
|
|
|
125
|
-
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] LONG_TEXAREA_PLACEHOLDER ", this.LONG_TEXAREA_PLACEHOLDER);
|
|
126
|
-
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] SHORT_TEXAREA_PLACEHOLDER ", this.SHORT_TEXAREA_PLACEHOLDER);
|
|
127
|
-
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] SHORTER_TEXAREA_PLACEHOLDER ", this.SHORTER_TEXAREA_PLACEHOLDER);
|
|
128
118
|
this.listenToNewCannedResponseCreated()
|
|
129
|
-
this.getWindowWidth();
|
|
130
119
|
this.isOnMobileDevice()
|
|
131
120
|
}
|
|
132
121
|
|
|
@@ -147,15 +136,8 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
147
136
|
// this.SHORT_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
|
|
148
137
|
// this.SHORTER_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORTER')
|
|
149
138
|
|
|
150
|
-
this.TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
|
|
151
|
-
|
|
152
139
|
}
|
|
153
140
|
|
|
154
|
-
if (this.conversationWith.startsWith("support-group")) {
|
|
155
|
-
this.IS_SUPPORT_GROUP_CONVERSATION = true
|
|
156
|
-
} else {
|
|
157
|
-
this.IS_SUPPORT_GROUP_CONVERSATION = false
|
|
158
|
-
}
|
|
159
141
|
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges supportMode ', this.supportMode)
|
|
160
142
|
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges disableTextarea ', this.disableTextarea)
|
|
161
143
|
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges DROP EVENT ", this.dropEvent);
|
|
@@ -206,36 +188,6 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
206
188
|
}
|
|
207
189
|
}
|
|
208
190
|
|
|
209
|
-
|
|
210
|
-
getWindowWidth(): any {
|
|
211
|
-
this.currentWindowWidth = window.innerWidth;
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
// if (this.currentWindowWidth >= 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
|
|
215
|
-
// this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
|
|
216
|
-
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] currentWindowWidth', this.currentWindowWidth, ' - DISPLAY LONG_TEXAREA_PLACEHOLDER ');
|
|
217
|
-
// } else if (this.currentWindowWidth >= 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
|
|
218
|
-
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
219
|
-
// } else if (this.currentWindowWidth < 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
|
|
220
|
-
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
221
|
-
// } else if (this.currentWindowWidth < 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
|
|
222
|
-
// this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
|
|
223
|
-
// } else if (!this.conversationWith.startsWith("support-group")) {
|
|
224
|
-
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
225
|
-
// }
|
|
226
|
-
|
|
227
|
-
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] checkPlatformIsMobile() ", checkPlatformIsMobile());
|
|
228
|
-
if (checkPlatformIsMobile() === true) {
|
|
229
|
-
|
|
230
|
-
if (this.currentWindowWidth <= 430 && this.currentWindowWidth >= 274) {
|
|
231
|
-
this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
232
|
-
|
|
233
|
-
} else if (this.currentWindowWidth <= 273) {
|
|
234
|
-
this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
191
|
// -------------------------------------------------------------------------------------------
|
|
240
192
|
// Change the placeholder of the 'send message' textarea according to the width of the window
|
|
241
193
|
// -------------------------------------------------------------------------------------------
|
|
@@ -243,37 +195,6 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
243
195
|
onResize(event) {
|
|
244
196
|
// this.getIfTexareaIsEmpty('onResize')
|
|
245
197
|
// console.log("[CONVS-DETAIL][MSG-TEXT-AREA] event.target.innerWidth; ", event.target.innerWidth);
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
// if (event.target.innerWidth >= 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
|
|
250
|
-
// this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
|
|
251
|
-
// } else if (event.target.innerWidth >= 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
|
|
252
|
-
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
253
|
-
// } else if (event.target.innerWidth < 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
|
|
254
|
-
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
255
|
-
// } else if (event.target.innerWidth < 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
|
|
256
|
-
// this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
|
|
257
|
-
// } else if (!this.conversationWith.startsWith("support-group")) {
|
|
258
|
-
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
259
|
-
// }
|
|
260
|
-
|
|
261
|
-
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] checkPlatformIsMobile() ', checkPlatformIsMobile());
|
|
262
|
-
if (checkPlatformIsMobile() === true) {
|
|
263
|
-
|
|
264
|
-
if (event.target.innerWidth <= 430 && event.target.innerWidth >= 274) {
|
|
265
|
-
this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
266
|
-
} else if (this.currentWindowWidth <= 273) {
|
|
267
|
-
this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
// if (checkPlatformIsMobile && event.target.innerWidth <= 430) {
|
|
273
|
-
// this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
|
|
274
|
-
// } else if (checkPlatformIsMobile && event.target.innerWidth > 430) {
|
|
275
|
-
// this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
|
|
276
|
-
// }
|
|
277
198
|
}
|
|
278
199
|
|
|
279
200
|
|
|
@@ -698,7 +619,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
698
619
|
|
|
699
620
|
@HostListener('document:keydown', ['$event'])
|
|
700
621
|
handleKeyboardEvent(event: KeyboardEvent) {
|
|
701
|
-
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] handleKeyboardEvent event.key ", event);
|
|
622
|
+
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] handleKeyboardEvent event.key ", event);
|
|
702
623
|
// Note: on mac keyboard "metakey" matches "cmd"
|
|
703
624
|
|
|
704
625
|
if (event.key === 'Enter' && event.altKey || event.key === 'Enter' && event.ctrlKey || event.key === 'Enter' && event.metaKey) {
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
</app-info-direct>
|
|
8
8
|
|
|
9
9
|
<app-info-group *ngIf="panelType === 'group-panel' && IS_GROUP_PANEL === true"
|
|
10
|
-
[groupDetail]="groupDetail"
|
|
10
|
+
[groupDetail]="groupDetail"
|
|
11
|
+
[isMobile]="isMobile">
|
|
11
12
|
</app-info-group>
|
|
12
13
|
|
|
13
14
|
<app-info-support-group *ngIf="panelType === 'support-group-panel'"
|
|
@@ -28,11 +28,12 @@ import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance'
|
|
|
28
28
|
|
|
29
29
|
export class InfoContentComponent implements OnInit {
|
|
30
30
|
@Input() openInfoConversation: boolean;
|
|
31
|
-
@Input() translationMap: Map<string, string>;
|
|
32
31
|
// @Input() member: UserModel;
|
|
33
32
|
@Input() loggedUser: UserModel
|
|
34
33
|
@Input() tenant: string
|
|
35
|
-
@Input() groupDetail: any
|
|
34
|
+
@Input() groupDetail: any;
|
|
35
|
+
@Input() isMobile: boolean;
|
|
36
|
+
@Input() translationMap: Map<string, string>;
|
|
36
37
|
|
|
37
38
|
|
|
38
39
|
public member: UserModel;
|
|
@@ -8,15 +8,7 @@
|
|
|
8
8
|
<div class="image-profile">
|
|
9
9
|
<app-avatar-profile [itemAvatar]='member'></app-avatar-profile>
|
|
10
10
|
</div>
|
|
11
|
-
|
|
12
|
-
<div class="user-presence">
|
|
13
|
-
<app-user-presence
|
|
14
|
-
[idUser]='member.uid'
|
|
15
|
-
[translationMap]='translationMap'
|
|
16
|
-
[borderColor]='borderColor'
|
|
17
|
-
[fontColor]='fontColor'>
|
|
18
|
-
</app-user-presence>
|
|
19
|
-
</div>
|
|
11
|
+
|
|
20
12
|
<!-- -> {{member |json}} -->
|
|
21
13
|
<div class="info-profile">
|
|
22
14
|
<div class="name">
|
|
@@ -15,8 +15,6 @@ export class InfoDirectComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
15
15
|
@Input() translationMap: Map<string, string>;
|
|
16
16
|
@Input() conversationWith: string;
|
|
17
17
|
|
|
18
|
-
borderColor = '#ffffff';
|
|
19
|
-
fontColor = '#949494';
|
|
20
18
|
advancedAttributes: Array<any> = [];
|
|
21
19
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
22
20
|
|