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
package/lib/ui/box/container.js
CHANGED
|
@@ -1,102 +1,86 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
var _chrome2 = _interopRequireDefault(_chrome);
|
|
17
|
-
|
|
18
|
-
var _button = require('./button');
|
|
19
|
-
|
|
20
|
-
var _index = require('../../core/index');
|
|
21
|
-
|
|
22
|
-
var l = _interopRequireWildcard(_index);
|
|
23
|
-
|
|
24
|
-
var _index2 = require('../../field/index');
|
|
25
|
-
|
|
26
|
-
var c = _interopRequireWildcard(_index2);
|
|
27
|
-
|
|
28
|
-
var _index3 = require('../../store/index');
|
|
29
|
-
|
|
30
|
-
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; } }
|
|
31
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultProps = exports.default = void 0;
|
|
7
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _chrome = _interopRequireDefault(require("./chrome"));
|
|
10
|
+
var _button = require("./button");
|
|
11
|
+
var l = _interopRequireWildcard(require("../../core/index"));
|
|
12
|
+
var c = _interopRequireWildcard(require("../../field/index"));
|
|
13
|
+
var _index3 = require("../../store/index");
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
32
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
|
-
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
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
|
+
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); }
|
|
38
25
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
26
|
+
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); } }
|
|
27
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
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 badgeSvg = /*#__PURE__*/_react.default.createElement("svg", {
|
|
31
|
+
focusable: "false",
|
|
32
|
+
width: "58px",
|
|
33
|
+
height: "21px",
|
|
34
|
+
viewBox: "0 0 462 168"
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
36
|
+
id: "Page-1",
|
|
37
|
+
stroke: "none",
|
|
38
|
+
strokeWidth: "1",
|
|
39
|
+
fill: "none",
|
|
40
|
+
fillRule: "evenodd"
|
|
41
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
42
|
+
id: "logo-grey-horizontal"
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
44
|
+
id: "Group"
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
46
|
+
id: "LogoText",
|
|
47
|
+
transform: "translate(188.000000, 41.500000)",
|
|
48
|
+
fill: "#D0D2D3"
|
|
49
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
50
|
+
d: "M246.517,0.11 C238.439,0.11 231.607,3.916 226.759,11.115 C221.94,18.271 219.393,28.26 219.393,40 C219.393,51.74 221.94,61.729 226.759,68.884 C231.607,76.084 238.439,79.889 246.517,79.889 C254.595,79.889 261.427,76.084 266.275,68.884 C271.093,61.729 273.64,51.74 273.64,40 C273.64,28.26 271.093,18.271 266.275,11.115 C261.427,3.916 254.595,0.11 246.517,0.11 L246.517,0.11 Z M246.517,70.005 C242.655,70.005 239.604,67.82 237.187,63.324 C234.268,57.893 232.66,49.61 232.66,40 C232.66,30.39 234.268,22.106 237.187,16.676 C239.604,12.18 242.655,9.994 246.517,9.994 C250.378,9.994 253.43,12.18 255.847,16.676 C258.766,22.106 260.373,30.389 260.373,40 C260.373,49.611 258.766,57.895 255.847,63.324 C253.43,67.82 250.378,70.005 246.517,70.005 L246.517,70.005 Z M71.45,29.172 L71.45,63.484 C71.45,72.53 78.81,79.889 87.856,79.889 C95.746,79.889 101.707,75.975 103.902,74.291 C104.024,74.197 104.184,74.169 104.331,74.216 C104.478,74.263 104.592,74.379 104.637,74.527 L105.961,78.86 L115.737,78.86 L115.737,29.172 L103.175,29.172 L103.175,66.326 C103.175,66.501 103.076,66.662 102.921,66.743 C100.559,67.961 95.899,70.006 91.231,70.006 C87.252,70.006 84.012,66.768 84.012,62.787 L84.012,29.172 L71.45,29.172 L71.45,29.172 Z M197.237,78.859 L209.8,78.859 L209.8,44.547 C209.8,35.501 202.44,28.141 193.394,28.141 C186.735,28.141 181.393,31.004 178.802,32.71 C178.657,32.805 178.473,32.813 178.322,32.731 C178.171,32.649 178.075,32.491 178.075,32.318 L178.075,1.141 L165.513,1.141 L165.513,78.859 L178.075,78.859 L178.075,41.704 C178.075,41.529 178.174,41.368 178.33,41.288 C180.691,40.069 185.352,38.025 190.019,38.025 C191.947,38.025 193.76,38.776 195.123,40.139 C196.486,41.502 197.236,43.316 197.236,45.243 L197.236,78.859 L197.237,78.859 Z M124.792,39.055 L132.438,39.055 C132.697,39.055 132.907,39.265 132.907,39.524 L132.907,66.858 C132.907,74.043 138.753,79.888 145.938,79.888 C148.543,79.888 151.113,79.512 153.585,78.77 L153.585,69.796 C152.143,69.923 150.485,70.005 149.313,70.005 C147.193,70.005 145.469,68.28 145.469,66.161 L145.469,39.523 C145.469,39.264 145.679,39.054 145.938,39.054 L153.585,39.054 L153.585,29.171 L145.938,29.171 C145.679,29.171 145.469,28.961 145.469,28.702 L145.469,12.295 L132.907,12.295 L132.907,28.702 C132.907,28.961 132.697,29.171 132.438,29.171 L124.792,29.171 L124.792,39.055 L124.792,39.055 Z M51.361,78.859 L64.429,78.859 L44.555,9.55 C42.962,3.992 37.811,0.11 32.029,0.11 C26.247,0.11 21.096,3.992 19.502,9.55 L-0.372,78.859 L12.697,78.859 L18.449,58.798 C18.507,58.597 18.691,58.459 18.9,58.459 L45.158,58.459 C45.367,58.459 45.552,58.597 45.609,58.798 L51.361,78.859 L51.361,78.859 Z M42.056,48.576 L22.004,48.576 C21.857,48.576 21.718,48.507 21.629,48.388 C21.541,48.272 21.513,48.119 21.553,47.978 L31.579,13.012 C31.637,12.811 31.821,12.673 32.03,12.673 C32.239,12.673 32.423,12.811 32.48,13.012 L42.507,47.978 C42.547,48.12 42.519,48.272 42.43,48.388 C42.342,48.507 42.203,48.576 42.056,48.576 L42.056,48.576 Z",
|
|
51
|
+
id: "Shape"
|
|
52
|
+
})), /*#__PURE__*/_react.default.createElement("g", {
|
|
53
|
+
id: "LogoBadge",
|
|
54
|
+
fillOpacity: "0.4",
|
|
55
|
+
fill: "#FFFFFF"
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
57
|
+
d: "M119.555,135.861 L102.705,83.997 L146.813,51.952 L92.291,51.952 L75.44,0.09 L75.435,0.076 L129.965,0.076 L146.82,51.947 L146.821,51.946 L146.835,51.938 C156.623,82.03 146.542,116.256 119.555,135.861 L119.555,135.861 Z M31.321,135.861 L31.307,135.871 L75.426,167.924 L119.555,135.862 L75.44,103.808 L31.321,135.861 L31.321,135.861 Z M4.052,51.939 L4.052,51.939 C-6.252,83.66 5.709,117.272 31.312,135.867 L31.316,135.851 L48.168,83.99 L4.07,51.951 L58.579,51.951 L75.431,0.089 L75.435,0.075 L20.902,0.075 L4.052,51.939 L4.052,51.939 Z",
|
|
58
|
+
id: "Shape"
|
|
59
|
+
}))))));
|
|
73
60
|
var BottomBadge = function BottomBadge(_ref) {
|
|
74
61
|
var link = _ref.link;
|
|
75
|
-
return
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
)
|
|
84
|
-
);
|
|
62
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
63
|
+
className: "auth0-lock-badge-bottom"
|
|
64
|
+
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
65
|
+
href: link,
|
|
66
|
+
target: "_blank",
|
|
67
|
+
className: "auth0-lock-badge",
|
|
68
|
+
rel: "noopener noreferrer"
|
|
69
|
+
}, "Protected with ", badgeSvg));
|
|
85
70
|
};
|
|
86
|
-
|
|
87
71
|
var Avatar = function Avatar(_ref2) {
|
|
88
72
|
var imageUrl = _ref2.imageUrl;
|
|
89
|
-
return
|
|
73
|
+
return /*#__PURE__*/_react.default.createElement("img", {
|
|
74
|
+
src: imageUrl,
|
|
75
|
+
className: "auth0-lock-header-avatar"
|
|
76
|
+
});
|
|
90
77
|
};
|
|
91
|
-
|
|
92
78
|
Avatar.propTypes = {
|
|
93
|
-
imageUrl:
|
|
79
|
+
imageUrl: _propTypes.default.string.isRequired
|
|
94
80
|
};
|
|
95
|
-
|
|
96
|
-
var EscKeyDownHandler = function () {
|
|
81
|
+
var EscKeyDownHandler = /*#__PURE__*/function () {
|
|
97
82
|
function EscKeyDownHandler(f) {
|
|
98
83
|
_classCallCheck(this, EscKeyDownHandler);
|
|
99
|
-
|
|
100
84
|
this.handler = function (e) {
|
|
101
85
|
if (e.keyCode == 27 && e.target.tagName.toUpperCase() != 'INPUT') {
|
|
102
86
|
f();
|
|
@@ -104,289 +88,270 @@ var EscKeyDownHandler = function () {
|
|
|
104
88
|
};
|
|
105
89
|
window.document.addEventListener('keydown', this.handler, false);
|
|
106
90
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
91
|
+
_createClass(EscKeyDownHandler, [{
|
|
92
|
+
key: "release",
|
|
93
|
+
value: function release() {
|
|
94
|
+
window.document.removeEventListener('keydown', this.handler);
|
|
95
|
+
}
|
|
96
|
+
}]);
|
|
112
97
|
return EscKeyDownHandler;
|
|
113
98
|
}();
|
|
114
|
-
|
|
115
99
|
var IPHONE = typeof window !== 'undefined' && window.navigator && !!window.navigator.userAgent.match(/iPhone/i);
|
|
116
|
-
|
|
117
|
-
var Container = function (_React$Component) {
|
|
100
|
+
var Container = /*#__PURE__*/function (_React$Component) {
|
|
118
101
|
_inherits(Container, _React$Component);
|
|
119
|
-
|
|
102
|
+
var _super = _createSuper(Container);
|
|
120
103
|
function Container(props) {
|
|
104
|
+
var _this;
|
|
121
105
|
_classCallCheck(this, Container);
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
106
|
+
_this = _super.call(this, props);
|
|
107
|
+
_this.state = {
|
|
108
|
+
isOpen: false
|
|
109
|
+
};
|
|
126
110
|
return _this;
|
|
127
111
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
var _lock$get$toJS = lock.get('client').toJS(),
|
|
112
|
+
_createClass(Container, [{
|
|
113
|
+
key: "checkConnectionResolver",
|
|
114
|
+
value: function checkConnectionResolver(done) {
|
|
115
|
+
var contentProps = this.props.contentProps;
|
|
116
|
+
var lock = contentProps.model;
|
|
117
|
+
var connectionResolver = l.connectionResolver(lock);
|
|
118
|
+
if (!connectionResolver) {
|
|
119
|
+
return done();
|
|
120
|
+
}
|
|
121
|
+
var _lock$get$toJS = lock.get('client').toJS(),
|
|
139
122
|
connections = _lock$get$toJS.connections,
|
|
140
123
|
id = _lock$get$toJS.id;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
124
|
+
var context = {
|
|
125
|
+
connections: connections,
|
|
126
|
+
id: id
|
|
127
|
+
};
|
|
128
|
+
var userInputValue = c.getFieldValue(lock, 'username') || c.getFieldValue(lock, 'email');
|
|
129
|
+
connectionResolver(userInputValue, context, function (resolvedConnection) {
|
|
130
|
+
(0, _index3.swap)(_index3.updateEntity, 'lock', l.id(lock), function (m) {
|
|
131
|
+
return l.setResolvedConnection(m, resolvedConnection);
|
|
132
|
+
});
|
|
133
|
+
done();
|
|
147
134
|
});
|
|
148
|
-
done();
|
|
149
|
-
});
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
Container.prototype.componentDidMount = function componentDidMount() {
|
|
153
|
-
var _this2 = this;
|
|
154
|
-
|
|
155
|
-
if (this.props.isModal) {
|
|
156
|
-
setTimeout(function () {
|
|
157
|
-
return _this2.setState({ isOpen: true });
|
|
158
|
-
}, 17);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
if (this.props.closeHandler) {
|
|
162
|
-
this.escKeydown = new EscKeyDownHandler(this.handleEsc.bind(this));
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
Container.prototype.componentWillUnmount = function componentWillUnmount() {
|
|
167
|
-
if (this.escKeydown) {
|
|
168
|
-
this.escKeydown.release();
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
Container.prototype.handleSubmit = function handleSubmit(e) {
|
|
173
|
-
var _this3 = this;
|
|
174
|
-
|
|
175
|
-
e.preventDefault();
|
|
176
|
-
// Safari does not disable form submits when the submit button is disabled
|
|
177
|
-
// on single input (eg. passwordless) forms, so disable it manually.
|
|
178
|
-
if (this.props.isSubmitting) {
|
|
179
|
-
return;
|
|
180
135
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
if (
|
|
136
|
+
}, {
|
|
137
|
+
key: "componentDidMount",
|
|
138
|
+
value: function componentDidMount() {
|
|
139
|
+
var _this2 = this;
|
|
140
|
+
if (this.props.isModal) {
|
|
186
141
|
setTimeout(function () {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
142
|
+
return _this2.setState({
|
|
143
|
+
isOpen: true
|
|
144
|
+
});
|
|
190
145
|
}, 17);
|
|
191
|
-
submitHandler();
|
|
192
146
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
Container.prototype.handleClose = function handleClose() {
|
|
197
|
-
var _props = this.props,
|
|
198
|
-
closeHandler = _props.closeHandler,
|
|
199
|
-
isSubmitting = _props.isSubmitting;
|
|
200
|
-
|
|
201
|
-
if (!isSubmitting) {
|
|
202
|
-
closeHandler();
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
Container.prototype.handleEsc = function handleEsc() {
|
|
207
|
-
var _props2 = this.props,
|
|
208
|
-
closeHandler = _props2.closeHandler,
|
|
209
|
-
escHandler = _props2.escHandler;
|
|
210
|
-
|
|
211
|
-
escHandler ? escHandler() : this.handleClose();
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
Container.prototype.hide = function hide() {
|
|
215
|
-
this.setState({ isOpen: false });
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
Container.prototype.render = function render() {
|
|
219
|
-
var _props3 = this.props,
|
|
220
|
-
autofocus = _props3.autofocus,
|
|
221
|
-
avatar = _props3.avatar,
|
|
222
|
-
auxiliaryPane = _props3.auxiliaryPane,
|
|
223
|
-
backHandler = _props3.backHandler,
|
|
224
|
-
badgeLink = _props3.badgeLink,
|
|
225
|
-
closeHandler = _props3.closeHandler,
|
|
226
|
-
contentComponent = _props3.contentComponent,
|
|
227
|
-
contentProps = _props3.contentProps,
|
|
228
|
-
disableSubmitButton = _props3.disableSubmitButton,
|
|
229
|
-
disallowClose = _props3.disallowClose,
|
|
230
|
-
error = _props3.error,
|
|
231
|
-
info = _props3.info,
|
|
232
|
-
isMobile = _props3.isMobile,
|
|
233
|
-
isModal = _props3.isModal,
|
|
234
|
-
isSubmitting = _props3.isSubmitting,
|
|
235
|
-
logo = _props3.logo,
|
|
236
|
-
primaryColor = _props3.primaryColor,
|
|
237
|
-
screenName = _props3.screenName,
|
|
238
|
-
showBadge = _props3.showBadge,
|
|
239
|
-
submitButtonLabel = _props3.submitButtonLabel,
|
|
240
|
-
submitHandler = _props3.submitHandler,
|
|
241
|
-
success = _props3.success,
|
|
242
|
-
tabs = _props3.tabs,
|
|
243
|
-
terms = _props3.terms,
|
|
244
|
-
title = _props3.title,
|
|
245
|
-
classNames = _props3.classNames,
|
|
246
|
-
scrollGlobalMessagesIntoView = _props3.scrollGlobalMessagesIntoView,
|
|
247
|
-
suppressSubmitOverlay = _props3.suppressSubmitOverlay;
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
var badge = showBadge ? _react2.default.createElement(BottomBadge, { link: badgeLink }) : null;
|
|
251
|
-
|
|
252
|
-
var overlay = isModal ? _react2.default.createElement(
|
|
253
|
-
'div',
|
|
254
|
-
{ className: 'auth0-lock-overlay' },
|
|
255
|
-
badge
|
|
256
|
-
) : null;
|
|
257
|
-
|
|
258
|
-
var className = 'auth0-lock';
|
|
259
|
-
|
|
260
|
-
if (isModal && this.state.isOpen) {
|
|
261
|
-
className += ' auth0-lock-opened';
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
if (!isModal) {
|
|
265
|
-
className += ' auth0-lock-opened-in-frame';
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
if (isMobile) {
|
|
269
|
-
className += ' auth0-lock-mobile';
|
|
147
|
+
if (this.props.closeHandler) {
|
|
148
|
+
this.escKeydown = new EscKeyDownHandler(this.handleEsc.bind(this));
|
|
149
|
+
}
|
|
270
150
|
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
151
|
+
}, {
|
|
152
|
+
key: "componentWillUnmount",
|
|
153
|
+
value: function componentWillUnmount() {
|
|
154
|
+
if (this.escKeydown) {
|
|
155
|
+
this.escKeydown.release();
|
|
156
|
+
}
|
|
274
157
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
158
|
+
}, {
|
|
159
|
+
key: "handleSubmit",
|
|
160
|
+
value: function handleSubmit(e) {
|
|
161
|
+
var _this3 = this;
|
|
162
|
+
e.preventDefault();
|
|
163
|
+
// Safari does not disable form submits when the submit button is disabled
|
|
164
|
+
// on single input (eg. passwordless) forms, so disable it manually.
|
|
165
|
+
if (this.props.isSubmitting) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
this.checkConnectionResolver(function () {
|
|
169
|
+
var submitHandler = _this3.props.submitHandler;
|
|
170
|
+
if (submitHandler) {
|
|
171
|
+
setTimeout(function () {
|
|
172
|
+
if (!_this3.props.isSubmitting) {
|
|
173
|
+
_this3.refs.chrome.focusError();
|
|
174
|
+
}
|
|
175
|
+
}, 17);
|
|
176
|
+
submitHandler();
|
|
177
|
+
}
|
|
178
|
+
});
|
|
278
179
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
180
|
+
}, {
|
|
181
|
+
key: "handleClose",
|
|
182
|
+
value: function handleClose() {
|
|
183
|
+
var _this$props = this.props,
|
|
184
|
+
closeHandler = _this$props.closeHandler,
|
|
185
|
+
isSubmitting = _this$props.isSubmitting;
|
|
186
|
+
if (!isSubmitting) {
|
|
187
|
+
closeHandler();
|
|
188
|
+
}
|
|
282
189
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
190
|
+
}, {
|
|
191
|
+
key: "handleEsc",
|
|
192
|
+
value: function handleEsc() {
|
|
193
|
+
var _this$props2 = this.props,
|
|
194
|
+
closeHandler = _this$props2.closeHandler,
|
|
195
|
+
escHandler = _this$props2.escHandler;
|
|
196
|
+
escHandler ? escHandler() : this.handleClose();
|
|
286
197
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
198
|
+
}, {
|
|
199
|
+
key: "hide",
|
|
200
|
+
value: function hide() {
|
|
201
|
+
this.setState({
|
|
202
|
+
isOpen: false
|
|
203
|
+
});
|
|
290
204
|
}
|
|
205
|
+
}, {
|
|
206
|
+
key: "render",
|
|
207
|
+
value: function render() {
|
|
208
|
+
var _this$props3 = this.props,
|
|
209
|
+
autofocus = _this$props3.autofocus,
|
|
210
|
+
avatar = _this$props3.avatar,
|
|
211
|
+
auxiliaryPane = _this$props3.auxiliaryPane,
|
|
212
|
+
backHandler = _this$props3.backHandler,
|
|
213
|
+
badgeLink = _this$props3.badgeLink,
|
|
214
|
+
closeHandler = _this$props3.closeHandler,
|
|
215
|
+
contentComponent = _this$props3.contentComponent,
|
|
216
|
+
contentProps = _this$props3.contentProps,
|
|
217
|
+
disableSubmitButton = _this$props3.disableSubmitButton,
|
|
218
|
+
disallowClose = _this$props3.disallowClose,
|
|
219
|
+
error = _this$props3.error,
|
|
220
|
+
info = _this$props3.info,
|
|
221
|
+
isMobile = _this$props3.isMobile,
|
|
222
|
+
isModal = _this$props3.isModal,
|
|
223
|
+
isSubmitting = _this$props3.isSubmitting,
|
|
224
|
+
logo = _this$props3.logo,
|
|
225
|
+
primaryColor = _this$props3.primaryColor,
|
|
226
|
+
screenName = _this$props3.screenName,
|
|
227
|
+
showBadge = _this$props3.showBadge,
|
|
228
|
+
submitButtonLabel = _this$props3.submitButtonLabel,
|
|
229
|
+
submitHandler = _this$props3.submitHandler,
|
|
230
|
+
success = _this$props3.success,
|
|
231
|
+
tabs = _this$props3.tabs,
|
|
232
|
+
terms = _this$props3.terms,
|
|
233
|
+
title = _this$props3.title,
|
|
234
|
+
classNames = _this$props3.classNames,
|
|
235
|
+
scrollGlobalMessagesIntoView = _this$props3.scrollGlobalMessagesIntoView,
|
|
236
|
+
suppressSubmitOverlay = _this$props3.suppressSubmitOverlay;
|
|
237
|
+
var badge = showBadge ? /*#__PURE__*/_react.default.createElement(BottomBadge, {
|
|
238
|
+
link: badgeLink
|
|
239
|
+
}) : null;
|
|
240
|
+
var overlay = isModal ? /*#__PURE__*/_react.default.createElement("div", {
|
|
241
|
+
className: "auth0-lock-overlay"
|
|
242
|
+
}, badge) : null;
|
|
243
|
+
var className = 'auth0-lock';
|
|
244
|
+
if (isModal && this.state.isOpen) {
|
|
245
|
+
className += ' auth0-lock-opened';
|
|
246
|
+
}
|
|
247
|
+
if (!isModal) {
|
|
248
|
+
className += ' auth0-lock-opened-in-frame';
|
|
249
|
+
}
|
|
250
|
+
if (isMobile) {
|
|
251
|
+
className += ' auth0-lock-mobile';
|
|
252
|
+
}
|
|
253
|
+
if (isSubmitting && !suppressSubmitOverlay) {
|
|
254
|
+
className += ' auth0-lock-mode-loading';
|
|
255
|
+
}
|
|
256
|
+
if (auxiliaryPane) {
|
|
257
|
+
className += ' auth0-lock-auxiliary';
|
|
258
|
+
}
|
|
259
|
+
if (!submitHandler) {
|
|
260
|
+
className += ' auth0-lock-no-submit';
|
|
261
|
+
}
|
|
262
|
+
if (terms) {
|
|
263
|
+
className += ' auth0-lock-with-terms';
|
|
264
|
+
}
|
|
265
|
+
if (IPHONE) {
|
|
266
|
+
className += ' auth0-lock-iphone';
|
|
267
|
+
}
|
|
291
268
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
269
|
+
// TODO: this no longer makes sense, instead of taking a tabs
|
|
270
|
+
// prop we should take extra class names.
|
|
271
|
+
if (tabs) {
|
|
272
|
+
className += ' auth0-lock-with-tabs';
|
|
273
|
+
}
|
|
274
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
275
|
+
className: className,
|
|
276
|
+
lang: this.props.language
|
|
277
|
+
}, overlay, /*#__PURE__*/_react.default.createElement("div", {
|
|
278
|
+
className: "auth0-lock-center"
|
|
279
|
+
}, /*#__PURE__*/_react.default.createElement("form", {
|
|
280
|
+
className: "auth0-lock-widget",
|
|
281
|
+
method: "post",
|
|
282
|
+
noValidate: true,
|
|
283
|
+
onSubmit: this.handleSubmit.bind(this)
|
|
284
|
+
}, avatar && /*#__PURE__*/_react.default.createElement(Avatar, {
|
|
285
|
+
imageUrl: avatar
|
|
286
|
+
}), closeHandler && /*#__PURE__*/_react.default.createElement(_button.CloseButton, {
|
|
287
|
+
onClick: this.handleClose.bind(this)
|
|
288
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
289
|
+
className: "auth0-lock-widget-container"
|
|
290
|
+
}, /*#__PURE__*/_react.default.createElement(_chrome.default, {
|
|
291
|
+
autofocus: autofocus,
|
|
292
|
+
avatar: avatar,
|
|
293
|
+
auxiliaryPane: auxiliaryPane,
|
|
294
|
+
backHandler: backHandler,
|
|
295
|
+
contentComponent: contentComponent,
|
|
296
|
+
contentProps: contentProps,
|
|
297
|
+
disableSubmitButton: disableSubmitButton,
|
|
298
|
+
error: error,
|
|
299
|
+
info: info,
|
|
300
|
+
isSubmitting: isSubmitting,
|
|
301
|
+
logo: logo,
|
|
302
|
+
screenName: screenName,
|
|
303
|
+
primaryColor: primaryColor,
|
|
304
|
+
ref: "chrome",
|
|
305
|
+
showSubmitButton: !!submitHandler,
|
|
306
|
+
submitButtonLabel: submitButtonLabel,
|
|
307
|
+
success: success,
|
|
308
|
+
tabs: tabs,
|
|
309
|
+
terms: terms,
|
|
310
|
+
title: title,
|
|
311
|
+
classNames: classNames,
|
|
312
|
+
scrollGlobalMessagesIntoView: scrollGlobalMessagesIntoView
|
|
313
|
+
})))));
|
|
296
314
|
}
|
|
297
|
-
|
|
298
|
-
return _react2.default.createElement(
|
|
299
|
-
'div',
|
|
300
|
-
{ className: className, lang: this.props.language },
|
|
301
|
-
overlay,
|
|
302
|
-
_react2.default.createElement(
|
|
303
|
-
'div',
|
|
304
|
-
{ className: 'auth0-lock-center' },
|
|
305
|
-
_react2.default.createElement(
|
|
306
|
-
'form',
|
|
307
|
-
{
|
|
308
|
-
className: 'auth0-lock-widget',
|
|
309
|
-
method: 'post',
|
|
310
|
-
noValidate: true,
|
|
311
|
-
onSubmit: this.handleSubmit.bind(this)
|
|
312
|
-
},
|
|
313
|
-
avatar && _react2.default.createElement(Avatar, { imageUrl: avatar }),
|
|
314
|
-
closeHandler && _react2.default.createElement(_button.CloseButton, { onClick: this.handleClose.bind(this) }),
|
|
315
|
-
_react2.default.createElement(
|
|
316
|
-
'div',
|
|
317
|
-
{ className: 'auth0-lock-widget-container' },
|
|
318
|
-
_react2.default.createElement(_chrome2.default, {
|
|
319
|
-
autofocus: autofocus,
|
|
320
|
-
avatar: avatar,
|
|
321
|
-
auxiliaryPane: auxiliaryPane,
|
|
322
|
-
backHandler: backHandler,
|
|
323
|
-
contentComponent: contentComponent,
|
|
324
|
-
contentProps: contentProps,
|
|
325
|
-
disableSubmitButton: disableSubmitButton,
|
|
326
|
-
error: error,
|
|
327
|
-
info: info,
|
|
328
|
-
isSubmitting: isSubmitting,
|
|
329
|
-
logo: logo,
|
|
330
|
-
screenName: screenName,
|
|
331
|
-
primaryColor: primaryColor,
|
|
332
|
-
ref: 'chrome',
|
|
333
|
-
showSubmitButton: !!submitHandler,
|
|
334
|
-
submitButtonLabel: submitButtonLabel,
|
|
335
|
-
success: success,
|
|
336
|
-
tabs: tabs,
|
|
337
|
-
terms: terms,
|
|
338
|
-
title: title,
|
|
339
|
-
classNames: classNames,
|
|
340
|
-
scrollGlobalMessagesIntoView: scrollGlobalMessagesIntoView
|
|
341
|
-
})
|
|
342
|
-
)
|
|
343
|
-
)
|
|
344
|
-
)
|
|
345
|
-
);
|
|
346
|
-
};
|
|
347
|
-
|
|
315
|
+
}]);
|
|
348
316
|
return Container;
|
|
349
|
-
}(
|
|
350
|
-
|
|
317
|
+
}(_react.default.Component);
|
|
351
318
|
exports.default = Container;
|
|
352
|
-
|
|
353
|
-
|
|
354
319
|
Container.propTypes = {
|
|
355
|
-
autofocus:
|
|
356
|
-
avatar:
|
|
357
|
-
auxiliaryPane:
|
|
358
|
-
backHandler:
|
|
359
|
-
badgeLink:
|
|
360
|
-
closeHandler:
|
|
361
|
-
contentComponent:
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
320
|
+
autofocus: _propTypes.default.bool.isRequired,
|
|
321
|
+
avatar: _propTypes.default.string,
|
|
322
|
+
auxiliaryPane: _propTypes.default.element,
|
|
323
|
+
backHandler: _propTypes.default.func,
|
|
324
|
+
badgeLink: _propTypes.default.string.isRequired,
|
|
325
|
+
closeHandler: _propTypes.default.func,
|
|
326
|
+
contentComponent: _propTypes.default.func.isRequired,
|
|
327
|
+
// TODO: it also can be a class component
|
|
328
|
+
contentProps: _propTypes.default.object.isRequired,
|
|
329
|
+
disableSubmitButton: _propTypes.default.bool.isRequired,
|
|
330
|
+
error: _propTypes.default.node,
|
|
331
|
+
info: _propTypes.default.node,
|
|
332
|
+
isMobile: _propTypes.default.bool.isRequired,
|
|
333
|
+
isModal: _propTypes.default.bool.isRequired,
|
|
334
|
+
isSubmitting: _propTypes.default.bool.isRequired,
|
|
335
|
+
language: _propTypes.default.string,
|
|
336
|
+
logo: _propTypes.default.string.isRequired,
|
|
337
|
+
primaryColor: _propTypes.default.string.isRequired,
|
|
338
|
+
screenName: _propTypes.default.string.isRequired,
|
|
339
|
+
showBadge: _propTypes.default.bool.isRequired,
|
|
340
|
+
submitButtonLabel: _propTypes.default.string,
|
|
341
|
+
success: _propTypes.default.node,
|
|
342
|
+
tabs: _propTypes.default.bool,
|
|
343
|
+
terms: _propTypes.default.element,
|
|
344
|
+
title: _propTypes.default.string,
|
|
345
|
+
classNames: _propTypes.default.string.isRequired,
|
|
346
|
+
scrollGlobalMessagesIntoView: _propTypes.default.bool,
|
|
347
|
+
suppressSubmitOverlay: _propTypes.default.bool
|
|
382
348
|
// escHandler
|
|
383
349
|
// submitHandler,
|
|
384
350
|
};
|
|
385
351
|
|
|
386
352
|
// NOTE: detecting the file protocol is important for things like electron.
|
|
387
353
|
var isFileProtocol = typeof window !== 'undefined' && window.window && window.location && window.location.protocol === 'file:';
|
|
388
|
-
|
|
389
|
-
var defaultProps = exports.defaultProps = Container.defaultProps = {
|
|
354
|
+
var defaultProps = Container.defaultProps = {
|
|
390
355
|
autofocus: false,
|
|
391
356
|
badgeLink: 'https://auth0.com/',
|
|
392
357
|
contentProps: {},
|
|
@@ -394,8 +359,9 @@ var defaultProps = exports.defaultProps = Container.defaultProps = {
|
|
|
394
359
|
isMobile: false,
|
|
395
360
|
isSubmitting: false,
|
|
396
361
|
language: 'en',
|
|
397
|
-
logo: (isFileProtocol ? 'https:' : ''
|
|
362
|
+
logo: "".concat(isFileProtocol ? 'https:' : '', "//cdn.auth0.com/styleguide/components/1.0.8/media/logos/img/badge.png"),
|
|
398
363
|
primaryColor: '#ea5323',
|
|
399
364
|
showBadge: true,
|
|
400
365
|
scrollGlobalMessagesIntoView: true
|
|
401
366
|
};
|
|
367
|
+
exports.defaultProps = defaultProps;
|