auth0-lock 11.34.2 → 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.
Files changed (241) hide show
  1. package/.browserslistrc +1 -0
  2. package/.circleci/config.yml +4 -2
  3. package/.eslintrc.json +5 -5
  4. package/.github/workflows/codeql.yml +41 -0
  5. package/.shiprc +4 -5
  6. package/CHANGELOG.md +26 -0
  7. package/EXAMPLES.md +626 -0
  8. package/README.md +77 -649
  9. package/karma.conf.js +1 -1
  10. package/lib/CSSCore.js +1 -4
  11. package/lib/__tests__/auth_button.js +12 -22
  12. package/lib/__tests__/connection/database/actions.js +48 -49
  13. package/lib/__tests__/connection/database/index.js +22 -28
  14. package/lib/__tests__/connection/database/login_pane.js +20 -41
  15. package/lib/__tests__/connection/database/password_reset_confirmation.js +19 -26
  16. package/lib/__tests__/connection/database/reset_password.js +17 -39
  17. package/lib/__tests__/connection/database/signed_up_confirmation.js +19 -26
  18. package/lib/__tests__/connection/enterprise/actions.js +22 -47
  19. package/lib/__tests__/connection/enterprise/hrd_pane.js +16 -33
  20. package/lib/__tests__/connection/enterprise/hrd_screen.js +26 -40
  21. package/lib/__tests__/connection/enterprise/quick_auth_screen.js +27 -68
  22. package/lib/__tests__/connection/passwordless/ask_vcode.js +29 -51
  23. package/lib/__tests__/connection/passwordless/email_sent_confirmation.js +19 -26
  24. package/lib/__tests__/connection/passwordless/passwordless.js +35 -97
  25. package/lib/__tests__/core/actions.js +23 -46
  26. package/lib/__tests__/core/client/index.js +10 -13
  27. package/lib/__tests__/core/index.js +46 -94
  28. package/lib/__tests__/core/remote_data.js +14 -20
  29. package/lib/__tests__/core/signed_in_confirmation.js +19 -26
  30. package/lib/__tests__/core/sso/last_login_screen.js +27 -50
  31. package/lib/__tests__/core/tenant.js +10 -12
  32. package/lib/__tests__/core/web_api/helper.js +6 -14
  33. package/lib/__tests__/core/web_api/p2_api.js +38 -33
  34. package/lib/__tests__/core/web_api.js +37 -33
  35. package/lib/__tests__/engine/classic/login.js +20 -41
  36. package/lib/__tests__/engine/classic/mfa_login_screen.js +6 -19
  37. package/lib/__tests__/engine/classic/sign_up_pane.js +33 -55
  38. package/lib/__tests__/engine/classic/sign_up_screen.js +18 -45
  39. package/lib/__tests__/engine/classic.js +13 -6
  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 +19 -36
  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 +14 -32
  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 -62
  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 +152 -301
  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 +28 -48
  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 +24 -30
  115. package/lib/core/web_api/p2_api.js +156 -165
  116. package/lib/core/web_api.js +101 -90
  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 +71 -106
  124. package/lib/engine/passwordless/social_or_phone_number_login_screen.js +70 -100
  125. package/lib/engine/passwordless.js +75 -104
  126. package/lib/field/actions.js +11 -17
  127. package/lib/field/captcha/captcha_pane.js +82 -102
  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 +51 -88
  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/opslevel.yml +6 -0
  240. package/package.json +53 -38
  241. package/webpack.config.js +36 -3
@@ -1,154 +1,130 @@
1
- 'use strict';
2
-
3
- exports.__esModule = true;
4
-
5
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
6
-
7
- var _propTypes = require('prop-types');
8
-
9
- var _propTypes2 = _interopRequireDefault(_propTypes);
10
-
11
- var _react = require('react');
12
-
13
- var _react2 = _interopRequireDefault(_react);
14
-
15
- var _policy = require('password-sheriff/lib/policy');
16
-
17
- var _policy2 = _interopRequireDefault(_policy);
18
-
19
- var _format = require('../../../utils/format');
20
-
21
- var _format2 = _interopRequireDefault(_format);
22
-
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 _policy = _interopRequireDefault(require("password-sheriff/lib/policy"));
11
+ var _format = _interopRequireDefault(require("../../../utils/format"));
23
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
-
13
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
14
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
15
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
17
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
18
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
19
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
25
20
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
26
-
27
- 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; }
28
-
29
- 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; }
30
-
31
- var PasswordStrength = function (_React$Component) {
21
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
22
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
23
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
24
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
25
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
26
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
28
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
29
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
30
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
31
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
32
+ var PasswordStrength = /*#__PURE__*/function (_React$Component) {
32
33
  _inherits(PasswordStrength, _React$Component);
33
-
34
+ var _super = _createSuper(PasswordStrength);
34
35
  function PasswordStrength() {
35
36
  _classCallCheck(this, PasswordStrength);
36
-
37
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
37
+ return _super.apply(this, arguments);
38
38
  }
39
-
40
- PasswordStrength.prototype.render = function render() {
41
- var _props = this.props,
42
- password = _props.password,
43
- policy = _props.policy,
44
- messages = _props.messages;
45
-
46
- var analysis = new _policy2.default(policy.toJS()).missing(password);
47
- // TODO: add a component for fadeIn / fadeOut animations?
48
- var className = 'auth0-lock-password-strength animated ' + (!analysis.verified ? 'fadeIn' : 'fadeOut');
49
-
50
- var prepareMessage = function prepareMessage(items) {
51
- items && items.forEach(function (o) {
52
- if (messages[o.code]) {
53
- o.message = messages[o.code];
54
- }
55
-
56
- o.message = _format2.default.apply(undefined, [o.message].concat(o.format || []));
57
-
58
- if (o.items) {
59
- prepareMessage(o.items);
60
- }
61
- });
62
- };
63
-
64
- prepareMessage(analysis.rules);
65
-
66
- return _react2.default.createElement(
67
- 'div',
68
- { className: className },
69
- _react2.default.createElement(List, { items: analysis.rules })
70
- );
71
- };
72
-
39
+ _createClass(PasswordStrength, [{
40
+ key: "render",
41
+ value: function render() {
42
+ var _this$props = this.props,
43
+ password = _this$props.password,
44
+ policy = _this$props.policy,
45
+ messages = _this$props.messages;
46
+ var analysis = new _policy.default(policy.toJS()).missing(password);
47
+ // TODO: add a component for fadeIn / fadeOut animations?
48
+ var className = 'auth0-lock-password-strength animated ' + (!analysis.verified ? 'fadeIn' : 'fadeOut');
49
+ var prepareMessage = function prepareMessage(items) {
50
+ items && items.forEach(function (o) {
51
+ if (messages[o.code]) {
52
+ o.message = messages[o.code];
53
+ }
54
+ o.message = _format.default.apply(void 0, [o.message].concat(_toConsumableArray(o.format || [])));
55
+ if (o.items) {
56
+ prepareMessage(o.items);
57
+ }
58
+ });
59
+ };
60
+ prepareMessage(analysis.rules);
61
+ return /*#__PURE__*/_react.default.createElement("div", {
62
+ className: className
63
+ }, /*#__PURE__*/_react.default.createElement(List, {
64
+ items: analysis.rules
65
+ }));
66
+ }
67
+ }]);
73
68
  return PasswordStrength;
74
- }(_react2.default.Component);
75
-
69
+ }(_react.default.Component);
76
70
  exports.default = PasswordStrength;
77
-
78
-
79
71
  PasswordStrength.propTypes = {
80
- messages: _propTypes2.default.object.isRequired,
81
- password: _propTypes2.default.string.isRequired,
82
- policy: _propTypes2.default.object.isRequired
72
+ messages: _propTypes.default.object.isRequired,
73
+ password: _propTypes.default.string.isRequired,
74
+ policy: _propTypes.default.object.isRequired
83
75
  };
84
-
85
76
  PasswordStrength.defaultProps = {
86
77
  messages: {}
87
78
  };
88
-
89
- var List = function (_React$Component2) {
79
+ var List = /*#__PURE__*/function (_React$Component2) {
90
80
  _inherits(List, _React$Component2);
91
-
81
+ var _super2 = _createSuper(List);
92
82
  function List() {
93
83
  _classCallCheck(this, List);
94
-
95
- return _possibleConstructorReturn(this, _React$Component2.apply(this, arguments));
84
+ return _super2.apply(this, arguments);
96
85
  }
97
-
98
- List.prototype.render = function render() {
99
- var items = this.props.items;
100
-
101
-
102
- return items && items.length ? _react2.default.createElement(
103
- 'ul',
104
- null,
105
- items.map(function (x, i) {
106
- return _react2.default.createElement(Item, _extends({}, x, { key: i }));
107
- })
108
- ) : null;
109
- };
110
-
86
+ _createClass(List, [{
87
+ key: "render",
88
+ value: function render() {
89
+ var items = this.props.items;
90
+ return items && items.length ? /*#__PURE__*/_react.default.createElement("ul", null, items.map(function (x, i) {
91
+ return /*#__PURE__*/_react.default.createElement(Item, _extends({}, x, {
92
+ key: i
93
+ }));
94
+ })) : null;
95
+ }
96
+ }]);
111
97
  return List;
112
- }(_react2.default.Component);
113
-
98
+ }(_react.default.Component);
114
99
  List.propTypes = {
115
- items: _propTypes2.default.arrayOf(_propTypes2.default.object)
100
+ items: _propTypes.default.arrayOf(_propTypes.default.object)
116
101
  };
117
-
118
- var Item = function (_React$Component3) {
102
+ var Item = /*#__PURE__*/function (_React$Component3) {
119
103
  _inherits(Item, _React$Component3);
120
-
104
+ var _super3 = _createSuper(Item);
121
105
  function Item() {
122
106
  _classCallCheck(this, Item);
123
-
124
- return _possibleConstructorReturn(this, _React$Component3.apply(this, arguments));
107
+ return _super3.apply(this, arguments);
125
108
  }
126
-
127
- Item.prototype.render = function render() {
128
- var _props2 = this.props,
129
- items = _props2.items,
130
- message = _props2.message,
131
- verified = _props2.verified;
132
-
133
- var className = verified ? 'auth0-lock-checked' : '';
134
-
135
- return _react2.default.createElement(
136
- 'li',
137
- { className: className },
138
- _react2.default.createElement(
139
- 'span',
140
- null,
141
- message
142
- ),
143
- _react2.default.createElement(List, { items: items })
144
- );
145
- };
146
-
109
+ _createClass(Item, [{
110
+ key: "render",
111
+ value: function render() {
112
+ var _this$props2 = this.props,
113
+ items = _this$props2.items,
114
+ message = _this$props2.message,
115
+ verified = _this$props2.verified;
116
+ var className = verified ? 'auth0-lock-checked' : '';
117
+ return /*#__PURE__*/_react.default.createElement("li", {
118
+ className: className
119
+ }, /*#__PURE__*/_react.default.createElement("span", null, message), /*#__PURE__*/_react.default.createElement(List, {
120
+ items: items
121
+ }));
122
+ }
123
+ }]);
147
124
  return Item;
148
- }(_react2.default.Component);
149
-
125
+ }(_react.default.Component);
150
126
  Item.propTypes = {
151
- items: _propTypes2.default.array,
152
- message: _propTypes2.default.string.isRequired,
153
- verified: _propTypes2.default.bool.isRequired
127
+ items: _propTypes.default.array,
128
+ message: _propTypes.default.string.isRequired,
129
+ verified: _propTypes.default.bool.isRequired
154
130
  };
@@ -1,169 +1,163 @@
1
- 'use strict';
2
-
3
- exports.__esModule = true;
4
- exports.IconSvg = undefined;
5
-
6
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
7
-
8
- var _propTypes = require('prop-types');
9
-
10
- var _propTypes2 = _interopRequireDefault(_propTypes);
11
-
12
- var _react = require('react');
13
-
14
- var _react2 = _interopRequireDefault(_react);
15
-
16
- var _input_wrap = require('./input_wrap');
17
-
18
- var _input_wrap2 = _interopRequireDefault(_input_wrap);
19
-
20
- var _password_strength = require('./password/password_strength');
21
-
22
- var _password_strength2 = _interopRequireDefault(_password_strength);
23
-
24
- var _index = require('../../core/index');
25
-
26
- var l = _interopRequireWildcard(_index);
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
-
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.IconSvg = void 0;
7
+ var _propTypes = _interopRequireDefault(require("prop-types"));
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _input_wrap = _interopRequireDefault(require("./input_wrap"));
10
+ var _password_strength = _interopRequireDefault(require("./password/password_strength"));
11
+ var l = _interopRequireWildcard(require("../../core/index"));
12
+ var _excluded = ["invalidHint", "showPasswordStrengthMessage", "isValid", "onChange", "policy", "strengthMessages", "value", "showPassword", "lock"];
13
+ 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); }
14
+ 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
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
-
32
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
33
-
16
+ 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); }
17
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
19
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
34
20
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
35
-
36
- 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; }
37
-
38
- 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; }
39
-
40
- var IconSvg = exports.IconSvg = _react2.default.createElement(
41
- 'svg',
42
- {
43
- 'aria-hidden': 'true',
44
- focusable: 'false',
45
- width: '11px',
46
- height: '14px',
47
- viewBox: '0 0 13 16',
48
- version: '1.1',
49
- xmlns: 'http://www.w3.org/2000/svg',
50
- xmlnsXlink: 'http://www.w3.org/1999/xlink',
51
- className: 'auth0-lock-icon auth0-lock-icon-box'
52
- },
53
- _react2.default.createElement(
54
- 'g',
55
- { stroke: 'none', strokeWidth: '1', fill: 'none', fillRule: 'evenodd' },
56
- _react2.default.createElement(
57
- 'g',
58
- { transform: 'translate(-288.000000, -1508.000000)', fill: '#888888' },
59
- _react2.default.createElement('path', { d: 'M299,1523.998 L290,1523.998 C288.896,1523.998 288,1523.102 288,1521.999 L288,1515.999 C288,1514.895 288.896,1513.998 290,1513.998 L290,1513.998 L290,1512.499 C290,1510.015 292.015,1507.999 294.5,1507.999 C296.985,1507.999 299,1510.015 299,1512.499 L299,1513.999 C300.104,1513.999 301,1514.895 301,1515.999 L301,1521.999 C301,1523.103 300.104,1523.998 299,1523.998 L299,1523.998 Z M298,1512.499 C298,1510.566 296.433,1508.999 294.5,1508.999 C292.567,1508.999 291,1510.566 291,1512.499 L291,1513.998 L298,1513.998 L298,1512.499 L298,1512.499 Z M300,1515.999 C300,1515.446 299.552,1514.998 299,1514.998 L290,1514.998 C289.447,1514.998 289,1515.446 289,1515.999 L289,1521.999 C289,1522.551 289.447,1522.998 290,1522.998 L299,1522.998 C299.552,1522.998 300,1522.551 300,1521.999 L300,1515.999 L300,1515.999 Z M294.5,1520.998 C294.224,1520.998 294,1520.774 294,1520.498 L294,1517.498 C294,1517.223 294.224,1516.999 294.5,1516.999 C294.776,1516.999 295,1517.223 295,1517.498 L295,1520.498 C295,1520.774 294.776,1520.998 294.5,1520.998 L294.5,1520.998 Z' })
60
- )
61
- )
62
- );
63
-
64
- var PasswordInput = function (_React$Component) {
21
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
22
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
23
+ function _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
+ 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; }
31
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
32
+ 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); }
33
+ var IconSvg = /*#__PURE__*/_react.default.createElement("svg", {
34
+ "aria-hidden": "true",
35
+ focusable: "false",
36
+ width: "11px",
37
+ height: "14px",
38
+ viewBox: "0 0 13 16",
39
+ version: "1.1",
40
+ xmlns: "http://www.w3.org/2000/svg",
41
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
42
+ className: "auth0-lock-icon auth0-lock-icon-box"
43
+ }, /*#__PURE__*/_react.default.createElement("g", {
44
+ stroke: "none",
45
+ strokeWidth: "1",
46
+ fill: "none",
47
+ fillRule: "evenodd"
48
+ }, /*#__PURE__*/_react.default.createElement("g", {
49
+ transform: "translate(-288.000000, -1508.000000)",
50
+ fill: "#888888"
51
+ }, /*#__PURE__*/_react.default.createElement("path", {
52
+ d: "M299,1523.998 L290,1523.998 C288.896,1523.998 288,1523.102 288,1521.999 L288,1515.999 C288,1514.895 288.896,1513.998 290,1513.998 L290,1513.998 L290,1512.499 C290,1510.015 292.015,1507.999 294.5,1507.999 C296.985,1507.999 299,1510.015 299,1512.499 L299,1513.999 C300.104,1513.999 301,1514.895 301,1515.999 L301,1521.999 C301,1523.103 300.104,1523.998 299,1523.998 L299,1523.998 Z M298,1512.499 C298,1510.566 296.433,1508.999 294.5,1508.999 C292.567,1508.999 291,1510.566 291,1512.499 L291,1513.998 L298,1513.998 L298,1512.499 L298,1512.499 Z M300,1515.999 C300,1515.446 299.552,1514.998 299,1514.998 L290,1514.998 C289.447,1514.998 289,1515.446 289,1515.999 L289,1521.999 C289,1522.551 289.447,1522.998 290,1522.998 L299,1522.998 C299.552,1522.998 300,1522.551 300,1521.999 L300,1515.999 L300,1515.999 Z M294.5,1520.998 C294.224,1520.998 294,1520.774 294,1520.498 L294,1517.498 C294,1517.223 294.224,1516.999 294.5,1516.999 C294.776,1516.999 295,1517.223 295,1517.498 L295,1520.498 C295,1520.774 294.776,1520.998 294.5,1520.998 L294.5,1520.998 Z"
53
+ }))));
54
+ exports.IconSvg = IconSvg;
55
+ var PasswordInput = /*#__PURE__*/function (_React$Component) {
65
56
  _inherits(PasswordInput, _React$Component);
66
-
57
+ var _super = _createSuper(PasswordInput);
67
58
  function PasswordInput(props) {
59
+ var _this;
68
60
  _classCallCheck(this, PasswordInput);
69
-
70
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
71
-
61
+ _this = _super.call(this, props);
72
62
  _this.state = {};
73
63
  return _this;
74
64
  }
75
-
76
- PasswordInput.prototype.focus = function focus() {
77
- this.refs.input && this.refs.input.focus();
78
- };
79
-
80
- PasswordInput.prototype.hasFocus = function hasFocus() {
81
- return this.state.focused;
82
- };
83
-
84
- PasswordInput.prototype.render = function render() {
85
- var _props = this.props,
86
- invalidHint = _props.invalidHint,
87
- showPasswordStrengthMessage = _props.showPasswordStrengthMessage,
88
- isValid = _props.isValid,
89
- onChange = _props.onChange,
90
- policy = _props.policy,
91
- strengthMessages = _props.strengthMessages,
92
- value = _props.value,
93
- showPassword = _props.showPassword,
94
- lock = _props.lock,
95
- props = _objectWithoutProperties(_props, ['invalidHint', 'showPasswordStrengthMessage', 'isValid', 'onChange', 'policy', 'strengthMessages', 'value', 'showPassword', 'lock']);
96
-
97
- var _state = this.state,
98
- focused = _state.focused,
99
- changing = _state.changing;
100
-
101
-
102
- var allowPasswordAutocomplete = l.ui.allowPasswordAutocomplete(lock);
103
-
104
- var passwordStrength = policy && focused && changing && showPasswordStrengthMessage ? _react2.default.createElement(_password_strength2.default, { messages: strengthMessages, password: value, policy: policy }) : null;
105
-
106
- return _react2.default.createElement(
107
- _input_wrap2.default,
108
- {
65
+ _createClass(PasswordInput, [{
66
+ key: "focus",
67
+ value: function focus() {
68
+ this.refs.input && this.refs.input.focus();
69
+ }
70
+ }, {
71
+ key: "hasFocus",
72
+ value: function hasFocus() {
73
+ return this.state.focused;
74
+ }
75
+ }, {
76
+ key: "render",
77
+ value: function render() {
78
+ var _this$props = this.props,
79
+ invalidHint = _this$props.invalidHint,
80
+ showPasswordStrengthMessage = _this$props.showPasswordStrengthMessage,
81
+ isValid = _this$props.isValid,
82
+ onChange = _this$props.onChange,
83
+ policy = _this$props.policy,
84
+ strengthMessages = _this$props.strengthMessages,
85
+ value = _this$props.value,
86
+ showPassword = _this$props.showPassword,
87
+ lock = _this$props.lock,
88
+ props = _objectWithoutProperties(_this$props, _excluded);
89
+ var _this$state = this.state,
90
+ focused = _this$state.focused,
91
+ changing = _this$state.changing;
92
+ var allowPasswordAutocomplete = l.ui.allowPasswordAutocomplete(lock);
93
+ var passwordStrength = policy && focused && changing && showPasswordStrengthMessage ? /*#__PURE__*/_react.default.createElement(_password_strength.default, {
94
+ messages: strengthMessages,
95
+ password: value,
96
+ policy: policy
97
+ }) : null;
98
+ return /*#__PURE__*/_react.default.createElement(_input_wrap.default, {
109
99
  after: passwordStrength,
110
100
  focused: focused,
111
101
  invalidHint: invalidHint,
112
102
  isValid: isValid,
113
- name: 'password',
103
+ name: "password",
114
104
  icon: IconSvg
115
- },
116
- _react2.default.createElement('input', _extends({
117
- ref: 'input',
105
+ }, /*#__PURE__*/_react.default.createElement("input", _extends({
106
+ ref: "input",
118
107
  type: showPassword ? 'text' : 'password',
119
- id: l.id(lock) + '-password',
120
- name: 'password',
121
- className: 'auth0-lock-input',
108
+ id: "".concat(l.id(lock), "-password"),
109
+ name: "password",
110
+ className: "auth0-lock-input",
122
111
  autoComplete: allowPasswordAutocomplete ? 'on' : 'off',
123
- autoCapitalize: 'off',
124
- autoCorrect: 'off',
125
- spellCheck: 'false',
112
+ autoCapitalize: "off",
113
+ autoCorrect: "off",
114
+ spellCheck: "false",
126
115
  onChange: this.handleOnChange.bind(this),
127
116
  onFocus: this.handleFocus.bind(this),
128
117
  onBlur: this.handleBlur.bind(this),
129
118
  value: value,
130
- 'aria-label': 'Password',
131
- 'aria-invalid': !isValid,
132
- 'aria-describedby': !isValid && !policy && invalidHint ? 'auth0-lock-error-msg-password' : undefined
133
- }, props))
134
- );
135
- };
136
-
137
- PasswordInput.prototype.handleOnChange = function handleOnChange(e) {
138
- var state = this.state;
139
- state.changing = true;
140
- this.setState(state);
141
- if (this.props.onChange) {
142
- this.props.onChange(e);
119
+ "aria-label": "Password",
120
+ "aria-invalid": !isValid,
121
+ "aria-describedby": !isValid && !policy && invalidHint ? "auth0-lock-error-msg-password" : undefined
122
+ }, props)));
143
123
  }
144
- };
145
-
146
- PasswordInput.prototype.handleFocus = function handleFocus() {
147
- this.setState({ focused: true });
148
- };
149
-
150
- PasswordInput.prototype.handleBlur = function handleBlur() {
151
- this.setState({ focused: false });
152
- };
153
-
124
+ }, {
125
+ key: "handleOnChange",
126
+ value: function handleOnChange(e) {
127
+ var state = this.state;
128
+ state.changing = true;
129
+ this.setState(state);
130
+ if (this.props.onChange) {
131
+ this.props.onChange(e);
132
+ }
133
+ }
134
+ }, {
135
+ key: "handleFocus",
136
+ value: function handleFocus() {
137
+ this.setState({
138
+ focused: true
139
+ });
140
+ }
141
+ }, {
142
+ key: "handleBlur",
143
+ value: function handleBlur() {
144
+ this.setState({
145
+ focused: false
146
+ });
147
+ }
148
+ }]);
154
149
  return PasswordInput;
155
- }(_react2.default.Component);
156
-
157
- PasswordInput.propTypes = {
158
- invalidHint: _propTypes2.default.string.isRequired,
159
- showPasswordStrengthMessage: _propTypes2.default.bool.isRequired,
160
- isValid: _propTypes2.default.bool.isRequired,
161
- onChange: _propTypes2.default.func.isRequired,
162
- placeholder: _propTypes2.default.string,
163
- policy: _propTypes2.default.object,
164
- strengthMessages: _propTypes2.default.object,
165
- value: _propTypes2.default.string.isRequired,
166
- showPassword: _propTypes2.default.bool.isRequired,
167
- lock: _propTypes2.default.object.isRequired
168
- };
150
+ }(_react.default.Component);
169
151
  exports.default = PasswordInput;
152
+ _defineProperty(PasswordInput, "propTypes", {
153
+ invalidHint: _propTypes.default.string.isRequired,
154
+ showPasswordStrengthMessage: _propTypes.default.bool.isRequired,
155
+ isValid: _propTypes.default.bool.isRequired,
156
+ onChange: _propTypes.default.func.isRequired,
157
+ placeholder: _propTypes.default.string,
158
+ policy: _propTypes.default.object,
159
+ strengthMessages: _propTypes.default.object,
160
+ value: _propTypes.default.string.isRequired,
161
+ showPassword: _propTypes.default.bool.isRequired,
162
+ lock: _propTypes.default.object.isRequired
163
+ });