ngx-social-button
Version:
Social login/share buttons for Angular 6, 7, 8
2 lines • 22.6 kB
JavaScript
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@angular/core"),require("rxjs"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-social-button",["exports","@angular/core","rxjs","@angular/common"],o):o(e["ngx-social-button"]={},e.ng.core,e.rxjs,e.ng.common)}(this,function(e,t,o,n){"use strict";var i=function(e,o){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var t in o)o.hasOwnProperty(t)&&(e[t]=o[t])})(e,o)};function r(e,o){function t(){this.constructor=e}i(e,o),e.prototype=null===o?Object.create(o):(t.prototype=o.prototype,new t)}var a=function(){function e(){}return e.prototype.loadScript=function(e,o){if(!document.getElementById(e.name)){var t=document.createElement("script");t.async=!0,t.src=e.url,t.onload=o,"linkedin"===e.name&&(t.async=!1,t.text=("api_key: "+e.id).replace("'","")),document.head.appendChild(t)}},e}(),s=function w(){},c=function v(){},u=function(t){function n(e){var o=t.call(this)||this;return o.clientId=e,o.TYPE="facebook",o.loginProviderObj=new c,o.loginProviderObj.id=e,o.loginProviderObj.name="facebook",o.loginProviderObj.url="https://connect.facebook.net/en_US/sdk.js",o}return r(n,t),n.prototype.initialize=function(){var o=this;return new Promise(function(t,e){o.loadScript(o.loginProviderObj,function(){FB.init({appId:o.clientId,autoLogAppEvents:!0,cookie:!0,xfbml:!0,version:"v2.8"}),FB.AppEvents.logPageView(),FB.getLoginStatus(function(e){if("connected"===e.status){var o=FB.getAuthResponse().accessToken;FB.api("/me?fields=name,email,picture",function(e){t(n.drawUser(Object.assign({},{token:o},e)))})}})})})},n.drawUser=function(e){var o=new s;return o.id=e.id,o.name=e.name,o.email=e.email,o.accessToken=e.accessToken,o.image="https://graph.facebook.com/"+e.id+"/picture?type=normal",o},n.prototype.signIn=function(o){return new Promise(function(t,e){FB.login(function(e){if(console.log("facebook",e),e.authResponse){var o=FB.getAuthResponse().accessToken;FB.api("/me?fields=name,email,picture",function(e){console.log("me",e),t(n.drawUser(Object.assign({},{accessToken:o},e)))})}},{scope:o&&0<o.length?o.join(","):"email,public_profile"})})},n.prototype.sharing=function(t){return new Promise(function(o,e){FB.ui({method:"share",href:t.href,hashtag:t.hashtag&&0<=t.hashtag.indexOf("#")?t.hashtag:null},function(e){console.log(e),o()})})},n.prototype.signOut=function(){return new Promise(function(o,e){FB.logout(function(e){o()})})},n.PROVIDER_TYPE="facebook",n.SCOPES={EMAIL:"email",PUBLIC_PROFILE:"public_profile"},n}(a),p=function(t){function e(e){var o=t.call(this)||this;return o.clientId=e,o.loginProviderObj=new c,o.TYPE="google",o.loginProviderObj.id=e,o.loginProviderObj.name="google",o.loginProviderObj.url="https://apis.google.com/js/platform.js",o}return r(e,t),e.prototype.initialize=function(){var t=this;return new Promise(function(e,o){t.loadScript(t.loginProviderObj,function(){gapi.load("auth2",function(){t.auth2=gapi.auth2.init({client_id:t.clientId,scope:"email"}),t.auth2.then(function(){t.auth2.isSignedIn.get()&&e(t.drawUser())})})})})},e.prototype.drawUser=function(){var e=new s,o=this.auth2.currentUser.get().getBasicProfile(),t=this.auth2.currentUser.get().getAuthResponse(!0);return e.id=o.getId(),e.name=o.getName(),e.email=o.getEmail(),e.image=o.getImageUrl(),e.accessToken=t.access_token,e.idToken=t.id_token,e},e.prototype.signIn=function(e){var t=this;return new Promise(function(e,o){t.auth2.signIn().then(function(){e(t.drawUser())})["catch"](function(e){o(e)})})},e.prototype.signOut=function(){var e=this;return new Promise(function(o,t){e.auth2.signOut().then(function(e){e?t(e):o()})})},e.prototype.sharing=function(e){return new Promise(function(e,o){e()})},e.PROVIDER_TYPE="google",e}(a),l=function(t){function e(e){var o=t.call(this)||this;return o.clientId=e,o.loginProviderObj=new c,o.TYPE="linkedin",o.loginProviderObj.id=e,o.loginProviderObj.name="linkedin",o.loginProviderObj.url="https://platform.linkedin.com/in.js",o}return r(e,t),e.prototype.initialize=function(){var t=this;return new Promise(function(o,e){t.loadScript(t.loginProviderObj,function(){IN.init({api_key:t.clientId,authorize:!0,onLoad:t.onLinkedInLoad()}),IN.Event.on(IN,"auth",function(){IN.User.isAuthorized()&&IN.API.Raw("/people/~:(id,first-name,last-name,email-address,picture-url)").result(function(e){o(t.drawUser(e))})})})})},e.prototype.onLinkedInLoad=function(){IN.Event.on(IN,"systemReady",function(){IN.User.refresh()})},e.prototype.drawUser=function(e){var o=new s;return o.id=e.id,o.name=e.firstName+" "+e.lastName,o.email=e.emailAddress,o.image=e.pictureUrl,o.accessToken=IN.ENV.auth.oauth_token,o},e.prototype.signIn=function(){var t=this;return new Promise(function(o,e){IN.User.authorize(function(){IN.API.Raw("/people/~:(id,first-name,last-name,email-address,picture-url)").result(function(e){console.log("linkedin",e),o(t.drawUser(e))})})})},e.prototype.signOut=function(){return new Promise(function(o,t){IN.User.logout(function(e){o()},function(e){t(e)})})},e.prototype.sharing=function(n){return new Promise(function(o,e){var t={comment:n?n.comment:"",visibility:{code:"anyone"}};IN.API.Raw("/people/~/shares?format=json").method("POST").body(JSON.stringify(t)).result(function(e){console.log("linkedin share",e),o()}).error(function(e){console.log("linkedin",e)})})},e.PROVIDER_TYPE="linkedin",e}(a),g=function(){function e(e){if(this.providers=new Map,e)for(var o=0;o<e.length;o++){var t=e[o];this.providers.set(t.provider.TYPE,t.provider)}}return e.prototype.getProviders=function(){return this.providers},e.prototype.addProvider=function(e){this.providers.get(e.TYPE)||this.providers.set(e.TYPE,e)},e.prototype.addFacebook=function(e){return this.addProvider(new u(e)),this},e.prototype.addGoogle=function(e){return this.addProvider(new p(e)),this},e.prototype.addLinkedIn=function(e){return this.addProvider(new l(e)),this},e}(),d=function(){function a(e){var t=this;this._user=null,this._authState=new o.BehaviorSubject(null),this.providers=e.getProviders(),this.providers.forEach(function(e,o){e.initialize().then(function(e){e.provider=o,t._user=e,t._authState.next(e)})["catch"](function(e){})})}return Object.defineProperty(a.prototype,"authState",{get:function(){return this._authState.asObservable()},enumerable:!0,configurable:!0}),a.prototype.isSocialLoggedIn=function(){return null!=this._user},a.prototype.sharing=function(n,i){var r=this;return new Promise(function(e,o){var t=r.providers.get(n);t?t.sharing(i).then(function(){e(!0)}):o(a.LOGIN_PROVIDER_NOT_FOUND)})},a.prototype.facebookSharing=function(e){return this.sharing("facebook",e)},a.prototype.signIn=function(n,i){var r=this;return new Promise(function(o,t){var e=r.providers.get(n);e?e.signIn(i).then(function(e){e.provider=n,o(e),r._user=e,r._authState.next(e)})["catch"](function(e){t(a.USER_POPUP_CLOSE)}):t(a.LOGIN_PROVIDER_NOT_FOUND)})},a.prototype.signOut=function(){var n=this;return new Promise(function(e,o){if(n._user&&n._user.provider){var t=n._user.provider;n.providers.get(t).signOut().then(function(){n._user=null,n._authState.next(null),e()})["catch"](function(e){n._authState.next(null)})}else o(a.LOGIN_PROVIDER_NOT_FOUND)})},a.LOGIN_PROVIDER_NOT_FOUND="Login provider not found",a.USER_POPUP_CLOSE="User close the popup",a.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],a.ctorParameters=function(){return[{type:g}]},a.ngInjectableDef=t.defineInjectable({factory:function(){return new a(t.inject(g))},token:a,providedIn:"root"}),a}(),b=function(){function e(e){this.socialAuthService=e,this.socialUser=new t.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.socialSignIn=function(){var o=this;this.socialAuthService.signIn("facebook",this.scopes).then(function(e){console.log("socialSignIn",e),o.socialUser.emit(e)})["catch"](function(){o.socialUser.emit(null)})},e.decorators=[{type:t.Component,args:[{selector:"facebook-login-button",template:"\n <button [className]=\"style == 'round' ? 'social-btn facebook ' : 'button btn-block loginBtn --facebook '\"\n (click)=\"socialSignIn()\" type=\"button\">\n {{style == 'round' ? '': text ? text : 'Login with Facebook'}}</button>\n ",styles:['.button{font-family:Lato,"Lucida Grande","Lucida Sans Unicode",Tahoma,Sans-Serif;-webkit-appearance:none;display:inline-block;outline:0;border-radius:3px;border:3px solid transparent;cursor:pointer;text-overflow:ellipsis;text-decoration:none!important;font-weight:400!important}.loginBtn{box-sizing:border-box;position:relative;margin:.2em;padding:0 15px 0 46px;border:none;text-align:left;line-height:34px;white-space:nowrap;border-radius:3px;font-size:16px;color:#fff}.loginBtn:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:34px;height:100%}.loginBtn:focus{outline:0}.loginBtn:active{box-shadow:inset 0 0 0 32px rgba(0,0,0,.1)}.shareBtn{box-sizing:border-box;position:relative;margin:.2em;padding:0 15px 0 46px;border:none;text-align:left;line-height:34px;white-space:nowrap;border-radius:3px;font-size:16px;color:#fff}.shareBtn:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:34px;height:100%}.shareBtn:focus{outline:0}.shareBtn:active{box-shadow:inset 0 0 0 32px rgba(0,0,0,.1)}.--facebook{background-color:#4c69ba;background-image:linear-gradient(#4c69ba,#3b55a0);text-shadow:0 -1px 0 #354c8c}.--facebook:before{border-right:1px solid #364e92;background:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/14082/icon_facebook.png) 6px 6px no-repeat}.--facebook:focus,.--facebook:hover{background-color:#5b7bd5;background-image:linear-gradient(#5b7bd5,#4864b1)}.--google{background:#dd4b39}.--google:before{border-right:1px solid #bb3f30;background:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/14082/icon_google.png) 6px 6px no-repeat}.--google:focus,.--google:hover{background:#e74b37}.--linkedin{background:#007bb6}.--linkedin:before{border-right:1px solid #007bb6;background:url(https://content.linkedin.com/content/dam/developer/global/en_US/site/img/signin-button.png) -3px -3px no-repeat}.--linkedin:focus,.--linkedin:hover{background:linear-gradient(#007bb6,#4864b1)}.social-btn{width:50px;height:50px;background-size:cover;background-repeat:no-repeat;cursor:pointer;border-radius:10px;border:none}.social-btn.facebook{background-image:url(https://raw.githubusercontent.com/JohnnieLi/ngx-social-button/master/assets/facebook.png)}.social-btn.google{background-image:url(https://raw.githubusercontent.com/JohnnieLi/ngx-social-button/master/assets/google.png)}.social-btn.linkedin{background-image:url(https://raw.githubusercontent.com/JohnnieLi/ngx-social-button/master/assets/LinkedIn.png)}.social-btn.wechat{background-image:url(https://github.com/JohnnieLi/ngx-social-button/blob/master/assets/wechat.png?raw=true)}']}]}],e.ctorParameters=function(){return[{type:d}]},e.propDecorators={size:[{type:t.Input}],text:[{type:t.Input}],style:[{type:t.Input}],scopes:[{type:t.Input}],socialUser:[{type:t.Output}]},e}(),h=function(){function e(e){this.socialAuthService=e,this.socialUser=new t.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.socialSignIn=function(){var o=this;this.socialAuthService.signIn("google",this.scopes).then(function(e){o.socialUser.emit(e)})["catch"](function(){o.socialUser.emit(null)})},e.decorators=[{type:t.Component,args:[{selector:"google-login-button",template:"\n\t\t<button [className]=\"style == 'round' ? 'social-btn google' : 'button btn-block loginBtn --google'\"\n\t\t (click)=\"socialSignIn()\" type=\"button\">\n\t\t\t{{style == 'round' ? '': text ? text : 'Login with Google'}}\n\t\t</button>\n ",styles:['.button{font-family:Lato,"Lucida Grande","Lucida Sans Unicode",Tahoma,Sans-Serif;-webkit-appearance:none;display:inline-block;outline:0;border-radius:3px;border:3px solid transparent;cursor:pointer;text-overflow:ellipsis;text-decoration:none!important;font-weight:400!important}.loginBtn{box-sizing:border-box;position:relative;margin:.2em;padding:0 15px 0 46px;border:none;text-align:left;line-height:34px;white-space:nowrap;border-radius:3px;font-size:16px;color:#fff}.loginBtn:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:34px;height:100%}.loginBtn:focus{outline:0}.loginBtn:active{box-shadow:inset 0 0 0 32px rgba(0,0,0,.1)}.shareBtn{box-sizing:border-box;position:relative;margin:.2em;padding:0 15px 0 46px;border:none;text-align:left;line-height:34px;white-space:nowrap;border-radius:3px;font-size:16px;color:#fff}.shareBtn:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:34px;height:100%}.shareBtn:focus{outline:0}.shareBtn:active{box-shadow:inset 0 0 0 32px rgba(0,0,0,.1)}.--facebook{background-color:#4c69ba;background-image:linear-gradient(#4c69ba,#3b55a0);text-shadow:0 -1px 0 #354c8c}.--facebook:before{border-right:1px solid #364e92;background:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/14082/icon_facebook.png) 6px 6px no-repeat}.--facebook:focus,.--facebook:hover{background-color:#5b7bd5;background-image:linear-gradient(#5b7bd5,#4864b1)}.--google{background:#dd4b39}.--google:before{border-right:1px solid #bb3f30;background:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/14082/icon_google.png) 6px 6px no-repeat}.--google:focus,.--google:hover{background:#e74b37}.--linkedin{background:#007bb6}.--linkedin:before{border-right:1px solid #007bb6;background:url(https://content.linkedin.com/content/dam/developer/global/en_US/site/img/signin-button.png) -3px -3px no-repeat}.--linkedin:focus,.--linkedin:hover{background:linear-gradient(#007bb6,#4864b1)}.social-btn{width:50px;height:50px;background-size:cover;background-repeat:no-repeat;cursor:pointer;border-radius:10px;border:none}.social-btn.facebook{background-image:url(https://raw.githubusercontent.com/JohnnieLi/ngx-social-button/master/assets/facebook.png)}.social-btn.google{background-image:url(https://raw.githubusercontent.com/JohnnieLi/ngx-social-button/master/assets/google.png)}.social-btn.linkedin{background-image:url(https://raw.githubusercontent.com/JohnnieLi/ngx-social-button/master/assets/LinkedIn.png)}.social-btn.wechat{background-image:url(https://github.com/JohnnieLi/ngx-social-button/blob/master/assets/wechat.png?raw=true)}']}]}],e.ctorParameters=function(){return[{type:d}]},e.propDecorators={size:[{type:t.Input}],style:[{type:t.Input}],text:[{type:t.Input}],scopes:[{type:t.Input}],socialUser:[{type:t.Output}]},e}(),f=function(){function e(e){this.socialAuthService=e,this.socialUser=new t.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.socialSignIn=function(){var o=this;this.socialAuthService.signIn("linkedin",this.scopes).then(function(e){o.socialUser.emit(e)})["catch"](function(){o.socialUser.emit(null)})},e.decorators=[{type:t.Component,args:[{selector:"linkedin-login-button",template:"\n\t\t<button [className]=\"style == 'round' ? 'social-btn linkedin' : 'button btn-block loginBtn --linkedin'\"\n\t\t (click)=\"socialSignIn()\" type=\"button\">\n\t\t\t{{style == 'round' ? '': text ? text : 'Login with LinkedIn'}}\n\t\t</button>\n ",styles:['.button{font-family:Lato,"Lucida Grande","Lucida Sans Unicode",Tahoma,Sans-Serif;-webkit-appearance:none;display:inline-block;outline:0;border-radius:3px;border:3px solid transparent;cursor:pointer;text-overflow:ellipsis;text-decoration:none!important;font-weight:400!important}.loginBtn{box-sizing:border-box;position:relative;margin:.2em;padding:0 15px 0 46px;border:none;text-align:left;line-height:34px;white-space:nowrap;border-radius:3px;font-size:16px;color:#fff}.loginBtn:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:34px;height:100%}.loginBtn:focus{outline:0}.loginBtn:active{box-shadow:inset 0 0 0 32px rgba(0,0,0,.1)}.shareBtn{box-sizing:border-box;position:relative;margin:.2em;padding:0 15px 0 46px;border:none;text-align:left;line-height:34px;white-space:nowrap;border-radius:3px;font-size:16px;color:#fff}.shareBtn:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:34px;height:100%}.shareBtn:focus{outline:0}.shareBtn:active{box-shadow:inset 0 0 0 32px rgba(0,0,0,.1)}.--facebook{background-color:#4c69ba;background-image:linear-gradient(#4c69ba,#3b55a0);text-shadow:0 -1px 0 #354c8c}.--facebook:before{border-right:1px solid #364e92;background:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/14082/icon_facebook.png) 6px 6px no-repeat}.--facebook:focus,.--facebook:hover{background-color:#5b7bd5;background-image:linear-gradient(#5b7bd5,#4864b1)}.--google{background:#dd4b39}.--google:before{border-right:1px solid #bb3f30;background:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/14082/icon_google.png) 6px 6px no-repeat}.--google:focus,.--google:hover{background:#e74b37}.--linkedin{background:#007bb6}.--linkedin:before{border-right:1px solid #007bb6;background:url(https://content.linkedin.com/content/dam/developer/global/en_US/site/img/signin-button.png) -3px -3px no-repeat}.--linkedin:focus,.--linkedin:hover{background:linear-gradient(#007bb6,#4864b1)}.social-btn{width:50px;height:50px;background-size:cover;background-repeat:no-repeat;cursor:pointer;border-radius:10px;border:none}.social-btn.facebook{background-image:url(https://raw.githubusercontent.com/JohnnieLi/ngx-social-button/master/assets/facebook.png)}.social-btn.google{background-image:url(https://raw.githubusercontent.com/JohnnieLi/ngx-social-button/master/assets/google.png)}.social-btn.linkedin{background-image:url(https://raw.githubusercontent.com/JohnnieLi/ngx-social-button/master/assets/LinkedIn.png)}.social-btn.wechat{background-image:url(https://github.com/JohnnieLi/ngx-social-button/blob/master/assets/wechat.png?raw=true)}']}]}],e.ctorParameters=function(){return[{type:d}]},e.propDecorators={size:[{type:t.Input}],style:[{type:t.Input}],text:[{type:t.Input}],scopes:[{type:t.Input}],socialUser:[{type:t.Output}]},e}(),m=function(){function e(e,o){this.socialAuthService=e,this.document=o,this.share=null,this.response=new t.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.sharing=function(){var o=this;console.log(this.document.location.href),this.share?this.share.href||(this.share.href=this.document.location.href):this.share={href:this.document.location.href},this.socialAuthService.facebookSharing(this.share).then(function(){o.response.emit(!0)})["catch"](function(e){o.response.emit(!1)})},e.decorators=[{type:t.Component,args:[{selector:"facebook-share-button",template:'\n <button class="button btn-block loginBtn --facebook" \n (click)="sharing()" type="button">Share</button>\n ',styles:['.button{font-family:Lato,"Lucida Grande","Lucida Sans Unicode",Tahoma,Sans-Serif;-webkit-appearance:none;display:inline-block;outline:0;border-radius:3px;border:3px solid transparent;cursor:pointer;text-overflow:ellipsis;text-decoration:none!important;font-weight:400!important}.loginBtn{box-sizing:border-box;position:relative;margin:.2em;padding:0 15px 0 46px;border:none;text-align:left;line-height:34px;white-space:nowrap;border-radius:3px;font-size:16px;color:#fff}.loginBtn:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:34px;height:100%}.loginBtn:focus{outline:0}.loginBtn:active{box-shadow:inset 0 0 0 32px rgba(0,0,0,.1)}.shareBtn{box-sizing:border-box;position:relative;margin:.2em;padding:0 15px 0 46px;border:none;text-align:left;line-height:34px;white-space:nowrap;border-radius:3px;font-size:16px;color:#fff}.shareBtn:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:34px;height:100%}.shareBtn:focus{outline:0}.shareBtn:active{box-shadow:inset 0 0 0 32px rgba(0,0,0,.1)}.--facebook{background-color:#4c69ba;background-image:linear-gradient(#4c69ba,#3b55a0);text-shadow:0 -1px 0 #354c8c}.--facebook:before{border-right:1px solid #364e92;background:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/14082/icon_facebook.png) 6px 6px no-repeat}.--facebook:focus,.--facebook:hover{background-color:#5b7bd5;background-image:linear-gradient(#5b7bd5,#4864b1)}.--google{background:#dd4b39}.--google:before{border-right:1px solid #bb3f30;background:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/14082/icon_google.png) 6px 6px no-repeat}.--google:focus,.--google:hover{background:#e74b37}.--linkedin{background:#007bb6}.--linkedin:before{border-right:1px solid #007bb6;background:url(https://content.linkedin.com/content/dam/developer/global/en_US/site/img/signin-button.png) -3px -3px no-repeat}.--linkedin:focus,.--linkedin:hover{background:linear-gradient(#007bb6,#4864b1)}.social-btn{width:50px;height:50px;background-size:cover;background-repeat:no-repeat;cursor:pointer;border-radius:10px;border:none}.social-btn.facebook{background-image:url(https://raw.githubusercontent.com/JohnnieLi/ngx-social-button/master/assets/facebook.png)}.social-btn.google{background-image:url(https://raw.githubusercontent.com/JohnnieLi/ngx-social-button/master/assets/google.png)}.social-btn.linkedin{background-image:url(https://raw.githubusercontent.com/JohnnieLi/ngx-social-button/master/assets/LinkedIn.png)}.social-btn.wechat{background-image:url(https://github.com/JohnnieLi/ngx-social-button/blob/master/assets/wechat.png?raw=true)}']}]}],e.ctorParameters=function(){return[{type:d},{type:undefined,decorators:[{type:t.Inject,args:[n.DOCUMENT]}]}]},e.propDecorators={share:[{type:t.Input}],response:[{type:t.Output}]},e}(),x=function(){function e(e,o){this.socialAuthService=e,this.document=o,this.share={href:location.href},this.response=new t.EventEmitter}return e.prototype.ngAfterViewInit=function(){this.element.nativeElement.innerHTML='<script type="IN/Share" data-url="'+this.share.href+'"><\/script>'},e.decorators=[{type:t.Component,args:[{selector:"linkedin-share-button",template:"\n <span #element></span>\n "}]}],e.ctorParameters=function(){return[{type:d},{type:undefined,decorators:[{type:t.Inject,args:[n.DOCUMENT]}]}]},e.propDecorators={share:[{type:t.Input}],response:[{type:t.Output}],element:[{type:t.ViewChild,args:["element"]}]},e}(),k=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[],declarations:[b,h,m,f,x],exports:[b,h,m,f,x]}]}],e}();e.SocialServiceConfig=g,e.SocialService=d,e.FacebookLoginProvider=u,e.GoogleLoginProvider=p,e.FacebookLoginButton=b,e.GoogleLoginButton=h,e.LinkedinLoginButton=f,e.FacebookSharingButton=m,e.NgxSocialButtonModule=k,e.ɵb=x,e.ɵa=a,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ngx-social-button.umd.min.js.map