@chat21/chat21-ionic 3.3.0-rc.1 → 3.3.0

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
@@ -1,11 +1,12 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+ ### 3.3.0 in PROD
4
+
3
5
  ### 3.3.0-rc.1
4
6
  - added: onBeforeInit event
5
7
  - added: option to hide logout icon
6
8
  - changed: BRAND_BASE_INFO values as string or boolean
7
9
 
8
-
9
10
  ### 3.2.3 in PROD
10
11
 
11
12
  ### 3.2.3-rc.1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
3
  "author": "Tiledesk SRL",
4
- "version": "3.3.0-rc.1",
4
+ "version": "3.3.0",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -293,8 +293,6 @@ export class AppComponent implements OnInit {
293
293
  this.SUPPORT_MODE = this.g.supportMode
294
294
  }
295
295
 
296
- this.triggerOnBeforeInit('onBeforeInit')
297
-
298
296
  });
299
297
  this.globalSettingsService.initParamiters(this.g, this.el);
300
298
 
@@ -322,7 +320,8 @@ export class AppComponent implements OnInit {
322
320
  this.loadCustomScript(appconfig)
323
321
  this.listenToPostMsgs();
324
322
 
325
- this.loadStyle(JSON.parse(localStorage.getItem('custom_style')))
323
+ this.loadStyle(JSON.parse(localStorage.getItem('custom_style')));
324
+ this.triggerOnInit('onInit')
326
325
  }
327
326
 
328
327
 
@@ -1675,9 +1674,9 @@ export class AppComponent implements OnInit {
1675
1674
  this.triggerEvents.triggerOnAuthStateChanged(detailOBJ)
1676
1675
  }
1677
1676
 
1678
- private triggerOnBeforeInit(event){
1677
+ private triggerOnInit(event){
1679
1678
  const detailOBJ = { event: event, isLogged: true, user: this.tiledeskAuthService.getCurrentUser() }
1680
- this.triggerEvents.triggerOnBeforeInit(detailOBJ)
1679
+ this.triggerEvents.triggerOnInit(detailOBJ)
1681
1680
  }
1682
1681
 
1683
1682
 
@@ -78,7 +78,6 @@ export class SidebarComponent implements OnInit {
78
78
  this.tiledesk_url = BRAND_BASE_INFO['COMPANY_SITE_URL'] as string
79
79
 
80
80
  this.DASHBOARD_URL = this.appConfig.getConfig().dashboardUrl + '#/project/';
81
- console.log('[SIDEBAR] DASHBOARD_URL ', this.DASHBOARD_URL, LOGOS_ITEMS)
82
81
  this.getStoredProjectAndUserRole()
83
82
  this.subcribeToAuthStateChanged()
84
83
  this.listenTocurrentProjectUserUserAvailability$()
@@ -88,14 +88,14 @@ export class TriggerEvents {
88
88
 
89
89
  }
90
90
 
91
- public triggerOnBeforeInit(detailObj: {}) {
92
- this.logger.debug(' ---------------- triggerOnBeforeInitEvent ---------------- ', detailObj);
91
+ public triggerOnInit(detailObj: {}) {
92
+ this.logger.debug(' ---------------- triggerOnInitEvent ---------------- ', detailObj);
93
93
  try {
94
- const onBeforeInit = new CustomEvent('onBeforeInit', { detail: detailObj });
94
+ const onBeforeInit = new CustomEvent('onInit', { detail: detailObj });
95
95
  const windowContext = this.windowContext;
96
96
  if (windowContext){
97
97
  // windowContext.document.dispatchEvent(onNewConversation);
98
- windowContext.postMessage({type: "onBeforeInit", detail: detailObj }, '*')
98
+ windowContext.postMessage({type: "onInit", detail: detailObj }, '*')
99
99
  }
100
100
  } catch (e) {
101
101
  this.logger.error('[TRIGGER-HANDLER] > Error:' + e);