@mornya/react-social-libs
Version:
The project of React.js Social Share and Widget modules.
1 lines • 1.33 kB
JavaScript
var n,t,e=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function __(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),o=(Object.defineProperty(exports,"__esModule",{value:!0}),require("../utils/BaseShareComponent")),r=require("../utils/UI"),o=(t=o.BaseShareComponent,e(Skype,t),Skype.prototype.onInit=function(){this.initialize("Skype",{message:function(t){return""}})},Skype.prototype.onMount=function(t){this.setApiStep()},Skype.prototype.onShare=function(t,e){var n=this,o=(null==(o=t.message)?void 0:o.call(t,e))||e.title+"\n\n"+"".concat(e.description).concat(this.getHashtag(t.hashtags,"\n"))+"\n\n"+e.url+"\n";(0,r.openShareWindow)(this.mapToParam(Skype.LINK_URL,{url:e.url,text:o}),"skype",this.deviceInfo.isMobile?[]:[640,640]).then(function(){return n.onComplete(!0,null)}).catch(function(t){return console.error(t)})},Skype.LINK_URL="https://web.skype.com/share",Skype);function Skype(){return null!==t&&t.apply(this,arguments)||this}exports.default=o;