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.
Files changed (240) hide show
  1. package/.browserslistrc +1 -0
  2. package/.circleci/config.yml +3 -1
  3. package/.shiprc +4 -5
  4. package/CHANGELOG.md +25 -0
  5. package/DEVELOPMENT.md +1 -1
  6. package/README.md +20 -16
  7. package/karma.conf.js +1 -1
  8. package/lib/CSSCore.js +1 -4
  9. package/lib/__tests__/auth_button.js +12 -22
  10. package/lib/__tests__/connection/database/actions.js +48 -49
  11. package/lib/__tests__/connection/database/index.js +22 -28
  12. package/lib/__tests__/connection/database/login_pane.js +24 -47
  13. package/lib/__tests__/connection/database/password_reset_confirmation.js +23 -32
  14. package/lib/__tests__/connection/database/reset_password.js +17 -39
  15. package/lib/__tests__/connection/database/signed_up_confirmation.js +23 -32
  16. package/lib/__tests__/connection/enterprise/actions.js +22 -47
  17. package/lib/__tests__/connection/enterprise/hrd_pane.js +16 -33
  18. package/lib/__tests__/connection/enterprise/hrd_screen.js +26 -40
  19. package/lib/__tests__/connection/enterprise/quick_auth_screen.js +32 -75
  20. package/lib/__tests__/connection/passwordless/ask_vcode.js +29 -51
  21. package/lib/__tests__/connection/passwordless/email_sent_confirmation.js +23 -32
  22. package/lib/__tests__/connection/passwordless/passwordless.js +35 -97
  23. package/lib/__tests__/core/actions.js +23 -46
  24. package/lib/__tests__/core/client/index.js +10 -13
  25. package/lib/__tests__/core/index.js +46 -94
  26. package/lib/__tests__/core/remote_data.js +14 -20
  27. package/lib/__tests__/core/signed_in_confirmation.js +23 -32
  28. package/lib/__tests__/core/sso/last_login_screen.js +27 -50
  29. package/lib/__tests__/core/tenant.js +10 -12
  30. package/lib/__tests__/core/web_api/helper.js +6 -14
  31. package/lib/__tests__/core/web_api/p2_api.js +38 -33
  32. package/lib/__tests__/core/web_api.js +37 -33
  33. package/lib/__tests__/engine/classic/login.js +20 -41
  34. package/lib/__tests__/engine/classic/mfa_login_screen.js +6 -19
  35. package/lib/__tests__/engine/classic/sign_up_pane.js +33 -55
  36. package/lib/__tests__/engine/classic/sign_up_screen.js +18 -45
  37. package/lib/__tests__/engine/classic.js +13 -6
  38. package/lib/__tests__/engine/passwordless/social_or_email_login_screen.js +7 -28
  39. package/lib/__tests__/engine/passwordless/social_or_phone_number_login_screen.js +7 -28
  40. package/lib/__tests__/engine/passwordless.js +2 -5
  41. package/lib/__tests__/field/captcha/recaptcha_enterprise.js +27 -27
  42. package/lib/__tests__/field/captcha/recaptchav2.js +27 -27
  43. package/lib/__tests__/field/captcha.js +39 -51
  44. package/lib/__tests__/field/custom_input.js +23 -47
  45. package/lib/__tests__/field/email.js +2 -3
  46. package/lib/__tests__/field/email_pane.js +25 -48
  47. package/lib/__tests__/field/field.js +9 -13
  48. package/lib/__tests__/field/login_pane.js +30 -34
  49. package/lib/__tests__/field/mfa_code_pane.js +13 -28
  50. package/lib/__tests__/field/option_selection_pane.js +7 -25
  51. package/lib/__tests__/field/password.js +6 -12
  52. package/lib/__tests__/field/password_pane.js +29 -46
  53. package/lib/__tests__/field/phone_number_pane.js +18 -41
  54. package/lib/__tests__/field/social_buttons_pane.js +30 -47
  55. package/lib/__tests__/field/username.js +27 -48
  56. package/lib/__tests__/field/username_pane.js +30 -47
  57. package/lib/__tests__/field/vcode.js +5 -13
  58. package/lib/__tests__/field/vcode_pane.js +20 -44
  59. package/lib/__tests__/i18n.js +28 -53
  60. package/lib/__tests__/quick-auth/actions.js +4 -27
  61. package/lib/__tests__/setup-tests.js +7 -9
  62. package/lib/__tests__/testUtils.js +41 -58
  63. package/lib/__tests__/ui/box/chrome.js +24 -49
  64. package/lib/__tests__/ui/box/confirmation_pane.js +23 -42
  65. package/lib/__tests__/ui/box/container.js +21 -46
  66. package/lib/__tests__/ui/box/global_message.js +60 -37
  67. package/lib/__tests__/ui/input/email_input.js +6 -17
  68. package/lib/__tests__/ui/input/input_wrap.js +6 -19
  69. package/lib/__tests__/ui/input/password/password_strength.js +13 -15
  70. package/lib/__tests__/ui/input/password_input.js +22 -27
  71. package/lib/__tests__/utils/format.js +10 -17
  72. package/lib/__tests__/utils/url_utils.js +2 -5
  73. package/lib/avatar/gravatar_provider.js +13 -28
  74. package/lib/avatar.js +22 -41
  75. package/lib/browser.js +372 -23
  76. package/lib/connection/captcha.js +15 -34
  77. package/lib/connection/database/actions.js +39 -108
  78. package/lib/connection/database/index.js +90 -191
  79. package/lib/connection/database/login_pane.js +107 -147
  80. package/lib/connection/database/login_sign_up_tabs.js +106 -125
  81. package/lib/connection/database/mfa_pane.js +50 -69
  82. package/lib/connection/database/password_reset_confirmation.js +51 -73
  83. package/lib/connection/database/reset_password.js +116 -132
  84. package/lib/connection/database/reset_password_pane.js +45 -56
  85. package/lib/connection/database/sign_up_terms.js +17 -23
  86. package/lib/connection/database/signed_up_confirmation.js +52 -75
  87. package/lib/connection/enterprise/actions.js +23 -52
  88. package/lib/connection/enterprise/hrd_pane.js +60 -76
  89. package/lib/connection/enterprise/hrd_screen.js +60 -75
  90. package/lib/connection/enterprise/kerberos_screen.js +46 -60
  91. package/lib/connection/enterprise/quick_auth_screen.js +46 -64
  92. package/lib/connection/enterprise/single_sign_on_notice.js +14 -26
  93. package/lib/connection/enterprise.js +51 -84
  94. package/lib/connection/passwordless/actions.js +29 -65
  95. package/lib/connection/passwordless/ask_vcode.js +53 -60
  96. package/lib/connection/passwordless/email_sent_confirmation.js +129 -179
  97. package/lib/connection/passwordless/index.js +36 -68
  98. package/lib/connection/social/index.js +12 -15
  99. package/lib/core/actions.js +33 -85
  100. package/lib/core/client/index.js +38 -58
  101. package/lib/core/client/settings.js +12 -20
  102. package/lib/core/error_screen.js +38 -52
  103. package/lib/core/index.js +154 -305
  104. package/lib/core/loading_screen.js +61 -71
  105. package/lib/core/pane_separator.js +10 -10
  106. package/lib/core/remote_data.js +30 -51
  107. package/lib/core/screen.js +85 -79
  108. package/lib/core/signed_in_confirmation.js +51 -73
  109. package/lib/core/sso/data.js +9 -17
  110. package/lib/core/sso/index.js +5 -6
  111. package/lib/core/sso/last_login_screen.js +46 -63
  112. package/lib/core/tenant/index.js +37 -59
  113. package/lib/core/tenant/settings.js +11 -15
  114. package/lib/core/web_api/helper.js +22 -28
  115. package/lib/core/web_api/p2_api.js +162 -171
  116. package/lib/core/web_api.js +106 -94
  117. package/lib/core.js +126 -160
  118. package/lib/engine/classic/login.js +92 -144
  119. package/lib/engine/classic/mfa_login_screen.js +61 -67
  120. package/lib/engine/classic/sign_up_pane.js +89 -123
  121. package/lib/engine/classic/sign_up_screen.js +112 -158
  122. package/lib/engine/classic.js +122 -183
  123. package/lib/engine/passwordless/social_or_email_login_screen.js +80 -116
  124. package/lib/engine/passwordless/social_or_phone_number_login_screen.js +79 -110
  125. package/lib/engine/passwordless.js +75 -104
  126. package/lib/field/actions.js +11 -17
  127. package/lib/field/captcha/captcha_pane.js +83 -103
  128. package/lib/field/captcha/recaptcha.js +140 -145
  129. package/lib/field/captcha.js +7 -10
  130. package/lib/field/custom_input.js +37 -50
  131. package/lib/field/email/email_pane.js +90 -109
  132. package/lib/field/email.js +17 -35
  133. package/lib/field/index.js +50 -87
  134. package/lib/field/mfa-code/mfa_code_pane.js +57 -71
  135. package/lib/field/mfa_code.js +15 -21
  136. package/lib/field/option_selection_pane.js +16 -22
  137. package/lib/field/password/password_pane.js +79 -91
  138. package/lib/field/password.js +8 -14
  139. package/lib/field/phone-number/locations.js +7 -3
  140. package/lib/field/phone-number/phone_number_pane.js +87 -124
  141. package/lib/field/phone_number.js +16 -30
  142. package/lib/field/social/event.js +9 -12
  143. package/lib/field/social/social_buttons_pane.js +93 -121
  144. package/lib/field/username/username_pane.js +105 -123
  145. package/lib/field/username.js +16 -26
  146. package/lib/field/vcode/vcode_pane.js +67 -93
  147. package/lib/field/vcode.js +5 -5
  148. package/lib/i18n/af.js +7 -4
  149. package/lib/i18n/ar.js +7 -4
  150. package/lib/i18n/az.js +7 -4
  151. package/lib/i18n/bg.js +7 -4
  152. package/lib/i18n/ca.js +7 -4
  153. package/lib/i18n/cs.js +7 -4
  154. package/lib/i18n/da.js +7 -4
  155. package/lib/i18n/de.js +7 -3
  156. package/lib/i18n/el.js +7 -4
  157. package/lib/i18n/en.js +9 -4
  158. package/lib/i18n/es.js +7 -3
  159. package/lib/i18n/et.js +7 -4
  160. package/lib/i18n/fa.js +7 -4
  161. package/lib/i18n/fi.js +7 -4
  162. package/lib/i18n/fr.js +7 -4
  163. package/lib/i18n/he.js +7 -4
  164. package/lib/i18n/hr.js +7 -4
  165. package/lib/i18n/hu.js +7 -4
  166. package/lib/i18n/id.js +7 -4
  167. package/lib/i18n/it.js +7 -3
  168. package/lib/i18n/ja.js +7 -4
  169. package/lib/i18n/ko.js +7 -4
  170. package/lib/i18n/lt.js +7 -4
  171. package/lib/i18n/lv.js +7 -4
  172. package/lib/i18n/ms.js +7 -4
  173. package/lib/i18n/nb.js +7 -4
  174. package/lib/i18n/nl.js +7 -4
  175. package/lib/i18n/nn.js +7 -4
  176. package/lib/i18n/no.js +7 -4
  177. package/lib/i18n/pl.js +7 -4
  178. package/lib/i18n/pt-br.js +7 -3
  179. package/lib/i18n/pt.js +7 -4
  180. package/lib/i18n/ro.js +7 -4
  181. package/lib/i18n/ru.js +7 -4
  182. package/lib/i18n/sk.js +7 -4
  183. package/lib/i18n/sl.js +7 -4
  184. package/lib/i18n/sr.js +7 -4
  185. package/lib/i18n/sv.js +7 -4
  186. package/lib/i18n/tr.js +7 -4
  187. package/lib/i18n/ua.js +7 -4
  188. package/lib/i18n/uk.js +7 -4
  189. package/lib/i18n/vi.js +7 -4
  190. package/lib/i18n/zh-tw.js +7 -4
  191. package/lib/i18n/zh.js +7 -4
  192. package/lib/i18n.js +38 -75
  193. package/lib/index.js +14 -17
  194. package/lib/lock.js +29 -32
  195. package/lib/passwordless.js +29 -31
  196. package/lib/quick-auth/actions.js +19 -26
  197. package/lib/quick_auth.js +8 -10
  198. package/lib/sanitizer.js +5 -5
  199. package/lib/store/index.js +22 -42
  200. package/lib/sync.js +21 -42
  201. package/lib/ui/box/button.js +85 -105
  202. package/lib/ui/box/chrome.js +463 -548
  203. package/lib/ui/box/confirmation_pane.js +34 -48
  204. package/lib/ui/box/container.js +305 -339
  205. package/lib/ui/box/global_message.js +51 -60
  206. package/lib/ui/box/header.js +155 -177
  207. package/lib/ui/box/multisize_slide.js +233 -229
  208. package/lib/ui/box/success_pane.js +34 -37
  209. package/lib/ui/box.js +88 -93
  210. package/lib/ui/button/auth_button.js +44 -51
  211. package/lib/ui/input/captcha_input.js +162 -181
  212. package/lib/ui/input/checkbox_input.js +57 -59
  213. package/lib/ui/input/email_input.js +117 -124
  214. package/lib/ui/input/input_wrap.js +65 -80
  215. package/lib/ui/input/location_input.js +130 -150
  216. package/lib/ui/input/mfa_code_input.js +98 -98
  217. package/lib/ui/input/password/password_strength.js +103 -127
  218. package/lib/ui/input/password_input.js +141 -147
  219. package/lib/ui/input/phone_number_input.js +101 -109
  220. package/lib/ui/input/select_input.js +120 -132
  221. package/lib/ui/input/text_input.js +89 -84
  222. package/lib/ui/input/username_input.js +109 -115
  223. package/lib/ui/input/vcode_input.js +110 -118
  224. package/lib/ui/list.js +224 -247
  225. package/lib/ui/pane/quick_auth_pane.js +55 -80
  226. package/lib/utils/atom.js +55 -48
  227. package/lib/utils/cache.js +54 -43
  228. package/lib/utils/cdn_utils.js +17 -31
  229. package/lib/utils/createRef.js +3 -1
  230. package/lib/utils/data_utils.js +10 -16
  231. package/lib/utils/fn_utils.js +5 -4
  232. package/lib/utils/format.js +6 -8
  233. package/lib/utils/id_utils.js +4 -3
  234. package/lib/utils/jsonp_utils.js +20 -17
  235. package/lib/utils/media_utils.js +4 -2
  236. package/lib/utils/preload_utils.js +4 -3
  237. package/lib/utils/string_utils.js +4 -4
  238. package/lib/utils/url_utils.js +4 -3
  239. package/package.json +48 -34
  240. package/webpack.config.js +36 -3
@@ -1,36 +1,32 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
4
6
  exports.getUsernameValidation = getUsernameValidation;
5
7
  exports.setUsername = setUsername;
6
8
  exports.usernameLooksLikeEmail = usernameLooksLikeEmail;
7
-
8
- var _index = require('./index');
9
-
10
- var _email = require('./email');
11
-
12
- var _database = require('../connection/database');
13
-
14
- var _trim = require('trim');
15
-
16
- var _trim2 = _interopRequireDefault(_trim);
17
-
9
+ var _index = require("./index");
10
+ var _email = require("./email");
11
+ var _database = require("../connection/database");
12
+ var _trim = _interopRequireDefault(require("trim"));
18
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
- var DEFAULT_CONNECTION_VALIDATION = { username: { min: 1, max: 15 } };
14
+ var DEFAULT_CONNECTION_VALIDATION = {
15
+ username: {
16
+ min: 1,
17
+ max: 15
18
+ }
19
+ };
21
20
  var regExp = /^[a-zA-Z0-9_+\-.!#\$\^`~@']*$/;
22
-
23
21
  function validateUsername(str, validateFormat) {
24
22
  var settings = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_CONNECTION_VALIDATION.username;
25
23
  var strictValidation = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
26
-
27
24
  // If the connection does not have validation settings, it should only check if the field is empty.
28
25
  // validateFormat overrides this logic to disable validation on login (login should never validate format)
29
26
  if (!validateFormat || settings == null) {
30
- return (0, _trim2.default)(str).length > 0;
27
+ return (0, _trim.default)(str).length > 0;
31
28
  }
32
-
33
- var lowercased = (0, _trim2.default)(str.toLowerCase());
29
+ var lowercased = (0, _trim.default)(str.toLowerCase());
34
30
 
35
31
  // check min value matched
36
32
  if (lowercased.length < settings.min) {
@@ -51,19 +47,15 @@ function validateUsername(str, validateFormat) {
51
47
  var result = regExp.exec(lowercased);
52
48
  return !!(result && result[0]);
53
49
  }
54
-
55
50
  function getUsernameValidation(m) {
56
51
  var usernameValidation = (0, _database.databaseConnection)(m).getIn(['validation', 'username']);
57
52
  return usernameValidation ? usernameValidation.toJS() : null;
58
53
  }
59
-
60
54
  function setUsername(m, str) {
61
55
  var usernameStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'username';
62
56
  var validateUsernameFormat = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
63
57
  var strictValidation = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
64
-
65
58
  var usernameValidation = validateUsernameFormat ? getUsernameValidation(m) : null;
66
-
67
59
  var validator = function validator(value) {
68
60
  switch (usernameStyle) {
69
61
  case 'email':
@@ -74,10 +66,8 @@ function setUsername(m, str) {
74
66
  return usernameLooksLikeEmail(value) ? (0, _email.validateEmail)(value) : validateUsername(value, validateUsernameFormat, usernameValidation, strictValidation);
75
67
  }
76
68
  };
77
-
78
69
  return (0, _index.setField)(m, 'username', str, validator);
79
70
  }
80
-
81
71
  function usernameLooksLikeEmail(str) {
82
72
  return str.indexOf('@') > -1 && str.indexOf('.') > -1;
83
73
  }
@@ -1,87 +1,68 @@
1
- 'use strict';
2
-
3
- exports.__esModule = true;
4
-
5
- var _propTypes = require('prop-types');
6
-
7
- var _propTypes2 = _interopRequireDefault(_propTypes);
8
-
9
- var _react = require('react');
10
-
11
- var _react2 = _interopRequireDefault(_react);
12
-
13
- var _vcode_input = require('../../ui/input/vcode_input');
14
-
15
- var _vcode_input2 = _interopRequireDefault(_vcode_input);
16
-
17
- var _index = require('../../core/index');
18
-
19
- var l = _interopRequireWildcard(_index);
20
-
21
- var _index2 = require('../index');
22
-
23
- var c = _interopRequireWildcard(_index2);
24
-
25
- var _media_utils = require('../../utils/media_utils');
26
-
27
- var _index3 = require('../../store/index');
28
-
29
- var _vcode = require('../vcode');
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
+ 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 _vcode_input = _interopRequireDefault(require("../../ui/input/vcode_input"));
10
+ var l = _interopRequireWildcard(require("../../core/index"));
11
+ var c = _interopRequireWildcard(require("../index"));
12
+ var _media_utils = require("../../utils/media_utils");
13
+ var _index3 = require("../../store/index");
14
+ var _vcode = require("../vcode");
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
-
18
+ 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); }
35
19
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
36
-
37
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
38
-
39
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
40
-
41
- var VcodePane = function (_React$Component) {
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 _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); }
23
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
24
+ 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); }; }
25
+ 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); }
26
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
27
+ 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; } }
28
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
29
+ 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; }
30
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
31
+ 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); }
32
+ var VcodePane = /*#__PURE__*/function (_React$Component) {
42
33
  _inherits(VcodePane, _React$Component);
43
-
34
+ var _super = _createSuper(VcodePane);
44
35
  function VcodePane() {
45
- var _temp, _this, _ret;
46
-
36
+ var _this;
47
37
  _classCallCheck(this, VcodePane);
48
-
49
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
38
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
50
39
  args[_key] = arguments[_key];
51
40
  }
52
-
53
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleVcodeChange = function (e) {
41
+ _this = _super.call.apply(_super, [this].concat(args));
42
+ _defineProperty(_assertThisInitialized(_this), "handleVcodeChange", function (e) {
54
43
  e.preventDefault();
55
44
  (0, _index3.swap)(_index3.updateEntity, 'lock', l.id(_this.props.lock), _vcode.setVcode, e.target.value);
56
- }, _this.handleResendClick = function (e) {
45
+ });
46
+ _defineProperty(_assertThisInitialized(_this), "handleResendClick", function (e) {
57
47
  e.preventDefault();
58
48
  var _this$props = _this.props,
59
- lock = _this$props.lock,
60
- onRestart = _this$props.onRestart;
61
-
49
+ lock = _this$props.lock,
50
+ onRestart = _this$props.onRestart;
62
51
  onRestart(l.id(lock));
63
- }, _temp), _possibleConstructorReturn(_this, _ret);
52
+ });
53
+ return _this;
64
54
  }
65
-
66
- VcodePane.prototype.render = function render() {
67
- var _props = this.props,
68
- instructions = _props.instructions,
69
- lock = _props.lock,
70
- placeholder = _props.placeholder,
71
- resendLabel = _props.resendLabel;
72
-
73
- var headerText = instructions || null;
74
- var header = headerText && _react2.default.createElement(
75
- 'p',
76
- null,
77
- headerText
78
- );
79
-
80
- return _react2.default.createElement(
81
- 'div',
82
- null,
83
- header,
84
- _react2.default.createElement(_vcode_input2.default, {
55
+ _createClass(VcodePane, [{
56
+ key: "render",
57
+ value: function render() {
58
+ var _this$props2 = this.props,
59
+ instructions = _this$props2.instructions,
60
+ lock = _this$props2.lock,
61
+ placeholder = _this$props2.placeholder,
62
+ resendLabel = _this$props2.resendLabel;
63
+ var headerText = instructions || null;
64
+ var header = headerText && /*#__PURE__*/_react.default.createElement("p", null, headerText);
65
+ return /*#__PURE__*/_react.default.createElement("div", null, header, /*#__PURE__*/_react.default.createElement(_vcode_input.default, {
85
66
  lockId: l.id(lock),
86
67
  value: c.vcode(lock),
87
68
  isValid: !c.isFieldVisiblyInvalid(lock, 'vcode') && !l.globalError(lock),
@@ -89,29 +70,22 @@ var VcodePane = function (_React$Component) {
89
70
  autoFocus: !(0, _media_utils.isSmallScreen)(),
90
71
  placeholder: placeholder,
91
72
  disabled: l.submitting(lock)
92
- }),
93
- _react2.default.createElement(
94
- 'p',
95
- { className: 'auth0-lock-alternative' },
96
- _react2.default.createElement(
97
- 'a',
98
- { className: 'auth0-lock-alternative-link', href: '#', onClick: this.handleResendClick },
99
- resendLabel
100
- )
101
- )
102
- );
103
- };
104
-
73
+ }), /*#__PURE__*/_react.default.createElement("p", {
74
+ className: "auth0-lock-alternative"
75
+ }, /*#__PURE__*/_react.default.createElement("a", {
76
+ className: "auth0-lock-alternative-link",
77
+ href: "#",
78
+ onClick: this.handleResendClick
79
+ }, resendLabel)));
80
+ }
81
+ }]);
105
82
  return VcodePane;
106
- }(_react2.default.Component);
107
-
83
+ }(_react.default.Component);
108
84
  exports.default = VcodePane;
109
-
110
-
111
85
  VcodePane.propTypes = {
112
- instructions: _propTypes2.default.string,
113
- lock: _propTypes2.default.object.isRequired,
114
- placeholder: _propTypes2.default.string.isRequired,
115
- resendLabel: _propTypes2.default.string.isRequired,
116
- onRestart: _propTypes2.default.func.isRequired
86
+ instructions: _propTypes.default.string,
87
+ lock: _propTypes.default.object.isRequired,
88
+ placeholder: _propTypes.default.string.isRequired,
89
+ resendLabel: _propTypes.default.string.isRequired,
90
+ onRestart: _propTypes.default.func.isRequired
117
91
  };
@@ -1,10 +1,10 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
4
6
  exports.setVcode = setVcode;
5
-
6
- var _index = require('./index');
7
-
7
+ var _index = require("./index");
8
8
  function setVcode(m, str) {
9
9
  return (0, _index.setField)(m, 'vcode', str.replace(/[\s-]+/g, ''));
10
10
  }
package/lib/i18n/af.js CHANGED
@@ -1,10 +1,12 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
4
7
  // This file was automatically translated.
5
8
  // Feel free to submit a PR if you find a more accurate translation.
6
-
7
- exports.default = {
9
+ var _default = {
8
10
  error: {
9
11
  forgotPassword: {
10
12
  too_many_requests: 'Jammer, jy het limiet bereik. Probeer asseblief weer later.',
@@ -135,3 +137,4 @@ exports.default = {
135
137
  captchaCodeInputPlaceholder: 'Voer die kode hierbo in',
136
138
  captchaMathInputPlaceholder: 'Los die formule hierbo getoon'
137
139
  };
140
+ exports.default = _default;
package/lib/i18n/ar.js CHANGED
@@ -1,10 +1,12 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
4
7
  // This file was automatically translated.
5
8
  // Feel free to submit a PR if you find a more accurate translation.
6
-
7
- exports.default = {
9
+ var _default = {
8
10
  error: {
9
11
  forgotPassword: {
10
12
  too_many_requests: 'لقد تجاوزت الحد المسموح لمحاولات تغيير كلمة المرور. رجاءً انتظر قبل إعادة المحاولة.',
@@ -135,3 +137,4 @@ exports.default = {
135
137
  captchaCodeInputPlaceholder: 'أدخل الرمز الموضح أعلاه',
136
138
  captchaMathInputPlaceholder: 'حل الصيغة الموضحة أعلاه'
137
139
  };
140
+ exports.default = _default;
package/lib/i18n/az.js CHANGED
@@ -1,10 +1,12 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
4
7
  // This file was automatically translated.
5
8
  // Feel free to submit a PR if you find a more accurate translation.
6
-
7
- exports.default = {
9
+ var _default = {
8
10
  error: {
9
11
  forgotPassword: {
10
12
  too_many_requests: 'Şifrəni dəyişdirməyə cəhdlərin sayında maksimal həddə çatmısınız. Xahiş edirik bir daha cəhd etmədən əvvəl gözləyin.',
@@ -135,3 +137,4 @@ exports.default = {
135
137
  captchaCodeInputPlaceholder: 'Yuxarıda göstərilən kodu daxil edin',
136
138
  captchaMathInputPlaceholder: 'Yuxarıda göstərilən düsturu həll edin'
137
139
  };
140
+ exports.default = _default;
package/lib/i18n/bg.js CHANGED
@@ -1,10 +1,12 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
4
7
  // This file was automatically translated.
5
8
  // Feel free to submit a PR if you find a more accurate translation.
6
-
7
- exports.default = {
9
+ var _default = {
8
10
  error: {
9
11
  forgotPassword: {
10
12
  too_many_requests: 'Достигнахте лимита на опити за смяна на паролата. Моля изчакайте преди да опитате отново.',
@@ -135,3 +137,4 @@ exports.default = {
135
137
  captchaCodeInputPlaceholder: 'Въведете кода, показан по-горе',
136
138
  captchaMathInputPlaceholder: 'Решете задачата, показана по-горе'
137
139
  };
140
+ exports.default = _default;
package/lib/i18n/ca.js CHANGED
@@ -1,10 +1,12 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
4
7
  // This file was automatically translated.
5
8
  // Feel free to submit a PR if you find a more accurate translation.
6
-
7
- exports.default = {
9
+ var _default = {
8
10
  error: {
9
11
  forgotPassword: {
10
12
  too_many_requests: "S'han exhaurit els intents per restablir la contrasenya. Espereu una estona i intenteu-ho de nou.",
@@ -135,3 +137,4 @@ exports.default = {
135
137
  captchaCodeInputPlaceholder: 'Introduïu el codi anterior',
136
138
  captchaMathInputPlaceholder: 'Resoleu la fórmula mostrada anteriorment'
137
139
  };
140
+ exports.default = _default;
package/lib/i18n/cs.js CHANGED
@@ -1,10 +1,12 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
4
7
  // This file was automatically translated.
5
8
  // Feel free to submit a PR if you find a more accurate translation.
6
-
7
- exports.default = {
9
+ var _default = {
8
10
  error: {
9
11
  forgotPassword: {
10
12
  too_many_requests: 'Dosáhli jste limitu počtu pokusů o změnu hesla. Před dalším pokusem prosím počkejte.',
@@ -136,3 +138,4 @@ exports.default = {
136
138
  mfaSubmitLabel: 'Přihlásit',
137
139
  mfaCodeErrorHint: 'Použijte %d číslic'
138
140
  };
141
+ exports.default = _default;
package/lib/i18n/da.js CHANGED
@@ -1,10 +1,12 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
4
7
  // This file was automatically translated.
5
8
  // Feel free to submit a PR if you find a more accurate translation.
6
-
7
- exports.default = {
9
+ var _default = {
8
10
  error: {
9
11
  forgotPassword: {
10
12
  too_many_requests: 'Du har nået grænsen for forsøg på at skifte adgangskode. Vent venligst før du prøver igen.',
@@ -135,3 +137,4 @@ exports.default = {
135
137
  captchaCodeInputPlaceholder: 'Indtast koden vist ovenfor',
136
138
  captchaMathInputPlaceholder: 'Løs formlen vist ovenfor'
137
139
  };
140
+ exports.default = _default;
package/lib/i18n/de.js CHANGED
@@ -1,7 +1,10 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
4
- exports.default = {
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = {
5
8
  error: {
6
9
  forgotPassword: {
7
10
  too_many_requests: 'Sie haben das Limit für Rücksetzungsversuche des Passworts erreicht. Bitte warten Sie, bevor Sie es erneut versuchen.',
@@ -132,3 +135,4 @@ exports.default = {
132
135
  captchaCodeInputPlaceholder: 'Geben Sie den oben angezeigten Code ein.',
133
136
  captchaMathInputPlaceholder: 'Lösen Sie die oben gezeigte Formel.'
134
137
  };
138
+ exports.default = _default;
package/lib/i18n/el.js CHANGED
@@ -1,10 +1,12 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
4
7
  // This file was automatically translated.
5
8
  // Feel free to submit a PR if you find a more accurate translation.
6
-
7
- exports.default = {
9
+ var _default = {
8
10
  error: {
9
11
  forgotPassword: {
10
12
  too_many_requests: 'Έχετε υπερβεί το όριο προσπαθειών αλλαγής κωδικού πρόσβασης. Παρακαλούμε περιμένετε πριν ξαναπροσπαθήσετε.',
@@ -135,3 +137,4 @@ exports.default = {
135
137
  captchaCodeInputPlaceholder: 'Εισαγάγετε τον κωδικό που φαίνεται παραπάνω',
136
138
  captchaMathInputPlaceholder: 'Λύστε τον τύπο που φαίνεται παραπάνω'
137
139
  };
140
+ exports.default = _default;
package/lib/i18n/en.js CHANGED
@@ -1,7 +1,10 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
4
- exports.default = {
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = {
5
8
  error: {
6
9
  forgotPassword: {
7
10
  too_many_requests: 'You have reached the limit on password change attempts. Please wait before trying again.',
@@ -22,7 +25,8 @@ exports.default = {
22
25
  'lock.unauthorized': 'Permissions were not granted. Try again.',
23
26
  'lock.mfa_registration_required': 'Multifactor authentication is required but your device is not enrolled. Please enroll it before moving on.',
24
27
  'lock.mfa_invalid_code': 'Wrong code. Please try again.',
25
- password_change_required: 'You need to update your password because this is the first time you are logging in, or because your password has expired.', // TODO: verify error code
28
+ password_change_required: 'You need to update your password because this is the first time you are logging in, or because your password has expired.',
29
+ // TODO: verify error code
26
30
  password_leaked: 'We have detected a potential security issue with this account. To protect your account, we have blocked this login. An email was sent with instruction on how to unblock your account.',
27
31
  too_many_attempts: 'Your account has been blocked after multiple consecutive login attempts.',
28
32
  too_many_requests: "We're sorry. There are too many requests right now. Please reload the page and try again. If this persists, please try again later.",
@@ -133,3 +137,4 @@ exports.default = {
133
137
  mfaSubmitLabel: 'Log In',
134
138
  mfaCodeErrorHint: 'Use %d numbers'
135
139
  };
140
+ exports.default = _default;
package/lib/i18n/es.js CHANGED
@@ -1,7 +1,10 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
4
- exports.default = {
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = {
5
8
  error: {
6
9
  forgotPassword: {
7
10
  too_many_requests: 'Se ha alcanzado el límite de intentos para restablecer su contraseña. Por favor, aguarde unos minutos.',
@@ -132,3 +135,4 @@ exports.default = {
132
135
  showPassword: 'Mostrar contraseña',
133
136
  signUpTerms: 'Al suscribirse usted acepta nuestros términos de servicio y política de privacidad.'
134
137
  };
138
+ exports.default = _default;
package/lib/i18n/et.js CHANGED
@@ -1,10 +1,12 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
4
7
  // This file was automatically translated.
5
8
  // Feel free to submit a PR if you find a more accurate translation.
6
-
7
- exports.default = {
9
+ var _default = {
8
10
  error: {
9
11
  forgotPassword: {
10
12
  too_many_requests: 'Sa oled liiga palju kordi üritanud salasõna vahetada. Palun oota enne uuesti proovimist.',
@@ -135,3 +137,4 @@ exports.default = {
135
137
  captchaCodeInputPlaceholder: 'Sisestage ülal näidatud kood',
136
138
  captchaMathInputPlaceholder: 'Lahendage ülaltoodud valem'
137
139
  };
140
+ exports.default = _default;
package/lib/i18n/fa.js CHANGED
@@ -1,10 +1,12 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
4
7
  // This file was automatically translated.
5
8
  // Feel free to submit a PR if you find a more accurate translation.
6
-
7
- exports.default = {
9
+ var _default = {
8
10
  error: {
9
11
  forgotPassword: {
10
12
  too_many_requests: 'بیش از دفعات مجاز تغییر رمز عبور تلاش نموده اید ، لطفا کمی صبر کنید و دوباره تلاش کنید',
@@ -135,3 +137,4 @@ exports.default = {
135
137
  captchaCodeInputPlaceholder: 'کد نشان داده شده در بالا را وارد کنید',
136
138
  captchaMathInputPlaceholder: 'فرمول نشان داده شده در بالا را حل کنید'
137
139
  };
140
+ exports.default = _default;
package/lib/i18n/fi.js CHANGED
@@ -1,10 +1,12 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
4
7
  // This file was automatically translated.
5
8
  // Feel free to submit a PR if you find a more accurate translation.
6
-
7
- exports.default = {
9
+ var _default = {
8
10
  error: {
9
11
  forgotPassword: {
10
12
  too_many_requests: 'Olet yrittänyt vaihtaa salasanaa liian monta kertaa. Ole hyvä ja odota ennen kuin yrität uudelleen.',
@@ -135,3 +137,4 @@ exports.default = {
135
137
  captchaCodeInputPlaceholder: 'Kirjoita yllä oleva koodi',
136
138
  captchaMathInputPlaceholder: 'Ratkaise yllä esitetty kaava'
137
139
  };
140
+ exports.default = _default;
package/lib/i18n/fr.js CHANGED
@@ -1,10 +1,12 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
4
7
  // This file was automatically translated.
5
8
  // Feel free to submit a PR if you find a more accurate translation.
6
-
7
- exports.default = {
9
+ var _default = {
8
10
  error: {
9
11
  forgotPassword: {
10
12
  too_many_requests: 'Vous avez atteint la limite de tentatives de changement de mot de passe. Veuillez patienter avant de recommencer.',
@@ -135,3 +137,4 @@ exports.default = {
135
137
  captchaCodeInputPlaceholder: 'Entrez le code ci-dessus',
136
138
  captchaMathInputPlaceholder: 'Résolvez la formule ci-dessus'
137
139
  };
140
+ exports.default = _default;