ng-intercom
Advanced tools
Comparing version
@@ -1,5 +0,6 @@ | ||
import { ModuleWithProviders } from '@angular/core'; | ||
import { InjectionToken, ModuleWithProviders } from '@angular/core'; | ||
import { IntercomConfig } from './types/intercom-config'; | ||
export declare const CONFIG: InjectionToken<{}>; | ||
export declare class IntercomModule { | ||
static forRoot(config: IntercomConfig): ModuleWithProviders; | ||
} |
@@ -12,2 +12,3 @@ "use strict"; | ||
var intercom_1 = require("./providers/intercom"); | ||
exports.CONFIG = new core_1.InjectionToken('CONFIG'); | ||
var IntercomModule = (function () { | ||
@@ -20,3 +21,4 @@ function IntercomModule() { | ||
providers: [ | ||
{ provide: intercom_1.Intercom, useValue: config } | ||
intercom_1.Intercom, | ||
{ provide: exports.CONFIG, useValue: config } | ||
] | ||
@@ -23,0 +25,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"IntercomModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"providers":[{"__symbolic":"reference","module":"./providers/intercom","name":"Intercom"}],"declarations":[{"__symbolic":"reference","module":"./directives/hide.directive","name":"IntercomHideDirective"},{"__symbolic":"reference","module":"./directives/show-messages.directive","name":"IntercomShowMessagesDirective"},{"__symbolic":"reference","module":"./directives/show-new-message.directive","name":"IntercomShowNewMessageDirective"},{"__symbolic":"reference","module":"./directives/show.directive","name":"IntercomShowDirective"},{"__symbolic":"reference","module":"./directives/shutdown.directive","name":"IntercomShutdownDirective"},{"__symbolic":"reference","module":"./directives/track-event.directive","name":"IntercomTrackEventDirective"}],"exports":[{"__symbolic":"reference","module":"./directives/hide.directive","name":"IntercomHideDirective"},{"__symbolic":"reference","module":"./directives/show-messages.directive","name":"IntercomShowMessagesDirective"},{"__symbolic":"reference","module":"./directives/show-new-message.directive","name":"IntercomShowNewMessageDirective"},{"__symbolic":"reference","module":"./directives/show.directive","name":"IntercomShowDirective"},{"__symbolic":"reference","module":"./directives/shutdown.directive","name":"IntercomShutdownDirective"},{"__symbolic":"reference","module":"./directives/track-event.directive","name":"IntercomTrackEventDirective"}]}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"IntercomModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./providers/intercom","name":"Intercom"},"useValue":{"__symbolic":"reference","name":"config"}}]}}}}}},{"__symbolic":"module","version":1,"metadata":{"IntercomModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"providers":[{"__symbolic":"reference","module":"./providers/intercom","name":"Intercom"}],"declarations":[{"__symbolic":"reference","module":"./directives/hide.directive","name":"IntercomHideDirective"},{"__symbolic":"reference","module":"./directives/show-messages.directive","name":"IntercomShowMessagesDirective"},{"__symbolic":"reference","module":"./directives/show-new-message.directive","name":"IntercomShowNewMessageDirective"},{"__symbolic":"reference","module":"./directives/show.directive","name":"IntercomShowDirective"},{"__symbolic":"reference","module":"./directives/shutdown.directive","name":"IntercomShutdownDirective"},{"__symbolic":"reference","module":"./directives/track-event.directive","name":"IntercomTrackEventDirective"}],"exports":[{"__symbolic":"reference","module":"./directives/hide.directive","name":"IntercomHideDirective"},{"__symbolic":"reference","module":"./directives/show-messages.directive","name":"IntercomShowMessagesDirective"},{"__symbolic":"reference","module":"./directives/show-new-message.directive","name":"IntercomShowNewMessageDirective"},{"__symbolic":"reference","module":"./directives/show.directive","name":"IntercomShowDirective"},{"__symbolic":"reference","module":"./directives/shutdown.directive","name":"IntercomShutdownDirective"},{"__symbolic":"reference","module":"./directives/track-event.directive","name":"IntercomTrackEventDirective"}]}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"IntercomModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./providers/intercom","name":"Intercom"},"useValue":{"__symbolic":"reference","name":"config"}}]}}}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["CONFIG"]},"IntercomModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"providers":[{"__symbolic":"reference","module":"./providers/intercom","name":"Intercom"}],"declarations":[{"__symbolic":"reference","module":"./directives/hide.directive","name":"IntercomHideDirective"},{"__symbolic":"reference","module":"./directives/show-messages.directive","name":"IntercomShowMessagesDirective"},{"__symbolic":"reference","module":"./directives/show-new-message.directive","name":"IntercomShowNewMessageDirective"},{"__symbolic":"reference","module":"./directives/show.directive","name":"IntercomShowDirective"},{"__symbolic":"reference","module":"./directives/shutdown.directive","name":"IntercomShutdownDirective"},{"__symbolic":"reference","module":"./directives/track-event.directive","name":"IntercomTrackEventDirective"}],"exports":[{"__symbolic":"reference","module":"./directives/hide.directive","name":"IntercomHideDirective"},{"__symbolic":"reference","module":"./directives/show-messages.directive","name":"IntercomShowMessagesDirective"},{"__symbolic":"reference","module":"./directives/show-new-message.directive","name":"IntercomShowNewMessageDirective"},{"__symbolic":"reference","module":"./directives/show.directive","name":"IntercomShowDirective"},{"__symbolic":"reference","module":"./directives/shutdown.directive","name":"IntercomShutdownDirective"},{"__symbolic":"reference","module":"./directives/track-event.directive","name":"IntercomTrackEventDirective"}]}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"IntercomModule"},"providers":[{"__symbolic":"reference","module":"./providers/intercom","name":"Intercom"},{"provide":{"__symbolic":"reference","name":"CONFIG"},"useValue":{"__symbolic":"reference","name":"config"}}]}}}}}},{"__symbolic":"module","version":1,"metadata":{"CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["CONFIG"]},"IntercomModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"providers":[{"__symbolic":"reference","module":"./providers/intercom","name":"Intercom"}],"declarations":[{"__symbolic":"reference","module":"./directives/hide.directive","name":"IntercomHideDirective"},{"__symbolic":"reference","module":"./directives/show-messages.directive","name":"IntercomShowMessagesDirective"},{"__symbolic":"reference","module":"./directives/show-new-message.directive","name":"IntercomShowNewMessageDirective"},{"__symbolic":"reference","module":"./directives/show.directive","name":"IntercomShowDirective"},{"__symbolic":"reference","module":"./directives/shutdown.directive","name":"IntercomShutdownDirective"},{"__symbolic":"reference","module":"./directives/track-event.directive","name":"IntercomTrackEventDirective"}],"exports":[{"__symbolic":"reference","module":"./directives/hide.directive","name":"IntercomHideDirective"},{"__symbolic":"reference","module":"./directives/show-messages.directive","name":"IntercomShowMessagesDirective"},{"__symbolic":"reference","module":"./directives/show-new-message.directive","name":"IntercomShowNewMessageDirective"},{"__symbolic":"reference","module":"./directives/show.directive","name":"IntercomShowDirective"},{"__symbolic":"reference","module":"./directives/shutdown.directive","name":"IntercomShutdownDirective"},{"__symbolic":"reference","module":"./directives/track-event.directive","name":"IntercomTrackEventDirective"}]}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"IntercomModule"},"providers":[{"__symbolic":"reference","module":"./providers/intercom","name":"Intercom"},{"provide":{"__symbolic":"reference","name":"CONFIG"},"useValue":{"__symbolic":"reference","name":"config"}}]}}}}}}] |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var core_1 = require("@angular/core"); | ||
var intercom_module_1 = require("../intercom.module"); | ||
var load_intercom_1 = require("../util/load-intercom"); | ||
@@ -13,2 +14,3 @@ /** | ||
this.config = config; | ||
console.log(config); | ||
load_intercom_1.loadIntercom(config.app_id); | ||
@@ -182,5 +184,5 @@ } | ||
Intercom.ctorParameters = function () { return [ | ||
null, | ||
{ type: undefined, decorators: [{ type: core_1.Inject, args: [intercom_module_1.CONFIG,] },] }, | ||
]; }; | ||
exports.Intercom = Intercom; | ||
//# sourceMappingURL=intercom.js.map |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"Intercom":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../types/intercom-config","name":"IntercomConfig"}]}],"init":[{"__symbolic":"method"}],"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"}]}}}},{"__symbolic":"module","version":1,"metadata":{"Intercom":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../types/intercom-config","name":"IntercomConfig"}]}],"init":[{"__symbolic":"method"}],"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"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"Intercom":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../intercom.module","name":"CONFIG"}]}]],"parameters":[{"__symbolic":"reference","module":"../types/intercom-config","name":"IntercomConfig"}]}],"init":[{"__symbolic":"method"}],"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"}]}}}},{"__symbolic":"module","version":1,"metadata":{"Intercom":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../intercom.module","name":"CONFIG"}]}]],"parameters":[{"__symbolic":"reference","module":"../types/intercom-config","name":"IntercomConfig"}]}],"init":[{"__symbolic":"method"}],"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"}]}}}}] |
{ | ||
"name": "ng-intercom", | ||
"version": "1.0.0-alpha.5", | ||
"version": "1.0.0-alpha.6", | ||
"description": "An Intercom wrapper for Angular", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
78176
1.75%1129
0.44%