@chat21/chat21-ionic 3.0.5-9.2 → 3.0.6-2.3

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 (178) hide show
  1. package/CHANGELOG.md +202 -0
  2. package/LICENSE +661 -21
  3. package/README.md +13 -1
  4. package/angular.json +4 -0
  5. package/config.xml +4 -5
  6. package/deploy_pre.sh +44 -5
  7. package/deploy_prod.sh +36 -7
  8. package/env.sample +4 -2
  9. package/package.json +12 -8
  10. package/resources/{Android → android}/icon/drawable-hdpi-icon.png +0 -0
  11. package/resources/{Android → android}/icon/drawable-ldpi-icon.png +0 -0
  12. package/resources/{Android → android}/icon/drawable-mdpi-icon.png +0 -0
  13. package/resources/{Android → android}/icon/drawable-xhdpi-icon.png +0 -0
  14. package/resources/{Android → android}/icon/drawable-xxhdpi-icon.png +0 -0
  15. package/resources/{Android → android}/icon/drawable-xxxhdpi-icon.png +0 -0
  16. package/resources/{Android → android}/icon.png +0 -0
  17. package/resources/{Android → android}/splash/drawable-land-hdpi-screen.png +0 -0
  18. package/resources/{Android → android}/splash/drawable-land-ldpi-screen.png +0 -0
  19. package/resources/{Android → android}/splash/drawable-land-mdpi-screen.png +0 -0
  20. package/resources/{Android → android}/splash/drawable-land-xhdpi-screen.png +0 -0
  21. package/resources/{Android → android}/splash/drawable-land-xxhdpi-screen.png +0 -0
  22. package/resources/{Android → android}/splash/drawable-land-xxxhdpi-screen.png +0 -0
  23. package/resources/{Android → android}/splash/drawable-port-hdpi-screen.png +0 -0
  24. package/resources/{Android → android}/splash/drawable-port-ldpi-screen.png +0 -0
  25. package/resources/{Android → android}/splash/drawable-port-mdpi-screen.png +0 -0
  26. package/resources/{Android → android}/splash/drawable-port-xhdpi-screen.png +0 -0
  27. package/resources/{Android → android}/splash/drawable-port-xxhdpi-screen.png +0 -0
  28. package/resources/{Android → android}/splash/drawable-port-xxxhdpi-screen.png +0 -0
  29. package/resources/{Android → android}/splash.png +0 -0
  30. package/src/app/app-routing.module.ts +15 -0
  31. package/src/app/app.component.html +14 -4
  32. package/src/app/app.component.scss +18 -1
  33. package/src/app/app.component.ts +98 -37
  34. package/src/app/app.module.ts +14 -5
  35. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +36 -25
  36. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +160 -50
  37. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +108 -18
  38. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +21 -36
  39. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +19 -7
  40. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +63 -42
  41. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -1
  42. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +7 -2
  43. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +141 -21
  44. package/src/app/chatlib/list-conversations-component/list-conversations/list-conversations.component.ts +13 -10
  45. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +39 -36
  46. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +7 -1
  47. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +148 -63
  48. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +101 -39
  49. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +73 -2
  50. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +168 -98
  51. package/src/app/components/ddp-header/ddp-header.component.html +20 -6
  52. package/src/app/components/ddp-header/ddp-header.component.scss +4 -0
  53. package/src/app/components/ddp-header/ddp-header.component.ts +104 -10
  54. package/src/app/components/image-viewer/image-viewer.component.scss +2 -2
  55. package/src/app/components/project-item/project-item.component.html +141 -118
  56. package/src/app/components/project-item/project-item.component.scss +173 -91
  57. package/src/app/components/project-item/project-item.component.ts +59 -25
  58. package/src/app/components/sidebar/sidebar.component.html +275 -0
  59. package/src/app/components/sidebar/sidebar.component.scss +79 -0
  60. package/src/app/components/sidebar/sidebar.component.spec.ts +24 -0
  61. package/src/app/components/sidebar/sidebar.component.ts +541 -0
  62. package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +137 -0
  63. package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +389 -0
  64. package/src/app/components/sidebar-user-details/sidebar-user-details.component.spec.ts +24 -0
  65. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +530 -0
  66. package/src/app/pages/conversation-detail/conversation-detail.module.ts +9 -2
  67. package/src/app/pages/conversation-detail/conversation-detail.page.html +53 -49
  68. package/src/app/pages/conversation-detail/conversation-detail.page.scss +28 -0
  69. package/src/app/pages/conversation-detail/conversation-detail.page.ts +1254 -753
  70. package/src/app/pages/conversations-list/conversations-list.module.ts +2 -1
  71. package/src/app/pages/conversations-list/conversations-list.page.html +24 -11
  72. package/src/app/pages/conversations-list/conversations-list.page.scss +20 -1
  73. package/src/app/pages/conversations-list/conversations-list.page.ts +687 -420
  74. package/src/app/pages/create-canned-response/create-canned-response-routing.module.ts +17 -0
  75. package/src/app/pages/create-canned-response/create-canned-response.module.ts +30 -0
  76. package/src/app/pages/create-canned-response/create-canned-response.page.html +150 -0
  77. package/src/app/pages/create-canned-response/create-canned-response.page.scss +55 -0
  78. package/src/app/pages/create-canned-response/create-canned-response.page.spec.ts +24 -0
  79. package/src/app/pages/create-canned-response/create-canned-response.page.ts +319 -0
  80. package/src/app/pages/create-requester/create-requester-routing.module.ts +17 -0
  81. package/src/app/pages/create-requester/create-requester.module.ts +28 -0
  82. package/src/app/pages/create-requester/create-requester.page.html +67 -0
  83. package/src/app/pages/create-requester/create-requester.page.scss +30 -0
  84. package/src/app/pages/create-requester/create-requester.page.spec.ts +24 -0
  85. package/src/app/pages/create-requester/create-requester.page.ts +138 -0
  86. package/src/app/pages/create-ticket/create-ticket-routing.module.ts +17 -0
  87. package/src/app/pages/create-ticket/create-ticket.module.ts +28 -0
  88. package/src/app/pages/create-ticket/create-ticket.page.html +171 -0
  89. package/src/app/pages/create-ticket/create-ticket.page.scss +52 -0
  90. package/src/app/pages/create-ticket/create-ticket.page.spec.ts +24 -0
  91. package/src/app/pages/create-ticket/create-ticket.page.ts +432 -0
  92. package/src/app/pages/loader-preview/loader-preview.page.ts +226 -166
  93. package/src/app/pages/profile-info/profile-info.page.html +4 -4
  94. package/src/app/pages/profile-info/profile-info.page.scss +13 -2
  95. package/src/app/pages/profile-info/profile-info.page.ts +23 -21
  96. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +16 -11
  97. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +157 -63
  98. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +51 -16
  99. package/src/app/services/app-config.ts +14 -14
  100. package/src/app/services/tiledesk/tiledesk.service.ts +209 -0
  101. package/src/app/shared/shared.module.ts +21 -7
  102. package/src/app/utils/scrollbar-theme.directive.ts +58 -24
  103. package/src/assets/i18n/de.json +266 -0
  104. package/src/assets/i18n/en.json +85 -10
  105. package/src/assets/i18n/es.json +266 -0
  106. package/src/assets/i18n/fr.json +266 -0
  107. package/src/assets/i18n/it.json +104 -37
  108. package/src/assets/i18n/pt.json +266 -0
  109. package/src/assets/i18n/ru.json +266 -0
  110. package/src/assets/i18n/sr.json +266 -0
  111. package/src/assets/i18n/tr.json +266 -0
  112. package/src/assets/images/default-avatar-x-select.png +0 -0
  113. package/src/assets/images/language_flag/ar.png +0 -0
  114. package/src/assets/images/language_flag/bg.png +0 -0
  115. package/src/assets/images/language_flag/ca.png +0 -0
  116. package/src/assets/images/language_flag/cs.png +0 -0
  117. package/src/assets/images/language_flag/da.png +0 -0
  118. package/src/assets/images/language_flag/de.png +0 -0
  119. package/src/assets/images/language_flag/el.png +0 -0
  120. package/src/assets/images/language_flag/en.png +0 -0
  121. package/src/assets/images/language_flag/es.png +0 -0
  122. package/src/assets/images/language_flag/fa.png +0 -0
  123. package/src/assets/images/language_flag/fi.png +0 -0
  124. package/src/assets/images/language_flag/fr.png +0 -0
  125. package/src/assets/images/language_flag/he.png +0 -0
  126. package/src/assets/images/language_flag/hi.png +0 -0
  127. package/src/assets/images/language_flag/hr.png +0 -0
  128. package/src/assets/images/language_flag/hu.png +0 -0
  129. package/src/assets/images/language_flag/id.png +0 -0
  130. package/src/assets/images/language_flag/it.png +0 -0
  131. package/src/assets/images/language_flag/ja.png +0 -0
  132. package/src/assets/images/language_flag/ko.png +0 -0
  133. package/src/assets/images/language_flag/ml-IN.png +0 -0
  134. package/src/assets/images/language_flag/ne-NP.png +0 -0
  135. package/src/assets/images/language_flag/nl.png +0 -0
  136. package/src/assets/images/language_flag/no.png +0 -0
  137. package/src/assets/images/language_flag/pl.png +0 -0
  138. package/src/assets/images/language_flag/pt-BR.png +0 -0
  139. package/src/assets/images/language_flag/pt.png +0 -0
  140. package/src/assets/images/language_flag/ro.png +0 -0
  141. package/src/assets/images/language_flag/ru.png +0 -0
  142. package/src/assets/images/language_flag/sk.png +0 -0
  143. package/src/assets/images/language_flag/sl.png +0 -0
  144. package/src/assets/images/language_flag/sr.png +0 -0
  145. package/src/assets/images/language_flag/sv-SE.png +0 -0
  146. package/src/assets/images/language_flag/ta.png +0 -0
  147. package/src/assets/images/language_flag/th.png +0 -0
  148. package/src/assets/images/language_flag/tr.png +0 -0
  149. package/src/assets/images/language_flag/uk.png +0 -0
  150. package/src/assets/images/language_flag/vi.png +0 -0
  151. package/src/assets/images/language_flag/zh-CN.png +0 -0
  152. package/src/assets/images/language_flag/zh-TW.png +0 -0
  153. package/src/assets/images/no_image_user.png +0 -0
  154. package/src/assets/images/priority_icons/high.svg +3 -0
  155. package/src/assets/images/priority_icons/high_v2.svg +14 -0
  156. package/src/assets/images/priority_icons/low.svg +10 -0
  157. package/src/assets/images/priority_icons/low_v2.svg +14 -0
  158. package/src/assets/images/priority_icons/medium.svg +16 -0
  159. package/src/assets/images/priority_icons/medium_v2.svg +11 -0
  160. package/src/assets/images/priority_icons/urgent.svg +4 -0
  161. package/src/assets/images/priority_icons/urgent_v2.svg +16 -0
  162. package/src/assets/js/chat21client.js +16 -3
  163. package/src/assets/tiledesk-solo-logo.png +0 -0
  164. package/src/chat-config-mqtt.json +27 -17
  165. package/src/chat-config-pre-test.json +5 -1
  166. package/src/chat-config-pre.json +15 -3
  167. package/src/chat-config-template.json +6 -2
  168. package/src/chat-config.json +5 -1
  169. package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +61 -45
  170. package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +23 -0
  171. package/src/chat21-core/providers/mqtt/mqtt-archivedconversations-handler.ts +1 -1
  172. package/src/chat21-core/utils/constants.ts +8 -1
  173. package/src/chat21-core/utils/utils-message.ts +19 -0
  174. package/src/chat21-core/utils/utils.ts +12 -1
  175. package/src/global.scss +408 -2
  176. package/src/index.html +7 -0
  177. package/publish_pre.sh +0 -33
  178. package/publish_prod.sh +0 -33
@@ -17,7 +17,10 @@ import { AppConfigProvider } from 'src/app/services/app-config';
17
17
  styleUrls: ['./project-item.component.scss'],
18
18
  })
19
19
  export class ProjectItemComponent implements OnInit {
20
+ private logger: LoggerService = LoggerInstance.getInstance();
21
+
20
22
  @Output() projectIdEvent = new EventEmitter<string>()
23
+ @Output() openUnsevedConvsEvent = new EventEmitter<any>()
21
24
 
22
25
  private unsubscribe$: Subject<any> = new Subject<any>();
23
26
  project: any;
@@ -28,10 +31,20 @@ export class ProjectItemComponent implements OnInit {
28
31
  ROLE_IS_AGENT: boolean;
29
32
  currentUserId: string;
30
33
  public translationMap: Map<string, string>;
31
- private logger: LoggerService = LoggerInstance.getInstance();
34
+
32
35
  window_width_is_60: boolean;
33
36
  newInnerWidth: any;
34
-
37
+ avaialble_status_for_tooltip: string;
38
+ tooltipOptions = {
39
+ 'show-delay': 500,
40
+ 'tooltip-class': 'chat-tooltip',
41
+ 'theme': 'light',
42
+ 'shadow': false,
43
+ 'hide-delay-mobile': 0,
44
+ 'hideDelayAfterClick': 3000,
45
+ 'hide-delay': 200
46
+ };
47
+ IS_ON_MOBILE_DEVICE: boolean;
35
48
  constructor(
36
49
  public wsService: WebsocketService,
37
50
  public appStorageService: AppStorageService,
@@ -48,18 +61,36 @@ export class ProjectItemComponent implements OnInit {
48
61
  this.translations();
49
62
  this.listenToPostMsgs();
50
63
  this.onInitWindowWidth();
64
+
65
+ this.isOnMobileDevice()
51
66
  // console.log('[PROJECT-ITEM] - on INIT')
52
67
  }
53
68
 
69
+ isOnMobileDevice() {
70
+ this.IS_ON_MOBILE_DEVICE = false;
71
+ if (/Android|iPhone/i.test(window.navigator.userAgent)) {
72
+ this.IS_ON_MOBILE_DEVICE = true;
73
+ }
74
+ // console.log('[PROJECT-ITEM] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
75
+ return this.IS_ON_MOBILE_DEVICE;
76
+ }
77
+
78
+ openUnservedConvs() {
79
+ this.openUnsevedConvsEvent.emit('notificationsorprjctbtn')
80
+ }
81
+ openUnservedConvsAndGoToProjectList() {
82
+ this.openUnsevedConvsEvent.emit('pinbtn')
83
+ }
84
+
54
85
  getStoredTokenAndConnectWS() {
55
86
  this.tiledeskToken = this.appStorageService.getItem('tiledeskToken');
56
87
  this.logger.log('[PROJECT-ITEM] - STORED TILEDEK TOKEN ', this.tiledeskToken)
57
- this.connetWebsocket( this.tiledeskToken)
88
+ this.connetWebsocket(this.tiledeskToken)
58
89
  }
59
90
 
60
91
  connetWebsocket(tiledeskToken) {
61
-
62
- this.logger.log('[WEBSOCKET-JS] connetWebsocket called in [PROJECT-ITEM] tiledeskToken ',tiledeskToken)
92
+
93
+ this.logger.log('[WEBSOCKET-JS] connetWebsocket called in [PROJECT-ITEM] tiledeskToken ', tiledeskToken)
63
94
  const appconfig = this.appConfigProvider.getConfig();
64
95
  this.logger.log('[WEBSOCKET-JS] connetWebsocket called in [PROJECT-ITEM] wsUrl ', appconfig.wsUrl)
65
96
  const WS_URL = appconfig.wsUrl + '?token=' + tiledeskToken
@@ -78,25 +109,33 @@ export class ProjectItemComponent implements OnInit {
78
109
  window.addEventListener("message", (event) => {
79
110
  // console.log("[PROJECT-ITEM] post message event ", event);
80
111
 
81
- if (event && event.data && event.data) {
112
+ if (event && event.data) {
82
113
  // console.log("[PROJECT-ITEM] message event data ", event.data);
83
114
  if (event.data === 'hasChangedProject') {
84
115
  this.unservedRequestCount = 0;
85
116
  if (this.project) {
86
- this.webSocketJs.unsubscribe('/' + this.project.id_project._id + '/requests');
117
+ this.webSocketJs.unsubscribe('/' + this.project.id_project._id + '/requests');
87
118
  }
88
119
  this.getLastProjectStoredAndSubscToWSAvailabilityAndConversations();
89
-
90
120
  }
91
121
  }
92
122
  })
93
123
  }
94
124
 
125
+
95
126
  public translations() {
96
127
  const keys = [
97
128
  'Available',
98
129
  'Unavailable',
99
- 'Busy'
130
+ 'Busy',
131
+ 'VIEW_ALL_CONVERSATIONS',
132
+ 'CONVERSATIONS_IN_QUEUE',
133
+ 'CONVERSATION_IN_QUEUE',
134
+ 'NO_CONVERSATION_IN_QUEUE',
135
+ 'PINNED_PROJECT',
136
+ 'CHANGE_PINNED_PROJECT',
137
+ "CHANGE_TO_YOUR_STATUS_TO_AVAILABLE",
138
+ "CHANGE_TO_YOUR_STATUS_TO_UNAVAILABLE"
100
139
  ];
101
140
  this.translationMap = this.translateService.translateLanguage(keys);
102
141
  }
@@ -117,19 +156,8 @@ export class ProjectItemComponent implements OnInit {
117
156
  const actualWidth = window.innerWidth;
118
157
  this.logger.log('[PROJECT-ITEM] - ACTUAL Width ', actualWidth);
119
158
 
120
-
121
-
122
- // if (actualWidth <= 150) {
123
- // this.window_width_is_60 = true;
124
- // } else {
125
- // this.window_width_is_60 = false;
126
- // }
127
159
  }
128
160
 
129
-
130
-
131
-
132
-
133
161
  getStoredCurrenUser() {
134
162
  const storedCurrentUser = this.appStorageService.getItem('currentUser');
135
163
  this.logger.log('[PROJECT-ITEM] - STORED CURRENT USER ', storedCurrentUser)
@@ -151,8 +179,8 @@ export class ProjectItemComponent implements OnInit {
151
179
  }
152
180
 
153
181
 
154
- if (!stored_project) {
155
- this.logger.log('PROJECT-ITEM - THERE IS NOT STORED LAST PROJECT ', stored_project)
182
+ if (!stored_project || stored_project === 'undefined') {
183
+ this.logger.log('PROJECT-ITEM - THERE IS NOT STORED LAST PROJECT OR IS UNDEFINED ', stored_project)
156
184
  const tiledeskToken = this.appStorageService.getItem('tiledeskToken');
157
185
  this.logger.log('[PROJECT-ITEM] - GET PROJECTS - tiledeskToken', tiledeskToken);
158
186
  this.tiledeskService.getProjects(tiledeskToken).subscribe(projects => {
@@ -176,7 +204,7 @@ export class ProjectItemComponent implements OnInit {
176
204
  }
177
205
 
178
206
 
179
- if (stored_project) {
207
+ if (stored_project && stored_project !== 'undefined') {
180
208
  this.logger.log('PROJECT-ITEM - THERE IS STORED LAST PROJECT ', stored_project)
181
209
  if (stored_project) {
182
210
  this.project = JSON.parse(stored_project)
@@ -195,7 +223,6 @@ export class ProjectItemComponent implements OnInit {
195
223
  this.logger.log('[PROJECT-ITEM] - user_role ', user_role)
196
224
  this.projectIdEvent.emit(project.id_project._id)
197
225
 
198
-
199
226
  if (user_role === 'agent') {
200
227
  this.ROLE_IS_AGENT = true;
201
228
 
@@ -226,6 +253,13 @@ export class ProjectItemComponent implements OnInit {
226
253
  if (project.id_project._id === projectUser['id_project']) {
227
254
  project['ws_projct_user_available'] = projectUser['user_available'];
228
255
  project['ws_projct_user_isBusy'] = projectUser['isBusy']
256
+ if (this.translationMap) {
257
+ if (projectUser['user_available'] === true) {
258
+ this.avaialble_status_for_tooltip = this.translationMap.get('CHANGE_TO_YOUR_STATUS_TO_UNAVAILABLE')
259
+ } else {
260
+ this.avaialble_status_for_tooltip = this.translationMap.get('CHANGE_TO_YOUR_STATUS_TO_AVAILABLE')
261
+ }
262
+ }
229
263
  }
230
264
 
231
265
  }, (error) => {
@@ -275,7 +309,7 @@ export class ProjectItemComponent implements OnInit {
275
309
  // this.logger.log('NAVBAR - UPDATE-UNSERVED-REQUEST-COUNT request agents', r.agents)
276
310
  // *bug fix: when the user is an agent also for the unserved we have to consider if he is present in agents
277
311
  // && this.ROLE_IS_AGENT === true
278
- if (r['status'] === 100 ) {
312
+ if (r['status'] === 100) {
279
313
  if (this.hasmeInAgents(r['agents']) === true) {
280
314
  count = count + 1;
281
315
  }
@@ -0,0 +1,275 @@
1
+ <!-- *ngIf="project" -->
2
+ <div class="logo">
3
+ <!-- <a class="logo-img-wpr" [ngClass]="{'small-sidebar-logo-img-wpr' : SIDEBAR_IS_SMALL === true }">
4
+ <div class="logo-img" (click)="goToHome()" style="cursor: pointer;">
5
+ <img class="small-sidebar__logo" src="assets/tiledesk-solo-logo.png" />
6
+ </div>
7
+ </a> -->
8
+
9
+
10
+
11
+ <div id="sidebaravatar-img-wpr" class="sidebar-avatar-container tiledesk-nav-avatar" (click)="openUserDetailSidePanel()"
12
+ style="cursor: pointer;" [ngClass]="{'small-sidebar-avatar' : SIDEBAR_IS_SMALL === true, 'small-sidebar-avatar-with-avatar': SIDEBAR_IS_SMALL === true && !USER_PHOTO_PROFILE_EXIST}">
13
+
14
+ <img *ngIf="USER_PHOTO_PROFILE_EXIST" id="sidebaravatar-img" class="sidebar-avatar" [src]="photo_profile_URL"
15
+ onerror="this.src='assets/images/no_image_user.png'" />
16
+
17
+ <div *ngIf="!USER_PHOTO_PROFILE_EXIST" id="sidebaravatar-no-img" class="sidebar-avatar"
18
+ [ngStyle]="{'background': 'linear-gradient(rgb(255,255,255) -125%,' + currentUser?.fillColour + ')'}">
19
+ <span id="sidebaravatar-altenative-user-avatar" class="sidebar-altenative-user-avatar">
20
+ {{ currentUser?.fullname_initial }}
21
+ </span>
22
+ </div>
23
+
24
+ <!-- matTooltipClass="custom-mat-tooltip" matTooltip="{{ tooltip_text_for_availability_status}}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" -->
25
+ <!-- (click)="changeAvailabilityState(IS_AVAILABLE = !IS_AVAILABLE)" -->
26
+ <div id="sidebaravatar-status-icon" class="status-icon"
27
+ [ngClass]="{'is-user-online' : IS_AVAILABLE === true, 'is-user-offline' : IS_AVAILABLE === false, 'small-sidebar-status-icon' : SIDEBAR_IS_SMALL === true }">
28
+ </div>
29
+
30
+ <!-- matTooltipClass="custom-mat-tooltip" matTooltip="{{ 'Busy' | translate }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" -->
31
+ <div id="sidebaravatar-isbusy-icon-wpr" class="sidebar--isBusy-icon-wpr" [ngClass]="{'sidebar--isBusy-icon-wpr-with-image': USER_PHOTO_PROFILE_EXIST}" *ngIf="IS_BUSY === true"
32
+ style="cursor:pointer">
33
+ <span id="sidebaravatar-isbusy-icon" class="material-icons sidebar-is-busy-icon">
34
+ access_time
35
+ </span>
36
+ </div>
37
+
38
+ </div>
39
+ </div>
40
+
41
+ <div class="sidebar-wrapper">
42
+
43
+ <div class="nav-container">
44
+ <!-- [ngClass]="{'is-desktop-menu' : IS_MOBILE_MENU === false, 'is-mobile-menu' : IS_MOBILE_MENU === true }" -->
45
+ <!-- padding-bottom: 65px; -->
46
+ <ul style="margin-top: 0px;" class="nav">
47
+
48
+ <!-- ------------------------------------------- -->
49
+ <!-- CHAT -->
50
+ <!-- ------------------------------------------- -->
51
+ <li class="item-active" style="cursor: unset;" matTooltipClass="custom-mat-tooltip" matTooltip="Chat"
52
+ #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center; ">
53
+ <a class="customAncor" style="margin-right: 0px !important">
54
+ <!-- <i class="material-icons sidebar-icons">chat</i> -->
55
+ <span id="openchat-span" style="position: relative;top: 9px;vertical-align: middle;">
56
+ <svg id="openchat-svg" version="1.1" xmlns="http://www.w3.org/2000/svg"
57
+ xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 23 21"
58
+ style="enable-background:new 0 0 23 21;" xml:space="preserve"
59
+ style="width:20px;height:20px; vertical-align: middle;">
60
+ <style type="text/css">
61
+ .chat21-icon {
62
+ fill: #fff;
63
+ }
64
+ </style>
65
+ <path id="openchat-path" class="chat21-icon" d="M11.5,0.5C5.8,0.5,1.3,5,1.3,10.5c0,1.8,0.5,3.5,1.4,5l-0.8,4.3l4.4-0.8c1.5,0.9,3.3,1.4,5.3,1.4
66
+ c5.7,0,10.2-4.5,10.2-10S17.2,0.5,11.5,0.5z M11.5,17.2c-2.5,0-4.6-1.3-5.7-2.6c0.6-0.2,0.8-0.8,1.4-1c0.7,0.9,2.5,2.1,4.4,2.1
67
+ c1.9,0,3.6-1.2,4.2-2.1c0.5,0.2,0.9,0.6,1.4,0.9C16.1,15.8,14,17.2,11.5,17.2z" />
68
+ </svg>
69
+ </span>
70
+ </a>
71
+ </li>
72
+
73
+ <!-- ------------------------------------------- -->
74
+ <!-- HOME (click)="goToHome()"" -->
75
+ <!-- ------------------------------------------- -->
76
+
77
+ <li matTooltip="Home" #tooltip="matTooltip" matTooltipPosition='right'
78
+ matTooltipHideDelay="100" matTooltipClass="custom-mat-tooltip">
79
+ <a target="_self" href="{{ dashboard_home_url }}" class="customAncor">
80
+ <i class="material-icons sidebar-icons">
81
+ home
82
+ </i>
83
+ </a>
84
+ </li>
85
+
86
+
87
+ <!-- ---------------------------------- -->
88
+ <!-- Bot (click)="goToBots()" -->
89
+ <!-- ---------------------------------- -->
90
+ <ng-container *ngIf="USER_ROLE !== 'agent'">
91
+ <li id="bot-anchor-wpr" matTooltipClass="custom-mat-tooltip" matTooltip="Bots"
92
+ #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;">
93
+ <a target="_self" href="{{ dashboard_bots_url }}" id="bot-anchor" #botbtn class="customAncor" style="height: 40px;margin-right: 0px !important;">
94
+ <span class="bot-icon-wpr">
95
+ <svg version="1.1" id="Objects" xmlns="http://www.w3.org/2000/svg"
96
+ xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30"
97
+ style="enable-background:new 0 0 30 30;" xml:space="preserve" style="width: 25px;height: 25px;margin-top: 7px;">
98
+ <g>
99
+ <g>
100
+ <path class="chat-bot-icon-st0" d="M24.6,12.6c-0.1,0-0.2,0-0.3,0c-1.6-2.9-4.5-5.8-9.2-5.8c-4.7,0-7.6,2.9-9.2,5.8c-0.2,0-0.4-0.1-0.6-0.1
101
+ c-2,0-3.5,2.3-3.5,5c0,2.8,1.6,5,3.5,5c0.1,0,0.3,0,0.4,0c2.3,3.6,7,3.9,9.4,3.9c2.3,0,6.9-0.5,9.2-3.9c0.1,0,0.1,0,0.2,0
102
+ c2,0,3.5-2.3,3.5-5C28.1,14.8,26.6,12.6,24.6,12.6z M22,21.1c0,0-7.8,2.3-14.3-0.1c0,0-0.8-4.1-0.5-7.2c0,0,8.1-3.2,15.6,0.3
103
+ C22.8,14.1,23.3,19.1,22,21.1z" />
104
+ <ellipse class="chat-bot-icon-st0" cx="11.9" cy="17.4" rx="0.7" ry="1.4" />
105
+ <ellipse class="chat-bot-icon-st0" cx="18.1" cy="17.4" rx="0.7" ry="1.4" />
106
+ <path class="chat-bot-icon-st0" d="M14.5,5.3v1.1h1V5.3c0.3-0.2,0.5-0.5,0.5-0.8c0-0.5-0.4-0.9-1-0.9c-0.5,0-0.9,0.4-0.9,0.9
107
+ C14.1,4.8,14.2,5.1,14.5,5.3z" />
108
+ </g>
109
+ <rect class="chat-bot-icon-st1" width="30" height="30" />
110
+ </g>
111
+ </svg>
112
+ </span>
113
+ </a>
114
+ </li>
115
+ </ng-container>
116
+
117
+ <!-- ------------------------------------------- -->
118
+ <!-- Conversations (MONITOR) (click)="goToConversations()" -->
119
+ <!-- ------------------------------------------- -->
120
+ <!-- <ng-container *ngIf="USER_ROLE !== 'agent'"> -->
121
+ <li matTooltipClass="custom-mat-tooltip" matTooltip="Monitor"
122
+ #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;">
123
+ <a target="_self" href="{{ dashboard_convs_url }}" class="customAncor" style="height: 40px;margin-right: 0px !important;">
124
+ <!-- <i class="material-icons sidebar-icons">forum</i> -->
125
+ <span class="realtime-icon-wpr" >
126
+
127
+ <svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
128
+ viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve" style="width: 30px;height: 30px;margin-top: 5px;">
129
+
130
+ <path class="realtime-icon-st3" d="M17.9,11.6l-1.4,1.9l-3.2-5.6l-1-2l-0.2,0.2l-3.7,6.4l-3-4.8L2.7,9.9v2.4l2.4-1.8L9,16.2l3.3-6.2l4,6.7l2.7-3.3
131
+ l0.9,0c0.5-0.7,1-1.4,1.4-2L17.9,11.6z"/>
132
+ </svg>
133
+ </span>
134
+
135
+ </a>
136
+ </li>
137
+ <!-- </ng-container> -->
138
+
139
+ <!-- ------------------------------------------- -->
140
+ <!-- CONTACTS (LEADS) (click)="goToContacts()" -->
141
+ <!-- ------------------------------------------- -->
142
+ <li matTooltipClass="custom-mat-tooltip" matTooltip="{{ contacts_lbl }}"
143
+ #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;">
144
+ <a target="_self" href="{{ dashboard_contacts_url }}" class="customAncor">
145
+ <i class="material-icons sidebar-icons">contacts</i>
146
+ </a>
147
+ </li>
148
+
149
+ <!-- ------------------------------------------- -->
150
+ <!-- APPS (click)="goToAppStore()" -->
151
+ <!-- ------------------------------------------- -->
152
+ <ng-container *ngIf="isVisibleAPP && USER_ROLE !== 'agent'">
153
+ <li matTooltipClass="custom-mat-tooltip" matTooltip="{{ apps_lbl }}"
154
+ #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;">
155
+ <a target="_self" href="{{ dashboard_app_url }}" class="customAncor" style="margin-right: 0px !important;">
156
+ <!-- <i class="material-icons sidebar-icons">apps</i> -->
157
+ <!-- <i class="material-icons sidebar-icons">dashboard_customize</i> -->
158
+ <span class="dashboard-customize-icon-wpr">
159
+ <svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
160
+ viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve" style="width: 20px;height: 20px;margin-top: 10px;">
161
+ <path class="dashboard_customize-st0" d="M0,0h24v24H0V0z"/>
162
+ <path class="dashboard_customize-st1" d="M3,3h8v8H3V3z M13,3h8v8h-8V3z M3,13h8v8H3V13z M18,13h-2v3h-3v2h3v3h2v-3h3v-2h-3V13z"/>
163
+ </svg>
164
+ </span>
165
+ </a>
166
+ </li>
167
+ </ng-container>
168
+
169
+ <!-- ------------------------------------------- -->
170
+ <!-- ANALYTICS (click)="goToAnalytics()" -->
171
+ <!-- ------------------------------------------- -->
172
+ <ng-container *ngIf="isVisibleANA && USER_ROLE !== 'agent'">
173
+ <li matTooltipClass="custom-mat-tooltip" matTooltip="{{ analytics_lbl }}"
174
+ #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;" >
175
+ <a target="_self" href="{{ dashboard_analytics_url }}" class="customAncor" style="margin-right: 0px !important;">
176
+ <!-- <i class="material-icons sidebar-icons">trending_up</i> -->
177
+ <!-- <i class="material-icons sidebar-icons"> analytics </i> -->
178
+ <!-- <i class="material-icons sidebar-icons"> bar_chart </i> -->
179
+ <span class="bar-chart-icon-wpr">
180
+ <svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
181
+ viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve" style="width: 20px;height: 20px;margin-top: 10px;">
182
+ <path class="bar-chart-icon-st0" d="M0,0h24v24H0V0z"/>
183
+ <path class="bar-chart-icon-st1" d="M5,9.2h3V19H5V9.2z M10.6,5h2.8v14h-2.8V5z M16.2,13H19v6h-2.8V13z"/>
184
+ </svg>
185
+ </span>
186
+ </a>
187
+ </li>
188
+ </ng-container>
189
+
190
+ <!-- ------------------------------------------- -->
191
+ <!-- ACTIVITIES (click)="goToActivities()" -->
192
+ <!-- ------------------------------------------- -->
193
+ <ng-container *ngIf="isVisibleACT">
194
+ <li *ngIf="USER_ROLE !== 'agent'" matTooltipClass="custom-mat-tooltip"
195
+ matTooltip="{{ activities_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;">
196
+ <a target="_self" href="{{ dashboard_activities_url }}" class="customAncor">
197
+ <i class="material-icons sidebar-icons">assignment</i>
198
+ </a>
199
+ </li>
200
+ </ng-container>
201
+
202
+
203
+ <!-- ------------------------------------------- -->
204
+ <!-- REQUESTS HISTORY (click)="goToHistory()" -->
205
+ <!-- ------------------------------------------- -->
206
+ <li matTooltipClass="custom-mat-tooltip" matTooltip="{{ history_lbl }}"
207
+ #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;">
208
+ <a target="_self" href="{{ dashboard_history_url }}" class="customAncor">
209
+ <i class="material-icons sidebar-icons">history</i>
210
+ </a>
211
+ </li>
212
+
213
+ <!-- ----------------------------------------------------------------------------------- -->
214
+ <!-- SETTINGS // old: goToSettings_CannedResponses() *ngIf="USER_ROLE !== 'agent'" (click)="goToWidgetSetUpOrToCannedResponses()" -->
215
+ <!-- ----------------------------------------------------------------------------------- -->
216
+ <li *ngIf="USER_ROLE !== 'agent'" matTooltipClass="custom-mat-tooltip"
217
+ matTooltip="{{ settings_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;">
218
+ <a target="_self" href="{{ dashboard_settings_url }}" class="customAncor">
219
+ <i class="material-icons sidebar-icons">settings</i>
220
+ </a>
221
+ </li>
222
+
223
+
224
+ <!-- [_prjct_profile_name]="_prjct_profile_name" [plan_subscription_is_active]="plan_subscription_is_active"
225
+ [plan_name]="plan_name"
226
+ [plan_type]="plan_type"
227
+ [isVisiblePAY]="isVisiblePAY"
228
+ [prjct_name]="prjct_name" -->
229
+ <!-- HAS_CLICKED_OPEN_USER_DETAIL {{ HAS_CLICKED_OPEN_USER_DETAIL }} -->
230
+ <!-- [HAS_CLICKED_OPEN_USER_DETAIL]='HAS_CLICKED_OPEN_USER_DETAIL' -->
231
+ <!-- tabindex="-1" style="z-index: 20001;" -->
232
+
233
+
234
+ <!-- <app-sidebar-user-details
235
+ (onCloseUserDetailsSidebar)='onCloseUserDetailsSidebar($event)'>
236
+ </app-sidebar-user-details> -->
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+ </ul>
274
+ </div>
275
+ </div>
@@ -0,0 +1,79 @@
1
+ ::ng-deep .custom-mat-tooltip {
2
+ background-color: #2d323e !important;
3
+ font-size: 12px !important;
4
+ border-radius: 2px !important;
5
+ font-family: 'Poppins' !important;
6
+ }
7
+
8
+ .sidebar-is-busy-icon {
9
+ font-size: 12px;
10
+ color: #feb92c;
11
+ background-color: #2d323e;
12
+ border-radius: 50%;
13
+ }
14
+
15
+ .chat-bot-icon-st0 {
16
+ // fill: #a9afbb;
17
+ fill: #647491
18
+ }
19
+ .chat-bot-icon-st1 {
20
+ fill: none;
21
+ }
22
+
23
+ .realtime-icon-st3 {
24
+ fill: #647491
25
+ }
26
+
27
+ .dashboard_customize-st0{
28
+ fill:none;
29
+ }
30
+ .dashboard_customize-st1{
31
+ fill:#647491;
32
+ }
33
+
34
+ .bar-chart-icon-st0{
35
+ fill:none;
36
+ }
37
+
38
+ .bar-chart-icon-st1{
39
+ fill:#647491;
40
+ }
41
+
42
+ #bot-anchor-wpr:hover > #bot-anchor > .bot-icon-wpr > svg > g > g > .chat-bot-icon-st0 {
43
+ fill: #a9afbb ;
44
+ }
45
+
46
+ li:hover > a > .realtime-icon-wpr > svg > path {
47
+ fill: #a9afbb;
48
+ }
49
+
50
+ li:hover > a > .dashboard-customize-icon-wpr > svg > .dashboard_customize-st1 {
51
+ fill: #a9afbb;
52
+ }
53
+
54
+ li:hover > a > .bar-chart-icon-wpr > svg > .bar-chart-icon-st1{
55
+ fill: #a9afbb;
56
+ }
57
+
58
+ #sidebaravatar-altenative-user-avatar {
59
+ // line-height: 2.9;
60
+ font-weight: 400;
61
+ font-family: "Poppins";
62
+ left: 50%;
63
+ top: 50%;
64
+ -webkit-transform: translate(-50%, -50%);
65
+ transform: translate(-50%, -50%);
66
+ position: absolute;
67
+ font-size:14px
68
+ }
69
+
70
+ // #sidebar_wrapper::-webkit-scrollbar {
71
+ // width: 6px;
72
+ // }
73
+ // #sidebar_wrapper::-webkit-scrollbar-track {
74
+ // background-color: #1c2b45;
75
+ // }
76
+ // #sidebar_wrapper::-webkit-scrollbar-thumb {
77
+ // background-color: #3c485b;
78
+ // border-radius: 3px;
79
+ // }
@@ -0,0 +1,24 @@
1
+ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
+ import { IonicModule } from '@ionic/angular';
3
+
4
+ import { SidebarComponent } from './sidebar.component';
5
+
6
+ describe('SidebarComponent', () => {
7
+ let component: SidebarComponent;
8
+ let fixture: ComponentFixture<SidebarComponent>;
9
+
10
+ beforeEach(async(() => {
11
+ TestBed.configureTestingModule({
12
+ declarations: [ SidebarComponent ],
13
+ imports: [IonicModule.forRoot()]
14
+ }).compileComponents();
15
+
16
+ fixture = TestBed.createComponent(SidebarComponent);
17
+ component = fixture.componentInstance;
18
+ fixture.detectChanges();
19
+ }));
20
+
21
+ it('should create', () => {
22
+ expect(component).toBeTruthy();
23
+ });
24
+ });