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