Socket
Socket
Sign inDemoInstall

react-tencent-captcha

Package Overview
Dependencies
3
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.4 to 1.0.5

2

dist/tcaptcha.esm.min.js

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

import e from"react";function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var i,c="react-tencent-captcha",u=(i="Function",function(e){return Object.prototype.toString.call(e)==="[object ".concat(i,"]")}),s=function(i){function s(){var t,a,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a=this,i=r(s).apply(this,arguments),t=!i||"object"!=typeof i&&"function"!=typeof i?o(a):i,n(o(t),"init",function(){var e=o(t);if(window.TencentCaptcha)e.ready();else{var n=document.getElementById(c);if(n){if(e.script)return;return n.addEventListener("Im-ready",e.ready.bind(e),!1),void(e.script=n)}var r=document.createElement("script");r.id=c,r.type="text/javascript",r.async=!0,r.charset="utf-8",r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,e.ready(),e.triggerEvent("Im-ready"))}:r.onload=function(){r.onload=null,e.ready(),e.triggerEvent("Im-ready")},r.src="https://ssl.captcha.qq.com/TCaptcha.js?_t=".concat((new Date).getTime());var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r,a),e.script=r}}),n(o(t),"ready",function(e){var n=o(t),r=n.props,a=r.appId,i=r.options,c=r.onCallBack,s=r.onReady;if(window.TencentCaptcha&&!n.instance){var p=new window.TencentCaptcha(n.dom.current,a,c,i);n.instance=p,n.script&&n.script.removeEventListener("Im-ready",n.ready.bind(n),!1),u(s)&&s(p)}}),n(o(t),"destroy",function(){var e=o(t);e.script&&e.script.removeEventListener("Im-ready",e.ready.bind(e),!1),e.instance=null,e.script=null}),n(o(t),"triggerEvent",function(e){var n=o(t);if(n.script){var r=document.createEvent("Event");r.initEvent(e,!0,!0),n.script.dispatchEvent(r)}});var p=o(t);return p.dom=e.createRef(),p.instance=null,p.script=null,t}var p,l,d;return function(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&&a(e,t)}(s,e.PureComponent),p=s,(l=[{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(e,t){this.init()}},{key:"componentWillUnmount",value:function(){this.destroy()}},{key:"render",value:function(){var t=this.props.className;return e.createElement("div",{ref:this.dom,className:t})}}])&&t(p.prototype,l),d&&t(p,d),s}();n(s,"defaultProps",{className:"i-tcaptcha",options:{},onCallBack:function(){},onReady:function(){}});export default s;
import e from"react";function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var i,c="react-tencent-captcha",s=(i="Function",function(e){return Object.prototype.toString.call(e)==="[object ".concat(i,"]")}),u=function(i){function u(){var t,a,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a=this,i=r(u).apply(this,arguments),t=!i||"object"!=typeof i&&"function"!=typeof i?o(a):i,n(o(t),"init",function(){var e=o(t);if(window.TencentCaptcha)e.ready();else{var n=document.getElementById(c);if(n){if(e.script)return;return n.addEventListener("Im-ready",e.ready,!1),void(e.script=n)}var r=document.createElement("script");r.id=c,r.type="text/javascript",r.async=!0,r.charset="utf-8",r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,e.ready(),e.triggerEvent("Im-ready"))}:r.onload=function(){r.onload=null,e.ready(),e.triggerEvent("Im-ready")},r.src="https://ssl.captcha.qq.com/TCaptcha.js?_t=".concat((new Date).getTime());var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r,a),e.script=r}}),n(o(t),"ready",function(e){var n=o(t),r=n.props,a=r.appId,i=r.options,c=r.onCallBack,u=r.onReady;if(window.TencentCaptcha&&!n.instance){var p=new window.TencentCaptcha(n.dom.current,a,c,i);n.instance=p,n.script&&s(n.script.removeEventListener)&&n.script.removeEventListener("Im-ready",n.ready,!1),s(u)&&u(p)}}),n(o(t),"destroy",function(){var e=o(t);e.script&&s(e.script.removeEventListener)&&e.script.removeEventListener("Im-ready",e.ready,!1),e.instance&&s(e.instance.destroy)&&e.instance.destroy(),e.instance=null,e.script=null}),n(o(t),"triggerEvent",function(e){var n=o(t);if(n.script&&s(n.script.dispatchEvent)){var r=document.createEvent("Event");r.initEvent(e,!0,!0),n.script.dispatchEvent(r)}});var p=o(t);return p.dom=e.createRef(),p.instance=null,p.script=null,t}var p,l,d;return function(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&&a(e,t)}(u,e.PureComponent),p=u,(l=[{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(e,t){this.init()}},{key:"componentWillUnmount",value:function(){this.destroy()}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.children;return e.createElement("div",{ref:this.dom,className:n},r)}}])&&t(p.prototype,l),d&&t(p,d),u}();n(u,"defaultProps",{className:"i-tcaptcha",options:{},onCallBack:function(){},onReady:function(){}});export default u;
//# sourceMappingURL=tcaptcha.esm.min.js.map

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

"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var React=_interopDefault(require("react"));function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _inherits(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&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}var SCRIPT_ID="react-tencent-captcha",typeOf=function(e){return function(t){return Object.prototype.toString.call(t)==="[object ".concat(e,"]")}},isFunction=typeOf("Function"),TCaptcha=function(e){function t(){var e;_classCallCheck(this,t),_defineProperty(_assertThisInitialized(e=_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))),"init",function(){var t=_assertThisInitialized(e);if(window.TencentCaptcha)t.ready();else{var n=document.getElementById(SCRIPT_ID);if(n){if(t.script)return;return n.addEventListener("Im-ready",t.ready.bind(t),!1),void(t.script=n)}var r=document.createElement("script");r.id=SCRIPT_ID,r.type="text/javascript",r.async=!0,r.charset="utf-8",r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,t.ready(),t.triggerEvent("Im-ready"))}:r.onload=function(){r.onload=null,t.ready(),t.triggerEvent("Im-ready")},r.src="https://ssl.captcha.qq.com/TCaptcha.js?_t=".concat((new Date).getTime());var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(r,i),t.script=r}}),_defineProperty(_assertThisInitialized(e),"ready",function(t){var n=_assertThisInitialized(e),r=n.props,i=r.appId,a=r.options,o=r.onCallBack,c=r.onReady;if(window.TencentCaptcha&&!n.instance){var s=new window.TencentCaptcha(n.dom.current,i,o,a);n.instance=s,n.script&&n.script.removeEventListener("Im-ready",n.ready.bind(n),!1),isFunction(c)&&c(s)}}),_defineProperty(_assertThisInitialized(e),"destroy",function(){var t=_assertThisInitialized(e);t.script&&t.script.removeEventListener("Im-ready",t.ready.bind(t),!1),t.instance=null,t.script=null}),_defineProperty(_assertThisInitialized(e),"triggerEvent",function(t){var n=_assertThisInitialized(e);if(n.script){var r=document.createEvent("Event");r.initEvent(t,!0,!0),n.script.dispatchEvent(r)}});var n=_assertThisInitialized(e);return n.dom=React.createRef(),n.instance=null,n.script=null,e}return _inherits(t,React.PureComponent),_createClass(t,[{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(e,t){this.init()}},{key:"componentWillUnmount",value:function(){this.destroy()}},{key:"render",value:function(){var e=this.props.className;return React.createElement("div",{ref:this.dom,className:e})}}]),t}();_defineProperty(TCaptcha,"defaultProps",{className:"i-tcaptcha",options:{},onCallBack:function(){},onReady:function(){}}),module.exports=TCaptcha;
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var React=_interopDefault(require("react"));function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _inherits(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&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}var SCRIPT_ID="react-tencent-captcha",typeOf=function(e){return function(t){return Object.prototype.toString.call(t)==="[object ".concat(e,"]")}},isFunction=typeOf("Function"),TCaptcha=function(e){function t(){var e;_classCallCheck(this,t),_defineProperty(_assertThisInitialized(e=_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))),"init",function(){var t=_assertThisInitialized(e);if(window.TencentCaptcha)t.ready();else{var n=document.getElementById(SCRIPT_ID);if(n){if(t.script)return;return n.addEventListener("Im-ready",t.ready,!1),void(t.script=n)}var r=document.createElement("script");r.id=SCRIPT_ID,r.type="text/javascript",r.async=!0,r.charset="utf-8",r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,t.ready(),t.triggerEvent("Im-ready"))}:r.onload=function(){r.onload=null,t.ready(),t.triggerEvent("Im-ready")},r.src="https://ssl.captcha.qq.com/TCaptcha.js?_t=".concat((new Date).getTime());var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(r,i),t.script=r}}),_defineProperty(_assertThisInitialized(e),"ready",function(t){var n=_assertThisInitialized(e),r=n.props,i=r.appId,a=r.options,o=r.onCallBack,c=r.onReady;if(window.TencentCaptcha&&!n.instance){var s=new window.TencentCaptcha(n.dom.current,i,o,a);n.instance=s,n.script&&isFunction(n.script.removeEventListener)&&n.script.removeEventListener("Im-ready",n.ready,!1),isFunction(c)&&c(s)}}),_defineProperty(_assertThisInitialized(e),"destroy",function(){var t=_assertThisInitialized(e);t.script&&isFunction(t.script.removeEventListener)&&t.script.removeEventListener("Im-ready",t.ready,!1),t.instance&&isFunction(t.instance.destroy)&&t.instance.destroy(),t.instance=null,t.script=null}),_defineProperty(_assertThisInitialized(e),"triggerEvent",function(t){var n=_assertThisInitialized(e);if(n.script&&isFunction(n.script.dispatchEvent)){var r=document.createEvent("Event");r.initEvent(t,!0,!0),n.script.dispatchEvent(r)}});var n=_assertThisInitialized(e);return n.dom=React.createRef(),n.instance=null,n.script=null,e}return _inherits(t,React.PureComponent),_createClass(t,[{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(e,t){this.init()}},{key:"componentWillUnmount",value:function(){this.destroy()}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.children;return React.createElement("div",{ref:this.dom,className:t},n)}}]),t}();_defineProperty(TCaptcha,"defaultProps",{className:"i-tcaptcha",options:{},onCallBack:function(){},onReady:function(){}}),module.exports=TCaptcha;
//# sourceMappingURL=tcaptcha.min.js.map

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e=e||self).TCaptcha=t(e.React)}(this,function(e){"use strict";function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}e=e&&e.hasOwnProperty("default")?e.default:e;var i,c="react-tencent-captcha",u=(i="Function",function(e){return Object.prototype.toString.call(e)==="[object ".concat(i,"]")}),s=function(i){function s(){var t,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),o=this,i=r(s).apply(this,arguments),t=!i||"object"!=typeof i&&"function"!=typeof i?a(o):i,n(a(t),"init",function(){var e=a(t);if(window.TencentCaptcha)e.ready();else{var n=document.getElementById(c);if(n){if(e.script)return;return n.addEventListener("Im-ready",e.ready.bind(e),!1),void(e.script=n)}var r=document.createElement("script");r.id=c,r.type="text/javascript",r.async=!0,r.charset="utf-8",r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,e.ready(),e.triggerEvent("Im-ready"))}:r.onload=function(){r.onload=null,e.ready(),e.triggerEvent("Im-ready")},r.src="https://ssl.captcha.qq.com/TCaptcha.js?_t=".concat((new Date).getTime());var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o),e.script=r}}),n(a(t),"ready",function(e){var n=a(t),r=n.props,o=r.appId,i=r.options,c=r.onCallBack,s=r.onReady;if(window.TencentCaptcha&&!n.instance){var p=new window.TencentCaptcha(n.dom.current,o,c,i);n.instance=p,n.script&&n.script.removeEventListener("Im-ready",n.ready.bind(n),!1),u(s)&&s(p)}}),n(a(t),"destroy",function(){var e=a(t);e.script&&e.script.removeEventListener("Im-ready",e.ready.bind(e),!1),e.instance=null,e.script=null}),n(a(t),"triggerEvent",function(e){var n=a(t);if(n.script){var r=document.createEvent("Event");r.initEvent(e,!0,!0),n.script.dispatchEvent(r)}});var p=a(t);return p.dom=e.createRef(),p.instance=null,p.script=null,t}var p,f,d;return function(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&&o(e,t)}(s,e.PureComponent),p=s,(f=[{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(e,t){this.init()}},{key:"componentWillUnmount",value:function(){this.destroy()}},{key:"render",value:function(){var t=this.props.className;return e.createElement("div",{ref:this.dom,className:t})}}])&&t(p.prototype,f),d&&t(p,d),s}();return n(s,"defaultProps",{className:"i-tcaptcha",options:{},onCallBack:function(){},onReady:function(){}}),s});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e=e||self).TCaptcha=t(e.React)}(this,function(e){"use strict";function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}e=e&&e.hasOwnProperty("default")?e.default:e;var i,c="react-tencent-captcha",s=(i="Function",function(e){return Object.prototype.toString.call(e)==="[object ".concat(i,"]")}),u=function(i){function u(){var t,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),o=this,i=r(u).apply(this,arguments),t=!i||"object"!=typeof i&&"function"!=typeof i?a(o):i,n(a(t),"init",function(){var e=a(t);if(window.TencentCaptcha)e.ready();else{var n=document.getElementById(c);if(n){if(e.script)return;return n.addEventListener("Im-ready",e.ready,!1),void(e.script=n)}var r=document.createElement("script");r.id=c,r.type="text/javascript",r.async=!0,r.charset="utf-8",r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,e.ready(),e.triggerEvent("Im-ready"))}:r.onload=function(){r.onload=null,e.ready(),e.triggerEvent("Im-ready")},r.src="https://ssl.captcha.qq.com/TCaptcha.js?_t=".concat((new Date).getTime());var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o),e.script=r}}),n(a(t),"ready",function(e){var n=a(t),r=n.props,o=r.appId,i=r.options,c=r.onCallBack,u=r.onReady;if(window.TencentCaptcha&&!n.instance){var p=new window.TencentCaptcha(n.dom.current,o,c,i);n.instance=p,n.script&&s(n.script.removeEventListener)&&n.script.removeEventListener("Im-ready",n.ready,!1),s(u)&&u(p)}}),n(a(t),"destroy",function(){var e=a(t);e.script&&s(e.script.removeEventListener)&&e.script.removeEventListener("Im-ready",e.ready,!1),e.instance&&s(e.instance.destroy)&&e.instance.destroy(),e.instance=null,e.script=null}),n(a(t),"triggerEvent",function(e){var n=a(t);if(n.script&&s(n.script.dispatchEvent)){var r=document.createEvent("Event");r.initEvent(e,!0,!0),n.script.dispatchEvent(r)}});var p=a(t);return p.dom=e.createRef(),p.instance=null,p.script=null,t}var p,f,d;return function(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&&o(e,t)}(u,e.PureComponent),p=u,(f=[{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(e,t){this.init()}},{key:"componentWillUnmount",value:function(){this.destroy()}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.children;return e.createElement("div",{ref:this.dom,className:n},r)}}])&&t(p.prototype,f),d&&t(p,d),u}();return n(u,"defaultProps",{className:"i-tcaptcha",options:{},onCallBack:function(){},onReady:function(){}}),u});
//# sourceMappingURL=tcaptcha.umd.min.js.map

@@ -59,3 +59,3 @@ {

"unpkg": "dist/tcaptcha.min.js",
"version": "1.0.4"
"version": "1.0.5"
}

@@ -7,3 +7,3 @@ # react-tencent-captcha

```
```bash
$ npm install react-tencent-captcha --save

@@ -44,4 +44,4 @@ ```

# License
## License
MIT

@@ -32,7 +32,2 @@ import React from 'react';

// componentWillMount() {
// const that = this;
// console.log('componentWillMount', that.props, that.state);
// }
componentDidMount() {

@@ -44,7 +39,2 @@ const that = this;

// componentWillReceiveProps(nextProps) {
// const that = this;
// console.log('componentWillReceiveProps', that.props, nextProps);
// }
// shouldComponentUpdate(nextProps, nextState) {

@@ -67,7 +57,2 @@ // const that = this;

// componentWillUpdate(nextProps, nextState) {
// const that = this;
// console.log('componentWillUpdate', that.props, nextProps, that.state, nextState);
// }
componentDidUpdate(prevProps, prevState) {

@@ -101,3 +86,3 @@ const that = this;

script.addEventListener('Im-ready', that.ready.bind(that), false);
script.addEventListener('Im-ready', that.ready, false);
that.script = script;

@@ -155,4 +140,4 @@ return;

if (that.script) {
that.script.removeEventListener('Im-ready', that.ready.bind(that), false);
if (that.script && isFunction(that.script.removeEventListener)) {
that.script.removeEventListener('Im-ready', that.ready, false);
}

@@ -170,7 +155,10 @@

if (that.script) {
that.script.removeEventListener('Im-ready', that.ready.bind(that), false);
if (that.script && isFunction(that.script.removeEventListener)) {
that.script.removeEventListener('Im-ready', that.ready, false);
// that.script.parentNode.removeChild(that.script);
}
// that.script.parentNode.removeChild(that.script);
if (that.instance && isFunction(that.instance.destroy)) {
that.instance.destroy();
}

@@ -186,3 +174,3 @@ that.instance = null;

if (!that.script) {
if (!that.script || !isFunction(that.script.dispatchEvent)) {
return;

@@ -199,6 +187,10 @@ }

// console.log('render');
const { className } = that.props;
const { className, children } = that.props;
return <div ref={that.dom} className={className} />;
return (
<div ref={that.dom} className={className}>
{children}
</div>
);
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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