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,170 +1,150 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var _input_wrap = require('./input_wrap');
|
|
11
|
-
|
|
12
|
-
var _input_wrap2 = _interopRequireDefault(_input_wrap);
|
|
13
|
-
|
|
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 = exports.IconSvg = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _input_wrap = _interopRequireDefault(require("./input_wrap"));
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
);
|
|
12
|
+
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); } }
|
|
13
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
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); }
|
|
16
|
+
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); }
|
|
17
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
18
|
+
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); }; }
|
|
19
|
+
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); }
|
|
20
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
21
|
+
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; } }
|
|
22
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
23
|
+
var IconSvg = /*#__PURE__*/_react.default.createElement("svg", {
|
|
24
|
+
"aria-hidden": "true",
|
|
25
|
+
focusable: "false",
|
|
26
|
+
width: "14px",
|
|
27
|
+
height: "14px",
|
|
28
|
+
viewBox: "0 0 14 14",
|
|
29
|
+
version: "1.1",
|
|
30
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
31
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
32
|
+
className: "auth0-lock-icon auth0-lock-icon-box auth0-lock-icon-location"
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
34
|
+
stroke: "none",
|
|
35
|
+
strokeWidth: "1",
|
|
36
|
+
fill: "none",
|
|
37
|
+
fillRule: "evenodd"
|
|
38
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
39
|
+
id: "Lock",
|
|
40
|
+
transform: "translate(-201.000000, -3519.000000)",
|
|
41
|
+
fill: "#919191"
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
43
|
+
id: "SMS",
|
|
44
|
+
transform: "translate(153.000000, 3207.000000)"
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
46
|
+
transform: "translate(35.000000, 299.000000)"
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
48
|
+
id: "Fill-349-Copy",
|
|
49
|
+
d: "M22.4023125,22.8 C22.543625,21.9425 22.625,20.9975 22.625,20 L26.125,20 C26.125,21.316875 25.69275,22.52 24.9853125,23.5175 C24.3255625,23.2025 23.4383125,22.953125 22.4023125,22.8 L22.4023125,22.8 Z M21.372875,25.954375 C21.72725,25.3725 22.0234375,24.5675 22.2404375,23.6225 C22.8975625,23.696875 23.483375,23.80625 23.9624375,23.9375 L24.67075,23.9375 C23.829875,24.92625 22.6849375,25.6525 21.372875,25.954375 L21.372875,25.954375 Z M20,26.125 C19.412875,26.125 18.896625,25.105625 18.579,23.5525 C19.034,23.521875 19.503875,23.5 20,23.5 C20.4956875,23.5 20.966,23.521875 21.421,23.5525 C21.1029375,25.105625 20.5866875,26.125 20,26.125 L20,26.125 Z M15.3288125,23.9375 L16.0375625,23.9375 C16.5161875,23.80625 17.1024375,23.696875 17.759125,23.6225 C17.976125,24.5675 18.2723125,25.3725 18.6266875,25.954375 C17.3150625,25.6525 16.170125,24.92625 15.3288125,23.9375 L15.3288125,23.9375 Z M15.0146875,23.5175 C14.3068125,22.52 13.875,21.316875 13.875,20 L17.375,20 C17.375,20.9975 17.4559375,21.9425 17.59725,22.8 C16.56125,22.953125 15.6744375,23.2025 15.0146875,23.5175 L15.0146875,23.5175 Z M15.030875,16.45625 C15.6796875,16.78 16.5634375,17.03375 17.60075,17.195625 C17.501,17.799375 17.428375,18.4425 17.3964375,19.125 L13.951125,19.125 C14.0933125,18.13625 14.477,17.230625 15.030875,16.45625 L15.030875,16.45625 Z M18.6266875,14.04125 C18.27275,14.623125 17.977,15.42375 17.760875,16.373125 C17.1265,16.294375 16.558625,16.189375 16.0944375,16.0625 L15.34325,16.0625 C16.180625,15.069375 17.3168125,14.343125 18.6266875,14.04125 L18.6266875,14.04125 Z M20,13.875 C20.585375,13.875 21.0959375,14.894375 21.4118125,16.443125 C20.959875,16.478125 20.492625,16.5 20,16.5 C19.5069375,16.5 19.0396875,16.478125 18.58775,16.443125 C18.903625,14.894375 19.4141875,13.875 20,13.875 L20,13.875 Z M18.2749375,19.125 C18.3020625,18.473125 18.362,17.865 18.441625,17.29625 C18.9408125,17.344375 19.4596875,17.375 20,17.375 C20.5403125,17.375 21.0591875,17.344375 21.5579375,17.29625 C21.638,17.865 21.6979375,18.473125 21.724625,19.125 L18.2749375,19.125 L18.2749375,19.125 Z M21.75,20 C21.75,20.97125 21.6786875,21.88125 21.5631875,22.699375 C21.06225,22.65125 20.5420625,22.625 20,22.625 C19.4579375,22.625 18.9373125,22.65125 18.436375,22.699375 C18.320875,21.88125 18.25,20.97125 18.25,20 L21.75,20 L21.75,20 Z M24.6563125,16.0625 L23.905125,16.0625 C23.441375,16.189375 22.8730625,16.294375 22.2386875,16.373125 C22.0225625,15.42375 21.7268125,14.623125 21.372875,14.04125 C22.68275,14.343125 23.8189375,15.069375 24.6563125,16.0625 L24.6563125,16.0625 Z M24.9686875,16.45625 C25.5225625,17.230625 25.90625,18.13625 26.048875,19.125 L22.603125,19.125 C22.5711875,18.4425 22.499,17.799375 22.39925,17.195625 C23.4365625,17.03375 24.3203125,16.78 24.9686875,16.45625 L24.9686875,16.45625 Z M20,13 C16.1338125,13 13,16.1325 13,20 C13,23.863125 16.1338125,27 20,27 C23.86575,27 27,23.863125 27,20 C27,16.1325 23.86575,13 20,13 L20,13 Z"
|
|
50
|
+
}))))));
|
|
51
|
+
exports.IconSvg = IconSvg;
|
|
56
52
|
var ArrowIconSvg = function ArrowIconSvg() {
|
|
57
|
-
return
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
'g',
|
|
89
|
-
{ transform: 'translate(210.000000, 20.000000) rotate(-90.000000) translate(-210.000000, -20.000000) translate(198.000000, 8.000000)' },
|
|
90
|
-
_react2.default.createElement('path', { id: 'Shape', d: 'M7,10 L12,15 L17,10 L7,10 Z' })
|
|
91
|
-
)
|
|
92
|
-
)
|
|
93
|
-
)
|
|
94
|
-
)
|
|
95
|
-
)
|
|
96
|
-
);
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
54
|
+
"aria-hidden": "true",
|
|
55
|
+
focusable: "false",
|
|
56
|
+
width: "5px",
|
|
57
|
+
height: "10px",
|
|
58
|
+
viewBox: "0 0 5 10",
|
|
59
|
+
version: "1.1",
|
|
60
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
61
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
62
|
+
className: "auth0-lock-icon auth0-lock-icon-box auth0-lock-icon-arrow"
|
|
63
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
64
|
+
stroke: "none",
|
|
65
|
+
strokeWidth: "1",
|
|
66
|
+
fill: "none",
|
|
67
|
+
fillRule: "evenodd"
|
|
68
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
69
|
+
id: "Lock",
|
|
70
|
+
transform: "translate(-396.000000, -3521.000000)",
|
|
71
|
+
fill: "#000000",
|
|
72
|
+
opacity: "0.539999962"
|
|
73
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
74
|
+
id: "SMS",
|
|
75
|
+
transform: "translate(153.000000, 3207.000000)"
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
77
|
+
transform: "translate(35.000000, 299.000000)"
|
|
78
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
79
|
+
transform: "translate(210.000000, 20.000000) rotate(-90.000000) translate(-210.000000, -20.000000) translate(198.000000, 8.000000)"
|
|
80
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
81
|
+
id: "Shape",
|
|
82
|
+
d: "M7,10 L12,15 L17,10 L7,10 Z"
|
|
83
|
+
})))))));
|
|
97
84
|
};
|
|
98
|
-
|
|
99
|
-
var LocationInput = function (_React$Component) {
|
|
85
|
+
var LocationInput = /*#__PURE__*/function (_React$Component) {
|
|
100
86
|
_inherits(LocationInput, _React$Component);
|
|
101
|
-
|
|
87
|
+
var _super = _createSuper(LocationInput);
|
|
102
88
|
function LocationInput(props) {
|
|
89
|
+
var _this;
|
|
103
90
|
_classCallCheck(this, LocationInput);
|
|
104
|
-
|
|
105
|
-
var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
|
|
106
|
-
|
|
91
|
+
_this = _super.call(this, props);
|
|
107
92
|
_this.state = {};
|
|
108
93
|
return _this;
|
|
109
94
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
type:
|
|
125
|
-
name:
|
|
126
|
-
className:
|
|
95
|
+
_createClass(LocationInput, [{
|
|
96
|
+
key: "render",
|
|
97
|
+
value: function render() {
|
|
98
|
+
var _this$props = this.props,
|
|
99
|
+
onClick = _this$props.onClick,
|
|
100
|
+
value = _this$props.value;
|
|
101
|
+
var focused = this.state.focused;
|
|
102
|
+
var limitedValue = value.length > 23 ? "".concat(value.substr(0, 20), "...") : value;
|
|
103
|
+
return /*#__PURE__*/_react.default.createElement(_input_wrap.default, {
|
|
104
|
+
focused: focused,
|
|
105
|
+
isValid: true,
|
|
106
|
+
name: "location",
|
|
107
|
+
icon: IconSvg
|
|
108
|
+
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
109
|
+
type: "button",
|
|
110
|
+
name: "location",
|
|
111
|
+
className: "auth0-lock-input auth0-lock-input-location",
|
|
127
112
|
value: limitedValue,
|
|
128
113
|
onFocus: this.handleFocus.bind(this),
|
|
129
114
|
onBlur: this.handleBlur.bind(this),
|
|
130
115
|
onKeyDown: this.handleKeyDown.bind(this),
|
|
131
116
|
onClick: onClick,
|
|
132
|
-
|
|
133
|
-
}),
|
|
134
|
-
_react2.default.createElement(
|
|
135
|
-
'span',
|
|
136
|
-
null,
|
|
137
|
-
_react2.default.createElement(ArrowIconSvg, null)
|
|
138
|
-
)
|
|
139
|
-
);
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
LocationInput.prototype.handleFocus = function handleFocus() {
|
|
143
|
-
this.setState({ focused: true });
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
LocationInput.prototype.handleBlur = function handleBlur() {
|
|
147
|
-
this.setState({ focused: false });
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
LocationInput.prototype.handleKeyDown = function handleKeyDown(e) {
|
|
151
|
-
if (e.key !== 'Tab') {
|
|
152
|
-
e.preventDefault();
|
|
117
|
+
"aria-label": "Location"
|
|
118
|
+
}), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(ArrowIconSvg, null)));
|
|
153
119
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
120
|
+
}, {
|
|
121
|
+
key: "handleFocus",
|
|
122
|
+
value: function handleFocus() {
|
|
123
|
+
this.setState({
|
|
124
|
+
focused: true
|
|
125
|
+
});
|
|
157
126
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
127
|
+
}, {
|
|
128
|
+
key: "handleBlur",
|
|
129
|
+
value: function handleBlur() {
|
|
130
|
+
this.setState({
|
|
131
|
+
focused: false
|
|
132
|
+
});
|
|
161
133
|
}
|
|
162
|
-
}
|
|
163
|
-
|
|
134
|
+
}, {
|
|
135
|
+
key: "handleKeyDown",
|
|
136
|
+
value: function handleKeyDown(e) {
|
|
137
|
+
if (e.key !== 'Tab') {
|
|
138
|
+
e.preventDefault();
|
|
139
|
+
}
|
|
140
|
+
if (e.key === 'ArrowDown') {
|
|
141
|
+
return this.props.onClick();
|
|
142
|
+
}
|
|
143
|
+
if (e.keyCode >= 65 && e.keyCode <= 90) {
|
|
144
|
+
return this.props.onClick(String.fromCharCode(e.keyCode).toLowerCase());
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}]);
|
|
164
148
|
return LocationInput;
|
|
165
|
-
}(
|
|
166
|
-
|
|
167
|
-
// TODO: specify propTypes
|
|
168
|
-
|
|
169
|
-
|
|
149
|
+
}(_react.default.Component); // TODO: specify propTypes
|
|
170
150
|
exports.default = LocationInput;
|
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _propTypes = require(
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
var _react2 = _interopRequireDefault(_react);
|
|
14
|
-
|
|
15
|
-
var _input_wrap = require('./input_wrap');
|
|
16
|
-
|
|
17
|
-
var _input_wrap2 = _interopRequireDefault(_input_wrap);
|
|
18
|
-
|
|
19
|
-
var _password_input = require('./password_input');
|
|
20
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _input_wrap = _interopRequireDefault(require("./input_wrap"));
|
|
10
|
+
var _password_input = require("./password_input");
|
|
11
|
+
var _excluded = ["lockId", "invalidHint", "isValid", "onChange", "value"];
|
|
21
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
-
|
|
23
|
-
function
|
|
24
|
-
|
|
13
|
+
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); }
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
25
17
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
26
|
-
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
function
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
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); } }
|
|
19
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
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
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
28
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
29
|
+
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); }
|
|
30
|
+
var MFACodeInput = /*#__PURE__*/function (_React$Component) {
|
|
32
31
|
_inherits(MFACodeInput, _React$Component);
|
|
33
|
-
|
|
32
|
+
var _super = _createSuper(MFACodeInput);
|
|
34
33
|
function MFACodeInput(props) {
|
|
34
|
+
var _this;
|
|
35
35
|
_classCallCheck(this, MFACodeInput);
|
|
36
|
-
|
|
37
|
-
var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
|
|
38
|
-
|
|
36
|
+
_this = _super.call(this, props);
|
|
39
37
|
_this.state = {};
|
|
40
38
|
return _this;
|
|
41
39
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
_input_wrap2.default,
|
|
65
|
-
{
|
|
40
|
+
_createClass(MFACodeInput, [{
|
|
41
|
+
key: "focus",
|
|
42
|
+
value: function focus() {
|
|
43
|
+
this.refs.input && this.refs.input.focus();
|
|
44
|
+
}
|
|
45
|
+
}, {
|
|
46
|
+
key: "hasFocus",
|
|
47
|
+
value: function hasFocus() {
|
|
48
|
+
return this.state.focused;
|
|
49
|
+
}
|
|
50
|
+
}, {
|
|
51
|
+
key: "render",
|
|
52
|
+
value: function render() {
|
|
53
|
+
var _this$props = this.props,
|
|
54
|
+
lockId = _this$props.lockId,
|
|
55
|
+
invalidHint = _this$props.invalidHint,
|
|
56
|
+
isValid = _this$props.isValid,
|
|
57
|
+
onChange = _this$props.onChange,
|
|
58
|
+
value = _this$props.value,
|
|
59
|
+
props = _objectWithoutProperties(_this$props, _excluded);
|
|
60
|
+
var focused = this.state.focused;
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement(_input_wrap.default, {
|
|
66
62
|
focused: focused,
|
|
67
63
|
invalidHint: invalidHint,
|
|
68
64
|
isValid: isValid,
|
|
69
|
-
name:
|
|
65
|
+
name: "mfa_code",
|
|
70
66
|
icon: _password_input.IconSvg
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
spellCheck: 'false',
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement("input", _extends({
|
|
68
|
+
id: "".concat(lockId, "-mfa_code"),
|
|
69
|
+
ref: "input",
|
|
70
|
+
type: "text",
|
|
71
|
+
name: "mfa_code",
|
|
72
|
+
className: "auth0-lock-input",
|
|
73
|
+
autoComplete: "off",
|
|
74
|
+
autoCapitalize: "off",
|
|
75
|
+
autoCorrect: "off",
|
|
76
|
+
spellCheck: "false",
|
|
82
77
|
onChange: this.handleOnChange.bind(this),
|
|
83
78
|
onFocus: this.handleFocus.bind(this),
|
|
84
79
|
onBlur: this.handleBlur.bind(this),
|
|
85
80
|
value: value,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}, props))
|
|
90
|
-
);
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
MFACodeInput.prototype.handleOnChange = function handleOnChange(e) {
|
|
94
|
-
if (this.props.onChange) {
|
|
95
|
-
this.props.onChange(e);
|
|
81
|
+
"aria-label": "Multi factor authentication code",
|
|
82
|
+
"aria-invalid": !isValid,
|
|
83
|
+
"aria-describedby": !isValid && invalidHint ? "auth0-lock-error-msg-mfa_code" : undefined
|
|
84
|
+
}, props)));
|
|
96
85
|
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
86
|
+
}, {
|
|
87
|
+
key: "handleOnChange",
|
|
88
|
+
value: function handleOnChange(e) {
|
|
89
|
+
if (this.props.onChange) {
|
|
90
|
+
this.props.onChange(e);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}, {
|
|
94
|
+
key: "handleFocus",
|
|
95
|
+
value: function handleFocus() {
|
|
96
|
+
this.setState({
|
|
97
|
+
focused: true
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}, {
|
|
101
|
+
key: "handleBlur",
|
|
102
|
+
value: function handleBlur() {
|
|
103
|
+
this.setState({
|
|
104
|
+
focused: false
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}]);
|
|
107
108
|
return MFACodeInput;
|
|
108
|
-
}(
|
|
109
|
-
|
|
110
|
-
MFACodeInput.propTypes = {
|
|
111
|
-
invalidHint: _propTypes2.default.string.isRequired,
|
|
112
|
-
isValid: _propTypes2.default.bool.isRequired,
|
|
113
|
-
onChange: _propTypes2.default.func,
|
|
114
|
-
placeholder: _propTypes2.default.string,
|
|
115
|
-
value: _propTypes2.default.string.isRequired
|
|
116
|
-
};
|
|
109
|
+
}(_react.default.Component);
|
|
117
110
|
exports.default = MFACodeInput;
|
|
111
|
+
_defineProperty(MFACodeInput, "propTypes", {
|
|
112
|
+
invalidHint: _propTypes.default.string.isRequired,
|
|
113
|
+
isValid: _propTypes.default.bool.isRequired,
|
|
114
|
+
onChange: _propTypes.default.func,
|
|
115
|
+
placeholder: _propTypes.default.string,
|
|
116
|
+
value: _propTypes.default.string.isRequired
|
|
117
|
+
});
|