@chat21/chat21-ionic 3.0.65-rc2 → 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 +22 -0
- package/deploy_amazon_prod.sh +3 -3
- package/package.json +3 -3
- package/src/app/app.component.ts +65 -67
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +0 -10
- package/src/app/chatlib/conversation-detail/message/return-receipt/return-receipt.component.html +49 -4
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +1 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +18 -30
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +1 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +2 -0
- 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/project-item/project-item.component.ts +5 -0
- package/src/app/components/sidebar/sidebar.component.ts +41 -71
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +12 -23
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +3 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +88 -136
- package/src/app/directives/truncate.pipe.ts +0 -1
- package/src/app/pages/authentication/login/login.page.ts +0 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +47 -72
- package/src/app/pages/conversations-list/conversations-list.page.html +3 -1
- package/src/app/pages/conversations-list/conversations-list.page.ts +50 -5
- package/src/app/pages/loader-preview/loader-preview.page.ts +12 -43
- package/src/assets/i18n/ar.json +266 -0
- package/src/assets/i18n/uk.json +266 -0
- 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 +29 -25
- 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 +66 -60
- 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/src/chat21-core/utils/constants.ts +1 -1
- package/src/global.scss +2 -2
- package/deploy_prod.sh +0 -14
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
2
1
|
import { Injectable } from '@angular/core';
|
|
3
2
|
import { BehaviorSubject } from 'rxjs';
|
|
4
3
|
|
|
@@ -13,17 +12,11 @@ import 'firebase/storage';
|
|
|
13
12
|
// models
|
|
14
13
|
import { ConversationModel } from '../../models/conversation';
|
|
15
14
|
|
|
16
|
-
// services
|
|
17
|
-
import { ConversationsHandlerService } from '../abstract/conversations-handler.service';
|
|
18
|
-
|
|
19
|
-
|
|
20
15
|
// utils
|
|
21
16
|
import { avatarPlaceholder, getColorBck } from '../../utils/utils-user';
|
|
22
17
|
import { compareValues, getFromNow, searchIndexInArrayForUid, archivedConversationsPathForUserId, isGroup } from '../../utils/utils';
|
|
23
|
-
import { ImageRepoService } from '../abstract/image-repo.service';
|
|
24
|
-
import { FirebaseImageRepoService } from './firebase-image-repo';
|
|
25
18
|
import { ArchivedConversationsHandlerService } from '../abstract/archivedconversations-handler.service';
|
|
26
|
-
import {
|
|
19
|
+
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
27
20
|
import { LoggerInstance } from '../logger/loggerInstance';
|
|
28
21
|
|
|
29
22
|
|
|
@@ -35,11 +28,10 @@ export class FirebaseArchivedConversationsHandler extends ArchivedConversationsH
|
|
|
35
28
|
|
|
36
29
|
// BehaviorSubject
|
|
37
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);
|
|
38
34
|
// readAllMessages: BehaviorSubject<string>;
|
|
39
|
-
archivedConversationAdded: BehaviorSubject<ConversationModel>;
|
|
40
|
-
archivedConversationChanged: BehaviorSubject<ConversationModel>;
|
|
41
|
-
archivedConversationRemoved: BehaviorSubject<ConversationModel>;
|
|
42
|
-
loadedConversationsStorage: BehaviorSubject<ConversationModel[]>;
|
|
43
35
|
|
|
44
36
|
// public params
|
|
45
37
|
archivedConversations: Array<ConversationModel> = [];
|
|
@@ -54,6 +46,8 @@ export class FirebaseArchivedConversationsHandler extends ArchivedConversationsH
|
|
|
54
46
|
private logger: LoggerService = LoggerInstance.getInstance()
|
|
55
47
|
private ref: firebase.database.Query;
|
|
56
48
|
|
|
49
|
+
private subscribe: any;
|
|
50
|
+
|
|
57
51
|
constructor(
|
|
58
52
|
//public databaseProvider: DatabaseProvider
|
|
59
53
|
) {
|
|
@@ -183,23 +177,33 @@ export class FirebaseArchivedConversationsHandler extends ArchivedConversationsH
|
|
|
183
177
|
// this.BSConversationDetail.next(conversationSelected);
|
|
184
178
|
} else {
|
|
185
179
|
// const urlNodeFirebase = '/apps/' + this.tenant + '/users/' + this.loggedUserId + '/archived_conversations/' + conversationId;
|
|
186
|
-
const urlNodeFirebase = archivedConversationsPathForUserId(this.tenant, this.loggedUserId) + '/' + conversationId;
|
|
180
|
+
const urlNodeFirebase = archivedConversationsPathForUserId(this.tenant, this.loggedUserId) // + '/' + conversationId;
|
|
187
181
|
this.logger.log('[FIREBASEArchivedConversationsHandlerSERVICE] urlNodeFirebase conversationDetail *****', urlNodeFirebase)
|
|
188
182
|
const firebaseMessages = firebase.database().ref(urlNodeFirebase);
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
183
|
+
if(this.subscribe){
|
|
184
|
+
this.logger.log('[FIREBASEArchivedConversationsHandlerSERVICE] getConversationDetail ALREADY SUBSCRIBED')
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
this.subscribe = firebaseMessages.on('value', (snap) => {
|
|
189
|
+
const childSnapshot = snap.child('/'+conversationId)
|
|
190
|
+
if(!childSnapshot.exists()){
|
|
191
|
+
this.logger.log('[FIREBASEArchivedConversationsHandlerSERVICE] getConversationDetail archived conversation NOT exist', conversationId)
|
|
192
|
+
callback(null)
|
|
193
|
+
} else {
|
|
194
|
+
const childData: ConversationModel = childSnapshot.val();
|
|
195
|
+
this.logger.log('[FIREBASEArchivedConversationsHandlerSERVICE] getConversationDetail archived conversation exist', childData)
|
|
196
|
+
if (childSnapshot && childSnapshot.key && childData) {
|
|
197
|
+
childData.uid = childSnapshot.key;
|
|
198
|
+
const conversation = this.completeConversation(childData);
|
|
199
|
+
if (conversation) {
|
|
200
|
+
callback(conversation)
|
|
201
|
+
} else {
|
|
202
|
+
callback(null)
|
|
203
|
+
}
|
|
200
204
|
}
|
|
205
|
+
// this.BSConversationDetail.next(conversation);
|
|
201
206
|
}
|
|
202
|
-
// this.BSConversationDetail.next(conversation);
|
|
203
207
|
});
|
|
204
208
|
}
|
|
205
209
|
}
|
|
@@ -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> = [];
|
|
@@ -53,6 +52,7 @@ export class FirebaseConversationsHandler extends ConversationsHandlerService {
|
|
|
53
52
|
private BASE_URL: string;
|
|
54
53
|
// private audio: any;
|
|
55
54
|
// private setTimeoutSound: any;
|
|
55
|
+
private subscribe: any
|
|
56
56
|
|
|
57
57
|
constructor(
|
|
58
58
|
//public databaseProvider: DatabaseProvider
|
|
@@ -121,62 +121,47 @@ export class FirebaseConversationsHandler extends ConversationsHandlerService {
|
|
|
121
121
|
this.ref = firebase.database().ref(urlNodeFirebase).orderByChild('timestamp').limitToLast(200);
|
|
122
122
|
|
|
123
123
|
// this.ref.once('value').then(snapshot => {
|
|
124
|
-
// snapshot.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
//
|
|
128
|
-
//
|
|
129
|
-
//
|
|
124
|
+
// if(snapshot && snapshot.val()){
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
// snapshot.forEach(childSnapshot => {
|
|
128
|
+
// // const childData: ConversationModel = childSnapshot.val();
|
|
129
|
+
// // childData.uid = childSnapshot.key
|
|
130
|
+
// // that.added(childData)
|
|
131
|
+
// // lastConversationTimestamp = childData.timestamp
|
|
132
|
+
// that.added(childSnapshot)
|
|
133
|
+
// });
|
|
134
|
+
// this.logger.debug('[FIREBASEConversationsHandlerSERVICE] # of remote conversations on Firebase:', Object.keys(snapshot.val()).length)
|
|
135
|
+
// this.logger.debug('[FIREBASEConversationsHandlerSERVICE] # of conversation added:', that.conversations)
|
|
136
|
+
// callback(that.conversations)
|
|
137
|
+
// return lastConversationTimestamp
|
|
138
|
+
// }
|
|
130
139
|
|
|
131
|
-
//
|
|
132
|
-
//
|
|
133
|
-
//
|
|
134
|
-
// console.log('timestampppppp',timestamp)
|
|
135
|
-
// this.ref.startAt(timestamp).on('child_changed', (childSnapshot) => {
|
|
136
|
-
// const conv: ConversationModel = childSnapshot.val();
|
|
137
|
-
// conv.uid = childSnapshot.key
|
|
138
|
-
// that.changed(conv);
|
|
140
|
+
// }).then(()=> {
|
|
141
|
+
// this.ref.on('child_changed', (childSnapshot) => {
|
|
142
|
+
// that.changed(childSnapshot);
|
|
139
143
|
// });
|
|
140
|
-
// this.ref.
|
|
141
|
-
//
|
|
142
|
-
// conv.uid = childSnapshot.key
|
|
143
|
-
// that.removed(conv);
|
|
144
|
+
// this.ref.on('child_removed', (childSnapshot) => {
|
|
145
|
+
// that.removed(childSnapshot);
|
|
144
146
|
// });
|
|
145
|
-
// this.ref.
|
|
146
|
-
//
|
|
147
|
-
// console.log('addedddd', conv)
|
|
148
|
-
// conv.uid = childSnapshot.key
|
|
149
|
-
// that.added(conv);
|
|
147
|
+
// this.ref.on('child_added', (childSnapshot) => {
|
|
148
|
+
// that.added(childSnapshot);
|
|
150
149
|
// });
|
|
151
|
-
// });
|
|
152
|
-
// this.ref.on('value', (snaps) => {
|
|
153
|
-
// if(snaps){
|
|
154
|
-
// console.log('convvvvvv', snaps.val(), snaps.val().length)
|
|
155
|
-
// for(let item=0; item<snaps.val().length; item++){
|
|
156
|
-
// that.added(snaps.val()[item])
|
|
157
|
-
// }
|
|
158
|
-
// callback(this.conversations)
|
|
159
|
-
// }
|
|
160
150
|
// })
|
|
161
|
-
|
|
151
|
+
|
|
152
|
+
this.ref.on('child_changed', (childSnapshot) => {
|
|
162
153
|
that.changed(childSnapshot);
|
|
163
154
|
});
|
|
164
|
-
this.ref.
|
|
155
|
+
this.ref.on('child_removed', (childSnapshot) => {
|
|
165
156
|
that.removed(childSnapshot);
|
|
166
157
|
});
|
|
167
|
-
this.ref.
|
|
158
|
+
this.ref.on('child_added', (childSnapshot) => {
|
|
168
159
|
that.added(childSnapshot);
|
|
169
160
|
});
|
|
170
161
|
|
|
171
|
-
|
|
172
|
-
|
|
173
162
|
setTimeout(() => {
|
|
174
163
|
callback()
|
|
175
164
|
}, 2000);
|
|
176
|
-
// SET AUDIO
|
|
177
|
-
// this.audio = new Audio();
|
|
178
|
-
// this.audio.src = URL_SOUND;
|
|
179
|
-
// this.audio.load();
|
|
180
165
|
}
|
|
181
166
|
|
|
182
167
|
/**
|
|
@@ -316,24 +301,44 @@ export class FirebaseConversationsHandler extends ConversationsHandlerService {
|
|
|
316
301
|
} else {
|
|
317
302
|
this.logger.log('[FIREBASEConversationsHandlerSERVICE] getConversationDetail ***** ELSE')
|
|
318
303
|
// const urlNodeFirebase = '/apps/' + this.tenant + '/users/' + this.loggedUserId + '/conversations/' + conversationId;
|
|
319
|
-
const urlNodeFirebase = conversationsPathForUserId(this.tenant, this.loggedUserId) + '/' + conversationId;
|
|
304
|
+
const urlNodeFirebase = conversationsPathForUserId(this.tenant, this.loggedUserId) // + '/' + conversationId;
|
|
320
305
|
this.logger.log('[FIREBASEConversationsHandlerSERVICE] conversationDetail urlNodeFirebase *****', urlNodeFirebase)
|
|
321
306
|
const firebaseMessages = firebase.database().ref(urlNodeFirebase);
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
// && childData.uid
|
|
327
|
-
if (childSnapshot && childSnapshot.key && childData) {
|
|
328
|
-
childData.uid = childSnapshot.key;
|
|
329
|
-
const conversation = this.completeConversation(childData);
|
|
330
|
-
if (conversation) {
|
|
331
|
-
callback(conversation)
|
|
332
|
-
} else {
|
|
333
|
-
callback(null)
|
|
334
|
-
}
|
|
307
|
+
if(this.subscribe){
|
|
308
|
+
this.logger.log('[FIREBASEConversationsHandlerSERVICE] getConversationDetail ALREADY SUBSCRIBED')
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
335
311
|
|
|
312
|
+
this.subscribe = firebaseMessages.on('value', (snap) => {
|
|
313
|
+
const childSnapshot = snap.child('/'+conversationId)
|
|
314
|
+
if(!childSnapshot.exists()){
|
|
315
|
+
this.logger.log('[FIREBASEConversationsHandlerSERVICE] getConversationDetail conversation NOT exist', conversationId)
|
|
316
|
+
callback(null)
|
|
317
|
+
} else {
|
|
318
|
+
const childData: ConversationModel = childSnapshot.val();
|
|
319
|
+
this.logger.debug('[FIREBASEConversationsHandlerSERVICE] getConversationDetail conversation exist', childSnapshot.val(), childSnapshot.key)
|
|
320
|
+
if (childSnapshot && childSnapshot.key && childData) {
|
|
321
|
+
childData.uid = childSnapshot.key;
|
|
322
|
+
const conversation = this.completeConversation(childData);
|
|
323
|
+
if (conversation) {
|
|
324
|
+
callback(conversation)
|
|
325
|
+
} else {
|
|
326
|
+
callback(null)
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
// this.BSConversationDetail.next(conversation);
|
|
336
330
|
}
|
|
331
|
+
// const childData: ConversationModel = childSnapshot.val();
|
|
332
|
+
// this.logger.debug('[FIREBASEConversationsHandlerSERVICE] conversationDetail childSnapshot *****', childSnapshot.val())
|
|
333
|
+
// if (childSnapshot && childSnapshot.key && childData) {
|
|
334
|
+
// childData.uid = childSnapshot.key;
|
|
335
|
+
// const conversation = this.completeConversation(childData);
|
|
336
|
+
// if (conversation) {
|
|
337
|
+
// callback(conversation)
|
|
338
|
+
// } else {
|
|
339
|
+
// callback(null)
|
|
340
|
+
// }
|
|
341
|
+
// }
|
|
337
342
|
// this.BSConversationDetail.next(conversation);
|
|
338
343
|
});
|
|
339
344
|
}
|
|
@@ -656,3 +661,4 @@ export class FirebaseConversationsHandler extends ConversationsHandlerService {
|
|
|
656
661
|
// END PRIVATE FUNCTIONS
|
|
657
662
|
// ---------------------------------------------------------- //
|
|
658
663
|
}
|
|
664
|
+
|
|
@@ -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
|
|
|
@@ -110,7 +110,7 @@ export const LogLevel = {
|
|
|
110
110
|
'DEBUG': 3
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
export const tranlatedLanguage = ['it', 'en', 'de', 'es', 'pt', 'fr', 'ru', 'tr', 'sr']
|
|
113
|
+
export const tranlatedLanguage = ['it', 'en', 'de', 'es', 'pt', 'fr', 'ru', 'tr', 'sr', 'ar', 'uk']
|
|
114
114
|
|
|
115
115
|
|
|
116
116
|
|
package/src/global.scss
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
@import "~@ionic/angular/css/text-transformation.css";
|
|
26
26
|
@import "~@ionic/angular/css/flex-utils.css";
|
|
27
27
|
|
|
28
|
-
@import
|
|
28
|
+
@import 'material-icons/iconfont/material-icons.css';
|
|
29
29
|
@import "variables.scss";
|
|
30
30
|
|
|
31
31
|
// http://ionicframework.com/docs/v2/theming/
|
|
@@ -974,7 +974,7 @@ ul.dropdown-menu > li > a {
|
|
|
974
974
|
|
|
975
975
|
.sidebar .nav i {
|
|
976
976
|
// font-size: 20px;
|
|
977
|
-
float: left;
|
|
977
|
+
// float: left;
|
|
978
978
|
// margin-right: 15px;
|
|
979
979
|
// line-height: 30px;
|
|
980
980
|
width: 60px;
|
package/deploy_prod.sh
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# npm version patch
|
|
2
|
-
version=`node -e 'console.log(require("./package.json").version)'`
|
|
3
|
-
echo "version $version"
|
|
4
|
-
|
|
5
|
-
URL_VER=${version//[.]//}
|
|
6
|
-
echo 'URL_VER: ---->'$URL_VER
|
|
7
|
-
|
|
8
|
-
if [ "$version" != "" ]; then
|
|
9
|
-
git tag -a "$version" -m "`git log -1 --format=%s`"
|
|
10
|
-
echo "Created a new tag, $version"
|
|
11
|
-
git push remoteTiledesk--tags
|
|
12
|
-
npm publish
|
|
13
|
-
fi
|
|
14
|
-
|