@chat21/chat21-ionic 3.4.27-rc10 → 3.4.27-rc12

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.
package/CHANGELOG.md CHANGED
@@ -8,6 +8,12 @@
8
8
  ### **Copyrigth**:
9
9
  *Tiledesk SRL*
10
10
 
11
+ # 3.4.27-rc12
12
+ - **added**: ability to manage logOut option in sidebar-user-detail with tiledesk_logOut url query params
13
+
14
+ # 3.4.27-rc11
15
+ - **bug-fixed**: fixed infinite loading in contact list
16
+
11
17
  # 3.4.27-rc10
12
18
  - **added**: ability to manage header-conversation-list with roles
13
19
  - **bug-fixed**: members in group list not loaded
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.27-rc10",
4
+ "version": "3.4.27-rc12",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -21,7 +21,9 @@
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> </app-sidebar-user-details>
24
+ <app-sidebar-user-details
25
+ [logOut]="g?.logOut">
26
+ </app-sidebar-user-details>
25
27
  </div>
26
28
 
27
29
  <ion-split-pane when="md" contentId="main" [ngClass]="{'mobile': IS_ON_MOBILE_DEVICE, 'sidebar-hidden': IS_ON_MOBILE_DEVICE || SUPPORT_MODE === false}">
@@ -45,6 +45,7 @@ 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
47
  import { Project } from 'src/chat21-core/models/projects';
48
+ import { BRAND_BASE_INFO } from './utils/utils-resources';
48
49
  import { ProjectUsersService } from './services/project_users/project-users.service';
49
50
 
50
51
  @Component({
@@ -301,6 +302,9 @@ export class AppComponent implements OnInit {
301
302
 
302
303
  this.SUPPORT_MODE = this.g.supportMode
303
304
  this.logger.info('[APP-COMP] this.SUPPORT_MODE', this.SUPPORT_MODE)
305
+
306
+ BRAND_BASE_INFO['LOGOUT_ENABLED'] = this.g.logOut
307
+ this.logger.info('[APP-COMP] this.logOut', BRAND_BASE_INFO['LOGOUT_ENABLED'])
304
308
  }
305
309
 
306
310
  });
@@ -25,6 +25,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
25
25
  // HAS_CLICKED_OPEN_USER_DETAIL: boolean = false;
26
26
  // @Output() onCloseUserDetailsSidebar = new EventEmitter();
27
27
 
28
+ @Input() logOut: boolean;
28
29
 
29
30
  public browserLang: string;
30
31
  private logger: LoggerService = LoggerInstance.getInstance()
@@ -95,7 +95,7 @@ export class GlobalSettingsService {
95
95
  globals[key] = stringToBoolean(val);
96
96
  }
97
97
  // this.logger.debug('[GLOBAL-SET] setVariableFromStorage SET globals == ---------->', globals);
98
- }
98
+ }
99
99
  }
100
100
 
101
101
  /**
@@ -143,5 +143,11 @@ export class GlobalSettingsService {
143
143
  this.appStorageService.setItem('projectID', TEMP)
144
144
  }
145
145
 
146
+ TEMP = getParameterByName(windowContext, 'tiledesk_logOut');
147
+ if (TEMP) {
148
+ globals.logOut = stringToBoolean(TEMP);
149
+ this.appStorageService.setItem('logOut', TEMP)
150
+ }
151
+
146
152
  }
147
153
  }
@@ -15,6 +15,7 @@ export class Globals {
15
15
  jwt: string;
16
16
  fileUploadAccept: string;
17
17
  projectID: string;
18
+ logOut: boolean
18
19
 
19
20
  constructor(
20
21
  ) { }
@@ -36,6 +37,7 @@ export class Globals {
36
37
  this.lang = 'en'
37
38
  this.fileUploadAccept = 'image/*,.pdf,.txt'
38
39
  this.projectID = null;
40
+ this.logOut = true;
39
41
 
40
42
  }
41
43
 
@@ -765,6 +765,12 @@ export function isOnMobileDevice() {
765
765
  return IS_ON_MOBILE_DEVICE;
766
766
  }
767
767
 
768
+
769
+ export function checkIfIsInIframe(){
770
+ const isInIframe = window.self !== window.top;
771
+ return isInIframe;
772
+ }
773
+
768
774
  export function checkWindowWidthIsLessThan991px() {
769
775
  // console.log('UTILS - checkWindowWidthIsLessThan991px:: ', window.innerWidth);
770
776
  if (window.innerWidth < 991) {