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,68 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
var _email_pane = require('../../field/email/email_pane');
|
|
14
|
-
|
|
15
|
-
var _email_pane2 = _interopRequireDefault(_email_pane);
|
|
16
|
-
|
|
17
|
-
var _index = require('../../core/index');
|
|
18
|
-
|
|
19
|
-
var l = _interopRequireWildcard(_index);
|
|
20
|
-
|
|
21
|
-
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; } }
|
|
22
|
-
|
|
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 _email_pane = _interopRequireDefault(require("../../field/email/email_pane"));
|
|
10
|
+
var l = _interopRequireWildcard(require("../../core/index"));
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
23
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
|
-
|
|
14
|
+
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); }
|
|
25
15
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
26
|
-
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
function
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
17
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
+
function _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); }
|
|
19
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
20
|
+
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); }; }
|
|
21
|
+
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); }
|
|
22
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23
|
+
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; } }
|
|
24
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
25
|
+
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; }
|
|
26
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
27
|
+
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); }
|
|
28
|
+
var ResetPasswordPane = /*#__PURE__*/function (_React$Component) {
|
|
32
29
|
_inherits(ResetPasswordPane, _React$Component);
|
|
33
|
-
|
|
30
|
+
var _super = _createSuper(ResetPasswordPane);
|
|
34
31
|
function ResetPasswordPane() {
|
|
35
32
|
_classCallCheck(this, ResetPasswordPane);
|
|
36
|
-
|
|
37
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
33
|
+
return _super.apply(this, arguments);
|
|
38
34
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return _react2.default.createElement(
|
|
49
|
-
'div',
|
|
50
|
-
null,
|
|
51
|
-
header,
|
|
52
|
-
_react2.default.createElement(_email_pane2.default, {
|
|
35
|
+
_createClass(ResetPasswordPane, [{
|
|
36
|
+
key: "render",
|
|
37
|
+
value: function render() {
|
|
38
|
+
var _this$props = this.props,
|
|
39
|
+
emailInputPlaceholder = _this$props.emailInputPlaceholder,
|
|
40
|
+
header = _this$props.header,
|
|
41
|
+
i18n = _this$props.i18n,
|
|
42
|
+
lock = _this$props.lock;
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement("div", null, header, /*#__PURE__*/_react.default.createElement(_email_pane.default, {
|
|
53
44
|
i18n: i18n,
|
|
54
45
|
lock: lock,
|
|
55
46
|
placeholder: emailInputPlaceholder,
|
|
56
47
|
strictValidation: false
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
};
|
|
60
|
-
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
}]);
|
|
61
51
|
return ResetPasswordPane;
|
|
62
|
-
}(
|
|
63
|
-
|
|
64
|
-
ResetPasswordPane.propTypes = {
|
|
65
|
-
emailInputPlaceholder: _propTypes2.default.string.isRequired,
|
|
66
|
-
lock: _propTypes2.default.object.isRequired
|
|
67
|
-
};
|
|
52
|
+
}(_react.default.Component);
|
|
68
53
|
exports.default = ResetPasswordPane;
|
|
54
|
+
_defineProperty(ResetPasswordPane, "propTypes", {
|
|
55
|
+
emailInputPlaceholder: _propTypes.default.string.isRequired,
|
|
56
|
+
lock: _propTypes.default.object.isRequired
|
|
57
|
+
});
|
|
@@ -1,29 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
|
|
11
9
|
var SignUpTerms = function SignUpTerms(_ref) {
|
|
12
10
|
var checkHandler = _ref.checkHandler,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
showCheckbox && _react2.default.createElement("input", { type: "checkbox", onChange: checkHandler, checked: checked }),
|
|
24
|
-
children
|
|
25
|
-
)
|
|
26
|
-
) : children;
|
|
11
|
+
checked = _ref.checked,
|
|
12
|
+
children = _ref.children,
|
|
13
|
+
showCheckbox = _ref.showCheckbox;
|
|
14
|
+
return checkHandler ? /*#__PURE__*/_react.default.createElement("span", {
|
|
15
|
+
className: "auth0-lock-sign-up-terms-agreement"
|
|
16
|
+
}, /*#__PURE__*/_react.default.createElement("label", null, showCheckbox && /*#__PURE__*/_react.default.createElement("input", {
|
|
17
|
+
type: "checkbox",
|
|
18
|
+
onChange: checkHandler,
|
|
19
|
+
checked: checked
|
|
20
|
+
}), children)) : children;
|
|
27
21
|
};
|
|
28
|
-
|
|
29
|
-
exports.default =
|
|
22
|
+
var _default = SignUpTerms;
|
|
23
|
+
exports.default = _default;
|
|
@@ -1,94 +1,71 @@
|
|
|
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.renderSignedUpConfirmation = renderSignedUpConfirmation;
|
|
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 _index2 = require('./index');
|
|
25
|
-
|
|
26
|
-
var _i18n = require('../../i18n');
|
|
27
|
-
|
|
28
|
-
var i18n = _interopRequireWildcard(_i18n);
|
|
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
|
-
|
|
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 _index2 = require("./index");
|
|
15
|
+
var i18n = _interopRequireWildcard(require("../../i18n"));
|
|
16
|
+
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); }
|
|
17
|
+
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
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
|
-
|
|
34
19
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
function
|
|
39
|
-
|
|
20
|
+
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); } }
|
|
21
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
22
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
23
|
+
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); }
|
|
24
|
+
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); }
|
|
25
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
26
|
+
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); }; }
|
|
27
|
+
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); }
|
|
28
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
29
|
+
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; } }
|
|
30
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
40
31
|
// TODO: can't we get this from props?
|
|
41
|
-
|
|
42
|
-
var SignedUpConfirmation = function (_React$Component) {
|
|
32
|
+
var SignedUpConfirmation = /*#__PURE__*/function (_React$Component) {
|
|
43
33
|
_inherits(SignedUpConfirmation, _React$Component);
|
|
44
|
-
|
|
34
|
+
var _super = _createSuper(SignedUpConfirmation);
|
|
45
35
|
function SignedUpConfirmation() {
|
|
46
36
|
_classCallCheck(this, SignedUpConfirmation);
|
|
47
|
-
|
|
48
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
37
|
+
return _super.apply(this, arguments);
|
|
49
38
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
null,
|
|
70
|
-
i18n.html(lock, ['success', 'signUp'])
|
|
71
|
-
)
|
|
72
|
-
);
|
|
73
|
-
};
|
|
74
|
-
|
|
39
|
+
_createClass(SignedUpConfirmation, [{
|
|
40
|
+
key: "handleClose",
|
|
41
|
+
value: function handleClose() {
|
|
42
|
+
var _this$props = this.props,
|
|
43
|
+
closeHandler = _this$props.closeHandler,
|
|
44
|
+
lock = _this$props.lock;
|
|
45
|
+
closeHandler(l.id(lock));
|
|
46
|
+
}
|
|
47
|
+
}, {
|
|
48
|
+
key: "render",
|
|
49
|
+
value: function render() {
|
|
50
|
+
var lock = this.props.lock;
|
|
51
|
+
var closeHandler = l.ui.closable(lock) ? this.handleClose.bind(this) : undefined;
|
|
52
|
+
return /*#__PURE__*/_react.default.createElement(_success_pane.default, {
|
|
53
|
+
lock: lock,
|
|
54
|
+
closeHandler: closeHandler
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement("p", null, i18n.html(lock, ['success', 'signUp'])));
|
|
56
|
+
}
|
|
57
|
+
}]);
|
|
75
58
|
return SignedUpConfirmation;
|
|
76
|
-
}(
|
|
77
|
-
|
|
59
|
+
}(_react.default.Component);
|
|
78
60
|
exports.default = SignedUpConfirmation;
|
|
79
|
-
|
|
80
|
-
|
|
81
61
|
SignedUpConfirmation.propTypes = {
|
|
82
|
-
closeHandler:
|
|
83
|
-
lock:
|
|
62
|
+
closeHandler: _propTypes.default.func.isRequired,
|
|
63
|
+
lock: _propTypes.default.object.isRequired
|
|
84
64
|
};
|
|
85
|
-
|
|
86
65
|
function renderSignedUpConfirmation(m) {
|
|
87
66
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
88
|
-
|
|
89
67
|
props.closeHandler = _actions.closeLock;
|
|
90
68
|
props.key = 'auxiliarypane';
|
|
91
69
|
props.lock = m;
|
|
92
|
-
|
|
93
|
-
return m.get('signedUp') && !(0, _index2.shouldAutoLogin)(m) ? _react2.default.createElement(SignedUpConfirmation, props) : null;
|
|
70
|
+
return m.get('signedUp') && !(0, _index2.shouldAutoLogin)(m) ? /*#__PURE__*/_react.default.createElement(SignedUpConfirmation, props) : null;
|
|
94
71
|
}
|
|
@@ -1,45 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// TODO: enterprise connections should not depend on database
|
|
8
|
-
// connections. However, we now allow a username input to contain also
|
|
9
|
-
// an email and this information is in the database module. We should
|
|
10
|
-
// make this information flow from the UI (like we do for the startHRD
|
|
11
|
-
// function). Including this dependency here allows us to do that
|
|
12
|
-
// incrementally.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
exports.startHRD = startHRD;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
16
6
|
exports.cancelHRD = cancelHRD;
|
|
17
7
|
exports.logIn = logIn;
|
|
18
|
-
|
|
19
|
-
var _index = require(
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
var _index4 = require('../database/index');
|
|
36
|
-
|
|
37
|
-
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; } }
|
|
38
|
-
|
|
8
|
+
exports.startHRD = startHRD;
|
|
9
|
+
var _index = require("../../store/index");
|
|
10
|
+
var _enterprise = require("../enterprise");
|
|
11
|
+
var _index2 = require("../../field/index");
|
|
12
|
+
var _email = require("../../field/email");
|
|
13
|
+
var _actions = require("../../core/actions");
|
|
14
|
+
var l = _interopRequireWildcard(require("../../core/index"));
|
|
15
|
+
var _captcha = require("../captcha");
|
|
16
|
+
var _index4 = require("../database/index");
|
|
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; }
|
|
19
|
+
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); }
|
|
20
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22
|
+
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; }
|
|
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); }
|
|
39
25
|
function startHRD(id, email) {
|
|
40
26
|
(0, _index.swap)(_index.updateEntity, 'lock', id, _enterprise.toggleHRD, email);
|
|
41
27
|
}
|
|
42
|
-
|
|
43
28
|
function cancelHRD(id) {
|
|
44
29
|
(0, _index.swap)(_index.updateEntity, 'lock', id, function (m) {
|
|
45
30
|
m = (0, _enterprise.toggleHRD)(m, false);
|
|
@@ -47,12 +32,10 @@ function cancelHRD(id) {
|
|
|
47
32
|
return m;
|
|
48
33
|
});
|
|
49
34
|
}
|
|
50
|
-
|
|
51
35
|
function getConnectionScopesFrom(m, connection) {
|
|
52
36
|
var connectionScopes = l.auth.connectionScopes(m);
|
|
53
37
|
return connectionScopes.get(connection.get('name'));
|
|
54
38
|
}
|
|
55
|
-
|
|
56
39
|
function logIn(id) {
|
|
57
40
|
var m = (0, _index.read)(_index.getEntity, 'lock', id);
|
|
58
41
|
var email = (0, _index2.getFieldValue)(m, (0, _index4.databaseLogInWithEmail)(m) ? 'email' : 'username');
|
|
@@ -61,34 +44,25 @@ function logIn(id) {
|
|
|
61
44
|
var connectionScopes = getConnectionScopesFrom(m, ssoConnection || enterpriseConnection);
|
|
62
45
|
var usernameField = (0, _index4.databaseLogInWithEmail)(m) ? 'email' : 'username';
|
|
63
46
|
var fields = [usernameField, 'password'];
|
|
64
|
-
|
|
65
47
|
var params = {
|
|
66
48
|
connection_scope: connectionScopes ? connectionScopes.toJS() : undefined
|
|
67
49
|
};
|
|
68
|
-
|
|
69
50
|
if (ssoConnection && !(0, _enterprise.isHRDActive)(m)) {
|
|
70
51
|
return logInSSO(id, ssoConnection, params);
|
|
71
52
|
}
|
|
72
|
-
|
|
73
53
|
var isCaptchaValid = (0, _captcha.setCaptchaParams)(m, params, false, fields);
|
|
74
|
-
|
|
75
54
|
if (!isCaptchaValid && !ssoConnection) {
|
|
76
55
|
return (0, _captcha.showMissingCaptcha)(m, id);
|
|
77
56
|
}
|
|
78
|
-
|
|
79
57
|
logInActiveFlow(id, params);
|
|
80
58
|
}
|
|
81
|
-
|
|
82
59
|
function logInActiveFlow(id, params) {
|
|
83
60
|
var m = (0, _index.read)(_index.getEntity, 'lock', id);
|
|
84
61
|
var usernameField = (0, _enterprise.isHRDActive)(m) || !(0, _index4.databaseLogInWithEmail)(m) ? 'username' : 'email';
|
|
85
|
-
|
|
86
62
|
var originalUsername = (0, _index2.getFieldValue)(m, usernameField);
|
|
87
63
|
var connection = (0, _enterprise.enterpriseActiveFlowConnection)(m);
|
|
88
|
-
|
|
89
64
|
var username = l.defaultADUsernameFromEmailPrefix(m) ? (0, _email.emailLocalPart)(originalUsername) : originalUsername;
|
|
90
|
-
|
|
91
|
-
(0, _actions.logIn)(id, ['password', usernameField], _extends({}, params, {
|
|
65
|
+
(0, _actions.logIn)(id, ['password', usernameField], _objectSpread(_objectSpread({}, params), {}, {
|
|
92
66
|
connection: connection ? connection.get('name') : null,
|
|
93
67
|
username: username,
|
|
94
68
|
password: (0, _index2.getFieldValue)(m, 'password'),
|
|
@@ -98,18 +72,15 @@ function logInActiveFlow(id, params) {
|
|
|
98
72
|
(0, _captcha.swapCaptcha)(id, false, wasCaptchaInvalid, next);
|
|
99
73
|
});
|
|
100
74
|
}
|
|
101
|
-
|
|
102
75
|
function logInSSO(id, connection, params) {
|
|
103
76
|
var m = (0, _index.read)(_index.getEntity, 'lock', id);
|
|
104
77
|
var field = (0, _index4.databaseLogInWithEmail)(m) ? 'email' : 'username';
|
|
105
|
-
|
|
106
78
|
l.emitEvent(m, 'sso login', {
|
|
107
79
|
lockID: id,
|
|
108
80
|
connection: connection,
|
|
109
81
|
field: field
|
|
110
82
|
});
|
|
111
|
-
|
|
112
|
-
(0, _actions.logIn)(id, [field], _extends({}, params, {
|
|
83
|
+
(0, _actions.logIn)(id, [field], _objectSpread(_objectSpread({}, params), {}, {
|
|
113
84
|
connection: connection.get('name'),
|
|
114
85
|
login_hint: (0, _index2.getFieldValue)(m, field)
|
|
115
86
|
}));
|
|
@@ -1,91 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _react = require(
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
var _password_pane = require('../../field/password/password_pane');
|
|
18
|
-
|
|
19
|
-
var _password_pane2 = _interopRequireDefault(_password_pane);
|
|
20
|
-
|
|
21
|
-
var _captcha_pane = require('../../field/captcha/captcha_pane');
|
|
22
|
-
|
|
23
|
-
var _captcha_pane2 = _interopRequireDefault(_captcha_pane);
|
|
24
|
-
|
|
25
|
-
var _captcha = require('../captcha');
|
|
26
|
-
|
|
27
|
-
var _index = require('../../core/index');
|
|
28
|
-
|
|
29
|
-
var l = _interopRequireWildcard(_index);
|
|
30
|
-
|
|
31
|
-
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; } }
|
|
32
|
-
|
|
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 _username_pane = _interopRequireDefault(require("../../field/username/username_pane"));
|
|
11
|
+
var _password_pane = _interopRequireDefault(require("../../field/password/password_pane"));
|
|
12
|
+
var _captcha_pane = _interopRequireDefault(require("../../field/captcha/captcha_pane"));
|
|
13
|
+
var _captcha = require("../captcha");
|
|
14
|
+
var l = _interopRequireWildcard(require("../../core/index"));
|
|
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; }
|
|
33
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
34
|
-
|
|
35
18
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
36
|
-
|
|
37
|
-
function
|
|
38
|
-
|
|
39
|
-
function
|
|
40
|
-
|
|
41
|
-
|
|
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); }
|
|
30
|
+
var HRDPane = /*#__PURE__*/function (_React$Component) {
|
|
42
31
|
_inherits(HRDPane, _React$Component);
|
|
43
|
-
|
|
32
|
+
var _super = _createSuper(HRDPane);
|
|
44
33
|
function HRDPane() {
|
|
45
34
|
_classCallCheck(this, HRDPane);
|
|
46
|
-
|
|
47
|
-
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
|
35
|
+
return _super.apply(this, arguments);
|
|
48
36
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
null,
|
|
66
|
-
header,
|
|
67
|
-
_react2.default.createElement(_username_pane2.default, {
|
|
37
|
+
_createClass(HRDPane, [{
|
|
38
|
+
key: "render",
|
|
39
|
+
value: function render() {
|
|
40
|
+
var _this$props = this.props,
|
|
41
|
+
header = _this$props.header,
|
|
42
|
+
i18n = _this$props.i18n,
|
|
43
|
+
model = _this$props.model,
|
|
44
|
+
passwordInputPlaceholder = _this$props.passwordInputPlaceholder,
|
|
45
|
+
usernameInputPlaceholder = _this$props.usernameInputPlaceholder;
|
|
46
|
+
var captchaPane = l.captcha(model) && l.captcha(model).get('required') ? /*#__PURE__*/_react.default.createElement(_captcha_pane.default, {
|
|
47
|
+
i18n: i18n,
|
|
48
|
+
lock: model,
|
|
49
|
+
onReload: function onReload() {
|
|
50
|
+
return (0, _captcha.swapCaptcha)(l.id(model), false, false);
|
|
51
|
+
}
|
|
52
|
+
}) : null;
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement("div", null, header, /*#__PURE__*/_react.default.createElement(_username_pane.default, {
|
|
68
54
|
i18n: i18n,
|
|
69
55
|
lock: model,
|
|
70
56
|
placeholder: usernameInputPlaceholder,
|
|
71
57
|
validateFormat: false,
|
|
72
58
|
strictValidation: false
|
|
73
|
-
}),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
59
|
+
}), /*#__PURE__*/_react.default.createElement(_password_pane.default, {
|
|
60
|
+
i18n: i18n,
|
|
61
|
+
lock: model,
|
|
62
|
+
placeholder: passwordInputPlaceholder
|
|
63
|
+
}), captchaPane);
|
|
64
|
+
}
|
|
65
|
+
}]);
|
|
79
66
|
return HRDPane;
|
|
80
|
-
}(
|
|
81
|
-
|
|
67
|
+
}(_react.default.Component);
|
|
82
68
|
exports.default = HRDPane;
|
|
83
|
-
|
|
84
|
-
|
|
85
69
|
HRDPane.propTypes = {
|
|
86
|
-
header:
|
|
87
|
-
i18n:
|
|
88
|
-
model:
|
|
89
|
-
passwordInputPlaceholder:
|
|
90
|
-
usernameInputPlaceholder:
|
|
70
|
+
header: _propTypes.default.element,
|
|
71
|
+
i18n: _propTypes.default.object.isRequired,
|
|
72
|
+
model: _propTypes.default.object.isRequired,
|
|
73
|
+
passwordInputPlaceholder: _propTypes.default.string.isRequired,
|
|
74
|
+
usernameInputPlaceholder: _propTypes.default.string.isRequired
|
|
91
75
|
};
|