@chat21/chat21-ionic 3.0.66 → 3.0.67
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 -0
- package/package.json +1 -1
- package/src/app/app.component.ts +59 -18
- package/src/app/components/ddp-header/ddp-header.component.html +20 -5
- package/src/app/components/ddp-header/ddp-header.component.ts +8 -0
- package/src/app/components/sidebar/sidebar.component.ts +20 -49
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +7 -28
- package/src/app/pages/conversations-list/conversations-list.page.html +3 -1
- package/src/app/pages/conversations-list/conversations-list.page.ts +25 -0
- package/src/app/pages/loader-preview/loader-preview.page.ts +12 -43
- package/src/chat-config-pre.json +1 -0
- package/src/chat21-core/providers/abstract/archivedconversations-handler.service.ts +1 -2
- package/src/chat21-core/providers/abstract/conversations-handler.service.ts +2 -4
- package/src/chat21-core/providers/firebase/firebase-archivedconversations-handler.ts +3 -4
- package/src/chat21-core/providers/firebase/firebase-auth-service.ts +2 -3
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +4 -4
- package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +4 -5
- package/src/chat21-core/providers/firebase/firebase-groups-handler.ts +5 -5
- package/src/chat21-core/providers/firebase/firebase-presence.service.ts +2 -3
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +2 -2
- package/src/chat21-core/providers/firebase/firebase-upload.service.ts +1 -1
- package/src/chat21-core/providers/mqtt/mqtt-archivedconversations-handler.ts +3 -6
- package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +3 -3
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +4 -4
- package/src/chat21-core/providers/mqtt/mqtt-conversations-handler.ts +10 -5
- package/src/chat21-core/providers/mqtt/mqtt-groups-handler.ts +5 -5
- package/src/chat21-core/providers/mqtt/mqtt-presence.service.ts +3 -2
- package/src/chat21-core/providers/mqtt/mqtt-typing.service.ts +5 -0
- package/src/chat21-core/providers/native/native-upload-service.ts +2 -9
- package/src/chat21-core/providers/tiledesk/tiledesk-auth.service.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.67 in PROD
|
|
4
|
+
- added: control to 'foregroundCount' when tab is hidden/visible
|
|
5
|
+
- added: sound control on/off to new conversations and conversations changed
|
|
6
|
+
|
|
3
7
|
### 3.0.66 in PROD
|
|
4
8
|
- added: control to 'foregroundCount' locale storage variable from dashboard
|
|
5
9
|
- added: uk translations
|
package/package.json
CHANGED
package/src/app/app.component.ts
CHANGED
|
@@ -89,6 +89,8 @@ export class AppComponent implements OnInit {
|
|
|
89
89
|
private setIntervalTime: any;
|
|
90
90
|
private setTimeoutSound: any;
|
|
91
91
|
private isTabVisible: boolean = true;
|
|
92
|
+
private isSoundEnabled: boolean;
|
|
93
|
+
private hasPlayed: boolean;
|
|
92
94
|
private tabTitle: string;
|
|
93
95
|
private setTimeoutConversationsEvent: any;
|
|
94
96
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
@@ -99,7 +101,7 @@ export class AppComponent implements OnInit {
|
|
|
99
101
|
private hadBeenCalledOpenModal: boolean = false;
|
|
100
102
|
public missingConnectionToast: any
|
|
101
103
|
public executedInitializeAppByWatchConnection: boolean = false;
|
|
102
|
-
|
|
104
|
+
private isInitialized: boolean = false;
|
|
103
105
|
private version: string;
|
|
104
106
|
IS_ONLINE: boolean;
|
|
105
107
|
IS_ON_MOBILE_DEVICE: boolean;
|
|
@@ -830,6 +832,12 @@ export class AppComponent implements OnInit {
|
|
|
830
832
|
this.audio = new Audio();
|
|
831
833
|
this.audio.src = chatBaseUrl + URL_SOUND_LIST_CONVERSATION;
|
|
832
834
|
this.audio.load();
|
|
835
|
+
|
|
836
|
+
const sound_status = localStorage.getItem('dshbrd----sound')
|
|
837
|
+
if(sound_status && sound_status !== 'undefined'){
|
|
838
|
+
this.isSoundEnabled = sound_status === 'enabled'? true: false
|
|
839
|
+
}
|
|
840
|
+
|
|
833
841
|
}
|
|
834
842
|
|
|
835
843
|
private manageTabNotification() {
|
|
@@ -848,26 +856,41 @@ export class AppComponent implements OnInit {
|
|
|
848
856
|
document.title = "(" + badgeNewConverstionNumber + ") " + that.tabTitle;
|
|
849
857
|
}
|
|
850
858
|
}, 1000);
|
|
851
|
-
this.soundMessage()
|
|
859
|
+
// if(this.isSoundEnabled) this.soundMessage()
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
const sound_status = localStorage.getItem('dshbrd----sound')
|
|
863
|
+
if(sound_status && sound_status !== 'undefined'){
|
|
864
|
+
this.isSoundEnabled = sound_status === 'enabled'? true: false
|
|
852
865
|
}
|
|
853
|
-
|
|
866
|
+
|
|
867
|
+
if(this.isInitialized && this.isSoundEnabled) this.soundMessage()
|
|
854
868
|
}
|
|
855
869
|
|
|
856
870
|
soundMessage() {
|
|
857
871
|
const that = this;
|
|
858
|
-
// this.audio = new Audio();
|
|
859
|
-
// // this.audio.src = '/assets/sounds/pling.mp3';
|
|
860
|
-
// this.audio.src = URL_SOUND_LIST_CONVERSATION;
|
|
861
|
-
// this.audio.load();
|
|
862
872
|
this.logger.debug('[APP-COMP] conversation play', this.audio);
|
|
863
|
-
clearTimeout(this.setTimeoutSound);
|
|
864
|
-
this.setTimeoutSound = setTimeout(function () {
|
|
873
|
+
// clearTimeout(this.setTimeoutSound);
|
|
874
|
+
// this.setTimeoutSound = setTimeout(function () {
|
|
875
|
+
// that.audio.play().then(() => {
|
|
876
|
+
// that.logger.debug('[APP-COMP] ****** soundMessage played *****');
|
|
877
|
+
// }).catch((error: any) => {
|
|
878
|
+
// that.logger.error('[APP-COMP] ***soundMessage error*', error);
|
|
879
|
+
// });
|
|
880
|
+
// }, 4000);
|
|
881
|
+
|
|
882
|
+
//play sound every 4s from the fist time you receive a conversation added/changed
|
|
883
|
+
if(!this.hasPlayed){
|
|
865
884
|
that.audio.play().then(() => {
|
|
885
|
+
that.hasPlayed = true
|
|
866
886
|
that.logger.debug('[APP-COMP] ****** soundMessage played *****');
|
|
887
|
+
setTimeout(() => {
|
|
888
|
+
that.hasPlayed = false
|
|
889
|
+
}, 4000);
|
|
867
890
|
}).catch((error: any) => {
|
|
868
891
|
that.logger.error('[APP-COMP] ***soundMessage error*', error);
|
|
869
892
|
});
|
|
870
|
-
}
|
|
893
|
+
}
|
|
871
894
|
}
|
|
872
895
|
/**---------------- SOUND FUNCTIONS --> END <--- +*/
|
|
873
896
|
/***************************************************+*/
|
|
@@ -1185,12 +1208,12 @@ export class AppComponent implements OnInit {
|
|
|
1185
1208
|
private updateConversationsOnStorage(){
|
|
1186
1209
|
const that = this
|
|
1187
1210
|
// reset timer and save conversation on storage after 2s
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1211
|
+
clearTimeout(this.setTimeoutConversationsEvent);
|
|
1212
|
+
this.setTimeoutConversationsEvent = setTimeout(() => {
|
|
1213
|
+
// that.logger.debug('[APP-COMP] updateConversationsOnStorage: reset timer and save conversations -> ', this.conversationsHandlerService.conversations.length)
|
|
1214
|
+
// that.appStorageService.setItem('conversations', JSON.stringify(that.conversationsHandlerService.conversations))
|
|
1215
|
+
that.isInitialized = true;
|
|
1216
|
+
}, 2000);
|
|
1194
1217
|
}
|
|
1195
1218
|
|
|
1196
1219
|
private initArchivedConversationsHandler(userId: string) {
|
|
@@ -1202,10 +1225,22 @@ export class AppComponent implements OnInit {
|
|
|
1202
1225
|
this.archivedConversationsHandlerService.initialize(this.tenant, userId, translationMap);
|
|
1203
1226
|
}
|
|
1204
1227
|
|
|
1228
|
+
checkAndRemoveDashboardForegroundCount(){
|
|
1229
|
+
try {
|
|
1230
|
+
const dashboardForegroundCount = localStorage.getItem('dshbrd----foregroundcount')
|
|
1231
|
+
this.logger.log('[SIDEBAR] - THERE IS DASHBOARD FOREGROUND COUNT', dashboardForegroundCount)
|
|
1232
|
+
if (dashboardForegroundCount && dashboardForegroundCount !== 'undefined') {
|
|
1233
|
+
localStorage.setItem('dshbrd----foregroundcount', '0')
|
|
1234
|
+
}
|
|
1235
|
+
} catch (err) {
|
|
1236
|
+
this.logger.error('Get local storage dshbrd----foregroundcount ', err)
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1205
1240
|
|
|
1206
1241
|
@HostListener('document:visibilitychange', [])
|
|
1207
1242
|
visibilitychange() {
|
|
1208
|
-
|
|
1243
|
+
this.logger.debug("document TITLE", document.hidden, document.title);
|
|
1209
1244
|
if (document.hidden) {
|
|
1210
1245
|
this.isTabVisible = false
|
|
1211
1246
|
} else {
|
|
@@ -1213,6 +1248,7 @@ export class AppComponent implements OnInit {
|
|
|
1213
1248
|
clearInterval(this.setIntervalTime)
|
|
1214
1249
|
this.isTabVisible = true;
|
|
1215
1250
|
document.title = this.tabTitle;
|
|
1251
|
+
this.checkAndRemoveDashboardForegroundCount()
|
|
1216
1252
|
}
|
|
1217
1253
|
}
|
|
1218
1254
|
|
|
@@ -1222,7 +1258,7 @@ export class AppComponent implements OnInit {
|
|
|
1222
1258
|
@HostListener('window:storage', ['$event'])
|
|
1223
1259
|
onStorageChanged(event: any) {
|
|
1224
1260
|
|
|
1225
|
-
if (event.key !== 'chat_sv5__tiledeskToken') {
|
|
1261
|
+
if (event.key !== 'chat_sv5__tiledeskToken' && event.key !== 'dshbrd----sound') {
|
|
1226
1262
|
return;
|
|
1227
1263
|
}
|
|
1228
1264
|
|
|
@@ -1259,6 +1295,11 @@ export class AppComponent implements OnInit {
|
|
|
1259
1295
|
|
|
1260
1296
|
}
|
|
1261
1297
|
}
|
|
1298
|
+
|
|
1299
|
+
if(event.key === 'dshbrd----sound'){
|
|
1300
|
+
this.events.publish('storage:sound', event.newValue);
|
|
1301
|
+
this.isSoundEnabled = event.newValue === 'enabled'? true: false
|
|
1302
|
+
}
|
|
1262
1303
|
}
|
|
1263
1304
|
}
|
|
1264
1305
|
|
|
@@ -11,25 +11,40 @@
|
|
|
11
11
|
<div *ngIf="numberOpenConv > 0" class="number-open-conv">({{numberOpenConv}})</div>
|
|
12
12
|
</ion-title>
|
|
13
13
|
|
|
14
|
-
<ion-buttons slot="
|
|
14
|
+
<ion-buttons slot="start">
|
|
15
|
+
<ion-button *ngIf="sound_btn==='enabled'" ion-button fill="clear" (click)="onSoundChangeFN('disabled')">
|
|
16
|
+
<ion-icon slot="icon-only" name="volume-high-outline" ></ion-icon>
|
|
17
|
+
</ion-button>
|
|
15
18
|
|
|
19
|
+
<ion-button *ngIf="sound_btn==='disabled'" ion-button fill="clear" (click)="onSoundChangeFN('enabled')">
|
|
20
|
+
<ion-icon slot="icon-only" name="volume-mute-outline" ></ion-icon>
|
|
21
|
+
</ion-button>
|
|
22
|
+
</ion-buttons>
|
|
23
|
+
|
|
24
|
+
<ion-buttons slot="end">
|
|
25
|
+
|
|
16
26
|
<ion-button ion-button fill="clear" (click)="presentCreateTicketModal()"
|
|
17
|
-
tooltip="{{translationMap?.get('CreateTicket')}}"
|
|
27
|
+
tooltip="{{translationMap?.get('CreateTicket')}}"
|
|
28
|
+
[options]="tooltipOptions"
|
|
29
|
+
placement="bottom">
|
|
18
30
|
<ion-icon slot="icon-only" name="ticket-outline"></ion-icon>
|
|
19
31
|
</ion-button>
|
|
20
32
|
|
|
21
33
|
<ion-button *ngIf="archived_btn" ion-button fill="clear" (click)="onClickArchivedConversation()"
|
|
22
|
-
tooltip="{{translationMap?.get('ViewArchivedConversations')}}"
|
|
34
|
+
tooltip="{{translationMap?.get('ViewArchivedConversations')}}"
|
|
35
|
+
[options]="tooltipOptions"
|
|
36
|
+
placement="bottom">
|
|
23
37
|
<ion-icon slot="icon-only" name="file-tray-full-outline"></ion-icon>
|
|
24
38
|
<!-- <ion-icon name="file-tray-stacked-outline"></ion-icon> -->
|
|
25
39
|
<!-- <ion-icon name="file-tray-full-outline"></ion-icon> -->
|
|
26
40
|
</ion-button>
|
|
27
41
|
|
|
28
42
|
<ion-button *ngIf="writeto_btn" ion-button fill="clear" (click)="onOpenContactsDirectory($event)"
|
|
29
|
-
|
|
43
|
+
tooltip="{{translationMap?.get('ViewContactsList')}}"
|
|
44
|
+
[options]="tooltipOptions"
|
|
45
|
+
placement="bottom">
|
|
30
46
|
<ion-icon slot="icon-only" name="create-outline"></ion-icon>
|
|
31
47
|
<!-- <ion-icon slot="icon-only" name="people-outline"></ion-icon> -->
|
|
32
|
-
|
|
33
48
|
</ion-button>
|
|
34
49
|
|
|
35
50
|
<!-- <button ion-button icon-only (click)="onOpenArchivedConversationsPage()">
|
|
@@ -9,12 +9,16 @@ import { CustomTranslateService } from 'src/chat21-core/providers/custom-transla
|
|
|
9
9
|
styleUrls: ['./ddp-header.component.scss'],
|
|
10
10
|
})
|
|
11
11
|
export class DdpHeaderComponent implements OnInit {
|
|
12
|
+
|
|
12
13
|
@Input() numberOpenConv: number
|
|
13
14
|
@Input() supportMode: boolean
|
|
14
15
|
@Input() archived_btn: boolean
|
|
15
16
|
@Input() writeto_btn: boolean
|
|
17
|
+
@Input() sound_btn: string
|
|
18
|
+
@Output() onSoundChange = new EventEmitter<string>()
|
|
16
19
|
@Output() openContactsDirectory = new EventEmitter()
|
|
17
20
|
@Output() openProfileInfo = new EventEmitter()
|
|
21
|
+
|
|
18
22
|
IS_ON_MOBILE_DEVICE: boolean
|
|
19
23
|
createTicketModal = null
|
|
20
24
|
public translationMap: Map<string, string>;
|
|
@@ -87,6 +91,10 @@ export class DdpHeaderComponent implements OnInit {
|
|
|
87
91
|
onOpenContactsDirectory(e: any) {
|
|
88
92
|
this.openContactsDirectory.emit(e)
|
|
89
93
|
}
|
|
94
|
+
|
|
95
|
+
onSoundChangeFN(e: any){
|
|
96
|
+
this.onSoundChange.emit(e)
|
|
97
|
+
}
|
|
90
98
|
// END @Output() //
|
|
91
99
|
|
|
92
100
|
onClickArchivedConversation() {
|
|
@@ -233,55 +233,26 @@ export class SidebarComponent implements OnInit {
|
|
|
233
233
|
|
|
234
234
|
|
|
235
235
|
translateLabels() {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
this.translate.get(
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
getAppsTranslation() {
|
|
258
|
-
this.translate.get('Apps').subscribe((text: string) => {
|
|
259
|
-
this.apps_lbl = text
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
getAnalyticsTranslation() {
|
|
264
|
-
this.translate.get('Analytics').subscribe((text: string) => {
|
|
265
|
-
this.analytics_lbl = text
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
getActivitiesTranslation() {
|
|
270
|
-
this.translate.get('Activities').subscribe((text: string) => {
|
|
271
|
-
this.activities_lbl = text
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
getHistoryTranslation() {
|
|
276
|
-
this.translate.get('History').subscribe((text: string) => {
|
|
277
|
-
this.history_lbl = text
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
getSettingsTranslation() {
|
|
282
|
-
this.translate.get('Settings').subscribe((text: string) => {
|
|
283
|
-
this.settings_lbl = text
|
|
284
|
-
});
|
|
236
|
+
const keys= [
|
|
237
|
+
'Conversations',
|
|
238
|
+
'LABEL_CONTACTS',
|
|
239
|
+
'Apps',
|
|
240
|
+
'Analytics',
|
|
241
|
+
'Activities',
|
|
242
|
+
'History',
|
|
243
|
+
'Settings'
|
|
244
|
+
]
|
|
245
|
+
|
|
246
|
+
this.translate.get(keys).subscribe((text: string) => {
|
|
247
|
+
this.conversations_lbl = text['Conversations'];
|
|
248
|
+
this.contacts_lbl = text['LABEL_CONTACTS']
|
|
249
|
+
this.apps_lbl = text['Apps']
|
|
250
|
+
this.analytics_lbl = text['Analytics']
|
|
251
|
+
this.activities_lbl = text['Activities']
|
|
252
|
+
this.history_lbl = text['History']
|
|
253
|
+
this.settings_lbl = text['Settings']
|
|
254
|
+
|
|
255
|
+
});
|
|
285
256
|
}
|
|
286
257
|
|
|
287
258
|
getOSCODE() {
|
|
@@ -1786,43 +1786,22 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1786
1786
|
}
|
|
1787
1787
|
checkAcceptedFile(draggedFileMimeType) {
|
|
1788
1788
|
let isAcceptFile = false
|
|
1789
|
-
this.logger.log(
|
|
1790
|
-
'[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept: ',
|
|
1791
|
-
this.appConfigProvider.getConfig().fileUploadAccept,
|
|
1792
|
-
)
|
|
1789
|
+
this.logger.log('[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept: ',this.appConfigProvider.getConfig().fileUploadAccept)
|
|
1793
1790
|
const accept_files = this.appConfigProvider.getConfig().fileUploadAccept
|
|
1794
|
-
this.logger.log(
|
|
1795
|
-
'[CONVS-DETAIL] > checkAcceptedFile - mimeType: ',
|
|
1796
|
-
draggedFileMimeType,
|
|
1797
|
-
)
|
|
1791
|
+
this.logger.log('[CONVS-DETAIL] > checkAcceptedFile - mimeType: ',draggedFileMimeType)
|
|
1798
1792
|
if (accept_files === '*/*') {
|
|
1799
1793
|
isAcceptFile = true
|
|
1800
1794
|
return isAcceptFile
|
|
1801
1795
|
} else if (accept_files !== '*/*') {
|
|
1802
|
-
this.logger.log(
|
|
1803
|
-
'[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept typeof accept_files ',
|
|
1804
|
-
typeof accept_files,
|
|
1805
|
-
)
|
|
1796
|
+
this.logger.log( '[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept typeof accept_files ',typeof accept_files)
|
|
1806
1797
|
const accept_files_array = accept_files.split(',')
|
|
1807
|
-
this.logger.log(
|
|
1808
|
-
|
|
1809
|
-
accept_files_array,
|
|
1810
|
-
)
|
|
1811
|
-
this.logger.log(
|
|
1812
|
-
'[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept accept_files_array typeof: ',
|
|
1813
|
-
typeof accept_files_array,
|
|
1814
|
-
)
|
|
1798
|
+
this.logger.log('[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept accept_files_array ',accept_files_array)
|
|
1799
|
+
this.logger.log('[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept accept_files_array typeof: ',typeof accept_files_array)
|
|
1815
1800
|
|
|
1816
1801
|
accept_files_array.forEach((accept_file) => {
|
|
1817
|
-
this.logger.log(
|
|
1818
|
-
'[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept accept_file ',
|
|
1819
|
-
accept_file,
|
|
1820
|
-
)
|
|
1802
|
+
this.logger.log('[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept accept_file ',accept_file)
|
|
1821
1803
|
const accept_file_segment = accept_file.split('/')
|
|
1822
|
-
this.logger.log(
|
|
1823
|
-
'[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept accept_file_segment ',
|
|
1824
|
-
accept_file_segment,
|
|
1825
|
-
)
|
|
1804
|
+
this.logger.log('[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept accept_file_segment ',accept_file_segment)
|
|
1826
1805
|
if (accept_file_segment[1] === '*') {
|
|
1827
1806
|
if (draggedFileMimeType.startsWith(accept_file_segment[0])) {
|
|
1828
1807
|
isAcceptFile = true
|
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
[supportMode]="supportMode"
|
|
5
5
|
[archived_btn]="archived_btn"
|
|
6
6
|
[writeto_btn]="writeto_btn"
|
|
7
|
+
[sound_btn]="sound_btn"
|
|
8
|
+
(onSoundChange)="onSoundChange($event)"
|
|
7
9
|
(openContactsDirectory)=openContactsDirectory($event)
|
|
8
10
|
(openProfileInfo)=openProfileInfo($event)>
|
|
9
11
|
</app-ddp-header>
|
|
10
12
|
|
|
11
13
|
<app-option-header *ngIf="conversationType !=='active'"
|
|
12
|
-
|
|
14
|
+
[headerTitle]=headerTitle
|
|
13
15
|
(onBackButton)=onBackButtonFN($event)>
|
|
14
16
|
</app-option-header>
|
|
15
17
|
</ion-header>
|
|
@@ -72,6 +72,7 @@ export class ConversationListPage implements OnInit {
|
|
|
72
72
|
public supportMode: boolean
|
|
73
73
|
public writeto_btn: boolean
|
|
74
74
|
public archived_btn: boolean
|
|
75
|
+
public sound_btn: string
|
|
75
76
|
public convertMessage = convertMessage
|
|
76
77
|
private isShowMenuPage = false
|
|
77
78
|
private logger: LoggerService = LoggerInstance.getInstance()
|
|
@@ -127,6 +128,7 @@ export class ConversationListPage implements OnInit {
|
|
|
127
128
|
this.listenToLogoutEvent()
|
|
128
129
|
this.listenGoOnline()
|
|
129
130
|
this.listenGoOffline()
|
|
131
|
+
this.listenToStorageChange()
|
|
130
132
|
this.listenToSwPostMessage()
|
|
131
133
|
this.listenSupportConvIdHasChanged()
|
|
132
134
|
// this.listenDirectConvIdHasChanged();
|
|
@@ -211,6 +213,16 @@ export class ConversationListPage implements OnInit {
|
|
|
211
213
|
this.writeto_btn = false;
|
|
212
214
|
this.logger.log('[CONVS-LIST-PAGE] getAppConfigToHideDiplayBtns writeto_btn ', this.writeto_btn)
|
|
213
215
|
}
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
const sound_status = localStorage.getItem('dshbrd----sound')
|
|
219
|
+
if(sound_status && sound_status !== 'undefined'){
|
|
220
|
+
this.sound_btn = sound_status
|
|
221
|
+
} else {
|
|
222
|
+
this.sound_btn = 'enabled'
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
|
|
214
226
|
}
|
|
215
227
|
|
|
216
228
|
watchToConnectionStatus() {
|
|
@@ -336,6 +348,8 @@ export class ConversationListPage implements OnInit {
|
|
|
336
348
|
})
|
|
337
349
|
}
|
|
338
350
|
|
|
351
|
+
|
|
352
|
+
|
|
339
353
|
// ------------------------------------------------------------------ //
|
|
340
354
|
// Init convrsation handler
|
|
341
355
|
// ------------------------------------------------------------------ //
|
|
@@ -435,6 +449,10 @@ export class ConversationListPage implements OnInit {
|
|
|
435
449
|
})
|
|
436
450
|
}
|
|
437
451
|
|
|
452
|
+
listenToStorageChange(){
|
|
453
|
+
this.events.subscribe('storage:sound', value => this.sound_btn = value)
|
|
454
|
+
}
|
|
455
|
+
|
|
438
456
|
// ------------------------------------------------------------------
|
|
439
457
|
// SUBSCRIPTIONS
|
|
440
458
|
// ------------------------------------------------------------------
|
|
@@ -839,6 +857,13 @@ export class ConversationListPage implements OnInit {
|
|
|
839
857
|
}
|
|
840
858
|
}
|
|
841
859
|
|
|
860
|
+
onSoundChange(event: string){
|
|
861
|
+
if(event && event !== undefined){
|
|
862
|
+
localStorage.setItem('dshbrd----sound', event)
|
|
863
|
+
this.sound_btn = event
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
|
|
842
867
|
listenToCloseConvFromHeaderConversation() {
|
|
843
868
|
this.events.subscribe('conversation:closed', (convId) => {
|
|
844
869
|
this.logger.log('[CONVS-LIST-PAGE] hasclosedconversation convId', convId)
|
|
@@ -110,39 +110,25 @@ export class LoaderPreviewPage implements OnInit, AfterViewInit {
|
|
|
110
110
|
} else if (file.type.startsWith('image') && file.type.includes('svg')) {
|
|
111
111
|
// this.previewFiles(file)
|
|
112
112
|
|
|
113
|
-
this.logger.log(
|
|
114
|
-
'[LOADER-PREVIEW-PAGE] - readAsDataURL file TYPE',
|
|
115
|
-
file.type,
|
|
116
|
-
)
|
|
113
|
+
this.logger.log('[LOADER-PREVIEW-PAGE] - readAsDataURL file TYPE',file.type)
|
|
117
114
|
this.logger.log('[LOADER-PREVIEW-PAGE] - readAsDataURL file ', file)
|
|
118
115
|
const preview = document.querySelector('#img-preview') as HTMLImageElement
|
|
119
116
|
|
|
120
117
|
const reader = new FileReader()
|
|
121
118
|
const that = this
|
|
122
|
-
reader.addEventListener(
|
|
123
|
-
'load',
|
|
124
|
-
function () {
|
|
119
|
+
reader.addEventListener('load',function () {
|
|
125
120
|
// convert image file to base64 string
|
|
126
121
|
// const img = reader.result as string;
|
|
127
122
|
const img = reader.result.toString()
|
|
128
|
-
that.logger.log(
|
|
129
|
-
'FIREBASE-UPLOAD USE CASE SVG LoaderPreviewPage readAsDataURL img ',
|
|
130
|
-
img,
|
|
131
|
-
)
|
|
123
|
+
that.logger.log('FIREBASE-UPLOAD USE CASE SVG LoaderPreviewPage readAsDataURL img ',img)
|
|
132
124
|
|
|
133
125
|
// that.fileSelected = that.sanitizer.bypassSecurityTrustResourceUrl(img);
|
|
134
126
|
|
|
135
|
-
that.arrayFiles.push(
|
|
136
|
-
that.sanitizer.bypassSecurityTrustResourceUrl(img),
|
|
137
|
-
)
|
|
127
|
+
that.arrayFiles.push(that.sanitizer.bypassSecurityTrustResourceUrl(img))
|
|
138
128
|
if (!that.fileSelected) {
|
|
139
|
-
that.fileSelected = that.sanitizer.bypassSecurityTrustResourceUrl(
|
|
140
|
-
img,
|
|
141
|
-
)
|
|
129
|
+
that.fileSelected = that.sanitizer.bypassSecurityTrustResourceUrl(img)
|
|
142
130
|
}
|
|
143
|
-
|
|
144
|
-
false,
|
|
145
|
-
)
|
|
131
|
+
},false)
|
|
146
132
|
|
|
147
133
|
if (file) {
|
|
148
134
|
reader.readAsDataURL(file)
|
|
@@ -153,27 +139,13 @@ export class LoaderPreviewPage implements OnInit, AfterViewInit {
|
|
|
153
139
|
// ---------------------------------------------------------------------
|
|
154
140
|
// } else if (file.type.startsWith("application") || file.type.startsWith("video") || file.type.startsWith("audio") ) {
|
|
155
141
|
} else {
|
|
156
|
-
this.logger.log(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
)
|
|
160
|
-
this.logger.log(
|
|
161
|
-
'[LOADER-PREVIEW-PAGE] - readAsDataURL - USE CASE FILE - FILE TYPE',
|
|
162
|
-
file.type,
|
|
163
|
-
)
|
|
164
|
-
this.file_extension =
|
|
165
|
-
file.name.substring(file.name.lastIndexOf('.') + 1, file.name.length) ||
|
|
166
|
-
file.name
|
|
167
|
-
this.logger.log(
|
|
168
|
-
'[LOADER-PREVIEW-PAGE] - readAsDataURL - USE CASE FILE - FILE EXTENSION',
|
|
169
|
-
this.file_extension,
|
|
170
|
-
)
|
|
142
|
+
this.logger.log('[LOADER-PREVIEW-PAGE] - readAsDataURL - USE CASE FILE - FILE ',file)
|
|
143
|
+
this.logger.log('[LOADER-PREVIEW-PAGE] - readAsDataURL - USE CASE FILE - FILE TYPE',file.type)
|
|
144
|
+
this.file_extension = file.name.substring(file.name.lastIndexOf('.') + 1, file.name.length) || file.name
|
|
145
|
+
this.logger.log('[LOADER-PREVIEW-PAGE] - readAsDataURL - USE CASE FILE - FILE EXTENSION',this.file_extension)
|
|
171
146
|
this.file_name = file.name
|
|
172
147
|
this.file_name_ellipsis_the_middle = this.start_and_end(file.name)
|
|
173
|
-
this.logger.log(
|
|
174
|
-
'[LOADER-PREVIEW-PAGE] - readAsDataURL - USE CASE FILE - FILE NAME',
|
|
175
|
-
this.file_name,
|
|
176
|
-
)
|
|
148
|
+
this.logger.log( '[LOADER-PREVIEW-PAGE] - readAsDataURL - USE CASE FILE - FILE NAME',this.file_name)
|
|
177
149
|
// if (file.type) {
|
|
178
150
|
// const file_type_array = file.type.split('/');
|
|
179
151
|
// this.logger.log('FIREBASE-UPLOAD USE CASE FILE LoaderPreviewPage readAsDataURL file_type_array', file_type_array);
|
|
@@ -204,10 +176,7 @@ export class LoaderPreviewPage implements OnInit, AfterViewInit {
|
|
|
204
176
|
const reader = new FileReader()
|
|
205
177
|
reader.onloadend = (evt) => {
|
|
206
178
|
const img = reader.result.toString()
|
|
207
|
-
this.logger.log(
|
|
208
|
-
'[LOADER-PREVIEW-PAGE] - createFile file - FileReader success img',
|
|
209
|
-
img,
|
|
210
|
-
)
|
|
179
|
+
this.logger.log('[LOADER-PREVIEW-PAGE] - createFile file - FileReader success img',img)
|
|
211
180
|
this.arrayFiles.push(img)
|
|
212
181
|
if (!this.fileSelected) {
|
|
213
182
|
this.fileSelected = img
|
package/src/chat-config-pre.json
CHANGED
|
@@ -8,11 +8,10 @@ export abstract class ArchivedConversationsHandlerService {
|
|
|
8
8
|
|
|
9
9
|
// BehaviorSubject
|
|
10
10
|
abstract BSConversationDetail: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
11
|
-
// abstract readAllMessages: BehaviorSubject<string> = new BehaviorSubject<string>(null);
|
|
12
11
|
abstract archivedConversationAdded: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
13
12
|
abstract archivedConversationChanged: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
14
13
|
abstract archivedConversationRemoved: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
15
|
-
abstract
|
|
14
|
+
// abstract readAllMessages: BehaviorSubject<string> = new BehaviorSubject<string>(null);
|
|
16
15
|
|
|
17
16
|
// params
|
|
18
17
|
abstract archivedConversations: Array<ConversationModel> = [];
|
|
@@ -15,16 +15,14 @@ export abstract class ConversationsHandlerService {
|
|
|
15
15
|
|
|
16
16
|
// BehaviorSubject
|
|
17
17
|
abstract BSConversationDetail: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
18
|
-
// abstract readAllMessages: BehaviorSubject<string> = new BehaviorSubject<string>(null);
|
|
19
18
|
abstract conversationAdded: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
20
19
|
abstract conversationChanged: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
21
20
|
abstract conversationRemoved: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
22
|
-
abstract
|
|
23
|
-
|
|
21
|
+
// abstract readAllMessages: BehaviorSubject<string> = new BehaviorSubject<string>(null);
|
|
22
|
+
|
|
24
23
|
// params
|
|
25
24
|
abstract conversations: Array<ConversationModel> = [];
|
|
26
25
|
abstract uidConvSelected: string;
|
|
27
|
-
// abstract imageRepo: ImageRepoService;
|
|
28
26
|
|
|
29
27
|
// functions
|
|
30
28
|
abstract initialize(tenant: string, userId: string, translationMap: Map<string, string>): void;
|
|
@@ -28,11 +28,10 @@ export class FirebaseArchivedConversationsHandler extends ArchivedConversationsH
|
|
|
28
28
|
|
|
29
29
|
// BehaviorSubject
|
|
30
30
|
BSConversationDetail: BehaviorSubject<ConversationModel>;
|
|
31
|
+
archivedConversationAdded: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
32
|
+
archivedConversationChanged: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
33
|
+
archivedConversationRemoved: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
31
34
|
// readAllMessages: BehaviorSubject<string>;
|
|
32
|
-
archivedConversationAdded: BehaviorSubject<ConversationModel>;
|
|
33
|
-
archivedConversationChanged: BehaviorSubject<ConversationModel>;
|
|
34
|
-
archivedConversationRemoved: BehaviorSubject<ConversationModel>;
|
|
35
|
-
loadedConversationsStorage: BehaviorSubject<ConversationModel[]>;
|
|
36
35
|
|
|
37
36
|
// public params
|
|
38
37
|
archivedConversations: Array<ConversationModel> = [];
|
|
@@ -40,9 +40,8 @@ export class FirebaseAuthService extends MessagingAuthService {
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
// BehaviorSubject
|
|
43
|
-
BSAuthStateChanged: BehaviorSubject<any
|
|
44
|
-
BSSignOut: BehaviorSubject<any
|
|
45
|
-
// firebaseSignInWithCustomToken: BehaviorSubject<any>;
|
|
43
|
+
BSAuthStateChanged: BehaviorSubject<any> = new BehaviorSubject<any>(null);
|
|
44
|
+
BSSignOut: BehaviorSubject<any> = new BehaviorSubject<any>(null);
|
|
46
45
|
|
|
47
46
|
// public params
|
|
48
47
|
// private persistence: string;
|
|
@@ -32,10 +32,10 @@ import { messageType, isEmojii } from 'src/chat21-core/utils/utils-message';
|
|
|
32
32
|
export class FirebaseConversationHandler extends ConversationHandlerService {
|
|
33
33
|
|
|
34
34
|
// BehaviorSubject
|
|
35
|
-
messageAdded: BehaviorSubject<MessageModel
|
|
36
|
-
messageChanged: BehaviorSubject<MessageModel
|
|
37
|
-
messageRemoved: BehaviorSubject<string
|
|
38
|
-
|
|
35
|
+
messageAdded: BehaviorSubject<MessageModel> = new BehaviorSubject<MessageModel>(null);;
|
|
36
|
+
messageChanged: BehaviorSubject<MessageModel> = new BehaviorSubject<MessageModel>(null);;
|
|
37
|
+
messageRemoved: BehaviorSubject<string> = new BehaviorSubject<string>(null);
|
|
38
|
+
messageWait: BehaviorSubject<any> = new BehaviorSubject<string>(null);
|
|
39
39
|
|
|
40
40
|
// public variables
|
|
41
41
|
public attributes: any;
|
|
@@ -31,12 +31,11 @@ import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
|
31
31
|
export class FirebaseConversationsHandler extends ConversationsHandlerService {
|
|
32
32
|
|
|
33
33
|
// BehaviorSubject
|
|
34
|
-
BSConversationDetail: BehaviorSubject<ConversationModel
|
|
34
|
+
BSConversationDetail: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
35
|
+
conversationAdded: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
36
|
+
conversationChanged: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
37
|
+
conversationRemoved: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
35
38
|
// readAllMessages: BehaviorSubject<string>;
|
|
36
|
-
conversationAdded: BehaviorSubject<ConversationModel>;
|
|
37
|
-
conversationChanged: BehaviorSubject<ConversationModel>;
|
|
38
|
-
conversationRemoved: BehaviorSubject<ConversationModel>;
|
|
39
|
-
loadedConversationsStorage: BehaviorSubject<ConversationModel[]>;
|
|
40
39
|
|
|
41
40
|
// public params
|
|
42
41
|
conversations: Array<ConversationModel> = [];
|
|
@@ -31,11 +31,11 @@ import { LoggerInstance } from '../logger/loggerInstance';
|
|
|
31
31
|
export class FirebaseGroupsHandler extends GroupsHandlerService {
|
|
32
32
|
|
|
33
33
|
// BehaviorSubject
|
|
34
|
-
BSgroupDetail: BehaviorSubject<GroupModel
|
|
35
|
-
SgroupDetail: Subject<GroupModel
|
|
36
|
-
groupAdded: BehaviorSubject<GroupModel
|
|
37
|
-
groupChanged: BehaviorSubject<GroupModel
|
|
38
|
-
groupRemoved: BehaviorSubject<GroupModel
|
|
34
|
+
BSgroupDetail: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
35
|
+
SgroupDetail: Subject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
36
|
+
groupAdded: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
37
|
+
groupChanged: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
38
|
+
groupRemoved: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
39
39
|
|
|
40
40
|
// public params
|
|
41
41
|
conversations: Array<ConversationModel> = [];
|
|
@@ -23,9 +23,8 @@ import { LoggerInstance } from '../logger/loggerInstance';
|
|
|
23
23
|
export class FirebasePresenceService extends PresenceService {
|
|
24
24
|
|
|
25
25
|
// BehaviorSubject
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
BSLastOnline: BehaviorSubject<any>;
|
|
26
|
+
BSIsOnline: BehaviorSubject<any> = new BehaviorSubject<any>(null);
|
|
27
|
+
BSLastOnline: BehaviorSubject<any> = new BehaviorSubject<any>(null);
|
|
29
28
|
|
|
30
29
|
// public tenant: string;
|
|
31
30
|
|
|
@@ -32,8 +32,8 @@ export class TypingModel {
|
|
|
32
32
|
export class FirebaseTypingService extends TypingService {
|
|
33
33
|
|
|
34
34
|
// BehaviorSubject
|
|
35
|
-
BSIsTyping: BehaviorSubject<any
|
|
36
|
-
BSSetTyping: BehaviorSubject<any
|
|
35
|
+
BSIsTyping: BehaviorSubject<any> = new BehaviorSubject<any>(null);
|
|
36
|
+
BSSetTyping: BehaviorSubject<any> = new BehaviorSubject<any>(null);
|
|
37
37
|
|
|
38
38
|
// public params
|
|
39
39
|
// public tenant: string;
|
|
@@ -24,7 +24,7 @@ import { UploadModel } from '../../models/upload';
|
|
|
24
24
|
export class FirebaseUploadService extends UploadService {
|
|
25
25
|
|
|
26
26
|
// BehaviorSubject
|
|
27
|
-
BSStateUpload: BehaviorSubject<any
|
|
27
|
+
BSStateUpload: BehaviorSubject<any> = new BehaviorSubject<any>(null);
|
|
28
28
|
|
|
29
29
|
//private
|
|
30
30
|
private url: string;
|
|
@@ -22,13 +22,10 @@ export class MQTTArchivedConversationsHandler extends ArchivedConversationsHandl
|
|
|
22
22
|
|
|
23
23
|
// BehaviorSubject
|
|
24
24
|
BSConversationDetail: BehaviorSubject<ConversationModel>;
|
|
25
|
+
archivedConversationAdded: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
26
|
+
archivedConversationChanged: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
27
|
+
archivedConversationRemoved: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
25
28
|
// readAllMessages: BehaviorSubject<string>;
|
|
26
|
-
archivedConversationAdded: BehaviorSubject<ConversationModel>;
|
|
27
|
-
archivedConversationChanged: BehaviorSubject<ConversationModel>;
|
|
28
|
-
archivedConversationRemoved: BehaviorSubject<ConversationModel>;
|
|
29
|
-
loadedConversationsStorage: BehaviorSubject<ConversationModel[]>;
|
|
30
|
-
BSConversations: BehaviorSubject<ConversationModel[]>
|
|
31
|
-
// imageRepo: ImageRepoService;
|
|
32
29
|
|
|
33
30
|
// public variables
|
|
34
31
|
archivedConversations: Array<ConversationModel> = [];
|
|
@@ -25,11 +25,11 @@ import { AppStorageService } from '../abstract/app-storage.service';
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
@Injectable({ providedIn: 'root' })
|
|
28
|
-
|
|
29
28
|
export class MQTTAuthService extends MessagingAuthService {
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
// BehaviorSubject
|
|
31
|
+
BSAuthStateChanged: BehaviorSubject<any> = new BehaviorSubject<any>(null);
|
|
32
|
+
BSSignOut: BehaviorSubject<any> = new BehaviorSubject<any>(null);
|
|
33
33
|
|
|
34
34
|
SERVER_BASE_URL: string;
|
|
35
35
|
|
|
@@ -30,10 +30,10 @@ import { messageType } from '../../utils/utils-message';
|
|
|
30
30
|
export class MQTTConversationHandler extends ConversationHandlerService {
|
|
31
31
|
|
|
32
32
|
// BehaviorSubject
|
|
33
|
-
messageAdded: BehaviorSubject<MessageModel
|
|
34
|
-
messageChanged: BehaviorSubject<MessageModel
|
|
35
|
-
messageRemoved: BehaviorSubject<string
|
|
36
|
-
|
|
33
|
+
messageAdded: BehaviorSubject<MessageModel> = new BehaviorSubject<MessageModel>(null);;
|
|
34
|
+
messageChanged: BehaviorSubject<MessageModel> = new BehaviorSubject<MessageModel>(null);;
|
|
35
|
+
messageRemoved: BehaviorSubject<string> = new BehaviorSubject<string>(null);
|
|
36
|
+
messageWait: BehaviorSubject<any> = new BehaviorSubject<string>(null);
|
|
37
37
|
|
|
38
38
|
// public variables
|
|
39
39
|
public attributes: any;
|
|
@@ -23,15 +23,20 @@ import { THIS_EXPR } from '@angular/compiler/src/output/output_ast';
|
|
|
23
23
|
@Injectable({ providedIn: 'root' })
|
|
24
24
|
export class MQTTConversationsHandler extends ConversationsHandlerService {
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
// BehaviorSubject
|
|
27
|
+
BSConversationDetail: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);;
|
|
28
|
+
conversationAdded: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);;
|
|
29
|
+
conversationChanged: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);;
|
|
30
|
+
conversationRemoved: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);;
|
|
31
31
|
BSConversations: BehaviorSubject<ConversationModel[]>
|
|
32
|
+
// readAllMessages: BehaviorSubject<string>;
|
|
33
|
+
|
|
34
|
+
// public variables
|
|
32
35
|
conversations: Array<ConversationModel> = [];
|
|
33
36
|
uidConvSelected: string;
|
|
34
37
|
tenant: string;
|
|
38
|
+
|
|
39
|
+
// private variables
|
|
35
40
|
private loggedUserId: string;
|
|
36
41
|
private translationMap: Map<string, string>;
|
|
37
42
|
private isConversationClosingMap: Map<string, boolean>;
|
|
@@ -14,11 +14,11 @@ import { avatarPlaceholder, getColorBck } from 'src/chat21-core/utils/utils-user
|
|
|
14
14
|
export class MQTTGroupsHandler extends GroupsHandlerService {
|
|
15
15
|
|
|
16
16
|
// BehaviorSubject
|
|
17
|
-
BSgroupDetail: BehaviorSubject<GroupModel
|
|
18
|
-
SgroupDetail: Subject<GroupModel
|
|
19
|
-
groupAdded: BehaviorSubject<GroupModel
|
|
20
|
-
groupChanged: BehaviorSubject<GroupModel
|
|
21
|
-
groupRemoved: BehaviorSubject<GroupModel
|
|
17
|
+
BSgroupDetail: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
18
|
+
SgroupDetail: Subject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
19
|
+
groupAdded: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
20
|
+
groupChanged: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
21
|
+
groupRemoved: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
22
22
|
|
|
23
23
|
// private params
|
|
24
24
|
private tenant: string;
|
|
@@ -21,8 +21,9 @@ import { environment } from '../../../environments/environment';
|
|
|
21
21
|
})
|
|
22
22
|
export class MQTTPresenceService extends PresenceService {
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
// BehaviorSubject
|
|
25
|
+
BSIsOnline: BehaviorSubject<any> = new BehaviorSubject<any>(null);
|
|
26
|
+
BSLastOnline: BehaviorSubject<any> = new BehaviorSubject<any>(null);
|
|
26
27
|
|
|
27
28
|
// private params
|
|
28
29
|
private tenant: string;
|
|
@@ -14,6 +14,7 @@ import { LoggerInstance } from '../logger/loggerInstance';
|
|
|
14
14
|
import { setLastDate } from '../../utils/utils';
|
|
15
15
|
import { environment } from '../../../environments/environment';
|
|
16
16
|
import { TypingService } from '../abstract/typing.service';
|
|
17
|
+
import { BehaviorSubject } from 'rxjs';
|
|
17
18
|
|
|
18
19
|
export class TypingModel {
|
|
19
20
|
|
|
@@ -31,6 +32,10 @@ export class TypingModel {
|
|
|
31
32
|
|
|
32
33
|
export class MQTTTypingService extends TypingService {
|
|
33
34
|
|
|
35
|
+
// BehaviorSubject
|
|
36
|
+
BSIsTyping: BehaviorSubject<any> = new BehaviorSubject<any>(null);
|
|
37
|
+
BSSetTyping: BehaviorSubject<any> = new BehaviorSubject<any>(null);
|
|
38
|
+
|
|
34
39
|
// private params
|
|
35
40
|
private tenant: string;
|
|
36
41
|
private urlNodeTypings: string;
|
|
@@ -11,16 +11,9 @@ import { LoggerInstance } from '../logger/loggerInstance';
|
|
|
11
11
|
@Injectable()
|
|
12
12
|
export class NativeUploadService extends UploadService {
|
|
13
13
|
|
|
14
|
+
BSStateUpload: BehaviorSubject<any> = new BehaviorSubject<any>(null)
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
BSStateUpload: BehaviorSubject<any>;
|
|
17
|
-
|
|
18
|
-
// private persistence: string;
|
|
19
|
-
SERVER_BASE_URL: string;
|
|
20
|
-
|
|
21
|
-
public token: any;
|
|
22
|
-
public tiledeskToken: any;
|
|
23
|
-
|
|
16
|
+
private tiledeskToken: string;
|
|
24
17
|
private URL_TILEDESK_IMAGES: string;
|
|
25
18
|
private URL_TILEDESK_FILE: string;
|
|
26
19
|
private logger: LoggerService = LoggerInstance.getInstance()
|
|
@@ -14,7 +14,6 @@ import { LoggerInstance } from '../logger/loggerInstance';
|
|
|
14
14
|
})
|
|
15
15
|
export class TiledeskAuthService {
|
|
16
16
|
|
|
17
|
-
// public isOnline$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(null);
|
|
18
17
|
// private persistence: string;
|
|
19
18
|
public SERVER_BASE_URL: string;
|
|
20
19
|
|