auth0-lock 11.34.1 → 12.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.browserslistrc +1 -0
- package/.circleci/config.yml +4 -2
- package/.eslintrc.json +5 -5
- package/.github/workflows/codeql.yml +41 -0
- package/.shiprc +4 -5
- package/CHANGELOG.md +32 -0
- package/EXAMPLES.md +626 -0
- package/README.md +77 -649
- package/karma.conf.js +1 -1
- package/lib/CSSCore.js +1 -4
- package/lib/__tests__/auth_button.js +12 -22
- package/lib/__tests__/connection/database/actions.js +48 -49
- package/lib/__tests__/connection/database/index.js +22 -28
- package/lib/__tests__/connection/database/login_pane.js +20 -41
- package/lib/__tests__/connection/database/password_reset_confirmation.js +19 -26
- package/lib/__tests__/connection/database/reset_password.js +17 -39
- package/lib/__tests__/connection/database/signed_up_confirmation.js +19 -26
- package/lib/__tests__/connection/enterprise/actions.js +22 -47
- package/lib/__tests__/connection/enterprise/hrd_pane.js +16 -33
- package/lib/__tests__/connection/enterprise/hrd_screen.js +26 -40
- package/lib/__tests__/connection/enterprise/quick_auth_screen.js +27 -68
- package/lib/__tests__/connection/passwordless/ask_vcode.js +29 -51
- package/lib/__tests__/connection/passwordless/email_sent_confirmation.js +19 -26
- package/lib/__tests__/connection/passwordless/passwordless.js +35 -97
- package/lib/__tests__/core/actions.js +23 -46
- package/lib/__tests__/core/client/index.js +10 -13
- package/lib/__tests__/core/index.js +46 -94
- package/lib/__tests__/core/remote_data.js +14 -20
- package/lib/__tests__/core/signed_in_confirmation.js +19 -26
- package/lib/__tests__/core/sso/last_login_screen.js +27 -50
- package/lib/__tests__/core/tenant.js +10 -12
- package/lib/__tests__/core/web_api/helper.js +6 -14
- package/lib/__tests__/core/web_api/p2_api.js +38 -33
- package/lib/__tests__/core/web_api.js +37 -33
- package/lib/__tests__/engine/classic/login.js +20 -41
- package/lib/__tests__/engine/classic/mfa_login_screen.js +6 -19
- package/lib/__tests__/engine/classic/sign_up_pane.js +33 -55
- package/lib/__tests__/engine/classic/sign_up_screen.js +18 -45
- package/lib/__tests__/engine/classic.js +13 -6
- package/lib/__tests__/engine/passwordless.js +2 -5
- package/lib/__tests__/field/captcha/recaptcha_enterprise.js +27 -27
- package/lib/__tests__/field/captcha/recaptchav2.js +27 -27
- package/lib/__tests__/field/captcha.js +39 -51
- package/lib/__tests__/field/custom_input.js +23 -47
- package/lib/__tests__/field/email.js +2 -3
- package/lib/__tests__/field/email_pane.js +25 -48
- package/lib/__tests__/field/field.js +9 -13
- package/lib/__tests__/field/login_pane.js +30 -34
- package/lib/__tests__/field/mfa_code_pane.js +13 -28
- package/lib/__tests__/field/option_selection_pane.js +7 -25
- package/lib/__tests__/field/password.js +6 -12
- package/lib/__tests__/field/password_pane.js +29 -46
- package/lib/__tests__/field/phone_number_pane.js +18 -41
- package/lib/__tests__/field/social_buttons_pane.js +30 -47
- package/lib/__tests__/field/username.js +27 -48
- package/lib/__tests__/field/username_pane.js +30 -47
- package/lib/__tests__/field/vcode.js +5 -13
- package/lib/__tests__/field/vcode_pane.js +20 -44
- package/lib/__tests__/i18n.js +28 -53
- package/lib/__tests__/quick-auth/actions.js +4 -27
- package/lib/__tests__/setup-tests.js +7 -9
- package/lib/__tests__/testUtils.js +41 -58
- package/lib/__tests__/ui/box/chrome.js +24 -49
- package/lib/__tests__/ui/box/confirmation_pane.js +19 -36
- package/lib/__tests__/ui/box/container.js +21 -46
- package/lib/__tests__/ui/box/global_message.js +60 -37
- package/lib/__tests__/ui/input/email_input.js +6 -17
- package/lib/__tests__/ui/input/input_wrap.js +6 -19
- package/lib/__tests__/ui/input/password/password_strength.js +13 -15
- package/lib/__tests__/ui/input/password_input.js +22 -27
- package/lib/__tests__/utils/format.js +10 -17
- package/lib/__tests__/utils/url_utils.js +2 -5
- package/lib/avatar/gravatar_provider.js +13 -28
- package/lib/avatar.js +22 -41
- package/lib/browser.js +372 -23
- package/lib/connection/captcha.js +14 -32
- package/lib/connection/database/actions.js +39 -108
- package/lib/connection/database/index.js +90 -191
- package/lib/connection/database/login_pane.js +107 -147
- package/lib/connection/database/login_sign_up_tabs.js +106 -125
- package/lib/connection/database/mfa_pane.js +50 -69
- package/lib/connection/database/password_reset_confirmation.js +51 -73
- package/lib/connection/database/reset_password.js +116 -132
- package/lib/connection/database/reset_password_pane.js +45 -56
- package/lib/connection/database/sign_up_terms.js +17 -23
- package/lib/connection/database/signed_up_confirmation.js +52 -75
- package/lib/connection/enterprise/actions.js +23 -52
- package/lib/connection/enterprise/hrd_pane.js +60 -76
- package/lib/connection/enterprise/hrd_screen.js +60 -75
- package/lib/connection/enterprise/kerberos_screen.js +46 -60
- package/lib/connection/enterprise/quick_auth_screen.js +46 -64
- package/lib/connection/enterprise/single_sign_on_notice.js +14 -26
- package/lib/connection/enterprise.js +51 -84
- package/lib/connection/passwordless/actions.js +29 -62
- package/lib/connection/passwordless/ask_vcode.js +53 -60
- package/lib/connection/passwordless/email_sent_confirmation.js +129 -179
- package/lib/connection/passwordless/index.js +36 -68
- package/lib/connection/social/index.js +12 -15
- package/lib/core/actions.js +33 -85
- package/lib/core/client/index.js +38 -58
- package/lib/core/client/settings.js +12 -20
- package/lib/core/error_screen.js +38 -52
- package/lib/core/index.js +152 -301
- package/lib/core/loading_screen.js +61 -71
- package/lib/core/pane_separator.js +10 -10
- package/lib/core/remote_data.js +28 -48
- package/lib/core/screen.js +85 -79
- package/lib/core/signed_in_confirmation.js +51 -73
- package/lib/core/sso/data.js +9 -17
- package/lib/core/sso/index.js +5 -6
- package/lib/core/sso/last_login_screen.js +46 -63
- package/lib/core/tenant/index.js +37 -59
- package/lib/core/tenant/settings.js +11 -15
- package/lib/core/web_api/helper.js +24 -30
- package/lib/core/web_api/p2_api.js +156 -165
- package/lib/core/web_api.js +101 -90
- package/lib/core.js +126 -160
- package/lib/engine/classic/login.js +92 -144
- package/lib/engine/classic/mfa_login_screen.js +61 -67
- package/lib/engine/classic/sign_up_pane.js +89 -123
- package/lib/engine/classic/sign_up_screen.js +112 -158
- package/lib/engine/classic.js +122 -183
- package/lib/engine/passwordless/social_or_email_login_screen.js +71 -106
- package/lib/engine/passwordless/social_or_phone_number_login_screen.js +70 -100
- package/lib/engine/passwordless.js +75 -104
- package/lib/field/actions.js +11 -17
- package/lib/field/captcha/captcha_pane.js +82 -102
- package/lib/field/captcha/recaptcha.js +140 -145
- package/lib/field/captcha.js +7 -10
- package/lib/field/custom_input.js +37 -50
- package/lib/field/email/email_pane.js +90 -109
- package/lib/field/email.js +17 -35
- package/lib/field/index.js +51 -88
- package/lib/field/mfa-code/mfa_code_pane.js +57 -71
- package/lib/field/mfa_code.js +15 -21
- package/lib/field/option_selection_pane.js +16 -22
- package/lib/field/password/password_pane.js +79 -91
- package/lib/field/password.js +8 -14
- package/lib/field/phone-number/locations.js +7 -3
- package/lib/field/phone-number/phone_number_pane.js +87 -124
- package/lib/field/phone_number.js +16 -30
- package/lib/field/social/event.js +9 -12
- package/lib/field/social/social_buttons_pane.js +93 -121
- package/lib/field/username/username_pane.js +105 -123
- package/lib/field/username.js +16 -26
- package/lib/field/vcode/vcode_pane.js +67 -93
- package/lib/field/vcode.js +5 -5
- package/lib/i18n/af.js +7 -4
- package/lib/i18n/ar.js +7 -4
- package/lib/i18n/az.js +7 -4
- package/lib/i18n/bg.js +7 -4
- package/lib/i18n/ca.js +7 -4
- package/lib/i18n/cs.js +7 -4
- package/lib/i18n/da.js +7 -4
- package/lib/i18n/de.js +7 -3
- package/lib/i18n/el.js +7 -4
- package/lib/i18n/en.js +9 -4
- package/lib/i18n/es.js +7 -3
- package/lib/i18n/et.js +7 -4
- package/lib/i18n/fa.js +7 -4
- package/lib/i18n/fi.js +7 -4
- package/lib/i18n/fr.js +7 -4
- package/lib/i18n/he.js +7 -4
- package/lib/i18n/hr.js +7 -4
- package/lib/i18n/hu.js +7 -4
- package/lib/i18n/id.js +7 -4
- package/lib/i18n/it.js +7 -3
- package/lib/i18n/ja.js +7 -4
- package/lib/i18n/ko.js +7 -4
- package/lib/i18n/lt.js +7 -4
- package/lib/i18n/lv.js +7 -4
- package/lib/i18n/ms.js +7 -4
- package/lib/i18n/nb.js +7 -4
- package/lib/i18n/nl.js +7 -4
- package/lib/i18n/nn.js +7 -4
- package/lib/i18n/no.js +7 -4
- package/lib/i18n/pl.js +7 -4
- package/lib/i18n/pt-br.js +7 -3
- package/lib/i18n/pt.js +7 -4
- package/lib/i18n/ro.js +7 -4
- package/lib/i18n/ru.js +7 -4
- package/lib/i18n/sk.js +7 -4
- package/lib/i18n/sl.js +7 -4
- package/lib/i18n/sr.js +7 -4
- package/lib/i18n/sv.js +7 -4
- package/lib/i18n/tr.js +7 -4
- package/lib/i18n/ua.js +7 -4
- package/lib/i18n/uk.js +7 -4
- package/lib/i18n/vi.js +7 -4
- package/lib/i18n/zh-tw.js +7 -4
- package/lib/i18n/zh.js +7 -4
- package/lib/i18n.js +38 -75
- package/lib/index.js +14 -17
- package/lib/lock.js +29 -32
- package/lib/passwordless.js +29 -31
- package/lib/quick-auth/actions.js +19 -26
- package/lib/quick_auth.js +8 -10
- package/lib/sanitizer.js +5 -5
- package/lib/store/index.js +22 -42
- package/lib/sync.js +21 -42
- package/lib/ui/box/button.js +85 -105
- package/lib/ui/box/chrome.js +463 -548
- package/lib/ui/box/confirmation_pane.js +34 -48
- package/lib/ui/box/container.js +305 -339
- package/lib/ui/box/global_message.js +51 -60
- package/lib/ui/box/header.js +155 -177
- package/lib/ui/box/multisize_slide.js +233 -229
- package/lib/ui/box/success_pane.js +34 -37
- package/lib/ui/box.js +88 -93
- package/lib/ui/button/auth_button.js +44 -51
- package/lib/ui/input/captcha_input.js +162 -181
- package/lib/ui/input/checkbox_input.js +57 -59
- package/lib/ui/input/email_input.js +117 -124
- package/lib/ui/input/input_wrap.js +65 -80
- package/lib/ui/input/location_input.js +130 -150
- package/lib/ui/input/mfa_code_input.js +98 -98
- package/lib/ui/input/password/password_strength.js +103 -127
- package/lib/ui/input/password_input.js +141 -147
- package/lib/ui/input/phone_number_input.js +101 -109
- package/lib/ui/input/select_input.js +120 -132
- package/lib/ui/input/text_input.js +89 -84
- package/lib/ui/input/username_input.js +109 -115
- package/lib/ui/input/vcode_input.js +110 -118
- package/lib/ui/list.js +224 -247
- package/lib/ui/pane/quick_auth_pane.js +55 -80
- package/lib/utils/atom.js +55 -48
- package/lib/utils/cache.js +54 -43
- package/lib/utils/cdn_utils.js +17 -31
- package/lib/utils/createRef.js +3 -1
- package/lib/utils/data_utils.js +10 -16
- package/lib/utils/fn_utils.js +5 -4
- package/lib/utils/format.js +6 -8
- package/lib/utils/id_utils.js +4 -3
- package/lib/utils/jsonp_utils.js +20 -17
- package/lib/utils/media_utils.js +4 -2
- package/lib/utils/preload_utils.js +4 -3
- package/lib/utils/string_utils.js +4 -4
- package/lib/utils/url_utils.js +4 -3
- package/opslevel.yml +6 -0
- package/package.json +53 -38
- package/webpack.config.js +36 -3
|
@@ -1,118 +1,98 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _propTypes = require(
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
var l = _interopRequireWildcard(_index);
|
|
20
|
-
|
|
21
|
-
var _index2 = require('../../store/index');
|
|
22
|
-
|
|
23
|
-
var _captcha = require('../captcha');
|
|
24
|
-
|
|
25
|
-
var captchaField = _interopRequireWildcard(_captcha);
|
|
26
|
-
|
|
27
|
-
var _index3 = require('../index');
|
|
28
|
-
|
|
29
|
-
var _recaptcha = require('./recaptcha');
|
|
30
|
-
|
|
31
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
32
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _captcha_input = _interopRequireDefault(require("../../ui/input/captcha_input"));
|
|
11
|
+
var l = _interopRequireWildcard(require("../../core/index"));
|
|
12
|
+
var _index2 = require("../../store/index");
|
|
13
|
+
var captchaField = _interopRequireWildcard(require("../captcha"));
|
|
14
|
+
var _index3 = require("../index");
|
|
15
|
+
var _recaptcha = require("./recaptcha");
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
34
|
-
|
|
35
19
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
36
|
-
|
|
37
|
-
function
|
|
38
|
-
|
|
39
|
-
function
|
|
40
|
-
|
|
41
|
-
|
|
20
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
21
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
22
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
23
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
25
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
26
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
27
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
28
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
29
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
30
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
31
|
+
var CaptchaPane = /*#__PURE__*/function (_React$Component) {
|
|
42
32
|
_inherits(CaptchaPane, _React$Component);
|
|
43
|
-
|
|
33
|
+
var _super = _createSuper(CaptchaPane);
|
|
44
34
|
function CaptchaPane() {
|
|
45
35
|
_classCallCheck(this, CaptchaPane);
|
|
46
|
-
|
|
47
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
36
|
+
return _super.apply(this, arguments);
|
|
48
37
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
38
|
+
_createClass(CaptchaPane, [{
|
|
39
|
+
key: "render",
|
|
40
|
+
value: function render() {
|
|
41
|
+
var _this$props = this.props,
|
|
42
|
+
i18n = _this$props.i18n,
|
|
43
|
+
lock = _this$props.lock,
|
|
44
|
+
onReload = _this$props.onReload;
|
|
45
|
+
var lockId = l.id(lock);
|
|
46
|
+
var captcha = l.captcha(lock);
|
|
47
|
+
var value = (0, _index3.getFieldValue)(lock, 'captcha');
|
|
48
|
+
var isValid = !(0, _index3.isFieldVisiblyInvalid)(lock, 'captcha');
|
|
49
|
+
var provider = captcha.get('provider');
|
|
50
|
+
if ((0, _recaptcha.isRecaptcha)(provider)) {
|
|
51
|
+
function _handleChange(value) {
|
|
52
|
+
(0, _index2.swap)(_index2.updateEntity, 'lock', lockId, captchaField.set, value);
|
|
53
|
+
}
|
|
54
|
+
function reset() {
|
|
55
|
+
_handleChange();
|
|
56
|
+
}
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement(_recaptcha.ReCAPTCHA, {
|
|
58
|
+
provider: provider,
|
|
59
|
+
sitekey: captcha.get('siteKey'),
|
|
60
|
+
onChange: _handleChange,
|
|
61
|
+
onExpired: reset,
|
|
62
|
+
hl: l.ui.language(lock),
|
|
63
|
+
isValid: isValid,
|
|
64
|
+
value: value
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function handleChange(e) {
|
|
68
|
+
(0, _index2.swap)(_index2.updateEntity, 'lock', lockId, captchaField.set, e.target.value);
|
|
69
|
+
}
|
|
70
|
+
var placeholder = captcha.get('type') === 'code' ? i18n.str("captchaCodeInputPlaceholder") : i18n.str("captchaMathInputPlaceholder");
|
|
71
|
+
|
|
72
|
+
// TODO: blankErrorHint is deprecated.
|
|
73
|
+
// It is kept for backwards compatibility in the code for the customers overwriting
|
|
74
|
+
// it with languageDictionary. It can be removed in the next major release.
|
|
75
|
+
return /*#__PURE__*/_react.default.createElement(_captcha_input.default, {
|
|
76
|
+
lockId: lockId,
|
|
77
|
+
image: captcha.get('image'),
|
|
78
|
+
placeholder: placeholder,
|
|
77
79
|
isValid: isValid,
|
|
78
|
-
|
|
80
|
+
onChange: handleChange,
|
|
81
|
+
onReload: onReload,
|
|
82
|
+
value: value,
|
|
83
|
+
invalidHint: i18n.str('blankErrorHint') || i18n.str('blankCaptchaErrorHint')
|
|
79
84
|
});
|
|
80
85
|
}
|
|
81
|
-
|
|
82
|
-
function handleChange(e) {
|
|
83
|
-
(0, _index2.swap)(_index2.updateEntity, 'lock', lockId, captchaField.set, e.target.value);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
var placeholder = captcha.get('type') === 'code' ? i18n.str('captchaCodeInputPlaceholder') : i18n.str('captchaMathInputPlaceholder');
|
|
87
|
-
|
|
88
|
-
// TODO: blankErrorHint is deprecated.
|
|
89
|
-
// It is kept for backwards compatibiliy in the code for the customers overwriting
|
|
90
|
-
// it with languageDictionary. It can be removed in the next major release.
|
|
91
|
-
return _react2.default.createElement(_captcha_input2.default, {
|
|
92
|
-
lockId: lockId,
|
|
93
|
-
image: captcha.get('image'),
|
|
94
|
-
placeholder: placeholder,
|
|
95
|
-
isValid: isValid,
|
|
96
|
-
onChange: handleChange,
|
|
97
|
-
onReload: onReload,
|
|
98
|
-
value: value,
|
|
99
|
-
invalidHint: i18n.str('blankErrorHint') || i18n.str('blankCaptchaErrorHint')
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
|
|
86
|
+
}]);
|
|
103
87
|
return CaptchaPane;
|
|
104
|
-
}(
|
|
105
|
-
|
|
88
|
+
}(_react.default.Component);
|
|
106
89
|
exports.default = CaptchaPane;
|
|
107
|
-
|
|
108
|
-
|
|
109
90
|
CaptchaPane.propTypes = {
|
|
110
|
-
i18n:
|
|
111
|
-
lock:
|
|
112
|
-
error:
|
|
113
|
-
onReload:
|
|
91
|
+
i18n: _propTypes.default.object.isRequired,
|
|
92
|
+
lock: _propTypes.default.object.isRequired,
|
|
93
|
+
error: _propTypes.default.bool,
|
|
94
|
+
onReload: _propTypes.default.func.isRequired
|
|
114
95
|
};
|
|
115
|
-
|
|
116
96
|
CaptchaPane.defaultProps = {
|
|
117
97
|
error: false
|
|
118
98
|
};
|
|
@@ -1,35 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
var _propTypes = require('prop-types');
|
|
13
|
-
|
|
14
|
-
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
15
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.isRecaptcha = exports.ReCAPTCHA = void 0;
|
|
8
|
+
var _createRef = require("../../utils/createRef");
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
12
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
13
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
14
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
15
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
16
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
17
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
18
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
19
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
20
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
21
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
24
24
|
var noop = function noop() {};
|
|
25
|
-
|
|
26
25
|
var RECAPTCHA_V2_PROVIDER = 'recaptcha_v2';
|
|
27
26
|
var RECAPTCHA_ENTERPRISE_PROVIDER = 'recaptcha_enterprise';
|
|
28
|
-
|
|
29
|
-
var isRecaptcha = exports.isRecaptcha = function isRecaptcha(provider) {
|
|
27
|
+
var isRecaptcha = function isRecaptcha(provider) {
|
|
30
28
|
return provider === RECAPTCHA_ENTERPRISE_PROVIDER || provider === RECAPTCHA_V2_PROVIDER;
|
|
31
29
|
};
|
|
32
|
-
|
|
30
|
+
exports.isRecaptcha = isRecaptcha;
|
|
33
31
|
var getRecaptchaProvider = function getRecaptchaProvider(provider) {
|
|
34
32
|
switch (provider) {
|
|
35
33
|
case RECAPTCHA_V2_PROVIDER:
|
|
@@ -38,166 +36,163 @@ var getRecaptchaProvider = function getRecaptchaProvider(provider) {
|
|
|
38
36
|
return window.grecaptcha.enterprise;
|
|
39
37
|
}
|
|
40
38
|
};
|
|
41
|
-
|
|
42
39
|
var scriptForProvider = function scriptForProvider(provider, lang, callback) {
|
|
43
40
|
switch (provider) {
|
|
44
41
|
case RECAPTCHA_V2_PROVIDER:
|
|
45
|
-
return
|
|
42
|
+
return "https://www.recaptcha.net/recaptcha/api.js?hl=".concat(lang, "&onload=").concat(callback);
|
|
46
43
|
case RECAPTCHA_ENTERPRISE_PROVIDER:
|
|
47
|
-
return
|
|
44
|
+
return "https://www.recaptcha.net/recaptcha/enterprise.js?render=explicit&hl=".concat(lang, "&onload=").concat(callback);
|
|
48
45
|
}
|
|
49
46
|
};
|
|
50
|
-
|
|
51
|
-
var ReCAPTCHA = exports.ReCAPTCHA = function (_React$Component) {
|
|
47
|
+
var ReCAPTCHA = /*#__PURE__*/function (_React$Component) {
|
|
52
48
|
_inherits(ReCAPTCHA, _React$Component);
|
|
53
|
-
|
|
49
|
+
var _super = _createSuper(ReCAPTCHA);
|
|
54
50
|
function ReCAPTCHA(props) {
|
|
51
|
+
var _this;
|
|
55
52
|
_classCallCheck(this, ReCAPTCHA);
|
|
56
|
-
|
|
57
|
-
var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
|
|
58
|
-
|
|
53
|
+
_this = _super.call(this, props);
|
|
59
54
|
_this.state = {};
|
|
60
55
|
//this version of react doesn't have React.createRef
|
|
61
56
|
_this.ref = (0, _createRef.createRef)();
|
|
62
|
-
|
|
63
57
|
_this.changeHandler = function (value) {
|
|
64
|
-
_this.setState({
|
|
58
|
+
_this.setState({
|
|
59
|
+
value: value
|
|
60
|
+
}, function () {
|
|
65
61
|
_this.props.onChange(value);
|
|
66
62
|
});
|
|
67
63
|
};
|
|
68
|
-
|
|
69
64
|
_this.expiredHandler = function () {
|
|
70
65
|
var value = '';
|
|
71
|
-
_this.setState({
|
|
66
|
+
_this.setState({
|
|
67
|
+
value: value
|
|
68
|
+
}, function () {
|
|
72
69
|
_this.props.onChange(value);
|
|
73
70
|
_this.props.onExpired();
|
|
74
71
|
});
|
|
75
72
|
};
|
|
76
|
-
|
|
77
73
|
_this.erroredHandler = function () {
|
|
78
74
|
var value = '';
|
|
79
|
-
_this.setState({
|
|
75
|
+
_this.setState({
|
|
76
|
+
value: value
|
|
77
|
+
}, function () {
|
|
80
78
|
_this.props.onChange(value);
|
|
81
79
|
_this.props.onErrored();
|
|
82
80
|
});
|
|
83
81
|
};
|
|
84
82
|
return _this;
|
|
85
83
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
var callbackName = 'recatpchaCallback_' + Math.floor(Math.random() * 1000001);
|
|
92
|
-
var scriptUrl = scriptForProvider(props.provider, props.hl, callbackName);
|
|
93
|
-
var script = document.createElement('script');
|
|
94
|
-
|
|
95
|
-
window[callbackName] = function () {
|
|
96
|
-
delete window[callbackName];
|
|
97
|
-
callback(null, script);
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
script.src = scriptUrl;
|
|
101
|
-
script.async = true;
|
|
102
|
-
element.appendChild(script);
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
ReCAPTCHA.prototype.componentWillUnmount = function componentWillUnmount() {
|
|
106
|
-
if (!this.scriptNode) {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
document.body.removeChild(this.scriptNode);
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
ReCAPTCHA.prototype.componentDidMount = function componentDidMount() {
|
|
113
|
-
var _this2 = this;
|
|
114
|
-
|
|
115
|
-
ReCAPTCHA.loadScript(this.props, document.body, function (err, scriptNode) {
|
|
116
|
-
_this2.scriptNode = scriptNode;
|
|
117
|
-
var provider = getRecaptchaProvider(_this2.props.provider);
|
|
118
|
-
|
|
119
|
-
// if this is enterprise then we change this to window.grecaptcha.enterprise.render
|
|
120
|
-
_this2.widgetId = provider.render(_this2.ref.current, {
|
|
121
|
-
callback: _this2.changeHandler,
|
|
122
|
-
'expired-callback': _this2.expiredHandler,
|
|
123
|
-
'error-callback': _this2.erroredHandler,
|
|
124
|
-
sitekey: _this2.props.sitekey
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
ReCAPTCHA.prototype.reset = function reset() {
|
|
130
|
-
var provider = getRecaptchaProvider(this.props.provider);
|
|
131
|
-
provider.reset(this.widgetId);
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
ReCAPTCHA.prototype.render = function render() {
|
|
135
|
-
/*
|
|
136
|
-
This is an override for the following conflicting css-rule:
|
|
137
|
-
@media screen and (max-width: 480px)
|
|
138
|
-
html.auth0-lock-html body > * {
|
|
139
|
-
display: none;
|
|
140
|
-
}
|
|
141
|
-
*/
|
|
142
|
-
var fixInterval = setInterval(function () {
|
|
143
|
-
var iframes = Array.from(document.querySelectorAll('iframe[src*="recaptcha"]'));
|
|
144
|
-
|
|
145
|
-
var containers = iframes.map(function (iframe) {
|
|
146
|
-
return iframe.parentNode.parentNode;
|
|
147
|
-
}).filter(function (container) {
|
|
148
|
-
return container && container.parentNode === document.body && container.style.display !== 'block';
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
if (containers.length === 0) {
|
|
84
|
+
_createClass(ReCAPTCHA, [{
|
|
85
|
+
key: "componentWillUnmount",
|
|
86
|
+
value: function componentWillUnmount() {
|
|
87
|
+
if (!this.scriptNode) {
|
|
152
88
|
return;
|
|
153
89
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
90
|
+
document.body.removeChild(this.scriptNode);
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
key: "componentDidMount",
|
|
94
|
+
value: function componentDidMount() {
|
|
95
|
+
var _this2 = this;
|
|
96
|
+
ReCAPTCHA.loadScript(this.props, document.body, function (err, scriptNode) {
|
|
97
|
+
_this2.scriptNode = scriptNode;
|
|
98
|
+
var provider = getRecaptchaProvider(_this2.props.provider);
|
|
99
|
+
|
|
100
|
+
// if this is enterprise then we change this to window.grecaptcha.enterprise.render
|
|
101
|
+
_this2.widgetId = provider.render(_this2.ref.current, {
|
|
102
|
+
callback: _this2.changeHandler,
|
|
103
|
+
'expired-callback': _this2.expiredHandler,
|
|
104
|
+
'error-callback': _this2.erroredHandler,
|
|
105
|
+
sitekey: _this2.props.sitekey
|
|
106
|
+
});
|
|
157
107
|
});
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
108
|
+
}
|
|
109
|
+
}, {
|
|
110
|
+
key: "reset",
|
|
111
|
+
value: function reset() {
|
|
112
|
+
var provider = getRecaptchaProvider(this.props.provider);
|
|
113
|
+
provider.reset(this.widgetId);
|
|
114
|
+
}
|
|
115
|
+
}, {
|
|
116
|
+
key: "render",
|
|
117
|
+
value: function render() {
|
|
118
|
+
/*
|
|
119
|
+
This is an override for the following conflicting css-rule:
|
|
120
|
+
@media screen and (max-width: 480px)
|
|
121
|
+
html.auth0-lock-html body > * {
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
124
|
+
*/
|
|
125
|
+
var fixInterval = setInterval(function () {
|
|
126
|
+
var iframes = Array.from(document.querySelectorAll("iframe[src*=\"recaptcha\"]"));
|
|
127
|
+
var containers = iframes.map(function (iframe) {
|
|
128
|
+
return iframe.parentNode.parentNode;
|
|
129
|
+
}).filter(function (container) {
|
|
130
|
+
return container && container.parentNode === document.body && container.style.display !== 'block';
|
|
131
|
+
});
|
|
132
|
+
if (containers.length === 0) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
containers.forEach(function (iframe) {
|
|
136
|
+
iframe.style.display = 'block';
|
|
137
|
+
});
|
|
138
|
+
clearInterval(fixInterval);
|
|
139
|
+
}, 300);
|
|
140
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
165
141
|
className: this.props.isValid ? 'auth0-lock-recaptcha-block' : 'auth0-lock-recaptcha-block auth0-lock-recaptcha-block-error'
|
|
166
|
-
},
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
ReCAPTCHA.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {
|
|
172
|
-
if (nextProps.value !== prevState.value) {
|
|
173
|
-
return { value: nextProps.value };
|
|
174
|
-
} else {
|
|
175
|
-
return null;
|
|
142
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
143
|
+
className: "auth0-lock-recaptchav2",
|
|
144
|
+
ref: this.ref
|
|
145
|
+
}));
|
|
176
146
|
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
147
|
+
}, {
|
|
148
|
+
key: "componentDidUpdate",
|
|
149
|
+
value: function componentDidUpdate(prevProps, prevState) {
|
|
150
|
+
if (prevProps.value !== this.props.value && this.props.value === '') {
|
|
151
|
+
this.reset();
|
|
152
|
+
}
|
|
182
153
|
}
|
|
183
|
-
}
|
|
184
|
-
|
|
154
|
+
}], [{
|
|
155
|
+
key: "loadScript",
|
|
156
|
+
value: function loadScript(props) {
|
|
157
|
+
var element = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document.body;
|
|
158
|
+
var callback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;
|
|
159
|
+
var callbackName = "recatpchaCallback_".concat(Math.floor(Math.random() * 1000001));
|
|
160
|
+
var scriptUrl = scriptForProvider(props.provider, props.hl, callbackName);
|
|
161
|
+
var script = document.createElement('script');
|
|
162
|
+
window[callbackName] = function () {
|
|
163
|
+
delete window[callbackName];
|
|
164
|
+
callback(null, script);
|
|
165
|
+
};
|
|
166
|
+
script.src = scriptUrl;
|
|
167
|
+
script.async = true;
|
|
168
|
+
element.appendChild(script);
|
|
169
|
+
}
|
|
170
|
+
}, {
|
|
171
|
+
key: "getDerivedStateFromProps",
|
|
172
|
+
value: function getDerivedStateFromProps(nextProps, prevState) {
|
|
173
|
+
if (nextProps.value !== prevState.value) {
|
|
174
|
+
return {
|
|
175
|
+
value: nextProps.value
|
|
176
|
+
};
|
|
177
|
+
} else {
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}]);
|
|
185
182
|
return ReCAPTCHA;
|
|
186
|
-
}(
|
|
187
|
-
|
|
183
|
+
}(_react.default.Component);
|
|
184
|
+
exports.ReCAPTCHA = ReCAPTCHA;
|
|
188
185
|
ReCAPTCHA.displayName = 'ReCAPTCHA';
|
|
189
|
-
|
|
190
186
|
ReCAPTCHA.propTypes = {
|
|
191
|
-
provider:
|
|
192
|
-
sitekey:
|
|
193
|
-
onChange:
|
|
194
|
-
onExpired:
|
|
195
|
-
onErrored:
|
|
196
|
-
hl:
|
|
197
|
-
value:
|
|
198
|
-
isValid:
|
|
187
|
+
provider: _propTypes.default.string.isRequired,
|
|
188
|
+
sitekey: _propTypes.default.string.isRequired,
|
|
189
|
+
onChange: _propTypes.default.func,
|
|
190
|
+
onExpired: _propTypes.default.func,
|
|
191
|
+
onErrored: _propTypes.default.func,
|
|
192
|
+
hl: _propTypes.default.string,
|
|
193
|
+
value: _propTypes.default.string,
|
|
194
|
+
isValid: _propTypes.default.bool
|
|
199
195
|
};
|
|
200
|
-
|
|
201
196
|
ReCAPTCHA.defaultProps = {
|
|
202
197
|
onChange: noop,
|
|
203
198
|
onExpired: noop,
|
package/lib/field/captcha.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
6
|
exports.getValue = getValue;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
exports.reset = reset;
|
|
8
|
+
exports.set = set;
|
|
9
|
+
var _index = require("./index");
|
|
10
10
|
function validate(captcha) {
|
|
11
11
|
return !!captcha;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
13
|
function set(m, captcha, wasInvalid) {
|
|
15
14
|
m = (0, _index.setField)(m, 'captcha', captcha, validate);
|
|
16
15
|
if (wasInvalid) {
|
|
@@ -18,11 +17,9 @@ function set(m, captcha, wasInvalid) {
|
|
|
18
17
|
}
|
|
19
18
|
return m;
|
|
20
19
|
}
|
|
21
|
-
|
|
22
20
|
function reset(m, wasInvalid) {
|
|
23
21
|
return set(m, '', wasInvalid);
|
|
24
22
|
}
|
|
25
|
-
|
|
26
23
|
function getValue(m) {
|
|
27
24
|
return (0, _index.getFieldValue)(m, 'captcha');
|
|
28
25
|
}
|