Socket
Socket
Sign inDemoInstall

react-vk

Package Overview
Dependencies
3
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.0 to 4.0.1

6

dist/react-vk.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
(factory((global.ReactVK = {}),global.React));
}(this, (function (exports,React) { 'use strict';
(global = global || self, factory(global.ReactVK = {}, global.React));
}(this, function (exports, React) { 'use strict';

@@ -1119,2 +1119,2 @@ React = React && React.hasOwnProperty('default') ? React['default'] : React;

})));
}));

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t(e.ReactVK={},e.React)}(this,function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){r(e,t,n[t])})}return e}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?p(e):t}var d=(t=t&&t.hasOwnProperty("default")?t.default:t).createContext(),m=function(){function e(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,e),this.apiId=t,this.options=s({version:159,onlyWidgets:!0},o),!t)throw new Error("You need to set apiId");this.promise=null,this.init()}return i(e,[{key:"init",value:function(){var e=this.apiId,t=this.options,n=t.version,o=t.onlyWidgets;return this.promise?this.promise:(this.promise=new Promise(function(t){var i="https://vk.com/js/api/openapi.js?".concat(n);if(window.vkAsyncInit=function(){window.VK.init({apiId:e,onlyWidgets:o}),t(window.VK)},!document.getElementById("vk-openapi")){var r=document.createElement("script");r.type="text/javascript",r.id="vk-openapi",r.src=i,r.async=!0,document.head.appendChild(r)}}),this.promise)}}]),e}(),v=null,f=function(e){function o(){var e,t;n(this,o);for(var i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];return r(p(p(t=a(this,(e=c(o)).call.apply(e,[this].concat(s))))),"_mounted",!0),r(p(p(t)),"state",{vk:null}),t}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){var e=this,t=this.props.onApiAvailable;"undefined"!=typeof window&&window.document&&window.document.createElement&&this.VKinit().then(function(n){t(n),e._mounted&&e.setState({vk:n})})}},{key:"componentWillUnmount",value:function(){this._mounted=!1}},{key:"VKinit",value:function(){var e=this.props,t=e.apiId,n=e.options;return this.vk||(this.vk=v||new m(t,n),v=this.vk),this.vk.init()}},{key:"render",value:function(){var e=this.state.vk,n=this.props.children;return e?t.createElement(d.Provider,{value:{vk:e}},n):null}}]),o}();r(f,"defaultProps",{options:{version:160,onlyWidgets:!0},onApiAvailable:function(){}});var h=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"componentWillUnmount",value:function(){this.context.vk.Observer.unsubscribe("widgets.allowMessagesFromCommunity.allowed")}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options,i=t.groupId,r=t.onAllow,s=t.onDeny;e.Widgets.AllowMessagesFromCommunity(n,o,i),e.Observer.subscribe("widgets.allowMessagesFromCommunity.allowed",function(e){return r(e)}),e.Observer.subscribe("widgets.allowMessagesFromCommunity.denied",function(e){return s(e)})}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(h,"contextType",d),r(h,"defaultProps",{elementId:"vk_send_message",options:{height:24},onAllow:function(){},onDeny:function(){}});var y=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.appId,i=t.options;e.Widgets.App(n,o,i)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(y,"contextType",d),r(y,"defaultProps",{elementId:"vk_app",options:{mode:1}});var b=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options,i=s({},o);i.onAuth=function(e,t,n,i,r,s){return o.onAuth(e,t,n,i,r,s)},e.Widgets.Auth(n,i)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(b,"contextType",d),r(b,"defaultProps",{elementId:"vk_auth",options:{width:300,onAuth:function(){}}});var k=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"componentWillUnmount",value:function(){var e=this.context.vk;e.Observer.unsubscribe("widgets.comments.new_comment"),e.Observer.unsubscribe("widgets.comments.delete_comment")}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options,i=t.pageId,r=t.onNewComment,s=t.onDeleteComment;e.Widgets.Comments(n,o,i),e.Observer.subscribe("widgets.comments.new_comment",function(e,t,n,o){return r(e,t,n,o)}),e.Observer.subscribe("widgets.comments.delete_comment",s)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(k,"contextType",d),r(k,"defaultProps",{elementId:"vk_comments",options:{height:0,limit:10,attach:"*",autoPublish:0,mini:"auto",norealtime:0},pageId:null,onNewComment:function(){},onDeleteComment:function(){}});var g=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options;e.Widgets.CommentsBrowse(n,o)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(g,"contextType",d),r(g,"defaultProps",{elementId:"vk_comments_browse",options:{height:0,limit:10,mini:"auto",norealtime:0}});var w=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.groupId,i=t.options;(0,t.onMount)(e.Widgets.CommunityMessages(n,o,i),n)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(w,"contextType",d),r(w,"defaultProps",{elementId:"vk_community_messages",options:{onCanNotWrite:function(){},welcomeScreen:1,expandTimeout:0,expanded:0,widgetPosition:"right",buttonType:"blue_circle",disableButtonTooltip:0},onMount:function(){}});var I=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options,i=t.ownerId;e.Widgets.ContactUs(n,o,-i)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(I,"contextType",d),r(I,"defaultProps",{elementId:"vk_contact_us",options:{height:24}});var x=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"componentWillUnmount",value:function(){var e=this.context.vk;e.Observer.unsubscribe("widgets.groups.joined"),e.Observer.unsubscribe("widgets.groups.leaved")}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options,i=t.groupId,r=t.onJoin,s=t.onLeave;e.Widgets.Group(n,o,i),e.Observer.subscribe("widgets.groups.joined",r),e.Observer.subscribe("widgets.groups.leaved",s)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(x,"contextType",d),r(x,"defaultProps",{elementId:"vk_groups",options:{width:"auto",mode:3,no_cover:1,wide:1},onJoin:function(){},onLeave:function(){}});var O=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"componentWillUnmount",value:function(){var e=this.context.vk;e.Observer.unsubscribe("widgets.like.liked"),e.Observer.unsubscribe("widgets.like.unliked"),e.Observer.unsubscribe("widgets.like.shared"),e.Observer.unsubscribe("widgets.like.unshared")}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options,i=t.pageId,r=t.onLike,s=t.onUnlike,u=t.onShare,c=t.onUnshare;i?e.Widgets.Like(n,o,i):e.Widgets.Like(n,o),e.Observer.subscribe("widgets.like.liked",function(e){return r(e)}),e.Observer.subscribe("widgets.like.unliked",function(e){return s(e)}),e.Observer.subscribe("widgets.like.shared",function(e){return u(e)}),e.Observer.subscribe("widgets.like.unshared",function(e){return c(e)})}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(O,"contextType",d),r(O,"defaultProps",{elementId:"vk_like",options:{type:"full",width:350,height:22,verb:0},pageId:null,onLike:function(){},onUnlike:function(){},onShare:function(){},onUnshare:function(){}});var _=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.ownerId,i=t.playlistId,r=t.hash,s=t.options;e.Widgets.Playlist(n,-o,i,r,s)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(_,"contextType",d),r(_,"defaultProps",{elementId:"vk_playlist",options:{}});var C=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options,i=t.pollId;e.Widgets.Poll(n,o,i)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(C,"contextType",d),r(C,"defaultProps",{elementId:"vk_poll",options:{height:24}});var P=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.ownerId,i=t.postId,r=t.hash,s=t.options;e.Widgets.Post(n,o,i,r,s)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(P,"contextType",d),r(P,"defaultProps",{elementId:"vk_post",options:{}});var W=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options;e.Widgets.Recommended(n,o)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(W,"contextType",d),r(W,"defaultProps",{elementId:"vk_recommend",options:{limit:5,max:20,period:"week",sort:"friend_like",target:"parent"}});var M=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"componentWillUnmount",value:function(){var e=this.context.vk;e.Observer.unsubscribe("widgets.subscribed"),e.Observer.unsubscribe("widgets.unsubscribed")}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options,i=t.ownerId,r=t.onSubscribe,s=t.onUnsubscribe;e.Widgets.Subscribe(n,o,i),e.Observer.subscribe("widgets.subscribed",r),e.Observer.subscribe("widgets.unsubscribed",s)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(M,"contextType",d),r(M,"defaultProps",{elementId:"vk_subscribe",options:{mode:0,soft:0},onSubscribe:function(){},onUnsubscribe:function(){}});var E=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.articleUrl;e.Widgets.Article(n,o)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(E,"contextType",d),r(E,"defaultProps",{elementId:"vk_article"}),e.default=f,e.AllowMessagesFromCommunity=h,e.Application=y,e.Auth=b,e.Comments=k,e.CommentsBrowse=g,e.CommunityMessages=w,e.ContactUs=I,e.Group=x,e.Like=O,e.Playlist=_,e.Poll=C,e.Post=P,e.Recommended=W,e.Subscribe=M,e.Article=E,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e=e||self).ReactVK={},e.React)}(this,function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){r(e,t,n[t])})}return e}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?p(e):t}var d=(t=t&&t.hasOwnProperty("default")?t.default:t).createContext(),m=function(){function e(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,e),this.apiId=t,this.options=s({version:159,onlyWidgets:!0},o),!t)throw new Error("You need to set apiId");this.promise=null,this.init()}return i(e,[{key:"init",value:function(){var e=this.apiId,t=this.options,n=t.version,o=t.onlyWidgets;return this.promise?this.promise:(this.promise=new Promise(function(t){var i="https://vk.com/js/api/openapi.js?".concat(n);if(window.vkAsyncInit=function(){window.VK.init({apiId:e,onlyWidgets:o}),t(window.VK)},!document.getElementById("vk-openapi")){var r=document.createElement("script");r.type="text/javascript",r.id="vk-openapi",r.src=i,r.async=!0,document.head.appendChild(r)}}),this.promise)}}]),e}(),v=null,f=function(e){function o(){var e,t;n(this,o);for(var i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];return r(p(p(t=a(this,(e=c(o)).call.apply(e,[this].concat(s))))),"_mounted",!0),r(p(p(t)),"state",{vk:null}),t}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){var e=this,t=this.props.onApiAvailable;"undefined"!=typeof window&&window.document&&window.document.createElement&&this.VKinit().then(function(n){t(n),e._mounted&&e.setState({vk:n})})}},{key:"componentWillUnmount",value:function(){this._mounted=!1}},{key:"VKinit",value:function(){var e=this.props,t=e.apiId,n=e.options;return this.vk||(this.vk=v||new m(t,n),v=this.vk),this.vk.init()}},{key:"render",value:function(){var e=this.state.vk,n=this.props.children;return e?t.createElement(d.Provider,{value:{vk:e}},n):null}}]),o}();r(f,"defaultProps",{options:{version:160,onlyWidgets:!0},onApiAvailable:function(){}});var h=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"componentWillUnmount",value:function(){this.context.vk.Observer.unsubscribe("widgets.allowMessagesFromCommunity.allowed")}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options,i=t.groupId,r=t.onAllow,s=t.onDeny;e.Widgets.AllowMessagesFromCommunity(n,o,i),e.Observer.subscribe("widgets.allowMessagesFromCommunity.allowed",function(e){return r(e)}),e.Observer.subscribe("widgets.allowMessagesFromCommunity.denied",function(e){return s(e)})}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(h,"contextType",d),r(h,"defaultProps",{elementId:"vk_send_message",options:{height:24},onAllow:function(){},onDeny:function(){}});var y=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.appId,i=t.options;e.Widgets.App(n,o,i)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(y,"contextType",d),r(y,"defaultProps",{elementId:"vk_app",options:{mode:1}});var b=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options,i=s({},o);i.onAuth=function(e,t,n,i,r,s){return o.onAuth(e,t,n,i,r,s)},e.Widgets.Auth(n,i)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(b,"contextType",d),r(b,"defaultProps",{elementId:"vk_auth",options:{width:300,onAuth:function(){}}});var k=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"componentWillUnmount",value:function(){var e=this.context.vk;e.Observer.unsubscribe("widgets.comments.new_comment"),e.Observer.unsubscribe("widgets.comments.delete_comment")}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options,i=t.pageId,r=t.onNewComment,s=t.onDeleteComment;e.Widgets.Comments(n,o,i),e.Observer.subscribe("widgets.comments.new_comment",function(e,t,n,o){return r(e,t,n,o)}),e.Observer.subscribe("widgets.comments.delete_comment",s)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(k,"contextType",d),r(k,"defaultProps",{elementId:"vk_comments",options:{height:0,limit:10,attach:"*",autoPublish:0,mini:"auto",norealtime:0},pageId:null,onNewComment:function(){},onDeleteComment:function(){}});var g=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options;e.Widgets.CommentsBrowse(n,o)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(g,"contextType",d),r(g,"defaultProps",{elementId:"vk_comments_browse",options:{height:0,limit:10,mini:"auto",norealtime:0}});var w=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.groupId,i=t.options;(0,t.onMount)(e.Widgets.CommunityMessages(n,o,i),n)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(w,"contextType",d),r(w,"defaultProps",{elementId:"vk_community_messages",options:{onCanNotWrite:function(){},welcomeScreen:1,expandTimeout:0,expanded:0,widgetPosition:"right",buttonType:"blue_circle",disableButtonTooltip:0},onMount:function(){}});var I=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options,i=t.ownerId;e.Widgets.ContactUs(n,o,-i)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(I,"contextType",d),r(I,"defaultProps",{elementId:"vk_contact_us",options:{height:24}});var x=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"componentWillUnmount",value:function(){var e=this.context.vk;e.Observer.unsubscribe("widgets.groups.joined"),e.Observer.unsubscribe("widgets.groups.leaved")}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options,i=t.groupId,r=t.onJoin,s=t.onLeave;e.Widgets.Group(n,o,i),e.Observer.subscribe("widgets.groups.joined",r),e.Observer.subscribe("widgets.groups.leaved",s)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(x,"contextType",d),r(x,"defaultProps",{elementId:"vk_groups",options:{width:"auto",mode:3,no_cover:1,wide:1},onJoin:function(){},onLeave:function(){}});var O=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"componentWillUnmount",value:function(){var e=this.context.vk;e.Observer.unsubscribe("widgets.like.liked"),e.Observer.unsubscribe("widgets.like.unliked"),e.Observer.unsubscribe("widgets.like.shared"),e.Observer.unsubscribe("widgets.like.unshared")}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options,i=t.pageId,r=t.onLike,s=t.onUnlike,u=t.onShare,c=t.onUnshare;i?e.Widgets.Like(n,o,i):e.Widgets.Like(n,o),e.Observer.subscribe("widgets.like.liked",function(e){return r(e)}),e.Observer.subscribe("widgets.like.unliked",function(e){return s(e)}),e.Observer.subscribe("widgets.like.shared",function(e){return u(e)}),e.Observer.subscribe("widgets.like.unshared",function(e){return c(e)})}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(O,"contextType",d),r(O,"defaultProps",{elementId:"vk_like",options:{type:"full",width:350,height:22,verb:0},pageId:null,onLike:function(){},onUnlike:function(){},onShare:function(){},onUnshare:function(){}});var _=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.ownerId,i=t.playlistId,r=t.hash,s=t.options;e.Widgets.Playlist(n,-o,i,r,s)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(_,"contextType",d),r(_,"defaultProps",{elementId:"vk_playlist",options:{}});var C=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options,i=t.pollId;e.Widgets.Poll(n,o,i)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(C,"contextType",d),r(C,"defaultProps",{elementId:"vk_poll",options:{height:24}});var P=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.ownerId,i=t.postId,r=t.hash,s=t.options;e.Widgets.Post(n,o,i,r,s)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(P,"contextType",d),r(P,"defaultProps",{elementId:"vk_post",options:{}});var W=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options;e.Widgets.Recommended(n,o)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(W,"contextType",d),r(W,"defaultProps",{elementId:"vk_recommend",options:{limit:5,max:20,period:"week",sort:"friend_like",target:"parent"}});var M=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"componentWillUnmount",value:function(){var e=this.context.vk;e.Observer.unsubscribe("widgets.subscribed"),e.Observer.unsubscribe("widgets.unsubscribed")}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.options,i=t.ownerId,r=t.onSubscribe,s=t.onUnsubscribe;e.Widgets.Subscribe(n,o,i),e.Observer.subscribe("widgets.subscribed",r),e.Observer.subscribe("widgets.unsubscribed",s)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(M,"contextType",d),r(M,"defaultProps",{elementId:"vk_subscribe",options:{mode:0,soft:0},onSubscribe:function(){},onUnsubscribe:function(){}});var E=function(e){function o(){return n(this,o),a(this,c(o).apply(this,arguments))}return u(o,t.Component),i(o,[{key:"componentDidMount",value:function(){this.mount()}},{key:"mount",value:function(){var e=this.context.vk,t=this.props,n=t.elementId,o=t.articleUrl;e.Widgets.Article(n,o)}},{key:"render",value:function(){var e=this.props.elementId;return t.createElement("div",{id:e})}}]),o}();r(E,"contextType",d),r(E,"defaultProps",{elementId:"vk_article"}),e.default=f,e.AllowMessagesFromCommunity=h,e.Application=y,e.Auth=b,e.Comments=k,e.CommentsBrowse=g,e.CommunityMessages=w,e.ContactUs=I,e.Group=x,e.Like=O,e.Playlist=_,e.Poll=C,e.Post=P,e.Recommended=W,e.Subscribe=M,e.Article=E,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=react-vk.umd.production.min.js.map
{
"name": "react-vk",
"private": false,
"version": "4.0.0",
"version": "4.0.1",
"main": "dist/react-vk.cjs.js",

@@ -46,7 +46,7 @@ "module": "dist/react-vk.esm.js",

"peerDependencies": {
"react": "16.6.x"
"react": ">= 16.6.x"
},
"devDependencies": {
"@babel/cli": "^7.2.0",
"@babel/core": "^7.2.0",
"@babel/core": "^7.2.2",
"@babel/plugin-proposal-class-properties": "^7.2.1",

@@ -68,3 +68,3 @@ "@babel/plugin-proposal-object-rest-spread": "^7.2.0",

"eslint-plugin-react": "^7.11.1",
"husky": "^1.2.0",
"husky": "^1.3.0",
"jest": "^23.5.0",

@@ -74,5 +74,5 @@ "lint-staged": "^8.1.0",

"prop-types": "^15.6.2",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"rollup": "^0.67.4",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"rollup": "^0.68.1",
"rollup-plugin-babel": "^4.1.0",

@@ -79,0 +79,0 @@ "rollup-plugin-commonjs": "^9.2.0",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc