@chat21/chat21-ionic 3.0.60 → 3.0.61-rc11

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 (148) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/README.md +2 -0
  3. package/angular.json +3 -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 +12 -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 +10 -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 +7 -1
  34. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +7 -2
  35. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +103 -12
  36. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +39 -36
  37. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +5 -1
  38. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +147 -65
  39. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +3 -3
  40. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +12 -2
  41. package/src/app/components/ddp-header/ddp-header.component.html +20 -6
  42. package/src/app/components/ddp-header/ddp-header.component.scss +4 -0
  43. package/src/app/components/ddp-header/ddp-header.component.ts +104 -10
  44. package/src/app/components/project-item/project-item.component.html +8 -7
  45. package/src/app/components/project-item/project-item.component.scss +6 -1
  46. package/src/app/components/project-item/project-item.component.ts +15 -2
  47. package/src/app/components/sidebar/sidebar.component.html +274 -0
  48. package/src/app/components/sidebar/sidebar.component.scss +79 -0
  49. package/src/app/components/sidebar/sidebar.component.spec.ts +24 -0
  50. package/src/app/components/sidebar/sidebar.component.ts +493 -0
  51. package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +110 -0
  52. package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +318 -0
  53. package/src/app/components/sidebar-user-details/sidebar-user-details.component.spec.ts +24 -0
  54. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +486 -0
  55. package/src/app/pages/conversation-detail/conversation-detail.module.ts +2 -1
  56. package/src/app/pages/conversation-detail/conversation-detail.page.html +7 -5
  57. package/src/app/pages/conversation-detail/conversation-detail.page.ts +1285 -790
  58. package/src/app/pages/conversations-list/conversations-list.module.ts +2 -1
  59. package/src/app/pages/conversations-list/conversations-list.page.html +18 -9
  60. package/src/app/pages/conversations-list/conversations-list.page.scss +9 -1
  61. package/src/app/pages/conversations-list/conversations-list.page.ts +753 -428
  62. package/src/app/pages/create-requester/create-requester-routing.module.ts +17 -0
  63. package/src/app/pages/create-requester/create-requester.module.ts +28 -0
  64. package/src/app/pages/create-requester/create-requester.page.html +67 -0
  65. package/src/app/pages/create-requester/create-requester.page.scss +30 -0
  66. package/src/app/pages/create-requester/create-requester.page.spec.ts +24 -0
  67. package/src/app/pages/create-requester/create-requester.page.ts +137 -0
  68. package/src/app/pages/create-ticket/create-ticket-routing.module.ts +17 -0
  69. package/src/app/pages/create-ticket/create-ticket.module.ts +28 -0
  70. package/src/app/pages/create-ticket/create-ticket.page.html +171 -0
  71. package/src/app/pages/create-ticket/create-ticket.page.scss +52 -0
  72. package/src/app/pages/create-ticket/create-ticket.page.spec.ts +24 -0
  73. package/src/app/pages/create-ticket/create-ticket.page.ts +423 -0
  74. package/src/app/pages/loader-preview/loader-preview.page.ts +226 -166
  75. package/src/app/pages/profile-info/profile-info.page.html +2 -2
  76. package/src/app/pages/profile-info/profile-info.page.scss +1 -1
  77. package/src/app/pages/profile-info/profile-info.page.ts +23 -21
  78. package/src/app/services/tiledesk/tiledesk.service.ts +181 -0
  79. package/src/app/shared/shared.module.ts +13 -0
  80. package/src/app/utils/scrollbar-theme.directive.ts +58 -24
  81. package/src/assets/i18n/de.json +55 -13
  82. package/src/assets/i18n/en.json +48 -6
  83. package/src/assets/i18n/es.json +47 -5
  84. package/src/assets/i18n/fr.json +50 -8
  85. package/src/assets/i18n/it.json +47 -5
  86. package/src/assets/i18n/pt.json +47 -5
  87. package/src/assets/i18n/ru.json +48 -6
  88. package/src/assets/i18n/sr.json +251 -0
  89. package/src/assets/i18n/tr.json +47 -5
  90. package/src/assets/images/default-avatar-x-select.png +0 -0
  91. package/src/assets/images/language_flag/ar.png +0 -0
  92. package/src/assets/images/language_flag/bg.png +0 -0
  93. package/src/assets/images/language_flag/ca.png +0 -0
  94. package/src/assets/images/language_flag/cs.png +0 -0
  95. package/src/assets/images/language_flag/da.png +0 -0
  96. package/src/assets/images/language_flag/de.png +0 -0
  97. package/src/assets/images/language_flag/el.png +0 -0
  98. package/src/assets/images/language_flag/en.png +0 -0
  99. package/src/assets/images/language_flag/es.png +0 -0
  100. package/src/assets/images/language_flag/fa.png +0 -0
  101. package/src/assets/images/language_flag/fi.png +0 -0
  102. package/src/assets/images/language_flag/fr.png +0 -0
  103. package/src/assets/images/language_flag/he.png +0 -0
  104. package/src/assets/images/language_flag/hi.png +0 -0
  105. package/src/assets/images/language_flag/hr.png +0 -0
  106. package/src/assets/images/language_flag/hu.png +0 -0
  107. package/src/assets/images/language_flag/id.png +0 -0
  108. package/src/assets/images/language_flag/it.png +0 -0
  109. package/src/assets/images/language_flag/ja.png +0 -0
  110. package/src/assets/images/language_flag/ko.png +0 -0
  111. package/src/assets/images/language_flag/ml-IN.png +0 -0
  112. package/src/assets/images/language_flag/ne-NP.png +0 -0
  113. package/src/assets/images/language_flag/nl.png +0 -0
  114. package/src/assets/images/language_flag/no.png +0 -0
  115. package/src/assets/images/language_flag/pl.png +0 -0
  116. package/src/assets/images/language_flag/pt-BR.png +0 -0
  117. package/src/assets/images/language_flag/pt.png +0 -0
  118. package/src/assets/images/language_flag/ro.png +0 -0
  119. package/src/assets/images/language_flag/ru.png +0 -0
  120. package/src/assets/images/language_flag/sk.png +0 -0
  121. package/src/assets/images/language_flag/sl.png +0 -0
  122. package/src/assets/images/language_flag/sr.png +0 -0
  123. package/src/assets/images/language_flag/sv-SE.png +0 -0
  124. package/src/assets/images/language_flag/ta.png +0 -0
  125. package/src/assets/images/language_flag/th.png +0 -0
  126. package/src/assets/images/language_flag/tr.png +0 -0
  127. package/src/assets/images/language_flag/uk.png +0 -0
  128. package/src/assets/images/language_flag/vi.png +0 -0
  129. package/src/assets/images/language_flag/zh-CN.png +0 -0
  130. package/src/assets/images/language_flag/zh-TW.png +0 -0
  131. package/src/assets/images/no_image_user.png +0 -0
  132. package/src/assets/images/priority_icons/high.svg +3 -0
  133. package/src/assets/images/priority_icons/high_v2.svg +14 -0
  134. package/src/assets/images/priority_icons/low.svg +10 -0
  135. package/src/assets/images/priority_icons/low_v2.svg +14 -0
  136. package/src/assets/images/priority_icons/medium.svg +16 -0
  137. package/src/assets/images/priority_icons/medium_v2.svg +11 -0
  138. package/src/assets/images/priority_icons/urgent.svg +4 -0
  139. package/src/assets/images/priority_icons/urgent_v2.svg +16 -0
  140. package/src/assets/tiledesk-solo-logo.png +0 -0
  141. package/src/chat-config-pre-test.json +3 -1
  142. package/src/chat-config-template.json +3 -1
  143. package/src/chat-config.json +4 -2
  144. package/src/chat21-core/utils/constants.ts +6 -1
  145. package/src/global.scss +397 -3
  146. package/src/index.html +7 -0
  147. package/publish_pre.sh +0 -33
  148. package/publish_prod.sh +0 -33
package/CHANGELOG.md CHANGED
@@ -1,5 +1,80 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+ ### 3.0.61-rc11
4
+ - Fixed the bug: the "Resolve" button is displayed in the header of the details of the archived conversations
5
+ - Fixed the bug: in the header of the conversation detail the "Resolve" button remains active even after resolving the conversation
6
+ - Adds the ability to create a ticket
7
+ - Adds tooltips to the buttons available in the header of the conversation list
8
+ - Change the text of the "Conversations" menu item in the left sidebar to "Monitor"
9
+
10
+ ### 3.0.61-rc10
11
+ - Fixes the bug: the Analytics icon of the left sidebar is not displayed
12
+
13
+ ### 3.0.61-rc9
14
+ - Fixes the bug: the Apps icon of the left sidebar is not displayed
15
+
16
+ ### 3.0.61-rc8
17
+ - Changes the icon of the "Conversations" menu item to the left sidebar
18
+ - Adds Serbian language
19
+
20
+ ### 3.0.61-rc7
21
+ - Fixes the bug: while loading the app, the conversation list changes size and becomes wider
22
+ - Changes the style of the left sidebar
23
+ - Display in the "user data drawer" an avatar constructed with the initials of the logged in teammate if his profile picture is not available
24
+
25
+ ### 3.0.61-rc6
26
+ - Enhances the style of the sidebar tooltips
27
+ - 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
28
+ - Fixes the bug: not all chat strings are translated into the browser language or into the selected language
29
+ - Fixes the bug: Email is broken on dashes in user details sidebar
30
+ - Displays an alert when a teammate archives a conversation from a project they are no longer a part of
31
+ - Disable the "send message" textarea when a teammate replies to a support conversation of a project he is no longer a part of
32
+ - 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
33
+ - Adds, when an image is uploaded, the text of the "send message" text area as a caption of the image preview modal window
34
+
35
+ ### 3.0.61-rc5
36
+ - Fixes the bug: on mobile devices the chat content is shifted to the right
37
+ - Adds the ability to open and close the "user detail sidebar" by clicking on the avatar of the logged teammate present on the sidebar
38
+ - Fixes the bug: canned responses remain visible even if, after making a filter, the backslash is deleted
39
+ - Prevents the "open canned responses" button from inserting a backslash if another one exists before
40
+ - Hides the badge that displays the number of unassigned conversations if there are none
41
+ - Improves custom scrollbar displayed in the sidebar and in user detail sidebar
42
+ - Adds custom scrollbars to the conversation list and to the conversation detail
43
+
44
+ ### 3.0.61-rc4
45
+ - Hides the item showing unassigned conversations in the list of archived conversations
46
+ - 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"
47
+ - Changes all occurrences of the "teammatesButton" environment variable to "writeToButton"
48
+ - 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
49
+ - Moves for conversations of type "support" the "Resolve conversation" button from the dropdown menu to the header of the conversation detail
50
+
51
+ ### 3.0.61-rc3
52
+ - Replaces console.log with custom loggers
53
+ - Fixes the bug: the info support sidebar is no more displayed
54
+
55
+ ### 3.0.61-rc2
56
+ - Fixes the bug: Profile picture in the sidebar does not update when logged in with another user after logging out
57
+ - Bug Fix: in the "info-profile" page avoid the "uid of undefined" error
58
+ - Adds the "user details" sidebar
59
+ - Adds the languages flags images
60
+ - Allows to close the "user details" sidebar by clicking outside it
61
+ - Adds the tooltips to the links of the sidebar
62
+ - 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
63
+ - Hides in the item showing unassigned conversations the button to pin a project if the app is not on a mobile device
64
+ - Gets in the sidebar the feature tokens from the environment variables
65
+ - Install the "Roboto" font
66
+ - Changes font priority in global.scss: replace "Helvetica Neue" font with "Roboto" font
67
+ - Imports the "Poppins" font family into index.html
68
+ - Adds the "Resolve" tooltip to the "archive" button available in the conversation list
69
+ - 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
70
+ - Adds "teammatesButton" and "archivedButton" variables to the environments
71
+ - Adds the "TEAMMATES_BUTTON" and the "ARCHIVED_BUTTON" variables to the env.sample file
72
+ - Adds the "teammatesButton" and the "archivedButton" variables to the "chat-config-template.json" file and to "the chat-config.json" file
73
+ - Updates the section "Configuration" of the "README.md" file with the new variables "teammatesButton" and the "archivedButton"
74
+
75
+ ### 3.0.61-rc1
76
+ - Adds a sidebar that allows navigation to the dashboard
77
+
3
78
  ### 3.0.60
4
79
  - Deploys in production
5
80
 
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,9 @@
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",
44
47
  {
45
48
  "input": "src/theme/variables.scss"
46
49
  },
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-rc11",
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,10 +13,13 @@
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",
@@ -30,22 +33,23 @@
30
33
  "@ionic/angular": "^5.0.7",
31
34
  "@ionic/storage": "^2.2.0",
32
35
  "@mdi/font": "^5.1.45",
36
+ "@ng-select/ng-select": "^3.7.3",
33
37
  "@ngx-translate/core": "^12.1.2",
34
38
  "@ngx-translate/http-loader": "^4.0.0",
35
39
  "angular2-moment": "^1.9.0",
36
40
  "autolinker": "^3.14.2",
37
41
  "cordova-android": "^6.2.3",
38
42
  "cordova-android-support-gradle-release": "^3.0.1",
39
- "cordova-browser": "5.0.4",
43
+ "cordova-browser": "^5.0.4",
40
44
  "cordova-ios": "6.1.1",
41
45
  "cordova-plugin-chooser": "^1.3.2",
42
- "cordova-plugin-device": "^2.0.2",
46
+ "cordova-plugin-device": "^2.0.3",
43
47
  "cordova-plugin-ionic-keyboard": "^2.2.0",
44
48
  "cordova-plugin-ionic-webview": "^4.2.1",
45
49
  "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",
50
+ "cordova-plugin-splashscreen": "^5.0.4",
51
+ "cordova-plugin-statusbar": "^2.4.3",
52
+ "cordova-plugin-whitelist": "^1.3.5",
49
53
  "cordova-res": "^0.15.1",
50
54
  "core-js": "^2.5.4",
51
55
  "firebase": "^8.6.7",
@@ -59,6 +63,7 @@
59
63
  "ngx-logger": "^4.2.1",
60
64
  "ngx-perfect-scrollbar": "^9.0.0",
61
65
  "perfect-scrollbar": "^1.5.0",
66
+ "roboto-fontface": "^0.10.0",
62
67
  "rxjs": "~6.5.1",
63
68
  "tslib": "^1.9.0",
64
69
  "zone.js": "~0.9.1"
File without changes
File without changes
@@ -48,9 +48,19 @@ 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)
51
59
  }
52
60
 
53
61
 
62
+
63
+
54
64
  // {
55
65
  // path: 'conversation-detail/:IDConv',
56
66
  // 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,6 +82,8 @@ 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
+ import { CreateTicketPageModule } from './pages/create-ticket/create-ticket.module';
86
+ import { CreateRequesterPageModule } from './pages/create-requester/create-requester.module';
85
87
 
86
88
  // UTILS
87
89
  import { ScrollbarThemeModule } from './utils/scrollbar-theme.directive';
@@ -96,6 +98,7 @@ import { Network } from '@ionic-native/network/ngx';
96
98
  import { ConnectionService } from 'ng-connection-service';
97
99
  import { WebSocketJs } from './services/websocket/websocket-js';
98
100
  import { UnassignedConversationsPageModule } from './pages/unassigned-conversations/unassigned-conversations.module';
101
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
99
102
 
100
103
  // FACTORIES
101
104
  export function createTranslateLoader(http: HttpClient) {
@@ -251,6 +254,7 @@ const appInitializerFn = (appConfig: AppConfigProvider, logger: NGXLogger) => {
251
254
  ],
252
255
  imports: [
253
256
  BrowserModule,
257
+ BrowserAnimationsModule,
254
258
  FormsModule,
255
259
  ReactiveFormsModule,
256
260
  IonicModule.forRoot(),
@@ -279,7 +283,9 @@ const appInitializerFn = (appConfig: AppConfigProvider, logger: NGXLogger) => {
279
283
  SharedModule,
280
284
  ConversationInfoModule,
281
285
  NgxLinkifyjsModule.forRoot(),
282
- LoaderPreviewPageModule
286
+ LoaderPreviewPageModule,
287
+ CreateTicketPageModule,
288
+ CreateRequesterPageModule
283
289
  ],
284
290
  bootstrap: [AppComponent],
285
291
 
@@ -118,12 +118,17 @@
118
118
  <ion-note *ngIf="!conversation.archived" class="conversation_time">{{conversation.timestamp | amTimeAgo}}</ion-note>
119
119
 
120
120
  <ion-buttons slot="end">
121
- <ion-button *ngIf="!conversation.archived"
121
+ <ion-button *ngIf="!conversation.archived" [tooltip]="archiveTooltip" [options]="tooltip_options" placement="bottom" content-type="template"
122
122
  [ngClass]="{'hide': !isApp, 'button-on-desktop': !isApp, 'button-on-mobile': isApp }"
123
123
  id="{{ 'close_conversation_button' + conversation.uid }}" class="close-conversation-button" ion-button clear
124
124
  item-end (click)="closeConversation(conversation);$event.stopPropagation();" padding>
125
125
  <ion-icon slot="icon-only" style="display:block;" id="{{ 'close_button_icon' + conversation.uid }}"
126
126
  color="close-conversation" name="archive-outline" item-end></ion-icon>
127
+
128
+ <ng-template #archiveTooltip>
129
+ <span *ngIf="conversation?.recipient.startsWith('support-group')"> {{ resolve_btn_tooltip}} </span>
130
+ <span *ngIf="!conversation?.recipient.startsWith('support-group')"> {{ archive_btn_tooltip }} </span>
131
+ </ng-template>
127
132
  </ion-button>
128
133
  <!-- <ion-button *ngIf="conversation.archived" class="close-conversation-button" ion-button clear item-end disabled padding>
129
134
  <!- - <ion-icon style="display:block;" id="{{ 'close_button_icon' + conversation.uid }}" color="close-conversation" name="archive-outline" item-end></ion-icon> - ->
@@ -142,7 +147,7 @@
142
147
  {{browserLang === 'en' ? (conversation.timestamp | amDateFormat:'MMM DD YYYY') : (conversation.timestamp| amDateFormat:'DD MMM YYYY') }}
143
148
  <!-- {{conversation.timestamp | amDateFormat:'DD MMM YYYY'}} -->
144
149
  </span>
145
- <i class="material-icons" item-end style="font-size: 15px;font-weight: 400;color: #666666;"> history </i>
150
+ <!-- <i class="material-icons" item-end style="font-size: 15px;font-weight: 400;color: #666666;"> history </i> -->
146
151
  </div>
147
152
 
148
153
  <!-- && !conversation?.archived -->