@chat21/chat21-ionic 3.0.80-rc.1 → 3.0.80
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 +4 -61
- package/README.md +2 -2
- package/package.json +2 -2
- package/src/app/app.component.html +1 -7
- package/src/app/app.component.scss +2 -18
- package/src/app/app.component.ts +15 -73
- package/src/app/app.module.ts +1 -3
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +1 -8
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +23 -75
- 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 -7
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +10 -6
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.spec.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +25 -16
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +1 -5
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +15 -22
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +5 -25
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +1 -2
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +15 -14
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +5 -24
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +1 -6
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +13 -12
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +5 -26
- package/src/app/chatlib/conversation-detail/message/html/html.component.ts +1 -0
- 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 +5 -5
- 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 +83 -4
- 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 +35 -42
- package/src/app/components/project-item/project-item.component.ts +4 -16
- 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 +7 -2
- 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 +84 -190
- 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 +22 -25
- package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
- package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
- package/src/app/pages/loader-preview/loader-preview.page.scss +0 -4
- package/src/app/pages/loader-preview/loader-preview.page.ts +2 -1
- package/src/app/pages/profile-info/profile-info.page.html +4 -2
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +0 -42
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +0 -1
- package/src/app/services/canned-responses/canned-responses.service.ts +0 -26
- package/src/app/services/tiledesk/tiledesk.service.ts +25 -1
- package/src/app/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 +10 -38
- package/src/global.scss +57 -48
- package/src/index.html +2 -2
- package/src/variables.scss +10 -30
- package/deploy_amazon_beta.sh +0 -29
- package/deploy_amazon_prod.sh +0 -30
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +0 -116
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +0 -12
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +0 -14
- package/src/app/components/navbar/navbar.component.html +0 -103
- package/src/app/components/navbar/navbar.component.scss +0 -249
- package/src/app/components/navbar/navbar.component.ts +0 -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
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
ion-header {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
border-color: var(--light-gray);
|
|
8
|
-
border-bottom-width: thin;
|
|
9
|
-
}
|
|
10
|
-
|
|
3
|
+
--ion-background-color: #fff;
|
|
4
|
+
border-bottom-style: solid;
|
|
5
|
+
border-color: var(--light-gray);
|
|
6
|
+
border-bottom-width: thin;
|
|
11
7
|
ion-toolbar{
|
|
12
|
-
height:
|
|
13
|
-
&:not(.mobile){
|
|
14
|
-
--background: var(--list-bkg-color);
|
|
15
|
-
}
|
|
8
|
+
height: 60px;
|
|
16
9
|
.flex-container{
|
|
17
10
|
display: flex;
|
|
18
11
|
}
|
|
@@ -34,7 +27,7 @@ ion-header {
|
|
|
34
27
|
text-align: left;
|
|
35
28
|
padding-inline: unset;
|
|
36
29
|
margin: 0px 10px;
|
|
37
|
-
|
|
30
|
+
height: 40px;
|
|
38
31
|
width: 100%;
|
|
39
32
|
}
|
|
40
33
|
ion-avatar {
|
|
@@ -76,27 +69,17 @@ ion-header {
|
|
|
76
69
|
}
|
|
77
70
|
}
|
|
78
71
|
.tile-info-with {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
-
}
|
|
72
|
+
// position: relative;
|
|
73
|
+
// display: inline-block;
|
|
74
|
+
// vertical-align: middle;
|
|
75
|
+
// margin: -6px 0px 0 6px;
|
|
76
|
+
position: absolute;
|
|
77
|
+
margin: auto 0;
|
|
78
|
+
height: 100%;
|
|
79
|
+
top: 0;
|
|
80
|
+
left: 50px;
|
|
81
|
+
vertical-align: middle;
|
|
82
|
+
// cursor: pointer;
|
|
100
83
|
}
|
|
101
84
|
.tile-point {
|
|
102
85
|
width: 10px;
|
|
@@ -107,7 +90,27 @@ ion-header {
|
|
|
107
90
|
margin-right: 5px;
|
|
108
91
|
vertical-align: middle;
|
|
109
92
|
}
|
|
110
|
-
|
|
93
|
+
.tile-username {
|
|
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
|
+
}
|
|
111
114
|
|
|
112
115
|
.tile-last-activity {
|
|
113
116
|
color: var(--light-gray);
|
|
@@ -122,9 +125,6 @@ ion-header {
|
|
|
122
125
|
}
|
|
123
126
|
|
|
124
127
|
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,86 +133,42 @@ 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
|
-
|
|
143
136
|
.avatar-container {
|
|
144
|
-
|
|
137
|
+
background-color: #fff;
|
|
145
138
|
color: #fff;
|
|
146
139
|
text-align: center;
|
|
147
|
-
width:
|
|
148
|
-
height:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
// left: 20px;
|
|
140
|
+
width: 40px;
|
|
141
|
+
height: 40px;
|
|
142
|
+
position: absolute;
|
|
143
|
+
top: 0;
|
|
152
144
|
border-radius: 50%;
|
|
153
145
|
padding: 0px;
|
|
154
|
-
|
|
146
|
+
transform: translateX(-50%);
|
|
147
|
+
left: 20px;
|
|
155
148
|
|
|
156
149
|
border-color: #fff;
|
|
157
150
|
border-style: solid;
|
|
158
151
|
border-width: 0px;
|
|
159
152
|
line-height: 40px;
|
|
160
153
|
display: inline-block;
|
|
161
|
-
cursor: pointer;
|
|
162
154
|
}
|
|
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
|
-
|
|
177
155
|
.user-presence {
|
|
178
156
|
position: absolute;
|
|
179
|
-
bottom:
|
|
157
|
+
bottom: 0;
|
|
180
158
|
height: 12px;
|
|
181
159
|
left: 30px;
|
|
182
160
|
width: 100px;
|
|
183
161
|
}
|
|
184
|
-
.
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
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
|
-
}
|
|
162
|
+
.user-typing {
|
|
163
|
+
position: absolute;
|
|
164
|
+
left: 50px;
|
|
165
|
+
bottom: -3px;
|
|
166
|
+
padding: 0;
|
|
167
|
+
margin: 0;
|
|
168
|
+
height: 16px;
|
|
169
|
+
width: 140px;
|
|
212
170
|
}
|
|
213
171
|
|
|
214
|
-
|
|
215
|
-
|
|
216
172
|
.tile-info-with-ios {
|
|
217
173
|
left: 82px !important;
|
|
218
174
|
top: 10px!important;
|
|
@@ -222,4 +178,11 @@ ion-header {
|
|
|
222
178
|
left: 63px;
|
|
223
179
|
}
|
|
224
180
|
|
|
181
|
+
.avatar-container-ios {
|
|
182
|
+
left: 55px;
|
|
183
|
+
top: 10px;
|
|
184
|
+
}
|
|
225
185
|
|
|
186
|
+
.resolve-conv-margin-right {
|
|
187
|
+
margin-right: 52px;
|
|
188
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TYPE_GROUP } from './../../../../chat21-core/utils/constants';
|
|
2
1
|
import {
|
|
3
2
|
Component,
|
|
4
3
|
OnInit,
|
|
@@ -23,7 +22,7 @@ import { ModalController } from '@ionic/angular'
|
|
|
23
22
|
import { EventsService } from 'src/app/services/events-service'
|
|
24
23
|
import { CreateTicketPage } from 'src/app/pages/create-ticket/create-ticket.page'
|
|
25
24
|
import { TiledeskService } from 'src/app/services/tiledesk/tiledesk.service'
|
|
26
|
-
import { TYPE_DIRECT
|
|
25
|
+
import { TYPE_DIRECT } from 'src/chat21-core/utils/constants'
|
|
27
26
|
|
|
28
27
|
@Component({
|
|
29
28
|
selector: 'app-header-conversation-detail',
|
|
@@ -35,22 +34,24 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
35
34
|
@Input() idLoggedUser: string
|
|
36
35
|
@Input() conversationUid: string
|
|
37
36
|
@Input() conv_type: string
|
|
37
|
+
@Input() isOpenInfoConversation: boolean = true
|
|
38
38
|
@Input() isMobile: boolean
|
|
39
|
-
@Input()
|
|
39
|
+
@Input() translationMap: Map<string, string>
|
|
40
|
+
@Output() eventOpenCloseInfoConversation = new EventEmitter<boolean>()
|
|
40
41
|
conversationWithFullname: string
|
|
41
42
|
openInfoConversation = true
|
|
42
|
-
|
|
43
|
+
openInfoMessage = true
|
|
44
|
+
|
|
43
45
|
isDirect = false
|
|
46
|
+
isTyping = false
|
|
44
47
|
borderColor = '#ffffff'
|
|
45
48
|
fontColor = '#949494'
|
|
49
|
+
membersConversation = ['SYSTEM']
|
|
46
50
|
platformName: string
|
|
47
51
|
conv_closed: boolean = false;
|
|
48
52
|
IS_ON_IOS_MOBILE_DEVICE: boolean
|
|
49
53
|
private logger: LoggerService = LoggerInstance.getInstance()
|
|
50
54
|
|
|
51
|
-
TYPE_SUPPORT_GROUP = TYPE_SUPPORT_GROUP
|
|
52
|
-
TYPE_GROUP = TYPE_GROUP
|
|
53
|
-
|
|
54
55
|
constructor(
|
|
55
56
|
public imageRepoService: ImageRepoService,
|
|
56
57
|
private route: ActivatedRoute,
|
|
@@ -72,6 +73,7 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
72
73
|
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - conversationAvatar', this.conversationAvatar,)
|
|
73
74
|
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - conv_type', this.conv_type)
|
|
74
75
|
this.listenToConversationHasBeenClosed()
|
|
76
|
+
this.initialize();
|
|
75
77
|
// this.isOniOSMobileDevice()
|
|
76
78
|
}
|
|
77
79
|
|
|
@@ -89,8 +91,8 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
89
91
|
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnChanges) - conversationAvatar', this.conversationAvatar)
|
|
90
92
|
if (this.conversationAvatar) {
|
|
91
93
|
this.conversationAvatar.imageurl = this.imageRepoService.getImagePhotoUrl(this.conversationAvatar.uid)
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
}
|
|
95
|
+
this.openInfoConversation = this.isOpenInfoConversation
|
|
94
96
|
}
|
|
95
97
|
|
|
96
98
|
// ----------------------------------------------------
|
|
@@ -100,6 +102,8 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
100
102
|
this.getPlatformName()
|
|
101
103
|
if ( this.conversationAvatar && this.conversationAvatar.channelType === TYPE_DIRECT ) {
|
|
102
104
|
this.isDirect = true
|
|
105
|
+
} else if (this.idLoggedUser) {
|
|
106
|
+
this.membersConversation.push(this.idLoggedUser)
|
|
103
107
|
}
|
|
104
108
|
}
|
|
105
109
|
|
|
@@ -129,6 +133,18 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
129
133
|
});
|
|
130
134
|
}
|
|
131
135
|
|
|
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
|
+
|
|
132
148
|
/** */
|
|
133
149
|
pushPage(event) { }
|
|
134
150
|
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html
CHANGED
|
@@ -40,28 +40,27 @@
|
|
|
40
40
|
|
|
41
41
|
<div class="start-buttons" style="position: absolute;display: flex; top: 2px;">
|
|
42
42
|
|
|
43
|
-
<!-- CANNED RESPONSES -->
|
|
44
43
|
<ng-container *ngIf="areVisibleCAR && supportMode">
|
|
45
44
|
<div class="canned-responses-btn-wpr" style="margin-left: -5px;"
|
|
46
45
|
tooltip="{{translationMap?.get('CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top">
|
|
47
46
|
<ion-button ion-button fill="clear" class="canned-responses-btn" (click)="openCannedResponses()"
|
|
48
|
-
[disabled]="!
|
|
47
|
+
[disabled]="!IS_SUPPORT_GROUP_CONVERSATION || disableTextarea">
|
|
49
48
|
<ion-icon slot="icon-only" lazy="true" name="flash-outline" style="font-size: 24px;"></ion-icon>
|
|
50
49
|
</ion-button>
|
|
51
50
|
</div>
|
|
52
|
-
<div *ngIf="
|
|
51
|
+
<div *ngIf="IS_SUPPORT_GROUP_CONVERSATION && tagsCannedCount === 0"
|
|
53
52
|
tooltip="{{translationMap?.get('NO_CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top"
|
|
54
53
|
class="no-canned-responses-btn-badge">
|
|
55
54
|
<ion-icon name="alert-sharp" style="vertical-align: middle;"></ion-icon>
|
|
56
55
|
</div>
|
|
57
|
-
<div *ngIf="
|
|
56
|
+
<div *ngIf="IS_SUPPORT_GROUP_CONVERSATION && tagsCannedCount > 0"
|
|
58
57
|
tooltip="{{translationMap?.get('YES_CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top"
|
|
59
58
|
class="canned-responses-btn-badge">
|
|
60
59
|
<ion-icon name="information-sharp" style="vertical-align: middle;"></ion-icon>
|
|
61
60
|
</div>
|
|
62
61
|
</ng-container>
|
|
63
62
|
|
|
64
|
-
|
|
63
|
+
|
|
65
64
|
<div class="upload-image-btn-wpr" tooltip="{{translationMap?.get('UPLOAD')}}" [options]="tooltipOptions"
|
|
66
65
|
placement="top">
|
|
67
66
|
<ion-button ion-button fill="clear" class="upload-image-btn" [disabled]="disableTextarea">
|
|
@@ -111,7 +110,7 @@
|
|
|
111
110
|
|
|
112
111
|
<div class="text-message" [ngClass]="{'text-message-no-cr': areVisibleCAR === false || supportMode === false}">
|
|
113
112
|
<ion-textarea id="ion-textarea" #messageTextArea #message_text_area #textArea rows="1"
|
|
114
|
-
[placeholder]="
|
|
113
|
+
[placeholder]="TEXAREA_PLACEHOLDER" autosize="false" auto-grow="true" autofocus="true" [value]=""
|
|
115
114
|
[(ngModel)]="messageString" (ionChange)="ionChange($event);" [disabled]="disableTextarea"
|
|
116
115
|
(keydown.enter)="onKeydown($event, messageString)" (paste)="onPaste($event)">
|
|
117
116
|
</ion-textarea>
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss
CHANGED
|
@@ -4,10 +4,6 @@
|
|
|
4
4
|
height: auto;
|
|
5
5
|
padding: 0;
|
|
6
6
|
margin: 0;
|
|
7
|
-
|
|
8
|
-
ion-icon{
|
|
9
|
-
color: var(--basic-blue);
|
|
10
|
-
}
|
|
11
7
|
.buttons-left {
|
|
12
8
|
position: absolute;
|
|
13
9
|
left: 0;
|
|
@@ -169,6 +165,10 @@
|
|
|
169
165
|
border-radius: 50%;
|
|
170
166
|
}
|
|
171
167
|
|
|
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
|
|
12
|
+
import { TYPE_MSG_TEXT } 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,12 +62,16 @@ 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;
|
|
65
70
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
66
71
|
public countClicks: number = 0;
|
|
67
72
|
public openCanned: boolean = false;
|
|
73
|
+
public IS_SUPPORT_GROUP_CONVERSATION: boolean;
|
|
68
74
|
public IS_ON_MOBILE_DEVICE: boolean;
|
|
69
|
-
|
|
70
|
-
TYPE_SUPPORT_GROUP = TYPE_SUPPORT_GROUP;
|
|
71
75
|
TYPE_MSG_TEXT = TYPE_MSG_TEXT;
|
|
72
76
|
msg: string
|
|
73
77
|
|
|
@@ -114,8 +118,15 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
114
118
|
if (this.areVisibleCAR === false) {
|
|
115
119
|
this.emojiPerLine = 7
|
|
116
120
|
}
|
|
121
|
+
// this.events.subscribe((cannedmessage) => {
|
|
122
|
+
// this.logger.log("[CONVS-DETAIL] [MSG-TEXT-AREA] events.subscribe cannedmessage ", cannedmessage);
|
|
123
|
+
// })
|
|
117
124
|
|
|
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);
|
|
118
128
|
this.listenToNewCannedResponseCreated()
|
|
129
|
+
this.getWindowWidth();
|
|
119
130
|
this.isOnMobileDevice()
|
|
120
131
|
}
|
|
121
132
|
|
|
@@ -136,8 +147,15 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
136
147
|
// this.SHORT_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
|
|
137
148
|
// this.SHORTER_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORTER')
|
|
138
149
|
|
|
150
|
+
this.TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
|
|
151
|
+
|
|
139
152
|
}
|
|
140
153
|
|
|
154
|
+
if (this.conversationWith.startsWith("support-group")) {
|
|
155
|
+
this.IS_SUPPORT_GROUP_CONVERSATION = true
|
|
156
|
+
} else {
|
|
157
|
+
this.IS_SUPPORT_GROUP_CONVERSATION = false
|
|
158
|
+
}
|
|
141
159
|
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges supportMode ', this.supportMode)
|
|
142
160
|
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges disableTextarea ', this.disableTextarea)
|
|
143
161
|
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges DROP EVENT ", this.dropEvent);
|
|
@@ -188,6 +206,36 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
188
206
|
}
|
|
189
207
|
}
|
|
190
208
|
|
|
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
|
+
|
|
191
239
|
// -------------------------------------------------------------------------------------------
|
|
192
240
|
// Change the placeholder of the 'send message' textarea according to the width of the window
|
|
193
241
|
// -------------------------------------------------------------------------------------------
|
|
@@ -195,6 +243,37 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
195
243
|
onResize(event) {
|
|
196
244
|
// this.getIfTexareaIsEmpty('onResize')
|
|
197
245
|
// 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
|
+
// }
|
|
198
277
|
}
|
|
199
278
|
|
|
200
279
|
|
|
@@ -619,7 +698,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
619
698
|
|
|
620
699
|
@HostListener('document:keydown', ['$event'])
|
|
621
700
|
handleKeyboardEvent(event: KeyboardEvent) {
|
|
622
|
-
|
|
701
|
+
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] handleKeyboardEvent event.key ", event);
|
|
623
702
|
// Note: on mac keyboard "metakey" matches "cmd"
|
|
624
703
|
|
|
625
704
|
if (event.key === 'Enter' && event.altKey || event.key === 'Enter' && event.ctrlKey || event.key === 'Enter' && event.metaKey) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<ion-header no-border class="ion-no-border">
|
|
2
|
+
<ion-toolbar>
|
|
3
|
+
|
|
4
|
+
<ion-buttons slot="start">
|
|
5
|
+
<ion-button ion-button (click)="onBackButtonHandler()">
|
|
6
|
+
<ion-icon slot="icon-only" name="arrow-back-outline"></ion-icon>
|
|
7
|
+
</ion-button>
|
|
8
|
+
</ion-buttons>
|
|
9
|
+
|
|
10
|
+
<ion-title> {{headerTitle}}</ion-title>
|
|
11
|
+
|
|
12
|
+
</ion-toolbar>
|
|
13
|
+
</ion-header>
|
|
File without changes
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
2
|
import { IonicModule } from '@ionic/angular';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { OptionHeaderComponent } from './option-header.component';
|
|
5
5
|
|
|
6
6
|
describe('OptionHeaderComponent', () => {
|
|
7
|
-
let component:
|
|
8
|
-
let fixture: ComponentFixture<
|
|
7
|
+
let component: OptionHeaderComponent;
|
|
8
|
+
let fixture: ComponentFixture<OptionHeaderComponent>;
|
|
9
9
|
|
|
10
10
|
beforeEach(async(() => {
|
|
11
11
|
TestBed.configureTestingModule({
|
|
12
|
-
declarations: [
|
|
12
|
+
declarations: [ OptionHeaderComponent ],
|
|
13
13
|
imports: [IonicModule.forRoot()]
|
|
14
14
|
}).compileComponents();
|
|
15
15
|
|
|
16
|
-
fixture = TestBed.createComponent(
|
|
16
|
+
fixture = TestBed.createComponent(OptionHeaderComponent);
|
|
17
17
|
component = fixture.componentInstance;
|
|
18
18
|
fixture.detectChanges();
|
|
19
19
|
}));
|
|
@@ -2,14 +2,13 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
@Component({
|
|
5
|
-
selector: '
|
|
6
|
-
templateUrl: './header
|
|
7
|
-
styleUrls: ['./header
|
|
5
|
+
selector: 'app-option-header',
|
|
6
|
+
templateUrl: './option-header.component.html',
|
|
7
|
+
styleUrls: ['./option-header.component.scss'],
|
|
8
8
|
})
|
|
9
|
-
export class
|
|
9
|
+
export class OptionHeaderComponent implements OnInit {
|
|
10
10
|
|
|
11
11
|
@Input() headerTitle: string
|
|
12
|
-
@Input() isMobile: boolean;
|
|
13
12
|
@Output() onBackButton = new EventEmitter<boolean>();
|
|
14
13
|
static UserPresenceComponent: any[] | any;
|
|
15
14
|
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
</app-info-direct>
|
|
8
8
|
|
|
9
9
|
<app-info-group *ngIf="panelType === 'group-panel' && IS_GROUP_PANEL === true"
|
|
10
|
-
[groupDetail]="groupDetail"
|
|
11
|
-
[isMobile]="isMobile">
|
|
10
|
+
[groupDetail]="groupDetail">
|
|
12
11
|
</app-info-group>
|
|
13
12
|
|
|
14
13
|
<app-info-support-group *ngIf="panelType === 'support-group-panel'"
|
|
@@ -28,12 +28,11 @@ 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>;
|
|
31
32
|
// @Input() member: UserModel;
|
|
32
33
|
@Input() loggedUser: UserModel
|
|
33
34
|
@Input() tenant: string
|
|
34
|
-
@Input() groupDetail: any
|
|
35
|
-
@Input() isMobile: boolean;
|
|
36
|
-
@Input() translationMap: Map<string, string>;
|
|
35
|
+
@Input() groupDetail: any
|
|
37
36
|
|
|
38
37
|
|
|
39
38
|
public member: UserModel;
|
|
@@ -8,7 +8,15 @@
|
|
|
8
8
|
<div class="image-profile">
|
|
9
9
|
<app-avatar-profile [itemAvatar]='member'></app-avatar-profile>
|
|
10
10
|
</div>
|
|
11
|
-
|
|
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>
|
|
12
20
|
<!-- -> {{member |json}} -->
|
|
13
21
|
<div class="info-profile">
|
|
14
22
|
<div class="name">
|
|
@@ -15,6 +15,8 @@ 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';
|
|
18
20
|
advancedAttributes: Array<any> = [];
|
|
19
21
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
20
22
|
|