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

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 (151) hide show
  1. package/CHANGELOG.md +88 -4
  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 +20 -2
  8. package/src/app/app.component.ts +128 -18
  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 +171 -88
  13. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +40 -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 +3 -2
  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 +63 -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 +7 -7
  42. package/src/app/components/canned-response/canned-response.component.scss +10 -4
  43. package/src/app/components/canned-response/canned-response.component.ts +1 -1
  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 +24 -84
  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 +43 -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.scss +1 -1
  77. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +2 -7
  78. package/src/app/components/utils/user-presence/user-presence.component.html +7 -2
  79. package/src/app/components/utils/user-presence/user-presence.component.scss +35 -18
  80. package/src/app/components/utils/user-presence/user-presence.component.ts +6 -10
  81. package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
  82. package/src/app/pages/contacts-directory/contacts-directory.page.scss +47 -0
  83. package/src/app/pages/contacts-directory/contacts-directory.page.ts +2 -0
  84. package/src/app/pages/conversation-detail/conversation-detail.module.ts +0 -8
  85. package/src/app/pages/conversation-detail/conversation-detail.page.html +41 -23
  86. package/src/app/pages/conversation-detail/conversation-detail.page.scss +40 -250
  87. package/src/app/pages/conversation-detail/conversation-detail.page.ts +182 -110
  88. package/src/app/pages/conversations-list/conversations-list.page.html +11 -8
  89. package/src/app/pages/conversations-list/conversations-list.page.scss +18 -2
  90. package/src/app/pages/conversations-list/conversations-list.page.ts +25 -22
  91. package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
  92. package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
  93. package/src/app/pages/loader-preview/loader-preview.page.scss +4 -0
  94. package/src/app/pages/loader-preview/loader-preview.page.ts +1 -2
  95. package/src/app/pages/profile-info/profile-info.page.html +2 -4
  96. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
  97. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +42 -0
  98. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +1 -0
  99. package/src/app/services/canned-responses/canned-responses.service.ts +26 -0
  100. package/src/app/services/projects/projects.service.spec.ts +12 -0
  101. package/src/app/services/projects/projects.service.ts +43 -0
  102. package/src/app/services/tiledesk/tiledesk.service.ts +4 -26
  103. package/src/app/shared/shared.module.ts +24 -33
  104. package/src/assets/i18n/ar.json +278 -265
  105. package/src/assets/i18n/az.json +14 -1
  106. package/src/assets/i18n/de.json +15 -2
  107. package/src/assets/i18n/en.json +15 -2
  108. package/src/assets/i18n/es.json +15 -2
  109. package/src/assets/i18n/fr.json +14 -1
  110. package/src/assets/i18n/it.json +14 -1
  111. package/src/assets/i18n/kk.json +15 -2
  112. package/src/assets/i18n/pt.json +15 -2
  113. package/src/assets/i18n/ru.json +14 -1
  114. package/src/assets/i18n/sr.json +277 -264
  115. package/src/assets/i18n/sv.json +15 -2
  116. package/src/assets/i18n/tr.json +15 -2
  117. package/src/assets/i18n/uk.json +15 -2
  118. package/src/assets/i18n/uz.json +14 -1
  119. package/src/assets/js/chat21client.js +176 -149
  120. package/src/assets/sounds/interface-start.mp3 +0 -0
  121. package/src/assets/sounds/wheep-wheep.mp3 +0 -0
  122. package/src/chat-config-native-mqtt.json +3 -0
  123. package/src/chat21-core/models/conversation.ts +0 -1
  124. package/src/chat21-core/models/projects.ts +27 -0
  125. package/src/chat21-core/providers/firebase/firebase-typing.service.ts +7 -9
  126. package/src/chat21-core/utils/constants.ts +6 -1
  127. package/src/chat21-core/utils/convertRequestToConversation.ts +41 -0
  128. package/src/chat21-core/utils/user-typing/user-typing.component.html +8 -5
  129. package/src/chat21-core/utils/user-typing/user-typing.component.scss +87 -17
  130. package/src/chat21-core/utils/user-typing/user-typing.component.ts +12 -94
  131. package/src/chat21-core/utils/utils.ts +38 -10
  132. package/src/global.scss +52 -255
  133. package/src/index.html +0 -9
  134. package/src/variables.scss +30 -10
  135. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +0 -3
  136. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +0 -21
  137. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +0 -24
  138. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +0 -14
  139. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +0 -54
  140. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +0 -98
  141. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +0 -84
  142. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +0 -30
  143. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +0 -83
  144. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +0 -24
  145. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +0 -68
  146. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +0 -3
  147. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +0 -10
  148. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +0 -24
  149. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +0 -14
  150. package/src/app/components/conversation-detail/option-header/option-header.component.html +0 -13
  151. package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
package/CHANGELOG.md CHANGED
@@ -1,18 +1,102 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
- ## 3.0.81 in PROD
3
+ ### 3.0.82-rc.2
4
+ - changed: 'force' parameter to /close post as body content
5
+ - changed: enabled MTT
6
+ - changed: position of 'LogOut' button in sidebar-user-detail component
7
+ ### 3.0.82-rc.1
8
+ - changed: forceArchive to force while calling /close API URL
9
+ - changed: chat21Client.js from 1.12.1 to 1.12.2
10
+ - changed: list conversations component with from 360px to 320px
11
+
12
+ ### 3.0.81 in PROD
13
+
14
+ ### 3.0.81-rc.3
15
+ - bug-fixed: if window width is less then 991px, move 'Close detail' icon to right
16
+ - changed: removed segment from index.html and loaded dynamically only if in not production
17
+
18
+ ### 3.0.81-rc.2
19
+ - changed: canned loader
4
20
  - bug-fixed: if search for a string that not correspond with an existing canned, was shown loader ever
5
21
 
6
- ## 3.0.80 in PROD
22
+ ### 3.0.81-rc.1
23
+ - added: remove bubble-message background if is image or iframe and no text is in message
24
+ - added: new sound if unassigned request arrive
25
+ - added: animation on hover an image
26
+ - added: parameter to /close to forse the closing of a conversation
27
+ - added: v.0.1.12.1 chatclient.js
28
+ - changed: info-message UI, image UI, frame UI
29
+ - 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
30
+
31
+ ### 3.0.80 in PROD
7
32
  - bug-fixed: if search a canned response, after clicked it does not replaced into text-area
8
33
 
9
- ## 3.0.79 in PROD
34
+ ### 3.0.80-rc.1
35
+ - changed: moved sender_fullname inside bubble-message component
36
+ - changed: publish onConversationSelect event to stop audio after agent has clicked on it
37
+ - bug-fixed: /null loading flag_url in sidebar-user-detail
38
+
39
+ ### 3.0.79 in PROD
10
40
  - added: segment analytics events
11
41
 
12
- ## 3.0.78 in PROD
42
+ ### 3.0.79-rc.4
43
+ - bug-fixed: testsiteBaseUrl wrong value env property
44
+
45
+ ### 3.0.79-rc.3
46
+ - added: segment analytics for SignIn-SignOut-Resolved-MsgAdded-ConvAdded
47
+ - added: navbar component if not mobile
48
+ - added: NAVBAR translations
49
+ - changed: minor improvements on UI
50
+ - changed: ion-split-pane UI if mobile
51
+ - changed: moved hover 'add canned' button from bubble-message to ion-conversation-detail component
52
+ - changed: moved addNewCanned to tiledesk service to canned-responses service
53
+ - bug-fixed: open/close detail icon not aligned correctly on click 'close'
54
+
55
+ ### 3.0.79-rc.2
56
+ - added: new sound if new conversation is triggered in agent's chat
57
+ - changed: header UI of header-conversation-detail and unassigned-conversations components
58
+
59
+ ### 3.0.79-rc.1
60
+ - added: LABEL_ONLINE, LABEL_OFFLINE translations
61
+ - changed: renamed ddp-header with conversations-list-header
62
+ - changed: unified control to mobile/desktop app
63
+ - changed: LABEL_AVAILABLE/NOT_AVAILABLE with LABEL_ONLINE/OFFLINE in user-presence component
64
+ - changed: icon to user-presence
65
+ - changed: UI for conversation-list, conversation-detail and info-group for desktop and mobile
66
+ - changed: renamed option-header component with header-conversations-list-archived
67
+ - changed: contacts-directory UI
68
+ - bug-fixed: if app is opened and user press width expand, move correctly the right position
69
+
70
+ ## 3.0.78 in PROD
71
+ - bug-fixed: unassigned request not sound the if is the first at all
72
+ - bug-fixed: canned responses opens in incorrect mode
73
+
74
+ ### 3.0.78-rc.4
13
75
  - bug-fixed: unassigned request not sound the if is the first at all
76
+ - bug-fixed: translations missed
77
+ - bug-fixed: direct info not showed in conversation-header component
78
+ - removed: conversation-footer border top
79
+ - changed: colors to message-text-area icons and message-attachment components
80
+
81
+ ### 3.0.78-rc.3
82
+ - changed: user-typing location moved from conversation-header to conversation-detail component
83
+ - changed: replace includes with startsWith for check what type of conversation is in project info conversation-list component
84
+ - added: styleMap integrations to some elements
85
+ - bug-fixed: no tooltip showed if no unserved request are present
86
+
87
+ ### 3.0.78-rc.2
88
+ - changed: project item UI and tooltip msg
89
+ - changed: conversation UI in conversations list component
90
+ - changed: conversation detail header component
91
+ - added: open/close info-conversation moved from conversation-header to conversation detail component
14
92
  - bug-fixed: canned responses opens in incorrect mode
15
93
 
94
+ ### 3.0.78-rc.1
95
+ - changed: conversation-list page width increased
96
+ - changed: background changed in info-message component
97
+ - changed: project-item UI
98
+ - changed: conversation-list page UI
99
+
16
100
  ## 3.0.77 in PROD
17
101
 
18
102
  ### 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.81",
4
+ "version": "3.0.82-rc.2",
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,21 @@
1
+ @import '../variables.scss';
2
+
1
3
  .split-pane-md.split-pane-visible > .split-pane-side {
2
- min-width: 312px;
4
+ min-width: 320px; //360px; //312px;
3
5
  display: block; // Safari bug fix
4
- margin-left: 60px;
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;
5
19
  }
6
20
 
7
21
  .sidebar-visible {
@@ -20,6 +34,10 @@
20
34
  left: 60px
21
35
  }
22
36
 
37
+ // ion-nav {
38
+ // background-color: var(--list-bkg-color);
39
+ // }
40
+
23
41
  // @media (min-width: 768px) {
24
42
  // .split-pane-md.split-pane-visible > .split-pane-side {
25
43
  // 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
 
@@ -38,7 +39,7 @@ import { LoginPage } from './pages/authentication/login/login.page';
38
39
  import { ConversationListPage } from './pages/conversations-list/conversations-list.page';
39
40
 
40
41
  // utils
41
- import { checkPlatformIsMobile, isGroup, getParameterByName, searchIndexInArrayForUid, compareValues } from '../chat21-core/utils/utils';
42
+ import { checkPlatformIsMobile, isGroup, getParameterByName, searchIndexInArrayForUid, compareValues, stripTags } from '../chat21-core/utils/utils';
42
43
  import { STORAGE_PREFIX, PLATFORM_MOBILE, PLATFORM_DESKTOP, CHAT_ENGINE_FIREBASE, AUTH_STATE_OFFLINE, AUTH_STATE_ONLINE } from '../chat21-core/utils/constants';
43
44
  import { environment } from '../environments/environment';
44
45
  import { UserModel } from '../chat21-core/models/user';
@@ -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();
@@ -335,6 +340,7 @@ export class AppComponent implements OnInit {
335
340
 
336
341
 
337
342
  this.initializeApp('oninit');
343
+ this.initSegment()
338
344
  this.listenToPostMsgs();
339
345
  }
340
346
 
@@ -831,6 +837,14 @@ export class AppComponent implements OnInit {
831
837
  this.audio.src = chatBaseUrl + URL_SOUND_LIST_CONVERSATION;
832
838
  this.audio.load();
833
839
 
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
+
834
848
  const sound_status = localStorage.getItem('dshbrd----sound')
835
849
  if(sound_status && sound_status !== 'undefined'){
836
850
  this.isSoundEnabled = sound_status === 'enabled'? true: false
@@ -840,7 +854,14 @@ export class AppComponent implements OnInit {
840
854
 
841
855
  }
842
856
 
843
- private manageTabNotification(badgeNotificationCount?: number) {
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) {
844
865
  if (!this.isTabVisible) {
845
866
  // TAB IS HIDDEN --> manage title and SOUND
846
867
  let badgeNewConverstionNumber = badgeNotificationCount? badgeNotificationCount : this.conversationsHandlerService.countIsNew()
@@ -864,7 +885,26 @@ export class AppComponent implements OnInit {
864
885
  this.isSoundEnabled = sound_status === 'enabled'? true: false
865
886
  }
866
887
  this.logger.debug('[APP-COMP] manageTabNotification can saund?', this.isInitialized, this.isSoundEnabled)
867
- if(this.isInitialized && this.isSoundEnabled) this.soundMessage()
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
+ }
868
908
  }
869
909
 
870
910
  soundMessage() {
@@ -880,7 +920,7 @@ export class AppComponent implements OnInit {
880
920
  // }, 4000);
881
921
 
882
922
  //play sound every 4s from the fist time you receive a conversation added/changed
883
- if(!this.hasPlayed){
923
+ if(!this.hasPlayed && !this.hasPlayedConversation){
884
924
  that.audio.play().then(() => {
885
925
  that.hasPlayed = true
886
926
  that.logger.debug('[APP-COMP] ****** soundMessage played *****');
@@ -892,6 +932,36 @@ export class AppComponent implements OnInit {
892
932
  });
893
933
  }
894
934
  }
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
+ }
895
965
  /**---------------- SOUND FUNCTIONS --> END <--- +*/
896
966
  /***************************************************+*/
897
967
 
@@ -939,11 +1009,11 @@ export class AppComponent implements OnInit {
939
1009
  this.events.subscribe('uidConvSelected:changed', this.subscribeChangedConversationSelected);
940
1010
  this.events.subscribe('profileInfoButtonClick:logout', this.subscribeProfileInfoButtonLogOut);
941
1011
  this.events.subscribe('unservedRequest:count', this.subscribeUnservedRequestCount)
942
-
1012
+ this.events.subscribe('convList:onConversationSelected', this.subscribeConversationSelected)
943
1013
  this.conversationsHandlerService.conversationAdded.subscribe((conversation: ConversationModel) => {
944
1014
  // this.logger.log('[APP-COMP] ***** subscribeConversationAdded *****', conversation);
945
1015
  if (conversation && conversation.is_new === true) {
946
- this.manageTabNotification()
1016
+ this.manageTabNotification('conv_added')
947
1017
  }
948
1018
  if(conversation) this.updateConversationsOnStorage()
949
1019
  });
@@ -961,7 +1031,7 @@ export class AppComponent implements OnInit {
961
1031
  this.logger.log('[APP-COMP] ***** subscribeConversationChangedDetailed currentUser: ', currentUser);
962
1032
  if (changes.value && changes.value.sender !== currentUser.uid) {
963
1033
  if(changes.value.is_new === changes.previousValue.is_new){
964
- this.manageTabNotification();
1034
+ this.manageTabNotification('new_message');
965
1035
  }
966
1036
  }
967
1037
  }
@@ -973,7 +1043,6 @@ export class AppComponent implements OnInit {
973
1043
  this.updateConversationsOnStorage();
974
1044
  isDevMode()? null: this.segmentResolved(conversation)
975
1045
  }
976
-
977
1046
  });
978
1047
  }
979
1048
 
@@ -1019,7 +1088,6 @@ export class AppComponent implements OnInit {
1019
1088
  this.initConversationsHandler(currentUser.uid);
1020
1089
  this.initArchivedConversationsHandler(currentUser.uid);
1021
1090
  isDevMode()? null: this.segmentSignIn()
1022
-
1023
1091
  }
1024
1092
  this.checkPlatform();
1025
1093
  try {
@@ -1060,7 +1128,7 @@ export class AppComponent implements OnInit {
1060
1128
 
1061
1129
  // this.unsubscribe$.next();
1062
1130
  // this.unsubscribe$.complete();
1063
-
1131
+
1064
1132
  }
1065
1133
 
1066
1134
  goToDashboardLogin(){
@@ -1121,7 +1189,7 @@ export class AppComponent implements OnInit {
1121
1189
  }
1122
1190
 
1123
1191
  subscribeProfileInfoButtonLogOut = (hasClickedLogout) => {
1124
- this.logger.log('[APP-COMP] FIREBASE-NOTIFICATION >>>> subscribeProfileInfoButtonLogOut');
1192
+ this.logger.log('[APP-COMP] FIREBASE-NOTIFICATION >>>> subscribeProfileInfoButtonLogOut ');
1125
1193
  // if (hasClickedLogout === true) {
1126
1194
  // this.removePresenceAndLogout()
1127
1195
  // }
@@ -1142,6 +1210,7 @@ export class AppComponent implements OnInit {
1142
1210
 
1143
1211
  if (res === 'success') {
1144
1212
  that.removePresenceAndLogout();
1213
+
1145
1214
  } else {
1146
1215
  that.removePresenceAndLogout();
1147
1216
  // that.presentToast();
@@ -1155,13 +1224,19 @@ export class AppComponent implements OnInit {
1155
1224
 
1156
1225
  subscribeUnservedRequestCount = (unservedRequestCount) => {
1157
1226
  if(unservedRequestCount && unservedRequestCount > 0){
1158
- this.logger.debug("hasToSoundUnservedRequestCount::::", this.isInitialized)
1227
+ this.logger.debug("subscribeUnservedRequestCount appIsInitialized::::",this.isInitialized)
1159
1228
  if(this.isInitialized){
1160
- this.manageTabNotification(unservedRequestCount) //sound and alternate title
1229
+ this.manageTabNotification('conv_unassigned', unservedRequestCount) //sound and alternate title
1161
1230
  }
1162
1231
  }
1163
1232
  }
1164
1233
 
1234
+ subscribeConversationSelected= (conversation: ConversationModel) => {
1235
+ if(conversation && conversation.is_new){
1236
+ this.audio_NewConv.pause()
1237
+ }
1238
+ }
1239
+
1165
1240
  private async presentModal(calledby): Promise<any> {
1166
1241
  this.logger.log('[APP-COMP] presentModal calledby', calledby, '- hadBeenCalledOpenModal: ', this.hadBeenCalledOpenModal);
1167
1242
  const attributes = { tenant: this.tenant, enableBackdropDismiss: false };
@@ -1269,8 +1344,21 @@ export class AppComponent implements OnInit {
1269
1344
  }
1270
1345
  }
1271
1346
 
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
+
1272
1360
  private segmentSignIn(){
1273
- let user = this.tiledeskAuthService.getCurrentUser();
1361
+ let user = this.tiledeskAuthService.getCurrentUser()
1274
1362
  try {
1275
1363
  window['analytics'].page("Chat Auth Page, Signin", {});
1276
1364
  } catch (err) {
@@ -1300,7 +1388,7 @@ export class AppComponent implements OnInit {
1300
1388
 
1301
1389
 
1302
1390
  private segmentSignedOut(){
1303
- let user = this.tiledeskAuthService.getCurrentUser();
1391
+ let user = this.tiledeskAuthService.getCurrentUser()
1304
1392
  try {
1305
1393
  window['analytics'].page("Chat Auth Page, Signed Out", {});
1306
1394
  } catch (err) {
@@ -1385,6 +1473,7 @@ export class AppComponent implements OnInit {
1385
1473
  }
1386
1474
  }
1387
1475
 
1476
+
1388
1477
  @HostListener('document:visibilitychange', [])
1389
1478
  visibilitychange() {
1390
1479
  // this.logger.debug("document TITLE", document.hidden, document.title);
@@ -1448,5 +1537,26 @@ export class AppComponent implements OnInit {
1448
1537
  this.isSoundEnabled = event.newValue === 'enabled'? true: false
1449
1538
  }
1450
1539
  }
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
+ // }
1451
1561
  }
1452
1562
 
@@ -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