auth0-lock 11.34.1 → 12.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.browserslistrc +1 -0
- package/.circleci/config.yml +4 -2
- package/.eslintrc.json +5 -5
- package/.github/workflows/codeql.yml +41 -0
- package/.shiprc +4 -5
- package/CHANGELOG.md +32 -0
- package/EXAMPLES.md +626 -0
- package/README.md +77 -649
- package/karma.conf.js +1 -1
- package/lib/CSSCore.js +1 -4
- package/lib/__tests__/auth_button.js +12 -22
- package/lib/__tests__/connection/database/actions.js +48 -49
- package/lib/__tests__/connection/database/index.js +22 -28
- package/lib/__tests__/connection/database/login_pane.js +20 -41
- package/lib/__tests__/connection/database/password_reset_confirmation.js +19 -26
- package/lib/__tests__/connection/database/reset_password.js +17 -39
- package/lib/__tests__/connection/database/signed_up_confirmation.js +19 -26
- package/lib/__tests__/connection/enterprise/actions.js +22 -47
- package/lib/__tests__/connection/enterprise/hrd_pane.js +16 -33
- package/lib/__tests__/connection/enterprise/hrd_screen.js +26 -40
- package/lib/__tests__/connection/enterprise/quick_auth_screen.js +27 -68
- package/lib/__tests__/connection/passwordless/ask_vcode.js +29 -51
- package/lib/__tests__/connection/passwordless/email_sent_confirmation.js +19 -26
- package/lib/__tests__/connection/passwordless/passwordless.js +35 -97
- package/lib/__tests__/core/actions.js +23 -46
- package/lib/__tests__/core/client/index.js +10 -13
- package/lib/__tests__/core/index.js +46 -94
- package/lib/__tests__/core/remote_data.js +14 -20
- package/lib/__tests__/core/signed_in_confirmation.js +19 -26
- package/lib/__tests__/core/sso/last_login_screen.js +27 -50
- package/lib/__tests__/core/tenant.js +10 -12
- package/lib/__tests__/core/web_api/helper.js +6 -14
- package/lib/__tests__/core/web_api/p2_api.js +38 -33
- package/lib/__tests__/core/web_api.js +37 -33
- package/lib/__tests__/engine/classic/login.js +20 -41
- package/lib/__tests__/engine/classic/mfa_login_screen.js +6 -19
- package/lib/__tests__/engine/classic/sign_up_pane.js +33 -55
- package/lib/__tests__/engine/classic/sign_up_screen.js +18 -45
- package/lib/__tests__/engine/classic.js +13 -6
- package/lib/__tests__/engine/passwordless.js +2 -5
- package/lib/__tests__/field/captcha/recaptcha_enterprise.js +27 -27
- package/lib/__tests__/field/captcha/recaptchav2.js +27 -27
- package/lib/__tests__/field/captcha.js +39 -51
- package/lib/__tests__/field/custom_input.js +23 -47
- package/lib/__tests__/field/email.js +2 -3
- package/lib/__tests__/field/email_pane.js +25 -48
- package/lib/__tests__/field/field.js +9 -13
- package/lib/__tests__/field/login_pane.js +30 -34
- package/lib/__tests__/field/mfa_code_pane.js +13 -28
- package/lib/__tests__/field/option_selection_pane.js +7 -25
- package/lib/__tests__/field/password.js +6 -12
- package/lib/__tests__/field/password_pane.js +29 -46
- package/lib/__tests__/field/phone_number_pane.js +18 -41
- package/lib/__tests__/field/social_buttons_pane.js +30 -47
- package/lib/__tests__/field/username.js +27 -48
- package/lib/__tests__/field/username_pane.js +30 -47
- package/lib/__tests__/field/vcode.js +5 -13
- package/lib/__tests__/field/vcode_pane.js +20 -44
- package/lib/__tests__/i18n.js +28 -53
- package/lib/__tests__/quick-auth/actions.js +4 -27
- package/lib/__tests__/setup-tests.js +7 -9
- package/lib/__tests__/testUtils.js +41 -58
- package/lib/__tests__/ui/box/chrome.js +24 -49
- package/lib/__tests__/ui/box/confirmation_pane.js +19 -36
- package/lib/__tests__/ui/box/container.js +21 -46
- package/lib/__tests__/ui/box/global_message.js +60 -37
- package/lib/__tests__/ui/input/email_input.js +6 -17
- package/lib/__tests__/ui/input/input_wrap.js +6 -19
- package/lib/__tests__/ui/input/password/password_strength.js +13 -15
- package/lib/__tests__/ui/input/password_input.js +22 -27
- package/lib/__tests__/utils/format.js +10 -17
- package/lib/__tests__/utils/url_utils.js +2 -5
- package/lib/avatar/gravatar_provider.js +13 -28
- package/lib/avatar.js +22 -41
- package/lib/browser.js +372 -23
- package/lib/connection/captcha.js +14 -32
- package/lib/connection/database/actions.js +39 -108
- package/lib/connection/database/index.js +90 -191
- package/lib/connection/database/login_pane.js +107 -147
- package/lib/connection/database/login_sign_up_tabs.js +106 -125
- package/lib/connection/database/mfa_pane.js +50 -69
- package/lib/connection/database/password_reset_confirmation.js +51 -73
- package/lib/connection/database/reset_password.js +116 -132
- package/lib/connection/database/reset_password_pane.js +45 -56
- package/lib/connection/database/sign_up_terms.js +17 -23
- package/lib/connection/database/signed_up_confirmation.js +52 -75
- package/lib/connection/enterprise/actions.js +23 -52
- package/lib/connection/enterprise/hrd_pane.js +60 -76
- package/lib/connection/enterprise/hrd_screen.js +60 -75
- package/lib/connection/enterprise/kerberos_screen.js +46 -60
- package/lib/connection/enterprise/quick_auth_screen.js +46 -64
- package/lib/connection/enterprise/single_sign_on_notice.js +14 -26
- package/lib/connection/enterprise.js +51 -84
- package/lib/connection/passwordless/actions.js +29 -62
- package/lib/connection/passwordless/ask_vcode.js +53 -60
- package/lib/connection/passwordless/email_sent_confirmation.js +129 -179
- package/lib/connection/passwordless/index.js +36 -68
- package/lib/connection/social/index.js +12 -15
- package/lib/core/actions.js +33 -85
- package/lib/core/client/index.js +38 -58
- package/lib/core/client/settings.js +12 -20
- package/lib/core/error_screen.js +38 -52
- package/lib/core/index.js +152 -301
- package/lib/core/loading_screen.js +61 -71
- package/lib/core/pane_separator.js +10 -10
- package/lib/core/remote_data.js +28 -48
- package/lib/core/screen.js +85 -79
- package/lib/core/signed_in_confirmation.js +51 -73
- package/lib/core/sso/data.js +9 -17
- package/lib/core/sso/index.js +5 -6
- package/lib/core/sso/last_login_screen.js +46 -63
- package/lib/core/tenant/index.js +37 -59
- package/lib/core/tenant/settings.js +11 -15
- package/lib/core/web_api/helper.js +24 -30
- package/lib/core/web_api/p2_api.js +156 -165
- package/lib/core/web_api.js +101 -90
- package/lib/core.js +126 -160
- package/lib/engine/classic/login.js +92 -144
- package/lib/engine/classic/mfa_login_screen.js +61 -67
- package/lib/engine/classic/sign_up_pane.js +89 -123
- package/lib/engine/classic/sign_up_screen.js +112 -158
- package/lib/engine/classic.js +122 -183
- package/lib/engine/passwordless/social_or_email_login_screen.js +71 -106
- package/lib/engine/passwordless/social_or_phone_number_login_screen.js +70 -100
- package/lib/engine/passwordless.js +75 -104
- package/lib/field/actions.js +11 -17
- package/lib/field/captcha/captcha_pane.js +82 -102
- package/lib/field/captcha/recaptcha.js +140 -145
- package/lib/field/captcha.js +7 -10
- package/lib/field/custom_input.js +37 -50
- package/lib/field/email/email_pane.js +90 -109
- package/lib/field/email.js +17 -35
- package/lib/field/index.js +51 -88
- package/lib/field/mfa-code/mfa_code_pane.js +57 -71
- package/lib/field/mfa_code.js +15 -21
- package/lib/field/option_selection_pane.js +16 -22
- package/lib/field/password/password_pane.js +79 -91
- package/lib/field/password.js +8 -14
- package/lib/field/phone-number/locations.js +7 -3
- package/lib/field/phone-number/phone_number_pane.js +87 -124
- package/lib/field/phone_number.js +16 -30
- package/lib/field/social/event.js +9 -12
- package/lib/field/social/social_buttons_pane.js +93 -121
- package/lib/field/username/username_pane.js +105 -123
- package/lib/field/username.js +16 -26
- package/lib/field/vcode/vcode_pane.js +67 -93
- package/lib/field/vcode.js +5 -5
- package/lib/i18n/af.js +7 -4
- package/lib/i18n/ar.js +7 -4
- package/lib/i18n/az.js +7 -4
- package/lib/i18n/bg.js +7 -4
- package/lib/i18n/ca.js +7 -4
- package/lib/i18n/cs.js +7 -4
- package/lib/i18n/da.js +7 -4
- package/lib/i18n/de.js +7 -3
- package/lib/i18n/el.js +7 -4
- package/lib/i18n/en.js +9 -4
- package/lib/i18n/es.js +7 -3
- package/lib/i18n/et.js +7 -4
- package/lib/i18n/fa.js +7 -4
- package/lib/i18n/fi.js +7 -4
- package/lib/i18n/fr.js +7 -4
- package/lib/i18n/he.js +7 -4
- package/lib/i18n/hr.js +7 -4
- package/lib/i18n/hu.js +7 -4
- package/lib/i18n/id.js +7 -4
- package/lib/i18n/it.js +7 -3
- package/lib/i18n/ja.js +7 -4
- package/lib/i18n/ko.js +7 -4
- package/lib/i18n/lt.js +7 -4
- package/lib/i18n/lv.js +7 -4
- package/lib/i18n/ms.js +7 -4
- package/lib/i18n/nb.js +7 -4
- package/lib/i18n/nl.js +7 -4
- package/lib/i18n/nn.js +7 -4
- package/lib/i18n/no.js +7 -4
- package/lib/i18n/pl.js +7 -4
- package/lib/i18n/pt-br.js +7 -3
- package/lib/i18n/pt.js +7 -4
- package/lib/i18n/ro.js +7 -4
- package/lib/i18n/ru.js +7 -4
- package/lib/i18n/sk.js +7 -4
- package/lib/i18n/sl.js +7 -4
- package/lib/i18n/sr.js +7 -4
- package/lib/i18n/sv.js +7 -4
- package/lib/i18n/tr.js +7 -4
- package/lib/i18n/ua.js +7 -4
- package/lib/i18n/uk.js +7 -4
- package/lib/i18n/vi.js +7 -4
- package/lib/i18n/zh-tw.js +7 -4
- package/lib/i18n/zh.js +7 -4
- package/lib/i18n.js +38 -75
- package/lib/index.js +14 -17
- package/lib/lock.js +29 -32
- package/lib/passwordless.js +29 -31
- package/lib/quick-auth/actions.js +19 -26
- package/lib/quick_auth.js +8 -10
- package/lib/sanitizer.js +5 -5
- package/lib/store/index.js +22 -42
- package/lib/sync.js +21 -42
- package/lib/ui/box/button.js +85 -105
- package/lib/ui/box/chrome.js +463 -548
- package/lib/ui/box/confirmation_pane.js +34 -48
- package/lib/ui/box/container.js +305 -339
- package/lib/ui/box/global_message.js +51 -60
- package/lib/ui/box/header.js +155 -177
- package/lib/ui/box/multisize_slide.js +233 -229
- package/lib/ui/box/success_pane.js +34 -37
- package/lib/ui/box.js +88 -93
- package/lib/ui/button/auth_button.js +44 -51
- package/lib/ui/input/captcha_input.js +162 -181
- package/lib/ui/input/checkbox_input.js +57 -59
- package/lib/ui/input/email_input.js +117 -124
- package/lib/ui/input/input_wrap.js +65 -80
- package/lib/ui/input/location_input.js +130 -150
- package/lib/ui/input/mfa_code_input.js +98 -98
- package/lib/ui/input/password/password_strength.js +103 -127
- package/lib/ui/input/password_input.js +141 -147
- package/lib/ui/input/phone_number_input.js +101 -109
- package/lib/ui/input/select_input.js +120 -132
- package/lib/ui/input/text_input.js +89 -84
- package/lib/ui/input/username_input.js +109 -115
- package/lib/ui/input/vcode_input.js +110 -118
- package/lib/ui/list.js +224 -247
- package/lib/ui/pane/quick_auth_pane.js +55 -80
- package/lib/utils/atom.js +55 -48
- package/lib/utils/cache.js +54 -43
- package/lib/utils/cdn_utils.js +17 -31
- package/lib/utils/createRef.js +3 -1
- package/lib/utils/data_utils.js +10 -16
- package/lib/utils/fn_utils.js +5 -4
- package/lib/utils/format.js +6 -8
- package/lib/utils/id_utils.js +4 -3
- package/lib/utils/jsonp_utils.js +20 -17
- package/lib/utils/media_utils.js +4 -2
- package/lib/utils/preload_utils.js +4 -3
- package/lib/utils/string_utils.js +4 -4
- package/lib/utils/url_utils.js +4 -3
- package/opslevel.yml +6 -0
- package/package.json +53 -38
- package/webpack.config.js +36 -3
|
@@ -1,79 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _react = require(
|
|
10
|
-
|
|
11
|
-
var _react2 = _interopRequireDefault(_react);
|
|
12
|
-
|
|
13
|
-
var _mfa_code_pane = require('../../field/mfa-code/mfa_code_pane');
|
|
14
|
-
|
|
15
|
-
var _mfa_code_pane2 = _interopRequireDefault(_mfa_code_pane);
|
|
16
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _mfa_code_pane = _interopRequireDefault(require("../../field/mfa-code/mfa_code_pane"));
|
|
17
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
-
|
|
19
12
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
20
|
-
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
14
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
15
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
16
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
17
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
18
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
19
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
20
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
21
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
24
|
+
var MFAPane = /*#__PURE__*/function (_React$Component) {
|
|
26
25
|
_inherits(MFAPane, _React$Component);
|
|
27
|
-
|
|
26
|
+
var _super = _createSuper(MFAPane);
|
|
28
27
|
function MFAPane() {
|
|
29
28
|
_classCallCheck(this, MFAPane);
|
|
30
|
-
|
|
31
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
29
|
+
return _super.apply(this, arguments);
|
|
32
30
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
'h2',
|
|
54
|
-
null,
|
|
55
|
-
title
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
return _react2.default.createElement(
|
|
59
|
-
'div',
|
|
60
|
-
null,
|
|
61
|
-
titleElement,
|
|
62
|
-
header,
|
|
63
|
-
pane
|
|
64
|
-
);
|
|
65
|
-
};
|
|
66
|
-
|
|
31
|
+
_createClass(MFAPane, [{
|
|
32
|
+
key: "render",
|
|
33
|
+
value: function render() {
|
|
34
|
+
var _this$props = this.props,
|
|
35
|
+
mfaInputPlaceholder = _this$props.mfaInputPlaceholder,
|
|
36
|
+
i18n = _this$props.i18n,
|
|
37
|
+
instructions = _this$props.instructions,
|
|
38
|
+
lock = _this$props.lock,
|
|
39
|
+
title = _this$props.title;
|
|
40
|
+
var headerText = instructions || null;
|
|
41
|
+
var header = headerText && /*#__PURE__*/_react.default.createElement("p", null, headerText);
|
|
42
|
+
var pane = /*#__PURE__*/_react.default.createElement(_mfa_code_pane.default, {
|
|
43
|
+
i18n: i18n,
|
|
44
|
+
lock: lock,
|
|
45
|
+
placeholder: mfaInputPlaceholder
|
|
46
|
+
});
|
|
47
|
+
var titleElement = title && /*#__PURE__*/_react.default.createElement("h2", null, title);
|
|
48
|
+
return /*#__PURE__*/_react.default.createElement("div", null, titleElement, header, pane);
|
|
49
|
+
}
|
|
50
|
+
}]);
|
|
67
51
|
return MFAPane;
|
|
68
|
-
}(
|
|
69
|
-
|
|
52
|
+
}(_react.default.Component);
|
|
70
53
|
exports.default = MFAPane;
|
|
71
|
-
|
|
72
|
-
|
|
73
54
|
MFAPane.propTypes = {
|
|
74
|
-
mfaInputPlaceholder:
|
|
75
|
-
title:
|
|
76
|
-
i18n:
|
|
77
|
-
instructions:
|
|
78
|
-
lock:
|
|
55
|
+
mfaInputPlaceholder: _propTypes.default.string.isRequired,
|
|
56
|
+
title: _propTypes.default.string.isRequired,
|
|
57
|
+
i18n: _propTypes.default.object.isRequired,
|
|
58
|
+
instructions: _propTypes.default.any,
|
|
59
|
+
lock: _propTypes.default.object.isRequired
|
|
79
60
|
};
|
|
@@ -1,92 +1,70 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
4
8
|
exports.renderPasswordResetConfirmation = renderPasswordResetConfirmation;
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _success_pane = require('../../ui/box/success_pane');
|
|
15
|
-
|
|
16
|
-
var _success_pane2 = _interopRequireDefault(_success_pane);
|
|
17
|
-
|
|
18
|
-
var _actions = require('../../core/actions');
|
|
19
|
-
|
|
20
|
-
var _index = require('../../core/index');
|
|
21
|
-
|
|
22
|
-
var l = _interopRequireWildcard(_index);
|
|
23
|
-
|
|
24
|
-
var _i18n = require('../../i18n');
|
|
25
|
-
|
|
26
|
-
var i18n = _interopRequireWildcard(_i18n);
|
|
27
|
-
|
|
28
|
-
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; } }
|
|
29
|
-
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _success_pane = _interopRequireDefault(require("../../ui/box/success_pane"));
|
|
12
|
+
var _actions = require("../../core/actions");
|
|
13
|
+
var l = _interopRequireWildcard(require("../../core/index"));
|
|
14
|
+
var i18n = _interopRequireWildcard(require("../../i18n"));
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
30
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
|
|
32
18
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
33
|
-
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
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 _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
22
|
+
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); }
|
|
23
|
+
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); }
|
|
24
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
25
|
+
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); }; }
|
|
26
|
+
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); }
|
|
27
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
28
|
+
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; } }
|
|
29
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
38
30
|
// TODO: can't we get this from props?
|
|
39
|
-
|
|
40
|
-
var PasswordResetConfirmation = function (_React$Component) {
|
|
31
|
+
var PasswordResetConfirmation = /*#__PURE__*/function (_React$Component) {
|
|
41
32
|
_inherits(PasswordResetConfirmation, _React$Component);
|
|
42
|
-
|
|
33
|
+
var _super = _createSuper(PasswordResetConfirmation);
|
|
43
34
|
function PasswordResetConfirmation() {
|
|
44
35
|
_classCallCheck(this, PasswordResetConfirmation);
|
|
45
|
-
|
|
46
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
36
|
+
return _super.apply(this, arguments);
|
|
47
37
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
null,
|
|
68
|
-
i18n.html(this.props.lock, ['success', 'forgotPassword'])
|
|
69
|
-
)
|
|
70
|
-
);
|
|
71
|
-
};
|
|
72
|
-
|
|
38
|
+
_createClass(PasswordResetConfirmation, [{
|
|
39
|
+
key: "handleClose",
|
|
40
|
+
value: function handleClose() {
|
|
41
|
+
var _this$props = this.props,
|
|
42
|
+
closeHandler = _this$props.closeHandler,
|
|
43
|
+
lock = _this$props.lock;
|
|
44
|
+
closeHandler(l.id(lock));
|
|
45
|
+
}
|
|
46
|
+
}, {
|
|
47
|
+
key: "render",
|
|
48
|
+
value: function render() {
|
|
49
|
+
var lock = this.props.lock;
|
|
50
|
+
var closeHandler = l.ui.closable(lock) ? this.handleClose.bind(this) : undefined;
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(_success_pane.default, {
|
|
52
|
+
lock: lock,
|
|
53
|
+
closeHandler: closeHandler
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement("p", null, i18n.html(this.props.lock, ['success', 'forgotPassword'])));
|
|
55
|
+
}
|
|
56
|
+
}]);
|
|
73
57
|
return PasswordResetConfirmation;
|
|
74
|
-
}(
|
|
75
|
-
|
|
58
|
+
}(_react.default.Component);
|
|
76
59
|
exports.default = PasswordResetConfirmation;
|
|
77
|
-
|
|
78
|
-
|
|
79
60
|
PasswordResetConfirmation.propTypes = {
|
|
80
|
-
closeHandler:
|
|
81
|
-
lock:
|
|
61
|
+
closeHandler: _propTypes.default.func.isRequired,
|
|
62
|
+
lock: _propTypes.default.object.isRequired
|
|
82
63
|
};
|
|
83
|
-
|
|
84
64
|
function renderPasswordResetConfirmation(m) {
|
|
85
65
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
86
|
-
|
|
87
66
|
props.closeHandler = _actions.closeLock;
|
|
88
67
|
props.key = 'auxiliarypane';
|
|
89
68
|
props.lock = m;
|
|
90
|
-
|
|
91
|
-
return m.get('passwordResetted') ? _react2.default.createElement(PasswordResetConfirmation, props) : null;
|
|
69
|
+
return m.get('passwordResetted') ? /*#__PURE__*/_react.default.createElement(PasswordResetConfirmation, props) : null;
|
|
92
70
|
}
|
|
@@ -1,147 +1,131 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _screen = require(
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
var _index2 = require('../../connection/database/index');
|
|
24
|
-
|
|
25
|
-
var _enterprise = require('../../connection/enterprise');
|
|
26
|
-
|
|
27
|
-
var _i18n = require('../../i18n');
|
|
28
|
-
|
|
29
|
-
var i18n = _interopRequireWildcard(_i18n);
|
|
30
|
-
|
|
31
|
-
var _index3 = require('../../core/index');
|
|
32
|
-
|
|
33
|
-
var l = _interopRequireWildcard(_index3);
|
|
34
|
-
|
|
35
|
-
var _index4 = require('../../store/index');
|
|
36
|
-
|
|
37
|
-
var _email = require('../../field/email');
|
|
38
|
-
|
|
39
|
-
var _field = require('../../field');
|
|
40
|
-
|
|
41
|
-
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; } }
|
|
42
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _screen = _interopRequireDefault(require("../../core/screen"));
|
|
10
|
+
var _reset_password_pane = _interopRequireDefault(require("./reset_password_pane"));
|
|
11
|
+
var _index = require("./index");
|
|
12
|
+
var _actions = require("./actions");
|
|
13
|
+
var _password_reset_confirmation = require("./password_reset_confirmation");
|
|
14
|
+
var _index2 = require("../../connection/database/index");
|
|
15
|
+
var _enterprise = require("../../connection/enterprise");
|
|
16
|
+
var i18n = _interopRequireWildcard(require("../../i18n"));
|
|
17
|
+
var l = _interopRequireWildcard(require("../../core/index"));
|
|
18
|
+
var _index4 = require("../../store/index");
|
|
19
|
+
var _email = require("../../field/email");
|
|
20
|
+
var _field = require("../../field");
|
|
21
|
+
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); }
|
|
22
|
+
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; }
|
|
43
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
44
|
-
|
|
45
24
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
46
|
-
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
function
|
|
50
|
-
|
|
51
|
-
|
|
25
|
+
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); } }
|
|
26
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
28
|
+
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); }
|
|
29
|
+
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); }
|
|
30
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
|
+
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); }; }
|
|
32
|
+
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); }
|
|
33
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
34
|
+
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; } }
|
|
35
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
36
|
+
var Component = /*#__PURE__*/function (_React$Component) {
|
|
52
37
|
_inherits(Component, _React$Component);
|
|
53
|
-
|
|
38
|
+
var _super = _createSuper(Component);
|
|
54
39
|
function Component() {
|
|
55
40
|
_classCallCheck(this, Component);
|
|
56
|
-
|
|
57
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
41
|
+
return _super.apply(this, arguments);
|
|
58
42
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
43
|
+
_createClass(Component, [{
|
|
44
|
+
key: "componentDidMount",
|
|
45
|
+
value: function componentDidMount() {
|
|
46
|
+
var model = this.props.model;
|
|
47
|
+
var connectionResolver = l.connectionResolver(model);
|
|
48
|
+
|
|
49
|
+
// When using a custom connection resolver, `usernameStyle` is always 'username' (as opposed to 'email').
|
|
50
|
+
// If the user has entered an email address as the username, and a custom resolver is being used, copy the
|
|
51
|
+
// value from the 'username' field to the 'email' field so that `EmailPane` can render it.
|
|
52
|
+
if (connectionResolver) {
|
|
53
|
+
var field = (0, _field.getField)(model, 'username');
|
|
54
|
+
var value = field.get('value', '');
|
|
55
|
+
(0, _index4.swap)(_index4.updateEntity, 'lock', l.id(model), _email.setEmail, (0, _email.isEmail)(value, false) ? value : '', false);
|
|
56
|
+
}
|
|
73
57
|
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
i18n =
|
|
79
|
-
model =
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
header: header,
|
|
91
|
-
i18n: i18n,
|
|
92
|
-
lock: model
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
|
|
58
|
+
}, {
|
|
59
|
+
key: "render",
|
|
60
|
+
value: function render() {
|
|
61
|
+
var _this$props = this.props,
|
|
62
|
+
i18n = _this$props.i18n,
|
|
63
|
+
model = _this$props.model;
|
|
64
|
+
var headerText = i18n.html('forgotPasswordInstructions') || null;
|
|
65
|
+
var header = headerText && /*#__PURE__*/_react.default.createElement("p", null, headerText);
|
|
66
|
+
return /*#__PURE__*/_react.default.createElement(_reset_password_pane.default, {
|
|
67
|
+
emailInputPlaceholder: i18n.str('emailInputPlaceholder'),
|
|
68
|
+
header: header,
|
|
69
|
+
i18n: i18n,
|
|
70
|
+
lock: model
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}]);
|
|
96
74
|
return Component;
|
|
97
|
-
}(
|
|
98
|
-
|
|
99
|
-
var ResetPassword = function (_Screen) {
|
|
75
|
+
}(_react.default.Component);
|
|
76
|
+
var ResetPassword = /*#__PURE__*/function (_Screen) {
|
|
100
77
|
_inherits(ResetPassword, _Screen);
|
|
101
|
-
|
|
78
|
+
var _super2 = _createSuper(ResetPassword);
|
|
102
79
|
function ResetPassword() {
|
|
103
80
|
_classCallCheck(this, ResetPassword);
|
|
104
|
-
|
|
105
|
-
return _possibleConstructorReturn(this, _Screen.call(this, 'forgotPassword'));
|
|
81
|
+
return _super2.call(this, 'forgotPassword');
|
|
106
82
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
ResetPassword.prototype.submitButtonLabel = function submitButtonLabel(m) {
|
|
113
|
-
return i18n.str(m, ['forgotPasswordSubmitLabel']);
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
ResetPassword.prototype.getScreenTitle = function getScreenTitle(m) {
|
|
117
|
-
return i18n.str(m, 'forgotPasswordTitle');
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
ResetPassword.prototype.isSubmitDisabled = function isSubmitDisabled(m) {
|
|
121
|
-
var tryingToResetPasswordWithEnterpriseEmail = (0, _enterprise.isEnterpriseDomain)(m, (0, _index2.databaseUsernameValue)(m, { emailFirst: true }));
|
|
122
|
-
if (tryingToResetPasswordWithEnterpriseEmail) {
|
|
123
|
-
setTimeout(function () {
|
|
124
|
-
(0, _index4.swap)(_index4.updateEntity, 'lock', l.id(m), l.setGlobalError, i18n.str(m, ['error', 'forgotPassword', 'enterprise_email']));
|
|
125
|
-
}, 50);
|
|
126
|
-
} else {
|
|
127
|
-
(0, _index4.swap)(_index4.updateEntity, 'lock', l.id(m), l.clearGlobalError);
|
|
83
|
+
_createClass(ResetPassword, [{
|
|
84
|
+
key: "backHandler",
|
|
85
|
+
value: function backHandler(m) {
|
|
86
|
+
return (0, _index.hasScreen)(m, 'login') ? _actions.cancelResetPassword : undefined;
|
|
128
87
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
88
|
+
}, {
|
|
89
|
+
key: "submitButtonLabel",
|
|
90
|
+
value: function submitButtonLabel(m) {
|
|
91
|
+
return i18n.str(m, ['forgotPasswordSubmitLabel']);
|
|
92
|
+
}
|
|
93
|
+
}, {
|
|
94
|
+
key: "getScreenTitle",
|
|
95
|
+
value: function getScreenTitle(m) {
|
|
96
|
+
return i18n.str(m, 'forgotPasswordTitle');
|
|
97
|
+
}
|
|
98
|
+
}, {
|
|
99
|
+
key: "isSubmitDisabled",
|
|
100
|
+
value: function isSubmitDisabled(m) {
|
|
101
|
+
var tryingToResetPasswordWithEnterpriseEmail = (0, _enterprise.isEnterpriseDomain)(m, (0, _index2.databaseUsernameValue)(m, {
|
|
102
|
+
emailFirst: true
|
|
103
|
+
}));
|
|
104
|
+
if (tryingToResetPasswordWithEnterpriseEmail) {
|
|
105
|
+
setTimeout(function () {
|
|
106
|
+
(0, _index4.swap)(_index4.updateEntity, 'lock', l.id(m), l.setGlobalError, i18n.str(m, ['error', 'forgotPassword', 'enterprise_email']));
|
|
107
|
+
}, 50);
|
|
108
|
+
} else {
|
|
109
|
+
(0, _index4.swap)(_index4.updateEntity, 'lock', l.id(m), l.clearGlobalError);
|
|
110
|
+
}
|
|
111
|
+
return tryingToResetPasswordWithEnterpriseEmail;
|
|
112
|
+
}
|
|
113
|
+
}, {
|
|
114
|
+
key: "submitHandler",
|
|
115
|
+
value: function submitHandler() {
|
|
116
|
+
return _actions.resetPassword;
|
|
117
|
+
}
|
|
118
|
+
}, {
|
|
119
|
+
key: "renderAuxiliaryPane",
|
|
120
|
+
value: function renderAuxiliaryPane(m) {
|
|
121
|
+
return (0, _password_reset_confirmation.renderPasswordResetConfirmation)(m);
|
|
122
|
+
}
|
|
123
|
+
}, {
|
|
124
|
+
key: "render",
|
|
125
|
+
value: function render() {
|
|
126
|
+
return Component;
|
|
127
|
+
}
|
|
128
|
+
}]);
|
|
144
129
|
return ResetPassword;
|
|
145
|
-
}(
|
|
146
|
-
|
|
130
|
+
}(_screen.default);
|
|
147
131
|
exports.default = ResetPassword;
|