@chat21/chat21-ionic 3.0.60-rc6 → 3.0.61-rc2
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 +44 -0
- package/LICENSE +661 -21
- package/README.md +2 -0
- package/angular.json +2 -0
- package/env.sample +3 -1
- package/package.json +5 -1
- package/src/app/app.component.html +11 -2
- package/src/app/app.component.scss +13 -1
- package/src/app/app.component.ts +70 -23
- package/src/app/app.module.ts +3 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +62 -36
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +2 -2
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +64 -14
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +2 -3
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +5 -2
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -0
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +2 -2
- package/src/app/components/conversation-info/info-content/info-content.component.html +2 -2
- package/src/app/components/ddp-header/ddp-header.component.html +14 -7
- package/src/app/components/ddp-header/ddp-header.component.scss +4 -0
- package/src/app/components/ddp-header/ddp-header.component.ts +21 -2
- package/src/app/components/project-item/project-item.component.html +37 -14
- package/src/app/components/project-item/project-item.component.scss +35 -15
- package/src/app/components/project-item/project-item.component.ts +17 -4
- package/src/app/components/sidebar/sidebar.component.html +210 -0
- package/src/app/components/sidebar/sidebar.component.scss +11 -0
- package/src/app/components/sidebar/sidebar.component.spec.ts +24 -0
- package/src/app/components/sidebar/sidebar.component.ts +400 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +102 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +310 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.spec.ts +24 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +423 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.html +34 -45
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +154 -84
- package/src/app/pages/conversations-list/conversations-list.page.html +11 -7
- package/src/app/pages/conversations-list/conversations-list.page.ts +34 -9
- package/src/app/pages/profile-info/profile-info.page.html +2 -2
- package/src/app/pages/profile-info/profile-info.page.ts +23 -21
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +3 -3
- package/src/app/shared/shared.module.ts +16 -2
- package/src/assets/i18n/de.json +226 -0
- package/src/assets/i18n/en.json +25 -4
- package/src/assets/i18n/es.json +26 -5
- package/src/assets/i18n/fr.json +226 -0
- package/src/assets/i18n/it.json +26 -5
- package/src/assets/i18n/pt.json +226 -0
- package/src/assets/i18n/ru.json +226 -0
- package/src/assets/i18n/tr.json +227 -0
- package/src/assets/images/language_flag/ar.png +0 -0
- package/src/assets/images/language_flag/bg.png +0 -0
- package/src/assets/images/language_flag/ca.png +0 -0
- package/src/assets/images/language_flag/cs.png +0 -0
- package/src/assets/images/language_flag/da.png +0 -0
- package/src/assets/images/language_flag/de.png +0 -0
- package/src/assets/images/language_flag/el.png +0 -0
- package/src/assets/images/language_flag/en.png +0 -0
- package/src/assets/images/language_flag/es.png +0 -0
- package/src/assets/images/language_flag/fa.png +0 -0
- package/src/assets/images/language_flag/fi.png +0 -0
- package/src/assets/images/language_flag/fr.png +0 -0
- package/src/assets/images/language_flag/he.png +0 -0
- package/src/assets/images/language_flag/hi.png +0 -0
- package/src/assets/images/language_flag/hu.png +0 -0
- package/src/assets/images/language_flag/id.png +0 -0
- package/src/assets/images/language_flag/it.png +0 -0
- package/src/assets/images/language_flag/ja.png +0 -0
- package/src/assets/images/language_flag/ko.png +0 -0
- package/src/assets/images/language_flag/ml-IN.png +0 -0
- package/src/assets/images/language_flag/ne-NP.png +0 -0
- package/src/assets/images/language_flag/nl.png +0 -0
- package/src/assets/images/language_flag/no.png +0 -0
- package/src/assets/images/language_flag/pl.png +0 -0
- package/src/assets/images/language_flag/pt-BR.png +0 -0
- package/src/assets/images/language_flag/pt.png +0 -0
- package/src/assets/images/language_flag/ro.png +0 -0
- package/src/assets/images/language_flag/ru.png +0 -0
- package/src/assets/images/language_flag/sk.png +0 -0
- package/src/assets/images/language_flag/sl.png +0 -0
- package/src/assets/images/language_flag/sv-SE.png +0 -0
- package/src/assets/images/language_flag/ta.png +0 -0
- package/src/assets/images/language_flag/th.png +0 -0
- package/src/assets/images/language_flag/tr.png +0 -0
- package/src/assets/images/language_flag/uk.png +0 -0
- package/src/assets/images/language_flag/vi.png +0 -0
- package/src/assets/images/language_flag/zh-CN.png +0 -0
- package/src/assets/images/language_flag/zh-TW.png +0 -0
- package/src/assets/images/no_image_user.png +0 -0
- package/src/assets/js/chat21client.js +16 -3
- package/src/assets/tiledesk-solo-logo.png +0 -0
- package/src/chat-config-pre-test.json +3 -0
- package/src/chat-config-template.json +4 -1
- package/src/chat-config.json +4 -1
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +54 -43
- package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +23 -0
- package/src/chat21-core/providers/mqtt/mqtt-archivedconversations-handler.ts +1 -1
- package/src/chat21-core/utils/constants.ts +2 -0
- package/src/chat21-core/utils/utils.ts +12 -1
- package/src/global.scss +451 -3
- package/src/index.html +7 -0
|
@@ -105,14 +105,16 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
105
105
|
MESSAGE_TYPE_OTHERS = MESSAGE_TYPE_OTHERS;
|
|
106
106
|
|
|
107
107
|
arrowkeyLocation = -1;
|
|
108
|
-
|
|
108
|
+
public_Key: any;
|
|
109
|
+
areVisibleCAR: boolean
|
|
109
110
|
//SOUND
|
|
110
111
|
setTimeoutSound: any;
|
|
111
112
|
audio: any
|
|
112
113
|
isOpenInfoConversation: boolean;
|
|
113
114
|
USER_HAS_OPENED_CLOSE_INFO_CONV: boolean = false
|
|
114
115
|
isHovering: boolean = false;
|
|
115
|
-
|
|
116
|
+
conversation_count: number;
|
|
117
|
+
showSpinner: boolean = true
|
|
116
118
|
dropEvent: any
|
|
117
119
|
isMine = isMine;
|
|
118
120
|
isInfo = isInfo;
|
|
@@ -206,11 +208,75 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
206
208
|
|
|
207
209
|
// }
|
|
208
210
|
// });
|
|
211
|
+
this.getConversations();
|
|
209
212
|
this.watchToConnectionStatus();
|
|
213
|
+
this.getOSCODE()
|
|
210
214
|
}
|
|
211
215
|
|
|
212
|
-
|
|
216
|
+
getConversations() {
|
|
217
|
+
this.conversationsHandlerService.conversationAdded.subscribe((conv) => {
|
|
218
|
+
// console.log('[CONVS-DETAIL] - conv ', conv)
|
|
219
|
+
const conversations = this.conversationsHandlerService.conversations;
|
|
220
|
+
// console.log('[CONVS-DETAIL] conversations', conversations);
|
|
221
|
+
this.conversation_count = conversations.length;
|
|
222
|
+
this.logger.log('[CONVS-DETAIL] conversation_count', this.conversation_count);
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
this.conversationsHandlerService.conversationChanged.subscribe((conv) => {
|
|
226
|
+
// console.log('[CONVS-DETAIL] - conv ', conv)
|
|
227
|
+
const conversations = this.conversationsHandlerService.conversations;
|
|
228
|
+
// console.log('[CONVS-DETAIL] conversations', conversations);
|
|
229
|
+
this.conversation_count = conversations.length;
|
|
230
|
+
this.logger.log('[CONVS-DETAIL] conversation_count', this.conversation_count);
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
this.conversationsHandlerService.conversationRemoved.subscribe((conv) => {
|
|
234
|
+
// console.log('[CONVS-DETAIL] - conv ', conv)
|
|
235
|
+
const conversations = this.conversationsHandlerService.conversations;
|
|
236
|
+
// console.log('[CONVS-DETAIL] conversations', conversations);
|
|
237
|
+
this.conversation_count = conversations.length;
|
|
238
|
+
this.logger.log('[CONVS-DETAIL] conversation_count', this.conversation_count);
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
setTimeout(() => {
|
|
242
|
+
this.showSpinner = false
|
|
243
|
+
}, 3000);
|
|
244
|
+
|
|
245
|
+
}
|
|
213
246
|
|
|
247
|
+
|
|
248
|
+
getOSCODE() {
|
|
249
|
+
this.public_Key = this.appConfigProvider.getConfig().t2y12PruGU9wUtEGzBJfolMIgK;
|
|
250
|
+
this.logger.log('[CONVS-DETAIL] AppConfigService getAppConfig public_Key', this.public_Key);
|
|
251
|
+
|
|
252
|
+
if (this.public_Key) {
|
|
253
|
+
let keys = this.public_Key.split("-");
|
|
254
|
+
this.logger.log('[CONVS-DETAIL] PUBLIC-KEY - public_Key keys', keys)
|
|
255
|
+
|
|
256
|
+
keys.forEach(key => {
|
|
257
|
+
if (key.includes("CAR")) {
|
|
258
|
+
let car = key.split(":");
|
|
259
|
+
if (car[1] === "F") {
|
|
260
|
+
this.areVisibleCAR = false;
|
|
261
|
+
this.logger.log('[CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR', this.areVisibleCAR)
|
|
262
|
+
} else {
|
|
263
|
+
this.areVisibleCAR = true;
|
|
264
|
+
this.logger.log('[CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR', this.areVisibleCAR)
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
if (!this.public_Key.includes("CAR")) {
|
|
271
|
+
this.areVisibleCAR = false;
|
|
272
|
+
this.logger.log('[CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR', this.areVisibleCAR)
|
|
273
|
+
}
|
|
274
|
+
} else {
|
|
275
|
+
this.areVisibleCAR = false;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
watchToConnectionStatus() {
|
|
214
280
|
this.networkService.checkInternetFunc().subscribe(isOnline => {
|
|
215
281
|
this.checkInternet = isOnline
|
|
216
282
|
// console.log('[CONVS-LIST-PAGE] - watchToConnectionStatus - isOnline', this.checkInternet)
|
|
@@ -423,7 +489,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
423
489
|
"NO_CANNED_RESPONSES",
|
|
424
490
|
"YES_CANNED_RESPONSES",
|
|
425
491
|
"THERE_ARE_NO_CANNED_RESPONSES_AVAILABLE",
|
|
426
|
-
"TO_CREATE_THEM_GO_TO_THE_PROJECT"
|
|
492
|
+
"TO_CREATE_THEM_GO_TO_THE_PROJECT",
|
|
427
493
|
];
|
|
428
494
|
|
|
429
495
|
this.translationMap = this.customTranslateService.translateLanguage(keys);
|
|
@@ -441,6 +507,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
441
507
|
'INFO_SUPPORT_USER_ADDED_VERB',
|
|
442
508
|
'INFO_SUPPORT_CHAT_REOPENED',
|
|
443
509
|
'INFO_SUPPORT_CHAT_CLOSED',
|
|
510
|
+
'INFO_A_NEW_SUPPORT_REQUEST_HAS_BEEN_ASSIGNED_TO_YOU',
|
|
444
511
|
'LABEL_TODAY',
|
|
445
512
|
'LABEL_TOMORROW',
|
|
446
513
|
'LABEL_LAST_ACCESS',
|
|
@@ -900,90 +967,93 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
900
967
|
// ----------------------------------------------------------
|
|
901
968
|
// DISPLAY CANNED RESPONSES if message.lastIndexOf("/")
|
|
902
969
|
// ----------------------------------------------------------
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
// ------------------------------------------------------------------------------------------------------------------------------------------
|
|
932
|
-
// Hide / display Canned when the SLASH has POSITION POS 0 and checking if there is a space after the SLASH (in this case it will be hidden)
|
|
933
|
-
// ------------------------------------------------------------------------------------------------------------------------------------------
|
|
934
|
-
|
|
935
|
-
var after_slash = message.substring(message.lastIndexOf("/") + 1, message.length);
|
|
936
|
-
if (pos === 0 && after_slash.length === 1 && after_slash.trim() === '') {
|
|
937
|
-
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea after_slash --> there is a white space after ');
|
|
938
|
-
this.HIDE_CANNED_RESPONSES = true
|
|
939
|
-
this.tagsCannedFilter = []
|
|
940
|
-
} else if (pos === 0 && after_slash.length === 0) {
|
|
941
|
-
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea after_slash --> there is NOT a white space after');
|
|
942
|
-
this.HIDE_CANNED_RESPONSES = false
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
if (pos > 0) {
|
|
970
|
+
if (this.areVisibleCAR) {
|
|
971
|
+
setTimeout(() => {
|
|
972
|
+
if (this.conversationWith.startsWith("support-group")) {
|
|
973
|
+
|
|
974
|
+
const pos = message.lastIndexOf("/");
|
|
975
|
+
// console.log("[CONVS-DETAIL] - returnChangeTextArea - canned responses pos of / (using lastIndexOf) ", pos);
|
|
976
|
+
|
|
977
|
+
// test
|
|
978
|
+
// var rest = message.substring(0, message.lastIndexOf("/") + 1);
|
|
979
|
+
// var last = message.substring(message.lastIndexOf("/") + 1, message.length);
|
|
980
|
+
// console.log('[CONVS-DETAIL] - returnChangeTextArea rest', rest);
|
|
981
|
+
// console.log('[CONVS-DETAIL] - returnChangeTextArea last', last);
|
|
982
|
+
// console.log('[CONVS-DETAIL] - returnChangeTextArea last', last.length);
|
|
983
|
+
// if (last.length === 1 && last.trim() === '') {
|
|
984
|
+
// console.log('[CONVS-DETAIL] - returnChangeTextArea last is a white space ');
|
|
985
|
+
// } else if (last.length === 1 && last.trim() !== '') {
|
|
986
|
+
// console.log('[CONVS-DETAIL] - returnChangeTextArea last is NOT space ');
|
|
987
|
+
// }
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
if (pos >= 0) {
|
|
991
|
+
var strSearch = message.substr(pos + 1);
|
|
992
|
+
this.logger.log("[CONVS-DETAIL] - returnChangeTextArea - canned responses strSearch ", strSearch);
|
|
993
|
+
|
|
994
|
+
// --------------------------------------------
|
|
995
|
+
// Load canned responses
|
|
996
|
+
// --------------------------------------------
|
|
997
|
+
this.loadTagsCanned(strSearch, this.conversationWith);
|
|
947
998
|
|
|
948
999
|
// ------------------------------------------------------------------------------------------------------------------------------------------
|
|
949
|
-
// Hide / display Canned when the SLASH has POSITION POS
|
|
950
|
-
// and if there is not a space before the SLASH (in this it will be hidden)
|
|
1000
|
+
// Hide / display Canned when the SLASH has POSITION POS 0 and checking if there is a space after the SLASH (in this case it will be hidden)
|
|
951
1001
|
// ------------------------------------------------------------------------------------------------------------------------------------------
|
|
952
1002
|
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
if (
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
1003
|
+
var after_slash = message.substring(message.lastIndexOf("/") + 1, message.length);
|
|
1004
|
+
if (pos === 0 && after_slash.length === 1 && after_slash.trim() === '') {
|
|
1005
|
+
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea after_slash --> there is a white space after ');
|
|
1006
|
+
this.HIDE_CANNED_RESPONSES = true
|
|
1007
|
+
this.tagsCannedFilter = []
|
|
1008
|
+
} else if (pos === 0 && after_slash.length === 0) {
|
|
1009
|
+
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea after_slash --> there is NOT a white space after');
|
|
1010
|
+
this.HIDE_CANNED_RESPONSES = false
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
if (pos > 0) {
|
|
1015
|
+
|
|
1016
|
+
// ------------------------------------------------------------------------------------------------------------------------------------------
|
|
1017
|
+
// Hide / display Canned when the SLASH has POSITION POS > and checking if there is a space after the SLASH (in this case they it be hidden)
|
|
1018
|
+
// and if there is not a space before the SLASH (in this it will be hidden)
|
|
1019
|
+
// ------------------------------------------------------------------------------------------------------------------------------------------
|
|
1020
|
+
|
|
1021
|
+
let beforeSlash = message.substr(pos - 1)
|
|
1022
|
+
let afterSlash = message.substr(pos + 1)
|
|
1023
|
+
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea * POS ', pos);
|
|
1024
|
+
|
|
1025
|
+
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea --> beforeSlash', beforeSlash);
|
|
1026
|
+
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea --> afterSlash', afterSlash);
|
|
1027
|
+
var afterSlashParts = afterSlash.split("/")
|
|
1028
|
+
var beforeSlashParts = beforeSlash.split("/")
|
|
1029
|
+
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea --> afterSlash parts', afterSlashParts);
|
|
1030
|
+
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea --> beforeSlash parts', beforeSlashParts);
|
|
1031
|
+
|
|
1032
|
+
if (beforeSlashParts.length === 2) {
|
|
1033
|
+
if (beforeSlashParts[0].indexOf(' ') >= 0 && afterSlashParts[0] === '') {
|
|
1034
|
+
this.HIDE_CANNED_RESPONSES = false
|
|
1035
|
+
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea --> beforeSlash there is a white space After Not');
|
|
1036
|
+
// if (beforeSlashParts[0].indexOf(' ') >= 0 && afterSlashParts[0].indexOf(' ') >= 0)
|
|
1037
|
+
} else if (beforeSlashParts[0].indexOf(' ') < 0 && afterSlashParts[0] === '') {
|
|
1038
|
+
this.HIDE_CANNED_RESPONSES = true;
|
|
1039
|
+
this.tagsCannedFilter = []
|
|
1040
|
+
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea --> beforeSlash not thete is a white space After Not');
|
|
1041
|
+
} else if (beforeSlashParts[0].indexOf(' ') >= 0 && afterSlashParts[0] === ' ') {
|
|
1042
|
+
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea --> beforeSlash not thete is a white space After YES');
|
|
1043
|
+
this.HIDE_CANNED_RESPONSES = true;
|
|
1044
|
+
this.tagsCannedFilter = []
|
|
1045
|
+
}
|
|
977
1046
|
}
|
|
978
1047
|
}
|
|
979
|
-
}
|
|
980
1048
|
|
|
981
1049
|
|
|
982
|
-
|
|
983
|
-
|
|
1050
|
+
} else {
|
|
1051
|
+
this.tagsCannedFilter = [];
|
|
1052
|
+
}
|
|
984
1053
|
}
|
|
985
|
-
}
|
|
986
|
-
|
|
1054
|
+
}, 300);
|
|
1055
|
+
|
|
1056
|
+
}
|
|
987
1057
|
// ./ CANNED RESPONSES //
|
|
988
1058
|
|
|
989
1059
|
} catch (err) {
|
|
@@ -1097,7 +1167,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1097
1167
|
this.tagsCannedFilter[i].title = "<div class='cannedContent'><div class='cannedTitle'>" + this.tagsCannedFilter[i].title.toString().replace(strSearch, strReplace.trim()) + "</div>" + textCanned + '</div>';
|
|
1098
1168
|
}
|
|
1099
1169
|
if (this.tagsCannedCount === 0) {
|
|
1100
|
-
const nocanned = { 'title': "<div class='cannedContent'><div class='cannedTitle nocannedTitle'>" + this.translationMap.get('THERE_ARE_NO_CANNED_RESPONSES_AVAILABLE') + ".</div><div class='cannedText'>"
|
|
1170
|
+
const nocanned = { 'title': "<div class='cannedContent'><div class='cannedTitle nocannedTitle'>" + this.translationMap.get('THERE_ARE_NO_CANNED_RESPONSES_AVAILABLE') + ".</div><div class='cannedText'>" + this.translationMap.get('TO_CREATE_THEM_GO_TO_THE_PROJECT') + "</div></div>", "text": "There are no canned responses available" }
|
|
1101
1171
|
this.tagsCannedFilter.push(nocanned)
|
|
1102
1172
|
}
|
|
1103
1173
|
}
|
|
@@ -1139,7 +1209,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1139
1209
|
this.arrowkeyLocation = -1
|
|
1140
1210
|
this.tagsCannedFilter = [];
|
|
1141
1211
|
this.logger.log("[CONVS-DETAIL] replaceTagInMessage canned text ", canned.text);
|
|
1142
|
-
|
|
1212
|
+
|
|
1143
1213
|
|
|
1144
1214
|
// replace text
|
|
1145
1215
|
var pos = textArea.value.lastIndexOf("/");
|
|
@@ -1183,15 +1253,15 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1183
1253
|
setCaretPosition(ctrl) {
|
|
1184
1254
|
ctrl.value.trim()
|
|
1185
1255
|
ctrl.setFocus();
|
|
1186
|
-
}
|
|
1256
|
+
}
|
|
1187
1257
|
|
|
1188
1258
|
insertAtCursor(myField, myValue) {
|
|
1189
1259
|
this.logger.log('[CONVS-DETAIL] - insertAtCursor - myValue ', myValue);
|
|
1190
1260
|
this.logger.log('[CONVS-DETAIL] - insertAtCursor - myField ', myField);
|
|
1191
1261
|
|
|
1192
|
-
|
|
1262
|
+
|
|
1193
1263
|
// myValue = ' ' + myValue;
|
|
1194
|
-
|
|
1264
|
+
|
|
1195
1265
|
// console.log('[CONVS-DETAIL] - GET TEXT AREA - Here yes myValue ', myValue);
|
|
1196
1266
|
// console.log('[CONVS-DETAIL] - GET TEXT AREA - Here yes textArea value length', myField.value.length);
|
|
1197
1267
|
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
<ion-header no-border class="ion-no-border">
|
|
2
|
-
<app-ddp-header *ngIf="conversationType ==='active'"
|
|
3
|
-
|
|
2
|
+
<app-ddp-header *ngIf="conversationType ==='active'"
|
|
3
|
+
[numberOpenConv]="numberOpenConv"
|
|
4
|
+
[supportMode]="supportMode"
|
|
5
|
+
[archived_btn]="archived_btn"
|
|
6
|
+
[teammates_btn]="teammates_btn"
|
|
7
|
+
(openContactsDirectory)=openContactsDirectory($event)
|
|
8
|
+
(openProfileInfo)=openProfileInfo($event)>
|
|
4
9
|
</app-ddp-header>
|
|
5
10
|
|
|
6
|
-
<app-option-header *ngIf="conversationType !=='active'"
|
|
11
|
+
<app-option-header *ngIf="conversationType !=='active'"
|
|
12
|
+
[headerTitle]=headerTitle
|
|
7
13
|
(onBackButton)=onBackButtonFN($event)>
|
|
8
14
|
</app-option-header>
|
|
9
15
|
</ion-header>
|
|
@@ -36,8 +42,8 @@
|
|
|
36
42
|
</ion-avatar>
|
|
37
43
|
<ion-label part="message-text" class="waiting-for-network-msg"> Waiting for network</ion-label>
|
|
38
44
|
</ion-item>
|
|
39
|
-
<!--
|
|
40
|
-
<ion-item *ngIf="
|
|
45
|
+
<!-- supportMode && -->
|
|
46
|
+
<ion-item *ngIf="displayNewConvsItem" class="ion-no-padding open-iframe-item">
|
|
41
47
|
<div tabindex="0"></div>
|
|
42
48
|
<!-- <ion-note class="pinned-project">
|
|
43
49
|
{{ 'PINNED_PROJECT' | translate }}
|
|
@@ -106,8 +112,6 @@
|
|
|
106
112
|
<ion-item id="no-convs" class="ion-text-center" lines="none">
|
|
107
113
|
<ion-label class="ion-text-wrap" color="medium">
|
|
108
114
|
{{ 'LABEL_MSG_PUSH_START_CHAT' | translate }}
|
|
109
|
-
|
|
110
|
-
|
|
111
115
|
</ion-label>
|
|
112
116
|
</ion-item>
|
|
113
117
|
</div>
|
|
@@ -60,7 +60,8 @@ export class ConversationListPage implements OnInit {
|
|
|
60
60
|
public numberOpenConv = 0;
|
|
61
61
|
public loadingIsActive = true;
|
|
62
62
|
public supportMode: boolean;
|
|
63
|
-
|
|
63
|
+
public teammates_btn: boolean;
|
|
64
|
+
public archived_btn: boolean;
|
|
64
65
|
public convertMessage = convertMessage;
|
|
65
66
|
private isShowMenuPage = false;
|
|
66
67
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
@@ -81,7 +82,15 @@ export class ConversationListPage implements OnInit {
|
|
|
81
82
|
|
|
82
83
|
public displayNewConvsItem: boolean = true
|
|
83
84
|
|
|
84
|
-
|
|
85
|
+
tooltipOptions = {
|
|
86
|
+
'show-delay': 1500,
|
|
87
|
+
'tooltip-class': 'chat-tooltip',
|
|
88
|
+
'theme': 'light',
|
|
89
|
+
'shadow': false,
|
|
90
|
+
'hide-delay-mobile': 0,
|
|
91
|
+
'hideDelayAfterClick': 3000,
|
|
92
|
+
'hide-delay': 200
|
|
93
|
+
};
|
|
85
94
|
|
|
86
95
|
constructor(
|
|
87
96
|
private router: Router,
|
|
@@ -151,7 +160,7 @@ export class ConversationListPage implements OnInit {
|
|
|
151
160
|
// -----------------------------------------------
|
|
152
161
|
ngOnInit() {
|
|
153
162
|
this.watchToConnectionStatus();
|
|
154
|
-
this.
|
|
163
|
+
this.getAppConfigToHideDiplayBtns();
|
|
155
164
|
|
|
156
165
|
// const currentUrl = this.router.url;
|
|
157
166
|
// this.logger.log('[CONVS-LIST-PAGE] current_url ngOnInit ', currentUrl);
|
|
@@ -195,9 +204,24 @@ export class ConversationListPage implements OnInit {
|
|
|
195
204
|
}
|
|
196
205
|
|
|
197
206
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
207
|
+
getAppConfigToHideDiplayBtns() {
|
|
208
|
+
const appConfig = this.appConfigProvider.getConfig();
|
|
209
|
+
console.log('[ION-LIST-CONVS-COMP] - appConfig ', appConfig)
|
|
210
|
+
if (appConfig && appConfig.supportMode) {
|
|
211
|
+
this.supportMode = appConfig.supportMode;
|
|
212
|
+
} else {
|
|
213
|
+
this.supportMode = false;
|
|
214
|
+
}
|
|
215
|
+
if (appConfig && appConfig.archivedButton) {
|
|
216
|
+
this.archived_btn = appConfig.archivedButton;
|
|
217
|
+
} else {
|
|
218
|
+
this.archived_btn = false;
|
|
219
|
+
}
|
|
220
|
+
if (appConfig && appConfig.teammatesButton) {
|
|
221
|
+
this.teammates_btn = appConfig.teammatesButton;
|
|
222
|
+
} else {
|
|
223
|
+
this.teammates_btn = false;
|
|
224
|
+
}
|
|
201
225
|
// console.log('[ION-LIST-CONVS-COMP] - supportMode ', this.supportMode)
|
|
202
226
|
}
|
|
203
227
|
|
|
@@ -242,7 +266,7 @@ export class ConversationListPage implements OnInit {
|
|
|
242
266
|
}
|
|
243
267
|
|
|
244
268
|
openUnsevedConversationIframe(event) {
|
|
245
|
-
|
|
269
|
+
this.logger.log('[CONVS-LIST-PAGE] openUnsevedConversationIframe ', event)
|
|
246
270
|
this.hasClickedOpenUnservedConvIframe = true
|
|
247
271
|
this.logger.log('[CONVS-LIST-PAGE] - HAS CLIKED OPEN UNSERVED REQUEST IFRAME', this.hasClickedOpenUnservedConvIframe);
|
|
248
272
|
const DASHBOARD_BASE_URL = this.appConfigProvider.getConfig().dashboardUrl;
|
|
@@ -354,7 +378,7 @@ export class ConversationListPage implements OnInit {
|
|
|
354
378
|
|
|
355
379
|
|
|
356
380
|
initArchivedConversationsHandler() {
|
|
357
|
-
const keysConversation = ['CLOSED'];
|
|
381
|
+
const keysConversation = ['CLOSED', 'Resolve'];
|
|
358
382
|
this.translationMapConversation = this.translateService.translateLanguage(keysConversation);
|
|
359
383
|
|
|
360
384
|
this.archivedConversationsHandlerService.subscribeToConversations(() => {
|
|
@@ -402,7 +426,6 @@ export class ConversationListPage implements OnInit {
|
|
|
402
426
|
}
|
|
403
427
|
|
|
404
428
|
listenGoOffline() {
|
|
405
|
-
|
|
406
429
|
this.events.subscribe('go:offline', (offline) => {
|
|
407
430
|
this.logger.info('[CONVS-LIST-PAGE] - listen To go:offline - offline', offline);
|
|
408
431
|
// this.events.unsubscribe('profileInfoButtonClick:logout')
|
|
@@ -556,6 +579,8 @@ export class ConversationListPage implements OnInit {
|
|
|
556
579
|
|
|
557
580
|
// let storedArchivedConv = localStorage.getItem('activeConversationSelected');
|
|
558
581
|
const keys = ['LABEL_ARCHIVED'];
|
|
582
|
+
// const keys = ['History'];
|
|
583
|
+
|
|
559
584
|
this.headerTitle = this.translateService.translateLanguage(keys).get(keys[0]);
|
|
560
585
|
|
|
561
586
|
} else if (event === 'displayContact') {
|
|
@@ -55,13 +55,13 @@
|
|
|
55
55
|
</div>
|
|
56
56
|
|
|
57
57
|
<ion-list *ngIf="loggedUser">
|
|
58
|
-
<ion-item lines="none" class="sidebar-items" (click)="onClickArchivedConversation()">
|
|
58
|
+
<!-- <ion-item lines="none" class="sidebar-items" (click)="onClickArchivedConversation()">
|
|
59
59
|
<div tabindex="0"></div>
|
|
60
60
|
<ion-icon name="archive-outline" class="sidebar-icons"></ion-icon>
|
|
61
61
|
<ion-label class="sidebar-labels">
|
|
62
62
|
<h3>{{ 'LABEL_ARCHIVED' | translate }}</h3>
|
|
63
63
|
</ion-label>
|
|
64
|
-
</ion-item>
|
|
64
|
+
</ion-item> -->
|
|
65
65
|
|
|
66
66
|
<ion-item lines="none" class="sidebar-items" (click)="onLogout()">
|
|
67
67
|
<div tabindex="0"></div>
|
|
@@ -86,16 +86,18 @@ export class ProfileInfoPage implements OnInit {
|
|
|
86
86
|
private setUser() {
|
|
87
87
|
// width and height NON sono obbligatori
|
|
88
88
|
this.loggedUser = this.chatManager.getCurrentUser();
|
|
89
|
-
this.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
89
|
+
if (this.loggedUser) {
|
|
90
|
+
this.itemAvatar = {
|
|
91
|
+
imageurl: this.imageRepo.getImagePhotoUrl(this.loggedUser.uid),
|
|
92
|
+
avatar: this.loggedUser.avatar,
|
|
93
|
+
color: this.loggedUser.color,
|
|
94
|
+
online: this.loggedUser.online,
|
|
95
|
+
lastConnection: this.loggedUser.lastConnection,
|
|
96
|
+
status: '',
|
|
97
|
+
width: '100px',
|
|
98
|
+
height: '100px'
|
|
99
|
+
};
|
|
100
|
+
}
|
|
99
101
|
}
|
|
100
102
|
|
|
101
103
|
|
|
@@ -121,10 +123,10 @@ export class ProfileInfoPage implements OnInit {
|
|
|
121
123
|
private setSubscriptions() {
|
|
122
124
|
this.presenceService.userIsOnline(this.loggedUser.uid);
|
|
123
125
|
this.presenceService.lastOnlineForUser(this.loggedUser.uid);
|
|
124
|
-
|
|
125
|
-
|
|
126
|
+
|
|
127
|
+
|
|
126
128
|
const subscribeBSIsOnline = this.presenceService.BSIsOnline.subscribe((data: any) => {
|
|
127
|
-
|
|
129
|
+
this.logger.log('[PROFILE-INFO-PAGE] setSubscriptions $ubscribe to BSIsOnline - data', data);
|
|
128
130
|
if (data) {
|
|
129
131
|
const userId = data.uid;
|
|
130
132
|
const isOnline = data.isOnline;
|
|
@@ -135,7 +137,7 @@ export class ProfileInfoPage implements OnInit {
|
|
|
135
137
|
});
|
|
136
138
|
|
|
137
139
|
const subscribeBSLastOnline = this.presenceService.BSLastOnline.subscribe((data: any) => {
|
|
138
|
-
|
|
140
|
+
this.logger.log('[PROFILE-INFO-PAGE] setSubscriptions $ubscribe to BSLastOnline - data', data);
|
|
139
141
|
if (data) {
|
|
140
142
|
const userId = data.uid;
|
|
141
143
|
const timestamp = data.lastOnline;
|
|
@@ -150,7 +152,7 @@ export class ProfileInfoPage implements OnInit {
|
|
|
150
152
|
|
|
151
153
|
|
|
152
154
|
userIsOnLine = (userId: string, isOnline: boolean) => {
|
|
153
|
-
|
|
155
|
+
this.logger.log('[PROFILE-INFO-PAGE] userIsOnLine - userId ', userId, ' - isOnline ', isOnline);
|
|
154
156
|
this.itemAvatar.online = isOnline;
|
|
155
157
|
if (isOnline) {
|
|
156
158
|
this.itemAvatar.status = this.translationMap.get('LABEL_AVAILABLE');
|
|
@@ -180,9 +182,9 @@ export class ProfileInfoPage implements OnInit {
|
|
|
180
182
|
|
|
181
183
|
/** */
|
|
182
184
|
private unsubescribeAll() {
|
|
183
|
-
|
|
185
|
+
this.logger.log('unsubescribeAll: ', this.subscriptions);
|
|
184
186
|
this.subscriptions.forEach((subscription: any) => {
|
|
185
|
-
|
|
187
|
+
this.logger.log('unsubescribe: ', subscription);
|
|
186
188
|
// this.events.unsubscribe(subscription, null);
|
|
187
189
|
});
|
|
188
190
|
this.subscriptions = [];
|
|
@@ -207,15 +209,15 @@ export class ProfileInfoPage implements OnInit {
|
|
|
207
209
|
}
|
|
208
210
|
|
|
209
211
|
copyLoggedUserUID() {
|
|
210
|
-
var copyText = document.createElement("input");
|
|
212
|
+
var copyText = document.createElement("input");
|
|
211
213
|
copyText.setAttribute("type", "text");
|
|
212
214
|
copyText.setAttribute("value", this.loggedUser.uid);
|
|
213
|
-
|
|
214
|
-
document.body.appendChild(copyText);
|
|
215
|
+
|
|
216
|
+
document.body.appendChild(copyText);
|
|
215
217
|
copyText.select();
|
|
216
218
|
copyText.setSelectionRange(0, 99999); /*For mobile devices*/
|
|
217
219
|
document.execCommand("copy");
|
|
218
|
-
|
|
220
|
+
this.logger.log("Copied the text: " + copyText.value);
|
|
219
221
|
const tootipElem = <HTMLElement>document.querySelector('.chat-tooltip');
|
|
220
222
|
this.renderer.appendChild(tootipElem, this.renderer.createText('Copied!'))
|
|
221
223
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<ion-header>
|
|
2
2
|
<ion-toolbar>
|
|
3
|
-
<ion-title *ngIf="callerBtn !== 'pinbtn'">
|
|
4
|
-
{{translationMap?.get('
|
|
3
|
+
<ion-title *ngIf="callerBtn !== 'pinbtn'" style="font-size: 16px;">
|
|
4
|
+
{{translationMap?.get('UnassignedConversations') }}
|
|
5
5
|
</ion-title>
|
|
6
|
-
<ion-title *ngIf="callerBtn === 'pinbtn'">
|
|
6
|
+
<ion-title *ngIf="callerBtn === 'pinbtn'" style="font-size: 16px;">
|
|
7
7
|
{{translationMap?.get('PIN_A_PROJECT') }}
|
|
8
8
|
</ion-title>
|
|
9
9
|
<ion-buttons slot="end">
|
|
@@ -35,11 +35,18 @@ import { InfoSupportGroupComponent } from '../components/conversation-info/info-
|
|
|
35
35
|
import { InfoDirectComponent } from '../components/conversation-info/info-direct/info-direct.component';
|
|
36
36
|
import { AdvancedInfoAccordionComponent } from '../components/conversation-info/advanced-info-accordion/advanced-info-accordion.component';
|
|
37
37
|
import { InfoGroupComponent } from '../components/conversation-info/info-group/info-group.component';
|
|
38
|
-
import { TooltipModule } from 'ng2-tooltip-directive';
|
|
38
|
+
import { TooltipModule, TooltipOptions } from 'ng2-tooltip-directive';
|
|
39
39
|
import { OptionHeaderComponent } from '../components/conversation-detail/option-header/option-header.component';
|
|
40
40
|
import { MessageAttachmentComponent } from '../chatlib/conversation-detail/message/message-attachment/message-attachment.component';
|
|
41
41
|
import { ImageViewerComponent } from '../components/image-viewer/image-viewer.component';
|
|
42
|
+
import { SidebarComponent } from '../components/sidebar/sidebar.component';
|
|
43
|
+
import { SidebarUserDetailsComponent } from '../components/sidebar-user-details/sidebar-user-details.component';
|
|
42
44
|
import { ProjectItemComponent } from '../components/project-item/project-item.component';
|
|
45
|
+
import { DefaultTooltipOptions } from 'src/chat21-core/utils/utils';
|
|
46
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
47
|
+
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
48
|
+
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
49
|
+
|
|
43
50
|
// import { MessageTextAreaComponent } from '../components/conversation-detail/message-text-area/message-text-area.component';
|
|
44
51
|
|
|
45
52
|
@NgModule({
|
|
@@ -52,6 +59,8 @@ import { ProjectItemComponent } from '../components/project-item/project-item.co
|
|
|
52
59
|
ListConversationsComponent,
|
|
53
60
|
IonListConversationsComponent,
|
|
54
61
|
ImageViewerComponent,
|
|
62
|
+
SidebarComponent,
|
|
63
|
+
SidebarUserDetailsComponent,
|
|
55
64
|
ProjectItemComponent,
|
|
56
65
|
IonConversationDetailComponent,
|
|
57
66
|
ConversationContentComponent,
|
|
@@ -86,6 +95,8 @@ import { ProjectItemComponent } from '../components/project-item/project-item.co
|
|
|
86
95
|
AvatarProfileComponent,
|
|
87
96
|
DdpHeaderComponent,
|
|
88
97
|
ImageViewerComponent,
|
|
98
|
+
SidebarComponent,
|
|
99
|
+
SidebarUserDetailsComponent,
|
|
89
100
|
ProjectItemComponent,
|
|
90
101
|
UserPresenceComponent,
|
|
91
102
|
UserTypingComponent,
|
|
@@ -116,10 +127,13 @@ import { ProjectItemComponent } from '../components/project-item/project-item.co
|
|
|
116
127
|
|
|
117
128
|
],
|
|
118
129
|
imports: [
|
|
130
|
+
MatTooltipModule,
|
|
131
|
+
MatSlideToggleModule,
|
|
132
|
+
MatSnackBarModule,
|
|
119
133
|
CommonModule,
|
|
120
134
|
IonicModule,
|
|
121
135
|
MomentModule,
|
|
122
|
-
TooltipModule
|
|
136
|
+
TooltipModule.forRoot(DefaultTooltipOptions as TooltipOptions)
|
|
123
137
|
|
|
124
138
|
],
|
|
125
139
|
schemas: [
|