@chat21/chat21-ionic 3.0.85 → 3.0.86-rc.2
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 +121 -4
- package/README.md +2 -2
- package/package.json +4 -3
- package/src/app/app-routing.module.ts +7 -2
- package/src/app/app.component.html +7 -1
- package/src/app/app.component.scss +20 -2
- package/src/app/app.component.ts +131 -20
- package/src/app/app.module.ts +8 -3
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +11 -4
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +86 -23
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +188 -88
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +42 -3
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +11 -24
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +6 -10
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.spec.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +16 -26
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +5 -1
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +22 -15
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +25 -5
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +2 -1
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +14 -15
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +24 -5
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +6 -1
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +12 -13
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +26 -5
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.html +8 -2
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.scss +36 -0
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/html/html.component.ts +0 -1
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +3 -2
- package/src/app/chatlib/conversation-detail/message/image/image.component.scss +17 -5
- package/src/app/chatlib/conversation-detail/message/image/image.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +3 -2
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +16 -6
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -3
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +2 -0
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +78 -52
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +63 -20
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -10
- package/src/app/components/canned-response/canned-response.component.html +9 -9
- package/src/app/components/canned-response/canned-response.component.scss +14 -7
- package/src/app/components/canned-response/canned-response.component.ts +5 -4
- package/src/app/components/contacts-directory/contacts-directory.component.html +22 -26
- package/src/app/components/contacts-directory/contacts-directory.component.scss +8 -6
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +64 -47
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +98 -61
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +24 -44
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +116 -0
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +39 -42
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +67 -4
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +82 -154
- package/src/app/components/conversation-info/info-content/info-content.component.html +23 -2
- package/src/app/components/conversation-info/info-content/info-content.component.ts +5 -6
- package/src/app/components/conversation-info/info-direct/info-direct.component.html +7 -14
- package/src/app/components/conversation-info/info-direct/info-direct.component.scss +23 -0
- package/src/app/components/conversation-info/info-direct/info-direct.component.ts +1 -6
- package/src/app/components/conversation-info/info-group/info-group.component.html +44 -108
- package/src/app/components/conversation-info/info-group/info-group.component.scss +101 -61
- package/src/app/components/conversation-info/info-group/info-group.component.ts +1 -0
- package/src/app/components/conversation-info/info-support-group/info-support-group.component.html +2 -1
- package/src/app/components/conversation-info/info-support-group/info-support-group.component.ts +0 -1
- package/src/app/components/{ddp-header/ddp-header.component.html → conversations-list/header-conversations-list/header-conversations-list.component.html} +3 -3
- package/src/app/components/{ddp-header/ddp-header.component.scss → conversations-list/header-conversations-list/header-conversations-list.component.scss} +16 -4
- package/src/app/components/{conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts → conversations-list/header-conversations-list/header-conversations-list.component.spec.ts} +6 -6
- package/src/app/components/{ddp-header/ddp-header.component.ts → conversations-list/header-conversations-list/header-conversations-list.component.ts} +7 -16
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +12 -0
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +14 -0
- package/src/app/components/{conversation-detail/option-header/option-header.component.spec.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.spec.ts} +5 -5
- package/src/app/components/{conversation-detail/option-header/option-header.component.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.ts} +5 -4
- package/src/app/components/navbar/navbar.component.html +103 -0
- package/src/app/components/navbar/navbar.component.scss +249 -0
- package/src/app/components/{ddp-header/ddp-header.component.spec.ts → navbar/navbar.component.spec.ts} +6 -6
- package/src/app/components/navbar/navbar.component.ts +195 -0
- package/src/app/components/project-item/project-item.component.html +98 -149
- package/src/app/components/project-item/project-item.component.scss +43 -35
- package/src/app/components/project-item/project-item.component.ts +16 -4
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +5 -5
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +24 -13
- package/src/app/components/utils/user-presence/user-presence.component.html +7 -2
- package/src/app/components/utils/user-presence/user-presence.component.scss +35 -18
- package/src/app/components/utils/user-presence/user-presence.component.ts +6 -10
- package/src/app/{pages → modals}/create-canned-response/create-canned-response-routing.module.ts +0 -0
- package/src/app/{pages → modals}/create-canned-response/create-canned-response.module.ts +0 -0
- package/src/app/{pages → modals}/create-canned-response/create-canned-response.page.html +0 -0
- package/src/app/{pages → modals}/create-canned-response/create-canned-response.page.scss +0 -0
- package/src/app/{pages → modals}/create-canned-response/create-canned-response.page.spec.ts +0 -0
- package/src/app/{pages → modals}/create-canned-response/create-canned-response.page.ts +13 -13
- package/src/app/{pages → modals}/loader-preview/loader-preview-routing.module.ts +0 -0
- package/src/app/{pages → modals}/loader-preview/loader-preview.module.ts +0 -0
- package/src/app/{pages → modals}/loader-preview/loader-preview.page.html +1 -1
- package/src/app/{pages → modals}/loader-preview/loader-preview.page.scss +4 -0
- package/src/app/{pages → modals}/loader-preview/loader-preview.page.spec.ts +0 -0
- package/src/app/{pages → modals}/loader-preview/loader-preview.page.ts +1 -2
- package/src/app/modals/send-email/send-email-routing.module.ts +17 -0
- package/src/app/modals/send-email/send-email.module.ts +31 -0
- package/src/app/modals/send-email/send-email.page.html +46 -0
- package/src/app/modals/send-email/send-email.page.scss +161 -0
- package/src/app/modals/send-email/send-email.page.spec.ts +24 -0
- package/src/app/modals/send-email/send-email.page.ts +89 -0
- package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
- package/src/app/pages/contacts-directory/contacts-directory.page.scss +47 -0
- package/src/app/pages/contacts-directory/contacts-directory.page.ts +2 -0
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +0 -8
- package/src/app/pages/conversation-detail/conversation-detail.page.html +48 -27
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +45 -254
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +330 -138
- package/src/app/pages/conversations-list/conversations-list.page.html +11 -8
- package/src/app/pages/conversations-list/conversations-list.page.scss +18 -2
- package/src/app/pages/conversations-list/conversations-list.page.ts +26 -24
- package/src/app/pages/profile-info/profile-info.page.html +2 -4
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +42 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +1 -0
- package/src/app/services/canned-responses/canned-responses.service.ts +26 -0
- package/src/app/services/projects/projects.service.spec.ts +12 -0
- package/src/app/services/projects/projects.service.ts +43 -0
- package/src/app/services/tiledesk/tiledesk.service.ts +33 -17
- package/src/app/shared/shared.module.ts +24 -33
- package/src/app/utils/toast.spec.ts +7 -0
- package/src/app/utils/toast.ts +48 -0
- package/src/assets/i18n/ar.json +288 -265
- package/src/assets/i18n/az.json +24 -1
- package/src/assets/i18n/de.json +25 -2
- package/src/assets/i18n/en.json +25 -2
- package/src/assets/i18n/es.json +26 -3
- package/src/assets/i18n/fr.json +24 -1
- package/src/assets/i18n/it.json +24 -1
- package/src/assets/i18n/kk.json +25 -2
- package/src/assets/i18n/pt.json +25 -2
- package/src/assets/i18n/ru.json +24 -1
- package/src/assets/i18n/sr.json +287 -264
- package/src/assets/i18n/sv.json +25 -2
- package/src/assets/i18n/tr.json +25 -2
- package/src/assets/i18n/uk.json +25 -2
- package/src/assets/i18n/uz.json +24 -1
- package/src/assets/js/chat21client.js +1 -1
- package/src/assets/sounds/interface-start.mp3 +0 -0
- package/src/assets/sounds/wheep-wheep.mp3 +0 -0
- package/src/chat-config-mqtt-localhost.json +2 -2
- package/src/chat-config-native-mqtt.json +3 -0
- package/src/chat21-core/models/conversation.ts +0 -1
- package/src/chat21-core/models/projects.ts +27 -0
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +7 -9
- package/src/chat21-core/providers/logger/customLogger.ts +1 -1
- package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +7 -8
- package/src/chat21-core/utils/constants.ts +7 -1
- package/src/chat21-core/utils/convertRequestToConversation.ts +41 -0
- package/src/chat21-core/utils/user-typing/user-typing.component.html +8 -5
- package/src/chat21-core/utils/user-typing/user-typing.component.scss +87 -17
- package/src/chat21-core/utils/user-typing/user-typing.component.ts +12 -94
- package/src/chat21-core/utils/utils.ts +41 -11
- package/src/global.scss +59 -255
- package/src/index.html +0 -9
- package/src/variables.scss +30 -10
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +0 -3
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +0 -21
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +0 -14
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +0 -54
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +0 -98
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +0 -84
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +0 -30
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +0 -83
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +0 -68
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +0 -3
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +0 -10
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +0 -14
- package/src/app/components/conversation-detail/option-header/option-header.component.html +0 -13
- package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
|
@@ -1,10 +1,24 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--themeColor: rgb(240, 242, 247);
|
|
3
|
+
--foregroundColor: black;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
|
|
1
7
|
.tile-typing-now {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
position: absolute;
|
|
9
|
+
left: 40px;
|
|
10
|
+
right: 40px;
|
|
11
|
+
bottom: 3px;
|
|
12
|
+
width: auto;
|
|
13
|
+
text-align: center;
|
|
14
|
+
margin: 0px;
|
|
15
|
+
padding: 0px;
|
|
16
|
+
font-size: 1.1em;
|
|
17
|
+
color: var(--foregroundColor);
|
|
18
|
+
//display: none;
|
|
19
|
+
// &.active {
|
|
20
|
+
// display: block;
|
|
21
|
+
// }
|
|
8
22
|
}
|
|
9
23
|
|
|
10
24
|
/* BEGIN LOADING */
|
|
@@ -14,49 +28,105 @@
|
|
|
14
28
|
left: 0;
|
|
15
29
|
top: 0;
|
|
16
30
|
margin: 0;
|
|
17
|
-
&.active {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
31
|
+
// &.active {
|
|
32
|
+
// display: inline-block;
|
|
33
|
+
// width: 30px;
|
|
34
|
+
// }
|
|
21
35
|
}
|
|
22
36
|
#tile-spinner > div {
|
|
23
37
|
width: 6px;
|
|
24
38
|
height: 6px;
|
|
25
39
|
background-color: var(--basic-blue);
|
|
26
40
|
}
|
|
41
|
+
// .spinner {
|
|
42
|
+
// margin: 100px auto 0;
|
|
43
|
+
// width: 70px;
|
|
44
|
+
// text-align: center;
|
|
45
|
+
// }
|
|
46
|
+
// .spinner > div {
|
|
47
|
+
// width: 18px;
|
|
48
|
+
// height: 18px;
|
|
49
|
+
// background-color: #333;
|
|
50
|
+
// border-radius: 100%;
|
|
51
|
+
// display: inline-block;
|
|
52
|
+
// -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
|
|
53
|
+
// animation: sk-bouncedelay 1.4s infinite ease-in-out both;
|
|
54
|
+
// }
|
|
55
|
+
// .spinner .bounce1 {
|
|
56
|
+
// -webkit-animation-delay: -0.32s;
|
|
57
|
+
// animation-delay: -0.32s;
|
|
58
|
+
// }
|
|
59
|
+
// .spinner .bounce2 {
|
|
60
|
+
// -webkit-animation-delay: -0.16s;
|
|
61
|
+
// animation-delay: -0.16s;
|
|
62
|
+
// }
|
|
63
|
+
// @-webkit-keyframes sk-bouncedelay {
|
|
64
|
+
// 0%, 80%, 100% { -webkit-transform: scale(0) }
|
|
65
|
+
// 40% { -webkit-transform: scale(1.0) }
|
|
66
|
+
// }
|
|
67
|
+
// @keyframes sk-bouncedelay {
|
|
68
|
+
// 0%, 80%, 100% {
|
|
69
|
+
// -webkit-transform: scale(0);
|
|
70
|
+
// transform: scale(0);
|
|
71
|
+
// } 40% {
|
|
72
|
+
// -webkit-transform: scale(1.0);
|
|
73
|
+
// transform: scale(1.0);
|
|
74
|
+
// }
|
|
75
|
+
// }
|
|
76
|
+
/* END LOADING */
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
/* ******BOUNCE SPINNER START****** */
|
|
27
80
|
.spinner {
|
|
28
|
-
margin:
|
|
81
|
+
margin: 15px 10px; //remove it if activate avatar image
|
|
29
82
|
width: 70px;
|
|
30
|
-
text-align: center;
|
|
83
|
+
// text-align: center;
|
|
84
|
+
min-height: 20px;
|
|
85
|
+
display: block;
|
|
31
86
|
}
|
|
87
|
+
|
|
32
88
|
.spinner > div {
|
|
33
|
-
width:
|
|
34
|
-
height:
|
|
89
|
+
width: 9px;
|
|
90
|
+
height: 9px;
|
|
35
91
|
background-color: #333;
|
|
92
|
+
|
|
36
93
|
border-radius: 100%;
|
|
37
94
|
display: inline-block;
|
|
38
95
|
-webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
|
|
39
96
|
animation: sk-bouncedelay 1.4s infinite ease-in-out both;
|
|
40
97
|
}
|
|
98
|
+
|
|
41
99
|
.spinner .bounce1 {
|
|
42
100
|
-webkit-animation-delay: -0.32s;
|
|
43
101
|
animation-delay: -0.32s;
|
|
102
|
+
background-color: var(--themeColor)
|
|
44
103
|
}
|
|
104
|
+
|
|
45
105
|
.spinner .bounce2 {
|
|
46
106
|
-webkit-animation-delay: -0.16s;
|
|
47
107
|
animation-delay: -0.16s;
|
|
108
|
+
background-color: var(--themeColor);
|
|
109
|
+
opacity: 0.4
|
|
48
110
|
}
|
|
111
|
+
|
|
112
|
+
.spinner .bounce3 {
|
|
113
|
+
background-color: var(--themeColor);
|
|
114
|
+
opacity: 0.6
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
|
|
49
118
|
@-webkit-keyframes sk-bouncedelay {
|
|
50
119
|
0%, 80%, 100% { -webkit-transform: scale(0) }
|
|
51
120
|
40% { -webkit-transform: scale(1.0) }
|
|
52
121
|
}
|
|
122
|
+
|
|
53
123
|
@keyframes sk-bouncedelay {
|
|
54
124
|
0%, 80%, 100% {
|
|
55
|
-
|
|
56
|
-
|
|
125
|
+
-webkit-transform: scale(0);
|
|
126
|
+
transform: scale(0);
|
|
57
127
|
} 40% {
|
|
58
128
|
-webkit-transform: scale(1.0);
|
|
59
129
|
transform: scale(1.0);
|
|
60
130
|
}
|
|
61
131
|
}
|
|
62
|
-
/* END
|
|
132
|
+
/* ******BOUNCE SPINNER END****** */
|
|
@@ -1,113 +1,31 @@
|
|
|
1
|
-
import { Component, OnInit, OnDestroy, Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
// services
|
|
4
|
-
import { TypingService } from '../../providers/abstract/typing.service';
|
|
5
|
-
|
|
6
|
-
// Logger
|
|
7
|
-
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
8
|
-
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
1
|
+
import { Component, OnInit, OnDestroy, Input, ElementRef } from '@angular/core';
|
|
9
2
|
|
|
10
3
|
@Component({
|
|
11
|
-
selector: '
|
|
4
|
+
selector: 'user-typing',
|
|
12
5
|
templateUrl: './user-typing.component.html',
|
|
13
6
|
styleUrls: ['./user-typing.component.scss'],
|
|
14
7
|
})
|
|
15
8
|
export class UserTypingComponent implements OnInit, OnDestroy {
|
|
16
9
|
|
|
17
|
-
|
|
18
|
-
@Input() idCurrentUser: string;
|
|
19
|
-
@Input() isDirect: boolean;
|
|
10
|
+
// @Input() idConversation: string;
|
|
11
|
+
// @Input() idCurrentUser: string;
|
|
12
|
+
// @Input() isDirect: boolean;
|
|
13
|
+
@Input() typingLocation: string = 'content'
|
|
20
14
|
@Input() translationMap: Map<string, string>;
|
|
21
|
-
@Input()
|
|
22
|
-
@Input()
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
public isTyping = false;
|
|
26
|
-
public nameUserTypingNow: string;
|
|
27
|
-
|
|
28
|
-
private setTimeoutWritingMessages: any;
|
|
29
|
-
private subscriptions = [];
|
|
30
|
-
|
|
31
|
-
private logger: LoggerService = LoggerInstance.getInstance();
|
|
15
|
+
@Input() themeColor: string;
|
|
16
|
+
@Input() idUserTypingNow: string;
|
|
17
|
+
@Input() nameUserTypingNow: string;
|
|
18
|
+
// @Input() membersConversation: [string];
|
|
32
19
|
|
|
33
|
-
constructor(
|
|
34
|
-
public typingService: TypingService
|
|
35
|
-
) { }
|
|
20
|
+
constructor(private elementRef: ElementRef) { }
|
|
36
21
|
|
|
37
22
|
/** */
|
|
38
23
|
ngOnInit() {
|
|
39
|
-
this.
|
|
40
|
-
this.initialize();
|
|
24
|
+
this.elementRef.nativeElement.style.setProperty('--themeColor', this.themeColor);
|
|
41
25
|
}
|
|
42
26
|
|
|
43
27
|
/** */
|
|
44
28
|
ngOnDestroy() {
|
|
45
|
-
this.logger.log('UserTypingComponent - ngOnDestroy');
|
|
46
|
-
// this.unsubescribeAll();
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/** */
|
|
50
|
-
initialize() {
|
|
51
|
-
this.status = ''; // this.translationMap.get('LABEL_AVAILABLE');
|
|
52
|
-
this.logger.log('this.translationMap', this.translationMap);
|
|
53
|
-
this.logger.log('this.status', this.status);
|
|
54
|
-
this.setSubscriptions();
|
|
55
|
-
this.typingService.isTyping(this.idConversation, this.idCurrentUser, this.isDirect);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/** */
|
|
59
|
-
private setSubscriptions() {
|
|
60
|
-
const that = this;
|
|
61
|
-
const conversationSelected = this.subscriptions.find(item => item.key === this.idConversation);
|
|
62
|
-
if (!conversationSelected) {
|
|
63
|
-
const subscribeBSIsTyping = this.typingService.BSIsTyping.subscribe((data: any) => {
|
|
64
|
-
this.logger.log('***** BSIsTyping *****', data);
|
|
65
|
-
if (data) {
|
|
66
|
-
const isTypingUid = data.uid;
|
|
67
|
-
if (this.idConversation === isTypingUid) {
|
|
68
|
-
that.subscribeTypings(data);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
const subscribe = {key: this.idConversation, value: subscribeBSIsTyping };
|
|
73
|
-
this.subscriptions.push(subscribe);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/** */
|
|
78
|
-
subscribeTypings(data: any) {
|
|
79
|
-
const that = this;
|
|
80
|
-
try {
|
|
81
|
-
const key = data.uidUserTypingNow;
|
|
82
|
-
this.nameUserTypingNow = null;
|
|
83
|
-
if (data.nameUserTypingNow) {
|
|
84
|
-
this.nameUserTypingNow = data.nameUserTypingNow;
|
|
85
|
-
}
|
|
86
|
-
this.logger.log('subscribeTypings data:', data);
|
|
87
|
-
const userTyping = this.membersConversation.includes(key);
|
|
88
|
-
if ( !userTyping ) {
|
|
89
|
-
this.isTyping = true;
|
|
90
|
-
this.logger.log('child_changed key', key);
|
|
91
|
-
this.logger.log('child_changed name', this.nameUserTypingNow);
|
|
92
|
-
clearTimeout(this.setTimeoutWritingMessages);
|
|
93
|
-
this.setTimeoutWritingMessages = setTimeout(() => {
|
|
94
|
-
that.isTyping = false;
|
|
95
|
-
}, 2000);
|
|
96
|
-
}
|
|
97
|
-
} catch (error) {
|
|
98
|
-
this.logger.log('error: ', error);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
/** */
|
|
104
|
-
private unsubescribeAll() {
|
|
105
|
-
this.logger.log('UserTypingComponent unsubescribeAll: ', this.subscriptions);
|
|
106
|
-
this.subscriptions.forEach((subscription: any) => {
|
|
107
|
-
this.logger.log('unsubescribe: ', subscription);
|
|
108
|
-
subscription.unsubescribe();
|
|
109
|
-
});
|
|
110
|
-
this.subscriptions = [];
|
|
111
29
|
}
|
|
112
30
|
|
|
113
31
|
|
|
@@ -590,18 +590,24 @@ export function setConversationAvatar(
|
|
|
590
590
|
conversationWith: string,
|
|
591
591
|
conversationWithFullname: string,
|
|
592
592
|
conversationChannelType: string,
|
|
593
|
+
conversationWithEmail?: string,
|
|
594
|
+
projectId?: string,
|
|
595
|
+
project_name?: string,
|
|
593
596
|
width?: string,
|
|
594
|
-
height?: string
|
|
597
|
+
height?: string,
|
|
595
598
|
): any {
|
|
596
599
|
const conversationWidth = (width) ? width : '40px';
|
|
597
600
|
const conversationHeight = (height) ? height : '40px';
|
|
598
601
|
const conversationAvatar = {
|
|
599
602
|
uid: conversationWith,
|
|
600
|
-
conversation_with_fullname: conversationWithFullname,
|
|
601
603
|
conversation_with: conversationWith,
|
|
604
|
+
conversation_with_fullname: conversationWithFullname,
|
|
605
|
+
conversationWithEmail: conversationWithEmail,
|
|
602
606
|
channelType: conversationChannelType,
|
|
603
607
|
avatar: avatarPlaceholder(conversationWithFullname),
|
|
604
608
|
color: getColorBck(conversationWithFullname),
|
|
609
|
+
projectId: projectId,
|
|
610
|
+
project_name: project_name,
|
|
605
611
|
width: conversationWidth,
|
|
606
612
|
height: conversationHeight
|
|
607
613
|
};
|
|
@@ -694,15 +700,35 @@ export function isURL(str: string) {
|
|
|
694
700
|
}
|
|
695
701
|
}
|
|
696
702
|
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
703
|
+
export function convertColorToRGBA(color, opacity) {
|
|
704
|
+
let result = color;
|
|
705
|
+
// console.log('convertColorToRGBA' + color, opacity);
|
|
706
|
+
if ( color.indexOf('#') > -1 ) {
|
|
707
|
+
color = color.replace('#', '');
|
|
708
|
+
const r = parseInt(color.substring(0, 2), 16);
|
|
709
|
+
const g = parseInt(color.substring(2, 4), 16);
|
|
710
|
+
const b = parseInt(color.substring(4, 6), 16);
|
|
711
|
+
result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
|
|
712
|
+
} else if ( color.indexOf('rgba') > -1 ) {
|
|
713
|
+
const rgb = color.split(',');
|
|
714
|
+
const r = rgb[0].substring(5);
|
|
715
|
+
const g = rgb[1];
|
|
716
|
+
const b = rgb[2];
|
|
717
|
+
// const b = rgb[2].substring(1, rgb[2].length - 1);
|
|
718
|
+
result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
|
|
719
|
+
} else if ( color.indexOf('rgb(') > -1 ) {
|
|
720
|
+
const rgb = color.split(',');
|
|
721
|
+
// console.log(rgb);
|
|
722
|
+
const r = rgb[0].substring(4);
|
|
723
|
+
const g = rgb[1];
|
|
724
|
+
const b = rgb[2].substring(0, rgb[2].length - 1);
|
|
725
|
+
// console.log(b);
|
|
726
|
+
// console.log(rgb[2].length);
|
|
727
|
+
result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
|
|
728
|
+
}
|
|
729
|
+
// console.log('convertColorToRGBA' + color + result);
|
|
730
|
+
return result;
|
|
731
|
+
}
|
|
706
732
|
|
|
707
733
|
export function getParameterByName(name: string) {
|
|
708
734
|
var url = window.location.href;
|
|
@@ -810,6 +836,10 @@ export function redirect2(router, IDConv, conversationSelected) {
|
|
|
810
836
|
/** */
|
|
811
837
|
export function checkPlatformIsMobile() {
|
|
812
838
|
// console.log('UTILS - checkPlatformIsMobile:: ', window.innerWidth);
|
|
839
|
+
// if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
840
|
+
// return true
|
|
841
|
+
// }
|
|
842
|
+
// return false
|
|
813
843
|
if (window.innerWidth < 768) {
|
|
814
844
|
return true;
|
|
815
845
|
}
|