@chat21/chat21-ionic 3.0.79-rc.3 → 3.0.79

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.
Files changed (134) hide show
  1. package/CHANGELOG.md +3 -51
  2. package/README.md +2 -2
  3. package/package.json +1 -1
  4. package/src/app/app.component.html +1 -7
  5. package/src/app/app.component.scss +2 -18
  6. package/src/app/app.component.ts +30 -78
  7. package/src/app/app.module.ts +1 -3
  8. package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +1 -8
  9. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +22 -73
  10. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +85 -162
  11. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +2 -39
  12. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +19 -1
  13. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +10 -1
  14. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +23 -4
  15. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +1 -5
  16. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +15 -22
  17. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +5 -25
  18. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +1 -2
  19. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +15 -14
  20. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +5 -24
  21. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +1 -6
  22. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +13 -12
  23. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +5 -26
  24. package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +2 -2
  25. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +6 -16
  26. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +3 -1
  27. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +0 -2
  28. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +52 -78
  29. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +20 -62
  30. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +10 -14
  31. package/src/app/components/canned-response/canned-response.component.html +4 -4
  32. package/src/app/components/canned-response/canned-response.component.scss +1 -1
  33. package/src/app/components/canned-response/canned-response.component.ts +0 -1
  34. package/src/app/components/contacts-directory/contacts-directory.component.html +26 -22
  35. package/src/app/components/contacts-directory/contacts-directory.component.scss +6 -8
  36. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +3 -0
  37. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +21 -0
  38. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +24 -0
  39. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +14 -0
  40. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +54 -0
  41. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +98 -0
  42. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.spec.ts → conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts} +6 -6
  43. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +84 -0
  44. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +30 -0
  45. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +83 -0
  46. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +24 -0
  47. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +68 -0
  48. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +3 -0
  49. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +10 -0
  50. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +24 -0
  51. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +14 -0
  52. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +42 -61
  53. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +61 -98
  54. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +25 -9
  55. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +5 -6
  56. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
  57. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +82 -3
  58. package/src/app/components/conversation-detail/option-header/option-header.component.html +13 -0
  59. package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
  60. package/src/app/components/{conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.spec.ts → conversation-detail/option-header/option-header.component.spec.ts} +5 -5
  61. package/src/app/components/{conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.ts → conversation-detail/option-header/option-header.component.ts} +4 -5
  62. package/src/app/components/conversation-info/info-content/info-content.component.html +1 -2
  63. package/src/app/components/conversation-info/info-content/info-content.component.ts +2 -3
  64. package/src/app/components/conversation-info/info-direct/info-direct.component.html +9 -1
  65. package/src/app/components/conversation-info/info-direct/info-direct.component.ts +2 -0
  66. package/src/app/components/conversation-info/info-group/info-group.component.html +108 -44
  67. package/src/app/components/conversation-info/info-group/info-group.component.scss +61 -101
  68. package/src/app/components/conversation-info/info-group/info-group.component.ts +0 -1
  69. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.html → ddp-header/ddp-header.component.html} +3 -3
  70. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.scss → ddp-header/ddp-header.component.scss} +4 -16
  71. package/src/app/components/{navbar/navbar.component.spec.ts → ddp-header/ddp-header.component.spec.ts} +6 -6
  72. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.ts → ddp-header/ddp-header.component.ts} +16 -7
  73. package/src/app/components/project-item/project-item.component.html +149 -98
  74. package/src/app/components/project-item/project-item.component.scss +32 -39
  75. package/src/app/components/project-item/project-item.component.ts +4 -16
  76. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +3 -3
  77. package/src/app/components/utils/user-presence/user-presence.component.html +2 -7
  78. package/src/app/components/utils/user-presence/user-presence.component.scss +18 -35
  79. package/src/app/components/utils/user-presence/user-presence.component.ts +10 -6
  80. package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
  81. package/src/app/pages/contacts-directory/contacts-directory.page.scss +0 -41
  82. package/src/app/pages/contacts-directory/contacts-directory.page.ts +0 -2
  83. package/src/app/pages/conversation-detail/conversation-detail.module.ts +8 -0
  84. package/src/app/pages/conversation-detail/conversation-detail.page.html +23 -40
  85. package/src/app/pages/conversation-detail/conversation-detail.page.scss +250 -40
  86. package/src/app/pages/conversation-detail/conversation-detail.page.ts +66 -186
  87. package/src/app/pages/conversations-list/conversations-list.page.html +8 -11
  88. package/src/app/pages/conversations-list/conversations-list.page.scss +2 -11
  89. package/src/app/pages/conversations-list/conversations-list.page.ts +51 -43
  90. package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
  91. package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
  92. package/src/app/pages/loader-preview/loader-preview.page.scss +0 -4
  93. package/src/app/pages/profile-info/profile-info.page.html +4 -2
  94. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
  95. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +0 -42
  96. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +0 -1
  97. package/src/app/services/canned-responses/canned-responses.service.ts +0 -26
  98. package/src/app/services/tiledesk/tiledesk.service.ts +25 -1
  99. package/src/app/shared/shared.module.ts +33 -24
  100. package/src/assets/i18n/ar.json +265 -278
  101. package/src/assets/i18n/az.json +1 -14
  102. package/src/assets/i18n/de.json +2 -15
  103. package/src/assets/i18n/en.json +2 -15
  104. package/src/assets/i18n/es.json +2 -15
  105. package/src/assets/i18n/fr.json +1 -14
  106. package/src/assets/i18n/it.json +1 -14
  107. package/src/assets/i18n/kk.json +2 -15
  108. package/src/assets/i18n/pt.json +2 -15
  109. package/src/assets/i18n/ru.json +1 -14
  110. package/src/assets/i18n/sr.json +264 -277
  111. package/src/assets/i18n/sv.json +2 -15
  112. package/src/assets/i18n/tr.json +2 -15
  113. package/src/assets/i18n/uk.json +2 -15
  114. package/src/assets/i18n/uz.json +1 -14
  115. package/src/chat21-core/models/conversation.ts +1 -0
  116. package/src/chat21-core/providers/firebase/firebase-typing.service.ts +9 -7
  117. package/src/chat21-core/utils/constants.ts +1 -5
  118. package/src/chat21-core/utils/user-typing/user-typing.component.html +5 -8
  119. package/src/chat21-core/utils/user-typing/user-typing.component.scss +17 -87
  120. package/src/chat21-core/utils/user-typing/user-typing.component.ts +94 -12
  121. package/src/chat21-core/utils/utils.ts +1 -9
  122. package/src/global.scss +56 -48
  123. package/src/index.html +2 -2
  124. package/src/variables.scss +10 -30
  125. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +0 -12
  126. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +0 -14
  127. package/src/app/components/navbar/navbar.component.html +0 -103
  128. package/src/app/components/navbar/navbar.component.scss +0 -249
  129. package/src/app/components/navbar/navbar.component.ts +0 -189
  130. package/src/app/services/projects/projects.service.spec.ts +0 -12
  131. package/src/app/services/projects/projects.service.ts +0 -43
  132. package/src/assets/sounds/wheep-wheep.mp3 +0 -0
  133. package/src/chat21-core/models/projects.ts +0 -27
  134. package/src/chat21-core/utils/convertRequestToConversation.ts +0 -41
package/CHANGELOG.md CHANGED
@@ -1,60 +1,12 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
- ### 3.0.79-rc.3
4
- - added: segment analytics for SignIn-SignOut-Resolved-MsgAdded-ConvAdded
5
- - added: navbar component if not mobile
6
- - added: NAVBAR translations
7
- - changed: minor improvements on UI
8
- - changed: ion-split-pane UI if mobile
9
- - changed: moved hover 'add canned' button from bubble-message to ion-conversation-detail component
10
- - changed: moved addNewCanned to tiledesk service to canned-responses service
11
- - bug-fixed: open/close detail icon not aligned correctly on click 'close'
12
-
13
- ### 3.0.79-rc.2
14
- - added: new sound if new conversation is triggered in agent's chat
15
- - changed: header UI of header-conversation-detail and unassigned-conversations components
16
-
17
- ### 3.0.79-rc.1
18
- - added: LABEL_ONLINE, LABEL_OFFLINE translations
19
- - changed: renamed ddp-header with conversations-list-header
20
- - changed: unified control to mobile/desktop app
21
- - changed: LABEL_AVAILABLE/NOT_AVAILABLE with LABEL_ONLINE/OFFLINE in user-presence component
22
- - changed: icon to user-presence
23
- - changed: UI for conversation-list, conversation-detail and info-group for desktop and mobile
24
- - changed: renamed option-header component with header-conversations-list-archived
25
- - changed: contacts-directory UI
26
- - bug-fixed: if app is opened and user press width expand, move correctly the right position
27
-
28
- ## 3.0.78 in PROD
29
- - bug-fixed: unassigned request not sound the if is the first at all
30
- - bug-fixed: canned responses opens in incorrect mode
3
+ ## 3.0.79 in PROD
4
+ - added: segment analytics events
31
5
 
32
- ### 3.0.78-rc.4
6
+ ## 3.0.78 in PROD
33
7
  - bug-fixed: unassigned request not sound the if is the first at all
34
- - bug-fixed: translations missed
35
- - bug-fixed: direct info not showed in conversation-header component
36
- - removed: conversation-footer border top
37
- - changed: colors to message-text-area icons and message-attachment components
38
-
39
- ### 3.0.78-rc.3
40
- - changed: user-typing location moved from conversation-header to conversation-detail component
41
- - changed: replace includes with startsWith for check what type of conversation is in project info conversation-list component
42
- - added: styleMap integrations to some elements
43
- - bug-fixed: no tooltip showed if no unserved request are present
44
-
45
- ### 3.0.78-rc.2
46
- - changed: project item UI and tooltip msg
47
- - changed: conversation UI in conversations list component
48
- - changed: conversation detail header component
49
- - added: open/close info-conversation moved from conversation-header to conversation detail component
50
8
  - bug-fixed: canned responses opens in incorrect mode
51
9
 
52
- ### 3.0.78-rc.1
53
- - changed: conversation-list page width increased
54
- - changed: background changed in info-message component
55
- - changed: project-item UI
56
- - changed: conversation-list page UI
57
-
58
10
  ## 3.0.77 in PROD
59
11
 
60
12
  ### 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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
3
  "author": "Tiledesk SRL",
4
- "version": "3.0.79-rc.3",
4
+ "version": "3.0.79",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -5,12 +5,6 @@
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
-
14
8
  <div class="sidebar" [ngClass]="{'hide-sidebar': IS_ONLINE === false || IS_ON_MOBILE_DEVICE === true || SUPPORT_MODE === false}">
15
9
  <app-sidebar></app-sidebar>
16
10
  </div>
@@ -19,7 +13,7 @@
19
13
  <app-sidebar-user-details> </app-sidebar-user-details>
20
14
  </div>
21
15
 
22
- <ion-split-pane when="md" contentId="main" [ngClass]="{'mobile': IS_ON_MOBILE_DEVICE}">
16
+ <ion-split-pane when="md" contentId="main">
23
17
  <!-- 'sidebar-visible': IS_ONLINE === true && SUPPORT_MODE === true, -->
24
18
  <ion-nav #sidebarNav [root]="sidebarPage" [ngClass]="{'sidebar-hidden': IS_ON_MOBILE_DEVICE === true || SUPPORT_MODE === false}"></ion-nav>
25
19
  <!-- our side menu -->
@@ -1,19 +1,7 @@
1
1
  .split-pane-md.split-pane-visible > .split-pane-side {
2
- min-width: 360px; //312px;
2
+ min-width: 312px;
3
3
  display: block; // Safari bug fix
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;
4
+ margin-left: 60px;
17
5
  }
18
6
 
19
7
  .sidebar-visible {
@@ -32,10 +20,6 @@
32
20
  left: 60px
33
21
  }
34
22
 
35
- // ion-nav {
36
- // background-color: var(--list-bkg-color);
37
- // }
38
-
39
23
  // @media (min-width: 768px) {
40
24
  // .split-pane-md.split-pane-visible > .split-pane-side {
41
25
  // min-width: 312px;
@@ -1,5 +1,5 @@
1
1
  import { TYPE_DIRECT, TYPE_SUPPORT_GROUP } from 'src/chat21-core/utils/constants';
2
- import { tranlatedLanguage, URL_SOUND_CONVERSATION_ADDED, URL_SOUND_LIST_CONVERSATION } from './../chat21-core/utils/constants';
2
+ import { tranlatedLanguage, URL_SOUND_LIST_CONVERSATION } from './../chat21-core/utils/constants';
3
3
  import { ArchivedConversationsHandlerService } from 'src/chat21-core/providers/abstract/archivedconversations-handler.service';
4
4
  import { AppStorageService } from 'src/chat21-core/providers/abstract/app-storage.service';
5
5
 
@@ -87,13 +87,11 @@ export class AppComponent implements OnInit {
87
87
  public authModal: any;
88
88
 
89
89
  private audio: any;
90
- private audio_NewConv: any;
91
90
  private setIntervalTime: any;
92
91
  private setTimeoutSound: any;
93
92
  private isTabVisible: boolean = true;
94
- public isSoundEnabled: boolean;
93
+ private isSoundEnabled: boolean;
95
94
  private hasPlayed: boolean;
96
- private hasPlayedConversation: boolean;
97
95
  private tabTitle: string;
98
96
  private setTimeoutConversationsEvent: any;
99
97
  private logger: LoggerService = LoggerInstance.getInstance();
@@ -833,10 +831,6 @@ export class AppComponent implements OnInit {
833
831
  this.audio.src = chatBaseUrl + URL_SOUND_LIST_CONVERSATION;
834
832
  this.audio.load();
835
833
 
836
- this.audio_NewConv = new Audio();
837
- this.audio_NewConv.src = chatBaseUrl + URL_SOUND_CONVERSATION_ADDED;
838
- this.audio_NewConv.load();
839
-
840
834
  const sound_status = localStorage.getItem('dshbrd----sound')
841
835
  if(sound_status && sound_status !== 'undefined'){
842
836
  this.isSoundEnabled = sound_status === 'enabled'? true: false
@@ -846,14 +840,7 @@ export class AppComponent implements OnInit {
846
840
 
847
841
  }
848
842
 
849
- onSoundChange(event){
850
- if(event && event !== undefined){
851
- localStorage.setItem('dshbrd----sound', event)
852
- this.isSoundEnabled = event === 'enabled'? true: false
853
- }
854
- }
855
-
856
- private manageTabNotification(sound_type: string, badgeNotificationCount?: number) {
843
+ private manageTabNotification(badgeNotificationCount?: number) {
857
844
  if (!this.isTabVisible) {
858
845
  // TAB IS HIDDEN --> manage title and SOUND
859
846
  let badgeNewConverstionNumber = badgeNotificationCount? badgeNotificationCount : this.conversationsHandlerService.countIsNew()
@@ -877,9 +864,7 @@ export class AppComponent implements OnInit {
877
864
  this.isSoundEnabled = sound_status === 'enabled'? true: false
878
865
  }
879
866
  this.logger.debug('[APP-COMP] manageTabNotification can saund?', this.isInitialized, this.isSoundEnabled)
880
- if(this.isInitialized && this.isSoundEnabled) {
881
- sound_type === 'conv_added'? this.soundConversationAdded(): this.soundMessage();
882
- }
867
+ if(this.isInitialized && this.isSoundEnabled) this.soundMessage()
883
868
  }
884
869
 
885
870
  soundMessage() {
@@ -895,7 +880,7 @@ export class AppComponent implements OnInit {
895
880
  // }, 4000);
896
881
 
897
882
  //play sound every 4s from the fist time you receive a conversation added/changed
898
- if(!this.hasPlayed && !this.hasPlayedConversation){
883
+ if(!this.hasPlayed){
899
884
  that.audio.play().then(() => {
900
885
  that.hasPlayed = true
901
886
  that.logger.debug('[APP-COMP] ****** soundMessage played *****');
@@ -907,22 +892,6 @@ export class AppComponent implements OnInit {
907
892
  });
908
893
  }
909
894
  }
910
-
911
- soundConversationAdded(){
912
- const that = this;
913
- console.log('soundConversationAdded ENABLEDDDD-->', this.hasPlayed)
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
- }
926
895
  /**---------------- SOUND FUNCTIONS --> END <--- +*/
927
896
  /***************************************************+*/
928
897
 
@@ -974,7 +943,7 @@ export class AppComponent implements OnInit {
974
943
  this.conversationsHandlerService.conversationAdded.subscribe((conversation: ConversationModel) => {
975
944
  // this.logger.log('[APP-COMP] ***** subscribeConversationAdded *****', conversation);
976
945
  if (conversation && conversation.is_new === true) {
977
- this.manageTabNotification('conv_added')
946
+ this.manageTabNotification()
978
947
  }
979
948
  if(conversation) this.updateConversationsOnStorage()
980
949
  });
@@ -992,7 +961,7 @@ export class AppComponent implements OnInit {
992
961
  this.logger.log('[APP-COMP] ***** subscribeConversationChangedDetailed currentUser: ', currentUser);
993
962
  if (changes.value && changes.value.sender !== currentUser.uid) {
994
963
  if(changes.value.is_new === changes.previousValue.is_new){
995
- this.manageTabNotification('new_message');
964
+ this.manageTabNotification();
996
965
  }
997
966
  }
998
967
  }
@@ -1004,6 +973,7 @@ export class AppComponent implements OnInit {
1004
973
  this.updateConversationsOnStorage();
1005
974
  isDevMode()? null: this.segmentResolved(conversation)
1006
975
  }
976
+
1007
977
  });
1008
978
  }
1009
979
 
@@ -1048,7 +1018,8 @@ export class AppComponent implements OnInit {
1048
1018
 
1049
1019
  this.initConversationsHandler(currentUser.uid);
1050
1020
  this.initArchivedConversationsHandler(currentUser.uid);
1051
- isDevMode()? null: this.segmentSignIn(currentUser)
1021
+ isDevMode()? null: this.segmentSignIn()
1022
+
1052
1023
  }
1053
1024
  this.checkPlatform();
1054
1025
  try {
@@ -1070,8 +1041,6 @@ export class AppComponent implements OnInit {
1070
1041
  if (this.SUPPORT_MODE === true) {
1071
1042
  this.webSocketClose()
1072
1043
  }
1073
- const currentUser = this.tiledeskAuthService.getCurrentUser();
1074
- isDevMode()? null: this.segmentSignedOut(currentUser)
1075
1044
  // this.isOnline = false;
1076
1045
  // this.conversationsHandlerService.conversations = [];
1077
1046
  this.chatManager.setTiledeskToken(null);
@@ -1091,7 +1060,7 @@ export class AppComponent implements OnInit {
1091
1060
 
1092
1061
  // this.unsubscribe$.next();
1093
1062
  // this.unsubscribe$.complete();
1094
-
1063
+
1095
1064
  }
1096
1065
 
1097
1066
  goToDashboardLogin(){
@@ -1152,13 +1121,14 @@ export class AppComponent implements OnInit {
1152
1121
  }
1153
1122
 
1154
1123
  subscribeProfileInfoButtonLogOut = (hasClickedLogout) => {
1155
- this.logger.log('[APP-COMP] FIREBASE-NOTIFICATION >>>> subscribeProfileInfoButtonLogOut ');
1124
+ this.logger.log('[APP-COMP] FIREBASE-NOTIFICATION >>>> subscribeProfileInfoButtonLogOut');
1156
1125
  // if (hasClickedLogout === true) {
1157
1126
  // this.removePresenceAndLogout()
1158
1127
  // }
1159
1128
 
1160
1129
 
1161
1130
  if (hasClickedLogout === true) {
1131
+ isDevMode()? null: this.segmentSignedOut()
1162
1132
  this.appStorageService.removeItem('conversations')
1163
1133
  this.isInitialized = false;
1164
1134
  // ----------------------------------------------
@@ -1185,7 +1155,7 @@ export class AppComponent implements OnInit {
1185
1155
 
1186
1156
  subscribeUnservedRequestCount = (unservedRequestCount) => {
1187
1157
  if(unservedRequestCount && unservedRequestCount > 0){
1188
- this.logger.debug("appIsInitialized::::",this.isInitialized)
1158
+ this.logger.debug("hasToSoundUnservedRequestCount::::", this.isInitialized)
1189
1159
  if(this.isInitialized){
1190
1160
  this.manageTabNotification(unservedRequestCount) //sound and alternate title
1191
1161
  }
@@ -1274,6 +1244,7 @@ export class AppComponent implements OnInit {
1274
1244
  that.logger.debug('[APP-COMP] updateConversationsOnStorage: reset timer and save conversations -> ', this.conversationsHandlerService.conversations.length)
1275
1245
  that.appStorageService.setItem('conversations', JSON.stringify(that.conversationsHandlerService.conversations))
1276
1246
  that.isInitialized = true;
1247
+ this.events.publish('appComp:appIsInitialized', true)
1277
1248
  }, 10000);
1278
1249
  }
1279
1250
 
@@ -1298,7 +1269,8 @@ export class AppComponent implements OnInit {
1298
1269
  }
1299
1270
  }
1300
1271
 
1301
- segmentSignIn(user: UserModel){
1272
+ private segmentSignIn(){
1273
+ let user = this.tiledeskAuthService.getCurrentUser();
1302
1274
  try {
1303
1275
  window['analytics'].page("Chat Auth Page, Signin", {});
1304
1276
  } catch (err) {
@@ -1327,7 +1299,8 @@ export class AppComponent implements OnInit {
1327
1299
  }
1328
1300
 
1329
1301
 
1330
- segmentSignedOut(user: UserModel){
1302
+ private segmentSignedOut(){
1303
+ let user = this.tiledeskAuthService.getCurrentUser();
1331
1304
  try {
1332
1305
  window['analytics'].page("Chat Auth Page, Signed Out", {});
1333
1306
  } catch (err) {
@@ -1363,7 +1336,7 @@ export class AppComponent implements OnInit {
1363
1336
  }
1364
1337
  }
1365
1338
 
1366
- segmentResolved(conversation: ConversationModel){
1339
+ private segmentResolved(conversation: ConversationModel){
1367
1340
  let user = this.tiledeskAuthService.getCurrentUser();
1368
1341
  try {
1369
1342
  window['analytics'].page("Chat List Conversations Page, Chat Resolved", {});
@@ -1389,9 +1362,8 @@ export class AppComponent implements OnInit {
1389
1362
  "conversation_id": conversation.uid,
1390
1363
  "channel_type": conversation.channel_type,
1391
1364
  "conversation_with":(conversation.channel_type !== TYPE_DIRECT)? null: conversation.conversation_with,
1392
- "conversation_with_fullname": (conversation.channel_type !== TYPE_DIRECT)? null: conversation.conversation_with_fullname,
1393
1365
  "department_name":(conversation.channel_type !== TYPE_DIRECT)? conversation.attributes.departmentName: null,
1394
- "department_id":(conversation.channel_type !== TYPE_DIRECT)? conversation.attributes.departmentId: null,
1366
+ "department_id":(conversation.channel_type !== TYPE_DIRECT)? conversation.attributes.departmentId: null
1395
1367
  },
1396
1368
  { "context": {
1397
1369
  "groupId": (conversation.channel_type !== TYPE_DIRECT)? conversation.attributes.projectId: null
@@ -1401,17 +1373,18 @@ export class AppComponent implements OnInit {
1401
1373
  this.logger.error('Event:Chat Resolved [track] error', err);
1402
1374
  }
1403
1375
 
1404
- try {
1405
- window['analytics'].group(conversation.attributes.projectId, {
1406
- name: (conversation.attributes.project_name)? conversation.attributes.project_name : null,
1407
- // plan: projectProfileName,
1408
- });
1409
- } catch (err) {
1410
- this.logger.error('Event:Chat Resolved [group] error', err);
1376
+ if(conversation.channel_type !== TYPE_DIRECT){
1377
+ try {
1378
+ window['analytics'].group(conversation.attributes.projectId, {
1379
+ name: (conversation.attributes.project_name)? conversation.attributes.project_name : null,
1380
+ // plan: projectProfileName,
1381
+ });
1382
+ } catch (err) {
1383
+ this.logger.error('Event:Chat Resolved [group] error', err);
1384
+ }
1411
1385
  }
1412
1386
  }
1413
1387
 
1414
-
1415
1388
  @HostListener('document:visibilitychange', [])
1416
1389
  visibilitychange() {
1417
1390
  // this.logger.debug("document TITLE", document.hidden, document.title);
@@ -1475,26 +1448,5 @@ export class AppComponent implements OnInit {
1475
1448
  this.isSoundEnabled = event.newValue === 'enabled'? true: false
1476
1449
  }
1477
1450
  }
1478
-
1479
-
1480
- // @HostListener('mouseenter', ['$event'])
1481
- // onMouseEnter(event: any) {
1482
- // console.log('HostListener onMouseEnter-->', event)
1483
- // }
1484
-
1485
- // @HostListener('mouseleave', ['$event'])
1486
- // onMouseLeave(event: any) {
1487
- // console.log('HostListener onMouseLeave-->', event)
1488
- // }
1489
-
1490
- // @HostListener('focus', ['$event'])
1491
- // onFocus(event: any) {
1492
- // console.log('HostListener onFocus-->', event)
1493
- // }
1494
-
1495
- // @HostListener('blur', ['$event'])
1496
- // onBlur(event: any) {
1497
- // console.log('HostListener onBlur-->', event)
1498
- // }
1499
1451
  }
1500
1452
 
@@ -1,4 +1,3 @@
1
- import { ConvertRequestToConversation } from './../chat21-core/utils/convertRequestToConversation';
2
1
  import { LogLevel, PUSH_ENGINE_FIREBASE, PUSH_ENGINE_MQTT } from './../chat21-core/utils/constants';
3
2
  import { CustomLogger } from 'src/chat21-core/providers/logger/customLogger';
4
3
  import { NgModule, ErrorHandler, APP_INITIALIZER } from '@angular/core';
@@ -370,8 +369,7 @@ const appInitializerFn = (appConfig: AppConfigProvider, logger: NGXLogger) => {
370
369
  EventsService,
371
370
  Chooser,
372
371
  Chat21Service,
373
- WebSocketJs,
374
- ConvertRequestToConversation
372
+ WebSocketJs
375
373
  ]
376
374
  })
377
375
  export class AppModule { }
@@ -17,18 +17,11 @@ 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;
26
20
  @Input() translationMap: Map<string, string>;
27
21
  @Input() stylesMap: Map<string, string>;
28
22
  @Output() onBeforeMessageRender = new EventEmitter();
29
23
  @Output() onAfterMessageRender = new EventEmitter();
30
- @Output() onMenuOptionShow = new EventEmitter<boolean>();
31
- @Output() onEmojiiPickerShow = new EventEmitter<boolean>()
24
+ @Output() onMenuOptionShow = new EventEmitter();
32
25
  @Output() onAttachmentButtonClicked = new EventEmitter();
33
26
  @Output() onScrollContent = new EventEmitter();
34
27
 
@@ -52,19 +52,8 @@
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>
65
55
 
66
56
  <div class="conversation-wpr" style="height: 100%;">
67
-
68
57
  <div *ngFor="let message of messages; let i = index; let first = first; trackBy: trackByFn">
69
58
 
70
59
  <ng-container *ngIf="first || (messages[i - 1].timestamp | date:'d') !== (message.timestamp | date:'d')">
@@ -88,27 +77,16 @@
88
77
  <!-- message SENDER:: -->
89
78
  <div role="messaggio" *ngIf="messageType(MESSAGE_TYPE_MINE, message)" class="msg_container base_sent">
90
79
 
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
-
102
80
  <!--backgroundColor non viene ancora usato -->
103
81
  <chat-bubble-message class="messages msg_sent" id="message_msg_sent" style="position: relative;"
104
82
  [ngClass]="{'has-metadata': (isImage(message) || isFrame(message)), 'privateMsg': (message?.attributes && message?.attributes?.subtype === 'private')}"
105
83
  [class.emoticon]="isEmojii(message?.text)"
106
- [ngStyle]="{'background': stylesMap.get('bubbleSentBackground'), 'color': stylesMap.get('bubbleSentTextColor')}"
107
84
  [ngClass]="{'button-in-msg' : message.metadata && message.metadata.button}"
108
85
  [message]="message"
109
- [fontColor]="stylesMap.get('bubbleSentTextColor')"
110
- [fontSize]="stylesMap.get('fontSize')"
111
- [fontFamily]="stylesMap.get('fontFamily')"
86
+ [textColor]="'col-msg-sent'"
87
+ [addAsCannedResponseTooltipText]="addAsCannedResponseTooltipText"
88
+ [areVisibleCAR]="areVisibleCAR"
89
+ [supportMode]="supportMode"
112
90
  (onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
113
91
  (onAfterMessageRender)="onAfterMessageRenderFN($event)"
114
92
  (onElementRendered)="onElementRenderedFN($event)">
@@ -123,14 +101,13 @@
123
101
 
124
102
  </div>
125
103
 
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>
104
+ <!-- message RECIPIENT:: -->
105
+ <div role="messaggio" *ngIf="messageType(MESSAGE_TYPE_OTHERS, message) && isChannelTypeGroup(channelType) && !isSameSender(message?.sender, i)"
106
+ class="message_sender_fullname">
107
+ {{message.sender_fullname}}
132
108
  </div>
133
- <!-- message RECIPIENT :: -->
109
+
110
+
134
111
  <div role="messaggio" *ngIf="messageType(MESSAGE_TYPE_OTHERS, message)" class="msg_container base_receive">
135
112
 
136
113
  <!-- <chat-avatar-image class="slide-in-left"
@@ -140,36 +117,19 @@
140
117
  </chat-avatar-image> -->
141
118
 
142
119
  <!--backgroundColor non viene ancora usato -->
143
- <chat-bubble-message class="messages msg_receive" id="message_msg_receive"
120
+
121
+ <chat-bubble-message class="messages msg_receive" id="message_msg_receive" style="position: relative;"
144
122
  [ngClass]="{'has-metadata': (isImage(message) || isFrame(message)), 'privateMsg': (message?.attributes && message?.attributes?.subtype === 'private')}"
145
123
  [class.emoticon]="isEmojii(message?.text)"
146
- [ngStyle]="{'background': stylesMap?.get('bubbleReceivedBackground'), 'color': stylesMap.get('bubbleReceivedTextColor')}"
147
124
  [message]="message"
148
- [fontColor]="stylesMap?.get('bubbleReceivedTextColor')"
149
- [fontSize]="stylesMap?.get('fontSize')"
150
- [fontFamily]="stylesMap?.get('fontFamily')"
125
+ [textColor]="'black'"
126
+ [addAsCannedResponseTooltipText]="addAsCannedResponseTooltipText"
127
+ [areVisibleCAR]="areVisibleCAR"
128
+ [supportMode]="supportMode"
151
129
  (onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
152
130
  (onAfterMessageRender)="onAfterMessageRenderFN($event)"
153
131
  (onElementRendered)="onElementRenderedFN($event)">
154
132
  </chat-bubble-message>
155
-
156
- <ng-container *ngIf="areVisibleCAR && supportMode">
157
- <ion-button shape="round" size="small" class="btn-add-msg canned" ion-button fill="clear"
158
- (click)="presentCreateCannedResponseModal(message)" [tooltip]="addAsCannedResponseTooltipText"
159
- [options]="tooltipOptions" placement="bottom">
160
- <ion-icon slot="icon-only" name="flash-outline" style="font-size: 1em;"> </ion-icon>
161
- <span class="add-canned-response-add-icon">+</span>
162
- </ion-button>
163
- </ng-container>
164
- <!-- <ng-container *ngIf="supportMode">
165
- <ion-button shape="round" size="small" class="btn-add-msg emoji" ion-button fill="clear"
166
- (click)="presentEmojiiModal()" tooltip="{{addAsCannedResponseTooltipText}}"
167
- [options]="tooltipOptions" placement="bottom">
168
- <ion-icon slot="icon-only" name="happy-outline" style="font-size: 1em;"> </ion-icon>
169
- </ion-button>
170
- </ng-container> -->
171
-
172
- <div class="message-date-hover" *ngIf="(isChannelTypeGroup(channelType) && isSameSender(message?.sender, i)) || !isChannelTypeGroup(channelType)"> {{message.timestamp | date:'HH:mm' }} </div>
173
133
  </div>
174
134
 
175
135
  <!-- message type:: button && -->
@@ -187,26 +147,15 @@
187
147
 
188
148
  <!-- uploadProgress -> {{ uploadProgress }} -->
189
149
  <div *ngIf="uploadProgress !== 100" class="msg_container base_sent" style="margin-right: 20px;">
190
- <div class="chat21-spinner active" id="chat21-spinner" style="margin: 0px 6px 0px;">
191
- <div class="chat21-bounce1" [ngStyle]="{'background-color': stylesMap.get('themeColor')}"></div>
192
- <div class="chat21-bounce2" [ngStyle]="{'background-color': stylesMap.get('themeColor'), 'opacity': 0.4}"></div>
193
- <div class="chat21-bounce3" [ngStyle]="{'background-color': stylesMap.get('themeColor'), 'opacity': 0.6}"></div>
194
- <!-- <span [ngStyle]="{'color': stylesMap.get('themeColor')}">{{translationMap.get('LABEL_LOADING')}}</span> -->
150
+ <div class="messages msg_sent">
151
+ <div class="spinner">
152
+ <div class="bounce1"></div>
153
+ <div class="bounce2"></div>
154
+ <div class="bounce3"></div>
155
+ </div>
195
156
  </div>
196
157
  </div>
197
158
 
198
- <div *ngIf="isTypings" class="msg_container base_receive typing_container">
199
- <!-- !isSameSender(idUserTypingNow, i) -->
200
- <!-- <div *ngIf="nameUserTypingNow">{{nameUserTypingNow}}</div> -->
201
- <user-typing
202
- [themeColor]="stylesMap?.get('themeColor')"
203
- [translationMap]="translationMap"
204
- [idUserTypingNow]="idUserTypingNow"
205
- [nameUserTypingNow]="nameUserTypingNow">
206
- </user-typing>
207
- <div class="typing_info" *ngIf="nameUserTypingNow"> {{nameUserTypingNow}} {{translationMap.get('LABEL_IS_WRITING')}}</div>
208
- </div>
209
-
210
159
  </div>
211
160
 
212
161
  <!-- fileType > {{fileType }} uploadProgress {{uploadProgress}} -->