@chat21/chat21-ionic 3.0.79 → 3.0.80-rc.1
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 +62 -2
- package/README.md +2 -2
- package/package.json +1 -1
- package/src/app/app.component.html +7 -1
- package/src/app/app.component.scss +18 -2
- package/src/app/app.component.ts +73 -15
- 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 +75 -23
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +162 -85
- 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 +7 -19
- 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/html/html.component.ts +0 -1
- package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +2 -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 +4 -4
- package/src/app/components/canned-response/canned-response.component.scss +1 -1
- package/src/app/components/canned-response/canned-response.component.ts +1 -0
- 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/message-text-area/message-text-area.component.html +6 -5
- 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 +4 -83
- 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 +183 -72
- 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 +1 -25
- 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/sounds/wheep-wheep.mp3 +0 -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/utils/constants.ts +5 -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 +48 -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
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,72 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
### 3.0.80-rc.1
|
|
5
|
+
- changed: moved sender_fullname inside bubble-message component
|
|
6
|
+
- changed: publish onConversationSelect event to stop audio after agent has clicked on it
|
|
7
|
+
- bug-fixed: /null loading flag_url in sidebar-user-detail
|
|
8
|
+
|
|
9
|
+
### 3.0.79 in PROD
|
|
4
10
|
- added: segment analytics events
|
|
5
11
|
|
|
6
|
-
|
|
12
|
+
### 3.0.79-rc.4
|
|
13
|
+
- bug-fixed: testsiteBaseUrl wrong value env property
|
|
14
|
+
|
|
15
|
+
### 3.0.79-rc.3
|
|
16
|
+
- added: segment analytics for SignIn-SignOut-Resolved-MsgAdded-ConvAdded
|
|
17
|
+
- added: navbar component if not mobile
|
|
18
|
+
- added: NAVBAR translations
|
|
19
|
+
- changed: minor improvements on UI
|
|
20
|
+
- changed: ion-split-pane UI if mobile
|
|
21
|
+
- changed: moved hover 'add canned' button from bubble-message to ion-conversation-detail component
|
|
22
|
+
- changed: moved addNewCanned to tiledesk service to canned-responses service
|
|
23
|
+
- bug-fixed: open/close detail icon not aligned correctly on click 'close'
|
|
24
|
+
|
|
25
|
+
### 3.0.79-rc.2
|
|
26
|
+
- added: new sound if new conversation is triggered in agent's chat
|
|
27
|
+
- changed: header UI of header-conversation-detail and unassigned-conversations components
|
|
28
|
+
|
|
29
|
+
### 3.0.79-rc.1
|
|
30
|
+
- added: LABEL_ONLINE, LABEL_OFFLINE translations
|
|
31
|
+
- changed: renamed ddp-header with conversations-list-header
|
|
32
|
+
- changed: unified control to mobile/desktop app
|
|
33
|
+
- changed: LABEL_AVAILABLE/NOT_AVAILABLE with LABEL_ONLINE/OFFLINE in user-presence component
|
|
34
|
+
- changed: icon to user-presence
|
|
35
|
+
- changed: UI for conversation-list, conversation-detail and info-group for desktop and mobile
|
|
36
|
+
- changed: renamed option-header component with header-conversations-list-archived
|
|
37
|
+
- changed: contacts-directory UI
|
|
38
|
+
- bug-fixed: if app is opened and user press width expand, move correctly the right position
|
|
39
|
+
|
|
40
|
+
## 3.0.78 in PROD
|
|
41
|
+
- bug-fixed: unassigned request not sound the if is the first at all
|
|
42
|
+
- bug-fixed: canned responses opens in incorrect mode
|
|
43
|
+
|
|
44
|
+
### 3.0.78-rc.4
|
|
7
45
|
- bug-fixed: unassigned request not sound the if is the first at all
|
|
46
|
+
- bug-fixed: translations missed
|
|
47
|
+
- bug-fixed: direct info not showed in conversation-header component
|
|
48
|
+
- removed: conversation-footer border top
|
|
49
|
+
- changed: colors to message-text-area icons and message-attachment components
|
|
50
|
+
|
|
51
|
+
### 3.0.78-rc.3
|
|
52
|
+
- changed: user-typing location moved from conversation-header to conversation-detail component
|
|
53
|
+
- changed: replace includes with startsWith for check what type of conversation is in project info conversation-list component
|
|
54
|
+
- added: styleMap integrations to some elements
|
|
55
|
+
- bug-fixed: no tooltip showed if no unserved request are present
|
|
56
|
+
|
|
57
|
+
### 3.0.78-rc.2
|
|
58
|
+
- changed: project item UI and tooltip msg
|
|
59
|
+
- changed: conversation UI in conversations list component
|
|
60
|
+
- changed: conversation detail header component
|
|
61
|
+
- added: open/close info-conversation moved from conversation-header to conversation detail component
|
|
8
62
|
- bug-fixed: canned responses opens in incorrect mode
|
|
9
63
|
|
|
64
|
+
### 3.0.78-rc.1
|
|
65
|
+
- changed: conversation-list page width increased
|
|
66
|
+
- changed: background changed in info-message component
|
|
67
|
+
- changed: project-item UI
|
|
68
|
+
- changed: conversation-list page UI
|
|
69
|
+
|
|
10
70
|
## 3.0.77 in PROD
|
|
11
71
|
|
|
12
72
|
### 3.0.77-rc.3
|
package/README.md
CHANGED
|
@@ -100,8 +100,8 @@ Use [Docker Compose Tiledesk installation guide](https://github.com/Tiledesk/til
|
|
|
100
100
|
},
|
|
101
101
|
"apiUrl": "https://<YOUR-TILEDESK-API-URL>",
|
|
102
102
|
"baseImageUrl": "https://<YOUR-BASE-IMAGE-URL>",
|
|
103
|
-
"dashboardUrl": "https://<YOUR-DASHBOARD-URL>"
|
|
104
|
-
"testsiteBaseUrl": "https:<YOUR-WIDGET-URL>/test_widget_page/index.html"
|
|
103
|
+
"dashboardUrl": "https://<YOUR-DASHBOARD-URL>"
|
|
104
|
+
"testsiteBaseUrl": "https:<YOUR-WIDGET-URL>/test_widget_page/index.html"
|
|
105
105
|
"wsUrl": 'ws://' + window.location.hostname + '/ws/',
|
|
106
106
|
}
|
|
107
107
|
};
|
package/package.json
CHANGED
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
<app-network-offline></app-network-offline>
|
|
7
7
|
|
|
8
|
+
|
|
9
|
+
<app-navbar *ngIf="!IS_ON_MOBILE_DEVICE"
|
|
10
|
+
[isSoundEnabled]="isSoundEnabled"
|
|
11
|
+
(onSoundChange)="onSoundChange($event)">
|
|
12
|
+
</app-navbar>
|
|
13
|
+
|
|
8
14
|
<div class="sidebar" [ngClass]="{'hide-sidebar': IS_ONLINE === false || IS_ON_MOBILE_DEVICE === true || SUPPORT_MODE === false}">
|
|
9
15
|
<app-sidebar></app-sidebar>
|
|
10
16
|
</div>
|
|
@@ -13,7 +19,7 @@
|
|
|
13
19
|
<app-sidebar-user-details> </app-sidebar-user-details>
|
|
14
20
|
</div>
|
|
15
21
|
|
|
16
|
-
<ion-split-pane when="md" contentId="main">
|
|
22
|
+
<ion-split-pane when="md" contentId="main" [ngClass]="{'mobile': IS_ON_MOBILE_DEVICE}">
|
|
17
23
|
<!-- 'sidebar-visible': IS_ONLINE === true && SUPPORT_MODE === true, -->
|
|
18
24
|
<ion-nav #sidebarNav [root]="sidebarPage" [ngClass]="{'sidebar-hidden': IS_ON_MOBILE_DEVICE === true || SUPPORT_MODE === false}"></ion-nav>
|
|
19
25
|
<!-- our side menu -->
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
.split-pane-md.split-pane-visible > .split-pane-side {
|
|
2
|
-
min-width: 312px;
|
|
2
|
+
min-width: 360px; //312px;
|
|
3
3
|
display: block; // Safari bug fix
|
|
4
|
-
margin-left:
|
|
4
|
+
margin-left: var(--sidebar-width);
|
|
5
|
+
--border: 0px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.split-pane-md:not(.mobile){
|
|
9
|
+
height: calc( 100% - var(--nav-bar-heigth));
|
|
10
|
+
margin-top: var(--nav-bar-heigth);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.navbar{
|
|
14
|
+
display: flex;
|
|
15
|
+
position: fixed;
|
|
16
|
+
top: 0px;
|
|
5
17
|
}
|
|
6
18
|
|
|
7
19
|
.sidebar-visible {
|
|
@@ -20,6 +32,10 @@
|
|
|
20
32
|
left: 60px
|
|
21
33
|
}
|
|
22
34
|
|
|
35
|
+
// ion-nav {
|
|
36
|
+
// background-color: var(--list-bkg-color);
|
|
37
|
+
// }
|
|
38
|
+
|
|
23
39
|
// @media (min-width: 768px) {
|
|
24
40
|
// .split-pane-md.split-pane-visible > .split-pane-side {
|
|
25
41
|
// min-width: 312px;
|
package/src/app/app.component.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
|
|
1
2
|
import { TYPE_DIRECT, TYPE_SUPPORT_GROUP } from 'src/chat21-core/utils/constants';
|
|
2
|
-
import { tranlatedLanguage, URL_SOUND_LIST_CONVERSATION } from './../chat21-core/utils/constants';
|
|
3
|
+
import { tranlatedLanguage, URL_SOUND_CONVERSATION_ADDED, URL_SOUND_LIST_CONVERSATION } from './../chat21-core/utils/constants';
|
|
3
4
|
import { ArchivedConversationsHandlerService } from 'src/chat21-core/providers/abstract/archivedconversations-handler.service';
|
|
4
5
|
import { AppStorageService } from 'src/chat21-core/providers/abstract/app-storage.service';
|
|
5
6
|
|
|
@@ -87,11 +88,13 @@ export class AppComponent implements OnInit {
|
|
|
87
88
|
public authModal: any;
|
|
88
89
|
|
|
89
90
|
private audio: any;
|
|
91
|
+
private audio_NewConv: any;
|
|
90
92
|
private setIntervalTime: any;
|
|
91
93
|
private setTimeoutSound: any;
|
|
92
94
|
private isTabVisible: boolean = true;
|
|
93
|
-
|
|
95
|
+
public isSoundEnabled: boolean;
|
|
94
96
|
private hasPlayed: boolean;
|
|
97
|
+
private hasPlayedConversation: boolean;
|
|
95
98
|
private tabTitle: string;
|
|
96
99
|
private setTimeoutConversationsEvent: any;
|
|
97
100
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
@@ -831,6 +834,10 @@ export class AppComponent implements OnInit {
|
|
|
831
834
|
this.audio.src = chatBaseUrl + URL_SOUND_LIST_CONVERSATION;
|
|
832
835
|
this.audio.load();
|
|
833
836
|
|
|
837
|
+
this.audio_NewConv = new Audio();
|
|
838
|
+
this.audio_NewConv.src = chatBaseUrl + URL_SOUND_CONVERSATION_ADDED;
|
|
839
|
+
this.audio_NewConv.load();
|
|
840
|
+
|
|
834
841
|
const sound_status = localStorage.getItem('dshbrd----sound')
|
|
835
842
|
if(sound_status && sound_status !== 'undefined'){
|
|
836
843
|
this.isSoundEnabled = sound_status === 'enabled'? true: false
|
|
@@ -840,7 +847,14 @@ export class AppComponent implements OnInit {
|
|
|
840
847
|
|
|
841
848
|
}
|
|
842
849
|
|
|
843
|
-
|
|
850
|
+
onSoundChange(event){
|
|
851
|
+
if(event && event !== undefined){
|
|
852
|
+
localStorage.setItem('dshbrd----sound', event)
|
|
853
|
+
this.isSoundEnabled = event === 'enabled'? true: false
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
private manageTabNotification(sound_type: string, badgeNotificationCount?: number) {
|
|
844
858
|
if (!this.isTabVisible) {
|
|
845
859
|
// TAB IS HIDDEN --> manage title and SOUND
|
|
846
860
|
let badgeNewConverstionNumber = badgeNotificationCount? badgeNotificationCount : this.conversationsHandlerService.countIsNew()
|
|
@@ -864,7 +878,9 @@ export class AppComponent implements OnInit {
|
|
|
864
878
|
this.isSoundEnabled = sound_status === 'enabled'? true: false
|
|
865
879
|
}
|
|
866
880
|
this.logger.debug('[APP-COMP] manageTabNotification can saund?', this.isInitialized, this.isSoundEnabled)
|
|
867
|
-
if(this.isInitialized && this.isSoundEnabled)
|
|
881
|
+
if(this.isInitialized && this.isSoundEnabled) {
|
|
882
|
+
sound_type === 'conv_added'? this.soundConversationAdded(): this.soundMessage();
|
|
883
|
+
}
|
|
868
884
|
}
|
|
869
885
|
|
|
870
886
|
soundMessage() {
|
|
@@ -880,7 +896,7 @@ export class AppComponent implements OnInit {
|
|
|
880
896
|
// }, 4000);
|
|
881
897
|
|
|
882
898
|
//play sound every 4s from the fist time you receive a conversation added/changed
|
|
883
|
-
if(!this.hasPlayed){
|
|
899
|
+
if(!this.hasPlayed && !this.hasPlayedConversation){
|
|
884
900
|
that.audio.play().then(() => {
|
|
885
901
|
that.hasPlayed = true
|
|
886
902
|
that.logger.debug('[APP-COMP] ****** soundMessage played *****');
|
|
@@ -892,6 +908,21 @@ export class AppComponent implements OnInit {
|
|
|
892
908
|
});
|
|
893
909
|
}
|
|
894
910
|
}
|
|
911
|
+
|
|
912
|
+
soundConversationAdded(){
|
|
913
|
+
const that = this;
|
|
914
|
+
if(!this.hasPlayedConversation ){
|
|
915
|
+
that.audio_NewConv.play().then(() => {
|
|
916
|
+
that.hasPlayedConversation = true
|
|
917
|
+
that.logger.debug('[APP-COMP] ****** soundConversationAdded played *****');
|
|
918
|
+
setTimeout(() => {
|
|
919
|
+
that.hasPlayedConversation = false
|
|
920
|
+
}, 4000);
|
|
921
|
+
}).catch((error: any) => {
|
|
922
|
+
that.logger.error('[APP-COMP] ***soundConversationAdded error*', error);
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
}
|
|
895
926
|
/**---------------- SOUND FUNCTIONS --> END <--- +*/
|
|
896
927
|
/***************************************************+*/
|
|
897
928
|
|
|
@@ -939,11 +970,11 @@ export class AppComponent implements OnInit {
|
|
|
939
970
|
this.events.subscribe('uidConvSelected:changed', this.subscribeChangedConversationSelected);
|
|
940
971
|
this.events.subscribe('profileInfoButtonClick:logout', this.subscribeProfileInfoButtonLogOut);
|
|
941
972
|
this.events.subscribe('unservedRequest:count', this.subscribeUnservedRequestCount)
|
|
942
|
-
|
|
973
|
+
this.events.subscribe('convList:onConversationSelected', this.subscribeConversationSelected)
|
|
943
974
|
this.conversationsHandlerService.conversationAdded.subscribe((conversation: ConversationModel) => {
|
|
944
975
|
// this.logger.log('[APP-COMP] ***** subscribeConversationAdded *****', conversation);
|
|
945
976
|
if (conversation && conversation.is_new === true) {
|
|
946
|
-
this.manageTabNotification()
|
|
977
|
+
this.manageTabNotification('conv_added')
|
|
947
978
|
}
|
|
948
979
|
if(conversation) this.updateConversationsOnStorage()
|
|
949
980
|
});
|
|
@@ -961,7 +992,7 @@ export class AppComponent implements OnInit {
|
|
|
961
992
|
this.logger.log('[APP-COMP] ***** subscribeConversationChangedDetailed currentUser: ', currentUser);
|
|
962
993
|
if (changes.value && changes.value.sender !== currentUser.uid) {
|
|
963
994
|
if(changes.value.is_new === changes.previousValue.is_new){
|
|
964
|
-
this.manageTabNotification();
|
|
995
|
+
this.manageTabNotification('new_message');
|
|
965
996
|
}
|
|
966
997
|
}
|
|
967
998
|
}
|
|
@@ -973,7 +1004,6 @@ export class AppComponent implements OnInit {
|
|
|
973
1004
|
this.updateConversationsOnStorage();
|
|
974
1005
|
isDevMode()? null: this.segmentResolved(conversation)
|
|
975
1006
|
}
|
|
976
|
-
|
|
977
1007
|
});
|
|
978
1008
|
}
|
|
979
1009
|
|
|
@@ -1019,7 +1049,6 @@ export class AppComponent implements OnInit {
|
|
|
1019
1049
|
this.initConversationsHandler(currentUser.uid);
|
|
1020
1050
|
this.initArchivedConversationsHandler(currentUser.uid);
|
|
1021
1051
|
isDevMode()? null: this.segmentSignIn()
|
|
1022
|
-
|
|
1023
1052
|
}
|
|
1024
1053
|
this.checkPlatform();
|
|
1025
1054
|
try {
|
|
@@ -1060,7 +1089,7 @@ export class AppComponent implements OnInit {
|
|
|
1060
1089
|
|
|
1061
1090
|
// this.unsubscribe$.next();
|
|
1062
1091
|
// this.unsubscribe$.complete();
|
|
1063
|
-
|
|
1092
|
+
|
|
1064
1093
|
}
|
|
1065
1094
|
|
|
1066
1095
|
goToDashboardLogin(){
|
|
@@ -1121,7 +1150,7 @@ export class AppComponent implements OnInit {
|
|
|
1121
1150
|
}
|
|
1122
1151
|
|
|
1123
1152
|
subscribeProfileInfoButtonLogOut = (hasClickedLogout) => {
|
|
1124
|
-
this.logger.log('[APP-COMP] FIREBASE-NOTIFICATION >>>> subscribeProfileInfoButtonLogOut');
|
|
1153
|
+
this.logger.log('[APP-COMP] FIREBASE-NOTIFICATION >>>> subscribeProfileInfoButtonLogOut ');
|
|
1125
1154
|
// if (hasClickedLogout === true) {
|
|
1126
1155
|
// this.removePresenceAndLogout()
|
|
1127
1156
|
// }
|
|
@@ -1142,6 +1171,7 @@ export class AppComponent implements OnInit {
|
|
|
1142
1171
|
|
|
1143
1172
|
if (res === 'success') {
|
|
1144
1173
|
that.removePresenceAndLogout();
|
|
1174
|
+
|
|
1145
1175
|
} else {
|
|
1146
1176
|
that.removePresenceAndLogout();
|
|
1147
1177
|
// that.presentToast();
|
|
@@ -1155,13 +1185,19 @@ export class AppComponent implements OnInit {
|
|
|
1155
1185
|
|
|
1156
1186
|
subscribeUnservedRequestCount = (unservedRequestCount) => {
|
|
1157
1187
|
if(unservedRequestCount && unservedRequestCount > 0){
|
|
1158
|
-
this.logger.debug("
|
|
1188
|
+
this.logger.debug("appIsInitialized::::",this.isInitialized)
|
|
1159
1189
|
if(this.isInitialized){
|
|
1160
1190
|
this.manageTabNotification(unservedRequestCount) //sound and alternate title
|
|
1161
1191
|
}
|
|
1162
1192
|
}
|
|
1163
1193
|
}
|
|
1164
1194
|
|
|
1195
|
+
subscribeConversationSelected= (conversation: ConversationModel) => {
|
|
1196
|
+
if(conversation && conversation.is_new){
|
|
1197
|
+
this.audio_NewConv.pause()
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1165
1201
|
private async presentModal(calledby): Promise<any> {
|
|
1166
1202
|
this.logger.log('[APP-COMP] presentModal calledby', calledby, '- hadBeenCalledOpenModal: ', this.hadBeenCalledOpenModal);
|
|
1167
1203
|
const attributes = { tenant: this.tenant, enableBackdropDismiss: false };
|
|
@@ -1270,7 +1306,7 @@ export class AppComponent implements OnInit {
|
|
|
1270
1306
|
}
|
|
1271
1307
|
|
|
1272
1308
|
private segmentSignIn(){
|
|
1273
|
-
let user = this.tiledeskAuthService.getCurrentUser()
|
|
1309
|
+
let user = this.tiledeskAuthService.getCurrentUser()
|
|
1274
1310
|
try {
|
|
1275
1311
|
window['analytics'].page("Chat Auth Page, Signin", {});
|
|
1276
1312
|
} catch (err) {
|
|
@@ -1300,7 +1336,7 @@ export class AppComponent implements OnInit {
|
|
|
1300
1336
|
|
|
1301
1337
|
|
|
1302
1338
|
private segmentSignedOut(){
|
|
1303
|
-
let user = this.tiledeskAuthService.getCurrentUser()
|
|
1339
|
+
let user = this.tiledeskAuthService.getCurrentUser()
|
|
1304
1340
|
try {
|
|
1305
1341
|
window['analytics'].page("Chat Auth Page, Signed Out", {});
|
|
1306
1342
|
} catch (err) {
|
|
@@ -1385,6 +1421,7 @@ export class AppComponent implements OnInit {
|
|
|
1385
1421
|
}
|
|
1386
1422
|
}
|
|
1387
1423
|
|
|
1424
|
+
|
|
1388
1425
|
@HostListener('document:visibilitychange', [])
|
|
1389
1426
|
visibilitychange() {
|
|
1390
1427
|
// this.logger.debug("document TITLE", document.hidden, document.title);
|
|
@@ -1448,5 +1485,26 @@ export class AppComponent implements OnInit {
|
|
|
1448
1485
|
this.isSoundEnabled = event.newValue === 'enabled'? true: false
|
|
1449
1486
|
}
|
|
1450
1487
|
}
|
|
1488
|
+
|
|
1489
|
+
|
|
1490
|
+
// @HostListener('mouseenter', ['$event'])
|
|
1491
|
+
// onMouseEnter(event: any) {
|
|
1492
|
+
// console.log('HostListener onMouseEnter-->', event)
|
|
1493
|
+
// }
|
|
1494
|
+
|
|
1495
|
+
// @HostListener('mouseleave', ['$event'])
|
|
1496
|
+
// onMouseLeave(event: any) {
|
|
1497
|
+
// console.log('HostListener onMouseLeave-->', event)
|
|
1498
|
+
// }
|
|
1499
|
+
|
|
1500
|
+
// @HostListener('focus', ['$event'])
|
|
1501
|
+
// onFocus(event: any) {
|
|
1502
|
+
// console.log('HostListener onFocus-->', event)
|
|
1503
|
+
// }
|
|
1504
|
+
|
|
1505
|
+
// @HostListener('blur', ['$event'])
|
|
1506
|
+
// onBlur(event: any) {
|
|
1507
|
+
// console.log('HostListener onBlur-->', event)
|
|
1508
|
+
// }
|
|
1451
1509
|
}
|
|
1452
1510
|
|
package/src/app/app.module.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConvertRequestToConversation } from './../chat21-core/utils/convertRequestToConversation';
|
|
1
2
|
import { LogLevel, PUSH_ENGINE_FIREBASE, PUSH_ENGINE_MQTT } from './../chat21-core/utils/constants';
|
|
2
3
|
import { CustomLogger } from 'src/chat21-core/providers/logger/customLogger';
|
|
3
4
|
import { NgModule, ErrorHandler, APP_INITIALIZER } from '@angular/core';
|
|
@@ -369,7 +370,8 @@ const appInitializerFn = (appConfig: AppConfigProvider, logger: NGXLogger) => {
|
|
|
369
370
|
EventsService,
|
|
370
371
|
Chooser,
|
|
371
372
|
Chat21Service,
|
|
372
|
-
WebSocketJs
|
|
373
|
+
WebSocketJs,
|
|
374
|
+
ConvertRequestToConversation
|
|
373
375
|
]
|
|
374
376
|
})
|
|
375
377
|
export class AppModule { }
|
package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts
CHANGED
|
@@ -17,11 +17,18 @@ export class ConversationContentComponent implements OnInit {
|
|
|
17
17
|
@Input() messages: MessageModel[]
|
|
18
18
|
@Input() senderId: string;
|
|
19
19
|
@Input() baseLocation: string;
|
|
20
|
+
@Input() isConversationArchived: boolean;
|
|
21
|
+
@Input() isTypings: boolean;
|
|
22
|
+
@Input() idUserTypingNow: string;
|
|
23
|
+
@Input() nameUserTypingNow: string;
|
|
24
|
+
@Input() typingLocation: string;
|
|
25
|
+
@Input() fullscreenMode: boolean;
|
|
20
26
|
@Input() translationMap: Map<string, string>;
|
|
21
27
|
@Input() stylesMap: Map<string, string>;
|
|
22
28
|
@Output() onBeforeMessageRender = new EventEmitter();
|
|
23
29
|
@Output() onAfterMessageRender = new EventEmitter();
|
|
24
|
-
@Output() onMenuOptionShow = new EventEmitter();
|
|
30
|
+
@Output() onMenuOptionShow = new EventEmitter<boolean>();
|
|
31
|
+
@Output() onEmojiiPickerShow = new EventEmitter<boolean>()
|
|
25
32
|
@Output() onAttachmentButtonClicked = new EventEmitter();
|
|
26
33
|
@Output() onScrollContent = new EventEmitter();
|
|
27
34
|
|
|
@@ -52,8 +52,19 @@
|
|
|
52
52
|
<!-- ----------------------------------------------------------- -->
|
|
53
53
|
<!-- nk - no tag ionic -->
|
|
54
54
|
<!-- ----------------------------------------------------------- -->
|
|
55
|
+
<div class="manage_conversation_info_container" [ngClass]="{'close': !openInfoConversation, 'mobile': isMobile}">
|
|
56
|
+
<ion-button fill="clear" *ngIf="openInfoConversation" (click)="onOpenCloseInfoConversationFN()">
|
|
57
|
+
<ion-icon name="arrow-forward-outline"></ion-icon>
|
|
58
|
+
{{translationMap.get('LABEL_CLOSE_GROUP')}}
|
|
59
|
+
</ion-button>
|
|
60
|
+
<ion-button fill="clear" *ngIf="!openInfoConversation" (click)="onOpenCloseInfoConversationFN()">
|
|
61
|
+
<ion-icon name="arrow-back-outline"></ion-icon>
|
|
62
|
+
{{translationMap.get('LABEL_OPEN_INFO_CONVERSATION')}}
|
|
63
|
+
</ion-button>
|
|
64
|
+
</div>
|
|
55
65
|
|
|
56
66
|
<div class="conversation-wpr" style="height: 100%;">
|
|
67
|
+
|
|
57
68
|
<div *ngFor="let message of messages; let i = index; let first = first; trackBy: trackByFn">
|
|
58
69
|
|
|
59
70
|
<ng-container *ngIf="first || (messages[i - 1].timestamp | date:'d') !== (message.timestamp | date:'d')">
|
|
@@ -77,16 +88,27 @@
|
|
|
77
88
|
<!-- message SENDER:: -->
|
|
78
89
|
<div role="messaggio" *ngIf="messageType(MESSAGE_TYPE_MINE, message)" class="msg_container base_sent">
|
|
79
90
|
|
|
91
|
+
<div class="message-date-hover"> {{message.timestamp | date:'HH:mm' }} </div>
|
|
92
|
+
|
|
93
|
+
<ng-container *ngIf="areVisibleCAR && supportMode">
|
|
94
|
+
<ion-button shape="round" size="small" class="btn-add-msg canned" ion-button fill="clear"
|
|
95
|
+
(click)="presentCreateCannedResponseModal(message)" [tooltip]="addAsCannedResponseTooltipText"
|
|
96
|
+
[options]="tooltipOptions" placement="bottom">
|
|
97
|
+
<ion-icon slot="icon-only" name="flash-outline" style="font-size: 1em;"> </ion-icon>
|
|
98
|
+
<span class="add-canned-response-add-icon">+</span>
|
|
99
|
+
</ion-button>
|
|
100
|
+
</ng-container>
|
|
101
|
+
|
|
80
102
|
<!--backgroundColor non viene ancora usato -->
|
|
81
103
|
<chat-bubble-message class="messages msg_sent" id="message_msg_sent" style="position: relative;"
|
|
82
104
|
[ngClass]="{'has-metadata': (isImage(message) || isFrame(message)), 'privateMsg': (message?.attributes && message?.attributes?.subtype === 'private')}"
|
|
83
105
|
[class.emoticon]="isEmojii(message?.text)"
|
|
106
|
+
[ngStyle]="{'background': stylesMap.get('bubbleSentBackground'), 'color': stylesMap.get('bubbleSentTextColor')}"
|
|
84
107
|
[ngClass]="{'button-in-msg' : message.metadata && message.metadata.button}"
|
|
85
108
|
[message]="message"
|
|
86
|
-
[
|
|
87
|
-
[
|
|
88
|
-
[
|
|
89
|
-
[supportMode]="supportMode"
|
|
109
|
+
[fontColor]="stylesMap.get('bubbleSentTextColor')"
|
|
110
|
+
[fontSize]="stylesMap.get('fontSize')"
|
|
111
|
+
[fontFamily]="stylesMap.get('fontFamily')"
|
|
90
112
|
(onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
|
|
91
113
|
(onAfterMessageRender)="onAfterMessageRenderFN($event)"
|
|
92
114
|
(onElementRendered)="onElementRenderedFN($event)">
|
|
@@ -101,13 +123,14 @@
|
|
|
101
123
|
|
|
102
124
|
</div>
|
|
103
125
|
|
|
104
|
-
<!-- message RECIPIENT:: -->
|
|
105
|
-
<div
|
|
106
|
-
class="message_sender_fullname">
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
126
|
+
<!-- message RECIPIENT + TIME :: -->
|
|
127
|
+
<!-- <div class="msg_container base_receive" *ngIf="messageType(MESSAGE_TYPE_OTHERS, message) && isChannelTypeGroup(channelType) && !isSameSender(message?.sender, i)">
|
|
128
|
+
<div role="messaggio" class="message_sender_fullname">
|
|
129
|
+
{{message.sender_fullname}}
|
|
130
|
+
</div>
|
|
131
|
+
<div class="message-date"> {{message.timestamp | date:'HH:mm' }} </div>
|
|
132
|
+
</div> -->
|
|
133
|
+
<!-- message RECIPIENT :: -->
|
|
111
134
|
<div role="messaggio" *ngIf="messageType(MESSAGE_TYPE_OTHERS, message)" class="msg_container base_receive">
|
|
112
135
|
|
|
113
136
|
<!-- <chat-avatar-image class="slide-in-left"
|
|
@@ -117,19 +140,37 @@
|
|
|
117
140
|
</chat-avatar-image> -->
|
|
118
141
|
|
|
119
142
|
<!--backgroundColor non viene ancora usato -->
|
|
120
|
-
|
|
121
|
-
<chat-bubble-message class="messages msg_receive" id="message_msg_receive" style="position: relative;"
|
|
143
|
+
<chat-bubble-message class="messages msg_receive" id="message_msg_receive"
|
|
122
144
|
[ngClass]="{'has-metadata': (isImage(message) || isFrame(message)), 'privateMsg': (message?.attributes && message?.attributes?.subtype === 'private')}"
|
|
123
145
|
[class.emoticon]="isEmojii(message?.text)"
|
|
146
|
+
[ngStyle]="{'background': stylesMap?.get('bubbleReceivedBackground'), 'color': stylesMap.get('bubbleReceivedTextColor')}"
|
|
147
|
+
[isSameSender]="isSameSender(message?.sender, i)"
|
|
124
148
|
[message]="message"
|
|
125
|
-
[
|
|
126
|
-
[
|
|
127
|
-
[
|
|
128
|
-
[supportMode]="supportMode"
|
|
149
|
+
[fontColor]="stylesMap?.get('bubbleReceivedTextColor')"
|
|
150
|
+
[fontSize]="stylesMap?.get('fontSize')"
|
|
151
|
+
[fontFamily]="stylesMap?.get('fontFamily')"
|
|
129
152
|
(onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
|
|
130
153
|
(onAfterMessageRender)="onAfterMessageRenderFN($event)"
|
|
131
154
|
(onElementRendered)="onElementRenderedFN($event)">
|
|
132
155
|
</chat-bubble-message>
|
|
156
|
+
|
|
157
|
+
<ng-container *ngIf="areVisibleCAR && supportMode">
|
|
158
|
+
<ion-button shape="round" size="small" class="btn-add-msg canned" ion-button fill="clear"
|
|
159
|
+
(click)="presentCreateCannedResponseModal(message)" [tooltip]="addAsCannedResponseTooltipText"
|
|
160
|
+
[options]="tooltipOptions" placement="bottom">
|
|
161
|
+
<ion-icon slot="icon-only" name="flash-outline" style="font-size: 1em;"> </ion-icon>
|
|
162
|
+
<span class="add-canned-response-add-icon">+</span>
|
|
163
|
+
</ion-button>
|
|
164
|
+
</ng-container>
|
|
165
|
+
<!-- <ng-container *ngIf="supportMode">
|
|
166
|
+
<ion-button shape="round" size="small" class="btn-add-msg emoji" ion-button fill="clear"
|
|
167
|
+
(click)="presentEmojiiModal()" tooltip="{{addAsCannedResponseTooltipText}}"
|
|
168
|
+
[options]="tooltipOptions" placement="bottom">
|
|
169
|
+
<ion-icon slot="icon-only" name="happy-outline" style="font-size: 1em;"> </ion-icon>
|
|
170
|
+
</ion-button>
|
|
171
|
+
</ng-container> -->
|
|
172
|
+
|
|
173
|
+
<div class="message-date-hover" *ngIf="isChannelTypeGroup(channelType)"> {{message.timestamp | date:'HH:mm' }} </div>
|
|
133
174
|
</div>
|
|
134
175
|
|
|
135
176
|
<!-- message type:: button && -->
|
|
@@ -147,15 +188,26 @@
|
|
|
147
188
|
|
|
148
189
|
<!-- uploadProgress -> {{ uploadProgress }} -->
|
|
149
190
|
<div *ngIf="uploadProgress !== 100" class="msg_container base_sent" style="margin-right: 20px;">
|
|
150
|
-
<div class="
|
|
151
|
-
<div class="
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
</div>
|
|
191
|
+
<div class="chat21-spinner active" id="chat21-spinner" style="margin: 0px 6px 0px;">
|
|
192
|
+
<div class="chat21-bounce1" [ngStyle]="{'background-color': stylesMap.get('themeColor')}"></div>
|
|
193
|
+
<div class="chat21-bounce2" [ngStyle]="{'background-color': stylesMap.get('themeColor'), 'opacity': 0.4}"></div>
|
|
194
|
+
<div class="chat21-bounce3" [ngStyle]="{'background-color': stylesMap.get('themeColor'), 'opacity': 0.6}"></div>
|
|
195
|
+
<!-- <span [ngStyle]="{'color': stylesMap.get('themeColor')}">{{translationMap.get('LABEL_LOADING')}}</span> -->
|
|
156
196
|
</div>
|
|
157
197
|
</div>
|
|
158
198
|
|
|
199
|
+
<div *ngIf="isTypings" class="msg_container base_receive typing_container">
|
|
200
|
+
<!-- !isSameSender(idUserTypingNow, i) -->
|
|
201
|
+
<!-- <div *ngIf="nameUserTypingNow">{{nameUserTypingNow}}</div> -->
|
|
202
|
+
<user-typing
|
|
203
|
+
[themeColor]="stylesMap?.get('themeColor')"
|
|
204
|
+
[translationMap]="translationMap"
|
|
205
|
+
[idUserTypingNow]="idUserTypingNow"
|
|
206
|
+
[nameUserTypingNow]="nameUserTypingNow">
|
|
207
|
+
</user-typing>
|
|
208
|
+
<div class="typing_info" *ngIf="nameUserTypingNow"> {{nameUserTypingNow}} {{translationMap.get('LABEL_IS_WRITING')}}</div>
|
|
209
|
+
</div>
|
|
210
|
+
|
|
159
211
|
</div>
|
|
160
212
|
|
|
161
213
|
<!-- fileType > {{fileType }} uploadProgress {{uploadProgress}} -->
|