@chat21/chat21-ionic 3.0.82-rc.6 → 3.0.82

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 (153) hide show
  1. package/CHANGELOG.md +7 -97
  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 -20
  6. package/src/app/app.component.ts +18 -129
  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 +88 -171
  11. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +2 -40
  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 +2 -3
  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 -63
  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 +9 -9
  40. package/src/app/components/canned-response/canned-response.component.scss +8 -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 -43
  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 +5 -5
  85. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +10 -23
  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 -47
  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 -41
  94. package/src/app/pages/conversation-detail/conversation-detail.page.scss +250 -40
  95. package/src/app/pages/conversation-detail/conversation-detail.page.ts +112 -186
  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 -18
  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 +25 -1
  109. package/src/app/services/websocket/websocket.service.ts +1 -1
  110. package/src/app/shared/shared.module.ts +33 -24
  111. package/src/assets/i18n/ar.json +265 -278
  112. package/src/assets/i18n/az.json +1 -14
  113. package/src/assets/i18n/de.json +2 -15
  114. package/src/assets/i18n/en.json +2 -15
  115. package/src/assets/i18n/es.json +2 -15
  116. package/src/assets/i18n/fr.json +1 -14
  117. package/src/assets/i18n/it.json +1 -14
  118. package/src/assets/i18n/kk.json +2 -15
  119. package/src/assets/i18n/pt.json +2 -15
  120. package/src/assets/i18n/ru.json +1 -14
  121. package/src/assets/i18n/sr.json +264 -277
  122. package/src/assets/i18n/sv.json +2 -15
  123. package/src/assets/i18n/tr.json +2 -15
  124. package/src/assets/i18n/uk.json +2 -15
  125. package/src/assets/i18n/uz.json +1 -14
  126. package/src/assets/js/chat21client.js +148 -175
  127. package/src/chat-config-mqtt-localhost.json +2 -2
  128. package/src/chat-config-native-mqtt.json +0 -3
  129. package/src/chat21-core/models/conversation.ts +1 -0
  130. package/src/chat21-core/providers/firebase/firebase-typing.service.ts +9 -7
  131. package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +8 -7
  132. package/src/chat21-core/utils/constants.ts +1 -6
  133. package/src/chat21-core/utils/user-typing/user-typing.component.html +5 -8
  134. package/src/chat21-core/utils/user-typing/user-typing.component.scss +17 -87
  135. package/src/chat21-core/utils/user-typing/user-typing.component.ts +94 -12
  136. package/src/chat21-core/utils/utils.ts +10 -38
  137. package/src/global.scss +255 -52
  138. package/src/index.html +9 -0
  139. package/src/variables.scss +10 -30
  140. package/deploy_amazon_beta.sh +0 -29
  141. package/deploy_amazon_prod.sh +0 -30
  142. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +0 -116
  143. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +0 -12
  144. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +0 -14
  145. package/src/app/components/navbar/navbar.component.html +0 -103
  146. package/src/app/components/navbar/navbar.component.scss +0 -249
  147. package/src/app/components/navbar/navbar.component.ts +0 -190
  148. package/src/app/services/projects/projects.service.spec.ts +0 -12
  149. package/src/app/services/projects/projects.service.ts +0 -43
  150. package/src/assets/sounds/interface-start.mp3 +0 -0
  151. package/src/assets/sounds/wheep-wheep.mp3 +0 -0
  152. package/src/chat21-core/models/projects.ts +0 -27
  153. package/src/chat21-core/utils/convertRequestToConversation.ts +0 -41
package/CHANGELOG.md CHANGED
@@ -1,112 +1,22 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
- ### 3.0.82-rc.6
4
- - bug-fixed: axios is undefined in chat21Client.js
5
- - bug-fixed: if userImage not exist in sidebar--user-detail, no info of fillColor exist
3
+ ## 3.0.82 in PROD
4
+ - bug-fixed: do not disable textArea if is a direct archived conversation
5
+ - bug-fixed: canned item not fire click event on Firefox browser
6
6
 
7
- ### 3.0.82-rc.3
8
- - bug-fixed: incorrect dashboard urls in navbar
9
- - changed: used logger in mqtt auth service
10
-
11
- ### 3.0.82-rc.2
12
- - changed: 'force' parameter to /close post as body content
13
- - changed: enabled MTT
14
- - changed: position of 'LogOut' button in sidebar-user-detail component
15
- - bug-fixed: removed scrollbar on firefox browser in conversation-list, contacts-directory pages
16
-
17
- ### 3.0.82-rc.1
18
- - changed: forceArchive to force while calling /close API URL
19
- - changed: chat21Client.js from 1.12.1 to 1.12.2
20
- - changed: list conversations component with from 360px to 320px
21
-
22
- ### 3.0.81 in PROD
23
-
24
- ### 3.0.81-rc.3
25
- - bug-fixed: if window width is less then 991px, move 'Close detail' icon to right
26
- - changed: removed segment from index.html and loaded dynamically only if in not production
27
-
28
- ### 3.0.81-rc.2
29
- - changed: canned loader
7
+ ## 3.0.81 in PROD
30
8
  - bug-fixed: if search for a string that not correspond with an existing canned, was shown loader ever
31
9
 
32
- ### 3.0.81-rc.1
33
- - added: remove bubble-message background if is image or iframe and no text is in message
34
- - added: new sound if unassigned request arrive
35
- - added: animation on hover an image
36
- - added: parameter to /close to forse the closing of a conversation
37
- - added: v.0.1.12.1 chatclient.js
38
- - changed: info-message UI, image UI, frame UI
39
- - 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
40
-
41
- ### 3.0.80 in PROD
10
+ ## 3.0.80 in PROD
42
11
  - bug-fixed: if search a canned response, after clicked it does not replaced into text-area
43
12
 
44
- ### 3.0.80-rc.1
45
- - changed: moved sender_fullname inside bubble-message component
46
- - changed: publish onConversationSelect event to stop audio after agent has clicked on it
47
- - bug-fixed: /null loading flag_url in sidebar-user-detail
48
-
49
- ### 3.0.79 in PROD
13
+ ## 3.0.79 in PROD
50
14
  - added: segment analytics events
51
15
 
52
- ### 3.0.79-rc.4
53
- - bug-fixed: testsiteBaseUrl wrong value env property
54
-
55
- ### 3.0.79-rc.3
56
- - added: segment analytics for SignIn-SignOut-Resolved-MsgAdded-ConvAdded
57
- - added: navbar component if not mobile
58
- - added: NAVBAR translations
59
- - changed: minor improvements on UI
60
- - changed: ion-split-pane UI if mobile
61
- - changed: moved hover 'add canned' button from bubble-message to ion-conversation-detail component
62
- - changed: moved addNewCanned to tiledesk service to canned-responses service
63
- - bug-fixed: open/close detail icon not aligned correctly on click 'close'
64
-
65
- ### 3.0.79-rc.2
66
- - added: new sound if new conversation is triggered in agent's chat
67
- - changed: header UI of header-conversation-detail and unassigned-conversations components
68
-
69
- ### 3.0.79-rc.1
70
- - added: LABEL_ONLINE, LABEL_OFFLINE translations
71
- - changed: renamed ddp-header with conversations-list-header
72
- - changed: unified control to mobile/desktop app
73
- - changed: LABEL_AVAILABLE/NOT_AVAILABLE with LABEL_ONLINE/OFFLINE in user-presence component
74
- - changed: icon to user-presence
75
- - changed: UI for conversation-list, conversation-detail and info-group for desktop and mobile
76
- - changed: renamed option-header component with header-conversations-list-archived
77
- - changed: contacts-directory UI
78
- - bug-fixed: if app is opened and user press width expand, move correctly the right position
79
-
80
- ## 3.0.78 in PROD
16
+ ## 3.0.78 in PROD
81
17
  - bug-fixed: unassigned request not sound the if is the first at all
82
18
  - bug-fixed: canned responses opens in incorrect mode
83
19
 
84
- ### 3.0.78-rc.4
85
- - bug-fixed: unassigned request not sound the if is the first at all
86
- - bug-fixed: translations missed
87
- - bug-fixed: direct info not showed in conversation-header component
88
- - removed: conversation-footer border top
89
- - changed: colors to message-text-area icons and message-attachment components
90
-
91
- ### 3.0.78-rc.3
92
- - changed: user-typing location moved from conversation-header to conversation-detail component
93
- - changed: replace includes with startsWith for check what type of conversation is in project info conversation-list component
94
- - added: styleMap integrations to some elements
95
- - bug-fixed: no tooltip showed if no unserved request are present
96
-
97
- ### 3.0.78-rc.2
98
- - changed: project item UI and tooltip msg
99
- - changed: conversation UI in conversations list component
100
- - changed: conversation detail header component
101
- - added: open/close info-conversation moved from conversation-header to conversation detail component
102
- - bug-fixed: canned responses opens in incorrect mode
103
-
104
- ### 3.0.78-rc.1
105
- - changed: conversation-list page width increased
106
- - changed: background changed in info-message component
107
- - changed: project-item UI
108
- - changed: conversation-list page UI
109
-
110
20
  ## 3.0.77 in PROD
111
21
 
112
22
  ### 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.82-rc.6",
4
+ "version": "3.0.82",
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,21 +1,7 @@
1
- @import '../variables.scss';
2
-
3
1
  .split-pane-md.split-pane-visible > .split-pane-side {
4
- min-width: 320px; //360px; //312px;
2
+ min-width: 312px;
5
3
  display: block; // Safari bug fix
6
- margin-left: var(--sidebar-width);
7
- --border: 0px;
8
- }
9
-
10
- .split-pane-md:not(.mobile){
11
- height: calc( 100% - var(--nav-bar-heigth));
12
- margin-top: var(--nav-bar-heigth);
13
- }
14
-
15
- .navbar{
16
- display: flex;
17
- position: fixed;
18
- top: 0px;
4
+ margin-left: 60px;
19
5
  }
20
6
 
21
7
  .sidebar-visible {
@@ -34,10 +20,6 @@
34
20
  left: 60px
35
21
  }
36
22
 
37
- // ion-nav {
38
- // background-color: var(--list-bkg-color);
39
- // }
40
-
41
23
  // @media (min-width: 768px) {
42
24
  // .split-pane-md.split-pane-visible > .split-pane-side {
43
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
 
@@ -39,7 +38,7 @@ import { LoginPage } from './pages/authentication/login/login.page';
39
38
  import { ConversationListPage } from './pages/conversations-list/conversations-list.page';
40
39
 
41
40
  // utils
42
- import { checkPlatformIsMobile, isGroup, getParameterByName, searchIndexInArrayForUid, compareValues, stripTags } from '../chat21-core/utils/utils';
41
+ import { checkPlatformIsMobile, isGroup, getParameterByName, searchIndexInArrayForUid, compareValues } from '../chat21-core/utils/utils';
43
42
  import { STORAGE_PREFIX, PLATFORM_MOBILE, PLATFORM_DESKTOP, CHAT_ENGINE_FIREBASE, AUTH_STATE_OFFLINE, AUTH_STATE_ONLINE } from '../chat21-core/utils/constants';
44
43
  import { environment } from '../environments/environment';
45
44
  import { UserModel } from '../chat21-core/models/user';
@@ -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();
@@ -340,7 +335,6 @@ export class AppComponent implements OnInit {
340
335
 
341
336
 
342
337
  this.initializeApp('oninit');
343
- this.initSegment()
344
338
  this.listenToPostMsgs();
345
339
  }
346
340
 
@@ -473,7 +467,6 @@ export class AppComponent implements OnInit {
473
467
  this.statusBar.styleDefault();
474
468
  this.navService.init(this.sidebarNav, this.detailNav);
475
469
  // this.persistence = appconfig.authPersistence;
476
- // this.appStorageService.initialize(environment.storage_prefix, this.persistence, '')
477
470
  this.tiledeskAuthService.initialize(this.appConfigProvider.getConfig().apiUrl);
478
471
  this.messagingAuthService.initialize();
479
472
 
@@ -837,14 +830,6 @@ export class AppComponent implements OnInit {
837
830
  this.audio.src = chatBaseUrl + URL_SOUND_LIST_CONVERSATION;
838
831
  this.audio.load();
839
832
 
840
- this.audio_NewConv = new Audio();
841
- this.audio_NewConv.src = chatBaseUrl + URL_SOUND_CONVERSATION_ADDED;
842
- this.audio_NewConv.load();
843
-
844
- this.audio_Unassigned = new Audio();
845
- this.audio_Unassigned.src = chatBaseUrl + URL_SOUND_CONVERSATION_UNASSIGNED;
846
- this.audio_Unassigned.load();
847
-
848
833
  const sound_status = localStorage.getItem('dshbrd----sound')
849
834
  if(sound_status && sound_status !== 'undefined'){
850
835
  this.isSoundEnabled = sound_status === 'enabled'? true: false
@@ -854,14 +839,7 @@ export class AppComponent implements OnInit {
854
839
 
855
840
  }
856
841
 
857
- onSoundChange(event){
858
- if(event && event !== undefined){
859
- localStorage.setItem('dshbrd----sound', event)
860
- this.isSoundEnabled = event === 'enabled'? true: false
861
- }
862
- }
863
-
864
- private manageTabNotification(sound_type: string, badgeNotificationCount?: number) {
842
+ private manageTabNotification(badgeNotificationCount?: number) {
865
843
  if (!this.isTabVisible) {
866
844
  // TAB IS HIDDEN --> manage title and SOUND
867
845
  let badgeNewConverstionNumber = badgeNotificationCount? badgeNotificationCount : this.conversationsHandlerService.countIsNew()
@@ -885,26 +863,7 @@ export class AppComponent implements OnInit {
885
863
  this.isSoundEnabled = sound_status === 'enabled'? true: false
886
864
  }
887
865
  this.logger.debug('[APP-COMP] manageTabNotification can saund?', this.isInitialized, this.isSoundEnabled)
888
- if(this.isInitialized && this.isSoundEnabled) {
889
- switch(sound_type){
890
- case 'conv_added': {
891
- this.soundConversationAdded();
892
- break;
893
- }
894
- case 'new_message': {
895
- this.soundMessage();
896
- break;
897
- }
898
- case 'conv_unassigned': {
899
- this.soundConversationUnassigned();
900
- break;
901
- }
902
- default:{
903
- this.soundMessage();
904
- break;
905
- }
906
- }
907
- }
866
+ if(this.isInitialized && this.isSoundEnabled) this.soundMessage()
908
867
  }
909
868
 
910
869
  soundMessage() {
@@ -920,7 +879,7 @@ export class AppComponent implements OnInit {
920
879
  // }, 4000);
921
880
 
922
881
  //play sound every 4s from the fist time you receive a conversation added/changed
923
- if(!this.hasPlayed && !this.hasPlayedConversation){
882
+ if(!this.hasPlayed){
924
883
  that.audio.play().then(() => {
925
884
  that.hasPlayed = true
926
885
  that.logger.debug('[APP-COMP] ****** soundMessage played *****');
@@ -932,36 +891,6 @@ export class AppComponent implements OnInit {
932
891
  });
933
892
  }
934
893
  }
935
-
936
- soundConversationAdded(){
937
- const that = this;
938
- if(!this.hasPlayedConversation ){
939
- that.audio_NewConv.play().then(() => {
940
- that.hasPlayedConversation = true
941
- that.logger.debug('[APP-COMP] ****** soundConversationAdded played *****');
942
- setTimeout(() => {
943
- that.hasPlayedConversation = false
944
- }, 4000);
945
- }).catch((error: any) => {
946
- that.logger.error('[APP-COMP] ***soundConversationAdded error*', error);
947
- });
948
- }
949
- }
950
-
951
- soundConversationUnassigned(){
952
- const that = this;
953
- if(!this.hasPlayedConversationUnassigned ){
954
- that.audio_Unassigned.play().then(() => {
955
- that.hasPlayedConversationUnassigned = true
956
- that.logger.debug('[APP-COMP] ****** soundConversationUnassigned played *****');
957
- setTimeout(() => {
958
- that.hasPlayedConversationUnassigned = false
959
- }, 4000);
960
- }).catch((error: any) => {
961
- that.logger.error('[APP-COMP] ***soundConversationUnassigned error*', error);
962
- });
963
- }
964
- }
965
894
  /**---------------- SOUND FUNCTIONS --> END <--- +*/
966
895
  /***************************************************+*/
967
896
 
@@ -1009,11 +938,11 @@ export class AppComponent implements OnInit {
1009
938
  this.events.subscribe('uidConvSelected:changed', this.subscribeChangedConversationSelected);
1010
939
  this.events.subscribe('profileInfoButtonClick:logout', this.subscribeProfileInfoButtonLogOut);
1011
940
  this.events.subscribe('unservedRequest:count', this.subscribeUnservedRequestCount)
1012
- this.events.subscribe('convList:onConversationSelected', this.subscribeConversationSelected)
941
+
1013
942
  this.conversationsHandlerService.conversationAdded.subscribe((conversation: ConversationModel) => {
1014
943
  // this.logger.log('[APP-COMP] ***** subscribeConversationAdded *****', conversation);
1015
944
  if (conversation && conversation.is_new === true) {
1016
- this.manageTabNotification('conv_added')
945
+ this.manageTabNotification()
1017
946
  }
1018
947
  if(conversation) this.updateConversationsOnStorage()
1019
948
  });
@@ -1031,7 +960,7 @@ export class AppComponent implements OnInit {
1031
960
  this.logger.log('[APP-COMP] ***** subscribeConversationChangedDetailed currentUser: ', currentUser);
1032
961
  if (changes.value && changes.value.sender !== currentUser.uid) {
1033
962
  if(changes.value.is_new === changes.previousValue.is_new){
1034
- this.manageTabNotification('new_message');
963
+ this.manageTabNotification();
1035
964
  }
1036
965
  }
1037
966
  }
@@ -1043,6 +972,7 @@ export class AppComponent implements OnInit {
1043
972
  this.updateConversationsOnStorage();
1044
973
  isDevMode()? null: this.segmentResolved(conversation)
1045
974
  }
975
+
1046
976
  });
1047
977
  }
1048
978
 
@@ -1088,6 +1018,7 @@ export class AppComponent implements OnInit {
1088
1018
  this.initConversationsHandler(currentUser.uid);
1089
1019
  this.initArchivedConversationsHandler(currentUser.uid);
1090
1020
  isDevMode()? null: this.segmentSignIn()
1021
+
1091
1022
  }
1092
1023
  this.checkPlatform();
1093
1024
  try {
@@ -1128,7 +1059,7 @@ export class AppComponent implements OnInit {
1128
1059
 
1129
1060
  // this.unsubscribe$.next();
1130
1061
  // this.unsubscribe$.complete();
1131
-
1062
+
1132
1063
  }
1133
1064
 
1134
1065
  goToDashboardLogin(){
@@ -1189,7 +1120,7 @@ export class AppComponent implements OnInit {
1189
1120
  }
1190
1121
 
1191
1122
  subscribeProfileInfoButtonLogOut = (hasClickedLogout) => {
1192
- this.logger.log('[APP-COMP] FIREBASE-NOTIFICATION >>>> subscribeProfileInfoButtonLogOut ');
1123
+ this.logger.log('[APP-COMP] FIREBASE-NOTIFICATION >>>> subscribeProfileInfoButtonLogOut');
1193
1124
  // if (hasClickedLogout === true) {
1194
1125
  // this.removePresenceAndLogout()
1195
1126
  // }
@@ -1210,7 +1141,6 @@ export class AppComponent implements OnInit {
1210
1141
 
1211
1142
  if (res === 'success') {
1212
1143
  that.removePresenceAndLogout();
1213
-
1214
1144
  } else {
1215
1145
  that.removePresenceAndLogout();
1216
1146
  // that.presentToast();
@@ -1224,19 +1154,13 @@ export class AppComponent implements OnInit {
1224
1154
 
1225
1155
  subscribeUnservedRequestCount = (unservedRequestCount) => {
1226
1156
  if(unservedRequestCount && unservedRequestCount > 0){
1227
- this.logger.debug("subscribeUnservedRequestCount appIsInitialized::::",this.isInitialized)
1157
+ this.logger.debug("hasToSoundUnservedRequestCount::::", this.isInitialized)
1228
1158
  if(this.isInitialized){
1229
- this.manageTabNotification('conv_unassigned', unservedRequestCount) //sound and alternate title
1159
+ this.manageTabNotification(unservedRequestCount) //sound and alternate title
1230
1160
  }
1231
1161
  }
1232
1162
  }
1233
1163
 
1234
- subscribeConversationSelected= (conversation: ConversationModel) => {
1235
- if(conversation && conversation.is_new){
1236
- this.audio_NewConv.pause()
1237
- }
1238
- }
1239
-
1240
1164
  private async presentModal(calledby): Promise<any> {
1241
1165
  this.logger.log('[APP-COMP] presentModal calledby', calledby, '- hadBeenCalledOpenModal: ', this.hadBeenCalledOpenModal);
1242
1166
  const attributes = { tenant: this.tenant, enableBackdropDismiss: false };
@@ -1344,21 +1268,8 @@ export class AppComponent implements OnInit {
1344
1268
  }
1345
1269
  }
1346
1270
 
1347
- private initSegment(){
1348
- if(!isDevMode()){
1349
- var head = document.getElementsByTagName('head')[0];
1350
- var script = document.createElement('script');
1351
- script.type="text/javascript";
1352
- script.text =`!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"];analytics.factory=function(e){return function(){var t=Array.prototype.slice.call(arguments);t.unshift(e);analytics.push(t);return analytics}};for(var e=0;e<analytics.methods.length;e++){var key=analytics.methods[e];analytics[key]=analytics.factory(key)}analytics.load=function(key,e){var t=document.createElement("script");t.type="text/javascript";t.async=!0;t.src="https://cdn.segment.com/analytics.js/v1/" + key + "/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n);analytics._loadOptions=e};analytics._writeKey="qaTU0wG6VH6xPAhOzD2kneI70Txg1fTB";;analytics.SNIPPET_VERSION="4.15.3";
1353
- analytics.load("qaTU0wG6VH6xPAhOzD2kneI70Txg1fTB");
1354
- analytics.page();
1355
- }}();`
1356
- head.appendChild(script);
1357
- }
1358
- }
1359
-
1360
1271
  private segmentSignIn(){
1361
- let user = this.tiledeskAuthService.getCurrentUser()
1272
+ let user = this.tiledeskAuthService.getCurrentUser();
1362
1273
  try {
1363
1274
  window['analytics'].page("Chat Auth Page, Signin", {});
1364
1275
  } catch (err) {
@@ -1388,7 +1299,7 @@ export class AppComponent implements OnInit {
1388
1299
 
1389
1300
 
1390
1301
  private segmentSignedOut(){
1391
- let user = this.tiledeskAuthService.getCurrentUser()
1302
+ let user = this.tiledeskAuthService.getCurrentUser();
1392
1303
  try {
1393
1304
  window['analytics'].page("Chat Auth Page, Signed Out", {});
1394
1305
  } catch (err) {
@@ -1473,7 +1384,6 @@ export class AppComponent implements OnInit {
1473
1384
  }
1474
1385
  }
1475
1386
 
1476
-
1477
1387
  @HostListener('document:visibilitychange', [])
1478
1388
  visibilitychange() {
1479
1389
  // this.logger.debug("document TITLE", document.hidden, document.title);
@@ -1537,26 +1447,5 @@ export class AppComponent implements OnInit {
1537
1447
  this.isSoundEnabled = event.newValue === 'enabled'? true: false
1538
1448
  }
1539
1449
  }
1540
-
1541
-
1542
- // @HostListener('mouseenter', ['$event'])
1543
- // onMouseEnter(event: any) {
1544
- // console.log('HostListener onMouseEnter-->', event)
1545
- // }
1546
-
1547
- // @HostListener('mouseleave', ['$event'])
1548
- // onMouseLeave(event: any) {
1549
- // console.log('HostListener onMouseLeave-->', event)
1550
- // }
1551
-
1552
- // @HostListener('focus', ['$event'])
1553
- // onFocus(event: any) {
1554
- // console.log('HostListener onFocus-->', event)
1555
- // }
1556
-
1557
- // @HostListener('blur', ['$event'])
1558
- // onBlur(event: any) {
1559
- // console.log('HostListener onBlur-->', event)
1560
- // }
1561
1450
  }
1562
1451
 
@@ -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