Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ng-intercom

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-intercom - npm Package Compare versions

Comparing version 8.0.0-beta.1 to 8.0.0

103

bundles/ng-intercom.umd.js

@@ -148,3 +148,3 @@ (function (global, factory) {

var data = __assign({}, intercomData, { app_id: app_id });
return _this.callIntercom('boot', data);
return _this._callIntercom('boot', data);
}));

@@ -176,6 +176,3 @@ };

function () {
if (!common.isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('shutdown');
return this._callIntercom('shutdown');
};

@@ -211,6 +208,3 @@ /**

function (data) {
if (!common.isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('update', data);
return this._callIntercom('update', data);
};

@@ -229,6 +223,3 @@ /**

function () {
if (!common.isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('hide');
return this._callIntercom('hide');
};

@@ -261,9 +252,6 @@ /**

function (message) {
if (!common.isPlatformBrowser(this.platformId)) {
return;
}
if (message) {
return this.showNewMessage(message);
}
return this.callIntercom('show');
return this._callIntercom('show');
};

@@ -282,6 +270,3 @@ /**

function () {
if (!common.isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('showMessages');
return this._callIntercom('showMessages');
};

@@ -308,6 +293,3 @@ /**

function (message) {
if (!common.isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('showNewMessage', message);
return this._callIntercom('showNewMessage', message);
};

@@ -342,6 +324,3 @@ /**

function (eventName, metadata) {
if (!common.isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('trackEvent', eventName, metadata);
return this._callIntercom('trackEvent', eventName, metadata);
};

@@ -366,6 +345,3 @@ /**

function () {
if (!common.isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('getVisitorId');
return this._callIntercom('getVisitorId');
};

@@ -384,6 +360,3 @@ Object.defineProperty(Intercom.prototype, "visitorId", {

*/ function () {
if (!common.isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('getVisitorId');
return this._callIntercom('getVisitorId');
},

@@ -407,6 +380,3 @@ enumerable: true,

function (handler) {
if (!common.isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('onShow', handler);
return this._callIntercom('onShow', handler);
};

@@ -427,6 +397,3 @@ /**

function (handler) {
if (!common.isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('onHide', handler);
return this._callIntercom('onHide', handler);
};

@@ -447,8 +414,40 @@ /**

function (handler) {
if (!common.isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('onUnreadCountChange', handler);
return this._callIntercom('onUnreadCountChange', handler);
};
/**
* If you would like to trigger a tour based on an action a user or visitor takes in your site or application,
* ou can use this API method. You need to call this method with the id of the tour you wish to show. The id of
* the tour can be found in the “Use tour everywhere” section of the tour editor.
*
* Please note that tours shown via this API must be published and the “Use tour everywhere” section must be
* turned on. If you're calling this API using an invalid tour id, nothing will happen.
*/
/**
* If you would like to trigger a tour based on an action a user or visitor takes in your site or application,
* ou can use this API method. You need to call this method with the id of the tour you wish to show. The id of
* the tour can be found in the “Use tour everywhere” section of the tour editor.
*
* Please note that tours shown via this API must be published and the “Use tour everywhere” section must be
* turned on. If you're calling this API using an invalid tour id, nothing will happen.
* @param {?} tourId
* @return {?}
*/
Intercom.prototype.startTour = /**
* If you would like to trigger a tour based on an action a user or visitor takes in your site or application,
* ou can use this API method. You need to call this method with the id of the tour you wish to show. The id of
* the tour can be found in the “Use tour everywhere” section of the tour editor.
*
* Please note that tours shown via this API must be published and the “Use tour everywhere” section must be
* turned on. If you're calling this API using an invalid tour id, nothing will happen.
* @param {?} tourId
* @return {?}
*/
function (tourId) {
return this._callIntercom('startTour', tourId);
};
/**
* Private handler to run Intercom methods safely
*/
/**
* Private handler to run Intercom methods safely
* @private

@@ -459,3 +458,4 @@ * @param {?} fn

*/
Intercom.prototype.callIntercom = /**
Intercom.prototype._callIntercom = /**
* Private handler to run Intercom methods safely
* @private

@@ -471,2 +471,5 @@ * @param {?} fn

}
if (!common.isPlatformBrowser(this.platformId)) {
return;
}
if ((( /** @type {?} */(window))).Intercom) {

@@ -473,0 +476,0 @@ return (( /** @type {?} */(window))).Intercom.apply((( /** @type {?} */(window))), __spread([fn], args));

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/router"),require("@angular/core")):"function"==typeof define&&define.amd?define("ng-intercom",["exports","@angular/common","@angular/router","@angular/core"],e):e(t["ng-intercom"]={},t.ng.common,t.ng.router,t.ng.core)}(this,function(t,s,r,c){"use strict";var i=function(){return(i=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};function n(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var o,n,i=r.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(o=i.next()).done;)s.push(o.value)}catch(c){n={error:c}}finally{try{o&&!o.done&&(r=i["return"])&&r.call(i)}finally{if(n)throw n.error}}return s}var o=function(){function t(){}return t.decorators=[{type:c.Injectable}],t}(),a=function(){function t(t,e,r,o,n){var i=this;this.config=t,this.platformId=e,this.router=r,this.rendererFactory=o,this.document=n,s.isPlatformBrowser(this.platformId)&&(this.renderer2=this.rendererFactory.createRenderer(this.document,{id:"-1",encapsulation:c.ViewEncapsulation.None,styles:[],data:{}}),t&&t.updateOnRouterChange?this.router.events.subscribe(function(t){i.update()}):c.isDevMode()&&console.warn("\n Common practice in single page applications is to update whenever the route changes.\n ng-intercom supports this functionality out of the box just set 'updateOnRouterChange' to true in your Intercom Module config.\n This warning will not appear in production, if you choose not to use router updating.\n "))}return t.prototype.boot=function(r){var o=this;if(s.isPlatformBrowser(this.platformId)){var n=r.app_id?r.app_id:this.config.appId;this.loadIntercom(this.config,function(t){var e=i({},r,{app_id:n});return o.callIntercom("boot",e)})}},t.prototype.shutdown=function(){if(s.isPlatformBrowser(this.platformId))return this.callIntercom("shutdown")},t.prototype.update=function(t){if(s.isPlatformBrowser(this.platformId))return this.callIntercom("update",t)},t.prototype.hide=function(){if(s.isPlatformBrowser(this.platformId))return this.callIntercom("hide")},t.prototype.show=function(t){if(s.isPlatformBrowser(this.platformId))return t?this.showNewMessage(t):this.callIntercom("show")},t.prototype.showMessages=function(){if(s.isPlatformBrowser(this.platformId))return this.callIntercom("showMessages")},t.prototype.showNewMessage=function(t){if(s.isPlatformBrowser(this.platformId))return this.callIntercom("showNewMessage",t)},t.prototype.trackEvent=function(t,e){if(s.isPlatformBrowser(this.platformId))return this.callIntercom("trackEvent",t,e)},t.prototype.getVisitorId=function(){if(s.isPlatformBrowser(this.platformId))return this.callIntercom("getVisitorId")},Object.defineProperty(t.prototype,"visitorId",{get:function(){if(s.isPlatformBrowser(this.platformId))return this.callIntercom("getVisitorId")},enumerable:!0,configurable:!0}),t.prototype.onShow=function(t){if(s.isPlatformBrowser(this.platformId))return this.callIntercom("onShow",t)},t.prototype.onHide=function(t){if(s.isPlatformBrowser(this.platformId))return this.callIntercom("onHide",t)},t.prototype.onUnreadCountChange=function(t){if(s.isPlatformBrowser(this.platformId))return this.callIntercom("onUnreadCountChange",t)},t.prototype.callIntercom=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(window.Intercom)return window.Intercom.apply(window,function o(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(n(arguments[e]));return t}([t],e))},t.prototype.injectIntercomScript=function(t,e){if(s.isPlatformBrowser(this.platformId)){window.intercomSettings=t;var r=this.document.createElement("script");r.type="text/javascript",r.async=!0,r.src="https://widget.intercom.io/widget/"+this.id,r.attachEvent?r.attachEvent("onload",e):r.addEventListener("load",e,!1),this.renderer2&&this.renderer2.appendChild&&this.renderer2.appendChild(this.document.head,r),window.Intercom("update",t)}},t.prototype.loadIntercom=function(t,e){if(s.isPlatformBrowser(this.platformId)){this.id=t.appId;var r=window,o=r.Intercom;if(r.intercomSettings=t,"function"==typeof o)o("reattach_activator"),o("update",t),e();else{var n=function(){n.c(arguments)};n.q=[],n.c=function(t){n.q.push(t)},r.Intercom=n,this.injectIntercomScript(t,e)}}},t.decorators=[{type:c.Injectable}],t.ctorParameters=function(){return[{type:o,decorators:[{type:c.Inject,args:[o]}]},{type:Object,decorators:[{type:c.Inject,args:[c.PLATFORM_ID]}]},{type:r.Router,decorators:[{type:c.Optional},{type:c.Inject,args:[r.Router]}]},{type:c.RendererFactory2},{type:undefined,decorators:[{type:c.Optional},{type:c.Inject,args:[s.DOCUMENT]}]}]},t}(),p=function(){function t(t){this.intercom=t}return t.prototype.onClick=function(){!1!==this.intercomHide&&this.intercom.hide()},t.decorators=[{type:c.Directive,args:[{selector:"[intercomHide]"}]}],t.ctorParameters=function(){return[{type:a}]},t.propDecorators={intercomHide:[{type:c.Input}],onClick:[{type:c.HostListener,args:["click"]}]},t}(),u=function(){function t(t){this.intercom=t}return t.prototype.onClick=function(){!1!==this.intercomShowMessages&&this.intercom.showMessages()},t.decorators=[{type:c.Directive,args:[{selector:"[intercomShowMessages]"}]}],t.ctorParameters=function(){return[{type:a}]},t.propDecorators={intercomShowMessages:[{type:c.Input}],onClick:[{type:c.HostListener,args:["click"]}]},t}(),h=function(){function t(t){this.intercom=t}return t.prototype.onClick=function(){(this.message?this.message:this.intercomShowNewMessage)?this.intercom.showNewMessage(this.message):this.intercom.showNewMessage()},t.decorators=[{type:c.Directive,args:[{selector:"[intercomShowNewMessage]"}]}],t.ctorParameters=function(){return[{type:a}]},t.propDecorators={message:[{type:c.Input}],intercomShowNewMessage:[{type:c.Input}],onClick:[{type:c.HostListener,args:["click"]}]},t}(),f=function(){function t(t){this.intercom=t}return t.prototype.onClick=function(){(this.message?this.message:this.intercomShow)?this.intercom.showNewMessage(this.message):this.intercom.show()},t.decorators=[{type:c.Directive,args:[{selector:"[intercomShow]"}]}],t.ctorParameters=function(){return[{type:a}]},t.propDecorators={message:[{type:c.Input}],intercomShow:[{type:c.Input}],onClick:[{type:c.HostListener,args:["click"]}]},t}(),m=function(){function t(t){this.intercom=t}return t.prototype.onClick=function(){!1!==this.intercomShutdown&&this.intercom.shutdown()},t.decorators=[{type:c.Directive,args:[{selector:"[intercomShutdown]"}]}],t.ctorParameters=function(){return[{type:a}]},t.propDecorators={intercomShutdown:[{type:c.Input}],onClick:[{type:c.HostListener,args:["click"]}]},t}(),l=function(){function t(t){this.intercom=t}return t.prototype.onClick=function(){var t=this.event?this.event:this.intercomTrackEvent;if(t&&this.metadata)this.intercom.trackEvent(t,this.metadata);else{if(!t||this.metadata)throw new Error("Error in intercomTrackEvent directive: You must specify an event to track.");this.intercom.trackEvent(t)}},t.decorators=[{type:c.Directive,args:[{selector:"[intercomTrackEvent]"}]}],t.ctorParameters=function(){return[{type:a}]},t.propDecorators={event:[{type:c.Input}],intercomTrackEvent:[{type:c.Input}],metadata:[{type:c.Input}],onClick:[{type:c.HostListener,args:["click"]}]},t}(),e=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[a,{provide:o,useValue:t}]}},e.decorators=[{type:c.NgModule,args:[{imports:[r.RouterModule],declarations:[p,u,h,f,m,l],exports:[p,u,h,f,m,l],providers:[a,o]}]}],e}();t.Intercom=a,t.IntercomConfig=o,t.IntercomHideDirective=p,t.IntercomModule=e,t.IntercomShowDirective=f,t.IntercomShowMessagesDirective=u,t.IntercomShowNewMessageDirective=h,t.IntercomShutdownDirective=m,t.IntercomTrackEventDirective=l,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/router"),require("@angular/core")):"function"==typeof define&&define.amd?define("ng-intercom",["exports","@angular/common","@angular/router","@angular/core"],e):e(t["ng-intercom"]={},t.ng.common,t.ng.router,t.ng.core)}(this,function(t,c,r,s){"use strict";var i=function(){return(i=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};function n(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var o,n,i=r.call(t),c=[];try{for(;(void 0===e||0<e--)&&!(o=i.next()).done;)c.push(o.value)}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i["return"])&&r.call(i)}finally{if(n)throw n.error}}return c}var o=function(){function t(){}return t.decorators=[{type:s.Injectable}],t}(),a=function(){function t(t,e,r,o,n){var i=this;this.config=t,this.platformId=e,this.router=r,this.rendererFactory=o,this.document=n,c.isPlatformBrowser(this.platformId)&&(this.renderer2=this.rendererFactory.createRenderer(this.document,{id:"-1",encapsulation:s.ViewEncapsulation.None,styles:[],data:{}}),t&&t.updateOnRouterChange?this.router.events.subscribe(function(t){i.update()}):s.isDevMode()&&console.warn("\n Common practice in single page applications is to update whenever the route changes.\n ng-intercom supports this functionality out of the box just set 'updateOnRouterChange' to true in your Intercom Module config.\n This warning will not appear in production, if you choose not to use router updating.\n "))}return t.prototype.boot=function(r){var o=this;if(c.isPlatformBrowser(this.platformId)){var n=r.app_id?r.app_id:this.config.appId;this.loadIntercom(this.config,function(t){var e=i({},r,{app_id:n});return o._callIntercom("boot",e)})}},t.prototype.shutdown=function(){return this._callIntercom("shutdown")},t.prototype.update=function(t){return this._callIntercom("update",t)},t.prototype.hide=function(){return this._callIntercom("hide")},t.prototype.show=function(t){return t?this.showNewMessage(t):this._callIntercom("show")},t.prototype.showMessages=function(){return this._callIntercom("showMessages")},t.prototype.showNewMessage=function(t){return this._callIntercom("showNewMessage",t)},t.prototype.trackEvent=function(t,e){return this._callIntercom("trackEvent",t,e)},t.prototype.getVisitorId=function(){return this._callIntercom("getVisitorId")},Object.defineProperty(t.prototype,"visitorId",{get:function(){return this._callIntercom("getVisitorId")},enumerable:!0,configurable:!0}),t.prototype.onShow=function(t){return this._callIntercom("onShow",t)},t.prototype.onHide=function(t){return this._callIntercom("onHide",t)},t.prototype.onUnreadCountChange=function(t){return this._callIntercom("onUnreadCountChange",t)},t.prototype.startTour=function(t){return this._callIntercom("startTour",t)},t.prototype._callIntercom=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(c.isPlatformBrowser(this.platformId))return window.Intercom?window.Intercom.apply(window,function o(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(n(arguments[e]));return t}([t],e)):void 0},t.prototype.injectIntercomScript=function(t,e){if(c.isPlatformBrowser(this.platformId)){window.intercomSettings=t;var r=this.document.createElement("script");r.type="text/javascript",r.async=!0,r.src="https://widget.intercom.io/widget/"+this.id,r.attachEvent?r.attachEvent("onload",e):r.addEventListener("load",e,!1),this.renderer2&&this.renderer2.appendChild&&this.renderer2.appendChild(this.document.head,r),window.Intercom("update",t)}},t.prototype.loadIntercom=function(t,e){if(c.isPlatformBrowser(this.platformId)){this.id=t.appId;var r=window,o=r.Intercom;if(r.intercomSettings=t,"function"==typeof o)o("reattach_activator"),o("update",t),e();else{var n=function(){n.c(arguments)};n.q=[],n.c=function(t){n.q.push(t)},r.Intercom=n,this.injectIntercomScript(t,e)}}},t.decorators=[{type:s.Injectable}],t.ctorParameters=function(){return[{type:o,decorators:[{type:s.Inject,args:[o]}]},{type:Object,decorators:[{type:s.Inject,args:[s.PLATFORM_ID]}]},{type:r.Router,decorators:[{type:s.Optional},{type:s.Inject,args:[r.Router]}]},{type:s.RendererFactory2},{type:undefined,decorators:[{type:s.Optional},{type:s.Inject,args:[c.DOCUMENT]}]}]},t}(),u=function(){function t(t){this.intercom=t}return t.prototype.onClick=function(){!1!==this.intercomHide&&this.intercom.hide()},t.decorators=[{type:s.Directive,args:[{selector:"[intercomHide]"}]}],t.ctorParameters=function(){return[{type:a}]},t.propDecorators={intercomHide:[{type:s.Input}],onClick:[{type:s.HostListener,args:["click"]}]},t}(),p=function(){function t(t){this.intercom=t}return t.prototype.onClick=function(){!1!==this.intercomShowMessages&&this.intercom.showMessages()},t.decorators=[{type:s.Directive,args:[{selector:"[intercomShowMessages]"}]}],t.ctorParameters=function(){return[{type:a}]},t.propDecorators={intercomShowMessages:[{type:s.Input}],onClick:[{type:s.HostListener,args:["click"]}]},t}(),h=function(){function t(t){this.intercom=t}return t.prototype.onClick=function(){(this.message?this.message:this.intercomShowNewMessage)?this.intercom.showNewMessage(this.message):this.intercom.showNewMessage()},t.decorators=[{type:s.Directive,args:[{selector:"[intercomShowNewMessage]"}]}],t.ctorParameters=function(){return[{type:a}]},t.propDecorators={message:[{type:s.Input}],intercomShowNewMessage:[{type:s.Input}],onClick:[{type:s.HostListener,args:["click"]}]},t}(),m=function(){function t(t){this.intercom=t}return t.prototype.onClick=function(){(this.message?this.message:this.intercomShow)?this.intercom.showNewMessage(this.message):this.intercom.show()},t.decorators=[{type:s.Directive,args:[{selector:"[intercomShow]"}]}],t.ctorParameters=function(){return[{type:a}]},t.propDecorators={message:[{type:s.Input}],intercomShow:[{type:s.Input}],onClick:[{type:s.HostListener,args:["click"]}]},t}(),l=function(){function t(t){this.intercom=t}return t.prototype.onClick=function(){!1!==this.intercomShutdown&&this.intercom.shutdown()},t.decorators=[{type:s.Directive,args:[{selector:"[intercomShutdown]"}]}],t.ctorParameters=function(){return[{type:a}]},t.propDecorators={intercomShutdown:[{type:s.Input}],onClick:[{type:s.HostListener,args:["click"]}]},t}(),d=function(){function t(t){this.intercom=t}return t.prototype.onClick=function(){var t=this.event?this.event:this.intercomTrackEvent;if(t&&this.metadata)this.intercom.trackEvent(t,this.metadata);else{if(!t||this.metadata)throw new Error("Error in intercomTrackEvent directive: You must specify an event to track.");this.intercom.trackEvent(t)}},t.decorators=[{type:s.Directive,args:[{selector:"[intercomTrackEvent]"}]}],t.ctorParameters=function(){return[{type:a}]},t.propDecorators={event:[{type:s.Input}],intercomTrackEvent:[{type:s.Input}],metadata:[{type:s.Input}],onClick:[{type:s.HostListener,args:["click"]}]},t}(),e=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[a,{provide:o,useValue:t}]}},e.decorators=[{type:s.NgModule,args:[{imports:[r.RouterModule],declarations:[u,p,h,m,l,d],exports:[u,p,h,m,l,d],providers:[a,o]}]}],e}();t.Intercom=a,t.IntercomConfig=o,t.IntercomHideDirective=u,t.IntercomModule=e,t.IntercomShowDirective=m,t.IntercomShowMessagesDirective=p,t.IntercomShowNewMessageDirective=h,t.IntercomShutdownDirective=l,t.IntercomTrackEventDirective=d,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ng-intercom.umd.min.js.map

@@ -78,3 +78,3 @@ /**

const data = Object.assign({}, intercomData, { app_id });
return this.callIntercom('boot', data);
return this._callIntercom('boot', data);
}));

@@ -91,6 +91,3 @@ }

shutdown() {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('shutdown');
return this._callIntercom('shutdown');
}

@@ -108,6 +105,3 @@ /**

update(data) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('update', data);
return this._callIntercom('update', data);
}

@@ -119,6 +113,3 @@ /**

hide() {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('hide');
return this._callIntercom('hide');
}

@@ -135,9 +126,6 @@ /**

show(message) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
if (message) {
return this.showNewMessage(message);
}
return this.callIntercom('show');
return this._callIntercom('show');
}

@@ -149,6 +137,3 @@ /**

showMessages() {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('showMessages');
return this._callIntercom('showMessages');
}

@@ -163,6 +148,3 @@ /**

showNewMessage(message) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('showNewMessage', message);
return this._callIntercom('showNewMessage', message);
}

@@ -180,6 +162,3 @@ /**

trackEvent(eventName, metadata) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('trackEvent', eventName, metadata);
return this._callIntercom('trackEvent', eventName, metadata);
}

@@ -193,6 +172,3 @@ /**

getVisitorId() {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('getVisitorId');
return this._callIntercom('getVisitorId');
}

@@ -206,6 +182,3 @@ /**

get visitorId() {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('getVisitorId');
return this._callIntercom('getVisitorId');
}

@@ -218,6 +191,3 @@ /**

onShow(handler) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('onShow', handler);
return this._callIntercom('onShow', handler);
}

@@ -230,6 +200,3 @@ /**

onHide(handler) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('onHide', handler);
return this._callIntercom('onHide', handler);
}

@@ -242,8 +209,19 @@ /**

onUnreadCountChange(handler) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('onUnreadCountChange', handler);
return this._callIntercom('onUnreadCountChange', handler);
}
/**
* If you would like to trigger a tour based on an action a user or visitor takes in your site or application,
* ou can use this API method. You need to call this method with the id of the tour you wish to show. The id of
* the tour can be found in the “Use tour everywhere” section of the tour editor.
*
* Please note that tours shown via this API must be published and the “Use tour everywhere” section must be
* turned on. If you're calling this API using an invalid tour id, nothing will happen.
* @param {?} tourId
* @return {?}
*/
startTour(tourId) {
return this._callIntercom('startTour', tourId);
}
/**
* Private handler to run Intercom methods safely
* @private

@@ -254,3 +232,6 @@ * @param {?} fn

*/
callIntercom(fn, ...args) {
_callIntercom(fn, ...args) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
if (((/** @type {?} */ (window))).Intercom) {

@@ -381,2 +362,2 @@ return ((/** @type {?} */ (window))).Intercom(fn, ...args);

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJjb20uanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZy1pbnRlcmNvbS8iLCJzb3VyY2VzIjpbInNyYy9hcHAvbmctaW50ZXJjb20vaW50ZXJjb20vaW50ZXJjb20udHMiXSwibmF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AgIGlmICh0eXBlb2YgaWMgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgIGljKCdyZWF0dGFjaF9hY3RpdmF0b3InKVxuICAgICAgaWMoJ3VwZGF0ZScsIGNvbmZpZylcbiAgICAgIGFmdGVyTG9hZENhbGxiYWNrKClcbiAgICB9IGVsc2Uge1xuICAgICAgY29uc3QgaTogYW55ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICBpLmMoYXJndW1lbnRzKVxuICAgICAgfVxuICAgICAgaS5xID0gW11cbiAgICAgIGkuYyA9IGZ1bmN0aW9uIChhcmdzOiBhbnkpIHtcbiAgICAgICAgaS5xLnB1c2goYXJncylcbiAgICAgIH1cbiAgICAgIHcuSW50ZXJjb20gPSBpXG4gICAgICB0aGlzLmluamVjdEludGVyY29tU2NyaXB0KGNvbmZpZywgYWZ0ZXJMb2FkQ2FsbGJhY2spXG4gICAgfVxuXG4gIH1cbn1cbiJdfQ==

@@ -82,3 +82,3 @@ /**

var data = tslib_1.__assign({}, intercomData, { app_id: app_id });
return _this.callIntercom('boot', data);
return _this._callIntercom('boot', data);
}));

@@ -110,6 +110,3 @@ };

function () {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('shutdown');
return this._callIntercom('shutdown');
};

@@ -145,6 +142,3 @@ /**

function (data) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('update', data);
return this._callIntercom('update', data);
};

@@ -163,6 +157,3 @@ /**

function () {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('hide');
return this._callIntercom('hide');
};

@@ -195,9 +186,6 @@ /**

function (message) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
if (message) {
return this.showNewMessage(message);
}
return this.callIntercom('show');
return this._callIntercom('show');
};

@@ -216,6 +204,3 @@ /**

function () {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('showMessages');
return this._callIntercom('showMessages');
};

@@ -242,6 +227,3 @@ /**

function (message) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('showNewMessage', message);
return this._callIntercom('showNewMessage', message);
};

@@ -276,6 +258,3 @@ /**

function (eventName, metadata) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('trackEvent', eventName, metadata);
return this._callIntercom('trackEvent', eventName, metadata);
};

@@ -300,6 +279,3 @@ /**

function () {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('getVisitorId');
return this._callIntercom('getVisitorId');
};

@@ -319,6 +295,3 @@ Object.defineProperty(Intercom.prototype, "visitorId", {

function () {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('getVisitorId');
return this._callIntercom('getVisitorId');
},

@@ -342,6 +315,3 @@ enumerable: true,

function (handler) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('onShow', handler);
return this._callIntercom('onShow', handler);
};

@@ -362,6 +332,3 @@ /**

function (handler) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('onHide', handler);
return this._callIntercom('onHide', handler);
};

@@ -382,8 +349,40 @@ /**

function (handler) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('onUnreadCountChange', handler);
return this._callIntercom('onUnreadCountChange', handler);
};
/**
* If you would like to trigger a tour based on an action a user or visitor takes in your site or application,
* ou can use this API method. You need to call this method with the id of the tour you wish to show. The id of
* the tour can be found in the “Use tour everywhere” section of the tour editor.
*
* Please note that tours shown via this API must be published and the “Use tour everywhere” section must be
* turned on. If you're calling this API using an invalid tour id, nothing will happen.
*/
/**
* If you would like to trigger a tour based on an action a user or visitor takes in your site or application,
* ou can use this API method. You need to call this method with the id of the tour you wish to show. The id of
* the tour can be found in the “Use tour everywhere” section of the tour editor.
*
* Please note that tours shown via this API must be published and the “Use tour everywhere” section must be
* turned on. If you're calling this API using an invalid tour id, nothing will happen.
* @param {?} tourId
* @return {?}
*/
Intercom.prototype.startTour = /**
* If you would like to trigger a tour based on an action a user or visitor takes in your site or application,
* ou can use this API method. You need to call this method with the id of the tour you wish to show. The id of
* the tour can be found in the “Use tour everywhere” section of the tour editor.
*
* Please note that tours shown via this API must be published and the “Use tour everywhere” section must be
* turned on. If you're calling this API using an invalid tour id, nothing will happen.
* @param {?} tourId
* @return {?}
*/
function (tourId) {
return this._callIntercom('startTour', tourId);
};
/**
* Private handler to run Intercom methods safely
*/
/**
* Private handler to run Intercom methods safely
* @private

@@ -394,3 +393,4 @@ * @param {?} fn

*/
Intercom.prototype.callIntercom = /**
Intercom.prototype._callIntercom = /**
* Private handler to run Intercom methods safely
* @private

@@ -406,2 +406,5 @@ * @param {?} fn

}
if (!isPlatformBrowser(this.platformId)) {
return;
}
if (((/** @type {?} */ (window))).Intercom) {

@@ -544,2 +547,2 @@ return ((/** @type {?} */ (window))).Intercom.apply(((/** @type {?} */ (window))), tslib_1.__spread([fn], args));

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJjb20uanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZy1pbnRlcmNvbS8iLCJzb3VyY2VzIjpbInNyYy9hcHAvbmctaW50ZXJjb20vaW50ZXJjb20vaW50ZXJjb20udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxXQUFXLEVBQUUsUUFBUSxFQUFFLFNBQVMsRUFBYSxnQkFBZ0IsRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGVBQWUsQ0FBQTtBQUNwSSxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0saUJBQWlCLENBQUE7QUFDeEMsT0FBTyxFQUFFLFFBQVEsRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGlCQUFpQixDQUFBO0FBRTdELE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQTs7OztBQU0xRDtJQU9FLGtCQUNrQyxNQUFzQixFQ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xuICAgICAgfVxuICAgICAgaS5xID0gW11cbiAgICAgIGkuYyA9IGZ1bmN0aW9uIChhcmdzOiBhbnkpIHtcbiAgICAgICAgaS5xLnB1c2goYXJncylcbiAgICAgIH1cbiAgICAgIHcuSW50ZXJjb20gPSBpXG4gICAgICB0aGlzLmluamVjdEludGVyY29tU2NyaXB0KGNvbmZpZywgYWZ0ZXJMb2FkQ2FsbGJhY2spXG4gICAgfVxuXG4gIH1cbn1cbiJdfQ==

@@ -88,3 +88,3 @@ import { DOCUMENT, isPlatformBrowser } from '@angular/common';

const data = Object.assign({}, intercomData, { app_id });
return this.callIntercom('boot', data);
return this._callIntercom('boot', data);
}));

@@ -101,6 +101,3 @@ }

shutdown() {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('shutdown');
return this._callIntercom('shutdown');
}

@@ -118,6 +115,3 @@ /**

update(data) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('update', data);
return this._callIntercom('update', data);
}

@@ -129,6 +123,3 @@ /**

hide() {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('hide');
return this._callIntercom('hide');
}

@@ -145,9 +136,6 @@ /**

show(message) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
if (message) {
return this.showNewMessage(message);
}
return this.callIntercom('show');
return this._callIntercom('show');
}

@@ -159,6 +147,3 @@ /**

showMessages() {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('showMessages');
return this._callIntercom('showMessages');
}

@@ -173,6 +158,3 @@ /**

showNewMessage(message) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('showNewMessage', message);
return this._callIntercom('showNewMessage', message);
}

@@ -190,6 +172,3 @@ /**

trackEvent(eventName, metadata) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('trackEvent', eventName, metadata);
return this._callIntercom('trackEvent', eventName, metadata);
}

@@ -203,6 +182,3 @@ /**

getVisitorId() {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('getVisitorId');
return this._callIntercom('getVisitorId');
}

@@ -216,6 +192,3 @@ /**

get visitorId() {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('getVisitorId');
return this._callIntercom('getVisitorId');
}

@@ -228,6 +201,3 @@ /**

onShow(handler) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('onShow', handler);
return this._callIntercom('onShow', handler);
}

@@ -240,6 +210,3 @@ /**

onHide(handler) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('onHide', handler);
return this._callIntercom('onHide', handler);
}

@@ -252,8 +219,19 @@ /**

onUnreadCountChange(handler) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('onUnreadCountChange', handler);
return this._callIntercom('onUnreadCountChange', handler);
}
/**
* If you would like to trigger a tour based on an action a user or visitor takes in your site or application,
* ou can use this API method. You need to call this method with the id of the tour you wish to show. The id of
* the tour can be found in the “Use tour everywhere” section of the tour editor.
*
* Please note that tours shown via this API must be published and the “Use tour everywhere” section must be
* turned on. If you're calling this API using an invalid tour id, nothing will happen.
* @param {?} tourId
* @return {?}
*/
startTour(tourId) {
return this._callIntercom('startTour', tourId);
}
/**
* Private handler to run Intercom methods safely
* @private

@@ -264,3 +242,6 @@ * @param {?} fn

*/
callIntercom(fn, ...args) {
_callIntercom(fn, ...args) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
if (((/** @type {?} */ (window))).Intercom) {

@@ -267,0 +248,0 @@ return ((/** @type {?} */ (window))).Intercom(fn, ...args);

@@ -95,3 +95,3 @@ import { __assign, __spread } from 'tslib';

var data = __assign({}, intercomData, { app_id: app_id });
return _this.callIntercom('boot', data);
return _this._callIntercom('boot', data);
}));

@@ -123,6 +123,3 @@ };

function () {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('shutdown');
return this._callIntercom('shutdown');
};

@@ -158,6 +155,3 @@ /**

function (data) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('update', data);
return this._callIntercom('update', data);
};

@@ -176,6 +170,3 @@ /**

function () {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('hide');
return this._callIntercom('hide');
};

@@ -208,9 +199,6 @@ /**

function (message) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
if (message) {
return this.showNewMessage(message);
}
return this.callIntercom('show');
return this._callIntercom('show');
};

@@ -229,6 +217,3 @@ /**

function () {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('showMessages');
return this._callIntercom('showMessages');
};

@@ -255,6 +240,3 @@ /**

function (message) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('showNewMessage', message);
return this._callIntercom('showNewMessage', message);
};

@@ -289,6 +271,3 @@ /**

function (eventName, metadata) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('trackEvent', eventName, metadata);
return this._callIntercom('trackEvent', eventName, metadata);
};

@@ -313,6 +292,3 @@ /**

function () {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('getVisitorId');
return this._callIntercom('getVisitorId');
};

@@ -332,6 +308,3 @@ Object.defineProperty(Intercom.prototype, "visitorId", {

function () {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('getVisitorId');
return this._callIntercom('getVisitorId');
},

@@ -355,6 +328,3 @@ enumerable: true,

function (handler) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('onShow', handler);
return this._callIntercom('onShow', handler);
};

@@ -375,6 +345,3 @@ /**

function (handler) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('onHide', handler);
return this._callIntercom('onHide', handler);
};

@@ -395,8 +362,40 @@ /**

function (handler) {
if (!isPlatformBrowser(this.platformId)) {
return;
}
return this.callIntercom('onUnreadCountChange', handler);
return this._callIntercom('onUnreadCountChange', handler);
};
/**
* If you would like to trigger a tour based on an action a user or visitor takes in your site or application,
* ou can use this API method. You need to call this method with the id of the tour you wish to show. The id of
* the tour can be found in the “Use tour everywhere” section of the tour editor.
*
* Please note that tours shown via this API must be published and the “Use tour everywhere” section must be
* turned on. If you're calling this API using an invalid tour id, nothing will happen.
*/
/**
* If you would like to trigger a tour based on an action a user or visitor takes in your site or application,
* ou can use this API method. You need to call this method with the id of the tour you wish to show. The id of
* the tour can be found in the “Use tour everywhere” section of the tour editor.
*
* Please note that tours shown via this API must be published and the “Use tour everywhere” section must be
* turned on. If you're calling this API using an invalid tour id, nothing will happen.
* @param {?} tourId
* @return {?}
*/
Intercom.prototype.startTour = /**
* If you would like to trigger a tour based on an action a user or visitor takes in your site or application,
* ou can use this API method. You need to call this method with the id of the tour you wish to show. The id of
* the tour can be found in the “Use tour everywhere” section of the tour editor.
*
* Please note that tours shown via this API must be published and the “Use tour everywhere” section must be
* turned on. If you're calling this API using an invalid tour id, nothing will happen.
* @param {?} tourId
* @return {?}
*/
function (tourId) {
return this._callIntercom('startTour', tourId);
};
/**
* Private handler to run Intercom methods safely
*/
/**
* Private handler to run Intercom methods safely
* @private

@@ -407,3 +406,4 @@ * @param {?} fn

*/
Intercom.prototype.callIntercom = /**
Intercom.prototype._callIntercom = /**
* Private handler to run Intercom methods safely
* @private

@@ -419,2 +419,5 @@ * @param {?} fn

}
if (!isPlatformBrowser(this.platformId)) {
return;
}
if (((/** @type {?} */ (window))).Intercom) {

@@ -421,0 +424,0 @@ return ((/** @type {?} */ (window))).Intercom.apply(((/** @type {?} */ (window))), __spread([fn], args));

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":4,"metadata":{"Intercom":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":10,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":18,"character":5},"arguments":[{"__symbolic":"reference","name":"IntercomConfig"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":19,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":19,"character":12}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":20,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":20,"character":17},"arguments":[{"__symbolic":"reference","module":"@angular/router","name":"Router","line":20,"character":24}]}],null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":22,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":22,"character":17},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":22,"character":24}]}]],"parameters":[{"__symbolic":"reference","name":"IntercomConfig"},{"__symbolic":"reference","name":"Object"},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":20,"character":48},{"__symbolic":"reference","module":"@angular/core","name":"RendererFactory2","line":21,"character":29},{"__symbolic":"reference","name":"any"}]}],"boot":[{"__symbolic":"method"}],"shutdown":[{"__symbolic":"method"}],"update":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"show":[{"__symbolic":"method"}],"showMessages":[{"__symbolic":"method"}],"showNewMessage":[{"__symbolic":"method"}],"trackEvent":[{"__symbolic":"method"}],"getVisitorId":[{"__symbolic":"method"}],"onShow":[{"__symbolic":"method"}],"onHide":[{"__symbolic":"method"}],"onUnreadCountChange":[{"__symbolic":"method"}],"callIntercom":[{"__symbolic":"method"}],"injectIntercomScript":[{"__symbolic":"method"}],"loadIntercom":[{"__symbolic":"method"}]}},"IntercomConfig":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":2,"character":1}}],"members":{}},"IntercomHideDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[intercomHide]"}]}],"members":{"intercomHide":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Intercom"}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":15,"character":3},"arguments":["click"]}]}]}},"IntercomModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":12,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":14,"character":4}],"declarations":[{"__symbolic":"reference","name":"IntercomHideDirective"},{"__symbolic":"reference","name":"IntercomShowMessagesDirective"},{"__symbolic":"reference","name":"IntercomShowNewMessageDirective"},{"__symbolic":"reference","name":"IntercomShowDirective"},{"__symbolic":"reference","name":"IntercomShutdownDirective"},{"__symbolic":"reference","name":"IntercomTrackEventDirective"}],"exports":[{"__symbolic":"reference","name":"IntercomHideDirective"},{"__symbolic":"reference","name":"IntercomShowMessagesDirective"},{"__symbolic":"reference","name":"IntercomShowNewMessageDirective"},{"__symbolic":"reference","name":"IntercomShowDirective"},{"__symbolic":"reference","name":"IntercomShutdownDirective"},{"__symbolic":"reference","name":"IntercomTrackEventDirective"}],"providers":[{"__symbolic":"reference","name":"Intercom"},{"__symbolic":"reference","name":"IntercomConfig"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"IntercomModule"},"providers":[{"__symbolic":"reference","name":"Intercom"},{"provide":{"__symbolic":"reference","name":"IntercomConfig"},"useValue":{"__symbolic":"reference","name":"config"}}]}}}},"IntercomShowDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[intercomShow]"}]}],"members":{"message":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"intercomShow":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Intercom"}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":15,"character":3},"arguments":["click"]}]}]}},"IntercomShowMessagesDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[intercomShowMessages]"}]}],"members":{"intercomShowMessages":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Intercom"}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":14,"character":3},"arguments":["click"]}]}]}},"IntercomShowNewMessageDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[intercomShowNewMessage]"}]}],"members":{"message":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"intercomShowNewMessage":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Intercom"}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":15,"character":3},"arguments":["click"]}]}]}},"IntercomShutdownDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[intercomShutdown]"}]}],"members":{"intercomShutdown":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Intercom"}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":14,"character":3},"arguments":["click"]}]}]}},"IntercomTrackEventDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":4,"character":1},"arguments":[{"selector":"[intercomTrackEvent]"}]}],"members":{"event":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":8,"character":3}}]}],"intercomTrackEvent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"metadata":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Intercom"}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":15,"character":3},"arguments":["click"]}]}]}}},"origins":{"Intercom":"./src/app/ng-intercom/intercom/intercom","IntercomConfig":"./src/app/ng-intercom/shared/intercom-config","IntercomHideDirective":"./src/app/ng-intercom/directives/hide.directive","IntercomModule":"./src/app/ng-intercom/intercom.module","IntercomShowDirective":"./src/app/ng-intercom/directives/show.directive","IntercomShowMessagesDirective":"./src/app/ng-intercom/directives/show-messages.directive","IntercomShowNewMessageDirective":"./src/app/ng-intercom/directives/show-new-message.directive","IntercomShutdownDirective":"./src/app/ng-intercom/directives/shutdown.directive","IntercomTrackEventDirective":"./src/app/ng-intercom/directives/track-event.directive"},"importAs":"ng-intercom"}
{"__symbolic":"module","version":4,"metadata":{"Intercom":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":10,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":18,"character":5},"arguments":[{"__symbolic":"reference","name":"IntercomConfig"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":19,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":19,"character":12}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":20,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":20,"character":17},"arguments":[{"__symbolic":"reference","module":"@angular/router","name":"Router","line":20,"character":24}]}],null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":22,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":22,"character":17},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":22,"character":24}]}]],"parameters":[{"__symbolic":"reference","name":"IntercomConfig"},{"__symbolic":"reference","name":"Object"},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":20,"character":48},{"__symbolic":"reference","module":"@angular/core","name":"RendererFactory2","line":21,"character":29},{"__symbolic":"reference","name":"any"}]}],"boot":[{"__symbolic":"method"}],"shutdown":[{"__symbolic":"method"}],"update":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"show":[{"__symbolic":"method"}],"showMessages":[{"__symbolic":"method"}],"showNewMessage":[{"__symbolic":"method"}],"trackEvent":[{"__symbolic":"method"}],"getVisitorId":[{"__symbolic":"method"}],"onShow":[{"__symbolic":"method"}],"onHide":[{"__symbolic":"method"}],"onUnreadCountChange":[{"__symbolic":"method"}],"startTour":[{"__symbolic":"method"}],"_callIntercom":[{"__symbolic":"method"}],"injectIntercomScript":[{"__symbolic":"method"}],"loadIntercom":[{"__symbolic":"method"}]}},"IntercomConfig":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":2,"character":1}}],"members":{}},"IntercomHideDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[intercomHide]"}]}],"members":{"intercomHide":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Intercom"}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":15,"character":3},"arguments":["click"]}]}]}},"IntercomModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":12,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":14,"character":4}],"declarations":[{"__symbolic":"reference","name":"IntercomHideDirective"},{"__symbolic":"reference","name":"IntercomShowMessagesDirective"},{"__symbolic":"reference","name":"IntercomShowNewMessageDirective"},{"__symbolic":"reference","name":"IntercomShowDirective"},{"__symbolic":"reference","name":"IntercomShutdownDirective"},{"__symbolic":"reference","name":"IntercomTrackEventDirective"}],"exports":[{"__symbolic":"reference","name":"IntercomHideDirective"},{"__symbolic":"reference","name":"IntercomShowMessagesDirective"},{"__symbolic":"reference","name":"IntercomShowNewMessageDirective"},{"__symbolic":"reference","name":"IntercomShowDirective"},{"__symbolic":"reference","name":"IntercomShutdownDirective"},{"__symbolic":"reference","name":"IntercomTrackEventDirective"}],"providers":[{"__symbolic":"reference","name":"Intercom"},{"__symbolic":"reference","name":"IntercomConfig"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"IntercomModule"},"providers":[{"__symbolic":"reference","name":"Intercom"},{"provide":{"__symbolic":"reference","name":"IntercomConfig"},"useValue":{"__symbolic":"reference","name":"config"}}]}}}},"IntercomShowDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[intercomShow]"}]}],"members":{"message":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"intercomShow":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Intercom"}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":15,"character":3},"arguments":["click"]}]}]}},"IntercomShowMessagesDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[intercomShowMessages]"}]}],"members":{"intercomShowMessages":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Intercom"}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":14,"character":3},"arguments":["click"]}]}]}},"IntercomShowNewMessageDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[intercomShowNewMessage]"}]}],"members":{"message":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"intercomShowNewMessage":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Intercom"}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":15,"character":3},"arguments":["click"]}]}]}},"IntercomShutdownDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[intercomShutdown]"}]}],"members":{"intercomShutdown":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Intercom"}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":14,"character":3},"arguments":["click"]}]}]}},"IntercomTrackEventDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":4,"character":1},"arguments":[{"selector":"[intercomTrackEvent]"}]}],"members":{"event":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":8,"character":3}}]}],"intercomTrackEvent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":3}}]}],"metadata":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Intercom"}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":15,"character":3},"arguments":["click"]}]}]}}},"origins":{"Intercom":"./src/app/ng-intercom/intercom/intercom","IntercomConfig":"./src/app/ng-intercom/shared/intercom-config","IntercomHideDirective":"./src/app/ng-intercom/directives/hide.directive","IntercomModule":"./src/app/ng-intercom/intercom.module","IntercomShowDirective":"./src/app/ng-intercom/directives/show.directive","IntercomShowMessagesDirective":"./src/app/ng-intercom/directives/show-messages.directive","IntercomShowNewMessageDirective":"./src/app/ng-intercom/directives/show-new-message.directive","IntercomShutdownDirective":"./src/app/ng-intercom/directives/shutdown.directive","IntercomTrackEventDirective":"./src/app/ng-intercom/directives/track-event.directive"},"importAs":"ng-intercom"}
{
"name": "ng-intercom",
"version": "8.0.0-beta.1",
"version": "8.0.0",
"license": "MIT",

@@ -78,3 +78,3 @@ "repository": {

"ng-packagr": "^4.7.0",
"node-sass": "^4.11.0",
"node-sass": "^4.12.0",
"npm-run-all": "^4.1.5",

@@ -81,0 +81,0 @@ "protractor": "^5.4.2",

@@ -94,5 +94,17 @@ import { RendererFactory2 } from '@angular/core';

onUnreadCountChange(handler: (unreadCount?: number) => void): void;
private callIntercom;
/**
* If you would like to trigger a tour based on an action a user or visitor takes in your site or application,
* ou can use this API method. You need to call this method with the id of the tour you wish to show. The id of
* the tour can be found in the “Use tour everywhere” section of the tour editor.
*
* Please note that tours shown via this API must be published and the “Use tour everywhere” section must be
* turned on. If you're calling this API using an invalid tour id, nothing will happen.
*/
startTour(tourId: number): void;
/**
* Private handler to run Intercom methods safely
*/
private _callIntercom;
injectIntercomScript(conf: IntercomConfig, afterInjectCallback: (ev: Event) => any): void;
loadIntercom(config: IntercomConfig, afterLoadCallback: (ev?: Event) => any): void;
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc