diff --git a/CHANGELOG.md b/CHANGELOG.md index 08efbd9..f818fcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ + +# [2.1.0](https://github.com/nicolasbeauvais/vue-social-sharing/compare/2.1.0...2.1.1) (2017-02-21) +- Update version + # [2.1.0](https://github.com/nicolasbeauvais/vue-social-sharing/compare/2.0.0...2.1.0) (2017-02-21) - Use of span tag instead of a to prevent history change diff --git a/bower.json b/bower.json index 7e19218..dc16919 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "vue-social-sharing", - "version": "2.1.0", + "version": "2.1.1", "homepage": "https://github.com/nicolasbeauvais/vue-social-sharing", "authors": [ "nicolasbeauvais " diff --git a/dist/vue-social-sharing.common.js b/dist/vue-social-sharing.common.js index 6eac122..2cffa03 100644 --- a/dist/vue-social-sharing.common.js +++ b/dist/vue-social-sharing.common.js @@ -1,5 +1,5 @@ /*! - * vue-social-sharing v2.1.0 + * vue-social-sharing v2.1.1 * (c) 2017 nicolasbeauvais * Released under the MIT License. */ @@ -289,7 +289,7 @@ var SocialSharing = { } }; -SocialSharing.version = '2.1.0'; +SocialSharing.version = '2.1.1'; SocialSharing.install = function (Vue) { Vue.component('social-sharing', SocialSharing); diff --git a/dist/vue-social-sharing.js b/dist/vue-social-sharing.js index 2c3aefd..f9534ff 100644 --- a/dist/vue-social-sharing.js +++ b/dist/vue-social-sharing.js @@ -1,5 +1,5 @@ /*! - * vue-social-sharing v2.1.0 + * vue-social-sharing v2.1.1 * (c) 2017 nicolasbeauvais * Released under the MIT License. */ @@ -293,7 +293,7 @@ var SocialSharing = { } }; -SocialSharing.version = '2.1.0'; +SocialSharing.version = '2.1.1'; SocialSharing.install = function (Vue) { Vue.component('social-sharing', SocialSharing); diff --git a/dist/vue-social-sharing.min.js b/dist/vue-social-sharing.min.js index 00049bc..7005565 100644 --- a/dist/vue-social-sharing.min.js +++ b/dist/vue-social-sharing.min.js @@ -1,6 +1,6 @@ /*! - * vue-social-sharing v2.1.0 + * vue-social-sharing v2.1.1 * (c) 2017 nicolasbeauvais * Released under the MIT License. */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueSocialSharing=e()}(this,function(){"use strict";var t={facebook:{sharer:"https://www.facebook.com/sharer/sharer.php?u=@url&title=@title&description=@description"e=@quote",type:"popup"},twitter:{sharer:"https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags@twitteruser",type:"popup"},googleplus:{sharer:"https://plus.google.com/share?url=@url",type:"popup"},pinterest:{sharer:"https://pinterest.com/pin/create/button/?url=@url&media=@media&description=@title",type:"popup"},reddit:{sharer:"http://www.reddit.com/submit?url=@url&title=@title",type:"popup"},linkedin:{sharer:"https://www.linkedin.com/shareArticle?mini=true&url=@url&title=@title&summary=@description",type:"popup"},whatsapp:{sharer:"whatsapp://send?text=@url",type:"direct",action:"share/whatsapp/share"}},e={functional:!0,props:{network:{type:String,default:""}},render:function(e,i){var r=t[i.props.network];return e(i.parent.networkTag,{class:i.data.staticClass||null,style:i.data.staticStyle||null,attrs:{id:i.data.attrs.id||null,"data-link":"popup"===r.type?"#share-"+i.props.network:i.parent._getSharer(i.props.network),"data-action":"popup"===r.type?null:r.action},on:{click:"popup"===r.type?function(){i.parent.share(i.props.network)}:function(){i.parent.touch(i.props.network)}}},i.children)}},i="undefined"!=typeof window,r=i?window:null,p={props:{url:{type:String,default:i?window.location.href:""},title:{type:String,default:""},description:{type:String,default:""},quote:{type:String,default:""},hashtags:{type:String,default:""},twitterUser:{type:String,default:""},withCounts:{type:[String,Boolean],default:!1},googleKey:{type:String,default:void 0},media:{type:String,default:""},networkTag:{type:String,default:"span"}},data:function(){return{networks:t,popup:{status:!1,resizable:!0,toolbar:!1,menubar:!1,scrollbars:!1,location:!1,directories:!1,width:626,height:436,top:0,left:0,window:void 0}}},methods:{_getSharer:function(t){return this.networks[t].sharer.replace(/@url/g,encodeURIComponent(this.url)).replace(/@title/g,this.title).replace(/@description/g,this.description).replace(/@quote/g,this.quote).replace(/@hashtags/g,this.hashtags).replace(/@media/g,this.media).replace(/@twitteruser/g,this.twitterUser?"&via="+this.twitterUser:"")},share:function(t){this._openSharer(this._getSharer(t)),this.$root.$emit("social_shares_click",t,this.url)},touch:function(t){window.open(this._getSharer(t),"_self"),this.$root.$emit("social_shares_click",t,this.url)},_openSharer:function(t){this.popup.window=window.open(t,"sharer","status="+(this.popup.status?"yes":"no")+",height="+this.popup.height+",width="+this.popup.width+",resizable="+(this.popup.resizable?"yes":"no")+",left="+this.popup.left+",top="+this.popup.top+",screenX="+this.popup.left+",screenY="+this.popup.top+",toolbar="+(this.popup.toolbar?"yes":"no")+",menubar="+(this.popup.menubar?"yes":"no")+",scrollbars="+(this.popup.scrollbars?"yes":"no")+",location="+(this.popup.location?"yes":"no")+",directories="+(this.popup.directories?"yes":"no"))}},mounted:function(){i&&(this.popup.left=r.screen.width/2-(this.popup.width/2+10),this.popup.top=r.screen.height/2-(this.popup.height/2+50))},components:{network:e}};return p.version="2.1.0",p.install=function(t){t.component("social-sharing",p)},"undefined"!=typeof window&&(window.SocialSharing=p),p}); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueSocialSharing=e()}(this,function(){"use strict";var t={facebook:{sharer:"https://www.facebook.com/sharer/sharer.php?u=@url&title=@title&description=@description"e=@quote",type:"popup"},twitter:{sharer:"https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags@twitteruser",type:"popup"},googleplus:{sharer:"https://plus.google.com/share?url=@url",type:"popup"},pinterest:{sharer:"https://pinterest.com/pin/create/button/?url=@url&media=@media&description=@title",type:"popup"},reddit:{sharer:"http://www.reddit.com/submit?url=@url&title=@title",type:"popup"},linkedin:{sharer:"https://www.linkedin.com/shareArticle?mini=true&url=@url&title=@title&summary=@description",type:"popup"},whatsapp:{sharer:"whatsapp://send?text=@url",type:"direct",action:"share/whatsapp/share"}},e={functional:!0,props:{network:{type:String,default:""}},render:function(e,i){var r=t[i.props.network];return e(i.parent.networkTag,{class:i.data.staticClass||null,style:i.data.staticStyle||null,attrs:{id:i.data.attrs.id||null,"data-link":"popup"===r.type?"#share-"+i.props.network:i.parent._getSharer(i.props.network),"data-action":"popup"===r.type?null:r.action},on:{click:"popup"===r.type?function(){i.parent.share(i.props.network)}:function(){i.parent.touch(i.props.network)}}},i.children)}},i="undefined"!=typeof window,r=i?window:null,p={props:{url:{type:String,default:i?window.location.href:""},title:{type:String,default:""},description:{type:String,default:""},quote:{type:String,default:""},hashtags:{type:String,default:""},twitterUser:{type:String,default:""},withCounts:{type:[String,Boolean],default:!1},googleKey:{type:String,default:void 0},media:{type:String,default:""},networkTag:{type:String,default:"span"}},data:function(){return{networks:t,popup:{status:!1,resizable:!0,toolbar:!1,menubar:!1,scrollbars:!1,location:!1,directories:!1,width:626,height:436,top:0,left:0,window:void 0}}},methods:{_getSharer:function(t){return this.networks[t].sharer.replace(/@url/g,encodeURIComponent(this.url)).replace(/@title/g,this.title).replace(/@description/g,this.description).replace(/@quote/g,this.quote).replace(/@hashtags/g,this.hashtags).replace(/@media/g,this.media).replace(/@twitteruser/g,this.twitterUser?"&via="+this.twitterUser:"")},share:function(t){this._openSharer(this._getSharer(t)),this.$root.$emit("social_shares_click",t,this.url)},touch:function(t){window.open(this._getSharer(t),"_self"),this.$root.$emit("social_shares_click",t,this.url)},_openSharer:function(t){this.popup.window=window.open(t,"sharer","status="+(this.popup.status?"yes":"no")+",height="+this.popup.height+",width="+this.popup.width+",resizable="+(this.popup.resizable?"yes":"no")+",left="+this.popup.left+",top="+this.popup.top+",screenX="+this.popup.left+",screenY="+this.popup.top+",toolbar="+(this.popup.toolbar?"yes":"no")+",menubar="+(this.popup.menubar?"yes":"no")+",scrollbars="+(this.popup.scrollbars?"yes":"no")+",location="+(this.popup.location?"yes":"no")+",directories="+(this.popup.directories?"yes":"no"))}},mounted:function(){i&&(this.popup.left=r.screen.width/2-(this.popup.width/2+10),this.popup.top=r.screen.height/2-(this.popup.height/2+50))},components:{network:e}};return p.version="2.1.1",p.install=function(t){t.component("social-sharing",p)},"undefined"!=typeof window&&(window.SocialSharing=p),p}); \ No newline at end of file diff --git a/package.json b/package.json index 737778e..26e1a21 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vue-social-sharing", "description": "A Vue.js component for sharing links to social networks", - "version": "2.1.0", + "version": "2.1.1", "author": { "name": "nicolasbeauvais", "email": "nicolasbeauvais1@gmail.com" diff --git a/src/index.js b/src/index.js index 57dda21..acbf4c9 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,6 @@ import SocialSharing from './social-sharing'; -SocialSharing.version = '2.1.0'; +SocialSharing.version = '2.1.1'; SocialSharing.install = (Vue) => { Vue.component('social-sharing', SocialSharing);