@chat21/chat21-ionic 3.0.62 → 3.0.64

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 (58) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +6 -2
  3. package/deploy_amazon_beta.sh +29 -0
  4. package/deploy_amazon_prod.sh +25 -0
  5. package/deploy_pre.sh +6 -78
  6. package/deploy_prod.sh +6 -57
  7. package/package.json +2 -1
  8. package/src/app/app.component.ts +104 -34
  9. package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.html +2 -0
  10. package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +2 -1
  11. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +33 -21
  12. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +34 -12
  13. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +2 -1
  14. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +1 -1
  15. package/src/app/chatlib/conversation-detail/message/image/image.component.ts +5 -3
  16. package/src/app/chatlib/conversation-detail/message/return-receipt/return-receipt.component.scss +1 -1
  17. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +1 -1
  18. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +1 -1
  19. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +4 -4
  20. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +1 -1
  21. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +3 -3
  22. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +3 -3
  23. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +10 -55
  24. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +8 -2
  25. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +2 -0
  26. package/src/app/components/image-viewer/image-viewer.component.ts +28 -10
  27. package/src/app/components/project-item/project-item.component.ts +6 -30
  28. package/src/app/components/sidebar/sidebar.component.html +2 -2
  29. package/src/app/components/sidebar/sidebar.component.ts +49 -83
  30. package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +17 -1
  31. package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +52 -6
  32. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +81 -111
  33. package/src/app/pages/authentication/login/login.page.ts +20 -1
  34. package/src/app/pages/conversation-detail/conversation-detail.page.html +40 -19
  35. package/src/app/pages/conversation-detail/conversation-detail.page.scss +15 -6
  36. package/src/app/pages/conversation-detail/conversation-detail.page.ts +179 -244
  37. package/src/app/services/nav-proxy.service.ts +15 -13
  38. package/src/assets/i18n/de.json +2 -1
  39. package/src/assets/i18n/en.json +2 -1
  40. package/src/assets/i18n/es.json +2 -1
  41. package/src/assets/i18n/fr.json +2 -1
  42. package/src/assets/i18n/it.json +2 -1
  43. package/src/assets/i18n/pt.json +2 -1
  44. package/src/assets/i18n/ru.json +2 -1
  45. package/src/assets/i18n/sr.json +2 -1
  46. package/src/assets/i18n/tr.json +2 -1
  47. package/src/assets/js/chat21client.js +1 -1
  48. package/src/{chat-config-mqtt-ver-uploaded.json → chat-config-mqtt-localhost.json} +10 -6
  49. package/src/chat-config-mqtt.json +18 -28
  50. package/src/chat-config-native-mqtt.json +30 -0
  51. package/src/chat-config-pre.json +15 -7
  52. package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +2 -3
  53. package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +20 -3
  54. package/src/chat21-core/providers/logger/customLogger.ts +2 -10
  55. package/src/chat21-core/providers/tiledesk/tiledesk-auth.service.ts +1 -1
  56. package/src/chat21-core/utils/utils-message.ts +102 -85
  57. package/src/variables.scss +4 -1
  58. package/src/chat-config-pre-test.json +0 -36
@@ -24,7 +24,7 @@ export class SidebarComponent implements OnInit {
24
24
 
25
25
  private logger: LoggerService = LoggerInstance.getInstance();
26
26
 
27
- USER_ROLE: string;
27
+ USER_ROLE: string = 'agent'
28
28
  SIDEBAR_IS_SMALL = true
29
29
  IS_AVAILABLE: boolean;
30
30
  user: any;
@@ -79,22 +79,6 @@ export class SidebarComponent implements OnInit {
79
79
  this.listenTocurrentProjectUserUserAvailability$()
80
80
  this.getOSCODE();
81
81
  this.getCurrentChatLangAndTranslateLabels();
82
-
83
- // this.loggedUser = this.chatManager.getCurrentUser();
84
- // if (this.loggedUser) {
85
- // this.itemAvatar = {
86
- // imageurl: this.imageRepoService.getImagePhotoUrl(this.loggedUser.uid),
87
- // avatar: this.loggedUser.avatar,
88
- // color: this.loggedUser.color,
89
- // online: this.loggedUser.online,
90
- // lastConnection: this.loggedUser.lastConnection,
91
- // status: '',
92
- // width: '35px',
93
- // height: '35px'
94
- // };
95
- // }
96
-
97
-
98
82
  }
99
83
 
100
84
 
@@ -112,7 +96,7 @@ export class SidebarComponent implements OnInit {
112
96
  this.logger.log('[SIDEBAR] USER_ROLE ', this.USER_ROLE)
113
97
  this.buildURLs(this.USER_ROLE)
114
98
  } else {
115
- this.logger.log('[SIDEBAR] stored_project ', stored_project)
99
+ this.logger.error('[SIDEBAR] stored_project not found in storage', stored_project)
116
100
  }
117
101
  }
118
102
 
@@ -139,15 +123,21 @@ export class SidebarComponent implements OnInit {
139
123
  this.logger.log('[SIDEBAR] BSAuthStateChanged ', state)
140
124
 
141
125
  if (state === 'online') {
142
- this.currentUser = JSON.parse(this.appStorageService.getItem('currentUser'));
143
- this.logger.log('[SIDEBAR] currentUser ', this.currentUser)
144
- if (this.currentUser) {
145
- this.createUserAvatar(this.currentUser)
146
- this.photo_profile_URL = this.imageRepoService.getImagePhotoUrl(this.currentUser.uid)
147
- this.logger.log('[SIDEBAR] photo_profile_URL ', this.photo_profile_URL)
148
- this.checkIfExistPhotoProfile(this.photo_profile_URL)
126
+ const storedCurrentUser = this.appStorageService.getItem('currentUser');
127
+ this.logger.log('[SIDEBAR] storedCurrentUser ', storedCurrentUser)
128
+
129
+ if (storedCurrentUser && storedCurrentUser !== 'undefined') {
130
+ this.currentUser = JSON.parse(storedCurrentUser);
131
+ this.logger.log('[SIDEBAR] subcribeToAuthStateChanged currentUser ', this.currentUser)
132
+ if (this.currentUser) {
133
+ this.createUserAvatar(this.currentUser)
134
+ this.photo_profile_URL = this.imageRepoService.getImagePhotoUrl(this.currentUser.uid)
135
+ this.logger.log('[SIDEBAR] photo_profile_URL ', this.photo_profile_URL)
136
+ this.checkIfExistPhotoProfile(this.photo_profile_URL)
137
+ }
138
+ } else {
139
+ this.logger.error('[SIDEBAR] BSAuthStateChanged current user not found in storage')
149
140
  }
150
-
151
141
  }
152
142
  })
153
143
  }
@@ -196,32 +186,41 @@ export class SidebarComponent implements OnInit {
196
186
 
197
187
  getCurrentChatLangAndTranslateLabels() {
198
188
  const browserLang = this.translate.getBrowserLang();
199
- const currentUser = JSON.parse(this.appStorageService.getItem('currentUser'));
200
- // console.log('[SIDEBAR] - ngOnInit - currentUser ', currentUser)
201
- // console.log('[SIDEBAR] - ngOnInit - browserLang ', browserLang)
202
- let currentUserId = ''
203
- if (currentUser) {
204
- currentUserId = currentUser.uid
205
- // console.log('[SIDEBAR] - ngOnInit - currentUserId ', currentUserId)
206
- }
207
189
 
208
- const stored_preferred_lang = localStorage.getItem(currentUserId + '_lang');
209
- // console.log('[SIDEBAR] stored_preferred_lang: ', stored_preferred_lang);
190
+ const storedCurrentUser = this.appStorageService.getItem('currentUser')
191
+ this.logger.log('[SIDEBAR] - ngOnInit - storedCurrentUser ', storedCurrentUser)
210
192
 
211
- let chat_lang = '';
212
- if (browserLang && !stored_preferred_lang) {
213
- chat_lang = browserLang
214
- this.logger.log('[SIDEBAR] chat_lang: ', chat_lang);
215
- } else if (browserLang && stored_preferred_lang) {
216
- chat_lang = stored_preferred_lang
217
- this.logger.log('[SIDEBAR] chat_lang: ', chat_lang);
218
- }
219
- if (tranlatedLanguage.includes(chat_lang)) {
220
- this.logger.log('[SIDEBAR] tranlatedLanguage includes', chat_lang, ': ', tranlatedLanguage.includes(chat_lang))
221
- this.translate.use(chat_lang);
193
+
194
+ if (storedCurrentUser && storedCurrentUser !== 'undefined') {
195
+ const currentUser = JSON.parse(storedCurrentUser);
196
+ this.logger.log('[SIDEBAR] - ngOnInit - currentUser ', currentUser)
197
+ this.logger.log('[SIDEBAR] - ngOnInit - browserLang ', browserLang)
198
+ let currentUserId = ''
199
+ if (currentUser) {
200
+ currentUserId = currentUser.uid
201
+ this.logger.log('[SIDEBAR] - ngOnInit - getCurrentChatLangAndTranslateLabels - currentUserId ', currentUserId)
202
+ }
203
+
204
+ const stored_preferred_lang = localStorage.getItem(currentUserId + '_lang');
205
+ this.logger.log('[SIDEBAR] stored_preferred_lang: ', stored_preferred_lang);
206
+
207
+ let chat_lang = '';
208
+ if (browserLang && !stored_preferred_lang) {
209
+ chat_lang = browserLang
210
+ this.logger.log('[SIDEBAR] chat_lang: ', chat_lang);
211
+ } else if (browserLang && stored_preferred_lang) {
212
+ chat_lang = stored_preferred_lang
213
+ this.logger.log('[SIDEBAR] chat_lang: ', chat_lang);
214
+ }
215
+ if (tranlatedLanguage.includes(chat_lang)) {
216
+ this.logger.log('[SIDEBAR] tranlatedLanguage includes', chat_lang, ': ', tranlatedLanguage.includes(chat_lang))
217
+ this.translate.use(chat_lang);
218
+ } else {
219
+ this.logger.log('[SIDEBAR] tranlatedLanguage includes', chat_lang, ': ', tranlatedLanguage.includes(chat_lang))
220
+ this.translate.use('en');
221
+ }
222
222
  } else {
223
- this.logger.log('[SIDEBAR] tranlatedLanguage includes', chat_lang, ': ', tranlatedLanguage.includes(chat_lang))
224
- this.translate.use('en');
223
+ this.logger.error('[SIDEBAR] - ngOnInit - currentUser not found in storage ')
225
224
  }
226
225
  this.translateLabels()
227
226
  }
@@ -240,7 +239,6 @@ export class SidebarComponent implements OnInit {
240
239
  getConversationsTranslation() {
241
240
  this.translate.get('Conversations')
242
241
  .subscribe((text: string) => {
243
- // console.log('[SIDEBAR] - translate Conversations', text)
244
242
  this.conversations_lbl = text
245
243
  });
246
244
  }
@@ -248,7 +246,6 @@ export class SidebarComponent implements OnInit {
248
246
  getContactsTranslation() {
249
247
  this.translate.get('LABEL_CONTACTS')
250
248
  .subscribe((text: string) => {
251
- // console.log('[SIDEBAR] - translate Contacts', text)
252
249
  this.contacts_lbl = text
253
250
  });
254
251
  }
@@ -256,7 +253,6 @@ export class SidebarComponent implements OnInit {
256
253
  getAppsTranslation() {
257
254
  this.translate.get('Apps')
258
255
  .subscribe((text: string) => {
259
- // console.log('[SIDEBAR] - translate Apps', text)
260
256
  this.apps_lbl = text
261
257
  });
262
258
  }
@@ -264,7 +260,6 @@ export class SidebarComponent implements OnInit {
264
260
  getAnalyticsTranslation() {
265
261
  this.translate.get('Analytics')
266
262
  .subscribe((text: string) => {
267
- // console.log('[SIDEBAR] - translate Analytics', text)
268
263
  this.analytics_lbl = text
269
264
  });
270
265
  }
@@ -272,7 +267,6 @@ export class SidebarComponent implements OnInit {
272
267
  getActivitiesTranslation() {
273
268
  this.translate.get('Activities')
274
269
  .subscribe((text: string) => {
275
- // console.log('[SIDEBAR] - translate Activities', text)
276
270
  this.activities_lbl = text
277
271
  });
278
272
  }
@@ -280,7 +274,6 @@ export class SidebarComponent implements OnInit {
280
274
  getHistoryTranslation() {
281
275
  this.translate.get('History')
282
276
  .subscribe((text: string) => {
283
- // console.log('[SIDEBAR] - translate History', text)
284
277
  this.history_lbl = text
285
278
  });
286
279
  }
@@ -288,7 +281,6 @@ export class SidebarComponent implements OnInit {
288
281
  getSettingsTranslation() {
289
282
  this.translate.get('Settings')
290
283
  .subscribe((text: string) => {
291
- // console.log('[SIDEBAR] - translate Settings', text)
292
284
  this.settings_lbl = text
293
285
  });
294
286
  }
@@ -385,20 +377,14 @@ export class SidebarComponent implements OnInit {
385
377
  this.countClickOnOpenUserDetailSidebar++
386
378
  this.logger.log('[SIDEBAR-CHAT] countClickOnOpenUserDetailSidebar', this.countClickOnOpenUserDetailSidebar)
387
379
  this.logger.log('[SIDEBAR-CHAT] OPEN UESER DTLS SIDE PANEL')
388
- // this.HAS_CLICKED_OPEN_USER_DETAIL = true
389
- // console.log('[SIDEBAR-CHAT] OPEN USER DTLS SIDE PANEL ', this.HAS_CLICKED_OPEN_USER_DETAIL)
390
380
  const elSidebarUserDtls = <HTMLElement>document.querySelector('#user-details');
391
381
  this.logger.log('[SIDEBAR] OPEN USER DTLS SIDE PANEL elSidebarUserDtls ', elSidebarUserDtls)
392
382
 
393
- // if (elSidebarUserDtls) {
394
- // elSidebarUserDtls.classList.add("active");
395
- // this.events.publish('userdetailsidebar:opened', true);
396
- // }
383
+
397
384
  if (elSidebarUserDtls && this.countClickOnOpenUserDetailSidebar === 1) {
398
385
  elSidebarUserDtls.classList.add("active");
399
386
  }
400
387
  if (elSidebarUserDtls && this.countClickOnOpenUserDetailSidebar > 1) {
401
- // console.log('[SIDEBAR] this.countClickOnOpenUserDetailSidebar HERE', this.countClickOnOpenUserDetailSidebar)
402
388
  if (elSidebarUserDtls.classList.contains('active')) {
403
389
  this.logger.log('[SIDEBAR-CHAT] elSidebarUserDtls contains class ACTIVE', elSidebarUserDtls)
404
390
  elSidebarUserDtls.classList.remove("active");
@@ -409,24 +395,6 @@ export class SidebarComponent implements OnInit {
409
395
  }
410
396
  }
411
397
 
412
- // onCloseUserDetailsSidebar($event) {
413
- // this.logger.log('[SIDEBAR-CHAT] HAS_CLICKED_CLOSE_USER_DETAIL ', $event)
414
- // this.HAS_CLICKED_OPEN_USER_DETAIL = $event
415
- // const elemNavbar = <HTMLElement>document.querySelector('.navbar-absolute');
416
- // this.logger.log('[SIDEBAR] elemNavBar ', elemNavbar)
417
- // if (elemNavbar) {
418
- // elemNavbar.classList.remove("navbar-absolute-custom-class")
419
- // }
420
-
421
- // const elemNavbarBrand = <HTMLElement>document.querySelector('.navbar-brand');
422
- // this.logger.log('[SIDEBAR] elemNavbarBrand ', elemNavbarBrand)
423
- // if (elemNavbarBrand) {
424
- // elemNavbarBrand.classList.remove("navbar-brand-z-index-zero")
425
- // }
426
- // }
427
-
428
-
429
-
430
398
  goToHome() {
431
399
  let url = this.DASHBOARD_URL + this.project_id + '/home'
432
400
  this.dashboard_home_url = url;
@@ -458,14 +426,12 @@ export class SidebarComponent implements OnInit {
458
426
  myWindow.focus();
459
427
  }
460
428
 
461
-
462
429
  goToAnalytics() {
463
430
  let url = this.DASHBOARD_URL + this.project_id + '/analytics'
464
431
  const myWindow = window.open(url, '_self');
465
432
  myWindow.focus();
466
433
  }
467
434
 
468
-
469
435
  goToActivities() {
470
436
  let url = this.DASHBOARD_URL + this.project_id + '/activities'
471
437
  const myWindow = window.open(url, '_self');
@@ -52,6 +52,10 @@
52
52
 
53
53
  <div class="user-details-role">
54
54
  <h3>{{ USER_ROLE_LABEL }} </h3>
55
+
56
+ <div class="user-details-view-profile" (click)="goToUserProfile()">
57
+ {{EditProfileLabel}}
58
+ </div>
55
59
  </div>
56
60
 
57
61
  <section class="availability-section">
@@ -74,9 +78,12 @@
74
78
  <hr class="first-divider">
75
79
 
76
80
  <section *ngIf="isVisiblePAY" class="user-details-plan-info">
81
+ <span class="material-icons user-details-plan-icon">
82
+ apps
83
+ </span>
77
84
  <span>
78
85
  <div> {{prjct_name}} </div>
79
- <div style="display: inline-block;"> {{ profile_name_translated }} </div>
86
+ <div style="display: inline-block; margin-left: 26px;"> {{ profile_name_translated }} </div>
80
87
 
81
88
  <div *ngIf="plan_type === 'payment' && plan_subscription_is_active === false"
82
89
  style="color:#f44336; position:relative; top: -1px;;display: inline-block;">
@@ -95,6 +102,15 @@
95
102
  </span>
96
103
  </section>
97
104
 
105
+ <section class="user-details-help-center">
106
+ <span class="material-icons user-details-help-center-icon">
107
+ support
108
+ </span>
109
+ <span class="user-details-help-center" (click)="goToHelpCenter()">
110
+ Help center
111
+ </span>
112
+ </section>
113
+
98
114
  <!-- <hr class="second-divider" style="margin-top: 20px;border: 0;
99
115
  border-top: 1px solid rgba(255, 255,255, 0.2);"> -->
100
116
 
@@ -177,6 +177,7 @@ button.user-details-btn-close {
177
177
  -webkit-transform: translateX(-50%);
178
178
  transform: translateX(-50%);
179
179
  left: 50%;
180
+ text-align: center;
180
181
  }
181
182
 
182
183
  .user-details-role > h3 {
@@ -187,10 +188,21 @@ button.user-details-btn-close {
187
188
  color: #a9afbb;
188
189
  font-weight: 500;
189
190
  font-family: "Roboto", sans-serif !important;
191
+ margin-bottom: 8px !important;
192
+ }
193
+
194
+ .user-details-view-profile {
195
+ font-size: 14px;
196
+ color: #00d5ff;
197
+ cursor: pointer;
198
+ }
199
+
200
+ .user-details-view-profile:hover {
201
+ text-decoration: underline;
190
202
  }
191
203
 
192
204
  .availability-section {
193
- top: 300px;
205
+ top: 320px;
194
206
  text-align: center;
195
207
  background-color: #2d323e;
196
208
  padding: 9px;
@@ -204,7 +216,7 @@ button.user-details-btn-close {
204
216
  }
205
217
 
206
218
  .first-divider {
207
- margin-top: 355px;
219
+ margin-top: 365px;
208
220
  border: 0;
209
221
  border-top: 1px solid rgba(255, 255, 255, 0.2);
210
222
  margin-bottom: 20px;
@@ -254,6 +266,37 @@ button.user-details-btn-close {
254
266
  line-height: 21px;
255
267
  }
256
268
 
269
+ .user-details-plan-icon {
270
+ display: block;
271
+ float: left;
272
+ font-size: 20px;
273
+ margin-right: 6px;
274
+ }
275
+
276
+
277
+
278
+ .user-details-help-center-icon {
279
+ color: #a9afbb;
280
+ font-size: 20px;
281
+ vertical-align: middle;
282
+ margin-right: 3px;
283
+ }
284
+
285
+ .user-details-help-center {
286
+ margin-top: 6px;
287
+ font-size: 13px;
288
+ font-weight: 500;
289
+ color: #a9afbb;
290
+ -webkit-font-smoothing: antialiased;
291
+ vertical-align: middle;
292
+ cursor: pointer;
293
+ }
294
+
295
+ .user-details-help-center:hover {
296
+ color: #fff;
297
+ text-decoration: underline;
298
+ }
299
+
257
300
  .user-details-footer-section {
258
301
  -webkit-transform: translateX(-50%);
259
302
  transform: translateX(-50%);
@@ -263,12 +306,13 @@ button.user-details-btn-close {
263
306
  text-align: center;
264
307
 
265
308
  padding-bottom: 15px;
266
- padding-top: 200px;
309
+ padding-top: 186px;
267
310
  font-size: 16px;
268
311
  font-weight: 400;
312
+ z-index: 1;
269
313
  // bottom: 50px;
270
- bottom: 55px;
271
- // top:355px
314
+ // bottom: 55px;
315
+
272
316
  }
273
317
 
274
318
  .logout-btn-wpr {
@@ -290,7 +334,7 @@ button.user-details-btn-close {
290
334
 
291
335
  .user-details-footer-chat-version {
292
336
  position: absolute;
293
- bottom: 11px;
337
+ // bottom: 11px;
294
338
  text-align: center;
295
339
  margin: auto;
296
340
  transform: translateX(-50%);
@@ -298,6 +342,8 @@ button.user-details-btn-close {
298
342
  margin: auto;
299
343
  font-size: 12px;
300
344
  font-weight: 400;
345
+ padding-top: 300px;
346
+ padding-bottom: 6px;
301
347
  }
302
348
 
303
349
  :host ::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar {