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