@chat21/chat21-ionic 3.0.59-rc1 → 3.0.59-rc10
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 +46 -0
- package/README.md +4 -0
- package/config.xml +11 -2
- package/env.sample +2 -0
- package/package.json +1 -1
- package/resources/Android/splash/drawable-land-hdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-ldpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-mdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-xhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-xxhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-xxxhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-hdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-ldpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-mdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-xhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-xxhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-xxxhdpi-screen.png +0 -0
- package/resources/Android/splash.png +0 -0
- package/src/app/app-routing.module.ts +21 -17
- package/src/app/app.component.html +6 -3
- package/src/app/app.component.ts +242 -51
- package/src/app/app.module.ts +16 -8
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +4 -4
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +8 -2
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +6 -1
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +1 -1
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +7 -6
- package/src/app/chatlib/conversation-detail/message/image/image.component.ts +20 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +39 -9
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +8 -144
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -17
- package/src/app/components/authentication/login/login.component.html +2 -2
- package/src/app/components/authentication/login/login.component.ts +2 -1
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +1 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +3 -2
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +3 -3
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +46 -5
- package/src/app/components/ddp-header/ddp-header.component.html +1 -1
- package/src/app/components/ddp-header/ddp-header.component.ts +4 -2
- package/src/app/components/image-viewer/image-viewer.component.html +23 -0
- package/src/app/components/image-viewer/image-viewer.component.scss +107 -0
- package/src/app/components/image-viewer/image-viewer.component.spec.ts +24 -0
- package/src/app/components/image-viewer/image-viewer.component.ts +38 -0
- package/src/app/components/project-item/project-item.component.html +147 -0
- package/src/app/components/project-item/project-item.component.scss +669 -0
- package/src/app/components/project-item/project-item.component.spec.ts +24 -0
- package/src/app/components/project-item/project-item.component.ts +316 -0
- package/src/app/components/utils/avatar-profile/avatar-profile.component.html +9 -3
- package/src/app/components/utils/avatar-profile/avatar-profile.component.ts +6 -4
- package/src/app/pages/authentication/login/login.page.ts +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.html +5 -3
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +122 -30
- package/src/app/pages/conversations-list/conversations-list.page.html +40 -24
- package/src/app/pages/conversations-list/conversations-list.page.scss +146 -1
- package/src/app/pages/conversations-list/conversations-list.page.ts +87 -6
- package/src/app/pages/unassigned-conversations/unassigned-conversations-routing.module.ts +17 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.module.ts +22 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +22 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +79 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.spec.ts +24 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +108 -0
- package/src/app/services/nav-proxy.service.ts +1 -1
- package/src/app/services/tiledesk/tiledesk.service.ts +22 -1
- package/src/app/services/websocket/websocket-js.ts +559 -0
- package/src/app/services/websocket/websocket.service.spec.ts +12 -0
- package/src/app/services/websocket/websocket.service.ts +274 -0
- package/src/app/shared/shared.module.ts +7 -1
- package/src/assets/i18n/en.json +9 -1
- package/src/assets/i18n/it.json +9 -1
- package/src/assets/js/chat21client.js +141 -67
- package/src/assets/transparent.png +0 -0
- package/src/chat-config-pre-test.json +3 -1
- package/src/chat-config-template.json +3 -1
- package/src/chat-config.json +3 -1
- package/src/chat21-core/providers/chat-manager.ts +3 -3
- package/src/chat21-core/providers/firebase/firebase-archivedconversations-handler.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-auth-service.ts +3 -3
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-notifications.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-presence.service.ts +2 -2
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-upload.service.ts +1 -1
- package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +27 -27
- package/src/chat21-core/providers/mqtt/mqtt-conversations-handler.ts +13 -5
- package/src/chat21-core/providers/mqtt/mqtt-notifications.ts +101 -11
- package/src/chat21-core/providers/tiledesk/tiledesk-auth.service.ts +1 -1
- package/src/chat21-core/utils/utils.ts +1 -1
|
@@ -14,6 +14,8 @@ export class ImageComponent implements OnInit {
|
|
|
14
14
|
|
|
15
15
|
loading: boolean = true
|
|
16
16
|
tooltipMessage: string;
|
|
17
|
+
modal: any
|
|
18
|
+
span: any
|
|
17
19
|
|
|
18
20
|
tooltipOptions = {
|
|
19
21
|
'show-delay': 0,
|
|
@@ -45,7 +47,7 @@ export class ImageComponent implements OnInit {
|
|
|
45
47
|
this.onImageRendered.emit(true)
|
|
46
48
|
}
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
_downloadImage(url: string, fileName: string) {
|
|
49
51
|
// console.log('Image COMP - IMAGE URL ', url)
|
|
50
52
|
// console.log('Image COMP - IMAGE FILENAME ', fileName)
|
|
51
53
|
const a: any = document.createElement('a');
|
|
@@ -56,4 +58,21 @@ export class ImageComponent implements OnInit {
|
|
|
56
58
|
a.click();
|
|
57
59
|
a.remove();
|
|
58
60
|
}
|
|
61
|
+
|
|
62
|
+
openImageViewerModal(url: string, fileName: string) {
|
|
63
|
+
this.modal = document.getElementById("image-viewer-modal");
|
|
64
|
+
// console.log('has clicked open image-viewer modal ', this.modal)
|
|
65
|
+
this.modal.style.display = "block";
|
|
66
|
+
var modalImg = <HTMLImageElement>document.getElementById("image-viewer-img");
|
|
67
|
+
var captionText = document.getElementById("caption");
|
|
68
|
+
modalImg.src = url
|
|
69
|
+
captionText.innerHTML = fileName;
|
|
70
|
+
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
59
76
|
}
|
|
77
|
+
|
|
78
|
+
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
<!-- -------------------------------------------------------------------------- -->
|
|
26
26
|
<!-- New <ion-spinner class="spinner-middle" style="margin-left: 19px;"></ion-spinner> -->
|
|
27
27
|
<!-- -------------------------------------------------------------------------- -->
|
|
28
|
-
<ion-item *ngIf="isOnline === false" button="true" lines="none" class="ion-no-padding waiting-for-connection">
|
|
28
|
+
<!-- <ion-item *ngIf="isOnline === false" button="true" lines="none" class="ion-no-padding waiting-for-connection">
|
|
29
|
+
<div tabindex="0"></div>
|
|
29
30
|
<ion-avatar item-start>
|
|
30
31
|
<div class="sk-fading-circle">
|
|
31
32
|
<div class="sk-circle1 sk-circle"></div>
|
|
@@ -43,10 +44,39 @@
|
|
|
43
44
|
</div>
|
|
44
45
|
</ion-avatar>
|
|
45
46
|
<ion-label part="message-text" class="waiting-for-network-msg"> Waiting for network</ion-label>
|
|
46
|
-
</ion-item>
|
|
47
|
+
</ion-item> -->
|
|
48
|
+
|
|
49
|
+
<!-- <ion-item>
|
|
50
|
+
<div tabindex="0"></div>
|
|
51
|
+
<iframe loading="lazy" width="100%" height="70px" style="border: unset;" [src]="PROJECT_FOR_PANEL"></iframe>
|
|
52
|
+
</ion-item> -->
|
|
53
|
+
<!-- <ion-item button="true" (click)="openUnsevedConversationIframe()">
|
|
54
|
+
<app-project-item
|
|
55
|
+
(projectIdEvent)="getLastProjectId($event)"></app-project-item>
|
|
56
|
+
</ion-item> -->
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
<!-- <ion-item-sliding disabled>
|
|
60
|
+
<ion-item>
|
|
61
|
+
<ion-label>
|
|
62
|
+
Sliding Item, Icons Start
|
|
63
|
+
</ion-label>
|
|
64
|
+
</ion-item>
|
|
65
|
+
<ion-item-options>
|
|
66
|
+
<ion-item-option color="primary">
|
|
67
|
+
<ion-icon slot="start" ios="ellipsis-horizontal" md="ellipsis-vertical"></ion-icon>
|
|
68
|
+
More
|
|
69
|
+
</ion-item-option>
|
|
70
|
+
<ion-item-option color="secondary">
|
|
71
|
+
<ion-icon slot="start" name="archive"></ion-icon>
|
|
72
|
+
Archive
|
|
73
|
+
</ion-item-option>
|
|
74
|
+
</ion-item-options>
|
|
75
|
+
</ion-item-sliding> -->
|
|
76
|
+
|
|
47
77
|
|
|
48
78
|
<ion-item button="true" lines="none" class="ion-no-padding" [class.ion-selected]="conversation.uid === uidConvSelected"
|
|
49
|
-
*ngFor="let conversation of listConversations" (click)="openConversationByID(conversation)">
|
|
79
|
+
*ngFor="let conversation of listConversations" (click)="openConversationByID(conversation)" detail=false>
|
|
50
80
|
<div tabindex="0"></div>
|
|
51
81
|
|
|
52
82
|
<!-- <div [class.selected]="conversation.uid === uidConvSelected"></div> -->
|
|
@@ -88,7 +118,8 @@
|
|
|
88
118
|
<ion-note *ngIf="!conversation.archived" class="conversation_time">{{conversation.timestamp | amTimeAgo}}</ion-note>
|
|
89
119
|
|
|
90
120
|
<ion-buttons slot="end">
|
|
91
|
-
<ion-button *ngIf="!conversation.archived"
|
|
121
|
+
<ion-button *ngIf="!conversation.archived"
|
|
122
|
+
[ngClass]="{'hide': !isApp, 'button-on-desktop': !isApp, 'button-on-mobile': isApp }"
|
|
92
123
|
id="{{ 'close_conversation_button' + conversation.uid }}" class="close-conversation-button" ion-button clear
|
|
93
124
|
item-end (click)="closeConversation(conversation);$event.stopPropagation();" padding>
|
|
94
125
|
<ion-icon slot="icon-only" style="display:block;" id="{{ 'close_button_icon' + conversation.uid }}"
|
|
@@ -103,21 +134,20 @@
|
|
|
103
134
|
|
|
104
135
|
<div item-end *ngIf="conversation?.archived" class="achived-icon-wpr">
|
|
105
136
|
<span *ngIf="(conversation.timestamp | amDateFormat:'YYYY') === currentYear" class="time-in-archived">
|
|
106
|
-
{{browserLang === '
|
|
107
|
-
amDateFormat:'MMM DD')}}
|
|
137
|
+
{{browserLang === 'en' ? (conversation.timestamp | amDateFormat:'MMM DD') : (conversation.timestamp| amDateFormat:'DD MMM')}}
|
|
108
138
|
|
|
109
139
|
<!-- {{conversation.timestamp | amDateFormat:'DD MMM'}} -->
|
|
110
140
|
</span>
|
|
111
141
|
<span *ngIf="(conversation.timestamp | amDateFormat:'YYYY') !== currentYear" class="time-in-archived">
|
|
112
|
-
{{browserLang === '
|
|
113
|
-
amDateFormat:'MMM DD YYYY')}}
|
|
142
|
+
{{browserLang === 'en' ? (conversation.timestamp | amDateFormat:'MMM DD YYYY') : (conversation.timestamp| amDateFormat:'DD MMM YYYY') }}
|
|
114
143
|
<!-- {{conversation.timestamp | amDateFormat:'DD MMM YYYY'}} -->
|
|
115
144
|
</span>
|
|
116
145
|
<i class="material-icons" item-end style="font-size: 15px;font-weight: 400;color: #666666;"> history </i>
|
|
117
146
|
</div>
|
|
118
147
|
|
|
119
148
|
<!-- && !conversation?.archived -->
|
|
120
|
-
<div item-end class="notification_point"
|
|
149
|
+
<div item-end class="notification_point"
|
|
150
|
+
[ngClass]="{'notification_point-on-desktop': !isApp, 'notification_point-on-mobile': isApp }"
|
|
121
151
|
*ngIf="conversation.is_new">
|
|
122
152
|
</div>
|
|
123
153
|
|
|
@@ -142,6 +142,10 @@ ion-item {
|
|
|
142
142
|
.notification_point-on-desktop {
|
|
143
143
|
bottom: 29px !important;
|
|
144
144
|
}
|
|
145
|
+
.notification_point-on-mobile {
|
|
146
|
+
bottom: 29px !important;
|
|
147
|
+
right: 8px;
|
|
148
|
+
}
|
|
145
149
|
}
|
|
146
150
|
|
|
147
151
|
// ion-item {
|
|
@@ -171,6 +175,10 @@ ion-item:hover {
|
|
|
171
175
|
}
|
|
172
176
|
}
|
|
173
177
|
|
|
178
|
+
.button-on-mobile {
|
|
179
|
+
margin-right: 31px !important;
|
|
180
|
+
}
|
|
181
|
+
|
|
174
182
|
.truncate-on-desktop {
|
|
175
183
|
width: 88% !important
|
|
176
184
|
}
|
|
@@ -212,147 +220,3 @@ ion-item:hover {
|
|
|
212
220
|
}
|
|
213
221
|
|
|
214
222
|
|
|
215
|
-
.waiting-for-connection {
|
|
216
|
-
--background: #fdd764;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
// -------------------------------
|
|
220
|
-
// Spinner
|
|
221
|
-
// -------------------------------
|
|
222
|
-
.sk-fading-circle {
|
|
223
|
-
// margin: 100px auto;
|
|
224
|
-
width: 40px;
|
|
225
|
-
height: 40px;
|
|
226
|
-
position: relative;
|
|
227
|
-
margin-left: 5px;
|
|
228
|
-
margin-top: 5px;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.sk-fading-circle .sk-circle {
|
|
232
|
-
width: 100%;
|
|
233
|
-
height: 100%;
|
|
234
|
-
position: absolute;
|
|
235
|
-
left: 0;
|
|
236
|
-
top: 0;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.sk-fading-circle .sk-circle:before {
|
|
240
|
-
content: '';
|
|
241
|
-
display: block;
|
|
242
|
-
margin: 0 auto;
|
|
243
|
-
width: 15%;
|
|
244
|
-
height: 15%;
|
|
245
|
-
background-color: #333;
|
|
246
|
-
border-radius: 100%;
|
|
247
|
-
-webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out both;
|
|
248
|
-
animation: sk-circleFadeDelay 1.2s infinite ease-in-out both;
|
|
249
|
-
}
|
|
250
|
-
.sk-fading-circle .sk-circle2 {
|
|
251
|
-
-webkit-transform: rotate(30deg);
|
|
252
|
-
-ms-transform: rotate(30deg);
|
|
253
|
-
transform: rotate(30deg);
|
|
254
|
-
}
|
|
255
|
-
.sk-fading-circle .sk-circle3 {
|
|
256
|
-
-webkit-transform: rotate(60deg);
|
|
257
|
-
-ms-transform: rotate(60deg);
|
|
258
|
-
transform: rotate(60deg);
|
|
259
|
-
}
|
|
260
|
-
.sk-fading-circle .sk-circle4 {
|
|
261
|
-
-webkit-transform: rotate(90deg);
|
|
262
|
-
-ms-transform: rotate(90deg);
|
|
263
|
-
transform: rotate(90deg);
|
|
264
|
-
}
|
|
265
|
-
.sk-fading-circle .sk-circle5 {
|
|
266
|
-
-webkit-transform: rotate(120deg);
|
|
267
|
-
-ms-transform: rotate(120deg);
|
|
268
|
-
transform: rotate(120deg);
|
|
269
|
-
}
|
|
270
|
-
.sk-fading-circle .sk-circle6 {
|
|
271
|
-
-webkit-transform: rotate(150deg);
|
|
272
|
-
-ms-transform: rotate(150deg);
|
|
273
|
-
transform: rotate(150deg);
|
|
274
|
-
}
|
|
275
|
-
.sk-fading-circle .sk-circle7 {
|
|
276
|
-
-webkit-transform: rotate(180deg);
|
|
277
|
-
-ms-transform: rotate(180deg);
|
|
278
|
-
transform: rotate(180deg);
|
|
279
|
-
}
|
|
280
|
-
.sk-fading-circle .sk-circle8 {
|
|
281
|
-
-webkit-transform: rotate(210deg);
|
|
282
|
-
-ms-transform: rotate(210deg);
|
|
283
|
-
transform: rotate(210deg);
|
|
284
|
-
}
|
|
285
|
-
.sk-fading-circle .sk-circle9 {
|
|
286
|
-
-webkit-transform: rotate(240deg);
|
|
287
|
-
-ms-transform: rotate(240deg);
|
|
288
|
-
transform: rotate(240deg);
|
|
289
|
-
}
|
|
290
|
-
.sk-fading-circle .sk-circle10 {
|
|
291
|
-
-webkit-transform: rotate(270deg);
|
|
292
|
-
-ms-transform: rotate(270deg);
|
|
293
|
-
transform: rotate(270deg);
|
|
294
|
-
}
|
|
295
|
-
.sk-fading-circle .sk-circle11 {
|
|
296
|
-
-webkit-transform: rotate(300deg);
|
|
297
|
-
-ms-transform: rotate(300deg);
|
|
298
|
-
transform: rotate(300deg);
|
|
299
|
-
}
|
|
300
|
-
.sk-fading-circle .sk-circle12 {
|
|
301
|
-
-webkit-transform: rotate(330deg);
|
|
302
|
-
-ms-transform: rotate(330deg);
|
|
303
|
-
transform: rotate(330deg);
|
|
304
|
-
}
|
|
305
|
-
.sk-fading-circle .sk-circle2:before {
|
|
306
|
-
-webkit-animation-delay: -1.1s;
|
|
307
|
-
animation-delay: -1.1s;
|
|
308
|
-
}
|
|
309
|
-
.sk-fading-circle .sk-circle3:before {
|
|
310
|
-
-webkit-animation-delay: -1s;
|
|
311
|
-
animation-delay: -1s;
|
|
312
|
-
}
|
|
313
|
-
.sk-fading-circle .sk-circle4:before {
|
|
314
|
-
-webkit-animation-delay: -0.9s;
|
|
315
|
-
animation-delay: -0.9s;
|
|
316
|
-
}
|
|
317
|
-
.sk-fading-circle .sk-circle5:before {
|
|
318
|
-
-webkit-animation-delay: -0.8s;
|
|
319
|
-
animation-delay: -0.8s;
|
|
320
|
-
}
|
|
321
|
-
.sk-fading-circle .sk-circle6:before {
|
|
322
|
-
-webkit-animation-delay: -0.7s;
|
|
323
|
-
animation-delay: -0.7s;
|
|
324
|
-
}
|
|
325
|
-
.sk-fading-circle .sk-circle7:before {
|
|
326
|
-
-webkit-animation-delay: -0.6s;
|
|
327
|
-
animation-delay: -0.6s;
|
|
328
|
-
}
|
|
329
|
-
.sk-fading-circle .sk-circle8:before {
|
|
330
|
-
-webkit-animation-delay: -0.5s;
|
|
331
|
-
animation-delay: -0.5s;
|
|
332
|
-
}
|
|
333
|
-
.sk-fading-circle .sk-circle9:before {
|
|
334
|
-
-webkit-animation-delay: -0.4s;
|
|
335
|
-
animation-delay: -0.4s;
|
|
336
|
-
}
|
|
337
|
-
.sk-fading-circle .sk-circle10:before {
|
|
338
|
-
-webkit-animation-delay: -0.3s;
|
|
339
|
-
animation-delay: -0.3s;
|
|
340
|
-
}
|
|
341
|
-
.sk-fading-circle .sk-circle11:before {
|
|
342
|
-
-webkit-animation-delay: -0.2s;
|
|
343
|
-
animation-delay: -0.2s;
|
|
344
|
-
}
|
|
345
|
-
.sk-fading-circle .sk-circle12:before {
|
|
346
|
-
-webkit-animation-delay: -0.1s;
|
|
347
|
-
animation-delay: -0.1s;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
@-webkit-keyframes sk-circleFadeDelay {
|
|
351
|
-
0%, 39%, 100% { opacity: 0; }
|
|
352
|
-
40% { opacity: 1; }
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
@keyframes sk-circleFadeDelay {
|
|
356
|
-
0%, 39%, 100% { opacity: 0; }
|
|
357
|
-
40% { opacity: 1; }
|
|
358
|
-
}
|
|
@@ -7,10 +7,13 @@ import { Platform } from '@ionic/angular';
|
|
|
7
7
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
8
8
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
9
9
|
import { TranslateService } from '@ngx-translate/core';
|
|
10
|
+
|
|
10
11
|
import * as moment from 'moment';
|
|
11
12
|
// import { EventsService } from 'src/app/services/events-service';
|
|
12
13
|
// import { TiledeskService } from '../../../services/tiledesk/tiledesk.service';
|
|
13
14
|
import { NetworkService } from '../../../services/network-service/network.service';
|
|
15
|
+
import { AppConfigProvider } from 'src/app/services/app-config';
|
|
16
|
+
import { DomSanitizer } from '@angular/platform-browser'
|
|
14
17
|
// import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
15
18
|
// import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
16
19
|
|
|
@@ -29,8 +32,8 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
29
32
|
public logger: LoggerService = LoggerInstance.getInstance();
|
|
30
33
|
public currentYear: any;
|
|
31
34
|
public browserLang: string;
|
|
32
|
-
|
|
33
|
-
public
|
|
35
|
+
|
|
36
|
+
public PROJECT_FOR_PANEL: any;
|
|
34
37
|
|
|
35
38
|
/**
|
|
36
39
|
*
|
|
@@ -45,7 +48,9 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
45
48
|
private translate: TranslateService,
|
|
46
49
|
// private events: EventsService,
|
|
47
50
|
// private tiledeskService: TiledeskService,
|
|
48
|
-
private networkService: NetworkService
|
|
51
|
+
private networkService: NetworkService,
|
|
52
|
+
private appConfigProvider: AppConfigProvider,
|
|
53
|
+
private sanitizer: DomSanitizer,
|
|
49
54
|
) {
|
|
50
55
|
super(iterableDiffers, kvDiffers)
|
|
51
56
|
this.browserLang = this.translate.getBrowserLang();
|
|
@@ -62,31 +67,23 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
62
67
|
|
|
63
68
|
this.currentYear = moment().format('YYYY');
|
|
64
69
|
this.logger.log('[ION-LIST-CONVS-COMP] - currentYear ', this.currentYear)
|
|
70
|
+
|
|
71
|
+
const DASHBOARD_BASE_URL = this.appConfigProvider.getConfig().dashboardUrl;
|
|
72
|
+
|
|
73
|
+
// console.log('[ION-LIST-CONVS-COMP] - DASHBOARD_BASE_URL ', DASHBOARD_BASE_URL)
|
|
74
|
+
this.PROJECT_FOR_PANEL = this.sanitizer.bypassSecurityTrustResourceUrl(DASHBOARD_BASE_URL + '#/project-for-panel');
|
|
65
75
|
}
|
|
66
76
|
|
|
67
77
|
ngOnInit() {
|
|
68
78
|
this.isApp = this.platform.is('ios') || this.platform.is('android')
|
|
69
79
|
this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - IS-APP ', this.isApp)
|
|
70
80
|
this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - Platform', this.platform.platforms());
|
|
71
|
-
this.watchToConnectionStatus();
|
|
72
81
|
}
|
|
73
82
|
|
|
83
|
+
|
|
74
84
|
|
|
75
|
-
watchToConnectionStatus() {
|
|
76
|
-
|
|
77
|
-
this.networkService.checkInternetFunc().subscribe(isOnline => {
|
|
78
|
-
this.checkInternet = isOnline
|
|
79
|
-
this.logger.log('[ION-LIST-CONVS-COMP] - watchToConnectionStatus - isOnline', this.checkInternet)
|
|
80
85
|
|
|
81
|
-
// checking internet connection
|
|
82
|
-
if (this.checkInternet == true) {
|
|
83
86
|
|
|
84
|
-
this.isOnline = true;
|
|
85
|
-
} else {
|
|
86
|
-
this.isOnline = false;
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
87
|
// --------------------------------------------------
|
|
91
88
|
// subdsribe to event
|
|
92
89
|
// --------------------------------------------------
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
<ion-spinner *ngIf="showSpinnerInLoginBtn === true" name="bubbles" color="white" duration="2" ></ion-spinner>
|
|
43
43
|
</button>
|
|
44
44
|
|
|
45
|
-
<p style="color: #666666; font-size: 1.1em; text-align: center; margin-top: 16px;">
|
|
45
|
+
<!-- <p style="color: #666666; font-size: 1.1em; text-align: center; margin-top: 16px;">
|
|
46
46
|
{{ translationMap.get('LABEL_DONT_HAVE_AN_ACCOUNT_YET') }}
|
|
47
47
|
<span style="color: #03a5e8; cursor:pointer" (click)="goToSignupPage()">
|
|
48
48
|
{{ translationMap.get('LABEL_SIGNUP') }}
|
|
49
49
|
</span>
|
|
50
|
-
</p>
|
|
50
|
+
</p> -->
|
|
51
51
|
|
|
52
52
|
<p style="color: #666666; font-size: 1.1em; text-align: center; margin-top: 16px;">
|
|
53
53
|
{{ translationMap.get('LABEL_FORGOT_YOUR_PASSWORD') }}
|
|
@@ -3,6 +3,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
|
|
3
3
|
import { ToastController, IonInput } from '@ionic/angular';
|
|
4
4
|
import { AppConfigProvider } from '../../../services/app-config';
|
|
5
5
|
|
|
6
|
+
|
|
6
7
|
// Logger
|
|
7
8
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
8
9
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
@@ -59,7 +60,7 @@ export class LoginComponent implements OnInit {
|
|
|
59
60
|
this.buildForm();
|
|
60
61
|
this.DASHBOARD_URL = this.appConfig.getConfig().dashboardUrl;
|
|
61
62
|
this.logger.log('LOGIN-COMP OnInit DASHBOARD_URL', this.DASHBOARD_URL)
|
|
62
|
-
this.showSpinnerInLoginBtn = false;
|
|
63
|
+
// this.showSpinnerInLoginBtn = false;
|
|
63
64
|
}
|
|
64
65
|
// ngAfterViewChecked() {
|
|
65
66
|
// this.emailInputEl.setFocus()
|
package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts
CHANGED
|
@@ -61,7 +61,7 @@ export class BubbleMyMessageComponent implements OnInit {
|
|
|
61
61
|
* alla chiusura controllo su quale opzione ho premuto e attivo l'azione corrispondete
|
|
62
62
|
*/
|
|
63
63
|
presentPopover(event, msg) {
|
|
64
|
-
console.log('presentPopover');
|
|
64
|
+
// console.log('presentPopover');
|
|
65
65
|
// let popover = this.popoverCtrl.create(PopoverPage, { typePopup: TYPE_POPUP_DETAIL_MESSAGE, message: msg });
|
|
66
66
|
// popover.present({
|
|
67
67
|
// ev: event
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
<ion-toolbar>
|
|
4
4
|
|
|
5
5
|
<ion-buttons slot="start">
|
|
6
|
+
<!-- (click)="pushPage('conversations-list')" -->
|
|
6
7
|
<ion-back-button text="" *ngIf="isMobile"
|
|
7
|
-
defaultHref="conversations-list"
|
|
8
|
-
|
|
8
|
+
defaultHref="/conversations-list"
|
|
9
|
+
>
|
|
9
10
|
</ion-back-button>
|
|
10
11
|
</ion-buttons>
|
|
11
12
|
|
|
@@ -104,13 +104,13 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
getPlatformName() {
|
|
107
|
-
|
|
107
|
+
this.logger.log('getPlatformName this.platform', this.platform)
|
|
108
108
|
if (this.platform.is('ios')) {
|
|
109
109
|
this.platformName = 'ios'
|
|
110
|
-
|
|
110
|
+
this.logger.log('getPlatformName platformName', this.platformName)
|
|
111
111
|
} else if (this.platform.is('android')){
|
|
112
112
|
this.platformName = 'android'
|
|
113
|
-
|
|
113
|
+
this.logger.log('getPlatformName platformName', this.platformName)
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
}
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -43,6 +43,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
43
43
|
@Input() loggedUser: UserModel;
|
|
44
44
|
@Input() conversationWith: string;
|
|
45
45
|
@Input() tagsCannedFilter: any = [];
|
|
46
|
+
|
|
46
47
|
@Input() events: Observable<void>;
|
|
47
48
|
@Input() fileUploadAccept: string
|
|
48
49
|
@Input() isOpenInfoConversation: boolean;
|
|
@@ -102,6 +103,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
102
103
|
|
|
103
104
|
|
|
104
105
|
ngOnChanges() {
|
|
106
|
+
|
|
105
107
|
if (this.translationMap) {
|
|
106
108
|
this.LONG_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG')
|
|
107
109
|
this.SHORT_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
|
|
@@ -110,6 +112,8 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
110
112
|
|
|
111
113
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges DROP EVENT ", this.dropEvent);
|
|
112
114
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges tagsCannedFilter ", this.tagsCannedFilter);
|
|
115
|
+
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea ngOnChanges in [MSG-TEXT-AREA] this.tagsCannedFilter.length ', this.tagsCannedFilter.length)
|
|
116
|
+
|
|
113
117
|
// use case drop
|
|
114
118
|
if (this.dropEvent) {
|
|
115
119
|
this.presentModal(this.dropEvent)
|
|
@@ -136,11 +140,11 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
136
140
|
|
|
137
141
|
const elTextAreaWrapper = elTextArea.children[0]
|
|
138
142
|
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit elTextAreaWrapper", elTextAreaWrapper);
|
|
139
|
-
|
|
143
|
+
|
|
140
144
|
if (elTextAreaWrapper.children.length === 1) {
|
|
141
145
|
const elNativeTearea = elTextAreaWrapper.children[0]
|
|
142
146
|
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit elNativeTearea", elNativeTearea);
|
|
143
|
-
|
|
147
|
+
elNativeTearea.setAttribute("style", "height: 37px !important; ");
|
|
144
148
|
}
|
|
145
149
|
}
|
|
146
150
|
|
|
@@ -481,7 +485,10 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
481
485
|
// if the message is not empty it is passed to the control method
|
|
482
486
|
// ------------------------------------------------------------------------
|
|
483
487
|
onKeydown(e: any, text: string) {
|
|
488
|
+
this.logger.log("[CONVS-DETAIL] - returnChangeTextArea - onKeydown in MSG-TEXT-AREA event", e)
|
|
489
|
+
this.logger.log("[CONVS-DETAIL] - returnChangeTextArea - onKeydown in MSG-TEXT-AREA text", text)
|
|
484
490
|
e.preventDefault(); // Prevent press enter from creating new line
|
|
491
|
+
// console.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea * event: ", e);
|
|
485
492
|
|
|
486
493
|
this.countClicks++;
|
|
487
494
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - countClicks: ', this.countClicks);
|
|
@@ -489,9 +496,18 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
489
496
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - event target: ', e.target);
|
|
490
497
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - event target textContent: ', e.target.textContent);
|
|
491
498
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter: ', this.tagsCannedFilter);
|
|
499
|
+
|
|
492
500
|
// this.logger.error("[CONVS-DETAIL][MSG-TEXT-AREA] pressedOnKeyboard e.keyCode ", e.keyCode);
|
|
501
|
+
// this.events.subscribe((cannedmessage) => {
|
|
502
|
+
|
|
503
|
+
// console.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea * cannedmessage: ", cannedmessage);
|
|
504
|
+
// });
|
|
505
|
+
|
|
506
|
+
// user and time are the same arguments passed in `events.publish(user, time)`
|
|
507
|
+
|
|
493
508
|
|
|
494
|
-
|
|
509
|
+
|
|
510
|
+
let message = e.target.textContent.trim();
|
|
495
511
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - event target textContent (message): ', message);
|
|
496
512
|
// e.inputType === 'insertLineBreak' &&
|
|
497
513
|
if (e.inputType === 'insertLineBreak' && message === '') {
|
|
@@ -501,13 +517,37 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
501
517
|
} else {
|
|
502
518
|
var pos = text.lastIndexOf("/");
|
|
503
519
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - POSITION OF '/': ", pos);
|
|
520
|
+
this.logger.log("[CONVS-DETAIL] returnChangeTextArea onKeydown in msg-texarea POSITION OF '/': ", pos);
|
|
521
|
+
this.logger.log("[CONVS-DETAIL] returnChangeTextArea onKeydown in msg-texarea this.tagsCannedFilter.length': ", this.tagsCannedFilter.length);
|
|
504
522
|
if (!text.includes("/")) {
|
|
505
523
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 1 message: ', message);
|
|
524
|
+
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 1 message: ", message);
|
|
506
525
|
this.messageString = '';
|
|
507
526
|
this.sendMessage(text);
|
|
508
527
|
this.countClicks = 0
|
|
509
|
-
} else if (text.includes("/") && pos
|
|
528
|
+
} else if (text.includes("/") && pos === 0 && this.countClicks > 1 && this.tagsCannedFilter.length > 0) {
|
|
510
529
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter.length 2: ', this.tagsCannedFilter.length);
|
|
530
|
+
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 message: ", message);
|
|
531
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 message value: ', message.value);
|
|
532
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 text: ', text);
|
|
533
|
+
|
|
534
|
+
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.tagsCannedFilter.length: ", this.tagsCannedFilter.length);
|
|
535
|
+
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
|
|
536
|
+
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
|
|
537
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 message: ', message);
|
|
538
|
+
this.messageString = '';
|
|
539
|
+
|
|
540
|
+
this.sendMessage(text);
|
|
541
|
+
this.countClicks = 0
|
|
542
|
+
} else if (text.includes("/") && pos > 0 && this.countClicks > 1 && this.tagsCannedFilter.length > 0 && text.substr(-1) !== '/' ) {
|
|
543
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter.length 3: ', this.tagsCannedFilter.length);
|
|
544
|
+
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 3 message: ", message);
|
|
545
|
+
// this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 3 message value: ', message.value);
|
|
546
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 3 text: ', text);
|
|
547
|
+
|
|
548
|
+
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.tagsCannedFilter.length: ", this.tagsCannedFilter.length);
|
|
549
|
+
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
|
|
550
|
+
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
|
|
511
551
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 message: ', message);
|
|
512
552
|
this.messageString = '';
|
|
513
553
|
|
|
@@ -516,6 +556,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
516
556
|
} else if (text.includes("/") && this.tagsCannedFilter.length === 0) {
|
|
517
557
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter.length 3: ', this.tagsCannedFilter.length);
|
|
518
558
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 3 message: ', message);
|
|
559
|
+
this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 3 message: ", message);
|
|
519
560
|
this.messageString = '';
|
|
520
561
|
|
|
521
562
|
this.sendMessage(text);
|
|
@@ -586,7 +627,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
586
627
|
if (event.key === 'Enter' && event.altKey || event.key === 'Enter' && event.ctrlKey || event.key === 'Enter' && event.metaKey) {
|
|
587
628
|
|
|
588
629
|
|
|
589
|
-
|
|
630
|
+
|
|
590
631
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] HAS PRESSED COMBO KEYS this.messageString', this.messageString);
|
|
591
632
|
|
|
592
633
|
if (this.messageString !== undefined && this.messageString.trim() !== '') {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
<ion-buttons slot="end">
|
|
16
16
|
|
|
17
|
-
<ion-button *ngIf="
|
|
17
|
+
<ion-button *ngIf="supportMode" ion-button fill="clear" (click)="onOpenContactsDirectory($event)">
|
|
18
18
|
<ion-icon slot="icon-only" name="create-outline"></ion-icon>
|
|
19
19
|
</ion-button>
|
|
20
20
|
|
|
@@ -7,14 +7,16 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
|
|
7
7
|
})
|
|
8
8
|
export class DdpHeaderComponent implements OnInit {
|
|
9
9
|
@Input() numberOpenConv: number;
|
|
10
|
-
@Input() supportMode
|
|
10
|
+
@Input() supportMode: boolean;
|
|
11
11
|
@Output() openContactsDirectory = new EventEmitter();
|
|
12
12
|
@Output() openProfileInfo = new EventEmitter();
|
|
13
13
|
|
|
14
14
|
constructor(
|
|
15
15
|
) { }
|
|
16
16
|
|
|
17
|
-
ngOnInit() {
|
|
17
|
+
ngOnInit() {
|
|
18
|
+
// console.log('DDP HEADER SUPPORT MODE ', this.supportMode)
|
|
19
|
+
}
|
|
18
20
|
|
|
19
21
|
// START @Output() //
|
|
20
22
|
/** */
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<div id="image-viewer-modal" class="modal">
|
|
2
|
+
|
|
3
|
+
<!-- The Close Button -->
|
|
4
|
+
<span class="close" (click)="closeImageViewerModal()">
|
|
5
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">
|
|
6
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
7
|
+
<path
|
|
8
|
+
d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" />
|
|
9
|
+
</svg>
|
|
10
|
+
</span>
|
|
11
|
+
<span class="download-image" (click)="downloadImage()">
|
|
12
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">
|
|
13
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
14
|
+
<path
|
|
15
|
+
d="M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z" />
|
|
16
|
+
</svg>
|
|
17
|
+
</span>
|
|
18
|
+
<!-- Modal Content (The Image) [src]="metadata.src"-->
|
|
19
|
+
<img class="modal-content" id="image-viewer-img">
|
|
20
|
+
|
|
21
|
+
<!-- Modal Caption (Image Text) -->
|
|
22
|
+
<div id="caption"></div>
|
|
23
|
+
</div>
|