@chat21/chat21-ionic 3.0.80 → 3.0.81-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 +75 -3
- package/README.md +2 -2
- package/angular.json +1 -0
- package/deploy_amazon_beta.sh +29 -0
- package/deploy_amazon_prod.sh +30 -0
- package/package.json +2 -2
- package/src/app/app.component.html +7 -1
- package/src/app/app.component.scss +18 -2
- package/src/app/app.component.ts +113 -17
- package/src/app/app.module.ts +3 -1
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +8 -1
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +77 -23
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +168 -86
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +39 -2
- 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 -25
- 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 +1 -1
- 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 +62 -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 -8
- package/src/app/components/canned-response/canned-response.component.scss +24 -2
- package/src/app/components/canned-response/canned-response.component.ts +5 -5
- 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 +61 -42
- 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 +9 -25
- 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 +8 -6
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +25 -87
- package/src/app/components/conversation-info/info-content/info-content.component.html +2 -1
- package/src/app/components/conversation-info/info-content/info-content.component.ts +3 -2
- package/src/app/components/conversation-info/info-direct/info-direct.component.html +1 -9
- package/src/app/components/conversation-info/info-direct/info-direct.component.ts +0 -2
- 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/{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 +189 -0
- package/src/app/components/project-item/project-item.component.html +98 -149
- package/src/app/components/project-item/project-item.component.scss +42 -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 +3 -3
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +2 -7
- 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/contacts-directory/contacts-directory.page.html +1 -1
- package/src/app/pages/contacts-directory/contacts-directory.page.scss +41 -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 +40 -23
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +40 -250
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +184 -117
- package/src/app/pages/conversations-list/conversations-list.page.html +11 -8
- package/src/app/pages/conversations-list/conversations-list.page.scss +11 -2
- package/src/app/pages/conversations-list/conversations-list.page.ts +25 -22
- package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
- package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
- package/src/app/pages/loader-preview/loader-preview.page.scss +4 -0
- package/src/app/pages/loader-preview/loader-preview.page.ts +1 -2
- 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 +2 -26
- package/src/app/shared/shared.module.ts +24 -33
- package/src/assets/i18n/ar.json +278 -265
- package/src/assets/i18n/az.json +14 -1
- package/src/assets/i18n/de.json +15 -2
- package/src/assets/i18n/en.json +15 -2
- package/src/assets/i18n/es.json +15 -2
- package/src/assets/i18n/fr.json +14 -1
- package/src/assets/i18n/it.json +14 -1
- package/src/assets/i18n/kk.json +15 -2
- package/src/assets/i18n/pt.json +15 -2
- package/src/assets/i18n/ru.json +14 -1
- package/src/assets/i18n/sr.json +277 -264
- package/src/assets/i18n/sv.json +15 -2
- package/src/assets/i18n/tr.json +15 -2
- package/src/assets/i18n/uk.json +15 -2
- package/src/assets/i18n/uz.json +14 -1
- package/src/assets/js/chat21client.js +177 -149
- package/src/assets/sounds/interface-start.mp3 +0 -0
- package/src/assets/sounds/wheep-wheep.mp3 +0 -0
- package/src/chat-config-native-mqtt.json +5 -1
- 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/utils/constants.ts +6 -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 +38 -10
- package/src/global.scss +52 -56
- package/src/index.html +2 -2
- 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
|
@@ -27,5 +27,9 @@
|
|
|
27
27
|
"baseImageUrl": "https://console.native.tiledesk.com/api/",
|
|
28
28
|
"dashboardUrl": "https://console.native.tiledesk.com/dashboard/",
|
|
29
29
|
"testsiteBaseUrl":"https://console.native.tiledesk.com/widget/assets/twp/index.html",
|
|
30
|
-
"authPersistence": "LOCAL"
|
|
30
|
+
"authPersistence": "LOCAL",
|
|
31
|
+
"supportMode": true,
|
|
32
|
+
"archivedButton": true,
|
|
33
|
+
"writeToButton": true,
|
|
34
|
+
"wsUrl":"wss://console.native.tiledesk.com/mqws/ws"
|
|
31
35
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface Project {
|
|
2
|
+
_id: string;
|
|
3
|
+
updatedAt?: any;
|
|
4
|
+
createdAt?: any;
|
|
5
|
+
name?: string;
|
|
6
|
+
activeOperatingHours?: boolean;
|
|
7
|
+
operatingHours?: any
|
|
8
|
+
createdBy?: string;
|
|
9
|
+
id_project?: any;
|
|
10
|
+
widget?: any;
|
|
11
|
+
settings?: any;
|
|
12
|
+
role?: string;
|
|
13
|
+
user_available?: boolean;
|
|
14
|
+
profile_name?: any;
|
|
15
|
+
profile_agents?: any;
|
|
16
|
+
trial_expired?: any;
|
|
17
|
+
trial_days_left?: number;
|
|
18
|
+
trial_days?: number;
|
|
19
|
+
profile_type?: string;
|
|
20
|
+
subscription_is_active?: any;
|
|
21
|
+
profile?: any;
|
|
22
|
+
subscription_end_date?: any;
|
|
23
|
+
subscription_id?: any;
|
|
24
|
+
subscription_creation_date?: any;
|
|
25
|
+
subscription_start_date?: any;
|
|
26
|
+
__v?: any;
|
|
27
|
+
}
|
|
@@ -12,11 +12,11 @@ import 'firebase/database';
|
|
|
12
12
|
import { TypingService } from '../abstract/typing.service';
|
|
13
13
|
import { CustomLogger } from '../logger/customLogger';
|
|
14
14
|
import { LoggerInstance } from '../logger/loggerInstance';
|
|
15
|
+
import { TIME_TYPING_MESSAGE } from 'src/chat21-core/utils/constants';
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
export class TypingModel {
|
|
18
19
|
|
|
19
|
-
|
|
20
20
|
constructor(
|
|
21
21
|
public uid: string,
|
|
22
22
|
public timestamp: any,
|
|
@@ -35,14 +35,11 @@ export class FirebaseTypingService extends TypingService {
|
|
|
35
35
|
BSIsTyping: BehaviorSubject<any> = new BehaviorSubject<any>(null);
|
|
36
36
|
BSSetTyping: BehaviorSubject<any> = new BehaviorSubject<any>(null);
|
|
37
37
|
|
|
38
|
-
// public params
|
|
39
|
-
// public tenant: string;
|
|
40
|
-
private tenant: string;
|
|
41
|
-
|
|
42
|
-
// private params
|
|
43
38
|
private urlNodeTypings: string;
|
|
44
39
|
private setTimeoutWritingMessages: any;
|
|
40
|
+
private tenant: string;
|
|
45
41
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
42
|
+
private ref: firebase.database.Query;
|
|
46
43
|
|
|
47
44
|
constructor() {
|
|
48
45
|
super();
|
|
@@ -64,10 +61,11 @@ export class FirebaseTypingService extends TypingService {
|
|
|
64
61
|
urlTyping = this.urlNodeTypings + idCurrentUser + '/' + idConversation;
|
|
65
62
|
}
|
|
66
63
|
this.logger.debug('[FIREBASETypingSERVICE] urlTyping: ', urlTyping);
|
|
67
|
-
|
|
68
|
-
ref.on('child_changed', (childSnapshot) => {
|
|
64
|
+
this.ref = firebase.database().ref(urlTyping);
|
|
65
|
+
this.ref.on('child_changed', (childSnapshot) => {
|
|
69
66
|
const precence: TypingModel = childSnapshot.val();
|
|
70
|
-
this.
|
|
67
|
+
this.logger.debug('[FIREBASETypingSERVICE] child_changed: ', precence);
|
|
68
|
+
this.BSIsTyping.next({uid: idConversation, uidUserTypingNow: precence.uid, nameUserTypingNow: precence.name, waitTime: TIME_TYPING_MESSAGE});
|
|
71
69
|
});
|
|
72
70
|
}
|
|
73
71
|
|
|
@@ -43,8 +43,12 @@ export const CHANNEL_TYPE_GROUP = 'group';
|
|
|
43
43
|
// TYPES MESSAGES
|
|
44
44
|
export const TYPE_MSG_TEXT = 'text';
|
|
45
45
|
export const TYPE_MSG_IMAGE = 'image';
|
|
46
|
+
export const TYPE_MSG_FILE = 'file';
|
|
47
|
+
export const TYPE_MSG_BUTTON = 'button';
|
|
48
|
+
|
|
46
49
|
export const MAX_WIDTH_IMAGES = 300;
|
|
47
50
|
export const MIN_WIDTH_IMAGES = 130;
|
|
51
|
+
export const TIME_TYPING_MESSAGE = 2000;
|
|
48
52
|
export const TYPE_DIRECT = 'direct';
|
|
49
53
|
export const TYPE_GROUP = 'group';
|
|
50
54
|
export const SYSTEM = 'system';
|
|
@@ -69,7 +73,8 @@ export const TOUCHING_OPERATOR = "TOUCHING_OPERATOR";
|
|
|
69
73
|
// URLS
|
|
70
74
|
// export const URL_SOUND = 'assets/sounds/pling.mp3';
|
|
71
75
|
export const URL_SOUND_LIST_CONVERSATION = '/assets/sounds/pling.mp3';
|
|
72
|
-
export const
|
|
76
|
+
export const URL_SOUND_CONVERSATION_ADDED = '/assets/sounds/wheep-wheep.mp3';
|
|
77
|
+
export const URL_SOUND_CONVERSATION_UNASSIGNED = '/assets/sounds/interface-start.mp3'
|
|
73
78
|
// export const CHAT_SEND_BY_EMAIL_LINK =
|
|
74
79
|
// 'mailto:?subject=Transcript Chat Conversation&body=Salve,%0D%0A%0D%0Adi
|
|
75
80
|
// seguito potrà scaricare il transcript della conversazione intercorsa con il nostro servizio di
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TYPE_DIRECT, TYPE_SUPPORT_GROUP } from 'src/chat21-core/utils/constants';
|
|
2
|
+
import { ConversationModel } from 'src/chat21-core/models/conversation';
|
|
3
|
+
import { Inject, Injectable, OnInit } from '@angular/core';
|
|
4
|
+
import { avatarPlaceholder, getColorBck } from './utils-user';
|
|
5
|
+
import moment from 'moment';
|
|
6
|
+
|
|
7
|
+
@Injectable()
|
|
8
|
+
export class ConvertRequestToConversation {
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
initialize(){
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
getConvFromRequest(request: any): ConversationModel{
|
|
17
|
+
return new ConversationModel(
|
|
18
|
+
request.request_id,
|
|
19
|
+
request.attributes,
|
|
20
|
+
request.request_id && (request.request_id.startsWith('group-') || request.request_id.startsWith('support-group'))? TYPE_SUPPORT_GROUP: TYPE_DIRECT,
|
|
21
|
+
request.lead && request.lead.fullname ? request.lead.fullname: null,
|
|
22
|
+
request.requester_id,
|
|
23
|
+
request.lead && request.lead.fullname ? request.lead.fullname: null,
|
|
24
|
+
request.requester_id,
|
|
25
|
+
'',
|
|
26
|
+
true,
|
|
27
|
+
request.first_text,
|
|
28
|
+
request.first_text,
|
|
29
|
+
request.requester_id,
|
|
30
|
+
'',
|
|
31
|
+
request.lead && request.lead.fullname ? request.lead.fullname: null,
|
|
32
|
+
'0',
|
|
33
|
+
moment(request.createdAt).unix(),
|
|
34
|
+
getColorBck(request.lead.fullname),
|
|
35
|
+
avatarPlaceholder(request.lead.fullname),
|
|
36
|
+
false,
|
|
37
|
+
'text'
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
<div class="tile-typing-now"
|
|
2
|
-
<span *ngIf="nameUserTypingNow">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<div class="tile-typing-now" *ngIf="typingLocation === 'header'">
|
|
2
|
+
<span *ngIf="nameUserTypingNow">{{nameUserTypingNow}} </span>
|
|
3
|
+
{{ translationMap?.get('LABEL_WRITING') }}
|
|
4
|
+
</div>
|
|
5
|
+
<div class="spinner" *ngIf="typingLocation === 'content'">
|
|
6
|
+
<div class="bounce1"></div>
|
|
7
|
+
<div class="bounce2"></div>
|
|
8
|
+
<div class="bounce3"></div>
|
|
6
9
|
</div>
|
|
@@ -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,8 +590,10 @@ export function setConversationAvatar(
|
|
|
590
590
|
conversationWith: string,
|
|
591
591
|
conversationWithFullname: string,
|
|
592
592
|
conversationChannelType: string,
|
|
593
|
+
projectId?: string,
|
|
594
|
+
project_name?: string,
|
|
593
595
|
width?: string,
|
|
594
|
-
height?: string
|
|
596
|
+
height?: string,
|
|
595
597
|
): any {
|
|
596
598
|
const conversationWidth = (width) ? width : '40px';
|
|
597
599
|
const conversationHeight = (height) ? height : '40px';
|
|
@@ -602,6 +604,8 @@ export function setConversationAvatar(
|
|
|
602
604
|
channelType: conversationChannelType,
|
|
603
605
|
avatar: avatarPlaceholder(conversationWithFullname),
|
|
604
606
|
color: getColorBck(conversationWithFullname),
|
|
607
|
+
projectId: projectId,
|
|
608
|
+
project_name: project_name,
|
|
605
609
|
width: conversationWidth,
|
|
606
610
|
height: conversationHeight
|
|
607
611
|
};
|
|
@@ -694,15 +698,35 @@ export function isURL(str: string) {
|
|
|
694
698
|
}
|
|
695
699
|
}
|
|
696
700
|
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
701
|
+
export function convertColorToRGBA(color, opacity) {
|
|
702
|
+
let result = color;
|
|
703
|
+
// console.log('convertColorToRGBA' + color, opacity);
|
|
704
|
+
if ( color.indexOf('#') > -1 ) {
|
|
705
|
+
color = color.replace('#', '');
|
|
706
|
+
const r = parseInt(color.substring(0, 2), 16);
|
|
707
|
+
const g = parseInt(color.substring(2, 4), 16);
|
|
708
|
+
const b = parseInt(color.substring(4, 6), 16);
|
|
709
|
+
result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
|
|
710
|
+
} else if ( color.indexOf('rgba') > -1 ) {
|
|
711
|
+
const rgb = color.split(',');
|
|
712
|
+
const r = rgb[0].substring(5);
|
|
713
|
+
const g = rgb[1];
|
|
714
|
+
const b = rgb[2];
|
|
715
|
+
// const b = rgb[2].substring(1, rgb[2].length - 1);
|
|
716
|
+
result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
|
|
717
|
+
} else if ( color.indexOf('rgb(') > -1 ) {
|
|
718
|
+
const rgb = color.split(',');
|
|
719
|
+
// console.log(rgb);
|
|
720
|
+
const r = rgb[0].substring(4);
|
|
721
|
+
const g = rgb[1];
|
|
722
|
+
const b = rgb[2].substring(0, rgb[2].length - 1);
|
|
723
|
+
// console.log(b);
|
|
724
|
+
// console.log(rgb[2].length);
|
|
725
|
+
result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
|
|
726
|
+
}
|
|
727
|
+
// console.log('convertColorToRGBA' + color + result);
|
|
728
|
+
return result;
|
|
729
|
+
}
|
|
706
730
|
|
|
707
731
|
export function getParameterByName(name: string) {
|
|
708
732
|
var url = window.location.href;
|
|
@@ -810,6 +834,10 @@ export function redirect2(router, IDConv, conversationSelected) {
|
|
|
810
834
|
/** */
|
|
811
835
|
export function checkPlatformIsMobile() {
|
|
812
836
|
// console.log('UTILS - checkPlatformIsMobile:: ', window.innerWidth);
|
|
837
|
+
// if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
838
|
+
// return true
|
|
839
|
+
// }
|
|
840
|
+
// return false
|
|
813
841
|
if (window.innerWidth < 768) {
|
|
814
842
|
return true;
|
|
815
843
|
}
|
package/src/global.scss
CHANGED
|
@@ -362,19 +362,7 @@ app-message-text-area {
|
|
|
362
362
|
z-index: 99999; // nk
|
|
363
363
|
background: #fff; // nk
|
|
364
364
|
}
|
|
365
|
-
|
|
366
|
-
width: 100%;
|
|
367
|
-
}
|
|
368
|
-
app-bubble-system-message {
|
|
369
|
-
max-width: 80%;
|
|
370
|
-
margin: 0 auto;
|
|
371
|
-
}
|
|
372
|
-
app-bubble-my-message {
|
|
373
|
-
width: 100%;
|
|
374
|
-
}
|
|
375
|
-
app-bubble-others-message {
|
|
376
|
-
width: 100%;
|
|
377
|
-
}
|
|
365
|
+
|
|
378
366
|
app-conversation-info {
|
|
379
367
|
height: calc(100% - 60px);
|
|
380
368
|
}
|
|
@@ -436,6 +424,10 @@ select:-webkit-autofill:focus {
|
|
|
436
424
|
opacity: 10 !important;
|
|
437
425
|
cursor: pointer;
|
|
438
426
|
}
|
|
427
|
+
.native-textarea[disabled] {
|
|
428
|
+
opacity: 10 !important;
|
|
429
|
+
cursor: pointer;
|
|
430
|
+
}
|
|
439
431
|
}
|
|
440
432
|
|
|
441
433
|
|
|
@@ -795,66 +787,70 @@ select:-webkit-autofill:focus {
|
|
|
795
787
|
}
|
|
796
788
|
|
|
797
789
|
// select teammate status in user detail drawer
|
|
798
|
-
.
|
|
790
|
+
.teammate-status-in-drawer {
|
|
791
|
+
|
|
792
|
+
&.ng-select {
|
|
799
793
|
|
|
800
|
-
.ng-select-container {
|
|
801
|
-
background-color: #2d323e;
|
|
802
|
-
color: #fff;
|
|
803
|
-
border: 1px solid #2d323e;
|
|
804
|
-
}
|
|
805
|
-
&.ng-select-opened{
|
|
806
794
|
.ng-select-container {
|
|
807
795
|
background-color: #2d323e;
|
|
796
|
+
color: #fff;
|
|
808
797
|
border: 1px solid #2d323e;
|
|
809
798
|
}
|
|
799
|
+
&.ng-select-opened{
|
|
800
|
+
.ng-select-container {
|
|
801
|
+
background-color: #2d323e;
|
|
802
|
+
border: 1px solid #2d323e;
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
&.ng-select-focused:not(.ng-select-opened){
|
|
807
|
+
>.ng-select-container{
|
|
808
|
+
border: 1px solid #2d323e;
|
|
809
|
+
box-shadow: unset;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
|
|
810
814
|
}
|
|
811
815
|
|
|
812
|
-
|
|
813
|
-
|
|
816
|
+
.ng-dropdown-panel {
|
|
817
|
+
background-color: #2d323e;
|
|
818
|
+
border: 1px solid #2d323e;
|
|
819
|
+
|
|
820
|
+
&.ng-select-bottom {
|
|
814
821
|
border: 1px solid #2d323e;
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
822
|
+
margin-top: 8px;
|
|
823
|
+
border-top-right-radius: 4px;
|
|
824
|
+
border-top-left-radius: 4px;
|
|
825
|
+
}
|
|
819
826
|
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
.ng-dropdown-panel {
|
|
823
|
-
background-color: #2d323e;
|
|
824
|
-
border: 1px solid #2d323e;
|
|
825
|
-
|
|
826
|
-
&.ng-select-bottom {
|
|
827
|
-
border: 1px solid #2d323e;
|
|
828
|
-
margin-top: 8px;
|
|
829
|
-
border-top-right-radius: 4px;
|
|
830
|
-
border-top-left-radius: 4px;
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
.ng-dropdown-panel-items {
|
|
834
|
-
.ng-option {
|
|
835
|
-
background-color: #2d323e;
|
|
836
|
-
color: #fff;
|
|
837
|
-
|
|
838
|
-
&.ng-option-marked {
|
|
839
|
-
background-color: rgba(30, 33, 41, 0.3);
|
|
840
|
-
color: #fff;
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
&.ng-option-selected {
|
|
827
|
+
.ng-dropdown-panel-items {
|
|
828
|
+
.ng-option {
|
|
844
829
|
background-color: #2d323e;
|
|
845
830
|
color: #fff;
|
|
831
|
+
|
|
832
|
+
&.ng-option-marked {
|
|
833
|
+
background-color: rgba(30, 33, 41, 0.3);
|
|
834
|
+
color: #fff;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
&.ng-option-selected {
|
|
838
|
+
background-color: #2d323e;
|
|
839
|
+
color: #fff;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
&.ng-option-marked.ng-option-selected{
|
|
843
|
+
background-color: rgba(30, 33, 41, 0.3);
|
|
844
|
+
color: #fff;
|
|
845
|
+
}
|
|
846
846
|
}
|
|
847
|
-
|
|
848
|
-
&.ng-option-marked.ng-option-selected{
|
|
849
|
-
background-color: rgba(30, 33, 41, 0.3);
|
|
850
|
-
color: #fff;
|
|
851
|
-
}
|
|
847
|
+
|
|
852
848
|
}
|
|
853
|
-
|
|
854
849
|
}
|
|
855
850
|
}
|
|
856
851
|
|
|
857
852
|
|
|
853
|
+
|
|
858
854
|
/* *** SMALL SIDEBAR STYLE *** */
|
|
859
855
|
.small-sidebar-tiledesk-nav-user {
|
|
860
856
|
height: 40px;
|