auth0-lock 11.35.0 → 12.0.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 +3 -1
- package/.shiprc +4 -5
- package/CHANGELOG.md +25 -0
- package/DEVELOPMENT.md +1 -1
- package/README.md +20 -16
- 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 +24 -47
- package/lib/__tests__/connection/database/password_reset_confirmation.js +23 -32
- package/lib/__tests__/connection/database/reset_password.js +17 -39
- package/lib/__tests__/connection/database/signed_up_confirmation.js +23 -32
- 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 +32 -75
- package/lib/__tests__/connection/passwordless/ask_vcode.js +29 -51
- package/lib/__tests__/connection/passwordless/email_sent_confirmation.js +23 -32
- 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 +23 -32
- 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/social_or_email_login_screen.js +7 -28
- package/lib/__tests__/engine/passwordless/social_or_phone_number_login_screen.js +7 -28
- 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 +23 -42
- 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 +15 -34
- 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 -65
- 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 +154 -305
- package/lib/core/loading_screen.js +61 -71
- package/lib/core/pane_separator.js +10 -10
- package/lib/core/remote_data.js +30 -51
- 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 +22 -28
- package/lib/core/web_api/p2_api.js +162 -171
- package/lib/core/web_api.js +106 -94
- 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 +80 -116
- package/lib/engine/passwordless/social_or_phone_number_login_screen.js +79 -110
- package/lib/engine/passwordless.js +75 -104
- package/lib/field/actions.js +11 -17
- package/lib/field/captcha/captcha_pane.js +83 -103
- 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 +50 -87
- 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/package.json +48 -34
- package/webpack.config.js +36 -3
|
@@ -1,85 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
var _index = require('../index');
|
|
18
|
-
|
|
19
|
-
var c = _interopRequireWildcard(_index);
|
|
20
|
-
|
|
21
|
-
var _index2 = require('../../store/index');
|
|
22
|
-
|
|
23
|
-
var _index3 = require('../../core/index');
|
|
24
|
-
|
|
25
|
-
var l = _interopRequireWildcard(_index3);
|
|
26
|
-
|
|
27
|
-
var _password = require('../password');
|
|
28
|
-
|
|
29
|
-
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; } }
|
|
30
|
-
|
|
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 _password_input = _interopRequireDefault(require("../../ui/input/password_input"));
|
|
10
|
+
var c = _interopRequireWildcard(require("../index"));
|
|
11
|
+
var _index2 = require("../../store/index");
|
|
12
|
+
var l = _interopRequireWildcard(require("../../core/index"));
|
|
13
|
+
var _password = require("../password");
|
|
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; }
|
|
31
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
32
|
-
|
|
17
|
+
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); }
|
|
33
18
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
34
|
-
|
|
35
|
-
function
|
|
36
|
-
|
|
37
|
-
function
|
|
38
|
-
|
|
39
|
-
|
|
19
|
+
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); } }
|
|
20
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
21
|
+
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); }
|
|
22
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23
|
+
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); }; }
|
|
24
|
+
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); }
|
|
25
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
26
|
+
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; } }
|
|
27
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
28
|
+
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; }
|
|
29
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
30
|
+
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); }
|
|
31
|
+
var PasswordPane = /*#__PURE__*/function (_React$Component) {
|
|
40
32
|
_inherits(PasswordPane, _React$Component);
|
|
41
|
-
|
|
33
|
+
var _super = _createSuper(PasswordPane);
|
|
42
34
|
function PasswordPane() {
|
|
43
|
-
var
|
|
44
|
-
|
|
35
|
+
var _this;
|
|
45
36
|
_classCallCheck(this, PasswordPane);
|
|
46
|
-
|
|
47
|
-
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
37
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
48
38
|
args[_key] = arguments[_key];
|
|
49
39
|
}
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
41
|
+
_defineProperty(_assertThisInitialized(_this), "handleChange", function (e) {
|
|
52
42
|
var _this$props = _this.props,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
43
|
+
lock = _this$props.lock,
|
|
44
|
+
policy = _this$props.policy;
|
|
56
45
|
(0, _index2.swap)(_index2.updateEntity, 'lock', l.id(lock), _password.setPassword, e.target.value, policy);
|
|
57
|
-
}
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(_assertThisInitialized(_this), "handleShowPasswordChange", function (e) {
|
|
58
48
|
var lock = _this.props.lock;
|
|
59
|
-
|
|
60
49
|
(0, _index2.swap)(_index2.updateEntity, 'lock', l.id(lock), _password.setShowPassword, e.target.checked);
|
|
61
|
-
}
|
|
50
|
+
});
|
|
51
|
+
return _this;
|
|
62
52
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
_react2.default.createElement(_password_input2.default, {
|
|
53
|
+
_createClass(PasswordPane, [{
|
|
54
|
+
key: "render",
|
|
55
|
+
value: function render() {
|
|
56
|
+
var _this$props2 = this.props,
|
|
57
|
+
i18n = _this$props2.i18n,
|
|
58
|
+
lock = _this$props2.lock,
|
|
59
|
+
placeholder = _this$props2.placeholder,
|
|
60
|
+
policy = _this$props2.policy,
|
|
61
|
+
strengthMessages = _this$props2.strengthMessages,
|
|
62
|
+
hidden = _this$props2.hidden;
|
|
63
|
+
var hiddenCss = hidden ? ' auth0-lock-hidden' : '';
|
|
64
|
+
|
|
65
|
+
// TODO: invalidErrorHint and blankErrorHint are deprecated.
|
|
66
|
+
// They are kept for backwards compatibility in the code for the customers overwriting
|
|
67
|
+
// them with languageDictionary. They can be removed in the next major release.
|
|
68
|
+
var invalidHint = c.getFieldValue(lock, 'password') ? i18n.str('invalidErrorHint') || i18n.str('invalidPasswordErrorHint') : i18n.str('blankErrorHint') || i18n.str('blankPasswordErrorHint');
|
|
69
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
70
|
+
className: "auth0-lock-input-block auth0-lock-input-show-password".concat(hiddenCss)
|
|
71
|
+
}, /*#__PURE__*/_react.default.createElement(_password_input.default, {
|
|
83
72
|
value: c.getFieldValue(lock, 'password'),
|
|
84
73
|
invalidHint: invalidHint,
|
|
85
74
|
showPasswordStrengthMessage: !c.isFieldValid(lock, 'password'),
|
|
@@ -91,28 +80,27 @@ var PasswordPane = function (_React$Component) {
|
|
|
91
80
|
policy: policy,
|
|
92
81
|
showPassword: c.getFieldValue(lock, 'showPassword', false),
|
|
93
82
|
lock: lock
|
|
94
|
-
}),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
83
|
+
}), l.ui.allowShowPassword(lock) && /*#__PURE__*/_react.default.createElement("div", {
|
|
84
|
+
className: "auth0-lock-show-password"
|
|
85
|
+
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
86
|
+
type: "checkbox",
|
|
87
|
+
id: "slideOne",
|
|
88
|
+
onChange: this.handleShowPasswordChange
|
|
89
|
+
}), /*#__PURE__*/_react.default.createElement("label", {
|
|
90
|
+
htmlFor: "slideOne",
|
|
91
|
+
title: i18n.str('showPassword')
|
|
92
|
+
})));
|
|
93
|
+
}
|
|
94
|
+
}]);
|
|
104
95
|
return PasswordPane;
|
|
105
|
-
}(
|
|
106
|
-
|
|
96
|
+
}(_react.default.Component);
|
|
107
97
|
exports.default = PasswordPane;
|
|
108
|
-
|
|
109
|
-
|
|
110
98
|
PasswordPane.propTypes = {
|
|
111
|
-
i18n:
|
|
112
|
-
lock:
|
|
113
|
-
onChange:
|
|
114
|
-
placeholder:
|
|
115
|
-
policy:
|
|
116
|
-
strengthMessages:
|
|
117
|
-
hidden:
|
|
99
|
+
i18n: _propTypes.default.object.isRequired,
|
|
100
|
+
lock: _propTypes.default.object.isRequired,
|
|
101
|
+
onChange: _propTypes.default.func,
|
|
102
|
+
placeholder: _propTypes.default.string.isRequired,
|
|
103
|
+
policy: _propTypes.default.object,
|
|
104
|
+
strengthMessages: _propTypes.default.object,
|
|
105
|
+
hidden: _propTypes.default.bool
|
|
118
106
|
};
|
package/lib/field/password.js
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
5
6
|
exports.setPassword = setPassword;
|
|
6
7
|
exports.setShowPassword = setShowPassword;
|
|
7
|
-
|
|
8
|
-
var _policy = require(
|
|
9
|
-
|
|
10
|
-
var _policy2 = _interopRequireDefault(_policy);
|
|
11
|
-
|
|
12
|
-
var _index = require('./index');
|
|
13
|
-
|
|
8
|
+
exports.validatePassword = validatePassword;
|
|
9
|
+
var _policy = _interopRequireDefault(require("password-sheriff/lib/policy"));
|
|
10
|
+
var _index = require("./index");
|
|
14
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
12
|
function validatePassword(password, policy) {
|
|
17
13
|
if (!password) {
|
|
18
14
|
return false;
|
|
@@ -20,13 +16,11 @@ function validatePassword(password, policy) {
|
|
|
20
16
|
if (!policy) {
|
|
21
17
|
return true;
|
|
22
18
|
}
|
|
23
|
-
return new
|
|
19
|
+
return new _policy.default(policy.toJS()).check(password);
|
|
24
20
|
}
|
|
25
|
-
|
|
26
21
|
function setPassword(m, password, policy) {
|
|
27
22
|
return (0, _index.setField)(m, 'password', password, validatePassword, policy);
|
|
28
23
|
}
|
|
29
|
-
|
|
30
24
|
function setShowPassword(m, checked) {
|
|
31
25
|
return (0, _index.setField)(m, 'showPassword', checked, function () {
|
|
32
26
|
return true;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _default = [['Afghanistan', 'AF', '+93'], ['Albania', 'AL', '+355'], ['Algeria', 'DZ', '+213'], ['American Samoa', 'AS', '+1684'], ['Andorra', 'AD', '+376'], ['Angola', 'AO', '+244'], ['Anguilla', 'AI', '+1264'], ['Antarctica', 'AQ', '+672'], ['Antigua and Barbuda', 'AG', '+1268'], ['Argentina', 'AR', '+54 9'], ['Armenia', 'AM', '+374'], ['Aruba', 'AW', '+297'], ['Australia', 'AU', '+61'], ['Austria', 'AT', '+43'], ['Azerbaijan', 'AZ', '+994'], ['Bahamas', 'BS', '+1242'], ['Bahrain', 'BH', '+973'], ['Bangladesh', 'BD', '+880'], ['Barbados', 'BB', '+1246'], ['Belarus', 'BY', '+375'], ['Belgium', 'BE', '+32'], ['Belize', 'BZ', '+501'], ['Benin', 'BJ', '+229'], ['Bermuda', 'BM', '+1441'], ['Bhutan', 'BT', '+975'], ['Bolivia, Plurinational State of', 'BO', '+591'], ['Bonaire, Sint Eustatius and Saba', 'BQ', '+599'], ['Bosnia and Herzegovina', 'BA', '+387'], ['Botswana', 'BW', '+267'], ['Bouvet Island', 'BV', '+47'], ['Brazil', 'BR', '+55'], ['British Indian Ocean Territory', 'IO', '+246'], ['Brunei Darussalam', 'BN', '+673'], ['Bulgaria', 'BG', '+359'], ['Burkina Faso', 'BF', '+226'], ['Burundi', 'BI', '+257'], ['Cambodia', 'KH', '+855'], ['Cameroon', 'CM', '+237'], ['Canada', 'CA', '+1'], ['Cape Verde', 'CV', '+238'], ['Cayman Islands', 'KY', '+1345'], ['Central African Republic', 'CF', '+236'], ['Chad', 'TD', '+235'], ['Chile', 'CL', '+56'], ['China', 'CN', '+86'], ['Christmas Island', 'CX', '+61'], ['Cocos (Keeling) Islands', 'CC', '+61'], ['Colombia', 'CO', '+57'], ['Comoros', 'KM', '+269'], ['Congo', 'CG', '+242'], ['Congo, the Democratic Republic of the', 'CD', '+243'], ['Cook Islands', 'CK', '+682'], ['Costa Rica', 'CR', '+506'], ['Croatia', 'HR', '+385'], ['Cuba', 'CU', '+53'], ['Curaçao', 'CW', '+599'], ['Cyprus', 'CY', '+357'], ['Czech Republic', 'CZ', '+420'], ["Côte d'Ivoire", 'CI', '+225'], ['Denmark', 'DK', '+45'], ['Djibouti', 'DJ', '+253'], ['Dominica', 'DM', '+1767'], ['Dominican Republic', 'DO', '+1809'], ['Dominican Republic', 'DO', '+1829'], ['Dominican Republic', 'DO', '+1849'], ['Ecuador', 'EC', '+593'], ['Egypt', 'EG', '+20'], ['El Salvador', 'SV', '+503'], ['Equatorial Guinea', 'GQ', '+240'], ['Eritrea', 'ER', '+291'], ['Estonia', 'EE', '+372'], ['Ethiopia', 'ET', '+251'], ['Falkland Islands (Malvinas)', 'FK', '+500'], ['Faroe Islands', 'FO', '+298'], ['Fiji', 'FJ', '+679'], ['Finland', 'FI', '+358'], ['France', 'FR', '+33'], ['French Guiana', 'GF', '+594'], ['French Polynesia', 'PF', '+689'], ['French Southern Territories', 'TF', '+262'], ['Gabon', 'GA', '+241'], ['Gambia', 'GM', '+220'], ['Georgia', 'GE', '+995'], ['Germany', 'DE', '+49'], ['Ghana', 'GH', '+233'], ['Gibraltar', 'GI', '+350'], ['Greece', 'GR', '+30'], ['Greenland', 'GL', '+299'], ['Grenada', 'GD', '+1473'], ['Guadeloupe', 'GP', '+590'], ['Guam', 'GU', '+1671'], ['Guatemala', 'GT', '+502'], ['Guernsey', 'GG', '+44'], ['Guinea', 'GN', '+224'], ['Guinea-Bissau', 'GW', '+245'], ['Guyana', 'GY', '+592'], ['Haiti', 'HT', '+509'], ['Heard Island and McDonald Mcdonald Islands', 'HM', '+672'], ['Holy See (Vatican City State)', 'VA', '+3906'], ['Honduras', 'HN', '+504'], ['Hong Kong', 'HK', '+852'], ['Hungary', 'HU', '+36'], ['Iceland', 'IS', '+354'], ['India', 'IN', '+91'], ['Indonesia', 'ID', '+62'], ['Iran, Islamic Republic of', 'IR', '+98'], ['Iraq', 'IQ', '+964'], ['Ireland', 'IE', '+353'], ['Isle of Man', 'IM', '+44'], ['Israel', 'IL', '+972'], ['Italy', 'IT', '+39'], ['Jamaica', 'JM', '+1876'], ['Japan', 'JP', '+81'], ['Jersey', 'JE', '+44'], ['Jordan', 'JO', '+962'], ['Kazakhstan', 'KZ', '+7'], ['Kenya', 'KE', '+254'], ['Kiribati', 'KI', '+686'], ["Korea, Democratic People's Republic of", 'KP', '+850'], ['Korea, Republic of', 'KR', '+82'], ['Kuwait', 'KW', '+965'], ['Kyrgyzstan', 'KG', '+996'], ["Lao People's Democratic Republic", 'LA', '+856'], ['Latvia', 'LV', '+371'], ['Lebanon', 'LB', '+961'], ['Lesotho', 'LS', '+266'], ['Liberia', 'LR', '+231'], ['Libya', 'LY', '+218'], ['Liechtenstein', 'LI', '+423'], ['Lithuania', 'LT', '+370'], ['Luxembourg', 'LU', '+352'], ['Macao', 'MO', '+853'], ['Macedonia, the Former Yugoslav Republic of', 'MK', '+389'], ['Madagascar', 'MG', '+261'], ['Malawi', 'MW', '+265'], ['Malaysia', 'MY', '+60'], ['Maldives', 'MV', '+960'], ['Mali', 'ML', '+223'], ['Malta', 'MT', '+356'], ['Marshall Islands', 'MH', '+692'], ['Martinique', 'MQ', '+596'], ['Mauritania', 'MR', '+222'], ['Mauritius', 'MU', '+230'], ['Mayotte', 'YT', '+262'], ['Mexico', 'MX', '+52'], ['Micronesia, Federated States of', 'FM', '+691'], ['Moldova, Republic of', 'MD', '+373'], ['Monaco', 'MC', '+377'], ['Mongolia', 'MN', '+976'], ['Montenegro', 'ME', '+382'], ['Montserrat', 'MS', '+1664'], ['Morocco', 'MA', '+212'], ['Mozambique', 'MZ', '+258'], ['Myanmar', 'MM', '+95'], ['Namibia', 'NA', '+264'], ['Nauru', 'NR', '+674'], ['Nepal', 'NP', '+977'], ['Netherlands', 'NL', '+31'], ['New Caledonia', 'NC', '+687'], ['New Zealand', 'NZ', '+64'], ['Nicaragua', 'NI', '+505'], ['Niger', 'NE', '+227'], ['Nigeria', 'NG', '+234'], ['Niue', 'NU', '+683'], ['Norfolk Island', 'NF', '+672'], ['Northern Mariana Islands', 'MP', '+1670'], ['Norway', 'NO', '+47'], ['Oman', 'OM', '+968'], ['Pakistan', 'PK', '+92'], ['Palau', 'PW', '+680'], ['Palestine, State of', 'PS', '+970'], ['Panama', 'PA', '+507'], ['Papua New Guinea', 'PG', '+675'], ['Paraguay', 'PY', '+595'], ['Peru', 'PE', '+51'], ['Philippines', 'PH', '+63'], ['Pitcairn', 'PN', '+870'], ['Poland', 'PL', '+48'], ['Portugal', 'PT', '+351'], ['Puerto Rico', 'PR', '+1'], ['Qatar', 'QA', '+974'], ['Romania', 'RO', '+40'], ['Russian Federation', 'RU', '+7'], ['Rwanda', 'RW', '+250'], ['Réunion', 'RE', '+262'], ['Saint Barthélemy', 'BL', '+590'], ['Saint Helena, Ascension and Tristan da Cunha', 'SH', '+290'], ['Saint Kitts and Nevis', 'KN', '+1869'], ['Saint Lucia', 'LC', '+1758'], ['Saint Martin (French part)', 'MF', '+590'], ['Saint Pierre and Miquelon', 'PM', '+508'], ['Saint Vincent and the Grenadines', 'VC', '+1784'], ['Samoa', 'WS', '+685'], ['San Marino', 'SM', '+378'], ['Sao Tome and Principe', 'ST', '+239'], ['Saudi Arabia', 'SA', '+966'], ['Senegal', 'SN', '+221'], ['Serbia', 'RS', '+381'], ['Seychelles', 'SC', '+248'], ['Sierra Leone', 'SL', '+232'], ['Singapore', 'SG', '+65'], ['Sint Maarten (Dutch part)', 'SX', '+1721'], ['Slovakia', 'SK', '+421'], ['Slovenia', 'SI', '+386'], ['Solomon Islands', 'SB', '+677'], ['Somalia', 'SO', '+252'], ['South Africa', 'ZA', '+27'], ['South Georgia and the South Sandwich Islands', 'GS', '+500'], ['South Sudan', 'SS', '+211'], ['Spain', 'ES', '+34'], ['Sri Lanka', 'LK', '+94'], ['Sudan', 'SD', '+249'], ['Suriname', 'SR', '+597'], ['Svalbard and Jan Mayen', 'SJ', '+47'], ['Swaziland', 'SZ', '+268'], ['Sweden', 'SE', '+46'], ['Switzerland', 'CH', '+41'], ['Syrian Arab Republic', 'SY', '+963'], ['Taiwan, Province of China', 'TW', '+886'], ['Tajikistan', 'TJ', '+992'], ['Tanzania, United Republic of', 'TZ', '+255'], ['Thailand', 'TH', '+66'], ['Timor-Leste', 'TL', '+670'], ['Togo', 'TG', '+228'], ['Tokelau', 'TK', '+690'], ['Tonga', 'TO', '+676'], ['Trinidad and Tobago', 'TT', '+1868'], ['Tunisia', 'TN', '+216'], ['Turkey', 'TR', '+90'], ['Turkmenistan', 'TM', '+993'], ['Turks and Caicos Islands', 'TC', '+1649'], ['Tuvalu', 'TV', '+688'], ['Uganda', 'UG', '+256'], ['Ukraine', 'UA', '+380'], ['United Arab Emirates', 'AE', '+971'], ['United Kingdom', 'GB', '+44'], ['United States', 'US', '+1'], ['Uruguay', 'UY', '+598'], ['Uzbekistan', 'UZ', '+998'], ['Vanuatu', 'VU', '+678'], ['Venezuela, Bolivarian Republic of', 'VE', '+58'], ['Viet Nam', 'VN', '+84'], ['Virgin Islands, British', 'VG', '+1284'], ['Virgin Islands, U.S.', 'VI', '+1340'], ['Wallis and Futuna', 'WF', '+681'], ['Western Sahara', 'EH', '+212'], ['Yemen', 'YE', '+967'], ['Zambia', 'ZM', '+260'], ['Zimbabwe', 'ZW', '+263'], ['Åland Islands', 'AX', '+358']];
|
|
8
|
+
exports.default = _default;
|
|
@@ -1,146 +1,109 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
var _select_input2 = _interopRequireDefault(_select_input);
|
|
21
|
-
|
|
22
|
-
var _actions = require('../actions');
|
|
23
|
-
|
|
24
|
-
var _index = require('../index');
|
|
25
|
-
|
|
26
|
-
var c = _interopRequireWildcard(_index);
|
|
27
|
-
|
|
28
|
-
var _index2 = require('../../core/index');
|
|
29
|
-
|
|
30
|
-
var l = _interopRequireWildcard(_index2);
|
|
31
|
-
|
|
32
|
-
var _index3 = require('../../store/index');
|
|
33
|
-
|
|
34
|
-
var _phone_number = require('../phone_number');
|
|
35
|
-
|
|
36
|
-
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; } }
|
|
37
|
-
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _phone_number_input = _interopRequireDefault(require("../../ui/input/phone_number_input"));
|
|
11
|
+
var _select_input = _interopRequireDefault(require("../../ui/input/select_input"));
|
|
12
|
+
var _actions = require("../actions");
|
|
13
|
+
var c = _interopRequireWildcard(require("../index"));
|
|
14
|
+
var l = _interopRequireWildcard(require("../../core/index"));
|
|
15
|
+
var _index3 = require("../../store/index");
|
|
16
|
+
var _phone_number = require("../phone_number");
|
|
17
|
+
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); }
|
|
18
|
+
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; }
|
|
38
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
39
|
-
|
|
40
20
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
41
|
-
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
function
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
);
|
|
82
|
-
|
|
83
|
-
var PhoneNumberPane = function (_React$Component) {
|
|
21
|
+
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); } }
|
|
22
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
23
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
24
|
+
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); }
|
|
25
|
+
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); }
|
|
26
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
27
|
+
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); }; }
|
|
28
|
+
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); }
|
|
29
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
30
|
+
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; } }
|
|
31
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
32
|
+
var IconSvg = /*#__PURE__*/_react.default.createElement("svg", {
|
|
33
|
+
focusable: "false",
|
|
34
|
+
width: "14px",
|
|
35
|
+
height: "14px",
|
|
36
|
+
viewBox: "0 0 14 14",
|
|
37
|
+
version: "1.1",
|
|
38
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
39
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
40
|
+
className: "auth0-lock-icon auth0-lock-icon-box auth0-lock-icon-location"
|
|
41
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
42
|
+
stroke: "none",
|
|
43
|
+
strokeWidth: "1",
|
|
44
|
+
fill: "none",
|
|
45
|
+
fillRule: "evenodd"
|
|
46
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
47
|
+
id: "Lock",
|
|
48
|
+
transform: "translate(-201.000000, -3519.000000)",
|
|
49
|
+
fill: "#919191"
|
|
50
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
51
|
+
id: "SMS",
|
|
52
|
+
transform: "translate(153.000000, 3207.000000)"
|
|
53
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
54
|
+
transform: "translate(35.000000, 299.000000)"
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
56
|
+
id: "Fill-349-Copy",
|
|
57
|
+
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"
|
|
58
|
+
}))))));
|
|
59
|
+
exports.IconSvg = IconSvg;
|
|
60
|
+
var PhoneNumberPane = /*#__PURE__*/function (_React$Component) {
|
|
84
61
|
_inherits(PhoneNumberPane, _React$Component);
|
|
85
|
-
|
|
62
|
+
var _super = _createSuper(PhoneNumberPane);
|
|
86
63
|
function PhoneNumberPane() {
|
|
87
64
|
_classCallCheck(this, PhoneNumberPane);
|
|
88
|
-
|
|
89
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
65
|
+
return _super.apply(this, arguments);
|
|
90
66
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
null,
|
|
107
|
-
headerText
|
|
108
|
-
);
|
|
109
|
-
|
|
110
|
-
return _react2.default.createElement(
|
|
111
|
-
'div',
|
|
112
|
-
null,
|
|
113
|
-
header,
|
|
114
|
-
_react2.default.createElement(_select_input2.default, {
|
|
67
|
+
_createClass(PhoneNumberPane, [{
|
|
68
|
+
key: "handlePhoneNumberChange",
|
|
69
|
+
value: function handlePhoneNumberChange(e) {
|
|
70
|
+
(0, _index3.swap)(_index3.updateEntity, 'lock', l.id(this.props.lock), _phone_number.setPhoneNumber, e.target.value);
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
key: "render",
|
|
74
|
+
value: function render() {
|
|
75
|
+
var _this$props = this.props,
|
|
76
|
+
instructions = _this$props.instructions,
|
|
77
|
+
lock = _this$props.lock,
|
|
78
|
+
placeholder = _this$props.placeholder,
|
|
79
|
+
invalidHint = _this$props.invalidHint;
|
|
80
|
+
var headerText = instructions || null;
|
|
81
|
+
var header = headerText && /*#__PURE__*/_react.default.createElement("p", null, headerText);
|
|
82
|
+
return /*#__PURE__*/_react.default.createElement("div", null, header, /*#__PURE__*/_react.default.createElement(_select_input.default, {
|
|
115
83
|
icon: IconSvg,
|
|
116
84
|
isValid: !c.isFieldVisiblyInvalid(lock, 'location'),
|
|
117
|
-
name:
|
|
118
|
-
placeholder:
|
|
85
|
+
name: "location",
|
|
86
|
+
placeholder: "",
|
|
119
87
|
label: (0, _phone_number.humanLocation)(lock),
|
|
120
88
|
onClick: function onClick() {
|
|
121
89
|
return (0, _actions.startOptionSelection)(l.id(lock), 'location', '', IconSvg);
|
|
122
90
|
}
|
|
123
|
-
}),
|
|
124
|
-
_react2.default.createElement(_phone_number_input2.default, {
|
|
91
|
+
}), /*#__PURE__*/_react.default.createElement(_phone_number_input.default, {
|
|
125
92
|
value: c.phoneNumber(lock),
|
|
126
93
|
isValid: !c.isFieldVisiblyInvalid(lock, 'phoneNumber'),
|
|
127
94
|
invalidHint: invalidHint,
|
|
128
95
|
onChange: this.handlePhoneNumberChange.bind(this),
|
|
129
96
|
placeholder: placeholder,
|
|
130
97
|
disabled: l.submitting(lock)
|
|
131
|
-
})
|
|
132
|
-
|
|
133
|
-
};
|
|
134
|
-
|
|
98
|
+
}));
|
|
99
|
+
}
|
|
100
|
+
}]);
|
|
135
101
|
return PhoneNumberPane;
|
|
136
|
-
}(
|
|
137
|
-
|
|
102
|
+
}(_react.default.Component);
|
|
138
103
|
exports.default = PhoneNumberPane;
|
|
139
|
-
|
|
140
|
-
|
|
141
104
|
PhoneNumberPane.propTypes = {
|
|
142
|
-
instructions:
|
|
143
|
-
lock:
|
|
144
|
-
placeholder:
|
|
145
|
-
invalidHint:
|
|
105
|
+
instructions: _propTypes.default.element,
|
|
106
|
+
lock: _propTypes.default.object.isRequired,
|
|
107
|
+
placeholder: _propTypes.default.string.isRequired,
|
|
108
|
+
invalidHint: _propTypes.default.string
|
|
146
109
|
};
|