@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
package/package.json
CHANGED
package/src/app/app.component.ts
CHANGED
|
@@ -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
|
|
1677
|
+
private triggerOnInit(event){
|
|
1679
1678
|
const detailOBJ = { event: event, isLogged: true, user: this.tiledeskAuthService.getCurrentUser() }
|
|
1680
|
-
this.triggerEvents.
|
|
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
|
|
92
|
-
this.logger.debug(' ----------------
|
|
91
|
+
public triggerOnInit(detailObj: {}) {
|
|
92
|
+
this.logger.debug(' ---------------- triggerOnInitEvent ---------------- ', detailObj);
|
|
93
93
|
try {
|
|
94
|
-
const onBeforeInit = new CustomEvent('
|
|
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: "
|
|
98
|
+
windowContext.postMessage({type: "onInit", detail: detailObj }, '*')
|
|
99
99
|
}
|
|
100
100
|
} catch (e) {
|
|
101
101
|
this.logger.error('[TRIGGER-HANDLER] > Error:' + e);
|