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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/CHANGELOG.md +71 -3
  2. package/README.md +2 -2
  3. package/deploy_amazon_beta.sh +29 -0
  4. package/deploy_amazon_prod.sh +30 -0
  5. package/package.json +2 -2
  6. package/src/app/app.component.html +7 -1
  7. package/src/app/app.component.scss +18 -2
  8. package/src/app/app.component.ts +113 -17
  9. package/src/app/app.module.ts +3 -1
  10. package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +8 -1
  11. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +77 -23
  12. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +168 -86
  13. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +39 -2
  14. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +11 -24
  15. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +6 -10
  16. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.spec.ts +2 -2
  17. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +16 -25
  18. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +5 -1
  19. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +22 -15
  20. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +25 -5
  21. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +2 -1
  22. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +14 -15
  23. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +24 -5
  24. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +6 -1
  25. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +12 -13
  26. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +26 -5
  27. package/src/app/chatlib/conversation-detail/message/frame/frame.component.html +8 -2
  28. package/src/app/chatlib/conversation-detail/message/frame/frame.component.scss +36 -0
  29. package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +2 -2
  30. package/src/app/chatlib/conversation-detail/message/html/html.component.ts +0 -1
  31. package/src/app/chatlib/conversation-detail/message/image/image.component.html +1 -1
  32. package/src/app/chatlib/conversation-detail/message/image/image.component.scss +17 -5
  33. package/src/app/chatlib/conversation-detail/message/image/image.component.ts +1 -1
  34. package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +3 -2
  35. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +16 -6
  36. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -3
  37. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +2 -0
  38. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +78 -52
  39. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +62 -20
  40. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -10
  41. package/src/app/components/canned-response/canned-response.component.html +4 -4
  42. package/src/app/components/canned-response/canned-response.component.scss +8 -2
  43. package/src/app/components/canned-response/canned-response.component.ts +4 -4
  44. package/src/app/components/contacts-directory/contacts-directory.component.html +22 -26
  45. package/src/app/components/contacts-directory/contacts-directory.component.scss +8 -6
  46. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +61 -42
  47. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +98 -61
  48. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +9 -25
  49. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +116 -0
  50. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +8 -6
  51. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
  52. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +25 -87
  53. package/src/app/components/conversation-info/info-content/info-content.component.html +2 -1
  54. package/src/app/components/conversation-info/info-content/info-content.component.ts +3 -2
  55. package/src/app/components/conversation-info/info-direct/info-direct.component.html +1 -9
  56. package/src/app/components/conversation-info/info-direct/info-direct.component.ts +0 -2
  57. package/src/app/components/conversation-info/info-group/info-group.component.html +44 -108
  58. package/src/app/components/conversation-info/info-group/info-group.component.scss +101 -61
  59. package/src/app/components/conversation-info/info-group/info-group.component.ts +1 -0
  60. package/src/app/components/{ddp-header/ddp-header.component.html → conversations-list/header-conversations-list/header-conversations-list.component.html} +3 -3
  61. package/src/app/components/{ddp-header/ddp-header.component.scss → conversations-list/header-conversations-list/header-conversations-list.component.scss} +16 -4
  62. package/src/app/components/{conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts → conversations-list/header-conversations-list/header-conversations-list.component.spec.ts} +6 -6
  63. package/src/app/components/{ddp-header/ddp-header.component.ts → conversations-list/header-conversations-list/header-conversations-list.component.ts} +7 -16
  64. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +12 -0
  65. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +14 -0
  66. package/src/app/components/{conversation-detail/option-header/option-header.component.spec.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.spec.ts} +5 -5
  67. package/src/app/components/{conversation-detail/option-header/option-header.component.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.ts} +5 -4
  68. package/src/app/components/navbar/navbar.component.html +103 -0
  69. package/src/app/components/navbar/navbar.component.scss +249 -0
  70. package/src/app/components/{ddp-header/ddp-header.component.spec.ts → navbar/navbar.component.spec.ts} +6 -6
  71. package/src/app/components/navbar/navbar.component.ts +189 -0
  72. package/src/app/components/project-item/project-item.component.html +98 -149
  73. package/src/app/components/project-item/project-item.component.scss +42 -35
  74. package/src/app/components/project-item/project-item.component.ts +16 -4
  75. package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +3 -3
  76. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +2 -7
  77. package/src/app/components/utils/user-presence/user-presence.component.html +7 -2
  78. package/src/app/components/utils/user-presence/user-presence.component.scss +35 -18
  79. package/src/app/components/utils/user-presence/user-presence.component.ts +6 -10
  80. package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
  81. package/src/app/pages/contacts-directory/contacts-directory.page.scss +41 -0
  82. package/src/app/pages/contacts-directory/contacts-directory.page.ts +2 -0
  83. package/src/app/pages/conversation-detail/conversation-detail.module.ts +0 -8
  84. package/src/app/pages/conversation-detail/conversation-detail.page.html +40 -23
  85. package/src/app/pages/conversation-detail/conversation-detail.page.scss +40 -250
  86. package/src/app/pages/conversation-detail/conversation-detail.page.ts +183 -81
  87. package/src/app/pages/conversations-list/conversations-list.page.html +11 -8
  88. package/src/app/pages/conversations-list/conversations-list.page.scss +11 -2
  89. package/src/app/pages/conversations-list/conversations-list.page.ts +25 -22
  90. package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
  91. package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
  92. package/src/app/pages/loader-preview/loader-preview.page.scss +4 -0
  93. package/src/app/pages/loader-preview/loader-preview.page.ts +1 -2
  94. package/src/app/pages/profile-info/profile-info.page.html +2 -4
  95. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
  96. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +42 -0
  97. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +1 -0
  98. package/src/app/services/canned-responses/canned-responses.service.ts +26 -0
  99. package/src/app/services/projects/projects.service.spec.ts +12 -0
  100. package/src/app/services/projects/projects.service.ts +43 -0
  101. package/src/app/services/tiledesk/tiledesk.service.ts +2 -26
  102. package/src/app/shared/shared.module.ts +24 -33
  103. package/src/assets/i18n/ar.json +278 -265
  104. package/src/assets/i18n/az.json +14 -1
  105. package/src/assets/i18n/de.json +15 -2
  106. package/src/assets/i18n/en.json +15 -2
  107. package/src/assets/i18n/es.json +15 -2
  108. package/src/assets/i18n/fr.json +14 -1
  109. package/src/assets/i18n/it.json +14 -1
  110. package/src/assets/i18n/kk.json +15 -2
  111. package/src/assets/i18n/pt.json +15 -2
  112. package/src/assets/i18n/ru.json +14 -1
  113. package/src/assets/i18n/sr.json +277 -264
  114. package/src/assets/i18n/sv.json +15 -2
  115. package/src/assets/i18n/tr.json +15 -2
  116. package/src/assets/i18n/uk.json +15 -2
  117. package/src/assets/i18n/uz.json +14 -1
  118. package/src/assets/js/chat21client.js +177 -149
  119. package/src/assets/sounds/interface-start.mp3 +0 -0
  120. package/src/assets/sounds/wheep-wheep.mp3 +0 -0
  121. package/src/chat21-core/models/conversation.ts +0 -1
  122. package/src/chat21-core/models/projects.ts +27 -0
  123. package/src/chat21-core/providers/firebase/firebase-typing.service.ts +7 -9
  124. package/src/chat21-core/utils/constants.ts +6 -1
  125. package/src/chat21-core/utils/convertRequestToConversation.ts +41 -0
  126. package/src/chat21-core/utils/user-typing/user-typing.component.html +8 -5
  127. package/src/chat21-core/utils/user-typing/user-typing.component.scss +87 -17
  128. package/src/chat21-core/utils/user-typing/user-typing.component.ts +12 -94
  129. package/src/chat21-core/utils/utils.ts +38 -10
  130. package/src/global.scss +52 -56
  131. package/src/index.html +2 -2
  132. package/src/variables.scss +30 -10
  133. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +0 -3
  134. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +0 -21
  135. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +0 -24
  136. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +0 -14
  137. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +0 -54
  138. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +0 -98
  139. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +0 -84
  140. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +0 -30
  141. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +0 -83
  142. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +0 -24
  143. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +0 -68
  144. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +0 -3
  145. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +0 -10
  146. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +0 -24
  147. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +0 -14
  148. package/src/app/components/conversation-detail/option-header/option-header.component.html +0 -13
  149. package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
package/CHANGELOG.md CHANGED
@@ -1,15 +1,83 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
- ## 3.0.80 in PROD
3
+ ### 3.0.81-rc.1
4
+ - added: remove bubble-message background if is image or iframe and no text is in message
5
+ - added: new sound if unassigned request arrive
6
+ - added: animation on hover an image
7
+ - added: parameter to /close to forse the closing of a conversation
8
+ - added: v.0.1.12.1 chatclient.js
9
+ - changed: info-message UI, image UI, frame UI
10
+ - 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
11
+
12
+ ### 3.0.80 in PROD
4
13
  - bug-fixed: if search a canned response, after clicked it does not replaced into text-area
5
14
 
6
- ## 3.0.79 in PROD
15
+ ### 3.0.80-rc.1
16
+ - changed: moved sender_fullname inside bubble-message component
17
+ - changed: publish onConversationSelect event to stop audio after agent has clicked on it
18
+ - bug-fixed: /null loading flag_url in sidebar-user-detail
19
+
20
+ ### 3.0.79 in PROD
7
21
  - added: segment analytics events
8
22
 
9
- ## 3.0.78 in PROD
23
+ ### 3.0.79-rc.4
24
+ - bug-fixed: testsiteBaseUrl wrong value env property
25
+
26
+ ### 3.0.79-rc.3
27
+ - added: segment analytics for SignIn-SignOut-Resolved-MsgAdded-ConvAdded
28
+ - added: navbar component if not mobile
29
+ - added: NAVBAR translations
30
+ - changed: minor improvements on UI
31
+ - changed: ion-split-pane UI if mobile
32
+ - changed: moved hover 'add canned' button from bubble-message to ion-conversation-detail component
33
+ - changed: moved addNewCanned to tiledesk service to canned-responses service
34
+ - bug-fixed: open/close detail icon not aligned correctly on click 'close'
35
+
36
+ ### 3.0.79-rc.2
37
+ - added: new sound if new conversation is triggered in agent's chat
38
+ - changed: header UI of header-conversation-detail and unassigned-conversations components
39
+
40
+ ### 3.0.79-rc.1
41
+ - added: LABEL_ONLINE, LABEL_OFFLINE translations
42
+ - changed: renamed ddp-header with conversations-list-header
43
+ - changed: unified control to mobile/desktop app
44
+ - changed: LABEL_AVAILABLE/NOT_AVAILABLE with LABEL_ONLINE/OFFLINE in user-presence component
45
+ - changed: icon to user-presence
46
+ - changed: UI for conversation-list, conversation-detail and info-group for desktop and mobile
47
+ - changed: renamed option-header component with header-conversations-list-archived
48
+ - changed: contacts-directory UI
49
+ - bug-fixed: if app is opened and user press width expand, move correctly the right position
50
+
51
+ ## 3.0.78 in PROD
10
52
  - bug-fixed: unassigned request not sound the if is the first at all
11
53
  - bug-fixed: canned responses opens in incorrect mode
12
54
 
55
+ ### 3.0.78-rc.4
56
+ - bug-fixed: unassigned request not sound the if is the first at all
57
+ - bug-fixed: translations missed
58
+ - bug-fixed: direct info not showed in conversation-header component
59
+ - removed: conversation-footer border top
60
+ - changed: colors to message-text-area icons and message-attachment components
61
+
62
+ ### 3.0.78-rc.3
63
+ - changed: user-typing location moved from conversation-header to conversation-detail component
64
+ - changed: replace includes with startsWith for check what type of conversation is in project info conversation-list component
65
+ - added: styleMap integrations to some elements
66
+ - bug-fixed: no tooltip showed if no unserved request are present
67
+
68
+ ### 3.0.78-rc.2
69
+ - changed: project item UI and tooltip msg
70
+ - changed: conversation UI in conversations list component
71
+ - changed: conversation detail header component
72
+ - added: open/close info-conversation moved from conversation-header to conversation detail component
73
+ - bug-fixed: canned responses opens in incorrect mode
74
+
75
+ ### 3.0.78-rc.1
76
+ - changed: conversation-list page width increased
77
+ - changed: background changed in info-message component
78
+ - changed: project-item UI
79
+ - changed: conversation-list page UI
80
+
13
81
  ## 3.0.77 in PROD
14
82
 
15
83
  ### 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
  };
@@ -0,0 +1,29 @@
1
+ #npm version prerelease --preid=beta
2
+ version=`node -e 'console.log(require("./package.json").version)'`
3
+ echo "version $version"
4
+
5
+ URL_VER=${version//[.]//}
6
+ echo 'URL_VER: ---->'$URL_VER
7
+
8
+ sed -i -e "s/$URL_VER/g" src/utils/constants.ts
9
+
10
+ # ng build --prod --base-href /$NEW_BUILD/
11
+ #ionic cordova build browser --prod
12
+
13
+ ionic cordova platform add browser --save
14
+ #ionic cordova build browser --prod --release
15
+ ionic cordova build --configuration="pre" browser #--prod --verbose
16
+
17
+ cp -p src/firebase-messaging-sw.js platforms/browser/www/
18
+ cp -p src/manifest.json platforms/browser/www/
19
+ cp -p src/chat-config.json platforms/browser/www/
20
+
21
+ cd platforms/browser/www
22
+ aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5/$version/ --cache-control max-age=300
23
+ aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5/ --cache-control max-age=300
24
+ cd ../../../
25
+
26
+ #aws cloudfront create-invalidation --distribution-id E13L8CUUKUWAJF --paths "/*"
27
+
28
+ echo new version deployed on s3://tiledesk-dashboard-pre/chat-ionic5/$version/
29
+ echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-dashboard-pre/chat-ionic5/$version/index.html
@@ -0,0 +1,30 @@
1
+ # npm version patch
2
+ version=`node -e 'console.log(require("./package.json").version)'`
3
+ echo "version $version"
4
+
5
+ URL_VER=${version//[.]//}
6
+ echo 'URL_VER: ---->'$URL_VER
7
+
8
+ # sed -i -e "s/$start$ver.$build/$start$NEW_VER.$NEW_BUILD/g" src/utils/constants.ts
9
+ sed -i -e "s/$URL_VER/g" src/utils/constants.ts
10
+
11
+
12
+ ionic cordova platform add browser --save
13
+ #ionic cordova build --env=prod browser -- --base-href /www/ --prod
14
+ ionic cordova build --env=prod browser --prod
15
+
16
+ cp -p src/firebase-messaging-sw.js platforms/browser/www/
17
+ cp -p src/manifest.json platforms/browser/www/
18
+ cp -p src/chat-config.json platforms/browser/www/
19
+
20
+ cd platforms/browser/www
21
+ aws s3 sync . s3://tiledesk-console/v2/chat/ --cache-control max-age=172800
22
+ aws s3 sync . s3://tiledesk-console/v2/chat/$version/ --cache-control max-age=172800
23
+ # aws s3 sync . s3://tiledesk-console/v2/chat/latest/ --cache-control max-age=172800
24
+ cd ../../../
25
+
26
+ # aws cloudfront create-invalidation --distribution-id E36UIP90GOSFPM --paths "/*"
27
+
28
+ # echo new version deployed on s3://tiledesk-dashboard/chat/$NEW_BUILD/
29
+ echo new version deployed on s3://tiledesk-console/v2/chat/$version/
30
+ echo available on https://console.tiledesk.com/v2/chat/$version/index.html
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",
4
+ "version": "3.0.81-rc.1",
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,6 +5,12 @@
5
5
 
6
6
  <app-network-offline></app-network-offline>
7
7
 
8
+
9
+ <app-navbar *ngIf="!IS_ON_MOBILE_DEVICE"
10
+ [isSoundEnabled]="isSoundEnabled"
11
+ (onSoundChange)="onSoundChange($event)">
12
+ </app-navbar>
13
+
8
14
  <div class="sidebar" [ngClass]="{'hide-sidebar': IS_ONLINE === false || IS_ON_MOBILE_DEVICE === true || SUPPORT_MODE === false}">
9
15
  <app-sidebar></app-sidebar>
10
16
  </div>
@@ -13,7 +19,7 @@
13
19
  <app-sidebar-user-details> </app-sidebar-user-details>
14
20
  </div>
15
21
 
16
- <ion-split-pane when="md" contentId="main">
22
+ <ion-split-pane when="md" contentId="main" [ngClass]="{'mobile': IS_ON_MOBILE_DEVICE}">
17
23
  <!-- 'sidebar-visible': IS_ONLINE === true && SUPPORT_MODE === true, -->
18
24
  <ion-nav #sidebarNav [root]="sidebarPage" [ngClass]="{'sidebar-hidden': IS_ON_MOBILE_DEVICE === true || SUPPORT_MODE === false}"></ion-nav>
19
25
  <!-- our side menu -->
@@ -1,7 +1,19 @@
1
1
  .split-pane-md.split-pane-visible > .split-pane-side {
2
- min-width: 312px;
2
+ min-width: 360px; //312px;
3
3
  display: block; // Safari bug fix
4
- margin-left: 60px;
4
+ margin-left: var(--sidebar-width);
5
+ --border: 0px;
6
+ }
7
+
8
+ .split-pane-md:not(.mobile){
9
+ height: calc( 100% - var(--nav-bar-heigth));
10
+ margin-top: var(--nav-bar-heigth);
11
+ }
12
+
13
+ .navbar{
14
+ display: flex;
15
+ position: fixed;
16
+ top: 0px;
5
17
  }
6
18
 
7
19
  .sidebar-visible {
@@ -20,6 +32,10 @@
20
32
  left: 60px
21
33
  }
22
34
 
35
+ // ion-nav {
36
+ // background-color: var(--list-bkg-color);
37
+ // }
38
+
23
39
  // @media (min-width: 768px) {
24
40
  // .split-pane-md.split-pane-visible > .split-pane-side {
25
41
  // min-width: 312px;
@@ -1,5 +1,6 @@
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';
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';
3
4
  import { ArchivedConversationsHandlerService } from 'src/chat21-core/providers/abstract/archivedconversations-handler.service';
4
5
  import { AppStorageService } from 'src/chat21-core/providers/abstract/app-storage.service';
5
6
 
@@ -87,11 +88,15 @@ export class AppComponent implements OnInit {
87
88
  public authModal: any;
88
89
 
89
90
  private audio: any;
91
+ private audio_NewConv: any;
92
+ private audio_Unassigned: any;
90
93
  private setIntervalTime: any;
91
94
  private setTimeoutSound: any;
92
95
  private isTabVisible: boolean = true;
93
- private isSoundEnabled: boolean;
96
+ public isSoundEnabled: boolean;
94
97
  private hasPlayed: boolean;
98
+ private hasPlayedConversation: boolean;
99
+ private hasPlayedConversationUnassigned: boolean;
95
100
  private tabTitle: string;
96
101
  private setTimeoutConversationsEvent: any;
97
102
  private logger: LoggerService = LoggerInstance.getInstance();
@@ -831,6 +836,14 @@ export class AppComponent implements OnInit {
831
836
  this.audio.src = chatBaseUrl + URL_SOUND_LIST_CONVERSATION;
832
837
  this.audio.load();
833
838
 
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
+
834
847
  const sound_status = localStorage.getItem('dshbrd----sound')
835
848
  if(sound_status && sound_status !== 'undefined'){
836
849
  this.isSoundEnabled = sound_status === 'enabled'? true: false
@@ -840,7 +853,14 @@ export class AppComponent implements OnInit {
840
853
 
841
854
  }
842
855
 
843
- private manageTabNotification(badgeNotificationCount?: number) {
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) {
844
864
  if (!this.isTabVisible) {
845
865
  // TAB IS HIDDEN --> manage title and SOUND
846
866
  let badgeNewConverstionNumber = badgeNotificationCount? badgeNotificationCount : this.conversationsHandlerService.countIsNew()
@@ -864,7 +884,26 @@ export class AppComponent implements OnInit {
864
884
  this.isSoundEnabled = sound_status === 'enabled'? true: false
865
885
  }
866
886
  this.logger.debug('[APP-COMP] manageTabNotification can saund?', this.isInitialized, this.isSoundEnabled)
867
- if(this.isInitialized && this.isSoundEnabled) this.soundMessage()
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
+ }
868
907
  }
869
908
 
870
909
  soundMessage() {
@@ -880,7 +919,7 @@ export class AppComponent implements OnInit {
880
919
  // }, 4000);
881
920
 
882
921
  //play sound every 4s from the fist time you receive a conversation added/changed
883
- if(!this.hasPlayed){
922
+ if(!this.hasPlayed && !this.hasPlayedConversation){
884
923
  that.audio.play().then(() => {
885
924
  that.hasPlayed = true
886
925
  that.logger.debug('[APP-COMP] ****** soundMessage played *****');
@@ -892,6 +931,36 @@ export class AppComponent implements OnInit {
892
931
  });
893
932
  }
894
933
  }
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
+ }
895
964
  /**---------------- SOUND FUNCTIONS --> END <--- +*/
896
965
  /***************************************************+*/
897
966
 
@@ -939,11 +1008,11 @@ export class AppComponent implements OnInit {
939
1008
  this.events.subscribe('uidConvSelected:changed', this.subscribeChangedConversationSelected);
940
1009
  this.events.subscribe('profileInfoButtonClick:logout', this.subscribeProfileInfoButtonLogOut);
941
1010
  this.events.subscribe('unservedRequest:count', this.subscribeUnservedRequestCount)
942
-
1011
+ this.events.subscribe('convList:onConversationSelected', this.subscribeConversationSelected)
943
1012
  this.conversationsHandlerService.conversationAdded.subscribe((conversation: ConversationModel) => {
944
1013
  // this.logger.log('[APP-COMP] ***** subscribeConversationAdded *****', conversation);
945
1014
  if (conversation && conversation.is_new === true) {
946
- this.manageTabNotification()
1015
+ this.manageTabNotification('conv_added')
947
1016
  }
948
1017
  if(conversation) this.updateConversationsOnStorage()
949
1018
  });
@@ -961,7 +1030,7 @@ export class AppComponent implements OnInit {
961
1030
  this.logger.log('[APP-COMP] ***** subscribeConversationChangedDetailed currentUser: ', currentUser);
962
1031
  if (changes.value && changes.value.sender !== currentUser.uid) {
963
1032
  if(changes.value.is_new === changes.previousValue.is_new){
964
- this.manageTabNotification();
1033
+ this.manageTabNotification('new_message');
965
1034
  }
966
1035
  }
967
1036
  }
@@ -973,7 +1042,6 @@ export class AppComponent implements OnInit {
973
1042
  this.updateConversationsOnStorage();
974
1043
  isDevMode()? null: this.segmentResolved(conversation)
975
1044
  }
976
-
977
1045
  });
978
1046
  }
979
1047
 
@@ -1019,7 +1087,6 @@ export class AppComponent implements OnInit {
1019
1087
  this.initConversationsHandler(currentUser.uid);
1020
1088
  this.initArchivedConversationsHandler(currentUser.uid);
1021
1089
  isDevMode()? null: this.segmentSignIn()
1022
-
1023
1090
  }
1024
1091
  this.checkPlatform();
1025
1092
  try {
@@ -1060,7 +1127,7 @@ export class AppComponent implements OnInit {
1060
1127
 
1061
1128
  // this.unsubscribe$.next();
1062
1129
  // this.unsubscribe$.complete();
1063
-
1130
+
1064
1131
  }
1065
1132
 
1066
1133
  goToDashboardLogin(){
@@ -1121,7 +1188,7 @@ export class AppComponent implements OnInit {
1121
1188
  }
1122
1189
 
1123
1190
  subscribeProfileInfoButtonLogOut = (hasClickedLogout) => {
1124
- this.logger.log('[APP-COMP] FIREBASE-NOTIFICATION >>>> subscribeProfileInfoButtonLogOut');
1191
+ this.logger.log('[APP-COMP] FIREBASE-NOTIFICATION >>>> subscribeProfileInfoButtonLogOut ');
1125
1192
  // if (hasClickedLogout === true) {
1126
1193
  // this.removePresenceAndLogout()
1127
1194
  // }
@@ -1142,6 +1209,7 @@ export class AppComponent implements OnInit {
1142
1209
 
1143
1210
  if (res === 'success') {
1144
1211
  that.removePresenceAndLogout();
1212
+
1145
1213
  } else {
1146
1214
  that.removePresenceAndLogout();
1147
1215
  // that.presentToast();
@@ -1155,13 +1223,19 @@ export class AppComponent implements OnInit {
1155
1223
 
1156
1224
  subscribeUnservedRequestCount = (unservedRequestCount) => {
1157
1225
  if(unservedRequestCount && unservedRequestCount > 0){
1158
- this.logger.debug("hasToSoundUnservedRequestCount::::", this.isInitialized)
1226
+ this.logger.debug("subscribeUnservedRequestCount appIsInitialized::::",this.isInitialized)
1159
1227
  if(this.isInitialized){
1160
- this.manageTabNotification(unservedRequestCount) //sound and alternate title
1228
+ this.manageTabNotification('conv_unassigned', unservedRequestCount) //sound and alternate title
1161
1229
  }
1162
1230
  }
1163
1231
  }
1164
1232
 
1233
+ subscribeConversationSelected= (conversation: ConversationModel) => {
1234
+ if(conversation && conversation.is_new){
1235
+ this.audio_NewConv.pause()
1236
+ }
1237
+ }
1238
+
1165
1239
  private async presentModal(calledby): Promise<any> {
1166
1240
  this.logger.log('[APP-COMP] presentModal calledby', calledby, '- hadBeenCalledOpenModal: ', this.hadBeenCalledOpenModal);
1167
1241
  const attributes = { tenant: this.tenant, enableBackdropDismiss: false };
@@ -1270,7 +1344,7 @@ export class AppComponent implements OnInit {
1270
1344
  }
1271
1345
 
1272
1346
  private segmentSignIn(){
1273
- let user = this.tiledeskAuthService.getCurrentUser();
1347
+ let user = this.tiledeskAuthService.getCurrentUser()
1274
1348
  try {
1275
1349
  window['analytics'].page("Chat Auth Page, Signin", {});
1276
1350
  } catch (err) {
@@ -1300,7 +1374,7 @@ export class AppComponent implements OnInit {
1300
1374
 
1301
1375
 
1302
1376
  private segmentSignedOut(){
1303
- let user = this.tiledeskAuthService.getCurrentUser();
1377
+ let user = this.tiledeskAuthService.getCurrentUser()
1304
1378
  try {
1305
1379
  window['analytics'].page("Chat Auth Page, Signed Out", {});
1306
1380
  } catch (err) {
@@ -1385,6 +1459,7 @@ export class AppComponent implements OnInit {
1385
1459
  }
1386
1460
  }
1387
1461
 
1462
+
1388
1463
  @HostListener('document:visibilitychange', [])
1389
1464
  visibilitychange() {
1390
1465
  // this.logger.debug("document TITLE", document.hidden, document.title);
@@ -1448,5 +1523,26 @@ export class AppComponent implements OnInit {
1448
1523
  this.isSoundEnabled = event.newValue === 'enabled'? true: false
1449
1524
  }
1450
1525
  }
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
+ // }
1451
1547
  }
1452
1548
 
@@ -1,3 +1,4 @@
1
+ import { ConvertRequestToConversation } from './../chat21-core/utils/convertRequestToConversation';
1
2
  import { LogLevel, PUSH_ENGINE_FIREBASE, PUSH_ENGINE_MQTT } from './../chat21-core/utils/constants';
2
3
  import { CustomLogger } from 'src/chat21-core/providers/logger/customLogger';
3
4
  import { NgModule, ErrorHandler, APP_INITIALIZER } from '@angular/core';
@@ -369,7 +370,8 @@ const appInitializerFn = (appConfig: AppConfigProvider, logger: NGXLogger) => {
369
370
  EventsService,
370
371
  Chooser,
371
372
  Chat21Service,
372
- WebSocketJs
373
+ WebSocketJs,
374
+ ConvertRequestToConversation
373
375
  ]
374
376
  })
375
377
  export class AppModule { }
@@ -17,11 +17,18 @@ export class ConversationContentComponent implements OnInit {
17
17
  @Input() messages: MessageModel[]
18
18
  @Input() senderId: string;
19
19
  @Input() baseLocation: string;
20
+ @Input() isConversationArchived: boolean;
21
+ @Input() isTypings: boolean;
22
+ @Input() idUserTypingNow: string;
23
+ @Input() nameUserTypingNow: string;
24
+ @Input() typingLocation: string;
25
+ @Input() fullscreenMode: boolean;
20
26
  @Input() translationMap: Map<string, string>;
21
27
  @Input() stylesMap: Map<string, string>;
22
28
  @Output() onBeforeMessageRender = new EventEmitter();
23
29
  @Output() onAfterMessageRender = new EventEmitter();
24
- @Output() onMenuOptionShow = new EventEmitter();
30
+ @Output() onMenuOptionShow = new EventEmitter<boolean>();
31
+ @Output() onEmojiiPickerShow = new EventEmitter<boolean>()
25
32
  @Output() onAttachmentButtonClicked = new EventEmitter();
26
33
  @Output() onScrollContent = new EventEmitter();
27
34