@hcaptcha/react-hcaptcha
Advanced tools
Comparing version 1.9.4 to 1.10.0
@@ -6,9 +6,8 @@ "use strict"; | ||
}); | ||
exports.breadcrumbMessages = exports.scopeTag = void 0; | ||
var scopeTag = { | ||
exports.scopeTag = exports.breadcrumbMessages = void 0; | ||
var scopeTag = exports.scopeTag = { | ||
key: 'source', | ||
value: '@hCaptcha/react' | ||
}; | ||
exports.scopeTag = scopeTag; | ||
var breadcrumbMessages = { | ||
var breadcrumbMessages = exports.breadcrumbMessages = { | ||
mounted: 'hCaptcha component mounted', | ||
@@ -19,3 +18,2 @@ expired: 'hCaptcha expired', | ||
removed: 'hCaptcha removed' | ||
}; | ||
exports.breadcrumbMessages = breadcrumbMessages; | ||
}; |
@@ -131,2 +131,4 @@ import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; | ||
scriptLocation = _this$props.scriptLocation, | ||
scriptSource = _this$props.scriptSource, | ||
secureApi = _this$props.secureApi, | ||
_this$props$cleanup = _this$props.cleanup, | ||
@@ -148,2 +150,4 @@ cleanup = _this$props$cleanup === void 0 ? true : _this$props$cleanup; | ||
scriptLocation: scriptLocation, | ||
scriptSource: scriptSource, | ||
secureApi: secureApi, | ||
cleanup: cleanup | ||
@@ -221,2 +225,3 @@ }; | ||
// trigger onLoad if it exists | ||
var onLoad = _this4.props.onLoad; | ||
@@ -223,0 +228,0 @@ if (onLoad) onLoad(); |
"use strict"; | ||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var _typeof3 = require("@babel/runtime/helpers/typeof"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -12,6 +12,6 @@ value: true | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -21,11 +21,12 @@ var _loader = require("@hcaptcha/loader"); | ||
var _constants = require("./constants"); | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } | ||
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; } | ||
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); } | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | ||
var HCaptcha = /*#__PURE__*/function (_React$Component) { | ||
(0, _inherits2["default"])(HCaptcha, _React$Component); | ||
var _super = _createSuper(HCaptcha); | ||
function HCaptcha(props) { | ||
var _this; | ||
(0, _classCallCheck2["default"])(this, HCaptcha); | ||
_this = _super.call(this, props); | ||
_this = _callSuper(this, HCaptcha, [props]); | ||
@@ -159,2 +160,4 @@ /** | ||
scriptLocation = _this$props.scriptLocation, | ||
scriptSource = _this$props.scriptSource, | ||
secureApi = _this$props.secureApi, | ||
_this$props$cleanup = _this$props.cleanup, | ||
@@ -176,2 +179,4 @@ cleanup = _this$props$cleanup === void 0 ? true : _this$props$cleanup; | ||
scriptLocation: scriptLocation, | ||
scriptSource: scriptSource, | ||
secureApi: secureApi, | ||
cleanup: cleanup | ||
@@ -257,2 +262,3 @@ }; | ||
// trigger onLoad if it exists | ||
var onLoad = _this4.props.onLoad; | ||
@@ -395,4 +401,3 @@ if (onLoad) onLoad(); | ||
}(React.Component); | ||
var _default = HCaptcha; | ||
exports["default"] = _default; | ||
var _default = exports["default"] = HCaptcha; | ||
module.exports = exports.default; |
{ | ||
"name": "@hcaptcha/react-hcaptcha", | ||
"version": "1.9.4", | ||
"version": "1.10.0", | ||
"types": "types/index.d.ts", | ||
@@ -56,2 +56,3 @@ "main": "dist/index.js", | ||
"rimraf": "^3.0.2", | ||
"wait-for-expect": "^3.0.2", | ||
"webpack": "^5.76.3", | ||
@@ -63,4 +64,4 @@ "webpack-cli": "^5.0.1", | ||
"@babel/runtime": "^7.17.9", | ||
"@hcaptcha/loader": "^1.0.10" | ||
"@hcaptcha/loader": "^1.2.0" | ||
} | ||
} |
@@ -141,2 +141,4 @@ # React hCaptcha Component Library | ||
|`sentry`|String|No|`-`|See enterprise docs.| | ||
|`secureApi`|Boolean|No|`-`|See enterprise docs.| | ||
|`scriptSource`|String|No|`-`|See enterprise docs.| | ||
| `cleanup` | Boolean | No | `true` | Remove script tag after setup.| | ||
@@ -194,3 +196,7 @@ |`custom`|Boolean|No|`-`|Custom theme: see enterprise docs.| | ||
4. #### Avoid conflicts with legacy Sentry package usage on react-hcaptcha 1.9.0+ | ||
If you are using Sentry 7.x in your React app, this can conflict with the upstream `hcaptcha-loader` package's Sentry error tracing. You can avoid this issue by setting the `sentry` prop to `false`. | ||
--- | ||
@@ -197,0 +203,0 @@ ### Contributing |
@@ -142,2 +142,4 @@ import * as React from 'react'; | ||
scriptLocation, | ||
scriptSource, | ||
secureApi, | ||
cleanup = true, | ||
@@ -159,2 +161,4 @@ } = this.props; | ||
scriptLocation, | ||
scriptSource, | ||
secureApi, | ||
cleanup | ||
@@ -161,0 +165,0 @@ }; |
@@ -35,2 +35,5 @@ // Type definitions for @hcaptcha/react-hcaptcha 0.1 | ||
cleanup?: boolean; | ||
custom?: boolean; | ||
secureApi?: boolean; | ||
scriptSource?: string; | ||
} | ||
@@ -37,0 +40,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52793
1146
230
20
Updated@hcaptcha/loader@^1.2.0