auth0-lock 11.34.2 → 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 +26 -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,195 +1,176 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
var _input_wrap = require('./input_wrap');
|
|
12
|
-
|
|
13
|
-
var _input_wrap2 = _interopRequireDefault(_input_wrap);
|
|
14
|
-
|
|
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 _input_wrap = _interopRequireDefault(require("./input_wrap"));
|
|
10
|
+
var _excluded = ["lockId", "image", "value", "placeholder", "onReload", "invalidHint", "isValid"];
|
|
15
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
|
|
17
|
-
function _objectWithoutProperties(
|
|
18
|
-
|
|
12
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
15
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
20
|
-
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
);
|
|
47
|
-
|
|
16
|
+
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); } }
|
|
17
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
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); }
|
|
20
|
+
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); }
|
|
21
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
22
|
+
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); }; }
|
|
23
|
+
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); }
|
|
24
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25
|
+
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; } }
|
|
26
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
27
|
+
var InputIconSvg = /*#__PURE__*/_react.default.createElement("svg", {
|
|
28
|
+
className: "auth0-lock-icon auth0-lock-icon-box",
|
|
29
|
+
width: "21",
|
|
30
|
+
height: "20",
|
|
31
|
+
viewBox: "0 0 21 20",
|
|
32
|
+
fill: "none",
|
|
33
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
34
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
35
|
+
id: "icon/key"
|
|
36
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
37
|
+
id: "Shape",
|
|
38
|
+
fillRule: "evenodd",
|
|
39
|
+
clipRule: "evenodd",
|
|
40
|
+
d: "M16.3884 11.0145C14.4508 12.9522 11.3948 13.0447 9.32094 11.3401L7.20872 13.2642L9.60904 15.6697L8.83354 16.4466L6.39631 14.0048L4.88251 15.3832L7.39496 17.89L6.61586 18.6666L3.5 15.5587L3.53914 15.5198C3.47446 15.3363 3.51554 15.1287 3.67514 14.983L8.54211 10.5496C6.89425 8.47691 7.005 5.46384 8.92209 3.54636C10.9841 1.48455 14.3267 1.48455 16.3884 3.54636C18.4501 5.60846 18.4501 8.95239 16.3884 11.0145ZM15.6048 4.33856C13.98 2.71309 11.3454 2.71309 9.72062 4.33856C8.0958 5.9632 8.0958 8.59793 9.72062 10.2226C11.3454 11.8478 13.98 11.8478 15.6048 10.2226C17.2297 8.59793 17.2297 5.96292 15.6048 4.33856Z",
|
|
41
|
+
fill: "#888888"
|
|
42
|
+
})));
|
|
48
43
|
var RefreshIconSvg = function RefreshIconSvg() {
|
|
49
|
-
return
|
|
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
|
-
_react2.default.createElement('g', { mask: 'url(#mask0)' })
|
|
77
|
-
);
|
|
44
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
45
|
+
width: "20",
|
|
46
|
+
height: "20",
|
|
47
|
+
viewBox: "0 0 20 20",
|
|
48
|
+
fill: "none",
|
|
49
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
50
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
51
|
+
fillRule: "evenodd",
|
|
52
|
+
clipRule: "evenodd",
|
|
53
|
+
d: "M17.5496 8.77262C17.007 5.01122 13.8021 2.11002 9.88989 2.11002C6.79596 2.11002 4.14611 3.93257 2.896 6.55065H7.11154C7.41852 6.55065 7.66749 6.79935 7.66749 7.10579C7.66749 7.41251 7.41879 7.66205 7.11154 7.66205H2.47938H1.30282C1.30781 7.64318 1.3092 7.62291 1.3142 7.60404C1.23426 7.56296 1.16987 7.50217 1.11824 7.42889C1.10325 7.40918 1.09048 7.39086 1.07827 7.36977C1.04746 7.3112 1.02998 7.24791 1.02193 7.17935C1.01776 7.15326 1 7.133 1 7.10552C1 7.08997 1.00722 7.0772 1.00888 7.06166V1.5582C1.00888 1.25176 1.25757 1.0025 1.56427 1.0025C1.87125 1.0025 2.11994 1.25148 2.11994 1.5582V5.61994C3.6293 2.87224 6.53311 1 9.88989 1C14.4182 1 18.1481 4.39195 18.6951 8.77235H17.5496V8.77262ZM9.88989 17.655C12.9841 17.655 15.6337 15.833 16.8841 13.2152H12.6685C12.3615 13.2152 12.1128 12.967 12.1128 12.6595C12.1128 12.3525 12.3615 12.1043 12.6685 12.1043H17.3004C17.3004 12.1041 17.3007 12.1035 17.3007 12.1032H18.4775C18.4725 12.1221 18.4709 12.1424 18.4659 12.161C18.5461 12.2021 18.6105 12.2631 18.6621 12.3367C18.6774 12.3564 18.6893 12.3744 18.7018 12.3955C18.7326 12.4541 18.7504 12.5174 18.7584 12.5859C18.7626 12.612 18.7803 12.632 18.7803 12.6598C18.7803 12.675 18.7728 12.6881 18.7717 12.7031V18.2076C18.7717 18.5144 18.523 18.7628 18.2161 18.7628C17.9091 18.7628 17.6604 18.5144 17.6604 18.2076V14.1451C16.151 16.8928 13.2469 18.765 9.89017 18.765C5.36209 18.765 1.63255 15.3739 1.08493 10.9935H2.23041C2.77331 14.7549 5.97799 17.655 9.88989 17.655Z",
|
|
54
|
+
fill: "black"
|
|
55
|
+
}), /*#__PURE__*/_react.default.createElement("mask", {
|
|
56
|
+
id: "mask0",
|
|
57
|
+
"mask-type": "alpha",
|
|
58
|
+
maskUnits: "userSpaceOnUse",
|
|
59
|
+
x: "1",
|
|
60
|
+
y: "1",
|
|
61
|
+
width: "18",
|
|
62
|
+
height: "18"
|
|
63
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
64
|
+
fillRule: "evenodd",
|
|
65
|
+
clipRule: "evenodd",
|
|
66
|
+
d: "M17.5496 8.77262C17.007 5.01122 13.8021 2.11002 9.88989 2.11002C6.79596 2.11002 4.14611 3.93257 2.896 6.55065H7.11154C7.41852 6.55065 7.66749 6.79935 7.66749 7.10579C7.66749 7.41251 7.41879 7.66205 7.11154 7.66205H2.47938H1.30282C1.30781 7.64318 1.3092 7.62291 1.3142 7.60404C1.23426 7.56296 1.16987 7.50217 1.11824 7.42889C1.10325 7.40918 1.09048 7.39086 1.07827 7.36977C1.04746 7.3112 1.02998 7.24791 1.02193 7.17935C1.01776 7.15326 1 7.133 1 7.10552C1 7.08997 1.00722 7.0772 1.00888 7.06166V1.5582C1.00888 1.25176 1.25757 1.0025 1.56427 1.0025C1.87125 1.0025 2.11994 1.25148 2.11994 1.5582V5.61994C3.6293 2.87224 6.53311 1 9.88989 1C14.4182 1 18.1481 4.39195 18.6951 8.77235H17.5496V8.77262ZM9.88989 17.655C12.9841 17.655 15.6337 15.833 16.8841 13.2152H12.6685C12.3615 13.2152 12.1128 12.967 12.1128 12.6595C12.1128 12.3525 12.3615 12.1043 12.6685 12.1043H17.3004C17.3004 12.1041 17.3007 12.1035 17.3007 12.1032H18.4775C18.4725 12.1221 18.4709 12.1424 18.4659 12.161C18.5461 12.2021 18.6105 12.2631 18.6621 12.3367C18.6774 12.3564 18.6893 12.3744 18.7018 12.3955C18.7326 12.4541 18.7504 12.5174 18.7584 12.5859C18.7626 12.612 18.7803 12.632 18.7803 12.6598C18.7803 12.675 18.7728 12.6881 18.7717 12.7031V18.2076C18.7717 18.5144 18.523 18.7628 18.2161 18.7628C17.9091 18.7628 17.6604 18.5144 17.6604 18.2076V14.1451C16.151 16.8928 13.2469 18.765 9.89017 18.765C5.36209 18.765 1.63255 15.3739 1.08493 10.9935H2.23041C2.77331 14.7549 5.97799 17.655 9.88989 17.655Z",
|
|
67
|
+
fill: "white"
|
|
68
|
+
})), /*#__PURE__*/_react.default.createElement("g", {
|
|
69
|
+
mask: "url(#mask0)"
|
|
70
|
+
}));
|
|
78
71
|
};
|
|
79
|
-
|
|
80
|
-
var CaptchaInput = function (_React$Component) {
|
|
72
|
+
var CaptchaInput = /*#__PURE__*/function (_React$Component) {
|
|
81
73
|
_inherits(CaptchaInput, _React$Component);
|
|
82
|
-
|
|
74
|
+
var _super = _createSuper(CaptchaInput);
|
|
83
75
|
function CaptchaInput(props) {
|
|
76
|
+
var _this;
|
|
84
77
|
_classCallCheck(this, CaptchaInput);
|
|
85
|
-
|
|
86
|
-
var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
|
|
87
|
-
|
|
78
|
+
_this = _super.call(this, props);
|
|
88
79
|
_this.state = {};
|
|
89
80
|
return _this;
|
|
90
81
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
return isValid != nextProps.isValid || value != nextProps.value || focused != nextState.focused || image != nextState.image || placeholder != nextState.placeholder;
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
CaptchaInput.prototype.render = function render() {
|
|
105
|
-
var _props2 = this.props,
|
|
106
|
-
lockId = _props2.lockId,
|
|
107
|
-
image = _props2.image,
|
|
108
|
-
value = _props2.value,
|
|
109
|
-
placeholder = _props2.placeholder,
|
|
110
|
-
onReload = _props2.onReload,
|
|
111
|
-
invalidHint = _props2.invalidHint,
|
|
112
|
-
isValid = _props2.isValid,
|
|
113
|
-
props = _objectWithoutProperties(_props2, ['lockId', 'image', 'value', 'placeholder', 'onReload', 'invalidHint', 'isValid']);
|
|
114
|
-
|
|
115
|
-
var focused = this.state.focused;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
return _react2.default.createElement(
|
|
119
|
-
'div',
|
|
120
|
-
null,
|
|
121
|
-
_react2.default.createElement(
|
|
122
|
-
'div',
|
|
123
|
-
{ className: 'auth0-lock-captcha' },
|
|
124
|
-
_react2.default.createElement('div', {
|
|
125
|
-
className: 'auth0-lock-captcha-image',
|
|
126
|
-
style: { backgroundImage: 'url(' + image + ')' }
|
|
127
|
-
}),
|
|
128
|
-
_react2.default.createElement(
|
|
129
|
-
'button',
|
|
130
|
-
{
|
|
131
|
-
type: 'button',
|
|
132
|
-
onClick: this.handleReload.bind(this),
|
|
133
|
-
className: 'auth0-lock-captcha-refresh'
|
|
134
|
-
},
|
|
135
|
-
_react2.default.createElement(RefreshIconSvg, null)
|
|
136
|
-
)
|
|
137
|
-
),
|
|
138
|
-
_react2.default.createElement(
|
|
139
|
-
_input_wrap2.default,
|
|
140
|
-
{
|
|
141
|
-
focused: focused,
|
|
142
|
-
invalidHint: '',
|
|
143
|
-
isValid: isValid,
|
|
144
|
-
name: 'captcha',
|
|
145
|
-
icon: InputIconSvg
|
|
146
|
-
},
|
|
147
|
-
_react2.default.createElement('input', _extends({
|
|
148
|
-
id: lockId + '-captcha',
|
|
149
|
-
ref: 'input',
|
|
150
|
-
type: 'text',
|
|
151
|
-
inputMode: 'text',
|
|
152
|
-
name: 'captcha',
|
|
153
|
-
className: 'auth0-lock-input',
|
|
154
|
-
placeholder: placeholder,
|
|
155
|
-
autoComplete: 'off',
|
|
156
|
-
autoCapitalize: 'off',
|
|
157
|
-
autoCorrect: 'off',
|
|
158
|
-
spellCheck: 'false',
|
|
159
|
-
onChange: this.handleOnChange.bind(this),
|
|
160
|
-
onFocus: this.handleFocus.bind(this),
|
|
161
|
-
onBlur: this.handleBlur.bind(this),
|
|
162
|
-
'aria-label': 'Email',
|
|
163
|
-
'aria-invalid': !isValid,
|
|
164
|
-
'aria-describedby': !isValid && invalidHint ? 'auth0-lock-error-msg-email' : undefined,
|
|
165
|
-
value: value
|
|
166
|
-
}, props))
|
|
167
|
-
)
|
|
168
|
-
);
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
CaptchaInput.prototype.handleOnChange = function handleOnChange(e) {
|
|
172
|
-
if (this.props.onChange) {
|
|
173
|
-
this.props.onChange(e);
|
|
82
|
+
_createClass(CaptchaInput, [{
|
|
83
|
+
key: "shouldComponentUpdate",
|
|
84
|
+
value: function shouldComponentUpdate(nextProps, nextState) {
|
|
85
|
+
var _this$props = this.props,
|
|
86
|
+
isValid = _this$props.isValid,
|
|
87
|
+
value = _this$props.value,
|
|
88
|
+
image = _this$props.image,
|
|
89
|
+
placeholder = _this$props.placeholder;
|
|
90
|
+
var focused = this.state.focused;
|
|
91
|
+
return isValid != nextProps.isValid || value != nextProps.value || focused != nextState.focused || image != nextState.image || placeholder != nextState.placeholder;
|
|
174
92
|
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
93
|
+
}, {
|
|
94
|
+
key: "render",
|
|
95
|
+
value: function render() {
|
|
96
|
+
var _this$props2 = this.props,
|
|
97
|
+
lockId = _this$props2.lockId,
|
|
98
|
+
image = _this$props2.image,
|
|
99
|
+
value = _this$props2.value,
|
|
100
|
+
placeholder = _this$props2.placeholder,
|
|
101
|
+
onReload = _this$props2.onReload,
|
|
102
|
+
invalidHint = _this$props2.invalidHint,
|
|
103
|
+
isValid = _this$props2.isValid,
|
|
104
|
+
props = _objectWithoutProperties(_this$props2, _excluded);
|
|
105
|
+
var focused = this.state.focused;
|
|
106
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
107
|
+
className: "auth0-lock-captcha"
|
|
108
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
109
|
+
className: "auth0-lock-captcha-image",
|
|
110
|
+
style: {
|
|
111
|
+
backgroundImage: "url(".concat(image, ")")
|
|
112
|
+
}
|
|
113
|
+
}), /*#__PURE__*/_react.default.createElement("button", {
|
|
114
|
+
type: "button",
|
|
115
|
+
onClick: this.handleReload.bind(this),
|
|
116
|
+
className: "auth0-lock-captcha-refresh"
|
|
117
|
+
}, /*#__PURE__*/_react.default.createElement(RefreshIconSvg, null))), /*#__PURE__*/_react.default.createElement(_input_wrap.default, {
|
|
118
|
+
focused: focused,
|
|
119
|
+
invalidHint: "",
|
|
120
|
+
isValid: isValid,
|
|
121
|
+
name: "captcha",
|
|
122
|
+
icon: InputIconSvg
|
|
123
|
+
}, /*#__PURE__*/_react.default.createElement("input", _extends({
|
|
124
|
+
id: "".concat(lockId, "-captcha"),
|
|
125
|
+
ref: "input",
|
|
126
|
+
type: "text",
|
|
127
|
+
inputMode: "text",
|
|
128
|
+
name: "captcha",
|
|
129
|
+
className: "auth0-lock-input",
|
|
130
|
+
placeholder: placeholder,
|
|
131
|
+
autoComplete: "off",
|
|
132
|
+
autoCapitalize: "off",
|
|
133
|
+
autoCorrect: "off",
|
|
134
|
+
spellCheck: "false",
|
|
135
|
+
onChange: this.handleOnChange.bind(this),
|
|
136
|
+
onFocus: this.handleFocus.bind(this),
|
|
137
|
+
onBlur: this.handleBlur.bind(this),
|
|
138
|
+
"aria-label": "Email",
|
|
139
|
+
"aria-invalid": !isValid,
|
|
140
|
+
"aria-describedby": !isValid && invalidHint ? "auth0-lock-error-msg-email" : undefined,
|
|
141
|
+
value: value
|
|
142
|
+
}, props))));
|
|
181
143
|
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
144
|
+
}, {
|
|
145
|
+
key: "handleOnChange",
|
|
146
|
+
value: function handleOnChange(e) {
|
|
147
|
+
if (this.props.onChange) {
|
|
148
|
+
this.props.onChange(e);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}, {
|
|
152
|
+
key: "handleReload",
|
|
153
|
+
value: function handleReload(e) {
|
|
154
|
+
if (this.props.onReload) {
|
|
155
|
+
e.preventDefault();
|
|
156
|
+
this.props.onReload(e);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}, {
|
|
160
|
+
key: "handleFocus",
|
|
161
|
+
value: function handleFocus() {
|
|
162
|
+
this.setState({
|
|
163
|
+
focused: true
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}, {
|
|
167
|
+
key: "handleBlur",
|
|
168
|
+
value: function handleBlur() {
|
|
169
|
+
this.setState({
|
|
170
|
+
focused: false
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}]);
|
|
192
174
|
return CaptchaInput;
|
|
193
|
-
}(
|
|
194
|
-
|
|
175
|
+
}(_react.default.Component);
|
|
195
176
|
exports.default = CaptchaInput;
|
|
@@ -1,70 +1,68 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
|
|
11
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12
|
-
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
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); } }
|
|
12
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
13
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
|
+
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); }
|
|
15
|
+
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); }
|
|
16
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
17
|
+
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); }; }
|
|
18
|
+
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); }
|
|
19
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
20
|
+
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; } }
|
|
21
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
22
|
+
var CheckboxInput = /*#__PURE__*/function (_React$Component) {
|
|
18
23
|
_inherits(CheckboxInput, _React$Component);
|
|
19
|
-
|
|
24
|
+
var _super = _createSuper(CheckboxInput);
|
|
20
25
|
function CheckboxInput() {
|
|
21
26
|
_classCallCheck(this, CheckboxInput);
|
|
22
|
-
|
|
23
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
27
|
+
return _super.apply(this, arguments);
|
|
24
28
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"span",
|
|
54
|
-
null,
|
|
55
|
-
placeholder
|
|
56
|
-
)
|
|
57
|
-
)
|
|
58
|
-
);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
CheckboxInput.prototype.handleOnChange = function handleOnChange(e) {
|
|
62
|
-
if (this.props.onChange) {
|
|
63
|
-
this.props.onChange(e);
|
|
29
|
+
_createClass(CheckboxInput, [{
|
|
30
|
+
key: "render",
|
|
31
|
+
value: function render() {
|
|
32
|
+
var _this$props = this.props,
|
|
33
|
+
lockId = _this$props.lockId,
|
|
34
|
+
name = _this$props.name,
|
|
35
|
+
ariaLabel = _this$props.ariaLabel,
|
|
36
|
+
placeholder = _this$props.placeholder,
|
|
37
|
+
checked = _this$props.checked,
|
|
38
|
+
placeholderHTML = _this$props.placeholderHTML;
|
|
39
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
40
|
+
className: "auth0-lock-input-checkbox"
|
|
41
|
+
}, /*#__PURE__*/_react.default.createElement("label", null, /*#__PURE__*/_react.default.createElement("input", {
|
|
42
|
+
id: "".concat(lockId, "-").concat(name),
|
|
43
|
+
type: "checkbox",
|
|
44
|
+
checked: checked === 'true',
|
|
45
|
+
onChange: this.handleOnChange.bind(this),
|
|
46
|
+
name: name,
|
|
47
|
+
"aria-label": ariaLabel || name
|
|
48
|
+
}), placeholderHTML ?
|
|
49
|
+
/*#__PURE__*/
|
|
50
|
+
// placeholderHTML allows raw HTML
|
|
51
|
+
// eslint-disable-next-line react/no-danger
|
|
52
|
+
_react.default.createElement("span", {
|
|
53
|
+
dangerouslySetInnerHTML: {
|
|
54
|
+
__html: placeholderHTML
|
|
55
|
+
}
|
|
56
|
+
}) : /*#__PURE__*/_react.default.createElement("span", null, placeholder)));
|
|
64
57
|
}
|
|
65
|
-
}
|
|
66
|
-
|
|
58
|
+
}, {
|
|
59
|
+
key: "handleOnChange",
|
|
60
|
+
value: function handleOnChange(e) {
|
|
61
|
+
if (this.props.onChange) {
|
|
62
|
+
this.props.onChange(e);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}]);
|
|
67
66
|
return CheckboxInput;
|
|
68
|
-
}(
|
|
69
|
-
|
|
67
|
+
}(_react.default.Component);
|
|
70
68
|
exports.default = CheckboxInput;
|