@chat21/chat21-ionic 3.0.81-rc.2 → 3.0.81

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 (150) hide show
  1. package/CHANGELOG.md +4 -73
  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 +17 -113
  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 -77
  10. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +86 -168
  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 +24 -11
  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/frame/frame.component.html +2 -8
  26. package/src/app/chatlib/conversation-detail/message/frame/frame.component.scss +0 -36
  27. package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +2 -2
  28. package/src/app/chatlib/conversation-detail/message/html/html.component.ts +1 -0
  29. package/src/app/chatlib/conversation-detail/message/image/image.component.html +1 -1
  30. package/src/app/chatlib/conversation-detail/message/image/image.component.scss +5 -17
  31. package/src/app/chatlib/conversation-detail/message/image/image.component.ts +1 -1
  32. package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +2 -3
  33. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +6 -16
  34. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +3 -1
  35. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +0 -2
  36. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +52 -78
  37. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +20 -62
  38. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +10 -14
  39. package/src/app/components/canned-response/canned-response.component.html +7 -7
  40. package/src/app/components/canned-response/canned-response.component.scss +4 -10
  41. package/src/app/components/canned-response/canned-response.component.ts +1 -1
  42. package/src/app/components/contacts-directory/contacts-directory.component.html +26 -22
  43. package/src/app/components/contacts-directory/contacts-directory.component.scss +6 -8
  44. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +3 -0
  45. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +21 -0
  46. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +24 -0
  47. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +14 -0
  48. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +54 -0
  49. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +98 -0
  50. 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
  51. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +84 -0
  52. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +30 -0
  53. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +83 -0
  54. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +24 -0
  55. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +68 -0
  56. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +3 -0
  57. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +10 -0
  58. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +24 -0
  59. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +14 -0
  60. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +42 -61
  61. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +61 -98
  62. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +25 -9
  63. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +6 -8
  64. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
  65. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +84 -24
  66. package/src/app/components/conversation-detail/option-header/option-header.component.html +13 -0
  67. package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
  68. 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
  69. 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
  70. package/src/app/components/conversation-info/info-content/info-content.component.html +1 -2
  71. package/src/app/components/conversation-info/info-content/info-content.component.ts +2 -3
  72. package/src/app/components/conversation-info/info-direct/info-direct.component.html +9 -1
  73. package/src/app/components/conversation-info/info-direct/info-direct.component.ts +2 -0
  74. package/src/app/components/conversation-info/info-group/info-group.component.html +108 -44
  75. package/src/app/components/conversation-info/info-group/info-group.component.scss +61 -101
  76. package/src/app/components/conversation-info/info-group/info-group.component.ts +0 -1
  77. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.html → ddp-header/ddp-header.component.html} +3 -3
  78. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.scss → ddp-header/ddp-header.component.scss} +4 -16
  79. package/src/app/components/{navbar/navbar.component.spec.ts → ddp-header/ddp-header.component.spec.ts} +6 -6
  80. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.ts → ddp-header/ddp-header.component.ts} +16 -7
  81. package/src/app/components/project-item/project-item.component.html +149 -98
  82. package/src/app/components/project-item/project-item.component.scss +35 -42
  83. package/src/app/components/project-item/project-item.component.ts +4 -16
  84. package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +3 -3
  85. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +7 -2
  86. package/src/app/components/utils/user-presence/user-presence.component.html +2 -7
  87. package/src/app/components/utils/user-presence/user-presence.component.scss +18 -35
  88. package/src/app/components/utils/user-presence/user-presence.component.ts +10 -6
  89. package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
  90. package/src/app/pages/contacts-directory/contacts-directory.page.scss +0 -41
  91. package/src/app/pages/contacts-directory/contacts-directory.page.ts +0 -2
  92. package/src/app/pages/conversation-detail/conversation-detail.module.ts +8 -0
  93. package/src/app/pages/conversation-detail/conversation-detail.page.html +23 -40
  94. package/src/app/pages/conversation-detail/conversation-detail.page.scss +250 -40
  95. package/src/app/pages/conversation-detail/conversation-detail.page.ts +110 -182
  96. package/src/app/pages/conversations-list/conversations-list.page.html +8 -11
  97. package/src/app/pages/conversations-list/conversations-list.page.scss +2 -11
  98. package/src/app/pages/conversations-list/conversations-list.page.ts +22 -25
  99. package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
  100. package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
  101. package/src/app/pages/loader-preview/loader-preview.page.scss +0 -4
  102. package/src/app/pages/loader-preview/loader-preview.page.ts +2 -1
  103. package/src/app/pages/profile-info/profile-info.page.html +4 -2
  104. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
  105. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +0 -42
  106. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +0 -1
  107. package/src/app/services/canned-responses/canned-responses.service.ts +0 -26
  108. package/src/app/services/tiledesk/tiledesk.service.ts +26 -2
  109. package/src/app/shared/shared.module.ts +33 -24
  110. package/src/assets/i18n/ar.json +265 -278
  111. package/src/assets/i18n/az.json +1 -14
  112. package/src/assets/i18n/de.json +2 -15
  113. package/src/assets/i18n/en.json +2 -15
  114. package/src/assets/i18n/es.json +2 -15
  115. package/src/assets/i18n/fr.json +1 -14
  116. package/src/assets/i18n/it.json +1 -14
  117. package/src/assets/i18n/kk.json +2 -15
  118. package/src/assets/i18n/pt.json +2 -15
  119. package/src/assets/i18n/ru.json +1 -14
  120. package/src/assets/i18n/sr.json +264 -277
  121. package/src/assets/i18n/sv.json +2 -15
  122. package/src/assets/i18n/tr.json +2 -15
  123. package/src/assets/i18n/uk.json +2 -15
  124. package/src/assets/i18n/uz.json +1 -14
  125. package/src/assets/js/chat21client.js +149 -177
  126. package/src/chat-config-native-mqtt.json +0 -3
  127. package/src/chat21-core/models/conversation.ts +1 -0
  128. package/src/chat21-core/providers/firebase/firebase-typing.service.ts +9 -7
  129. package/src/chat21-core/utils/constants.ts +1 -6
  130. package/src/chat21-core/utils/user-typing/user-typing.component.html +5 -8
  131. package/src/chat21-core/utils/user-typing/user-typing.component.scss +17 -87
  132. package/src/chat21-core/utils/user-typing/user-typing.component.ts +94 -12
  133. package/src/chat21-core/utils/utils.ts +10 -38
  134. package/src/global.scss +56 -52
  135. package/src/index.html +2 -2
  136. package/src/variables.scss +10 -30
  137. package/deploy_amazon_beta.sh +0 -29
  138. package/deploy_amazon_prod.sh +0 -30
  139. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +0 -116
  140. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +0 -12
  141. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +0 -14
  142. package/src/app/components/navbar/navbar.component.html +0 -103
  143. package/src/app/components/navbar/navbar.component.scss +0 -249
  144. package/src/app/components/navbar/navbar.component.ts +0 -189
  145. package/src/app/services/projects/projects.service.spec.ts +0 -12
  146. package/src/app/services/projects/projects.service.ts +0 -43
  147. package/src/assets/sounds/interface-start.mp3 +0 -0
  148. package/src/assets/sounds/wheep-wheep.mp3 +0 -0
  149. package/src/chat21-core/models/projects.ts +0 -27
  150. package/src/chat21-core/utils/convertRequestToConversation.ts +0 -41
package/CHANGELOG.md CHANGED
@@ -1,87 +1,18 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
- ### 3.0.81-rc.2
4
- - changed: canned loader
3
+ ## 3.0.81 in PROD
5
4
  - bug-fixed: if search for a string that not correspond with an existing canned, was shown loader ever
6
5
 
7
- ### 3.0.81-rc.1
8
- - added: remove bubble-message background if is image or iframe and no text is in message
9
- - added: new sound if unassigned request arrive
10
- - added: animation on hover an image
11
- - added: parameter to /close to forse the closing of a conversation
12
- - added: v.0.1.12.1 chatclient.js
13
- - changed: info-message UI, image UI, frame UI
14
- - bug-fixed: if click on canned icon, then close and clear '/' char, if click again on canned icon, '/' was not added to message text-area
15
-
16
- ### 3.0.80 in PROD
6
+ ## 3.0.80 in PROD
17
7
  - bug-fixed: if search a canned response, after clicked it does not replaced into text-area
18
8
 
19
- ### 3.0.80-rc.1
20
- - changed: moved sender_fullname inside bubble-message component
21
- - changed: publish onConversationSelect event to stop audio after agent has clicked on it
22
- - bug-fixed: /null loading flag_url in sidebar-user-detail
23
-
24
- ### 3.0.79 in PROD
9
+ ## 3.0.79 in PROD
25
10
  - added: segment analytics events
26
11
 
27
- ### 3.0.79-rc.4
28
- - bug-fixed: testsiteBaseUrl wrong value env property
29
-
30
- ### 3.0.79-rc.3
31
- - added: segment analytics for SignIn-SignOut-Resolved-MsgAdded-ConvAdded
32
- - added: navbar component if not mobile
33
- - added: NAVBAR translations
34
- - changed: minor improvements on UI
35
- - changed: ion-split-pane UI if mobile
36
- - changed: moved hover 'add canned' button from bubble-message to ion-conversation-detail component
37
- - changed: moved addNewCanned to tiledesk service to canned-responses service
38
- - bug-fixed: open/close detail icon not aligned correctly on click 'close'
39
-
40
- ### 3.0.79-rc.2
41
- - added: new sound if new conversation is triggered in agent's chat
42
- - changed: header UI of header-conversation-detail and unassigned-conversations components
43
-
44
- ### 3.0.79-rc.1
45
- - added: LABEL_ONLINE, LABEL_OFFLINE translations
46
- - changed: renamed ddp-header with conversations-list-header
47
- - changed: unified control to mobile/desktop app
48
- - changed: LABEL_AVAILABLE/NOT_AVAILABLE with LABEL_ONLINE/OFFLINE in user-presence component
49
- - changed: icon to user-presence
50
- - changed: UI for conversation-list, conversation-detail and info-group for desktop and mobile
51
- - changed: renamed option-header component with header-conversations-list-archived
52
- - changed: contacts-directory UI
53
- - bug-fixed: if app is opened and user press width expand, move correctly the right position
54
-
55
- ## 3.0.78 in PROD
56
- - bug-fixed: unassigned request not sound the if is the first at all
57
- - bug-fixed: canned responses opens in incorrect mode
58
-
59
- ### 3.0.78-rc.4
12
+ ## 3.0.78 in PROD
60
13
  - bug-fixed: unassigned request not sound the if is the first at all
61
- - bug-fixed: translations missed
62
- - bug-fixed: direct info not showed in conversation-header component
63
- - removed: conversation-footer border top
64
- - changed: colors to message-text-area icons and message-attachment components
65
-
66
- ### 3.0.78-rc.3
67
- - changed: user-typing location moved from conversation-header to conversation-detail component
68
- - changed: replace includes with startsWith for check what type of conversation is in project info conversation-list component
69
- - added: styleMap integrations to some elements
70
- - bug-fixed: no tooltip showed if no unserved request are present
71
-
72
- ### 3.0.78-rc.2
73
- - changed: project item UI and tooltip msg
74
- - changed: conversation UI in conversations list component
75
- - changed: conversation detail header component
76
- - added: open/close info-conversation moved from conversation-header to conversation detail component
77
14
  - bug-fixed: canned responses opens in incorrect mode
78
15
 
79
- ### 3.0.78-rc.1
80
- - changed: conversation-list page width increased
81
- - changed: background changed in info-message component
82
- - changed: project-item UI
83
- - changed: conversation-list page UI
84
-
85
16
  ## 3.0.77 in PROD
86
17
 
87
18
  ### 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.81-rc.2",
4
+ "version": "3.0.81",
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
- import { TYPE_DIRECT, TYPE_SUPPORT_GROUP, URL_SOUND_CONVERSATION_UNASSIGNED } from 'src/chat21-core/utils/constants';
3
- import { tranlatedLanguage, URL_SOUND_CONVERSATION_ADDED, URL_SOUND_LIST_CONVERSATION } from './../chat21-core/utils/constants';
1
+ import { TYPE_DIRECT, TYPE_SUPPORT_GROUP } from 'src/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,15 +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
- private audio_Unassigned: any;
93
90
  private setIntervalTime: any;
94
91
  private setTimeoutSound: any;
95
92
  private isTabVisible: boolean = true;
96
- public isSoundEnabled: boolean;
93
+ private isSoundEnabled: boolean;
97
94
  private hasPlayed: boolean;
98
- private hasPlayedConversation: boolean;
99
- private hasPlayedConversationUnassigned: boolean;
100
95
  private tabTitle: string;
101
96
  private setTimeoutConversationsEvent: any;
102
97
  private logger: LoggerService = LoggerInstance.getInstance();
@@ -836,14 +831,6 @@ export class AppComponent implements OnInit {
836
831
  this.audio.src = chatBaseUrl + URL_SOUND_LIST_CONVERSATION;
837
832
  this.audio.load();
838
833
 
839
- this.audio_NewConv = new Audio();
840
- this.audio_NewConv.src = chatBaseUrl + URL_SOUND_CONVERSATION_ADDED;
841
- this.audio_NewConv.load();
842
-
843
- this.audio_Unassigned = new Audio();
844
- this.audio_Unassigned.src = chatBaseUrl + URL_SOUND_CONVERSATION_UNASSIGNED;
845
- this.audio_Unassigned.load();
846
-
847
834
  const sound_status = localStorage.getItem('dshbrd----sound')
848
835
  if(sound_status && sound_status !== 'undefined'){
849
836
  this.isSoundEnabled = sound_status === 'enabled'? true: false
@@ -853,14 +840,7 @@ export class AppComponent implements OnInit {
853
840
 
854
841
  }
855
842
 
856
- onSoundChange(event){
857
- if(event && event !== undefined){
858
- localStorage.setItem('dshbrd----sound', event)
859
- this.isSoundEnabled = event === 'enabled'? true: false
860
- }
861
- }
862
-
863
- private manageTabNotification(sound_type: string, badgeNotificationCount?: number) {
843
+ private manageTabNotification(badgeNotificationCount?: number) {
864
844
  if (!this.isTabVisible) {
865
845
  // TAB IS HIDDEN --> manage title and SOUND
866
846
  let badgeNewConverstionNumber = badgeNotificationCount? badgeNotificationCount : this.conversationsHandlerService.countIsNew()
@@ -884,26 +864,7 @@ export class AppComponent implements OnInit {
884
864
  this.isSoundEnabled = sound_status === 'enabled'? true: false
885
865
  }
886
866
  this.logger.debug('[APP-COMP] manageTabNotification can saund?', this.isInitialized, this.isSoundEnabled)
887
- if(this.isInitialized && this.isSoundEnabled) {
888
- switch(sound_type){
889
- case 'conv_added': {
890
- this.soundConversationAdded();
891
- break;
892
- }
893
- case 'new_message': {
894
- this.soundMessage();
895
- break;
896
- }
897
- case 'conv_unassigned': {
898
- this.soundConversationUnassigned();
899
- break;
900
- }
901
- default:{
902
- this.soundMessage();
903
- break;
904
- }
905
- }
906
- }
867
+ if(this.isInitialized && this.isSoundEnabled) this.soundMessage()
907
868
  }
908
869
 
909
870
  soundMessage() {
@@ -919,7 +880,7 @@ export class AppComponent implements OnInit {
919
880
  // }, 4000);
920
881
 
921
882
  //play sound every 4s from the fist time you receive a conversation added/changed
922
- if(!this.hasPlayed && !this.hasPlayedConversation){
883
+ if(!this.hasPlayed){
923
884
  that.audio.play().then(() => {
924
885
  that.hasPlayed = true
925
886
  that.logger.debug('[APP-COMP] ****** soundMessage played *****');
@@ -931,36 +892,6 @@ export class AppComponent implements OnInit {
931
892
  });
932
893
  }
933
894
  }
934
-
935
- soundConversationAdded(){
936
- const that = this;
937
- if(!this.hasPlayedConversation ){
938
- that.audio_NewConv.play().then(() => {
939
- that.hasPlayedConversation = true
940
- that.logger.debug('[APP-COMP] ****** soundConversationAdded played *****');
941
- setTimeout(() => {
942
- that.hasPlayedConversation = false
943
- }, 4000);
944
- }).catch((error: any) => {
945
- that.logger.error('[APP-COMP] ***soundConversationAdded error*', error);
946
- });
947
- }
948
- }
949
-
950
- soundConversationUnassigned(){
951
- const that = this;
952
- if(!this.hasPlayedConversationUnassigned ){
953
- that.audio_Unassigned.play().then(() => {
954
- that.hasPlayedConversationUnassigned = true
955
- that.logger.debug('[APP-COMP] ****** soundConversationUnassigned played *****');
956
- setTimeout(() => {
957
- that.hasPlayedConversationUnassigned = false
958
- }, 4000);
959
- }).catch((error: any) => {
960
- that.logger.error('[APP-COMP] ***soundConversationUnassigned error*', error);
961
- });
962
- }
963
- }
964
895
  /**---------------- SOUND FUNCTIONS --> END <--- +*/
965
896
  /***************************************************+*/
966
897
 
@@ -1008,11 +939,11 @@ export class AppComponent implements OnInit {
1008
939
  this.events.subscribe('uidConvSelected:changed', this.subscribeChangedConversationSelected);
1009
940
  this.events.subscribe('profileInfoButtonClick:logout', this.subscribeProfileInfoButtonLogOut);
1010
941
  this.events.subscribe('unservedRequest:count', this.subscribeUnservedRequestCount)
1011
- this.events.subscribe('convList:onConversationSelected', this.subscribeConversationSelected)
942
+
1012
943
  this.conversationsHandlerService.conversationAdded.subscribe((conversation: ConversationModel) => {
1013
944
  // this.logger.log('[APP-COMP] ***** subscribeConversationAdded *****', conversation);
1014
945
  if (conversation && conversation.is_new === true) {
1015
- this.manageTabNotification('conv_added')
946
+ this.manageTabNotification()
1016
947
  }
1017
948
  if(conversation) this.updateConversationsOnStorage()
1018
949
  });
@@ -1030,7 +961,7 @@ export class AppComponent implements OnInit {
1030
961
  this.logger.log('[APP-COMP] ***** subscribeConversationChangedDetailed currentUser: ', currentUser);
1031
962
  if (changes.value && changes.value.sender !== currentUser.uid) {
1032
963
  if(changes.value.is_new === changes.previousValue.is_new){
1033
- this.manageTabNotification('new_message');
964
+ this.manageTabNotification();
1034
965
  }
1035
966
  }
1036
967
  }
@@ -1042,6 +973,7 @@ export class AppComponent implements OnInit {
1042
973
  this.updateConversationsOnStorage();
1043
974
  isDevMode()? null: this.segmentResolved(conversation)
1044
975
  }
976
+
1045
977
  });
1046
978
  }
1047
979
 
@@ -1087,6 +1019,7 @@ export class AppComponent implements OnInit {
1087
1019
  this.initConversationsHandler(currentUser.uid);
1088
1020
  this.initArchivedConversationsHandler(currentUser.uid);
1089
1021
  isDevMode()? null: this.segmentSignIn()
1022
+
1090
1023
  }
1091
1024
  this.checkPlatform();
1092
1025
  try {
@@ -1127,7 +1060,7 @@ export class AppComponent implements OnInit {
1127
1060
 
1128
1061
  // this.unsubscribe$.next();
1129
1062
  // this.unsubscribe$.complete();
1130
-
1063
+
1131
1064
  }
1132
1065
 
1133
1066
  goToDashboardLogin(){
@@ -1188,7 +1121,7 @@ export class AppComponent implements OnInit {
1188
1121
  }
1189
1122
 
1190
1123
  subscribeProfileInfoButtonLogOut = (hasClickedLogout) => {
1191
- this.logger.log('[APP-COMP] FIREBASE-NOTIFICATION >>>> subscribeProfileInfoButtonLogOut ');
1124
+ this.logger.log('[APP-COMP] FIREBASE-NOTIFICATION >>>> subscribeProfileInfoButtonLogOut');
1192
1125
  // if (hasClickedLogout === true) {
1193
1126
  // this.removePresenceAndLogout()
1194
1127
  // }
@@ -1209,7 +1142,6 @@ export class AppComponent implements OnInit {
1209
1142
 
1210
1143
  if (res === 'success') {
1211
1144
  that.removePresenceAndLogout();
1212
-
1213
1145
  } else {
1214
1146
  that.removePresenceAndLogout();
1215
1147
  // that.presentToast();
@@ -1223,19 +1155,13 @@ export class AppComponent implements OnInit {
1223
1155
 
1224
1156
  subscribeUnservedRequestCount = (unservedRequestCount) => {
1225
1157
  if(unservedRequestCount && unservedRequestCount > 0){
1226
- this.logger.debug("subscribeUnservedRequestCount appIsInitialized::::",this.isInitialized)
1158
+ this.logger.debug("hasToSoundUnservedRequestCount::::", this.isInitialized)
1227
1159
  if(this.isInitialized){
1228
- this.manageTabNotification('conv_unassigned', unservedRequestCount) //sound and alternate title
1160
+ this.manageTabNotification(unservedRequestCount) //sound and alternate title
1229
1161
  }
1230
1162
  }
1231
1163
  }
1232
1164
 
1233
- subscribeConversationSelected= (conversation: ConversationModel) => {
1234
- if(conversation && conversation.is_new){
1235
- this.audio_NewConv.pause()
1236
- }
1237
- }
1238
-
1239
1165
  private async presentModal(calledby): Promise<any> {
1240
1166
  this.logger.log('[APP-COMP] presentModal calledby', calledby, '- hadBeenCalledOpenModal: ', this.hadBeenCalledOpenModal);
1241
1167
  const attributes = { tenant: this.tenant, enableBackdropDismiss: false };
@@ -1344,7 +1270,7 @@ export class AppComponent implements OnInit {
1344
1270
  }
1345
1271
 
1346
1272
  private segmentSignIn(){
1347
- let user = this.tiledeskAuthService.getCurrentUser()
1273
+ let user = this.tiledeskAuthService.getCurrentUser();
1348
1274
  try {
1349
1275
  window['analytics'].page("Chat Auth Page, Signin", {});
1350
1276
  } catch (err) {
@@ -1374,7 +1300,7 @@ export class AppComponent implements OnInit {
1374
1300
 
1375
1301
 
1376
1302
  private segmentSignedOut(){
1377
- let user = this.tiledeskAuthService.getCurrentUser()
1303
+ let user = this.tiledeskAuthService.getCurrentUser();
1378
1304
  try {
1379
1305
  window['analytics'].page("Chat Auth Page, Signed Out", {});
1380
1306
  } catch (err) {
@@ -1459,7 +1385,6 @@ export class AppComponent implements OnInit {
1459
1385
  }
1460
1386
  }
1461
1387
 
1462
-
1463
1388
  @HostListener('document:visibilitychange', [])
1464
1389
  visibilitychange() {
1465
1390
  // this.logger.debug("document TITLE", document.hidden, document.title);
@@ -1523,26 +1448,5 @@ export class AppComponent implements OnInit {
1523
1448
  this.isSoundEnabled = event.newValue === 'enabled'? true: false
1524
1449
  }
1525
1450
  }
1526
-
1527
-
1528
- // @HostListener('mouseenter', ['$event'])
1529
- // onMouseEnter(event: any) {
1530
- // console.log('HostListener onMouseEnter-->', event)
1531
- // }
1532
-
1533
- // @HostListener('mouseleave', ['$event'])
1534
- // onMouseLeave(event: any) {
1535
- // console.log('HostListener onMouseLeave-->', event)
1536
- // }
1537
-
1538
- // @HostListener('focus', ['$event'])
1539
- // onFocus(event: any) {
1540
- // console.log('HostListener onFocus-->', event)
1541
- // }
1542
-
1543
- // @HostListener('blur', ['$event'])
1544
- // onBlur(event: any) {
1545
- // console.log('HostListener onBlur-->', event)
1546
- // }
1547
1451
  }
1548
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,28 +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
- [class.no-background]="(isImage(message) || isFrame(message)) && message?.text.trim() === '' "
106
83
  [class.emoticon]="isEmojii(message?.text)"
107
- [ngStyle]="{'background': stylesMap.get('bubbleSentBackground'), 'color': stylesMap.get('bubbleSentTextColor')}"
108
84
  [ngClass]="{'button-in-msg' : message.metadata && message.metadata.button}"
109
85
  [message]="message"
110
- [fontColor]="stylesMap.get('bubbleSentTextColor')"
111
- [fontSize]="stylesMap.get('fontSize')"
112
- [fontFamily]="stylesMap.get('fontFamily')"
86
+ [textColor]="'col-msg-sent'"
87
+ [addAsCannedResponseTooltipText]="addAsCannedResponseTooltipText"
88
+ [areVisibleCAR]="areVisibleCAR"
89
+ [supportMode]="supportMode"
113
90
  (onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
114
91
  (onAfterMessageRender)="onAfterMessageRenderFN($event)"
115
92
  (onElementRendered)="onElementRenderedFN($event)">
@@ -124,14 +101,13 @@
124
101
 
125
102
  </div>
126
103
 
127
- <!-- message RECIPIENT + TIME :: -->
128
- <!-- <div class="msg_container base_receive" *ngIf="messageType(MESSAGE_TYPE_OTHERS, message) && isChannelTypeGroup(channelType) && !isSameSender(message?.sender, i)">
129
- <div role="messaggio" class="message_sender_fullname">
130
- {{message.sender_fullname}}
131
- </div>
132
- <div class="message-date"> {{message.timestamp | date:'HH:mm' }} </div>
133
- </div> -->
134
- <!-- 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
+
135
111
  <div role="messaggio" *ngIf="messageType(MESSAGE_TYPE_OTHERS, message)" class="msg_container base_receive">
136
112
 
137
113
  <!-- <chat-avatar-image class="slide-in-left"
@@ -141,38 +117,19 @@
141
117
  </chat-avatar-image> -->
142
118
 
143
119
  <!--backgroundColor non viene ancora usato -->
144
- <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;"
145
122
  [ngClass]="{'has-metadata': (isImage(message) || isFrame(message)), 'privateMsg': (message?.attributes && message?.attributes?.subtype === 'private')}"
146
- [class.no-background]="(isImage(message) || isFrame(message)) && message?.text.trim() === '' "
147
123
  [class.emoticon]="isEmojii(message?.text)"
148
- [ngStyle]="{'background': stylesMap?.get('bubbleReceivedBackground'), 'color': stylesMap.get('bubbleReceivedTextColor')}"
149
- [isSameSender]="isSameSender(message?.sender, i)"
150
124
  [message]="message"
151
- [fontColor]="stylesMap?.get('bubbleReceivedTextColor')"
152
- [fontSize]="stylesMap?.get('fontSize')"
153
- [fontFamily]="stylesMap?.get('fontFamily')"
125
+ [textColor]="'black'"
126
+ [addAsCannedResponseTooltipText]="addAsCannedResponseTooltipText"
127
+ [areVisibleCAR]="areVisibleCAR"
128
+ [supportMode]="supportMode"
154
129
  (onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
155
130
  (onAfterMessageRender)="onAfterMessageRenderFN($event)"
156
131
  (onElementRendered)="onElementRenderedFN($event)">
157
132
  </chat-bubble-message>
158
-
159
- <ng-container *ngIf="areVisibleCAR && supportMode">
160
- <ion-button shape="round" size="small" class="btn-add-msg canned" ion-button fill="clear"
161
- (click)="presentCreateCannedResponseModal(message)" [tooltip]="addAsCannedResponseTooltipText"
162
- [options]="tooltipOptions" placement="bottom">
163
- <ion-icon slot="icon-only" name="flash-outline" style="font-size: 1em;"> </ion-icon>
164
- <span class="add-canned-response-add-icon">+</span>
165
- </ion-button>
166
- </ng-container>
167
- <!-- <ng-container *ngIf="supportMode">
168
- <ion-button shape="round" size="small" class="btn-add-msg emoji" ion-button fill="clear"
169
- (click)="presentEmojiiModal()" tooltip="{{addAsCannedResponseTooltipText}}"
170
- [options]="tooltipOptions" placement="bottom">
171
- <ion-icon slot="icon-only" name="happy-outline" style="font-size: 1em;"> </ion-icon>
172
- </ion-button>
173
- </ng-container> -->
174
-
175
- <div class="message-date-hover" *ngIf="isChannelTypeGroup(channelType)"> {{message.timestamp | date:'HH:mm' }} </div>
176
133
  </div>
177
134
 
178
135
  <!-- message type:: button && -->
@@ -190,26 +147,15 @@
190
147
 
191
148
  <!-- uploadProgress -> {{ uploadProgress }} -->
192
149
  <div *ngIf="uploadProgress !== 100" class="msg_container base_sent" style="margin-right: 20px;">
193
- <div class="chat21-spinner active" id="chat21-spinner" style="margin: 0px 6px 0px;">
194
- <div class="chat21-bounce1" [ngStyle]="{'background-color': stylesMap.get('themeColor')}"></div>
195
- <div class="chat21-bounce2" [ngStyle]="{'background-color': stylesMap.get('themeColor'), 'opacity': 0.4}"></div>
196
- <div class="chat21-bounce3" [ngStyle]="{'background-color': stylesMap.get('themeColor'), 'opacity': 0.6}"></div>
197
- <!-- <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>
198
156
  </div>
199
157
  </div>
200
158
 
201
- <div *ngIf="isTypings" class="msg_container base_receive typing_container">
202
- <!-- !isSameSender(idUserTypingNow, i) -->
203
- <!-- <div *ngIf="nameUserTypingNow">{{nameUserTypingNow}}</div> -->
204
- <user-typing
205
- [themeColor]="stylesMap?.get('themeColor')"
206
- [translationMap]="translationMap"
207
- [idUserTypingNow]="idUserTypingNow"
208
- [nameUserTypingNow]="nameUserTypingNow">
209
- </user-typing>
210
- <div class="typing_info" *ngIf="nameUserTypingNow"> {{nameUserTypingNow}} {{translationMap.get('LABEL_IS_WRITING')}}</div>
211
- </div>
212
-
213
159
  </div>
214
160
 
215
161
  <!-- fileType > {{fileType }} uploadProgress {{uploadProgress}} -->