@chat21/chat21-ionic 3.0.80-rc.1 → 3.0.80

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 (141) hide show
  1. package/CHANGELOG.md +4 -61
  2. package/README.md +2 -2
  3. package/package.json +2 -2
  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 +15 -73
  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 +23 -75
  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 -7
  13. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +10 -6
  14. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.spec.ts +2 -2
  15. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +25 -16
  16. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +1 -5
  17. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +15 -22
  18. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +5 -25
  19. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +1 -2
  20. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +15 -14
  21. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +5 -24
  22. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +1 -6
  23. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +13 -12
  24. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +5 -26
  25. package/src/app/chatlib/conversation-detail/message/html/html.component.ts +1 -0
  26. package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +2 -2
  27. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +6 -16
  28. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +3 -1
  29. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +0 -2
  30. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +52 -78
  31. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +20 -62
  32. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +10 -14
  33. package/src/app/components/canned-response/canned-response.component.html +5 -5
  34. package/src/app/components/canned-response/canned-response.component.scss +1 -1
  35. package/src/app/components/canned-response/canned-response.component.ts +0 -1
  36. package/src/app/components/contacts-directory/contacts-directory.component.html +26 -22
  37. package/src/app/components/contacts-directory/contacts-directory.component.scss +6 -8
  38. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +3 -0
  39. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +21 -0
  40. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +24 -0
  41. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +14 -0
  42. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +54 -0
  43. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +98 -0
  44. 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
  45. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +84 -0
  46. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +30 -0
  47. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +83 -0
  48. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +24 -0
  49. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +68 -0
  50. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +3 -0
  51. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +10 -0
  52. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +24 -0
  53. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +14 -0
  54. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +42 -61
  55. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +61 -98
  56. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +25 -9
  57. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +5 -6
  58. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
  59. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +83 -4
  60. package/src/app/components/conversation-detail/option-header/option-header.component.html +13 -0
  61. package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
  62. 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
  63. 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
  64. package/src/app/components/conversation-info/info-content/info-content.component.html +1 -2
  65. package/src/app/components/conversation-info/info-content/info-content.component.ts +2 -3
  66. package/src/app/components/conversation-info/info-direct/info-direct.component.html +9 -1
  67. package/src/app/components/conversation-info/info-direct/info-direct.component.ts +2 -0
  68. package/src/app/components/conversation-info/info-group/info-group.component.html +108 -44
  69. package/src/app/components/conversation-info/info-group/info-group.component.scss +61 -101
  70. package/src/app/components/conversation-info/info-group/info-group.component.ts +0 -1
  71. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.html → ddp-header/ddp-header.component.html} +3 -3
  72. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.scss → ddp-header/ddp-header.component.scss} +4 -16
  73. package/src/app/components/{navbar/navbar.component.spec.ts → ddp-header/ddp-header.component.spec.ts} +6 -6
  74. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.ts → ddp-header/ddp-header.component.ts} +16 -7
  75. package/src/app/components/project-item/project-item.component.html +149 -98
  76. package/src/app/components/project-item/project-item.component.scss +35 -42
  77. package/src/app/components/project-item/project-item.component.ts +4 -16
  78. package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +3 -3
  79. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +7 -2
  80. package/src/app/components/utils/user-presence/user-presence.component.html +2 -7
  81. package/src/app/components/utils/user-presence/user-presence.component.scss +18 -35
  82. package/src/app/components/utils/user-presence/user-presence.component.ts +10 -6
  83. package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
  84. package/src/app/pages/contacts-directory/contacts-directory.page.scss +0 -41
  85. package/src/app/pages/contacts-directory/contacts-directory.page.ts +0 -2
  86. package/src/app/pages/conversation-detail/conversation-detail.module.ts +8 -0
  87. package/src/app/pages/conversation-detail/conversation-detail.page.html +23 -40
  88. package/src/app/pages/conversation-detail/conversation-detail.page.scss +250 -40
  89. package/src/app/pages/conversation-detail/conversation-detail.page.ts +84 -190
  90. package/src/app/pages/conversations-list/conversations-list.page.html +8 -11
  91. package/src/app/pages/conversations-list/conversations-list.page.scss +2 -11
  92. package/src/app/pages/conversations-list/conversations-list.page.ts +22 -25
  93. package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
  94. package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
  95. package/src/app/pages/loader-preview/loader-preview.page.scss +0 -4
  96. package/src/app/pages/loader-preview/loader-preview.page.ts +2 -1
  97. package/src/app/pages/profile-info/profile-info.page.html +4 -2
  98. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
  99. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +0 -42
  100. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +0 -1
  101. package/src/app/services/canned-responses/canned-responses.service.ts +0 -26
  102. package/src/app/services/tiledesk/tiledesk.service.ts +25 -1
  103. package/src/app/shared/shared.module.ts +33 -24
  104. package/src/assets/i18n/ar.json +265 -278
  105. package/src/assets/i18n/az.json +1 -14
  106. package/src/assets/i18n/de.json +2 -15
  107. package/src/assets/i18n/en.json +2 -15
  108. package/src/assets/i18n/es.json +2 -15
  109. package/src/assets/i18n/fr.json +1 -14
  110. package/src/assets/i18n/it.json +1 -14
  111. package/src/assets/i18n/kk.json +2 -15
  112. package/src/assets/i18n/pt.json +2 -15
  113. package/src/assets/i18n/ru.json +1 -14
  114. package/src/assets/i18n/sr.json +264 -277
  115. package/src/assets/i18n/sv.json +2 -15
  116. package/src/assets/i18n/tr.json +2 -15
  117. package/src/assets/i18n/uk.json +2 -15
  118. package/src/assets/i18n/uz.json +1 -14
  119. package/src/chat21-core/models/conversation.ts +1 -0
  120. package/src/chat21-core/providers/firebase/firebase-typing.service.ts +9 -7
  121. package/src/chat21-core/utils/constants.ts +1 -5
  122. package/src/chat21-core/utils/user-typing/user-typing.component.html +5 -8
  123. package/src/chat21-core/utils/user-typing/user-typing.component.scss +17 -87
  124. package/src/chat21-core/utils/user-typing/user-typing.component.ts +94 -12
  125. package/src/chat21-core/utils/utils.ts +10 -38
  126. package/src/global.scss +57 -48
  127. package/src/index.html +2 -2
  128. package/src/variables.scss +10 -30
  129. package/deploy_amazon_beta.sh +0 -29
  130. package/deploy_amazon_prod.sh +0 -30
  131. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +0 -116
  132. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +0 -12
  133. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +0 -14
  134. package/src/app/components/navbar/navbar.component.html +0 -103
  135. package/src/app/components/navbar/navbar.component.scss +0 -249
  136. package/src/app/components/navbar/navbar.component.ts +0 -189
  137. package/src/app/services/projects/projects.service.spec.ts +0 -12
  138. package/src/app/services/projects/projects.service.ts +0 -43
  139. package/src/assets/sounds/wheep-wheep.mp3 +0 -0
  140. package/src/chat21-core/models/projects.ts +0 -27
  141. package/src/chat21-core/utils/convertRequestToConversation.ts +0 -41
package/CHANGELOG.md CHANGED
@@ -1,72 +1,15 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+ ## 3.0.80 in PROD
4
+ - bug-fixed: if search a canned response, after clicked it does not replaced into text-area
3
5
 
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
6
+ ## 3.0.79 in PROD
10
7
  - added: segment analytics events
11
8
 
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
9
+ ## 3.0.78 in PROD
41
10
  - bug-fixed: unassigned request not sound the if is the first at all
42
11
  - bug-fixed: canned responses opens in incorrect mode
43
12
 
44
- ### 3.0.78-rc.4
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
62
- - bug-fixed: canned responses opens in incorrect mode
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
-
70
13
  ## 3.0.77 in PROD
71
14
 
72
15
  ### 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.80-rc.1",
4
+ "version": "3.0.80",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -119,4 +119,4 @@
119
119
  "android"
120
120
  ]
121
121
  }
122
- }
122
+ }
@@ -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,6 +1,5 @@
1
-
2
1
  import { TYPE_DIRECT, TYPE_SUPPORT_GROUP } from 'src/chat21-core/utils/constants';
3
- 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';
4
3
  import { ArchivedConversationsHandlerService } from 'src/chat21-core/providers/abstract/archivedconversations-handler.service';
5
4
  import { AppStorageService } from 'src/chat21-core/providers/abstract/app-storage.service';
6
5
 
@@ -88,13 +87,11 @@ export class AppComponent implements OnInit {
88
87
  public authModal: any;
89
88
 
90
89
  private audio: any;
91
- private audio_NewConv: any;
92
90
  private setIntervalTime: any;
93
91
  private setTimeoutSound: any;
94
92
  private isTabVisible: boolean = true;
95
- public isSoundEnabled: boolean;
93
+ private isSoundEnabled: boolean;
96
94
  private hasPlayed: boolean;
97
- private hasPlayedConversation: boolean;
98
95
  private tabTitle: string;
99
96
  private setTimeoutConversationsEvent: any;
100
97
  private logger: LoggerService = LoggerInstance.getInstance();
@@ -834,10 +831,6 @@ export class AppComponent implements OnInit {
834
831
  this.audio.src = chatBaseUrl + URL_SOUND_LIST_CONVERSATION;
835
832
  this.audio.load();
836
833
 
837
- this.audio_NewConv = new Audio();
838
- this.audio_NewConv.src = chatBaseUrl + URL_SOUND_CONVERSATION_ADDED;
839
- this.audio_NewConv.load();
840
-
841
834
  const sound_status = localStorage.getItem('dshbrd----sound')
842
835
  if(sound_status && sound_status !== 'undefined'){
843
836
  this.isSoundEnabled = sound_status === 'enabled'? true: false
@@ -847,14 +840,7 @@ export class AppComponent implements OnInit {
847
840
 
848
841
  }
849
842
 
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) {
843
+ private manageTabNotification(badgeNotificationCount?: number) {
858
844
  if (!this.isTabVisible) {
859
845
  // TAB IS HIDDEN --> manage title and SOUND
860
846
  let badgeNewConverstionNumber = badgeNotificationCount? badgeNotificationCount : this.conversationsHandlerService.countIsNew()
@@ -878,9 +864,7 @@ export class AppComponent implements OnInit {
878
864
  this.isSoundEnabled = sound_status === 'enabled'? true: false
879
865
  }
880
866
  this.logger.debug('[APP-COMP] manageTabNotification can saund?', this.isInitialized, this.isSoundEnabled)
881
- if(this.isInitialized && this.isSoundEnabled) {
882
- sound_type === 'conv_added'? this.soundConversationAdded(): this.soundMessage();
883
- }
867
+ if(this.isInitialized && this.isSoundEnabled) this.soundMessage()
884
868
  }
885
869
 
886
870
  soundMessage() {
@@ -896,7 +880,7 @@ export class AppComponent implements OnInit {
896
880
  // }, 4000);
897
881
 
898
882
  //play sound every 4s from the fist time you receive a conversation added/changed
899
- if(!this.hasPlayed && !this.hasPlayedConversation){
883
+ if(!this.hasPlayed){
900
884
  that.audio.play().then(() => {
901
885
  that.hasPlayed = true
902
886
  that.logger.debug('[APP-COMP] ****** soundMessage played *****');
@@ -908,21 +892,6 @@ export class AppComponent implements OnInit {
908
892
  });
909
893
  }
910
894
  }
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
- }
926
895
  /**---------------- SOUND FUNCTIONS --> END <--- +*/
927
896
  /***************************************************+*/
928
897
 
@@ -970,11 +939,11 @@ export class AppComponent implements OnInit {
970
939
  this.events.subscribe('uidConvSelected:changed', this.subscribeChangedConversationSelected);
971
940
  this.events.subscribe('profileInfoButtonClick:logout', this.subscribeProfileInfoButtonLogOut);
972
941
  this.events.subscribe('unservedRequest:count', this.subscribeUnservedRequestCount)
973
- this.events.subscribe('convList:onConversationSelected', this.subscribeConversationSelected)
942
+
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
 
@@ -1049,6 +1019,7 @@ export class AppComponent implements OnInit {
1049
1019
  this.initConversationsHandler(currentUser.uid);
1050
1020
  this.initArchivedConversationsHandler(currentUser.uid);
1051
1021
  isDevMode()? null: this.segmentSignIn()
1022
+
1052
1023
  }
1053
1024
  this.checkPlatform();
1054
1025
  try {
@@ -1089,7 +1060,7 @@ export class AppComponent implements OnInit {
1089
1060
 
1090
1061
  // this.unsubscribe$.next();
1091
1062
  // this.unsubscribe$.complete();
1092
-
1063
+
1093
1064
  }
1094
1065
 
1095
1066
  goToDashboardLogin(){
@@ -1150,7 +1121,7 @@ export class AppComponent implements OnInit {
1150
1121
  }
1151
1122
 
1152
1123
  subscribeProfileInfoButtonLogOut = (hasClickedLogout) => {
1153
- this.logger.log('[APP-COMP] FIREBASE-NOTIFICATION >>>> subscribeProfileInfoButtonLogOut ');
1124
+ this.logger.log('[APP-COMP] FIREBASE-NOTIFICATION >>>> subscribeProfileInfoButtonLogOut');
1154
1125
  // if (hasClickedLogout === true) {
1155
1126
  // this.removePresenceAndLogout()
1156
1127
  // }
@@ -1171,7 +1142,6 @@ export class AppComponent implements OnInit {
1171
1142
 
1172
1143
  if (res === 'success') {
1173
1144
  that.removePresenceAndLogout();
1174
-
1175
1145
  } else {
1176
1146
  that.removePresenceAndLogout();
1177
1147
  // that.presentToast();
@@ -1185,19 +1155,13 @@ 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
  }
1192
1162
  }
1193
1163
  }
1194
1164
 
1195
- subscribeConversationSelected= (conversation: ConversationModel) => {
1196
- if(conversation && conversation.is_new){
1197
- this.audio_NewConv.pause()
1198
- }
1199
- }
1200
-
1201
1165
  private async presentModal(calledby): Promise<any> {
1202
1166
  this.logger.log('[APP-COMP] presentModal calledby', calledby, '- hadBeenCalledOpenModal: ', this.hadBeenCalledOpenModal);
1203
1167
  const attributes = { tenant: this.tenant, enableBackdropDismiss: false };
@@ -1306,7 +1270,7 @@ export class AppComponent implements OnInit {
1306
1270
  }
1307
1271
 
1308
1272
  private segmentSignIn(){
1309
- let user = this.tiledeskAuthService.getCurrentUser()
1273
+ let user = this.tiledeskAuthService.getCurrentUser();
1310
1274
  try {
1311
1275
  window['analytics'].page("Chat Auth Page, Signin", {});
1312
1276
  } catch (err) {
@@ -1336,7 +1300,7 @@ export class AppComponent implements OnInit {
1336
1300
 
1337
1301
 
1338
1302
  private segmentSignedOut(){
1339
- let user = this.tiledeskAuthService.getCurrentUser()
1303
+ let user = this.tiledeskAuthService.getCurrentUser();
1340
1304
  try {
1341
1305
  window['analytics'].page("Chat Auth Page, Signed Out", {});
1342
1306
  } catch (err) {
@@ -1421,7 +1385,6 @@ export class AppComponent implements OnInit {
1421
1385
  }
1422
1386
  }
1423
1387
 
1424
-
1425
1388
  @HostListener('document:visibilitychange', [])
1426
1389
  visibilitychange() {
1427
1390
  // this.logger.debug("document TITLE", document.hidden, document.title);
@@ -1485,26 +1448,5 @@ export class AppComponent implements OnInit {
1485
1448
  this.isSoundEnabled = event.newValue === 'enabled'? true: false
1486
1449
  }
1487
1450
  }
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
- // }
1509
1451
  }
1510
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>
132
- </div> -->
133
- <!-- message RECIPIENT :: -->
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}}
108
+ </div>
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,37 +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
- [isSameSender]="isSameSender(message?.sender, i)"
148
124
  [message]="message"
149
- [fontColor]="stylesMap?.get('bubbleReceivedTextColor')"
150
- [fontSize]="stylesMap?.get('fontSize')"
151
- [fontFamily]="stylesMap?.get('fontFamily')"
125
+ [textColor]="'black'"
126
+ [addAsCannedResponseTooltipText]="addAsCannedResponseTooltipText"
127
+ [areVisibleCAR]="areVisibleCAR"
128
+ [supportMode]="supportMode"
152
129
  (onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
153
130
  (onAfterMessageRender)="onAfterMessageRenderFN($event)"
154
131
  (onElementRendered)="onElementRenderedFN($event)">
155
132
  </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>
174
133
  </div>
175
134
 
176
135
  <!-- message type:: button && -->
@@ -188,26 +147,15 @@
188
147
 
189
148
  <!-- uploadProgress -> {{ uploadProgress }} -->
190
149
  <div *ngIf="uploadProgress !== 100" class="msg_container base_sent" style="margin-right: 20px;">
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> -->
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>
196
156
  </div>
197
157
  </div>
198
158
 
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
-
211
159
  </div>
212
160
 
213
161
  <!-- fileType > {{fileType }} uploadProgress {{uploadProgress}} -->