@chat21/chat21-ionic 3.0.60 → 3.0.61-rc14

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 (162) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/README.md +2 -0
  3. package/angular.json +4 -0
  4. package/config.xml +5 -5
  5. package/deploy_pre.sh +10 -10
  6. package/deploy_prod.sh +5 -1
  7. package/env.sample +3 -1
  8. package/package.json +13 -7
  9. package/resources/{Android → android}/icon/drawable-hdpi-icon.png +0 -0
  10. package/resources/{Android → android}/icon/drawable-ldpi-icon.png +0 -0
  11. package/resources/{Android → android}/icon/drawable-mdpi-icon.png +0 -0
  12. package/resources/{Android → android}/icon/drawable-xhdpi-icon.png +0 -0
  13. package/resources/{Android → android}/icon/drawable-xxhdpi-icon.png +0 -0
  14. package/resources/{Android → android}/icon/drawable-xxxhdpi-icon.png +0 -0
  15. package/resources/{Android → android}/icon.png +0 -0
  16. package/resources/{Android → android}/splash/drawable-land-hdpi-screen.png +0 -0
  17. package/resources/{Android → android}/splash/drawable-land-ldpi-screen.png +0 -0
  18. package/resources/{Android → android}/splash/drawable-land-mdpi-screen.png +0 -0
  19. package/resources/{Android → android}/splash/drawable-land-xhdpi-screen.png +0 -0
  20. package/resources/{Android → android}/splash/drawable-land-xxhdpi-screen.png +0 -0
  21. package/resources/{Android → android}/splash/drawable-land-xxxhdpi-screen.png +0 -0
  22. package/resources/{Android → android}/splash/drawable-port-hdpi-screen.png +0 -0
  23. package/resources/{Android → android}/splash/drawable-port-ldpi-screen.png +0 -0
  24. package/resources/{Android → android}/splash/drawable-port-mdpi-screen.png +0 -0
  25. package/resources/{Android → android}/splash/drawable-port-xhdpi-screen.png +0 -0
  26. package/resources/{Android → android}/splash/drawable-port-xxhdpi-screen.png +0 -0
  27. package/resources/{Android → android}/splash/drawable-port-xxxhdpi-screen.png +0 -0
  28. package/resources/{Android → android}/splash.png +0 -0
  29. package/src/app/app-routing.module.ts +15 -0
  30. package/src/app/app.component.html +14 -4
  31. package/src/app/app.component.scss +18 -1
  32. package/src/app/app.component.ts +50 -16
  33. package/src/app/app.module.ts +12 -3
  34. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +23 -5
  35. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +142 -49
  36. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +101 -18
  37. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +20 -36
  38. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +10 -0
  39. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +35 -40
  40. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +7 -2
  41. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +103 -12
  42. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +39 -36
  43. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +7 -1
  44. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +148 -63
  45. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +59 -22
  46. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +32 -9
  47. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +102 -23
  48. package/src/app/components/ddp-header/ddp-header.component.html +20 -6
  49. package/src/app/components/ddp-header/ddp-header.component.scss +4 -0
  50. package/src/app/components/ddp-header/ddp-header.component.ts +104 -10
  51. package/src/app/components/project-item/project-item.component.html +8 -7
  52. package/src/app/components/project-item/project-item.component.scss +7 -2
  53. package/src/app/components/project-item/project-item.component.ts +15 -2
  54. package/src/app/components/sidebar/sidebar.component.html +275 -0
  55. package/src/app/components/sidebar/sidebar.component.scss +79 -0
  56. package/src/app/components/sidebar/sidebar.component.spec.ts +24 -0
  57. package/src/app/components/sidebar/sidebar.component.ts +539 -0
  58. package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +117 -0
  59. package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +330 -0
  60. package/src/app/components/sidebar-user-details/sidebar-user-details.component.spec.ts +24 -0
  61. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +490 -0
  62. package/src/app/pages/conversation-detail/conversation-detail.module.ts +6 -1
  63. package/src/app/pages/conversation-detail/conversation-detail.page.html +20 -10
  64. package/src/app/pages/conversation-detail/conversation-detail.page.scss +28 -0
  65. package/src/app/pages/conversation-detail/conversation-detail.page.ts +1132 -784
  66. package/src/app/pages/conversations-list/conversations-list.module.ts +2 -1
  67. package/src/app/pages/conversations-list/conversations-list.page.html +18 -9
  68. package/src/app/pages/conversations-list/conversations-list.page.scss +9 -1
  69. package/src/app/pages/conversations-list/conversations-list.page.ts +738 -425
  70. package/src/app/pages/create-canned-response/create-canned-response-routing.module.ts +17 -0
  71. package/src/app/pages/create-canned-response/create-canned-response.module.ts +30 -0
  72. package/src/app/pages/create-canned-response/create-canned-response.page.html +150 -0
  73. package/src/app/pages/create-canned-response/create-canned-response.page.scss +55 -0
  74. package/src/app/pages/create-canned-response/create-canned-response.page.spec.ts +24 -0
  75. package/src/app/pages/create-canned-response/create-canned-response.page.ts +319 -0
  76. package/src/app/pages/create-requester/create-requester-routing.module.ts +17 -0
  77. package/src/app/pages/create-requester/create-requester.module.ts +28 -0
  78. package/src/app/pages/create-requester/create-requester.page.html +67 -0
  79. package/src/app/pages/create-requester/create-requester.page.scss +30 -0
  80. package/src/app/pages/create-requester/create-requester.page.spec.ts +24 -0
  81. package/src/app/pages/create-requester/create-requester.page.ts +138 -0
  82. package/src/app/pages/create-ticket/create-ticket-routing.module.ts +17 -0
  83. package/src/app/pages/create-ticket/create-ticket.module.ts +28 -0
  84. package/src/app/pages/create-ticket/create-ticket.page.html +171 -0
  85. package/src/app/pages/create-ticket/create-ticket.page.scss +52 -0
  86. package/src/app/pages/create-ticket/create-ticket.page.spec.ts +24 -0
  87. package/src/app/pages/create-ticket/create-ticket.page.ts +432 -0
  88. package/src/app/pages/loader-preview/loader-preview.page.ts +226 -166
  89. package/src/app/pages/profile-info/profile-info.page.html +4 -4
  90. package/src/app/pages/profile-info/profile-info.page.scss +13 -2
  91. package/src/app/pages/profile-info/profile-info.page.ts +23 -21
  92. package/src/app/services/tiledesk/tiledesk.service.ts +209 -0
  93. package/src/app/shared/shared.module.ts +14 -1
  94. package/src/app/utils/scrollbar-theme.directive.ts +58 -24
  95. package/src/assets/i18n/de.json +69 -13
  96. package/src/assets/i18n/en.json +62 -6
  97. package/src/assets/i18n/es.json +61 -5
  98. package/src/assets/i18n/fr.json +64 -8
  99. package/src/assets/i18n/it.json +61 -5
  100. package/src/assets/i18n/pt.json +61 -5
  101. package/src/assets/i18n/ru.json +62 -6
  102. package/src/assets/i18n/sr.json +265 -0
  103. package/src/assets/i18n/tr.json +61 -5
  104. package/src/assets/images/default-avatar-x-select.png +0 -0
  105. package/src/assets/images/language_flag/ar.png +0 -0
  106. package/src/assets/images/language_flag/bg.png +0 -0
  107. package/src/assets/images/language_flag/ca.png +0 -0
  108. package/src/assets/images/language_flag/cs.png +0 -0
  109. package/src/assets/images/language_flag/da.png +0 -0
  110. package/src/assets/images/language_flag/de.png +0 -0
  111. package/src/assets/images/language_flag/el.png +0 -0
  112. package/src/assets/images/language_flag/en.png +0 -0
  113. package/src/assets/images/language_flag/es.png +0 -0
  114. package/src/assets/images/language_flag/fa.png +0 -0
  115. package/src/assets/images/language_flag/fi.png +0 -0
  116. package/src/assets/images/language_flag/fr.png +0 -0
  117. package/src/assets/images/language_flag/he.png +0 -0
  118. package/src/assets/images/language_flag/hi.png +0 -0
  119. package/src/assets/images/language_flag/hr.png +0 -0
  120. package/src/assets/images/language_flag/hu.png +0 -0
  121. package/src/assets/images/language_flag/id.png +0 -0
  122. package/src/assets/images/language_flag/it.png +0 -0
  123. package/src/assets/images/language_flag/ja.png +0 -0
  124. package/src/assets/images/language_flag/ko.png +0 -0
  125. package/src/assets/images/language_flag/ml-IN.png +0 -0
  126. package/src/assets/images/language_flag/ne-NP.png +0 -0
  127. package/src/assets/images/language_flag/nl.png +0 -0
  128. package/src/assets/images/language_flag/no.png +0 -0
  129. package/src/assets/images/language_flag/pl.png +0 -0
  130. package/src/assets/images/language_flag/pt-BR.png +0 -0
  131. package/src/assets/images/language_flag/pt.png +0 -0
  132. package/src/assets/images/language_flag/ro.png +0 -0
  133. package/src/assets/images/language_flag/ru.png +0 -0
  134. package/src/assets/images/language_flag/sk.png +0 -0
  135. package/src/assets/images/language_flag/sl.png +0 -0
  136. package/src/assets/images/language_flag/sr.png +0 -0
  137. package/src/assets/images/language_flag/sv-SE.png +0 -0
  138. package/src/assets/images/language_flag/ta.png +0 -0
  139. package/src/assets/images/language_flag/th.png +0 -0
  140. package/src/assets/images/language_flag/tr.png +0 -0
  141. package/src/assets/images/language_flag/uk.png +0 -0
  142. package/src/assets/images/language_flag/vi.png +0 -0
  143. package/src/assets/images/language_flag/zh-CN.png +0 -0
  144. package/src/assets/images/language_flag/zh-TW.png +0 -0
  145. package/src/assets/images/no_image_user.png +0 -0
  146. package/src/assets/images/priority_icons/high.svg +3 -0
  147. package/src/assets/images/priority_icons/high_v2.svg +14 -0
  148. package/src/assets/images/priority_icons/low.svg +10 -0
  149. package/src/assets/images/priority_icons/low_v2.svg +14 -0
  150. package/src/assets/images/priority_icons/medium.svg +16 -0
  151. package/src/assets/images/priority_icons/medium_v2.svg +11 -0
  152. package/src/assets/images/priority_icons/urgent.svg +4 -0
  153. package/src/assets/images/priority_icons/urgent_v2.svg +16 -0
  154. package/src/assets/tiledesk-solo-logo.png +0 -0
  155. package/src/chat-config-pre-test.json +3 -1
  156. package/src/chat-config-template.json +3 -1
  157. package/src/chat-config.json +4 -2
  158. package/src/chat21-core/utils/constants.ts +6 -1
  159. package/src/global.scss +405 -3
  160. package/src/index.html +7 -0
  161. package/publish_pre.sh +0 -33
  162. package/publish_prod.sh +0 -33
package/CHANGELOG.md CHANGED
@@ -1,5 +1,98 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+ ### 3.0.61-rc14
4
+ - Fixes the bug: the page to which the sidebar Settings menu item redirects is not correct for team members with agent role
5
+ - Fixes the bug: right clicking on the sidebar menu items doesn't show the context menu
6
+
7
+ ### 3.0.61-rc12
8
+ - Improves the alignment of left sidebar menu item icons
9
+ - Adds the ability to add a message as a canned response
10
+ - Hides the "Open canned responses" button if the "supportMode" environment variable is set to false
11
+ - Fixes the bug: "Settings" menu item in the left sidebar redirects to the "Canned responses" page instead of the "Widget" page
12
+ - Adds the ability to add a new canned response
13
+ - Fixes the bug: "Resolve conversation" from conversation detail header doesn't work on mobile
14
+ - Adds the ability to insert emoji in the message text
15
+ - Fixes the bug: on iOS mobile devices in the conversation detail the requester's avatar is not vertically aligned
16
+ - Fixes the bug: on mobile devices in the "info profile" modal window the version number is not visible because it is on a white background
17
+ - Fixes the bug: in the "Create canned response" modal window the "Add personalisation" menu does not always work
18
+ - Adds the chat version number to the teammate details drawer
19
+ - Makes the right sidebar "Settings" menu item visible to teammates with agent role
20
+
21
+ ### 3.0.61-rc11
22
+ - Fixed the bug: the "Resolve" button is displayed in the header of the details of the archived conversations
23
+ - Fixed the bug: in the header of the conversation detail the "Resolve" button remains active even after resolving the conversation
24
+ - Adds the ability to create a ticket
25
+ - Adds tooltips to the buttons available in the header of the conversation list
26
+ - Change the text of the "Conversations" menu item in the left sidebar to "Monitor"
27
+
28
+ ### 3.0.61-rc10
29
+ - Fixes the bug: the Analytics icon of the left sidebar is not displayed
30
+
31
+ ### 3.0.61-rc9
32
+ - Fixes the bug: the Apps icon of the left sidebar is not displayed
33
+
34
+ ### 3.0.61-rc8
35
+ - Changes the icon of the "Conversations" menu item to the left sidebar
36
+ - Adds Serbian language
37
+
38
+ ### 3.0.61-rc7
39
+ - Fixes the bug: while loading the app, the conversation list changes size and becomes wider
40
+ - Changes the style of the left sidebar
41
+ - Display in the "user data drawer" an avatar constructed with the initials of the logged in teammate if his profile picture is not available
42
+
43
+ ### 3.0.61-rc6
44
+ - Enhances the style of the sidebar tooltips
45
+ - Fixed bug: for direct conversations opening the "info sidebar" by clicking on the teammate avatar available in the conversation detail header does not work correctly
46
+ - Fixes the bug: not all chat strings are translated into the browser language or into the selected language
47
+ - Fixes the bug: Email is broken on dashes in user details sidebar
48
+ - Displays an alert when a teammate archives a conversation from a project they are no longer a part of
49
+ - Disable the "send message" textarea when a teammate replies to a support conversation of a project he is no longer a part of
50
+ - Adds, when an image is pasted in the "send message" text area, the text of the text area as a caption of the image preview modal window
51
+ - Adds, when an image is uploaded, the text of the "send message" text area as a caption of the image preview modal window
52
+
53
+ ### 3.0.61-rc5
54
+ - Fixes the bug: on mobile devices the chat content is shifted to the right
55
+ - Adds the ability to open and close the "user detail sidebar" by clicking on the avatar of the logged teammate present on the sidebar
56
+ - Fixes the bug: canned responses remain visible even if, after making a filter, the backslash is deleted
57
+ - Prevents the "open canned responses" button from inserting a backslash if another one exists before
58
+ - Hides the badge that displays the number of unassigned conversations if there are none
59
+ - Improves custom scrollbar displayed in the sidebar and in user detail sidebar
60
+ - Adds custom scrollbars to the conversation list and to the conversation detail
61
+
62
+ ### 3.0.61-rc4
63
+ - Hides the item showing unassigned conversations in the list of archived conversations
64
+ - Adds in the list of conversations to the "archive" button the tooltip "Resolve" if the conversation is of type "support" and the tooltip "Archive" if the conversation is of type "direct" or "group"
65
+ - Changes all occurrences of the "teammatesButton" environment variable to "writeToButton"
66
+ - Fixes the bug: if the sidebar is visible and the window width is less than 768px, the content of the conversation detail is not completely visible
67
+ - Moves for conversations of type "support" the "Resolve conversation" button from the dropdown menu to the header of the conversation detail
68
+
69
+ ### 3.0.61-rc3
70
+ - Replaces console.log with custom loggers
71
+ - Fixes the bug: the info support sidebar is no more displayed
72
+
73
+ ### 3.0.61-rc2
74
+ - Fixes the bug: Profile picture in the sidebar does not update when logged in with another user after logging out
75
+ - Bug Fix: in the "info-profile" page avoid the "uid of undefined" error
76
+ - Adds the "user details" sidebar
77
+ - Adds the languages flags images
78
+ - Allows to close the "user details" sidebar by clicking outside it
79
+ - Adds the tooltips to the links of the sidebar
80
+ - Hides the sidebar when the teammate logs out, if the app is on a mobile device and if the environment variable "supportMode" is set to false
81
+ - Hides in the item showing unassigned conversations the button to pin a project if the app is not on a mobile device
82
+ - Gets in the sidebar the feature tokens from the environment variables
83
+ - Install the "Roboto" font
84
+ - Changes font priority in global.scss: replace "Helvetica Neue" font with "Roboto" font
85
+ - Imports the "Poppins" font family into index.html
86
+ - Adds the "Resolve" tooltip to the "archive" button available in the conversation list
87
+ - Displays the "Resolved Conversations" button and the "Teammates" button in the header of the conversation list based on how the "teammatesButton" and "archivedButton" environment variables are set
88
+ - Adds "teammatesButton" and "archivedButton" variables to the environments
89
+ - Adds the "TEAMMATES_BUTTON" and the "ARCHIVED_BUTTON" variables to the env.sample file
90
+ - Adds the "teammatesButton" and the "archivedButton" variables to the "chat-config-template.json" file and to "the chat-config.json" file
91
+ - Updates the section "Configuration" of the "README.md" file with the new variables "teammatesButton" and the "archivedButton"
92
+
93
+ ### 3.0.61-rc1
94
+ - Adds a sidebar that allows navigation to the dashboard
95
+
3
96
  ### 3.0.60
4
97
  - Deploys in production
5
98
 
package/README.md CHANGED
@@ -61,6 +61,8 @@ In progress git
61
61
  fileUploadAccept:"*/*",
62
62
  logLevel":"<YOUR-PREFERRED-LOG-LEVEL>",
63
63
  supportMode: false,
64
+ teammatesButton: false,
65
+ archivedButton: false,
64
66
  firebaseConfig: {
65
67
  tenant:"tilechat",
66
68
  apiKey: '123ABC..',
package/angular.json CHANGED
@@ -41,6 +41,10 @@
41
41
  "src/chat-config-dev.json"
42
42
  ],
43
43
  "styles": [
44
+ "node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
45
+ "node_modules/roboto-fontface/css/roboto/roboto-fontface.css",
46
+ "node_modules/@ng-select/ng-select/themes/default.theme.css",
47
+ "node_modules/@ctrl/ngx-emoji-mart/picker.css",
44
48
  {
45
49
  "input": "src/theme/variables.scss"
46
50
  },
package/config.xml CHANGED
@@ -100,19 +100,19 @@
100
100
  <splash height="828" src="resources/ios/splash/Default-Landscape-1792h~iphone.png" width="1792" />
101
101
  </platform>
102
102
  <engine name="android" spec="^6.2.3" />
103
- <engine name="browser" spec="5.0.4" />
103
+ <engine name="browser" spec="^5.0.4" />
104
104
  <engine name="ios" spec="6.1.1" />
105
105
  <plugin name="cordova-android-support-gradle-release" spec="^3.0.1">
106
106
  <variable name="ANDROID_SUPPORT_VERSION" value="27.+" />
107
107
  </plugin>
108
108
  <plugin name="cordova-plugin-chooser" spec="^1.3.2" />
109
- <plugin name="cordova-plugin-device" spec="^2.0.2" />
109
+ <plugin name="cordova-plugin-device" spec="^2.0.3" />
110
110
  <plugin name="cordova-plugin-ionic-keyboard" spec="^2.2.0" />
111
111
  <plugin name="cordova-plugin-ionic-webview" spec="^4.2.1">
112
112
  <variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" />
113
113
  </plugin>
114
114
  <plugin name="cordova-plugin-network-information" spec="^2.0.2" />
115
- <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
116
- <plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
117
- <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
115
+ <plugin name="cordova-plugin-splashscreen" spec="^5.0.4" />
116
+ <plugin name="cordova-plugin-statusbar" spec="^2.4.3" />
117
+ <plugin name="cordova-plugin-whitelist" spec="^1.3.5" />
118
118
  </widget>
package/deploy_pre.sh CHANGED
@@ -24,15 +24,15 @@ sed -i -e "s/$URL_VER/g" src/utils/constants.ts
24
24
 
25
25
  # ng build --prod --base-href /$NEW_BUILD/
26
26
  #ionic cordova build browser --prod
27
- #ionic cordova build browser --prod --release
28
- # ionic cordova build --env=pre browser --prod #--verbose
29
27
 
30
28
  ionic cordova platform add browser --save
29
+ #ionic cordova build browser --prod --release
30
+ # ionic cordova build --env=pre browser --prod #--verbose
31
31
  ionic cordova build -c=pre browser --prod
32
32
  cp -p src/firebase-messaging-sw.js platforms/browser/www/
33
33
  cp -p src/manifest.json platforms/browser/www/
34
34
  cp -p src/chat-config.json platforms/browser/www/
35
- cp config.xml platforms/browser/www/
35
+
36
36
 
37
37
  ######### chat-ionic5 - the good one - publish in pre
38
38
  cd platforms/browser/www
@@ -47,18 +47,18 @@ echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-dashboard-pre/chat
47
47
  echo available on https://support-pre.tiledesk.com/chat-ionic5/$version/index.html
48
48
  echo available on https://support-pre.tiledesk.com/chat-ionic5/index.html
49
49
 
50
- ######### chat-ionic5-test - publish in pre with the projects right panel
50
+ ######### chat-ionic5-panel - publish in pre with the projects right panel
51
51
  # cd platforms/browser/www
52
- # aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5-test/$version/
53
- # aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5-test/
52
+ # aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5-panel/$version/
53
+ # aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5-panel/
54
54
  # cd ../../../
55
55
 
56
56
  # aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*"
57
57
 
58
- # echo new version deployed on s3://tiledesk-dashboard-pre/chat-ionic5-test/$version/
59
- # echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-dashboard-pre/chat-ionic5-test/$version/index.html
60
- # echo available on https://support-pre.tiledesk.com/chat-ionic5-test/$version/index.html
61
- # echo available on https://support-pre.tiledesk.com/chat-ionic5-test/index.html
58
+ # echo new version deployed on s3://tiledesk-dashboard-pre/chat-ionic5-panel/$version/
59
+ # echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-dashboard-pre/chat-ionic5-panel/$version/index.html
60
+ # echo available on https://support-pre.tiledesk.com/chat-ionic5-panel/$version/index.html
61
+ # echo available on https://support-pre.tiledesk.com/chat-ionic5-panel/index.html
62
62
 
63
63
 
64
64
  ####### chat ionic MQTT in pre da aggiungere in deploy_pre.sh
package/deploy_prod.sh CHANGED
@@ -25,9 +25,13 @@ cp -p config.xml platforms/browser/www/
25
25
 
26
26
  ###### CHAT in prod
27
27
  cd platforms/browser/www
28
- aws s3 sync . s3://tiledesk-console/v2/chat/
28
+ aws s3 sync . s3://tiledesk-dashboard/v2/chat/
29
29
  aws s3 sync . s3://tiledesk-console/v2/chat/$version/
30
30
  cd ../../../
31
+ # aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*"
32
+
33
+ # echo new version deployed on s3://tiledesk-dashboard/chat/$NEW_BUILD/
34
+ echo new version deployed on s3://tiledesk-console/v2/chat/$version/
31
35
  echo new version deployed on s3://tiledesk-console/v2/chat/
32
36
  echo available on https://console.tiledesk.com/v2/chat/$version/index.html
33
37
  echo available on https://console.tiledesk.com/v2/chat/index.html
package/env.sample CHANGED
@@ -3,7 +3,7 @@ DASHBOARD_URL=https://YOUR_DASHBOARD_URL
3
3
  WS_URL=wss://YOUR_TILEDESK_SERVER_URL?token=
4
4
  WS_URL_RELATIVE=********
5
5
  SERVER_BASE_URL=http://localhost:3000/
6
- FEATURES_TOKEN=CAR:F
6
+ FEATURES_TOKEN=CAR:F-PAY:F-ANA:F-ACT:F-APP:F
7
7
  CHAT21_ENGINE=mqtt
8
8
  UPLOAD_ENGINE=native
9
9
  PUSH_ENGINE=none
@@ -11,6 +11,8 @@ FILE_UPLOAD_ACCEPT=*/*
11
11
  TENANT=tilechat
12
12
  LOG_LEVEL=INFO
13
13
  SUPPORT_MODE=false
14
+ WRITE_TO_BUTTON=false,
15
+ ARCHIVED_BUTTON=false,
14
16
 
15
17
  # For MQTT Chat Engine
16
18
  MQTT_APPID=tilechat
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
- "version": "3.0.60",
3
+ "version": "3.0.61-rc14",
4
4
  "author": "Tiledesk SRL",
5
- "homepage": "https://ionicframework.com/",
5
+ "homepage": "https://tiledesk.com/",
6
6
  "scripts": {
7
7
  "ng": "ng",
8
8
  "start": "ng serve",
@@ -13,13 +13,17 @@
13
13
  },
14
14
  "private": false,
15
15
  "dependencies": {
16
+ "@angular/animations": "^8.2.14",
17
+ "@angular/cdk": "^8.2.3",
16
18
  "@angular/common": "~8.2.14",
17
19
  "@angular/core": "~8.2.14",
18
20
  "@angular/forms": "~8.2.14",
19
21
  "@angular/http": "^7.2.16",
22
+ "@angular/material": "^8.2.3",
20
23
  "@angular/platform-browser": "~8.2.14",
21
24
  "@angular/platform-browser-dynamic": "~8.2.14",
22
25
  "@angular/router": "~8.2.14",
26
+ "@ctrl/ngx-emoji-mart": "^1.0.6",
23
27
  "@ionic-native/chooser": "^5.29.0",
24
28
  "@ionic-native/core": "^5.0.7",
25
29
  "@ionic-native/globalization": "^5.28.0",
@@ -30,22 +34,23 @@
30
34
  "@ionic/angular": "^5.0.7",
31
35
  "@ionic/storage": "^2.2.0",
32
36
  "@mdi/font": "^5.1.45",
37
+ "@ng-select/ng-select": "^3.7.3",
33
38
  "@ngx-translate/core": "^12.1.2",
34
39
  "@ngx-translate/http-loader": "^4.0.0",
35
40
  "angular2-moment": "^1.9.0",
36
41
  "autolinker": "^3.14.2",
37
42
  "cordova-android": "^6.2.3",
38
43
  "cordova-android-support-gradle-release": "^3.0.1",
39
- "cordova-browser": "5.0.4",
44
+ "cordova-browser": "^5.0.4",
40
45
  "cordova-ios": "6.1.1",
41
46
  "cordova-plugin-chooser": "^1.3.2",
42
- "cordova-plugin-device": "^2.0.2",
47
+ "cordova-plugin-device": "^2.0.3",
43
48
  "cordova-plugin-ionic-keyboard": "^2.2.0",
44
49
  "cordova-plugin-ionic-webview": "^4.2.1",
45
50
  "cordova-plugin-network-information": "^2.0.2",
46
- "cordova-plugin-splashscreen": "^5.0.2",
47
- "cordova-plugin-statusbar": "^2.4.2",
48
- "cordova-plugin-whitelist": "^1.3.3",
51
+ "cordova-plugin-splashscreen": "^5.0.4",
52
+ "cordova-plugin-statusbar": "^2.4.3",
53
+ "cordova-plugin-whitelist": "^1.3.5",
49
54
  "cordova-res": "^0.15.1",
50
55
  "core-js": "^2.5.4",
51
56
  "firebase": "^8.6.7",
@@ -59,6 +64,7 @@
59
64
  "ngx-logger": "^4.2.1",
60
65
  "ngx-perfect-scrollbar": "^9.0.0",
61
66
  "perfect-scrollbar": "^1.5.0",
67
+ "roboto-fontface": "^0.10.0",
62
68
  "rxjs": "~6.5.1",
63
69
  "tslib": "^1.9.0",
64
70
  "zone.js": "~0.9.1"
File without changes
File without changes
@@ -48,9 +48,24 @@ const routes: Routes = [
48
48
  {
49
49
  path: 'unassigned-conversations',
50
50
  loadChildren: () => import('./pages/unassigned-conversations/unassigned-conversations.module').then( m => m.UnassignedConversationsPageModule)
51
+ },
52
+ {
53
+ path: 'create-ticket',
54
+ loadChildren: () => import('./pages/create-ticket/create-ticket.module').then( m => m.CreateTicketPageModule)
55
+ },
56
+ {
57
+ path: 'create-requester',
58
+ loadChildren: () => import('./pages/create-requester/create-requester.module').then( m => m.CreateRequesterPageModule)
59
+ },
60
+ {
61
+ path: 'create-canned-response',
62
+ loadChildren: () => import('./pages/create-canned-response/create-canned-response.module').then( m => m.CreateCannedResponsePageModule)
51
63
  }
52
64
 
53
65
 
66
+
67
+
68
+
54
69
  // {
55
70
  // path: 'conversation-detail/:IDConv',
56
71
  // loadChildren: () => import('./pages/conversation-detail/conversation-detail.module').then( m => m.ConversationDetailPageModule)
@@ -1,17 +1,27 @@
1
1
  <ion-app>
2
2
  <div>
3
- <!-- (click)="hideAlert()" -->
3
+
4
4
  <app-image-viewer></app-image-viewer>
5
- <ion-split-pane when="md" contentId="main">
6
5
 
7
- <ion-nav #sidebarNav [root]="sidebarPage"></ion-nav>
6
+ <div class="sidebar" [ngClass]="{'hide-sidebar': IS_ONLINE === false || IS_ON_MOBILE_DEVICE === true || SUPPORT_MODE === false}">
7
+ <app-sidebar></app-sidebar>
8
+ </div>
9
+
10
+ <div class="user-details-sidebar" [ngClass]="{'hide-sidebar': IS_ONLINE === false || IS_ON_MOBILE_DEVICE === true || SUPPORT_MODE === false}">
11
+ <app-sidebar-user-details> </app-sidebar-user-details>
12
+ </div>
13
+
14
+ <ion-split-pane when="md" contentId="main">
15
+ <!-- 'sidebar-visible': IS_ONLINE === true && SUPPORT_MODE === true, -->
16
+ <ion-nav #sidebarNav [root]="sidebarPage" [ngClass]="{'sidebar-hidden': IS_ON_MOBILE_DEVICE === true || SUPPORT_MODE === false}"></ion-nav>
8
17
  <!-- our side menu -->
9
18
  <!-- <ion-router-outlet id="sidebar" name='sidebar' animated="false" #masterNav> -->
10
19
  <!-- <app-conversations-list></app-conversations-list> -->
11
20
  <!-- <app-details></app-details> -->
12
21
  <!-- </ion-router-outlet> -->
13
22
  <!-- the main content -->
14
- <ion-router-outlet id="main" #detailNav animated="false">
23
+ <!-- -->
24
+ <ion-router-outlet id="main" #detailNav animated="false" [ngClass]="{'router-outlet-margin-left': platformIs === 'mobile' && SUPPORT_MODE === true && IS_ON_MOBILE_DEVICE === false}">
15
25
  </ion-router-outlet>
16
26
  </ion-split-pane>
17
27
  </div>
@@ -1,6 +1,23 @@
1
- .split-pane-md.split-pane-visible > .split-pane-side {
1
+ .split-pane-md.split-pane-visible > .split-pane-side {
2
2
  min-width: 312px;
3
3
  display: block; // Safari bug fix
4
+ margin-left: 60px;
5
+ }
6
+
7
+ .sidebar-visible {
8
+ margin-left: 60px;
9
+ }
10
+
11
+ .sidebar-hidden {
12
+ margin-left: 0px !important;
13
+ }
14
+
15
+ .hide-sidebar {
16
+ display: none;
17
+ }
18
+
19
+ .router-outlet-margin-left {
20
+ left: 60px
4
21
  }
5
22
 
6
23
  // @media (min-width: 768px) {
@@ -1,4 +1,4 @@
1
- import { URL_SOUND_LIST_CONVERSATION } from './../chat21-core/utils/constants';
1
+ import { tranlatedLanguage, URL_SOUND_LIST_CONVERSATION } from './../chat21-core/utils/constants';
2
2
  import { ArchivedConversationsHandlerService } from 'src/chat21-core/providers/abstract/archivedconversations-handler.service';
3
3
  import { AppStorageService } from 'src/chat21-core/providers/abstract/app-storage.service';
4
4
 
@@ -58,6 +58,7 @@ import * as PACKAGE from 'package.json';
58
58
  import { filter } from 'rxjs/operators'
59
59
  import { WebSocketJs } from './services/websocket/websocket-js';
60
60
  import { Location } from '@angular/common'
61
+
61
62
  // import { filter } from 'rxjs/operators';
62
63
 
63
64
  @Component({
@@ -77,7 +78,7 @@ export class AppComponent implements OnInit {
77
78
  public sidebarPage: any;
78
79
  public notificationsEnabled: boolean;
79
80
  public zone: NgZone;
80
- private platformIs: string;
81
+ public platformIs: string;
81
82
  private doitResize: any;
82
83
  private timeModalLogin: any;
83
84
  public tenant: string;
@@ -98,7 +99,9 @@ export class AppComponent implements OnInit {
98
99
  public missingConnectionToast: any
99
100
  public executedInitializeAppByWatchConnection: boolean = false;
100
101
  private version: string;
101
-
102
+ IS_ONLINE: boolean;
103
+ IS_ON_MOBILE_DEVICE: boolean;
104
+ SUPPORT_MODE: boolean;
102
105
  // private isOnline: boolean = false;
103
106
 
104
107
  wsService: WebSocketJs;
@@ -145,11 +148,20 @@ export class AppComponent implements OnInit {
145
148
 
146
149
  this.saveInStorageNumberOfOpenedChatTab();
147
150
  this.listenChatAlreadyOpenWithoutParamsInMobileMode()
148
-
151
+ this.isOnMobileDevice()
149
152
  // this.listenToUrlChanges();
150
153
  // this.getPageState();
151
154
  }
152
155
 
156
+ isOnMobileDevice() {
157
+ this.IS_ON_MOBILE_DEVICE = false;
158
+ if (/Android|iPhone/i.test(window.navigator.userAgent)) {
159
+ this.IS_ON_MOBILE_DEVICE = true;
160
+ }
161
+ // this.logger.log('[APP-COMP] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
162
+ return this.IS_ON_MOBILE_DEVICE;
163
+ }
164
+
153
165
 
154
166
 
155
167
  listenChatAlreadyOpenWithoutParamsInMobileMode() {
@@ -256,7 +268,7 @@ export class AppComponent implements OnInit {
256
268
 
257
269
 
258
270
  saveInStorageNumberOfOpenedChatTab() {
259
- this.logger.log('Calling saveInStorageChatOpenedTab!');
271
+ // this.logger.log('Calling saveInStorageChatOpenedTab!');
260
272
 
261
273
  // https://jsfiddle.net/jjjs5wd3/3/å
262
274
  if (+localStorage.tabCount > 0) {
@@ -286,6 +298,13 @@ export class AppComponent implements OnInit {
286
298
  */
287
299
  ngOnInit() {
288
300
  const appconfig = this.appConfigProvider.getConfig();
301
+ // console.log('[APP-COMP] appconfig', appconfig)
302
+ if (appconfig && appconfig.supportMode) {
303
+ this.SUPPORT_MODE = appconfig.supportMode
304
+ // console.log('[APP-COMP] appconfig > SUPPORT_MODE', this.SUPPORT_MODE)
305
+ } else {
306
+ this.SUPPORT_MODE = false;
307
+ }
289
308
  this.persistence = appconfig.authPersistence;
290
309
  this.appStorageService.initialize(environment.storage_prefix, this.persistence, '')
291
310
  // this.logger.log('[APP-COMP] HELLO ngOnInit !!!!!!!')
@@ -530,8 +549,8 @@ export class AppComponent implements OnInit {
530
549
  currentUserId = currentUser.uid;
531
550
  this.logger.log('[APP-COMP] - setLanguage current_user uid: ', currentUserId);
532
551
  }
533
- this.translate.setDefaultLang('en');
534
- this.translate.use('en');
552
+ // this.translate.setDefaultLang('en');
553
+ // this.translate.use('en');
535
554
 
536
555
  const browserLang = this.translate.getBrowserLang();
537
556
  this.logger.log('[APP-COMP] browserLang: ', browserLang);
@@ -544,8 +563,19 @@ export class AppComponent implements OnInit {
544
563
  } else if (browserLang && stored_preferred_lang) {
545
564
  chat_lang = stored_preferred_lang
546
565
  }
547
-
548
- this.translate.use(chat_lang);
566
+
567
+ this.logger.log('[APP-COMP] - chat_lang', chat_lang)
568
+
569
+ if (tranlatedLanguage.includes(chat_lang)) {
570
+ this.logger.log('[APP-COMP] tranlatedLanguage includes',chat_lang , ': ', tranlatedLanguage.includes(chat_lang))
571
+ this.translate.setDefaultLang(chat_lang)
572
+ this.translate.use(chat_lang);
573
+ }
574
+ else {
575
+ this.logger.log('[APP-COMP] tranlatedLanguage includes',chat_lang , ': ', tranlatedLanguage.includes(chat_lang))
576
+ this.translate.setDefaultLang('en');
577
+ this.translate.use('en');
578
+ }
549
579
 
550
580
  // this.logger.debug('[APP-COMP] navigator.language: ', navigator.language);
551
581
  // let language;
@@ -647,7 +677,7 @@ export class AppComponent implements OnInit {
647
677
  })
648
678
  } else {
649
679
  this.logger.warn('[APP-COMP] >>> I AM NOT LOGGED IN <<<')
650
-
680
+ this.IS_ONLINE = false;
651
681
  // clearTimeout(this.timeModalLogin);
652
682
  // this.timeModalLogin = setTimeout(() => {
653
683
  if (!this.hadBeenCalledOpenModal) {
@@ -830,10 +860,14 @@ export class AppComponent implements OnInit {
830
860
  // const user = this.tiledeskAuthService.getCurrentUser();
831
861
  // if (this.isOnline === false) {
832
862
  // if (AUTH_STATE_ONLINE) {
863
+ this.IS_ONLINE = true;
864
+ // console.log('[APP-COMP] IS_ONLINE', this.IS_ONLINE)
833
865
  this.goOnLine();
834
866
  // }
835
867
  } else if (state === AUTH_STATE_OFFLINE) {
836
868
  // this.checkTokenAndGoOffline() //se c'è un tiledeskToken salvato, allora aspetta, altrimenti vai offline
869
+ this.IS_ONLINE = false;
870
+ // console.log('[APP-COMP] IS_ONLINE', this.IS_ONLINE)
837
871
  this.goOffLine()
838
872
  }
839
873
  }, error => {
@@ -871,12 +905,12 @@ export class AppComponent implements OnInit {
871
905
  }
872
906
 
873
907
  /**
874
- * goOnLine:
875
- * 1 - nascondo splashscreen
876
- * 2 - recupero il tiledeskToken e lo salvo in chat manager
877
- * 3 - carico in d
878
- * @param user
879
- */
908
+ * goOnLine:
909
+ * 1 - nascondo splashscreen
910
+ * 2 - recupero il tiledeskToken e lo salvo in chat manager
911
+ * 3 - carico in d
912
+ * @param user
913
+ */
880
914
  goOnLine = () => {
881
915
  this.logger.log('[APP-COMP]- GO-ONLINE ');
882
916
  // this.isOnline = true;
@@ -82,7 +82,9 @@ import { ConversationListPageModule } from './pages/conversations-list/conversat
82
82
  import { ConversationDetailPageModule } from './pages/conversation-detail/conversation-detail.module';
83
83
  import { LoginPageModule } from './pages/authentication/login/login.module';
84
84
  import { LoaderPreviewPageModule } from './pages/loader-preview/loader-preview.module';
85
-
85
+ import { CreateTicketPageModule } from './pages/create-ticket/create-ticket.module';
86
+ import { CreateRequesterPageModule } from './pages/create-requester/create-requester.module';
87
+ import { CreateCannedResponsePageModule } from './pages/create-canned-response/create-canned-response.module';
86
88
  // UTILS
87
89
  import { ScrollbarThemeModule } from './utils/scrollbar-theme.directive';
88
90
  import { SharedModule } from 'src/app/shared/shared.module';
@@ -90,12 +92,15 @@ import { ConversationInfoModule } from 'src/app/components/conversation-info/con
90
92
 
91
93
 
92
94
  // Directives
95
+ // import { HtmlEntitiesEncodePipe } from './directives/html-entities-encode.pipe';
96
+ // import { MarkedPipe } from './directives/marked.pipe';
93
97
 
94
98
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
95
99
  import { Network } from '@ionic-native/network/ngx';
96
100
  import { ConnectionService } from 'ng-connection-service';
97
101
  import { WebSocketJs } from './services/websocket/websocket-js';
98
102
  import { UnassignedConversationsPageModule } from './pages/unassigned-conversations/unassigned-conversations.module';
103
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
99
104
 
100
105
  // FACTORIES
101
106
  export function createTranslateLoader(http: HttpClient) {
@@ -245,12 +250,13 @@ const appInitializerFn = (appConfig: AppConfigProvider, logger: NGXLogger) => {
245
250
 
246
251
  @NgModule({
247
252
  declarations: [
248
- AppComponent,
253
+ AppComponent
249
254
  ],
250
255
  entryComponents: [
251
256
  ],
252
257
  imports: [
253
258
  BrowserModule,
259
+ BrowserAnimationsModule,
254
260
  FormsModule,
255
261
  ReactiveFormsModule,
256
262
  IonicModule.forRoot(),
@@ -279,7 +285,10 @@ const appInitializerFn = (appConfig: AppConfigProvider, logger: NGXLogger) => {
279
285
  SharedModule,
280
286
  ConversationInfoModule,
281
287
  NgxLinkifyjsModule.forRoot(),
282
- LoaderPreviewPageModule
288
+ LoaderPreviewPageModule,
289
+ CreateTicketPageModule,
290
+ CreateRequesterPageModule,
291
+ CreateCannedResponsePageModule
283
292
  ],
284
293
  bootstrap: [AppComponent],
285
294