UNPKG

@mornya/react-social-libs

Version:

The project of React.js Social Share and Widget modules.

1 lines 1.18 kB
var r,t,o=this&&this.__extends||(r=function(t,o){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,o){t.__proto__=o}:function(t,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}))(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function __(){this.constructor=t}r(t,o),t.prototype=null===o?Object.create(o):(__.prototype=o.prototype,new __)}),e=(Object.defineProperty(exports,"__esModule",{value:!0}),require("../utils/BaseShareComponent")),n=require("../utils/UI"),e=(t=e.BaseShareComponent,o(Tumblr,t),Tumblr.prototype.onInit=function(){this.initialize("Tumblr",{})},Tumblr.prototype.onMount=function(t){this.setApiStep()},Tumblr.prototype.onShare=function(t,o){var r=this;(0,n.openShareWindow)(this.mapToParam(Tumblr.LINK_URL,{canonicalUrl:o.url}),"tumblr",this.deviceInfo.isMobile?[]:[540,860]).then(function(){return r.onComplete(!0,null)}).catch(function(t){return console.error(t)})},Tumblr.LINK_URL="https://www.tumblr.com/widgets/share/tool",Tumblr);function Tumblr(){return null!==t&&t.apply(this,arguments)||this}exports.default=e;