From 60251c72c6192f904b8d8adbc31edc310c21f42a Mon Sep 17 00:00:00 2001 From: Nicolas Beauvais Date: Sat, 16 May 2020 00:41:42 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20v3.0.0-beta.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ dist/vue-social-sharing.js | 2 +- docs/iframe.html | 2 +- docs/main.517e53f8b442a4151b84.bundle.js | 2 -- docs/main.517e53f8b442a4151b84.bundle.js.map | 1 - docs/main.a7ece30a6de1c3e5ac52.bundle.js | 2 ++ docs/main.a7ece30a6de1c3e5ac52.bundle.js.map | 1 + docs/runtime~main.517e53f8b442a4151b84.bundle.js.map | 1 - ....bundle.js => runtime~main.a7ece30a6de1c3e5ac52.bundle.js} | 2 +- docs/runtime~main.a7ece30a6de1c3e5ac52.bundle.js.map | 1 + docs/vendors~main.517e53f8b442a4151b84.bundle.js.map | 1 - ....bundle.js => vendors~main.a7ece30a6de1c3e5ac52.bundle.js} | 4 ++-- ...> vendors~main.a7ece30a6de1c3e5ac52.bundle.js.LICENSE.txt} | 0 docs/vendors~main.a7ece30a6de1c3e5ac52.bundle.js.map | 1 + package.json | 2 +- 15 files changed, 15 insertions(+), 11 deletions(-) delete mode 100644 docs/main.517e53f8b442a4151b84.bundle.js delete mode 100644 docs/main.517e53f8b442a4151b84.bundle.js.map create mode 100644 docs/main.a7ece30a6de1c3e5ac52.bundle.js create mode 100644 docs/main.a7ece30a6de1c3e5ac52.bundle.js.map delete mode 100644 docs/runtime~main.517e53f8b442a4151b84.bundle.js.map rename docs/{runtime~main.517e53f8b442a4151b84.bundle.js => runtime~main.a7ece30a6de1c3e5ac52.bundle.js} (97%) create mode 100644 docs/runtime~main.a7ece30a6de1c3e5ac52.bundle.js.map delete mode 100644 docs/vendors~main.517e53f8b442a4151b84.bundle.js.map rename docs/{vendors~main.517e53f8b442a4151b84.bundle.js => vendors~main.a7ece30a6de1c3e5ac52.bundle.js} (99%) rename docs/{vendors~main.517e53f8b442a4151b84.bundle.js.LICENSE.txt => vendors~main.a7ece30a6de1c3e5ac52.bundle.js.LICENSE.txt} (100%) create mode 100644 docs/vendors~main.a7ece30a6de1c3e5ac52.bundle.js.map diff --git a/CHANGELOG.md b/CHANGELOG.md index 5155a59..00f9cd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ + +# [3.0.0-beta.2](https://github.com/nicolasbeauvais/vue-social-sharing/compare/3.0.0-beta.1...3.0.0-beta.2) (2020-05-16) +- Fix Nuxt support + # [3.0.0-beta.1](https://github.com/nicolasbeauvais/vue-social-sharing/compare/2.4.7...3.0.0-beta.1) (2020-05-15) - Complete rewrite of the package diff --git a/dist/vue-social-sharing.js b/dist/vue-social-sharing.js index fd2ae80..23ffd3c 100644 --- a/dist/vue-social-sharing.js +++ b/dist/vue-social-sharing.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueSocialSharing=e():t.VueSocialSharing=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function r(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(o,i,function(e){return t[e]}.bind(null,i));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=3)}([function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},function(t){t.exports=JSON.parse('{"email":{"sharer":"mailto:?subject=@title&body=@url%0D%0A%0D%0A@description","type":"direct"},"facebook":{"sharer":"https://www.facebook.com/sharer/sharer.php?u=@url&title=@title&description=@description"e=@quote&hashtag=@hashtags","type":"popup"},"line":{"sharer":"http://line.me/R/msg/text/?@description%0D%0A@url","type":"popup"},"linkedin":{"sharer":"https://www.linkedin.com/shareArticle?mini=true&url=@url&title=@title&summary=@description","type":"popup"},"odnoklassniki":{"sharer":"https://connect.ok.ru/dk?st.cmd=WidgetSharePreview&st.shareUrl=@url&st.comments=@description","type":"popup"},"pinterest":{"sharer":"https://pinterest.com/pin/create/button/?url=@url&media=@media&description=@title","type":"popup"},"reddit":{"sharer":"https://www.reddit.com/submit?url=@url&title=@title","type":"popup"},"skype":{"sharer":"https://web.skype.com/share?url=@description%0D%0A@url","type":"popup"},"telegram":{"sharer":"https://t.me/share/url?url=@url&text=@description","type":"popup"},"twitter":{"sharer":"https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags@twitteruser","type":"popup"},"viber":{"sharer":"viber://forward?text=@url @description","type":"direct"},"vk":{"sharer":"https://vk.com/share.php?url=@url&title=@title&description=@description&image=@media&noparse=true","type":"popup"},"weibo":{"sharer":"http://service.weibo.com/share/share.php?url=@url&title=@title","type":"popup"},"whatsapp":{"sharer":"https://api.whatsapp.com/send?text=@description%0D%0A@url","type":"popup","action":"share/whatsapp/share"},"sms":{"sharer":"sms:?body=@url%20@description","type":"direct"},"sms_ios":{"sharer":"sms:;body=@url%20@description","type":"direct"}}')},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,r){t.exports=r(4)},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return h}));var o=r(2),i=r.n(o),s=r(0),n=r.n(s),p=r(1),a={name:"ShareNetwork",props:{network:{type:String,required:!0},url:{type:String,required:!0},title:{type:String,default:""},description:{type:String,default:""},quote:{type:String,default:""},hashtags:{type:String,default:""},twitterUser:{type:String,default:""},media:{type:String,default:""},tag:{type:String,default:"a"}},data:function(){return{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,interval:null}}},computed:{computedNetwork:function(){var t=this.network,e=navigator.userAgent.toLowerCase();return"sms"===t&&(e.indexOf("iphone")>-1||e.indexOf("ipad")>-1)&&(t+="_ios"),this.$SocialSharing.options.networks[t]},encodedHashtags:function(){return"facebook"===this.network&&this.hashtags.length?"%23"+this.hashtags.split(",")[0]:this.hashtags},sharingUrl:function(){var t=this.computedNetwork.sharer;return"twitter"===this.network&&(this.hashtags.length||t.replace("&hashtags=@hashtags",""),this.twitterUser||t.replace("@twitteruser","")),t.replace(/@url/g,encodeURIComponent(this.url)).replace(/@title/g,encodeURIComponent(this.title)).replace(/@description/g,encodeURIComponent(this.description)).replace(/@quote/g,encodeURIComponent(this.quote)).replace(/@hashtags/g,this.encodedHashtags).replace(/@media/g,encodeURIComponent(this.media)).replace(/@twitteruser/g,"&via="+encodeURIComponent(this.twitterUser))}},render:function(t){var e=this;if(!Object.prototype.hasOwnProperty.call(this.$SocialSharing.options.networks,this.network))throw new Error("Network ".concat(this.network," does not exist"));return t(this.tag,{class:"share-network-".concat(this.network),on:{click:function(){return e["popup"===e.computedNetwork.type?"share":"touch"]()}}},this.$slots.default)},methods:{share:function(){this.openSharer(),this.$root.$emit("social_shares_open",this.computedNetwork,this.url),this.$emit("open",this.computedNetwork,this.url)},touch:function(){window.open(this.sharingUrl,"_self"),this.$root.$emit("social_shares_open",this.computedNetwork,this.url),this.$emit("open",this.computedNetwork,this.url)},openSharer:function(){var t=this;this.popup.window&&this.popup.interval&&(clearInterval(this.popup.interval),this.popup.window.close(),this.$root.$emit("social_shares_change",this.computedNetwork,this.url),this.$emit("change",this.computedNetwork,this.url)),this.popup.window=window.open(this.sharingUrl,"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")),this.popup.window.focus(),this.popup.interval=setInterval((function(){t.popup.window&&!t.popup.window.closed||(clearInterval(t.popup.interval),t.popup.window=void 0,t.$root.$emit("social_shares_close",t.computedNetwork,t.url),t.$emit("close",t.computedNetwork,t.url))}),500)}}};function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function c(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};i()(this,t),n()(this,"options",{networks:p}),Object.prototype.hasOwnProperty.call(e,"networks")&&(this.options.networks=c(c({},p),e.networks))};h.install=function(t,e){var r=new h(e);t.component(a.name,a),t.prototype.$SocialSharing=r}}])})); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueSocialSharing=e():t.VueSocialSharing=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function r(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(o,i,function(e){return t[e]}.bind(null,i));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=3)}([function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},function(t){t.exports=JSON.parse('{"email":{"sharer":"mailto:?subject=@title&body=@url%0D%0A%0D%0A@description","type":"direct"},"facebook":{"sharer":"https://www.facebook.com/sharer/sharer.php?u=@url&title=@title&description=@description"e=@quote&hashtag=@hashtags","type":"popup"},"line":{"sharer":"http://line.me/R/msg/text/?@description%0D%0A@url","type":"popup"},"linkedin":{"sharer":"https://www.linkedin.com/shareArticle?mini=true&url=@url&title=@title&summary=@description","type":"popup"},"odnoklassniki":{"sharer":"https://connect.ok.ru/dk?st.cmd=WidgetSharePreview&st.shareUrl=@url&st.comments=@description","type":"popup"},"pinterest":{"sharer":"https://pinterest.com/pin/create/button/?url=@url&media=@media&description=@title","type":"popup"},"reddit":{"sharer":"https://www.reddit.com/submit?url=@url&title=@title","type":"popup"},"skype":{"sharer":"https://web.skype.com/share?url=@description%0D%0A@url","type":"popup"},"telegram":{"sharer":"https://t.me/share/url?url=@url&text=@description","type":"popup"},"twitter":{"sharer":"https://twitter.com/intent/tweet?text=@title&url=@url&hashtags=@hashtags@twitteruser","type":"popup"},"viber":{"sharer":"viber://forward?text=@url @description","type":"direct"},"vk":{"sharer":"https://vk.com/share.php?url=@url&title=@title&description=@description&image=@media&noparse=true","type":"popup"},"weibo":{"sharer":"http://service.weibo.com/share/share.php?url=@url&title=@title","type":"popup"},"whatsapp":{"sharer":"https://api.whatsapp.com/send?text=@description%0D%0A@url","type":"popup","action":"share/whatsapp/share"},"sms":{"sharer":"sms:?body=@url%20@description","type":"direct"},"sms_ios":{"sharer":"sms:;body=@url%20@description","type":"direct"}}')},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,r){t.exports=r(4)},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return d}));var o=r(2),i=r.n(o),n=r(0),s=r.n(n),p=r(1),u="undefined"!=typeof window,a=u?window:null;var c={name:"ShareNetwork",props:{network:{type:String,required:!0},url:{type:String,required:!0},title:{type:String,default:""},description:{type:String,default:""},quote:{type:String,default:""},hashtags:{type:String,default:""},twitterUser:{type:String,default:""},media:{type:String,default:""},tag:{type:String,default:"a"}},data:function(){return{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,interval:null}}},mounted:function(){if(u){var t=void 0!==a.screenLeft?a.screenLeft:a.screenX,e=void 0!==a.screenTop?a.screenTop:a.screenY,r=a.innerWidth?a.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:a.screenX,o=a.innerHeight?a.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:a.screenY,i=r/a.screen.availWidth,n=(r-this.popup.width)/2/i+t,s=(o-this.popup.height)/2/i+e;this.popup.left=n,this.popup.top=s}},computed:{computedNetwork:function(){var t=this.network,e=navigator.userAgent.toLowerCase();return"sms"===t&&(e.indexOf("iphone")>-1||e.indexOf("ipad")>-1)&&(t+="_ios"),this.$SocialSharing.options.networks[t]},encodedHashtags:function(){return"facebook"===this.network&&this.hashtags.length?"%23"+this.hashtags.split(",")[0]:this.hashtags},sharingUrl:function(){var t=this.computedNetwork.sharer;return"twitter"===this.network&&(this.hashtags.length||t.replace("&hashtags=@hashtags",""),this.twitterUser||t.replace("@twitteruser","")),t.replace(/@url/g,encodeURIComponent(this.url)).replace(/@title/g,encodeURIComponent(this.title)).replace(/@description/g,encodeURIComponent(this.description)).replace(/@quote/g,encodeURIComponent(this.quote)).replace(/@hashtags/g,this.encodedHashtags).replace(/@media/g,encodeURIComponent(this.media)).replace(/@twitteruser/g,"&via="+encodeURIComponent(this.twitterUser))}},render:function(t){var e=this;if(!Object.prototype.hasOwnProperty.call(this.$SocialSharing.options.networks,this.network))throw new Error("Network ".concat(this.network," does not exist"));return t(this.tag,{class:"share-network-".concat(this.network),on:{click:function(){return e["popup"===e.computedNetwork.type?"share":"touch"]()}}},this.$slots.default)},methods:{share:function(){this.openSharer(),this.$root.$emit("share_network_open",this.computedNetwork,this.url),this.$emit("open",this.computedNetwork,this.url)},touch:function(){window.open(this.sharingUrl,"_self"),this.$root.$emit("share_network_open",this.computedNetwork,this.url),this.$emit("open",this.computedNetwork,this.url)},openSharer:function(){var t=this;this.popup.window&&this.popup.interval&&(clearInterval(this.popup.interval),this.popup.window.close(),this.$root.$emit("share_network_change",this.computedNetwork,this.url),this.$emit("change",this.computedNetwork,this.url)),this.popup.window=a.open(this.sharingUrl,"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")),this.popup.window.focus(),this.popup.interval=setInterval((function(){t.popup.window&&!t.popup.window.closed||(clearInterval(t.popup.interval),t.popup.window=null,t.$root.$emit("share_network_close",t.computedNetwork,t.url),t.$emit("close",t.computedNetwork,t.url))}),500)}}};function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function l(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};i()(this,t),s()(this,"options",{networks:p}),Object.prototype.hasOwnProperty.call(e,"networks")&&(this.options.networks=l(l({},p),e.networks))};d.install=function(t,e){var r=new d(e);t.component(c.name,c),t.prototype.$SocialSharing=r}}])})); \ No newline at end of file diff --git a/docs/iframe.html b/docs/iframe.html index ccd32b1..899d42d 100644 --- a/docs/iframe.html +++ b/docs/iframe.html @@ -71,4 +71,4 @@ }

No Preview

Sorry, but you either have no stories or none are selected somehow.

  • Please check the Storybook config.
  • Try reloading the page.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

\ No newline at end of file + }

No Preview

Sorry, but you either have no stories or none are selected somehow.

  • Please check the Storybook config.
  • Try reloading the page.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

\ No newline at end of file diff --git a/docs/main.517e53f8b442a4151b84.bundle.js b/docs/main.517e53f8b442a4151b84.bundle.js deleted file mode 100644 index c241134..0000000 --- a/docs/main.517e53f8b442a4151b84.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{115:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_exports__.a={name:"Static data",code:function code(){return{template:'\n
\n \n \n Share on Twitter\n \n
\n '}},params:{notes:'## Creating a Share Network link with static data\n\n```html\n\n\n