@chat21/chat21-ionic 3.4.32-rc9 → 3.4.34

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 (56) hide show
  1. package/CHANGELOG.md +16 -127
  2. package/angular.json +0 -1
  3. package/package.json +1 -1
  4. package/src/app/app.component.html +1 -3
  5. package/src/app/app.component.ts +11 -70
  6. package/src/app/components/canned-response/canned-response.component.html +2 -2
  7. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +0 -23
  8. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +0 -30
  9. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +7 -26
  10. package/src/app/components/conversation-info/info-content/info-content.component.ts +2 -2
  11. package/src/app/components/navbar/navbar.component.ts +5 -5
  12. package/src/app/components/project-item/project-item.component.ts +36 -35
  13. package/src/app/components/sidebar/sidebar.component.html +1 -1
  14. package/src/app/components/sidebar/sidebar.component.ts +5 -0
  15. package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +15 -7
  16. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +3 -3
  17. package/src/app/pages/conversation-detail/conversation-detail.page.html +1 -3
  18. package/src/app/pages/conversation-detail/conversation-detail.page.ts +3 -45
  19. package/src/app/pages/conversations-list/conversations-list.page.ts +1 -7
  20. package/src/app/services/global-settings/global-settings.service.ts +3 -11
  21. package/src/app/services/nav-proxy.service.ts +1 -0
  22. package/src/app/services/projects/project.service.ts +1 -1
  23. package/src/app/services/tiledesk/tiledesk.service.ts +0 -17
  24. package/src/app/services/triggerEvents/triggerEvents.ts +0 -29
  25. package/src/app/services/websocket/websocket-js.ts +535 -61
  26. package/src/app/services/websocket/websocket.service.ts +11 -10
  27. package/src/app/utils/globals.ts +0 -2
  28. package/src/app/utils/utils.ts +0 -1
  29. package/src/assets/i18n/ar.json +2 -7
  30. package/src/assets/i18n/az.json +2 -7
  31. package/src/assets/i18n/de.json +2 -7
  32. package/src/assets/i18n/en.json +2 -7
  33. package/src/assets/i18n/es.json +2 -7
  34. package/src/assets/i18n/fr.json +2 -7
  35. package/src/assets/i18n/it.json +4 -9
  36. package/src/assets/i18n/kk.json +2 -7
  37. package/src/assets/i18n/pt.json +2 -7
  38. package/src/assets/i18n/ru.json +2 -7
  39. package/src/assets/i18n/sr.json +2 -7
  40. package/src/assets/i18n/sv.json +2 -7
  41. package/src/assets/i18n/tr.json +2 -7
  42. package/src/assets/i18n/uk.json +2 -7
  43. package/src/assets/i18n/uz.json +2 -8
  44. package/src/assets/js/chat21client.js +0 -36
  45. package/src/assets/test.html +2 -5
  46. package/src/chat-config-template.json +0 -1
  47. package/src/chat-config.json +0 -1
  48. package/src/chat21-core/models/projectUsers.ts +21 -12
  49. package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +1 -1
  50. package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +1 -1
  51. package/src/chat21-core/utils/utils.ts +2 -16
  52. package/src/app/services/websocket/websocket-js_old.ts +0 -578
  53. package/src/app/services/websocket/websocket.worker.ts +0 -242
  54. package/src/assets/js/agentDesktop-sdk.js +0 -55
  55. package/src/assets/js/mqtt-keepalive-worker.js +0 -53
  56. package/src/chat21-core/models/project_user.ts +0 -26
package/CHANGELOG.md CHANGED
@@ -5,9 +5,19 @@
5
5
  *Dario De Pascalis* <br>
6
6
  *Giovanni Troisi* <br>
7
7
  *Nicola Lanzilotto* <br>
8
- ### **Copyrigth**:
8
+ ### **Copyright**:
9
9
  *Tiledesk SRL*
10
10
 
11
+ # 3.4.34 in PROD
12
+ - **added**: role handling in the affected components (sidebar, navbar, conversations list, conversation detail) using shared `hasRole` checks and `ProjectUser.rolePermissions`.
13
+
14
+ # 3.4.33 in PROD
15
+
16
+ # 3.4.32 in PROD
17
+
18
+ # 3.4.32-rc10
19
+ - **bug-fixed**: minor ui fix
20
+
11
21
  # 3.4.32-rc9
12
22
  - **added**: sidebar-user-details — MutationObserver to close dropdowns when user details panel is hidden (watches #user-details class); cleanup in ngOnDestroy to prevent memory leaks.
13
23
  - **changed**: sidebar-user-details — refined closeDropdowns for better dropdown management when panel closes.
@@ -26,7 +36,7 @@
26
36
  - **added**: conversations-list — postMessage to hosting app on conversation selection (event: `onConversationChanged`, data: full conversation object).
27
37
 
28
38
  # 3.4.32-rc7
29
- - **addded**: ability to change availability status for each project the logged-in user in sidebar-user-detail
39
+ - **added**: ability to change availability status per project for the logged-in user in sidebar-user-detail
30
40
 
31
41
  # 3.4.32-rc6
32
42
  - **bug-fixed**: convertRequestToConversation timestamp wrong unit
@@ -54,119 +64,17 @@
54
64
  - **changed**: API for upload a file/image into chat
55
65
 
56
66
  # 3.4.30 in PROD
57
-
58
- # 3.4.30-rc3
59
67
  - **changed**: when the app is in background, play a sound whenever a new message arrives.
60
68
 
61
69
  # 3.4.29 in PROD
62
70
  - **bug-fixed**: web (Chrome >= 144) `ion-content` stopped scrolling on some pages (conversation list / contacts directory / unassigned); removed the forced `--overflow: hidden` and handled scrolling on Ionic’s internal scroll container via `ion-content::part(scroll)`
63
71
 
64
- # 3.4.29-rc2
65
- - **changed**: minor updates on API to upload file/image into chat
66
-
67
- # 3.4.29-rc1
68
- - **changed**: API for upload a file/image into chat
69
-
70
-
71
72
  # 3.4.28 in PROD
72
73
  - **bug-fixed**: cannot do project subscription if last_project object is not a project_user obj
73
74
 
74
75
  # 3.4.27 in PROD
75
76
  - **bug-fixed**: cannot find route if userFullname contains /
76
77
 
77
- # 3.4.29-rc1
78
- - **bug-fixed**: web (Chrome >= 144) `ion-content` stopped scrolling on some pages (conversation list / contacts directory / unassigned); removed the forced `--overflow: hidden` and handled scrolling on Ionic’s internal scroll container via `ion-content::part(scroll)`
79
-
80
- # 3.4.28-rc1
81
- - **bug-fixed**: cannot do project subscription if last_project object is not a project_user obj
82
-
83
- # 3.4.27-rc26
84
- - **bug-fixed**: wss push requests twice
85
-
86
- # 3.4.27-rc25
87
- - **bug-fixed**: projectUserService is not initialized
88
-
89
- # 3.4.27-rc24
90
- - **added**: implementation of multiple message in wss onmessage
91
-
92
- # 3.4.27-rc23
93
- - **added**: keepAlive worker for MQTT connection
94
-
95
- # 3.4.27-rc22
96
- - **added**: new WsWorker to manage iframe chrome throttling while tab is in background or hidden
97
-
98
- # 3.4.27-rc21
99
- - **changed**: new wss reconnect and timeout keepalive
100
- - **bug-fixed**: cannot route if senderFullaname contains /
101
-
102
- # 3.4.27-rc20
103
- - **added**: onOpenTicketExternally event in triggerEvents service
104
-
105
- # 3.4.27-rc19
106
- - **added**: window.parent['openTicketOnHDA']
107
-
108
- # 3.4.27-rc18
109
- - **added**: triggerOnUpdateNewConversationBadge to update conversation badge count in parent component
110
-
111
- # 3.4.27-rc17
112
- - **bug-fixed**: setNotification not called when click on a conversation
113
-
114
- # 3.4.27-rc16
115
- - **bug-fixed**: setNotification not called when resolve a conversation
116
-
117
- # 3.4.27-rc15
118
- - **changed**: /images with /img in assets folder
119
-
120
- # 3.4.27-rc14
121
- - **added**: DISPLAY_EDIT_PROFILE brand variable
122
- - **bug-fixed**: emojii is sent also if is not allowed
123
-
124
- # 3.4.27-rc13
125
- - **added**: ability to mantain logout parameter when redirect to dashboard urls from sidebar component
126
-
127
- # 3.4.27-rc12
128
- - **added**: ability to manage logOut option in sidebar-user-detail with tiledesk_logOut url query params
129
-
130
- # 3.4.27-rc11
131
- - **bug-fixed**: fixed infinite loading in contact list
132
-
133
- # 3.4.27-rc10
134
- - **added**: ability to manage header-conversation-list with roles
135
- - **bug-fixed**: members in group list not loaded
136
-
137
- # 3.4.27-rc9
138
- - **bug-fixed**: Scrolling to the last message when opening a conversation
139
- - **bug-fixed**: Loading in the conversation list disabled when removing the last conversation
140
-
141
- # 3.4.27-rc8
142
- - **added**: ability to open ticket to external service
143
- - **added**: ticketSection env var
144
-
145
- # 3.4.27-rc7
146
- - **bug-fixed**: Scrolling to the last message when opening a conversation
147
- - **bug-fixed**: Loading in the conversation list disabled when removing the last conversation
148
-
149
- # 3.4.27-rc6
150
- - **bug-fixed**: user for dashboard app is incorrect
151
-
152
- # 3.4.27-rc5
153
- - **added**: managed roles in sidebar e navbar
154
- - **bug-fixed**: projectId and supportMode url is not saved in localstorage
155
-
156
- # 3.4.27-rc4
157
- - **bug-fixed**: extractUrls function is not able to detect url start with www or without https/http
158
- - **bug-fixed**: if message is sent with keydown, error on domain check is not showed
159
-
160
- # 3.4.27-rc3
161
- - **bug-fixed**: cannot set user availability if supportMode is enabled and tiledesk_projectID url params is set
162
-
163
- # 3.4.27-rc2
164
- - **bug-fixed**: cannede responses role
165
-
166
- # 3.4.27-rc1
167
- - **added**: managed canned responses with roles
168
- - **changed**: name in info mesage
169
-
170
78
  # 3.4.26 in PROD
171
79
 
172
80
  # 3.4.26-rc2
@@ -174,8 +82,7 @@
174
82
 
175
83
  # 3.4.26-rc1
176
84
  - **added**: tiledesk_projectID query param to manage user status
177
- - **added**: token to managane ticket feature
178
- - **added**: getOsCode login into utils.ts
85
+ - **added**: token to manage ticket feature
179
86
 
180
87
  # 3.4.25 in PROD
181
88
  - **changed**: pipe marked to support malicious text input
@@ -198,24 +105,6 @@
198
105
  # 3.4.22 in PROD
199
106
  - **added**: managed allowed_upload_extentions from project settings
200
107
 
201
- # 3.4.21-rc6
202
- - **added**: managed allowed_upload_extentions from project settings
203
-
204
- # 3.4.21-rc5
205
- - **added**: setConversation as read when agent click on it
206
-
207
- # 3.4.21-rc4
208
- - **added**: ability to init and decrement new conversation count badge
209
-
210
- # 3.4.21-rc3
211
- - **changed**: badge notification for agentDesktop
212
-
213
- # 3.4.21-rc2
214
- - **added**: count in newConversation handler event
215
-
216
- # 3.4.21-rc1
217
- - **added**: implement badge notification for agentDesktop sw when new conversation is assigned to logged agent
218
-
219
108
  # 3.4.21 in PROD
220
109
 
221
110
  # 3.4.20 in PROD
@@ -229,8 +118,8 @@
229
118
  - **bug-fixed**: minor fix on ion-texarea element with allowed url domain
230
119
 
231
120
  # 3.4.19-rc1
232
- - **added**: ability to check for if emoji is allowd to be sent in message textarea
233
- - **added**: ability to check for if url domain is allowd to be sent in message textarea
121
+ - added: ability to check for if emoji is allowd to be sent in message textarea
122
+ - added: ability to check for if url domain is allowd to be sent in message textarea
234
123
 
235
124
  # 3.4.18 in PROD
236
125
 
@@ -1805,7 +1694,7 @@
1805
1694
  - bug-fix: info conversation right sidebar
1806
1695
 
1807
1696
  # 3.0.8
1808
- - new: added Scrivi a...
1697
+ - new: added “Write to…” (contact list label)
1809
1698
 
1810
1699
  # 3.0.7
1811
1700
  - bug fix: navigation and routing
package/angular.json CHANGED
@@ -32,7 +32,6 @@
32
32
  "src/chat-config-template.json",
33
33
  "src/chat-config.json",
34
34
  "src/chat-config-dev.json",
35
- "src/chat-config-native-ar.json",
36
35
  {
37
36
  "glob": "**/*",
38
37
  "input": "src/assets",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
3
  "author": "Tiledesk SRL",
4
- "version": "3.4.32-rc9",
4
+ "version": "3.4.34",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -21,9 +21,7 @@
21
21
  </div> -->
22
22
 
23
23
  <div class="user-details-sidebar" [ngClass]="{'hide-sidebar': IS_ONLINE === false || IS_ON_MOBILE_DEVICE || SUPPORT_MODE === false}">
24
- <app-sidebar-user-details
25
- [logOut]="g?.logOut">
26
- </app-sidebar-user-details>
24
+ <app-sidebar-user-details> </app-sidebar-user-details>
27
25
  </div>
28
26
 
29
27
  <ion-split-pane when="md" contentId="main" [ngClass]="{'mobile': IS_ON_MOBILE_DEVICE, 'sidebar-hidden': IS_ON_MOBILE_DEVICE || SUPPORT_MODE === false}">
@@ -44,8 +44,6 @@ import { conversationToMessage } from 'src/chat21-core/utils/utils-message';
44
44
  import { ProjectService } from './services/projects/project.service';
45
45
  import { ContactsService } from './services/contacts/contacts.service';
46
46
  import { TiledeskService } from './services/tiledesk/tiledesk.service';
47
- import { Project } from 'src/chat21-core/models/projects';
48
- import { BRAND_BASE_INFO } from './utils/utils-resources';
49
47
  import { ProjectUsersService } from './services/project_users/project-users.service';
50
48
 
51
49
  @Component({
@@ -171,7 +169,6 @@ export class AppComponent implements OnInit {
171
169
  }, { capture: true });
172
170
  }
173
171
 
174
-
175
172
  listenChatAlreadyOpenWithoutParamsInMobileMode() {
176
173
  this.events.subscribe('noparams:mobile', (isAlreadyOpenInMobileMode) => {
177
174
  // console.log('[APP-COMP] Chat is Already Open In Mobile Mode ', isAlreadyOpenInMobileMode)
@@ -300,10 +297,6 @@ export class AppComponent implements OnInit {
300
297
  this.zone = new NgZone({}); // a cosa serve?
301
298
 
302
299
  this.SUPPORT_MODE = this.g.supportMode
303
- this.logger.info('[APP-COMP] this.SUPPORT_MODE', this.SUPPORT_MODE)
304
-
305
- BRAND_BASE_INFO['LOGOUT_ENABLED'] = this.g.logOut
306
- this.logger.info('[APP-COMP] this.logOut', BRAND_BASE_INFO['LOGOUT_ENABLED'])
307
300
  }
308
301
 
309
302
  });
@@ -340,7 +333,7 @@ export class AppComponent implements OnInit {
340
333
 
341
334
  listenToPostMsgs() {
342
335
  window.addEventListener("message", (event) => {
343
- // this.logger.log("[APP-COMP] message event ", event);
336
+ this.logger.log("[APP-COMP] message event ", event);
344
337
 
345
338
  if (event && event.data && event.data.action && event.data.parameter) {
346
339
  if (event.data.action === 'openJoinConversationModal') {
@@ -542,10 +535,10 @@ export class AppComponent implements OnInit {
542
535
  this.statusBar.styleLightContent();
543
536
  this.navService.init(this.sidebarNav, this.detailNav);
544
537
  this.tiledeskAuthService.initialize(this.appConfigProvider.getConfig().apiUrl);
545
-
538
+ this.messagingAuthService.initialize();
539
+
546
540
  // this.currentUserService.initialize();
547
541
  this.chatManager.initialize();
548
- this.messagingAuthService.initialize();
549
542
  this.presenceService.initialize(this.tenant);
550
543
  this.typingService.initialize(this.tenant);
551
544
 
@@ -871,8 +864,7 @@ export class AppComponent implements OnInit {
871
864
  // console.log('[APP-COMP] PLATFORM', PLATFORM_MOBILE, 'route.snapshot', this.route.snapshot);
872
865
  if (!IDConv) {
873
866
  this.logger.log('[APP-COMP] navigateByUrl -- conversations-list');
874
- const queryString = window.location.search; // restituisce ad es. "?jwt=...&tiledesk_supportMode=false"
875
- this.router.navigateByUrl('conversations-list' + queryString);
867
+ this.router.navigateByUrl('conversations-list')
876
868
  }
877
869
  // this.router.navigateByUrl(pageUrl);
878
870
  // this.navService.setRoot(ConversationListPage, {});
@@ -1123,19 +1115,13 @@ export class AppComponent implements OnInit {
1123
1115
  if (conversation && conversation.is_new === true && this.isInitialized) {
1124
1116
  this.manageTabNotification('conv_added', conversation.sound)
1125
1117
  this.manageEventNewConversation(conversation)
1126
- //UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
1127
- this.triggerOnUpdateNewConversationBadge(this.conversationsHandlerService.countIsNew());
1128
1118
  }
1129
1119
  if(conversation) this.updateConversationsOnStorage()
1130
1120
  });
1131
1121
 
1132
1122
  this.conversationsHandlerService.conversationChanged.subscribe((conversation: ConversationModel) => {
1133
1123
  // console.log('[APP-COMP] ***** subscribeConversationChanged conversation: ', conversation);
1134
- if(conversation){
1135
- this.updateConversationsOnStorage();
1136
- //UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
1137
- this.triggerOnUpdateNewConversationBadge(this.conversationsHandlerService.countIsNew());
1138
- }
1124
+ if(conversation) this.updateConversationsOnStorage();
1139
1125
  });
1140
1126
 
1141
1127
  this.conversationsHandlerService.conversationChangedDetailed.subscribe((changes: {value: ConversationModel, previousValue: ConversationModel}) => {
@@ -1163,8 +1149,6 @@ export class AppComponent implements OnInit {
1163
1149
  if(conversation) {
1164
1150
  this.updateConversationsOnStorage();
1165
1151
  this.segmentResolved(conversation);
1166
- //UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
1167
- this.triggerOnUpdateNewConversationBadge(this.conversationsHandlerService.countIsNew());
1168
1152
  this.router.navigateByUrl('conversation-detail/'); //redirect to basePage
1169
1153
  }
1170
1154
  });
@@ -1198,22 +1182,19 @@ export class AppComponent implements OnInit {
1198
1182
  this.chatManager.setCurrentUser(currentUser);
1199
1183
 
1200
1184
  this.tiledeskService.initialize(serverBaseURL)
1201
- this.projectUsersService.initialize(serverBaseURL)
1202
1185
  this.projectService.initialize(serverBaseURL)
1186
+ this.projectUsersService.initialize(serverBaseURL)
1203
1187
  this.contactsService.initialize(serverBaseURL)
1204
1188
 
1205
1189
 
1206
1190
  this.events.publish('go:online', true);
1207
1191
  // this.chatManager.startApp();
1208
1192
 
1209
-
1210
- //INIT WEBSOCKET
1211
- this.connetWebsocket(tiledeskToken)
1212
-
1213
1193
  // ----------------------------------------------
1214
1194
  // PUSH NOTIFICATIONS
1215
1195
  // ----------------------------------------------
1216
1196
  const pushEngine = this.appConfigProvider.getConfig().pushEngine
1197
+
1217
1198
  if (currentUser) {
1218
1199
  if (pushEngine && pushEngine !== 'none') {
1219
1200
  this.notificationsService.getNotificationPermissionAndSaveToken(currentUser.uid);
@@ -1235,24 +1216,6 @@ export class AppComponent implements OnInit {
1235
1216
  } catch (err) {
1236
1217
  this.logger.error('[APP-COMP] -> error:', err);
1237
1218
  }
1238
-
1239
- // ----------------------------------------------
1240
- // LAST PROJECT FROM URL
1241
- // ----------------------------------------------
1242
- if(this.g.projectID){
1243
- this.projectService.getProjects().subscribe({ next: (projects: Project[]) => {
1244
- const project = projects.find(prjct => prjct.id_project._id === this.g.projectID)
1245
- if(project){
1246
- this.logger.log('[APP-COMP] - GET PROJECT - project found with this.projectID', project);
1247
- localStorage.setItem('last_project', JSON.stringify(project))
1248
- this.events.publish('storage:last_project', project)
1249
- }
1250
- }, error: (error) => {
1251
- this.logger.log('[APP-COMP] - GET PROJECT - project NOT found with this.projectID', this.g.projectID, error);
1252
- }, complete: () => {
1253
-
1254
- }});
1255
- }
1256
1219
  }
1257
1220
 
1258
1221
 
@@ -1293,21 +1256,9 @@ export class AppComponent implements OnInit {
1293
1256
  }
1294
1257
 
1295
1258
  goToDashboardLogin(){
1296
- // let DASHBOARD_URL = this.appConfigProvider.getConfig().dashboardUrl + '#/login'
1297
- // const myWindow = window.open(DASHBOARD_URL, '_self');
1298
- // myWindow.focus();
1299
- }
1300
-
1301
- connetWebsocket(tiledeskToken) {
1302
-
1303
- this.logger.log('[WEBSOCKET-JS] connetWebsocket called in [PROJECT-ITEM] tiledeskToken ', tiledeskToken)
1304
- const appconfig = this.appConfigProvider.getConfig();
1305
- this.logger.log('[WEBSOCKET-JS] connetWebsocket called in [PROJECT-ITEM] wsUrl ', appconfig.wsUrl)
1306
- const WS_URL = appconfig.wsUrl + '?token=' + tiledeskToken
1307
- this.logger.log('[WEBSOCKET-JS] connetWebsocket called in [PROJECT-ITEM] wsUrl ', WS_URL)
1308
- this.webSocketJs.init(
1309
- WS_URL
1310
- );
1259
+ let DASHBOARD_URL = this.appConfigProvider.getConfig().dashboardUrl + '#/login'
1260
+ const myWindow = window.open(DASHBOARD_URL, '_self');
1261
+ myWindow.focus();
1311
1262
  }
1312
1263
 
1313
1264
 
@@ -1397,7 +1348,6 @@ export class AppComponent implements OnInit {
1397
1348
 
1398
1349
  subscribeUnservedRequestCount = (unservedRequestCount) => {
1399
1350
  if(unservedRequestCount && unservedRequestCount > 0){
1400
- this.logger.debug("subscribeUnservedRequestCount appIsInitialized::::",this.isInitialized)
1401
1351
  if(this.isInitialized){
1402
1352
  this.manageTabNotification('conv_unassigned', true, unservedRequestCount) //sound and alternate title
1403
1353
  }
@@ -1406,8 +1356,7 @@ export class AppComponent implements OnInit {
1406
1356
 
1407
1357
  subscribeConversationSelected= (conversation: ConversationModel) => {
1408
1358
  if(conversation && conversation.is_new){
1409
- this.audio_NewConv.pause();
1410
- this.conversationsHandlerService.setConversationRead(conversation.uid)
1359
+ this.audio_NewConv.pause()
1411
1360
  }
1412
1361
  }
1413
1362
 
@@ -1483,9 +1432,6 @@ export class AppComponent implements OnInit {
1483
1432
  this.logger.debug('[APP-COMP]-CONVS - INIT CONV CONVS 2', conversations)
1484
1433
  this.events.publish('appcompSubscribeToConvs:loadingIsActive', false);
1485
1434
  }
1486
-
1487
- //INIT NOTIFICATION FOR NEW CONVERSATION COUNT
1488
- this.triggerOnUpdateNewConversationBadge(this.conversationsHandlerService.countIsNew());
1489
1435
  });
1490
1436
 
1491
1437
  }
@@ -1768,11 +1714,6 @@ export class AppComponent implements OnInit {
1768
1714
  this.triggerEvents.triggerOnInit(detailOBJ)
1769
1715
  }
1770
1716
 
1771
- private triggerOnUpdateNewConversationBadge(count: number){
1772
- const detailOBJ = { event: 'onUpdateNewConversationBadge', count: count.toString() }
1773
- this.triggerEvents.triggerOnUpdateNewConversationBadge(detailOBJ)
1774
- }
1775
-
1776
1717
 
1777
1718
  // @HostListener('mouseenter', ['$event'])
1778
1719
  // onMouseEnter(event: any) {
@@ -9,8 +9,8 @@
9
9
  <ion-input [class.readonly]="canned?.disabled" [readonly]="canned?.disabled" type="text" [(ngModel)]="canned.title" class="title" id="{{'titleCanned_'+canned._id}}" #title></ion-input>
10
10
  <ion-input [class.readonly]="canned?.disabled" [readonly]="canned?.disabled" type="text" [(ngModel)]="canned.text" class="text truncate"></ion-input>
11
11
  </div>
12
- <!-- <ion-icon class="canned-item-icon" name="pin" src="assets/img/pin.svg" slot=end *ngIf="canned.pinned" (click)="onPinCanned(canned, $event)"></ion-icon>
13
- <ion-icon class="canned-item-icon" name="pin" src="assets/img/pinned.svg" slot=end (click)="onUnPinCanned(canned, $event)"></ion-icon> -->
12
+ <!-- <ion-icon class="canned-item-icon" name="pin" src="assets/images/pin.svg" slot=end *ngIf="canned.pinned" (click)="onPinCanned(canned, $event)"></ion-icon>
13
+ <ion-icon class="canned-item-icon" name="pin" src="assets/images/pinned.svg" slot=end (click)="onUnPinCanned(canned, $event)"></ion-icon> -->
14
14
  <ion-icon class="canned-item-icon" name="checkmark-sharp" slot=end *ngIf="(canned.createdBy === loggedUser.uid && !canned.disabled) && roles[PERMISSIONS.CANNED_RESPONSES_UPDATE]" (click)="onConfirmEditCanned(canned, $event)"></ion-icon>
15
15
  <ion-icon class="canned-item-icon" name="pencil-sharp" slot=end *ngIf="(canned.createdBy === loggedUser.uid && canned.disabled) && roles[PERMISSIONS.CANNED_RESPONSES_UPDATE]" (click)="onEditCanned(canned, $event)"></ion-icon>
16
16
  <ion-icon class="canned-item-icon" name="trash-bin-outline" slot=end *ngIf="(canned.createdBy === loggedUser.uid) && roles[PERMISSIONS.CANNED_RESPONSES_DELETE]" (click)="onDeleteCanned(canned, $event)"></ion-icon>
@@ -22,13 +22,6 @@
22
22
  {{translationMap?.get('WHATSAPP.LABEL_TEMPLATES')}}
23
23
  </ion-button>
24
24
  </div>
25
- <!-- OPEN TICKET -->
26
- <div *ngIf="ticketSection" class="section-option" id="template" tooltip="{{translationMap?.get('TICKET.OPEN_TICKET')}}" placement="top">
27
- <ion-button fill="clear" [class.active]="section==='ticket'" (click)="onOpenSection('ticket')" [disabled]="channelType === 'direct'">
28
- <ion-icon name="ticket"></ion-icon>
29
- {{translationMap?.get('TICKET.OPEN_TICKET')}}
30
- </ion-button>
31
- </div>
32
25
  </div>
33
26
 
34
27
  <div class="footerContainerAlert">
@@ -57,22 +50,6 @@
57
50
  </ion-col>
58
51
  </ion-row>
59
52
 
60
- <ion-row id="ticket" [style.display]="section==='ticket'? 'flex': 'none'">
61
- <ion-col col-auto>
62
- <div class="placeholder">{{translationMap.get('TICKET.DESCRIPTION')}}</div>
63
- <div class="buttons-container">
64
- <ion-button name="add" size="small" (click)="onClickTicket('open')">
65
- <ion-icon name="add"></ion-icon>
66
- {{translationMap?.get('TICKET.CONFIRM')}}
67
- </ion-button>
68
- <ion-button size="small" color="danger" (click)="onClickTicket('close')">
69
- <ion-icon name="close"></ion-icon>
70
- {{translationMap?.get('TICKET.CLOSE')}}
71
- </ion-button>
72
- </div>
73
- </ion-col>
74
- </ion-row>
75
-
76
53
  <ion-row id="message-text-area" [style.display]="section==='chat' || section ==='templates' || section ==='copilot'? 'flex': 'none'">
77
54
 
78
55
  <ion-col col-auto style="display: flex;">
@@ -183,36 +183,6 @@
183
183
  }
184
184
  }
185
185
 
186
- #ticket{
187
- text-align: center;
188
- font-size: 12px;
189
-
190
- .buttons-container{
191
- display: flex;
192
- justify-content: center;
193
- gap: 10px;
194
-
195
- ion-button{
196
- font-size: 12px;
197
- --padding-top: 4px;
198
- --padding-bottom: 4px;
199
- --padding-start: 6px;
200
- --padding-end: 6px;
201
- --ripple-color: transparent;
202
- text-transform: unset;
203
- height: auto;
204
-
205
- ion-icon{
206
- margin-right: 4px;
207
- }
208
-
209
- &[name="add"]{
210
- --background: var(--basic-blue);
211
- }
212
- }
213
- }
214
- }
215
-
216
186
  #fileInput {
217
187
  position: absolute;
218
188
  opacity: 0;
@@ -63,20 +63,17 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
63
63
  @Input() emailSection: boolean;
64
64
  @Input() offlineMsgEmail: boolean;
65
65
  @Input() whatsappTemplatesSection: boolean;
66
- @Input() ticketSection: boolean
67
66
  @Input() isOpenInfoConversation: boolean;
68
67
  @Input() cannedSection: boolean;
69
68
  @Input() stylesMap: Map<string, string>;
70
69
  @Input() translationMap: Map<string, string>;
71
70
  @Input() dropEvent: any;
72
71
  @Input() disableTextarea: boolean;
73
- @Input() roles: Array<string>;
74
72
  @Output() eventChangeTextArea = new EventEmitter<{msg: string, offsetHeight: number}>();
75
73
  @Output() eventSendMessage = new EventEmitter<{msg: string, type: string, metadata?: Object, attributes?: Object}>();
76
74
  @Output() onClickOpenCannedResponses = new EventEmitter<boolean>();
77
75
  @Output() onPresentModalScrollToBottom = new EventEmitter<boolean>();
78
76
  @Output() onOpenFooterSection = new EventEmitter<string>();
79
- @Output() onOpenTicket = new EventEmitter<boolean>();
80
77
 
81
78
  public project: Project;
82
79
  public conversationEnabled = false;
@@ -299,17 +296,6 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
299
296
  this.prensentTemplateModal();
300
297
  }
301
298
 
302
- onClickTicket(option: "open" | "close"){
303
- this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] - onClickTicket', option);
304
- switch(option){
305
- case "open":
306
- this.onOpenTicket.emit();
307
- case "close":
308
- this.section = 'chat'
309
- }
310
-
311
- }
312
-
313
299
 
314
300
  /**
315
301
  *
@@ -592,10 +578,8 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
592
578
  if (!text.includes("/")) {
593
579
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 1 message: ', message);
594
580
  this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 1 message: ", message);
595
-
581
+ this.messageString = '';
596
582
  this.sendMessage(text);
597
- // this.messageString = '';
598
-
599
583
  this.countClicks = 0
600
584
  } else if (text.includes("/") && pos === 0 && this.countClicks > 1 && this.tagsCannedFilter.length > 0) {
601
585
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter.length 2: ', this.tagsCannedFilter.length);
@@ -607,10 +591,9 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
607
591
  this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
608
592
  this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
609
593
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 message: ', message);
610
-
611
- this.sendMessage(text);
612
- // this.messageString = '';
594
+ this.messageString = '';
613
595
 
596
+ this.sendMessage(text);
614
597
  this.countClicks = 0
615
598
  } else if (text.includes("/") && pos > 0 && this.countClicks > 1 && this.tagsCannedFilter.length > 0 && text.substr(-1) !== '/') {
616
599
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter.length 3: ', this.tagsCannedFilter.length);
@@ -622,19 +605,17 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
622
605
  this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
623
606
  this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown in msg-texarea SEND MESSAGE 2 this.countClicks: ", this.countClicks);
624
607
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 2 message: ', message);
625
-
626
- this.sendMessage(text);
627
- // this.messageString = '';
608
+ this.messageString = '';
628
609
 
610
+ this.sendMessage(text);
629
611
  this.countClicks = 0
630
612
  } else if (text.includes("/") && this.tagsCannedFilter.length === 0) {
631
613
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - tagsCannedFilter.length 3: ', this.tagsCannedFilter.length);
632
614
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] onKeydown - SEND MESSAGE 3 message: ', message);
633
615
  this.logger.log("[CONVS-DETAIL] replaceTagInMessage onKeydown in msg-texarea SEND MESSAGE 3 message: ", message);
634
-
635
- this.sendMessage(text);
636
- // this.messageString = '';
616
+ this.messageString = '';
637
617
 
618
+ this.sendMessage(text);
638
619
  this.countClicks = 0
639
620
 
640
621
  }
@@ -70,8 +70,8 @@ export class InfoContentComponent implements OnInit {
70
70
  this.route.paramMap.subscribe(params => {
71
71
  this.logger.log('[INFO-CONTENT-COMP] initialize params: ', params);
72
72
  this.conversationWith = params.get('IDConv');
73
- this.conversationWithFullname = decodeURIComponent(params.get('FullNameConv'));
74
- this.conv_type = decodeURIComponent(params.get('Convtype'));
73
+ this.conversationWithFullname = params.get('FullNameConv');
74
+ this.conv_type = params.get('Convtype');
75
75
 
76
76
  const conversationWith_segments = this.conversationWith.split('-');
77
77
 
@@ -7,13 +7,13 @@ import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service
7
7
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
8
8
  import { Project } from 'src/chat21-core/models/projects';
9
9
  import { CustomTranslateService } from 'src/chat21-core/providers/custom-translate.service';
10
- import { getUserStatusFromProjectUser } from 'src/chat21-core/utils/utils';
11
- import { TEAMMATE_STATUS } from 'src/chat21-core/utils/constants';
12
- import { WebsocketService } from 'src/app/services/websocket/websocket.service';
13
- import { ProjectUser } from 'src/chat21-core/models/project_user';
14
10
  import { ProjectUsersService } from 'src/app/services/project_users/project-users.service';
11
+ import { ProjectUser } from 'src/chat21-core/models/projectUsers';
15
12
  import { PERMISSIONS } from 'src/app/utils/permissions.constants';
16
13
  import { getOSCode, hasRole } from 'src/app/utils/utils';
14
+ import { getUserStatusFromProjectUser } from 'src/chat21-core/utils/utils';
15
+ import { TEAMMATE_STATUS } from 'src/chat21-core/utils/constants';
16
+ import { WebsocketService } from 'src/app/services/websocket/websocket.service';
17
17
 
18
18
  @Component({
19
19
  selector: 'app-navbar',
@@ -123,7 +123,7 @@ export class NavbarComponent implements OnInit {
123
123
  this.USER_ROLE = project.role;
124
124
  this.projectUser = await this.projectUsersService.getProjectUserByProjectId(project.id_project.id)
125
125
  this.roles = this.checkRoles()
126
- this.logger.log('[SIDEBAR] roles ', this.roles)
126
+ console.log('[SIDEBAR] roles ', this.roles)
127
127
  }
128
128
  })
129
129
  }